1
linux/arch/mips/include/asm
David Howells df9ee29270 Fix IRQ flag handling naming
Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
it maps:

	local_irq_enable() -> raw_local_irq_enable()
	local_irq_disable() -> raw_local_irq_disable()
	local_irq_save() -> raw_local_irq_save()
	...

and under the other configuration, it maps:

	raw_local_irq_enable() -> local_irq_enable()
	raw_local_irq_disable() -> local_irq_disable()
	raw_local_irq_save() -> local_irq_save()
	...

This is quite confusing.  There should be one set of names expected of the
arch, and this should be wrapped to give another set of names that are expected
by users of this facility.

Change this to have the arch provide:

	flags = arch_local_save_flags()
	flags = arch_local_irq_save()
	arch_local_irq_restore(flags)
	arch_local_irq_disable()
	arch_local_irq_enable()
	arch_irqs_disabled_flags(flags)
	arch_irqs_disabled()
	arch_safe_halt()

Then linux/irqflags.h wraps these to provide:

	raw_local_save_flags(flags)
	raw_local_irq_save(flags)
	raw_local_irq_restore(flags)
	raw_local_irq_disable()
	raw_local_irq_enable()
	raw_irqs_disabled_flags(flags)
	raw_irqs_disabled()
	raw_safe_halt()

with type checking on the flags 'arguments', and then wraps those to provide:

	local_save_flags(flags)
	local_irq_save(flags)
	local_irq_restore(flags)
	local_irq_disable()
	local_irq_enable()
	irqs_disabled_flags(flags)
	irqs_disabled()
	safe_halt()

with tracing included if enabled.

The arch functions can now all be inline functions rather than some of them
having to be macros.

Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
Cc: starvik@axis.com [CRIS]
Cc: jesper.nilsson@axis.com [CRIS]
Cc: linux-cris-kernel@axis.com
2010-10-07 14:08:55 +01:00
..
dec MIPS: Make various locks static. 2010-02-27 12:53:30 +01:00
emma MIPS: EMMA2RH: Replace EMMA2RH_SW_IRQ_INTxx with EMMA2RH_SW_IRQ(n) 2010-08-05 13:26:04 +01:00
fw
ip32
lasat
mach-ar7 MIPS: AR7, BCM63xx: fix gpio_to_irq() return value 2010-07-05 17:17:26 +01:00
mach-au1x00 MIPS: au1000_eth: Get ethernet address from platform_data 2010-08-05 13:26:09 +01:00
mach-bcm47xx MIPS: BCM47xx: Fix nvram_getenv return value. 2010-08-05 13:26:31 +01:00
mach-bcm63xx MIPS: AR7, BCM63xx: fix gpio_to_irq() return value 2010-07-05 17:17:26 +01:00
mach-cavium-octeon MIPS: Octeon: Support 256 MSI on PCIe 2010-08-05 13:26:27 +01:00
mach-cobalt
mach-db1x00 MIPS: Alchemy: Extended DB1200 board support. 2010-02-27 12:53:00 +01:00
mach-dec
mach-emma2rh
mach-generic dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mach-ip22
mach-ip27 dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mach-ip28
mach-ip32 dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mach-jazz
mach-jz4740 MMC: Add support for the controller on JZ4740 SoCs. 2010-08-05 13:26:18 +01:00
mach-lasat
mach-loongson MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
mach-malta
mach-mipssim
mach-pb1x00 MIPS: Remove dead CONFIG_MTD_PB1550_BOOT, CONFIG_MTD_PB1550_USER 2010-08-05 13:26:00 +01:00
mach-pnx833x MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
mach-pnx8550
mach-powertv MIPS: PowerTV: Separate PowerTV USB support from non-USB code 2010-08-05 13:26:34 +01:00
mach-rc32434
mach-rm
mach-sibyte MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions. 2010-04-12 17:26:19 +01:00
mach-tx39xx
mach-tx49xx MIPS: TX49xx: Rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-10-04 18:33:58 +01:00
mach-vr41xx
mach-wrppmc
mach-yosemite
mips-boards MIPS: GIC: Remove dependencies from Malta files. 2010-10-04 18:33:56 +01:00
octeon MIPS: Octeon: Allow more than 3.75GB of memory with PCIe 2010-08-05 13:26:31 +01:00
pci
pmc-sierra/msp71xx MIPS: MSP71xx: Remove dead CONFIG_MTD_PMC_MSP_RAMROOT 2010-08-05 13:26:01 +01:00
sgi tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sibyte MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
sn MIPS: IP27: Don't include <linux/topology.h> into <asm/sn/agent.h>. 2010-08-05 13:25:38 +01:00
txx9 MIPS: TXx9: Remove forced serial console setting 2010-02-27 12:53:22 +01:00
vr41xx
xtalk
abi.h MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
addrspace.h
amon.h
arch_hweight.h MIPS: Create and use asm/arch_hweight.h 2010-08-05 13:26:02 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asm.h
asmmacro-32.h
asmmacro-64.h
asmmacro.h
atomic.h MIPS: Use generic atomic64 for 32-bit kernels 2010-10-04 18:33:54 +01:00
auxvec.h
barrier.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
bcache.h
bitops.h MIPS: Create and use asm/arch_hweight.h 2010-08-05 13:26:02 +01:00
bitsperlong.h
bootinfo.h MIPS: JZ4740: Add base support for Ingenic JZ4740 System-on-a-Chip 2010-08-05 13:26:12 +01:00
branch.h
break.h MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
bug.h MIPS: Convert BUG() to use unreachable() 2009-12-05 09:10:12 -08:00
bugs.h
byteorder.h
cache.h
cachectl.h
cacheflush.h
cacheops.h MIPS: RM7000: Add support for tertiary cache 2010-08-05 13:26:06 +01:00
cevt-r4k.h
checksum.h
clock.h MIPS: Loongson 2F: Add CPU frequency scaling support 2009-12-17 01:57:20 +00:00
cmp.h
cmpxchg.h MIPS: cmpxchg.h: Fix excessive indentation. 2010-04-30 20:52:41 +01:00
compat-signal.h
compat.h compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
compiler.h
cop2.h MIPS: Don't place cu2 notifiers in __cpuinitdata 2010-10-04 18:34:00 +01:00
cpu-features.h MIPS: Update comment for cpu_has_clo_clz 2010-08-05 13:26:01 +01:00
cpu-info.h MIPS: 64-bit: Detect virtual memory size 2010-02-02 19:56:23 +01:00
cpu.h MIPS: JZ4740: Add base support for Ingenic JZ4740 System-on-a-Chip 2010-08-05 13:26:12 +01:00
cputime.h
current.h MIPS: Use generic current.h 2010-02-27 12:53:27 +01:00
debug.h
delay.h
device.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
div64.h
dma-mapping.h dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
dma.h
ds1287.h
dsp.h
edac.h
elf.h MIPS: Enable heap randomization. 2010-08-05 13:26:06 +01:00
emergency-restart.h
errno.h
fb.h
fcntl.h fix up O_SYNC comments 2009-12-17 11:03:24 -05:00
fixmap.h
floppy.h
fpregdef.h
fpu_emulator.h MIPS: Fix build breakage if CONFIG_DEBUG_FS is enabled. 2010-04-12 17:26:08 +01:00
fpu.h MIPS: Cleanup signal code initialization 2009-12-17 01:57:32 +00:00
ftrace.h MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
futex.h
gcmpregs.h
gic.h MIPS: GIC: Remove dependencies from Malta files. 2010-10-04 18:33:56 +01:00
gpio.h
gt64120.h
hardirq.h
hazards.h MIPS: Alchemy: remove SOC_AU1X00 in favor of MIPS_ALCHEMY 2010-08-05 13:26:06 +01:00
highmem.h kmap_atomic: make kunmap_atomic() harder to misuse 2010-08-09 20:44:54 -07:00
hugetlb.h
hw_irq.h
i8253.h i8253: Convert i8253_lock to raw_spinlock 2010-03-02 10:28:38 +01:00
i8259.h MIPS: i8259: Convert IRQ controller lock to raw spinlock. 2010-02-27 12:53:38 +01:00
ide.h
inst.h MIPS: Add instrunction format for BREAK and SYSCALL 2010-08-05 13:26:28 +01:00
io.h MIPS: add readl/write_be accessors 2010-02-27 12:53:12 +01:00
ioctl.h
ioctls.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
ipcbuf.h
irq_cpu.h
irq_gt641xx.h
irq_regs.h
irq.h MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs 2010-01-28 00:03:31 +01:00
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
isadep.h
jazz.h
jazzdma.h
Kbuild
kdebug.h MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
kexec.h
kgdb.h kgdb,mips: Individual register get/set for mips 2010-08-05 09:22:21 -05:00
kmap_types.h
kprobes.h MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
kspd.h
linkage.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h local_t: Remove cpu_local_xx macros 2010-01-05 15:34:49 +09:00
m48t37.h
mc146818-time.h
mc146818rtc.h
mips_mt.h
mipsmtregs.h
mipsprom.h
mipsregs.h MIPS: Define ST0_NMI in asm/mipsregs.h 2010-08-05 13:26:22 +01:00
mman.h
mmu_context.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
mmu.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
mmzone.h
module.h
msc01_ic.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
msgbuf.h
mutex.h
nile4.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
paccess.h
page.h MIPS: Document why RELOC_HIDE is there. 2010-10-04 18:33:55 +01:00
param.h MIPS: Simplify param.h by using <asm-generic/param.h> 2010-02-27 12:53:04 +01:00
parport.h MIPS: Use generic parport.h 2010-02-27 12:53:27 +01:00
pci.h MIPS: Octeon: Disallow MSI-X interrupt and fall back to MSI interrupts. 2010-08-05 13:26:27 +01:00
percpu.h
pgalloc.h MIPS: Two-level pagetables for 64-bit kernels with 64KB pages. 2010-02-27 12:53:03 +01:00
pgtable-32.h MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
pgtable-64.h MIPS: Don't vmap things at address zero. 2010-04-30 20:52:41 +01:00
pgtable-bits.h MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
pgtable.h Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
pmon.h
poll.h
posix_types.h
prefetch.h
processor.h MIPS: Remove unused task_struct.trap_no field. 2010-08-05 13:26:30 +01:00
ptrace.h MIPS: kprobes: Define regs_return_value() 2010-08-05 13:26:28 +01:00
r4k-timer.h
r4kcache.h
reboot.h
reg.h
regdef.h
resource.h
rm9k-ocd.h
rtlx.h
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
seccomp.h
sections.h
segment.h
sembuf.h
serial.h MIPS: Use generic serial.h 2010-02-27 12:53:27 +01:00
setup.h
sgialib.h MIPS: ARC: Cleanup unused definitions from sgialib.h 2010-02-27 12:53:45 +01:00
sgiarcs.h
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sim.h
smp-ops.h
smp.h
smtc_ipi.h
smtc_proc.h
smtc.h
smvp.h
sni.h
socket.h
sockios.h
sparsemem.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
spinlock_types.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
spinlock.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
spram.h
stackframe.h MIPS: Loongson-2F: Use CONFIG_CPU_JUMP_WORKAROUNDS to control workarounds. 2010-04-30 20:52:58 +01:00
stacktrace.h
stat.h
statfs.h add f_flags to struct statfs(64) 2010-08-09 16:48:44 -04:00
string.h
suspend.h
swab.h
sysmips.h
system.h MIPS: New macro smp_mb__before_llsc. 2010-02-27 12:53:06 +01:00
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h
thread_info.h MIPS: Audit: Fix hang in entry.S. 2010-10-04 18:33:55 +01:00
time.h
timex.h
titan_dep.h
tlb.h
tlbdebug.h
tlbflush.h
topology.h
traps.h
txx9irq.h
txx9pio.h
txx9tmr.h
types.h
uaccess.h
uasm.h MIPS: uasm: Add option to export uasm API. 2010-08-05 13:26:21 +01:00
ucontext.h MIPS: Use generic ucontext.h 2010-02-27 12:53:27 +01:00
unaligned.h
unistd.h MIPS: Hookup fanotify_init, fanotify_mark, and prlimit64 syscalls. 2010-10-04 18:33:59 +01:00
user.h
vdso.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
vga.h
vpe.h
war.h
watch.h
wbflush.h
xor.h