linux/arch/arm/mach-ux500
Russell King f81309067f ARM: move heavy barrier support out of line
The existing memory barrier macro causes a significant amount of code
to be inserted inline at every call site.  For example, in
gpio_set_irq_type(), we have this for mb():

c0344c08:       f57ff04e        dsb     st
c0344c0c:       e59f8190        ldr     r8, [pc, #400]  ; c0344da4 <gpio_set_irq_type+0x230>
c0344c10:       e3590004        cmp     r9, #4
c0344c14:       e5983014        ldr     r3, [r8, #20]
c0344c18:       0a000054        beq     c0344d70 <gpio_set_irq_type+0x1fc>
c0344c1c:       e3530000        cmp     r3, #0
c0344c20:       0a000004        beq     c0344c38 <gpio_set_irq_type+0xc4>
c0344c24:       e50b2030        str     r2, [fp, #-48]  ; 0xffffffd0
c0344c28:       e50bc034        str     ip, [fp, #-52]  ; 0xffffffcc
c0344c2c:       e12fff33        blx     r3
c0344c30:       e51bc034        ldr     ip, [fp, #-52]  ; 0xffffffcc
c0344c34:       e51b2030        ldr     r2, [fp, #-48]  ; 0xffffffd0
c0344c38:       e5963004        ldr     r3, [r6, #4]

Moving the outer_cache_sync() call out of line reduces the impact of
the barrier:

c0344968:       f57ff04e        dsb     st
c034496c:       e35a0004        cmp     sl, #4
c0344970:       e50b2030        str     r2, [fp, #-48]  ; 0xffffffd0
c0344974:       0a000044        beq     c0344a8c <gpio_set_irq_type+0x1b8>
c0344978:       ebf363dd        bl      c001d8f4 <arm_heavy_mb>
c034497c:       e5953004        ldr     r3, [r5, #4]

This should reduce the cache footprint of this code.  Overall, this
results in a reduction of around 20K in the kernel size:

    text    data      bss      dec     hex filename
10773970  667392 10369656 21811018 14ccf4a ../build/imx6/vmlinux-old
10754219  667392 10369656 21791267 14c8223 ../build/imx6/vmlinux-new

Another advantage to this approach is that we can finally resolve the
issue of SoCs which have their own memory barrier requirements within
multiplatform kernels (such as OMAP.)  Here, the bus interconnects
need additional handling to ensure that writes become visible in the
correct order (eg, between dma_map() operations, writes to DMA
coherent memory, and MMIO accesses.)

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-07-25 15:28:05 +01:00
..
board-mop500-audio.c mfd: dbx500/abx500: root out hardcoded IRQ assignments 2014-03-04 08:58:11 +08:00
board-mop500-regulators.c ARM: ux500: Staticize ab8505_regulators 2014-07-10 10:37:43 +02:00
board-mop500-regulators.h ARM: ux500: regulators: Remove dead code for SD-card regulator 2013-12-13 10:30:20 +01:00
board-mop500.h ARM: ux500: Remove redundant board file for mmci platform data 2014-05-12 12:52:44 +02:00
cache-l2x0.c ARM: move heavy barrier support out of line 2015-07-25 15:28:05 +01:00
cpu-db8500.c ARM: ux500: rename ux500_map_io 2015-05-18 15:08:04 +02:00
cpu.c ARM: ux500: look up PRCMU resource from DT 2015-05-18 15:07:48 +02:00
db8500-regs.h ARM: ux500: avoid warning in ux500_read_asicid 2013-06-04 11:21:58 +02:00
headsmp.S ARM: ux500: remove u8500_secondary_startup from INIT section. 2013-08-19 22:49:24 +02:00
hotplug.c Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-05-03 09:13:19 -07:00
id.c ARM: ux500: rename ux500_map_io 2015-05-18 15:08:04 +02:00
id.h ARM: ux500: de-globalize <mach/id.h> 2013-01-29 18:47:37 +01:00
Kconfig ARM: ux500: Enable Kconfig for the generic PM domain 2014-10-28 10:48:52 +01:00
Makefile ARM: ux500: Initial support for PM domains 2014-10-28 10:48:23 +01:00
Makefile.boot ARM: move all dtb targets out of Makefile.boot 2012-09-14 09:22:04 -05:00
platsmp.c ARM: ux500: get SCU base from device tree 2015-05-18 15:06:40 +02:00
pm.c ARM: ux500: get rid of static GIC dist base 2015-05-18 15:07:15 +02:00
pm_domains.c ARM: make of_device_ids const 2015-02-19 09:44:25 +01:00
pm_domains.h ARM: ux500: Initial support for PM domains 2014-10-28 10:48:23 +01:00
setup.h ARM: ux500: delete static resource defines 2015-05-18 15:08:15 +02:00
ste-dma40-db8500.h dmaengine: ste_dma40: Amalgamate DMA source and destination channel numbers 2013-05-23 21:11:51 +02:00
timer.c ARM: ux500: storage class should be before const qualifier 2014-07-10 10:37:43 +02:00