linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] Name the irq flag handling functions sanely
@ 2010-08-27  1:59 David Howells
  2010-08-27  1:59 ` [PATCH 01/22] Alpha: Fix a missing comma in sys_osf_statfs() David Howells
                   ` (21 more replies)
  0 siblings, 22 replies; 94+ messages in thread
From: David Howells @ 2010-08-27  1:59 UTC (permalink / raw)
  To: linux-arch; +Cc: dhowells, linux-kernel

[Note that this patch alters all arches except AVR32, Cris, Microblaze, Score,
 Tile and Xtensa as I don't have usable compilers for those.  Not all the other
 arches compiled successfully, but as far as I can tell, those problems are not
 due to my patches].

A patch ("Fix IRQ flag handling naming") in the middle of the series makes the
naming of the general irq flag functions sane.  That is followed by a bunch of
patches for individual arches that aren't included yet in the main patch, but
will need rolling in before final submission.


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 main patch changes 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
beyond the irqflags stuff:

 (1) Alpha.

     A missing comma prevented compilation of one of the upstream files.

 (2) 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.

 (3) H8300.

     A number of general problems needed sorting.

 (4) SH.

     Some consts were missing from the sys_execve() declaration.

David
---

David Howells (22):
      Fix Sparc irqflags
      Fix SH irqflags
      Fix powerpc irqflags
      Fix PA-RISC irqflags
      Fix M68K irqflags
      Fix m32r irqflags
      Fix IA64 irqflags
      Fix H8300 arch
      Fix Alpha irqflags
      MIPS: Fix IRQ flags handling
      Fix IRQ flag handling naming
      SH: Add missing consts to sys_execve() declaration
      h8300: Fix missing consts in kernel_execve()
      h8300: Fix die()
      h8300: IRQ flags should be stored in an unsigned long
      Blackfin: Rename IRQ flags handling functions
      Blackfin: Add missing dep to asm/irqflags.h
      Blackfin: Rename DES PC2() symbol to avoid collision
      Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header
      Blackfin: Don't redefine blackfin serial port symbols
      Blackfin: Split PLL code from mach-specific cdef headers
      Alpha: Fix a missing comma in sys_osf_statfs()


 arch/alpha/include/asm/irqflags.h                  |   65 +++++
 arch/alpha/include/asm/system.h                    |   28 --
 arch/alpha/kernel/osf_sys.c                        |    2 
 arch/arm/include/asm/irqflags.h                    |  143 ++++++----
 arch/blackfin/include/asm/bfin_sport.h             |   16 +
 arch/blackfin/include/asm/ipipe.h                  |    8 -
 arch/blackfin/include/asm/irqflags.h               |  273 ++++++++++----------
 arch/blackfin/include/asm/mmu_context.h            |    8 -
 arch/blackfin/include/asm/system.h                 |    4 
 arch/blackfin/kernel/bfin_gpio.c                   |  102 ++++---
 arch/blackfin/kernel/cplb-mpu/cplbmgr.c            |    8 -
 arch/blackfin/kernel/ipipe.c                       |   38 +--
 arch/blackfin/kernel/process.c                     |    4 
 .../mach-bf518/include/mach/cdefBF51x_base.h       |   50 ----
 arch/blackfin/mach-bf518/include/mach/pll.h        |   63 +++++
 .../mach-bf527/include/mach/cdefBF52x_base.h       |   50 ----
 arch/blackfin/mach-bf527/include/mach/pll.h        |   63 +++++
 arch/blackfin/mach-bf533/boards/blackstamp.c       |    1 
 arch/blackfin/mach-bf533/boards/ip0x.c             |    1 
 arch/blackfin/mach-bf533/boards/stamp.c            |    1 
 arch/blackfin/mach-bf533/include/mach/cdefBF532.h  |   91 -------
 arch/blackfin/mach-bf533/include/mach/defBF532.h   |   27 --
 arch/blackfin/mach-bf533/include/mach/fio_flag.h   |   55 ++++
 arch/blackfin/mach-bf533/include/mach/pll.h        |   57 ++++
 arch/blackfin/mach-bf537/include/mach/cdefBF534.h  |   44 ---
 arch/blackfin/mach-bf537/include/mach/pll.h        |   57 ++++
 arch/blackfin/mach-bf538/include/mach/cdefBF538.h  |   50 ----
 arch/blackfin/mach-bf538/include/mach/pll.h        |   63 +++++
 .../mach-bf548/include/mach/cdefBF54x_base.h       |   56 ----
 .../mach-bf548/include/mach/defBF54x_base.h        |   59 ----
 arch/blackfin/mach-bf548/include/mach/pll.h        |   69 +++++
 arch/blackfin/mach-bf561/include/mach/cdefBF561.h  |   50 ----
 arch/blackfin/mach-bf561/include/mach/defBF561.h   |   58 ----
 arch/blackfin/mach-bf561/include/mach/pll.h        |   63 +++++
 arch/blackfin/mach-common/cpufreq.c                |    4 
 arch/blackfin/mach-common/ints-priority.c          |   24 +-
 arch/blackfin/mach-common/pm.c                     |   10 -
 arch/frv/include/asm/irqflags.h                    |  158 ++++++++++++
 arch/frv/include/asm/system.h                      |  136 ----------
 arch/h8300/include/asm/atomic.h                    |   15 +
 arch/h8300/include/asm/irqflags.h                  |   43 +++
 arch/h8300/include/asm/system.h                    |   28 --
 arch/h8300/kernel/sys_h8300.c                      |    4 
 arch/h8300/kernel/traps.c                          |    2 
 arch/ia64/include/asm/irqflags.h                   |   94 +++++++
 arch/ia64/include/asm/system.h                     |   76 ------
 arch/m32r/include/asm/irqflags.h                   |  105 ++++++++
 arch/m32r/include/asm/system.h                     |   66 -----
 arch/m68k/include/asm/irqflags.h                   |    5 
 arch/m68k/include/asm/irqflags_mm.h                |   57 ++++
 arch/m68k/include/asm/irqflags_no.h                |   86 ++++++
 arch/m68k/include/asm/system_mm.h                  |   25 --
 arch/m68k/include/asm/system_no.h                  |   49 ----
 arch/mips/include/asm/irqflags.h                   |   53 ++--
 arch/mn10300/include/asm/irqflags.h                |  119 +++++++++
 arch/mn10300/include/asm/system.h                  |  109 --------
 arch/mn10300/kernel/entry.S                        |    1 
 arch/parisc/include/asm/irqflags.h                 |   46 +++
 arch/parisc/include/asm/system.h                   |   19 -
 arch/powerpc/include/asm/hw_irq.h                  |  115 +++++---
 arch/powerpc/include/asm/irqflags.h                |    2 
 arch/powerpc/kernel/exceptions-64s.S               |    4 
 arch/powerpc/kernel/irq.c                          |    4 
 arch/sh/include/asm/syscalls_32.h                  |    6 
 arch/sh/kernel/irq_32.c                            |    8 -
 arch/sparc/include/asm/irqflags_32.h               |   35 ++-
 arch/sparc/include/asm/irqflags_64.h               |   29 +-
 arch/sparc/kernel/irq_32.c                         |   12 -
 arch/x86/include/asm/irqflags.h                    |   32 +-
 arch/x86/include/asm/paravirt.h                    |   16 +
 crypto/des_generic.c                               |  130 +++++-----
 drivers/net/bfin_mac.c                             |    1 
 include/asm-generic/atomic.h                       |    3 
 include/asm-generic/irqflags.h                     |   52 ++--
 include/linux/irqflags.h                           |  107 +++++---
 include/linux/spinlock.h                           |    1 
 76 files changed, 1958 insertions(+), 1660 deletions(-)
 create mode 100644 arch/alpha/include/asm/irqflags.h
 create mode 100644 arch/blackfin/mach-bf518/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf527/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf533/include/mach/fio_flag.h
 create mode 100644 arch/blackfin/mach-bf533/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf537/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf538/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf548/include/mach/pll.h
 create mode 100644 arch/blackfin/mach-bf561/include/mach/pll.h
 create mode 100644 arch/frv/include/asm/irqflags.h
 create mode 100644 arch/h8300/include/asm/irqflags.h
 create mode 100644 arch/ia64/include/asm/irqflags.h
 create mode 100644 arch/m32r/include/asm/irqflags.h
 create mode 100644 arch/m68k/include/asm/irqflags.h
 create mode 100644 arch/m68k/include/asm/irqflags_mm.h
 create mode 100644 arch/m68k/include/asm/irqflags_no.h
 create mode 100644 arch/mn10300/include/asm/irqflags.h
 create mode 100644 arch/parisc/include/asm/irqflags.h

^ permalink raw reply	[flat|nested] 94+ messages in thread

end of thread, other threads:[~2010-09-03 13:31 UTC | newest]

Thread overview: 94+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-27  1:59 [PATCH 00/22] Name the irq flag handling functions sanely David Howells
2010-08-27  1:59 ` [PATCH 01/22] Alpha: Fix a missing comma in sys_osf_statfs() David Howells
2010-08-27  1:59   ` David Howells
2010-08-27  1:59 ` [PATCH 02/22] Blackfin: Split PLL code from mach-specific cdef headers David Howells
2010-08-27  1:59 ` [PATCH 03/22] Blackfin: Don't redefine blackfin serial port symbols David Howells
2010-08-27  1:59 ` [PATCH 04/22] Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header David Howells
2010-08-27  1:59   ` David Howells
2010-08-27  1:59 ` [PATCH 05/22] Blackfin: Rename DES PC2() symbol to avoid collision David Howells
2010-08-27  1:59   ` David Howells
2010-08-27  1:59 ` [PATCH 06/22] Blackfin: Add missing dep to asm/irqflags.h David Howells
2010-08-27  1:59   ` David Howells
2010-08-27  1:59 ` [PATCH 07/22] Blackfin: Rename IRQ flags handling functions David Howells
2010-08-27  1:59 ` [PATCH 08/22] h8300: IRQ flags should be stored in an unsigned long David Howells
2010-08-27  1:59 ` [PATCH 09/22] h8300: Fix die() David Howells
2010-08-27  1:59 ` [PATCH 10/22] h8300: Fix missing consts in kernel_execve() David Howells
2010-08-27  1:59   ` David Howells
2010-08-27  2:00 ` [PATCH 11/22] SH: Add missing consts to sys_execve() declaration David Howells
2010-08-27  2:00 ` [PATCH 12/22] Fix IRQ flag handling naming David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 13/22] MIPS: Fix IRQ flags handling David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 14/22] Fix Alpha irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 15/22] Fix H8300 arch David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 16/22] Fix IA64 irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 17/22] Fix m32r irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 18/22] Fix M68K irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-30  7:12   ` Greg Ungerer
2010-08-30  7:12     ` Greg Ungerer
2010-08-30 20:50   ` David Howells
2010-08-31  7:36     ` Geert Uytterhoeven
2010-08-31 16:00     ` David Howells
2010-09-01  6:38       ` Greg Ungerer
2010-09-01  6:33     ` Greg Ungerer
2010-09-01 10:43     ` David Howells
2010-09-01 10:43       ` David Howells
2010-09-01 11:21       ` Greg Ungerer
2010-09-01 10:46     ` David Howells
2010-09-01 11:22       ` Greg Ungerer
2010-09-01 11:31       ` David Howells
2010-09-01 11:30     ` David Howells
2010-09-01 11:36       ` Greg Ungerer
2010-09-01 12:03       ` David Howells
2010-09-02  1:46       ` Greg Ungerer
2010-09-02 10:20       ` David Howells
2010-09-02 10:21         ` [PATCH 1/3] Drop a couple of unnecessary asm/include.h inclusions David Howells
2010-09-03  1:29           ` Greg Ungerer
2010-09-02 10:21         ` [PATCH 2/3] M68K: Use CONFIG_MMU not __uClinux__ to select m68knommu contributions David Howells
2010-09-02 10:21           ` David Howells
2010-09-02 13:54           ` Sam Ravnborg
2010-09-02 14:15             ` Andreas Schwab
2010-09-03  3:29             ` Greg Ungerer
2010-09-02 14:21           ` Andreas Schwab
2010-09-02 19:53             ` Geert Uytterhoeven
2010-09-03  3:30               ` Greg Ungerer
2010-09-03  3:30                 ` Greg Ungerer
2010-09-03  8:41               ` Andreas Schwab
2010-09-03  9:18               ` David Howells
2010-09-03  9:31                 ` Greg Ungerer
2010-09-03  9:33                   ` Geert Uytterhoeven
2010-09-03  9:52                   ` David Howells
2010-09-03 10:02                     ` Geert Uytterhoeven
2010-09-03 10:41                     ` Greg Ungerer
2010-09-03 10:41                       ` Greg Ungerer
2010-09-02 15:11           ` David Howells
2010-09-02 15:12           ` David Howells
2010-09-02 15:12             ` David Howells
2010-09-02 16:50             ` Sam Ravnborg
2010-09-02 10:22         ` [PATCH 3/3] Fix M68K irqflags David Howells
2010-09-02 10:22           ` David Howells
2010-09-03  1:28           ` Greg Ungerer
2010-09-03  6:44           ` David Howells
2010-09-03  6:53             ` Greg Ungerer
2010-09-03  7:28             ` David Howells
2010-09-03  8:05             ` David Howells
2010-09-03  8:05               ` David Howells
2010-09-03  9:28               ` Greg Ungerer
2010-09-03 10:05               ` David Howells
2010-09-03 10:38                 ` Greg Ungerer
2010-09-02 10:48         ` [PATCH 1/3] Drop a couple of unnecessary asm/include.h inclusions David Howells
2010-08-27  2:00 ` [PATCH 19/22] Fix PA-RISC irqflags David Howells
2010-09-03  1:40   ` Kyle McMartin
2010-09-03  6:48   ` David Howells
2010-09-03 13:31     ` Kyle McMartin
2010-08-27  2:00 ` [PATCH 20/22] Fix powerpc irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 21/22] Fix SH irqflags David Howells
2010-08-27  2:00   ` David Howells
2010-08-27  2:00 ` [PATCH 22/22] Fix Sparc irqflags David Howells
2010-08-27  2:00   ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).