linux/arch/arm/kernel
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
..
.gitignore
arch_timer.c
armksyms.c ARM: 8151/1: add missing exports for asm functions required by get_user macro 2014-09-16 16:09:30 +01:00
asm-offsets.c Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
atags.h
atags_compat.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_parse.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_proc.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
bios32.c ARM: 8293/1: kernel: fix pci_mmap_page_range() offset calculation 2015-02-23 14:43:58 +00:00
calls.S ARM: wire up execveat syscall 2015-01-07 20:31:54 +00:00
cpuidle.c ARM: cpuidle: Document the code 2015-03-25 09:53:43 +01:00
crash_dump.c ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr 2014-04-07 12:10:00 +01:00
debug.S ARM: unify MMU/!MMU addruart calls 2015-05-20 23:09:51 +02:00
devtree.c arm: Add devicetree fixup machine function 2014-07-29 21:26:49 -06:00
dma-isa.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
dma.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
early_printk.c
elf.c
entry-armv.S Fixup various init.h misuses that are fragile wrt code moving to module.h 2015-07-02 11:07:27 -07:00
entry-common.S Merge branch 'bsym' into for-next 2015-06-12 21:18:38 +01:00
entry-ftrace.S ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
entry-header.S ARM: 8266/1: Remove early stack deallocation from restore_user_regs 2015-01-12 19:26:57 +00:00
entry-v7m.S ARM: 8340/1: ARMv7-M: Enlarge vector table up to 256 entries 2015-05-08 10:42:21 +01:00
fiq.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
fiqasm.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
ftrace.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
head-common.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
head-nommu.S ARM: 8383/1: nommu: avoid deprecated source register on mov 2015-06-12 21:18:48 +01:00
head.S Merge branch 'bsym' into for-next 2015-06-12 21:18:38 +01:00
hibernate.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
hw_breakpoint.c perf: Remove type specific target pointers 2015-03-23 10:58:04 +01:00
hyp-stub.S Here are the PPC and ARM changes for KVM, which I separated because 2014-08-07 11:35:30 -07:00
insn.c
io.c ARM: io.c: clean up EXPORT_SYMBOL()s 2014-11-21 15:25:02 +00:00
irq.c ARM: move heavy barrier support out of line 2015-07-25 15:28:05 +01:00
isa.c arm: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
iwmmxt.S ARM: 8221/1: PJ4: allow building in Thumb-2 mode 2014-12-03 16:08:00 +00:00
jump_label.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
kgdb.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
machine_kexec.c ARM: 8338/1: kexec: Relax SMP validation to improve DT compatibility 2015-04-02 09:59:43 +01:00
Makefile Merge branch 'devel-stable' into for-next 2015-06-12 21:18:57 +01:00
module-plts.c ARM: 8364/1: fix BE32 module loading 2015-06-02 09:58:17 +01:00
module.c ARM: 8220/1: allow modules outside of bl range 2015-05-08 10:42:34 +01:00
module.lds ARM: 8220/1: allow modules outside of bl range 2015-05-08 10:42:34 +01:00
opcodes.c
patch.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
perf_callchain.c arm: perf: factor out callchain code 2014-10-30 12:16:58 +00:00
perf_event.c arm: perf: unify perf_event{,_cpu}.c 2015-05-28 17:13:26 +01:00
perf_event_v6.c arm: perf: factor out armv6 pmu driver 2015-05-28 16:54:13 +01:00
perf_event_v7.c arm: perf: factor out armv7 pmu driver 2015-05-28 16:54:18 +01:00
perf_event_xscale.c arm: perf: factor out xscale pmu driver 2015-05-28 16:54:09 +01:00
perf_regs.c perf: Move task_pt_regs sampling into arch code 2015-01-09 11:12:28 +01:00
pj4-cp0.c ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor 2014-04-25 12:07:34 +01:00
process.c Merge branches 'misc', 'vdso' and 'fixes' into for-next 2015-04-14 22:28:25 +01:00
psci-call.S ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci.c ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci_smp.c ARM: Check if a CPU has gone offline 2014-05-15 10:16:30 -04:00
ptrace.c Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
reboot.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
reboot.h ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
relocate_kernel.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
return_address.c ARM: 8328/1: remove empty preprocessor #else branch 2015-03-28 16:54:53 +00:00
setup.c xen: features and cleanups for 4.2-rc0 2015-07-01 11:53:46 -07:00
signal.c arm: Remove signal translation and exec_domain 2015-04-12 20:58:24 +02:00
sigreturn_codes.S
sleep.S ARM: fix new BSYM() usage introduced via for-arm-soc branch 2015-06-12 21:19:35 +01:00
smp.c ARM: redo TTBR setup code for LPAE 2015-06-01 23:48:19 +01:00
smp_scu.c ARM: 8122/1: smp_scu: enable SCU standby support 2014-08-02 08:51:53 +01:00
smp_tlb.c ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15 2014-07-24 14:40:26 +01:00
smp_twd.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
stacktrace.c ARM: 8172/1: Use current_stack_pointer in save_stack_trace_tsk 2014-11-13 23:58:03 +00:00
suspend.c ARM: 8248/1: pm: remove outdated comment 2015-01-21 15:58:57 +00:00
swp_emulate.c ARM: 8322/1: keep .text and .fixup regions closer together 2015-03-29 23:11:56 +01:00
sys_arm.c
sys_oabi-compat.c separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
tcm.c ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone 2015-06-06 10:37:28 +01:00
thumbee.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
time.c ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them 2015-04-03 08:18:23 +02:00
topology.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
traps.c ARM: remove __bad_xchg definition 2015-06-02 09:58:19 +01:00
unwind.c ARM: 8176/1: Use current_stack_pointer in unwind_backtrace 2014-11-13 23:58:09 +00:00
v7m.c
vdso.c Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
vmlinux.lds.S arm64 updates for 4.1: 2015-04-16 13:58:29 -05:00
xscale-cp0.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00