linux-hardened/arch/metag/kernel
James Hogan fa771d029a metag: move irq enable out of irqflags.h on SMP
The SMP version of arch_local_irq_enable() uses preempt_disable(), but
<asm/irqflags.h> doesn't include <linux/preempt.h> causing the following
errors on SMP when pstore/ftrace is enabled (caught by buildbot smp
allyesconfig):

In file included from include/linux/irqflags.h:15,
                 from fs/pstore/ftrace.c:16:
arch/metag/include/asm/irqflags.h: In function 'arch_local_irq_enable':
arch/metag/include/asm/irqflags.h:84: error: implicit declaration of function 'preempt_disable'
arch/metag/include/asm/irqflags.h:86: error: implicit declaration of function 'preempt_enable_no_resched'

However <linux/preempt.h> cannot be easily included from
<asm/irqflags.h> as it can cause circular include dependencies in the
!SMP case, and potentially in the SMP case in the future. Therefore move
the SMP implementation of arch_local_irq_enable() into traps.c and use
an inline version of get_trigger_mask() which is also defined in traps.c
for SMP.

This adds an extra layer of function call / stack push when
preempt_disable needs to call other functions, however in the
non-preemptive SMP case it should be about as fast, as it was already
calling the get_trigger_mask() function which is now used inline.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02 20:11:14 +00:00
..
perf metag: Perf 2013-03-02 20:09:54 +00:00
.gitignore metag: Build infrastructure 2013-03-02 20:09:54 +00:00
asm-offsets.c metag: Build infrastructure 2013-03-02 20:09:54 +00:00
cachepart.c metag: SMP support 2013-03-02 20:09:51 +00:00
clock.c metag: Time keeping 2013-03-02 20:09:22 +00:00
core_reg.c metag: SMP support 2013-03-02 20:09:51 +00:00
da.c metag: Add JTAG Debug Adapter (DA) support 2013-03-02 20:09:56 +00:00
devtree.c metag: Device tree 2013-03-02 20:09:22 +00:00
dma.c metag: DMA 2013-03-02 20:09:51 +00:00
ftrace.c metag: ftrace support 2013-03-02 20:09:55 +00:00
ftrace_stub.S metag: ftrace support 2013-03-02 20:09:55 +00:00
head.S metag: SMP support 2013-03-02 20:09:51 +00:00
irq.c metag: Internal and external irqchips 2013-03-02 20:09:48 +00:00
kick.c metag: Traps 2013-03-02 20:09:45 +00:00
machines.c metag: Boot 2013-03-02 20:09:17 +00:00
Makefile metag: Add JTAG Debug Adapter (DA) support 2013-03-02 20:09:56 +00:00
metag_ksyms.c metag: export clear_page and copy_page 2013-03-02 20:11:13 +00:00
module.c metag: Module support 2013-03-02 20:09:49 +00:00
perf_callchain.c metag: Perf 2013-03-02 20:09:54 +00:00
process.c metag: Scheduling/Process management 2013-03-02 20:09:49 +00:00
ptrace.c metag: ptrace 2013-03-02 20:09:22 +00:00
setup.c metag: protect more non-MMU memory regions 2013-03-02 20:09:58 +00:00
signal.c metag: Signal handling 2013-03-02 20:09:21 +00:00
smp.c metag: protect more non-MMU memory regions 2013-03-02 20:09:58 +00:00
stacktrace.c metag: Stack unwinding 2013-03-02 20:09:52 +00:00
sys_metag.c metag: System Calls 2013-03-02 20:09:49 +00:00
tbiunexp.S metag: Traps 2013-03-02 20:09:45 +00:00
tcm.c metag: TCM support 2013-03-02 20:09:21 +00:00
time.c metag: Time keeping 2013-03-02 20:09:22 +00:00
topology.c metag: SMP support 2013-03-02 20:09:51 +00:00
traps.c metag: move irq enable out of irqflags.h on SMP 2013-03-02 20:11:14 +00:00
user_gateway.S metag: System Calls 2013-03-02 20:09:49 +00:00
vmlinux.lds.S metag: Build infrastructure 2013-03-02 20:09:54 +00:00