Skip to content

Name the irq flag handling functions sanely

David Howells linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Blackfin: Split PLL code from mach-specific cdef headersarch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h arch/blackfin/mach-bf518/include/mach/pll.h arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h +12 more+436 -3440 replies
2/7Blackfin: Don't redefine blackfin serial port symbolsarch/blackfin/include/asm/bfin_sport.h arch/blackfin/mach-bf533/include/mach/defBF532.h arch/blackfin/mach-bf548/include/mach/defBF54x_base.h +1 more+18 -1424 replies
3/7Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own headerarch/blackfin/mach-bf533/boards/blackstamp.c arch/blackfin/mach-bf533/boards/ip0x.c arch/blackfin/mach-bf533/boards/stamp.c +2 more+58 -470 replies
4/7Blackfin: Rename DES PC2() symbol to avoid collisioncrypto/des_generic.c+65 -651 reply
5/7Blackfin: Add missing dep to asm/irqflags.harch/blackfin/include/asm/irqflags.h+8 -10 replies
6/7Blackfin: Rename IRQ flags handling functionsarch/blackfin/include/asm/ipipe.h arch/blackfin/include/asm/irqflags.h arch/blackfin/include/asm/mmu_context.h +16 more+284 -2740 replies
7/7Fix IRQ flag handling namingarch/arm/include/asm/irqflags.h arch/blackfin/include/asm/irqflags.h arch/mn10300/include/asm/system.h +7 more+195 -2811 reply

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchCatalin MarinasThomas Gleixner
1/7
2/7
3/7
4/7
5/7
6/7
7/7T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Name the irq flag handling functions sanely

[Note that this patch only alters X86, FRV, MN10300, ARM and Blackfin at the
moment. The other arches will need altering too as part of this patch].

The final patch of the series makes the naming of the general irq flag functions sane.

Currently, under one configuration, linux/irqflags.h 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.

The final patch change the asm/irqflags.h headers to 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.

===========
ARCH FIXUPS
===========

To make this work, some of the arches need fixing up to some extent or other:

(1) Blackfin.

A number of circular dependencies and other problems needed sorting out in the Blackfin arch. The first few patches deal with this. With this, most of the Blackfin defconfigs compile, and none of the breakage is obviously to do with the irqflags patches.

This also requires a name collision between the DES crypto module and the Blackfin arch code to be fixed.

David