kernel-fxtec-pro1x/arch/arm/mach-davinci
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
..
include/mach ARM: davinci: implement DEBUG_LL port choice 2012-05-09 17:06:41 +05:30
aemif.c davinci: aemif: signedness bug in davinci_aemif_setup_timing() 2010-12-10 07:33:51 -08:00
board-da830-evm.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
board-da850-evm.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
board-dm355-evm.c ARM: davinci: create new common platform header for davinci 2012-02-25 02:40:13 +05:30
board-dm355-leopard.c ARM: davinci: create new common platform header for davinci 2012-02-25 02:40:13 +05:30
board-dm365-evm.c Merge branch 'v3.4/features' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers 2012-03-15 20:33:47 +00:00
board-dm644x-evm.c Merge branch 'v3.4/features' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers 2012-03-15 20:33:47 +00:00
board-dm646x-evm.c Merge branch 'v3.4/features' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers 2012-03-15 20:33:47 +00:00
board-mityomapl138.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
board-neuros-osd2.c Merge branch 'v3.4/features' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers 2012-03-15 20:33:47 +00:00
board-omapl138-hawk.c ARM: davinci: update mdio bus name 2012-01-27 22:29:09 +05:30
board-sffsdr.c Merge branch 'v3.4/features' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers 2012-03-15 20:33:47 +00:00
board-tnetv107x-evm.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
cdce949.c arm: fix implicit module.h users by adding it to arch/arm as required. 2011-10-31 19:30:50 -04:00
clock.c ARM: davinci: add support for multiple power domains 2011-12-03 00:35:52 +05:30
clock.h ARM: davinci: add support for multiple power domains 2011-12-03 00:35:52 +05:30
common.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
cp_intc.c arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
cpufreq.c ARM: davinci: cpufreq: fix compiler warning 2012-03-13 01:24:14 +05:30
cpuidle.c ARM: davinci: Fix for cpuidle consolidation changes 2012-03-22 01:19:44 -04:00
da830.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
da850.c ARM: davinci: DA850: move da850_register_pm to .init.text 2012-03-13 02:11:33 +05:30
davinci.h ARM: davinci: dm644x: add support for v4l2 video display 2012-03-11 12:41:29 +05:30
devices-da8xx.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
devices-tnetv107x.c ARM: davinci: Explicitly set channel controllers' default queues 2011-09-17 15:54:08 +05:30
devices.c ARM: davinci: streamline sysmod access 2012-02-25 02:40:17 +05:30
dm355.c ARM: davinci: streamline sysmod access 2012-02-25 02:40:17 +05:30
dm365.c ARM: davinci: streamline sysmod access 2012-02-25 02:40:17 +05:30
dm644x.c ARM: davinci: dm644x: add support for v4l2 video display 2012-03-11 12:41:29 +05:30
dm646x.c ARM: davinci: streamline sysmod access 2012-02-25 02:40:17 +05:30
dma.c ARM: davinci: optimize the DMA ISR 2012-05-09 17:07:49 +05:30
irq.c Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-19 22:10:05 -07:00
Kconfig ARM: davinci: AM18x: Add wl1271/wlan support 2011-09-17 15:53:23 +05:30
Makefile ARM: mach-davinci: remove arch specific special handling for ioremap 2011-11-15 22:30:39 -05:00
Makefile.boot ARM: 7022/1: allow to detect conflicting zreladdrs 2011-10-17 09:12:40 +01:00
mux.c Davinci: pinmux - use ioremap() 2010-05-13 10:05:29 -07:00
mux.h Davinci: eliminate pinmux offset verbosity 2010-05-06 15:02:09 -07:00
pm.c net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
psc.c ARM: davinci: psc: fix incorrect offsets 2011-12-05 16:47:15 +05:30
serial.c Davinci: serial - conditional reset via pwremu 2010-05-06 15:02:10 -07:00
sleep.S Merge branch 'depends/rmk/memory_h' into next/fixes 2011-10-31 23:11:53 +01:00
sram.c DaVinci: remove unneeded #include's 2009-11-25 10:21:31 -08:00
time.c ARM: davinci: convert to common sched_clock() implementation 2012-02-03 11:34:25 +00:00
tnetv107x.c ARM: 7190/1: restart: davinci: use new restart hook 2012-01-05 12:57:09 +00:00
usb.c DA8xx: assign name to MUSB IRQ resource 2010-12-11 12:15:53 +02:00