linux/arch/arm
Sebastian Andrzej Siewior bcd59b0f0c ARM: davinci: optimize the DMA ISR
The ISR does quiete a lot of hw access which could be avoided. First it
checks for a pending interrupt by reading alteast one register. Then it
checks for the "activated" slots by reading another register. This is
more or a less a must.
Now, once it found an active slot it does the same two reads again.
After that it "knows" that there must be a pending transfer however it
cross checks with the other register. There are 32 bit in an interger
which are polled instead of considering only the set bits and ignoring
those which are zero. This performs atleast 32 reads which could be
avoided. In case of a first match it does another read.
This patch reorganizes the access by re-using the register which have
been read and then uses ffs() to find the matching slot instead looping
over it. By doing this we get rid of the last (32 + 2 + hits) reads.

It is possible however that by really busy bank0 we never get to handle
bank1. If this is a problem, we could try to handle bank1 after we are
done with bank0 to check if there are any outstanding transfers.

To put some numbers on this, this is from spi transfer via spidev. The
first column is the number of total transfers, the time stamp is taken
before and after the ioctl():

|10000, min: 542us      avg: 591us
|20000, min: 542us      avg: 592us
|30000, min: 542us      avg: 592us
|40000, min: 542us      avg: 585us
|50000, min: 542us      avg: 593us

The same test case with the patch applied
|10000, min: 444us      avg: 493us
|20000, min: 444us      avg: 491us
|30000, min: 444us      avg: 489us
|40000, min: 444us      avg: 491us
|50000, min: 444us      avg: 492us

that is almost 100us that just went away.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2012-05-09 17:07:49 +05:30
..
boot Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-04-30 15:34:41 -07:00
common ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler 2012-04-10 09:27:42 +01:00
configs Merge branch 'v3.4-samsung-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes 2012-04-27 09:40:06 -07:00
include/asm ARM: 7403/1: tls: remove covert channel via TPIDRURW 2012-04-28 11:01:30 +01:00
kernel ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs 2012-04-28 11:01:31 +01:00
lib
mach-at91 ARM: at91: fix at91sam9261ek Ethernet dm9000 irq 2012-04-16 11:08:26 +02:00
mach-bcmring ARM: bcmring: fix UART declarations 2012-04-18 21:21:45 -07:00
mach-clps711x ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-cns3xxx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-davinci ARM: davinci: optimize the DMA ISR 2012-05-09 17:07:49 +05:30
mach-dove ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-ebsa110 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-ep93xx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-exynos ARM: SAMSUNG: add missing MMC_CAP2_BROKEN_VOLTAGE capability 2012-04-24 17:28:12 -07:00
mach-footbridge ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-gemini ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mach-h720x ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-highbank ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-imx ARM: imx: Fix imx5 idle logic bug 2012-04-18 11:52:24 +02:00
mach-integrator ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-iop13xx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-iop32x ARM: kill off __mem_pci 2012-03-06 21:34:45 -06:00
mach-iop33x ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-ixp4xx ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-ixp23xx ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-ixp2000 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-kirkwood Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
mach-ks8695 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-l7200/include/mach
mach-lpc32xx ARM: arm-soc fixes for 3.4-rc 2012-03-29 21:30:28 -07:00
mach-mmp ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-msm ARM: msm: Fix gic irqdomain support 2012-04-23 16:13:27 -07:00
mach-mv78xx0 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-mxs MTD merge for 3.4 2012-03-30 17:31:56 -07:00
mach-netx ARM: __io abuse cleanup 2012-03-13 21:25:21 -05:00
mach-nomadik ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-omap1 ARM: OMAP1: DMTIMER: fix broken timer clock source selection 2012-04-17 15:30:16 -07:00
mach-omap2 ARM: SoC fixes for 3.4-rc 2012-04-21 12:45:52 -07:00
mach-orion5x ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-picoxcell ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-pnx4008 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-prima2 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-pxa ARM: PXA2xx: MFP: fix potential direction bug 2012-04-27 11:14:06 +08:00
mach-realview ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-rpc ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-s3c24xx ARM: S3C24XX: Fix build warning for S3C2410_PM 2012-04-24 13:49:59 -07:00
mach-s3c64xx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-s3c2410 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s3c2412 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s3c2440 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s5p64x0 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-s5pc100 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-s5pv210 ARM: SAMSUNG: add missing MMC_CAP2_BROKEN_VOLTAGE capability 2012-04-24 17:28:12 -07:00
mach-sa1100 arm/sa1100: fix sa1100-rtc memory resource 2012-04-27 11:02:14 +08:00
mach-shark ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-shmobile MTD merge for 3.4 2012-03-30 17:31:56 -07:00
mach-spear3xx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-spear6xx ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-tegra ARM: arm-soc fixes for 3.4-rc 2012-03-29 21:30:28 -07:00
mach-u300 ARM: u300: bump all IRQ numbers by one 2012-04-20 09:52:58 +02:00
mach-ux500 arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file 2012-04-25 21:26:34 -07:00
mach-versatile ARM: versatile: fix build failure in pci.c 2012-04-02 22:03:35 -07:00
mach-vexpress ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-vt8500 ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mach-w90x900 ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-zynq ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mm ARM: 7401/1: mm: Fix section mismatches 2012-04-28 11:00:16 +01:00
net ARM: 7259/3: net: JIT compiler for packet filters 2012-03-24 09:38:56 +00:00
nwfpe Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
oprofile
plat-iop Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
plat-mxc ARM: 3ds_debugboard: Fix smsc911x driver probe 2012-04-02 11:15:15 +02:00
plat-nomadik Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
plat-omap ARM: OMAP: fix DMA vs memory ordering 2012-04-23 16:54:21 +01:00
plat-orion ARM: orion: wdt: use resource vice direct access 2012-03-16 04:28:41 +00:00
plat-pxa Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
plat-s3c24xx ARM: fix builds due to missing <asm/system_misc.h> includes 2012-03-30 15:44:40 -07:00
plat-s5p Merge branch 'samsung/cleanup-exynos-clock' into next/soc 2012-03-20 10:07:48 +00:00
plat-samsung ARM: EXYNOS: use 'exynos4-sdhci' as device name for sdhci controllers 2012-04-20 17:25:46 -07:00
plat-spear Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-29 23:17:44 -07:00
plat-versatile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
tools
vfp ARM: 7400/1: vfp: clear fpscr length and stride bits on entry to sig handler 2012-04-23 15:44:42 +01:00
Kconfig ARM: 7396/1: errata: only handle ARM erratum #326103 on affected cores 2012-04-23 14:21:52 +01:00
Kconfig-nommu
Kconfig.debug ARM: davinci: implement DEBUG_LL port choice 2012-05-09 17:06:41 +05:30
Makefile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00