Skip to contentSkip to conversation

Name the irq flag handling functions sanely

PATCH In review David Howells 2 participants 12 messages Sep 10, 2010 – Sep 13, 2010

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover Name the irq flag handling functions sanely

[Note that this patch alters all arches. Most are now ACK'd. PowerPC and
Xtensa are being tested; Blackfin and Score need ACK'ing but have been checked; IA-64 got looked at briefly and I've heard nothing more; I've heard nothing from the SH and CRIS maintainers]

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.

=====================
FURTHER CONSIDERATION
=====================

With this patch, a chunk of asm/system.h has been deported. That leaves a few bits:

- Barriers
- cmpxchg()/xchg() implementations
- switch_to()
- arch_align_stack()
- Various random arch bits

Is it worth deprecating this file and deporting the rest to various specific header files?

Barriers => asm/barrier.h
cmpxchg()/xchg() => asm/atomic.h
switch_to() => asm/process.h (+ bits from asm/processor.h) arch_align_stack() => asm/process.h

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

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

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

(2) SH.

Some consts were missing from the sys_execve() declaration.

(3) SMC1x driver and MIPS.

A bunch of missing <linux/irq.h> inclusions were fixed.

One patch if a prerequisite fixup borrowed from the Linux-MIPS tree.

David
---

David Howells (16):
Fix Score irqflags
Fix XTENSA irqflags
Fix SH irqflags.
Fix powerpc irqflags
Fix CRIS irqflags
Fix IA64 irqflags
Fix IRQ flag handling naming
MIPS: Add missing #inclusions of <linux/irq.h>
smc91x: Add missing #inclusion of <linux/irq.h>
Drop a couple of unnecessary asm/system.h inclusions
SH: Add missing consts to sys_execve() declaration
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: Split PLL code from mach-specific cdef headers

FUJITA Tomonori (1):
MIPS: TX49xx: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN

 arch/alpha/include/asm/irqflags.h                  |   65 +++++
 arch/alpha/include/asm/system.h                    |   28 --
 arch/arm/include/asm/irqflags.h                    |  145 ++++++-----
 arch/avr32/include/asm/irqflags.h                  |   29 +-
 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 
 arch/blackfin/kernel/trace.c                       |    1 
 .../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/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 ----
 arch/blackfin/mach-bf548/include/mach/pll.h        |   69 +++++
 arch/blackfin/mach-bf561/include/mach/cdefBF561.h  |   50 ----
 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/cris/include/arch-v10/arch/irqflags.h         |   45 +++
 arch/cris/include/arch-v10/arch/system.h           |   16 -
 arch/cris/include/arch-v32/arch/irqflags.h         |   46 +++
 arch/cris/include/arch-v32/arch/system.h           |   22 --
 arch/cris/include/asm/irqflags.h                   |    1 
 arch/cris/include/asm/system.h                     |    1 
 arch/frv/include/asm/irqflags.h                    |  158 ++++++++++++
 arch/frv/include/asm/system.h                      |  136 ----------
 arch/h8300/include/asm/irqflags.h                  |   43 +++
 arch/h8300/include/asm/system.h                    |   24 --
 arch/ia64/include/asm/irqflags.h                   |   94 +++++++
 arch/ia64/include/asm/system.h                     |   76 ------
 arch/m32r/include/asm/irqflags.h                   |  104 ++++++++
 arch/m32r/include/asm/system.h                     |   66 -----
 arch/m68k/include/asm/entry_no.h                   |    2 
 arch/m68k/include/asm/irqflags.h                   |   76 ++++++
 arch/m68k/include/asm/system_mm.h                  |   25 --
 arch/m68k/include/asm/system_no.h                  |   57 ----
 arch/m68knommu/kernel/asm-offsets.c                |    2 
 arch/m68knommu/platform/coldfire/head.S            |    1 
 arch/microblaze/include/asm/irqflags.h             |  193 +++++++-------
 arch/mips/alchemy/devboards/bcsr.c                 |    1 
 arch/mips/ar7/irq.c                                |    1 
 arch/mips/bcm63xx/irq.c                            |    1 
 arch/mips/cavium-octeon/serial.c                   |    1 
 arch/mips/dec/setup.c                              |    1 
 arch/mips/include/asm/irqflags.h                   |   53 ++--
 arch/mips/include/asm/mach-loongson/loongson.h     |    1 
 arch/mips/include/asm/mach-tx49xx/kmalloc.h        |    2 
 arch/mips/jazz/irq.c                               |    1 
 arch/mips/kernel/cevt-bcm1480.c                    |    1 
 arch/mips/kernel/cevt-ds1287.c                     |    1 
 arch/mips/kernel/cevt-gt641xx.c                    |    1 
 arch/mips/kernel/cevt-r4k.c                        |    1 
 arch/mips/kernel/cevt-sb1250.c                     |    1 
 arch/mips/kernel/cevt-smtc.c                       |    1 
 arch/mips/kernel/cevt-txx9.c                       |    1 
 arch/mips/kernel/i8253.c                           |    1 
 arch/mips/kernel/i8259.c                           |    1 
 arch/mips/kernel/irq-gic.c                         |    2 
 arch/mips/kernel/irq-rm7000.c                      |    1 
 arch/mips/kernel/irq-rm9000.c                      |    1 
 arch/mips/kernel/irq_cpu.c                         |    1 
 arch/mips/kernel/irq_txx9.c                        |    1 
 arch/mips/kernel/smtc.c                            |    4 
 arch/mips/kernel/traps.c                           |    2 
 arch/mips/mti-malta/malta-platform.c               |    1 
 arch/mips/pci/ops-tx3927.c                         |    1 
 arch/mips/pci/ops-tx4927.c                         |    1 
 arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c         |    1 
 arch/mips/powertv/asic/irq_asic.c                  |    1 
 arch/mips/rb532/serial.c                           |    1 
 arch/mips/sni/a20r.c                               |    1 
 arch/mips/sni/pcimt.c                              |    1 
 arch/mips/sni/pcit.c                               |    1 
 arch/mips/sni/rm200.c                              |    1 
 arch/mips/sni/time.c                               |    1 
 arch/mips/txx9/generic/irq_tx4927.c                |    1 
 arch/mips/txx9/generic/irq_tx4938.c                |    1 
 arch/mips/txx9/generic/irq_tx4939.c                |    1 
 arch/mips/txx9/generic/setup.c                     |    1 
 arch/mips/txx9/jmr3927/irq.c                       |    1 
 arch/mips/txx9/rbtx4927/irq.c                      |    1 
 arch/mips/txx9/rbtx4938/irq.c                      |    1 
 arch/mips/txx9/rbtx4939/irq.c                      |    1 
 arch/mips/vr41xx/common/irq.c                      |    1 
 arch/mips/vr41xx/common/siu.c                      |    1 
 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                  |  113 +++++---
 arch/powerpc/include/asm/irqflags.h                |    2 
 arch/powerpc/kernel/exceptions-64s.S               |    4 
 arch/powerpc/kernel/irq.c                          |    4 
 arch/s390/include/asm/irqflags.h                   |   51 ++--
 arch/s390/include/asm/system.h                     |    2 
 arch/s390/kernel/mem_detect.c                      |    4 
 arch/s390/mm/init.c                                |    2 
 arch/s390/mm/maccess.c                             |    4 
 arch/score/include/asm/irqflags.h                  |  187 +++++++-------
 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                         |   13 -
 arch/sparc/prom/p1275.c                            |    2 
 arch/tile/include/asm/irqflags.h                   |   36 +--
 arch/x86/include/asm/irqflags.h                    |   32 +-
 arch/x86/include/asm/paravirt.h                    |   16 +
 arch/xtensa/include/asm/irqflags.h                 |   58 ++++
 arch/xtensa/include/asm/system.h                   |   33 --
 crypto/des_generic.c                               |  130 +++++-----
 drivers/net/bfin_mac.c                             |    1 
 drivers/net/smc91x.c                               |    1 
 drivers/s390/char/sclp.c                           |    2 
 drivers/vlynq/vlynq.c                              |    1 
 drivers/watchdog/octeon-wdt-main.c                 |    1 
 include/asm-generic/atomic.h                       |    5 
 include/asm-generic/cmpxchg-local.h                |    1 
 include/asm-generic/hardirq.h                      |    1 
 include/asm-generic/irqflags.h                     |   52 ++--
 include/linux/hardirq.h                            |    1 
 include/linux/irqflags.h                           |  107 +++++---
 include/linux/list.h                               |    1 
 include/linux/spinlock.h                           |    1 
 141 files changed, 2325 insertions(+), 1842 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/cris/include/arch-v10/arch/irqflags.h
 create mode 100644 arch/cris/include/arch-v32/arch/irqflags.h
 create mode 100644 arch/cris/include/asm/irqflags.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/mn10300/include/asm/irqflags.h
 create mode 100644 arch/parisc/include/asm/irqflags.h
 create mode 100644 arch/xtensa/include/asm/irqflags.h
#1 lore raw

PATCH 1/17 Blackfin: Split PLL code from mach-specific cdef headers

Split the PLL control code from the Blackfin machine-specific cdef headers so that the irqflags functions can be renamed without incurring a header loop.

---

 .../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/include/mach/cdefBF532.h  |   44 -------------
 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 ----------------
 arch/blackfin/mach-bf548/include/mach/pll.h        |   69 ++++++++++++++++++++
 arch/blackfin/mach-bf561/include/mach/cdefBF561.h  |   50 --------------
 arch/blackfin/mach-bf561/include/mach/pll.h        |   63 ++++++++++++++++++
 drivers/net/bfin_mac.c                             |    1 
 15 files changed, 436 insertions(+), 344 deletions(-)
 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/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
arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h +0 -50
index e548e9d..29498e5 100644
@@ -1058,54 +1058,4 @@
 /* These need to be last due to the cdef/linux inter-dependencies */
 #include <asm/irq.h>
 
-/* Writing to PLL_CTL initiates a PLL relock sequence. */
-static __inline__ void bfin_write_PLL_CTL(unsigned int val)
-{
-	unsigned long flags, iwr0, iwr1;
-
-	if (val == bfin_read_PLL_CTL())
-		return;
-
-	local_irq_save_hw(flags);
-	/* Enable the PLL Wakeup bit in SIC IWR */
-	iwr0 = bfin_read32(SIC_IWR0);
-	iwr1 = bfin_read32(SIC_IWR1);
-	/* Only allow PPL Wakeup) */
-	bfin_write32(SIC_IWR0, IWR_ENABLE(0));
-	bfin_write32(SIC_IWR1, 0);
-
-	bfin_write16(PLL_CTL, val);
-	SSYNC();
-	asm("IDLE;");
-
-	bfin_write32(SIC_IWR0, iwr0);
-	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
-}
-
-/* Writing to VR_CTL initiates a PLL relock sequence. */
-static __inline__ void bfin_write_VR_CTL(unsigned int val)
-{
-	unsigned long flags, iwr0, iwr1;
-
-	if (val == bfin_read_VR_CTL())
-		return;
-
-	local_irq_save_hw(flags);
-	/* Enable the PLL Wakeup bit in SIC IWR */
-	iwr0 = bfin_read32(SIC_IWR0);
-	iwr1 = bfin_read32(SIC_IWR1);
-	/* Only allow PPL Wakeup) */
-	bfin_write32(SIC_IWR0, IWR_ENABLE(0));
-	bfin_write32(SIC_IWR1, 0);
-
-	bfin_write16(VR_CTL, val);
-	SSYNC();
-	asm("IDLE;");
-
-	bfin_write32(SIC_IWR0, iwr0);
-	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
-}
-
 #endif /* _CDEF_BF52X_H */
arch/blackfin/mach-bf518/include/mach/pll.h new file +63 -0

63 lines not on this page · raw message

arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h +0 -50

54 lines not on this page · raw message

arch/blackfin/mach-bf527/include/mach/pll.h new file +63 -0

63 lines not on this page · raw message

arch/blackfin/mach-bf533/include/mach/cdefBF532.h +0 -44

48 lines not on this page · raw message

arch/blackfin/mach-bf533/include/mach/pll.h new file +57 -0

57 lines not on this page · raw message

arch/blackfin/mach-bf537/include/mach/cdefBF534.h +0 -44

48 lines not on this page · raw message

arch/blackfin/mach-bf537/include/mach/pll.h new file +57 -0

57 lines not on this page · raw message

arch/blackfin/mach-bf538/include/mach/cdefBF538.h +0 -50

54 lines not on this page · raw message

arch/blackfin/mach-bf538/include/mach/pll.h new file +63 -0

63 lines not on this page · raw message

arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h +0 -56

61 lines not on this page · raw message

arch/blackfin/mach-bf548/include/mach/pll.h new file +69 -0

69 lines not on this page · raw message

arch/blackfin/mach-bf561/include/mach/cdefBF561.h +0 -50

54 lines not on this page · raw message

arch/blackfin/mach-bf561/include/mach/pll.h new file +63 -0

63 lines not on this page · raw message

drivers/net/bfin_mac.c +1 -0
index 012613f..03d0635 100644
@@ -38,6 +38,7 @@
 #include <asm/blackfin.h>
 #include <asm/cacheflush.h>
 #include <asm/portmux.h>
+#include <mach/pll.h>
 
 #include "bfin_mac.h"
 
#2 lore raw

PATCH 2/17 Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header

In reply to David Howells

Split the BF532 machine type BFIN_*_FIO_FLAG() functions to their own header file to avoid circular #include problems as these functions require IRQ flag handling, which requires asm/blackfin.h, which otherwise requires the header file that defines these functions.

For good measure, also get rid of the inclusion of asm/blackfin.h from mach/cdefBF532.h (which is circular) and defBF532.h (which is included by asm/blackfin.h before including this header).

---

 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 |   47 ------------------
 arch/blackfin/mach-bf533/include/mach/fio_flag.h  |   55 +++++++++++++++++++++
 5 files changed, 58 insertions(+), 47 deletions(-)
 create mode 100644 arch/blackfin/mach-bf533/include/mach/fio_flag.h
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -0
index 842b4fa..84a06f6 100644
@@ -25,6 +25,7 @@
 #include <asm/bfin5xx_spi.h>
 #include <asm/portmux.h>
 #include <asm/dpmc.h>
+#include <mach/fio_flag.h>
 
 /*
  * Name the Board for the /proc/cpuinfo
arch/blackfin/mach-bf533/boards/ip0x.c +1 -0
index 7349970..b8474ca 100644
@@ -22,6 +22,7 @@
 #include <asm/dma.h>
 #include <asm/bfin5xx_spi.h>
 #include <asm/portmux.h>
+#include <mach/fio_flag.h>
 
 /*
  * Name the Board for the /proc/cpuinfo
arch/blackfin/mach-bf533/boards/stamp.c +1 -0
index c457eaa..29c219e 100644
@@ -24,6 +24,7 @@
 #include <asm/reboot.h>
 #include <asm/portmux.h>
 #include <asm/dpmc.h>
+#include <mach/fio_flag.h>
 
 /*
  * Name the Board for the /proc/cpuinfo
arch/blackfin/mach-bf533/include/mach/cdefBF532.h +0 -47

57 lines not on this page · raw message

arch/blackfin/mach-bf533/include/mach/fio_flag.h new file +55 -0

55 lines not on this page · raw message

#3 lore raw

PATCH 3/17 Blackfin: Rename DES PC2() symbol to avoid collision

In reply to David Howells

Rename the PC2() symbol in the generic DES crypto module to be prefixed with DES_ to avoid collision with arch code (Blackfin in this case).

---

 crypto/des_generic.c |  130 +++++++++++++++++++++++++-------------------------
 1 files changed, 65 insertions(+), 65 deletions(-)
crypto/des_generic.c +65 -65
index 249f903..873818d 100644
@@ -614,7 +614,7 @@ static const u32 S8[64] = {
 #define T3(x) pt[2 * (x) + 2]
 #define T4(x) pt[2 * (x) + 3]
 
-#define PC2(a, b, c, d) (T4(d) | T3(c) | T2(b) | T1(a))
+#define DES_PC2(a, b, c, d) (T4(d) | T3(c) | T2(b) | T1(a))
 
 /*
  * Encryption key expansion
@@ -639,22 +639,22 @@ unsigned long des_ekey(u32 *pe, const u8 *k)
 	b = k[6]; b &= 0x0e; b <<= 4; b |= k[2] & 0x1e; b = pc1[b];
 	a = k[7]; a &= 0x0e; a <<= 4; a |= k[3] & 0x1e; a = pc1[a];
 
-	pe[15 * 2 + 0] = PC2(a, b, c, d); d = rs[d];
-	pe[14 * 2 + 0] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[13 * 2 + 0] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[12 * 2 + 0] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[11 * 2 + 0] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[10 * 2 + 0] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 9 * 2 + 0] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 8 * 2 + 0] = PC2(d, a, b, c); c = rs[c];
-	pe[ 7 * 2 + 0] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 6 * 2 + 0] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 5 * 2 + 0] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 4 * 2 + 0] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 3 * 2 + 0] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 2 * 2 + 0] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 1 * 2 + 0] = PC2(c, d, a, b); b = rs[b];
-	pe[ 0 * 2 + 0] = PC2(b, c, d, a);
+	pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d];
+	pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 8 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c];
+	pe[ 7 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 6 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 5 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 4 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 3 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 2 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 1 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b];
+	pe[ 0 * 2 + 0] = DES_PC2(b, c, d, a);
 
 	/* Check if first half is weak */
 	w  = (a ^ c) | (b ^ d) | (rs[a] ^ c) | (b ^ rs[d]);
@@ -670,22 +670,22 @@ unsigned long des_ekey(u32 *pe, const u8 *k)
 	/* Check if second half is weak */
 	w |= (a ^ c) | (b ^ d) | (rs[a] ^ c) | (b ^ rs[d]);
 
-	pe[15 * 2 + 1] = PC2(a, b, c, d); d = rs[d];
-	pe[14 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[13 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[12 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[11 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[10 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 9 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 8 * 2 + 1] = PC2(d, a, b, c); c = rs[c];
-	pe[ 7 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 6 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 5 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 4 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 3 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 2 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[ 1 * 2 + 1] = PC2(c, d, a, b); b = rs[b];
-	pe[ 0 * 2 + 1] = PC2(b, c, d, a);
+	pe[15 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d];
+	pe[14 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[13 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[12 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[11 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[10 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 9 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 8 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c];
+	pe[ 7 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 6 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 5 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 4 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 3 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 2 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[ 1 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b];
+	pe[ 0 * 2 + 1] = DES_PC2(b, c, d, a);
 
 	/* Fixup: 2413 5768 -> 1357 2468 */
 	for (d = 0; d < 16; ++d) {
@@ -722,22 +722,22 @@ static void dkey(u32 *pe, const u8 *k)
 	b = k[6]; b &= 0x0e; b <<= 4; b |= k[2] & 0x1e; b = pc1[b];
 	a = k[7]; a &= 0x0e; a <<= 4; a |= k[3] & 0x1e; a = pc1[a];
 
-	pe[ 0 * 2] = PC2(a, b, c, d); d = rs[d];
-	pe[ 1 * 2] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 2 * 2] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 3 * 2] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 4 * 2] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 5 * 2] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 6 * 2] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 7 * 2] = PC2(d, a, b, c); c = rs[c];
-	pe[ 8 * 2] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 9 * 2] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[10 * 2] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[11 * 2] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[12 * 2] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[13 * 2] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[14 * 2] = PC2(c, d, a, b); b = rs[b];
-	pe[15 * 2] = PC2(b, c, d, a);
+	pe[ 0 * 2] = DES_PC2(a, b, c, d); d = rs[d];
+	pe[ 1 * 2] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 2 * 2] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 3 * 2] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 4 * 2] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 5 * 2] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 6 * 2] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 7 * 2] = DES_PC2(d, a, b, c); c = rs[c];
+	pe[ 8 * 2] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 9 * 2] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[10 * 2] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[11 * 2] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[12 * 2] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[13 * 2] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[14 * 2] = DES_PC2(c, d, a, b); b = rs[b];
+	pe[15 * 2] = DES_PC2(b, c, d, a);
 
 	/* Skip to next table set */
 	pt += 512;
@@ -747,22 +747,22 @@ static void dkey(u32 *pe, const u8 *k)
 	b = k[2]; b &= 0xe0; b >>= 4; b |= k[6] & 0xf0; b = pc1[b + 1];
 	a = k[3]; a &= 0xe0; a >>= 4; a |= k[7] & 0xf0; a = pc1[a + 1];
 
-	pe[ 0 * 2 + 1] = PC2(a, b, c, d); d = rs[d];
-	pe[ 1 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 2 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 3 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 4 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 5 * 2 + 1] = PC2(d, a, b, c); c = rs[c]; b = rs[b];
-	pe[ 6 * 2 + 1] = PC2(b, c, d, a); a = rs[a]; d = rs[d];
-	pe[ 7 * 2 + 1] = PC2(d, a, b, c); c = rs[c];
-	pe[ 8 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[ 9 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[10 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[11 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[12 * 2 + 1] = PC2(c, d, a, b); b = rs[b]; a = rs[a];
-	pe[13 * 2 + 1] = PC2(a, b, c, d); d = rs[d]; c = rs[c];
-	pe[14 * 2 + 1] = PC2(c, d, a, b); b = rs[b];
-	pe[15 * 2 + 1] = PC2(b, c, d, a);
+	pe[ 0 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d];
+	pe[ 1 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 2 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 3 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 4 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 5 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b];
+	pe[ 6 * 2 + 1] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d];
+	pe[ 7 * 2 + 1] = DES_PC2(d, a, b, c); c = rs[c];
+	pe[ 8 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[ 9 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[10 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[11 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[12 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a];
+	pe[13 * 2 + 1] = DES_PC2(a, b, c, d); d = rs[d]; c = rs[c];
+	pe[14 * 2 + 1] = DES_PC2(c, d, a, b); b = rs[b];
+	pe[15 * 2 + 1] = DES_PC2(b, c, d, a);
 
 	/* Fixup: 2413 5768 -> 1357 2468 */
 	for (d = 0; d < 16; ++d) {
#4 lore raw

PATCH 4/17 Blackfin: Add missing dep to asm/irqflags.h

In reply to David Howells

Add a missing dependency (mach/blackfin.h) to asm/irqflags.h so that bfin_read_IMASK() can be used by inline functions.

---

 arch/blackfin/include/asm/irqflags.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
arch/blackfin/include/asm/irqflags.h +8 -1
index 813a1af..f3ed931 100644
@@ -8,6 +8,8 @@
 #ifndef __ASM_BFIN_IRQFLAGS_H__
 #define __ASM_BFIN_IRQFLAGS_H__
 
+#include <mach/blackfin.h>
+
 #ifdef CONFIG_SMP
 # include <asm/pda.h>
 # include <asm/processor.h>
@@ -185,7 +187,12 @@ static inline void raw_local_irq_enable(void)
 	bfin_sti(bfin_irq_flags);
 }
 
-#define raw_local_save_flags(flags) do { (flags) = bfin_read_IMASK(); } while (0)
+static inline unsigned long arch_local_save_flags(void)
+{
+	return bfin_read_IMASK();
+}
+
+#define raw_local_save_flags(flags) do { (flags) = arch_local_save_flags(); } while (0)
 
 #define raw_irqs_disabled_flags(flags) (((flags) & ~0x3f) == 0)
 
#5 lore raw

PATCH 5/17 Blackfin: Rename IRQ flags handling functions

In reply to David Howells

Rename h/w IRQ flags handling functions to be in line with what is expected for the irq renaming patch. This renames local_*_hw() to hard_local_*() using the following perl command:

	perl -pi -e 's/local_irq_(restore|enable|disable)_hw/hard_local_irq_\1/ or s/local_irq_save_hw([_a-z]*)[(]flags[)]/flags = hard_local_irq_save\1()/' `find arch/blackfin/ -name "*.[ch]"`

and then fixing up asm/irqflags.h manually.

Additionally, arch/hard_local_save_flags() and arch/hard_local_irq_save() both return the flags rather than passing it through the argument list.

---

 arch/blackfin/include/asm/ipipe.h                |    8 -
 arch/blackfin/include/asm/irqflags.h             |  284 +++++++++++-----------
 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 
 arch/blackfin/mach-bf518/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf527/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf533/include/mach/fio_flag.h |    8 -
 arch/blackfin/mach-bf533/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf537/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf538/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf548/include/mach/pll.h      |    8 -
 arch/blackfin/mach-bf561/include/mach/pll.h      |    8 -
 arch/blackfin/mach-common/cpufreq.c              |    4 
 arch/blackfin/mach-common/ints-priority.c        |   24 +-
 arch/blackfin/mach-common/pm.c                   |   10 -
 19 files changed, 284 insertions(+), 274 deletions(-)
arch/blackfin/include/asm/ipipe.h +4 -4
index d3b4044..40f94a7 100644
@@ -49,7 +49,7 @@
 #define prepare_arch_switch(next)		\
 do {						\
 	ipipe_schedule_notify(current, next);	\
-	local_irq_disable_hw();			\
+	hard_local_irq_disable();			\
 } while (0)
 
 #define task_hijacked(p)						\
@@ -57,7 +57,7 @@ do {						\
 		int __x__ = __ipipe_root_domain_p;			\
 		__clear_bit(IPIPE_SYNC_FLAG, &ipipe_root_cpudom_var(status)); \
 		if (__x__)						\
-			local_irq_enable_hw();				\
+			hard_local_irq_enable();				\
 		!__x__;							\
 	})
 
@@ -167,7 +167,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
 #define __ipipe_run_isr(ipd, irq)					\
 	do {								\
 		if (!__ipipe_pipeline_head_p(ipd))			\
-			local_irq_enable_hw();				\
+			hard_local_irq_enable();				\
 		if (ipd == ipipe_root_domain) {				\
 			if (unlikely(ipipe_virtual_irq_p(irq))) {	\
 				irq_enter();				\
@@ -183,7 +183,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
 			__ipipe_run_irqtail();				\
 			__set_bit(IPIPE_SYNC_FLAG, &ipipe_cpudom_var(ipd, status)); \
 		}							\
-		local_irq_disable_hw();					\
+		hard_local_irq_disable();					\
 	} while (0)
 
 #define __ipipe_syscall_watched_p(p, sc)	\
arch/blackfin/include/asm/irqflags.h +147 -137

338 lines not on this page · raw message

arch/blackfin/include/asm/mmu_context.h +4 -4
index e1a9b46..3828c70 100644
@@ -97,8 +97,8 @@ static inline void __switch_mm(struct mm_struct *prev_mm, struct mm_struct *next
 }
 
 #ifdef CONFIG_IPIPE
-#define lock_mm_switch(flags)	local_irq_save_hw_cond(flags)
-#define unlock_mm_switch(flags)	local_irq_restore_hw_cond(flags)
+#define lock_mm_switch(flags)	flags = hard_local_irq_save_cond()
+#define unlock_mm_switch(flags)	hard_local_irq_restore_cond(flags)
 #else
 #define lock_mm_switch(flags)	do { (void)(flags); } while (0)
 #define unlock_mm_switch(flags)	do { (void)(flags); } while (0)
@@ -205,9 +205,9 @@ static inline void destroy_context(struct mm_struct *mm)
 }
 
 #define ipipe_mm_switch_protect(flags)		\
-	local_irq_save_hw_cond(flags)
+	flags = hard_local_irq_save_cond()
 
 #define ipipe_mm_switch_unprotect(flags)	\
-	local_irq_restore_hw_cond(flags)
+	hard_local_irq_restore_cond(flags)
 
 #endif
arch/blackfin/include/asm/system.h +2 -2
index dde19b1..19e2c7c 100644
@@ -117,7 +117,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
 	unsigned long tmp = 0;
 	unsigned long flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	switch (size) {
 	case 1:
@@ -139,7 +139,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
 			 : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory");
 		break;
 	}
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 	return tmp;
 }
 
arch/blackfin/kernel/bfin_gpio.c +51 -51

372 lines not on this page · raw message

arch/blackfin/kernel/cplb-mpu/cplbmgr.c +4 -4
index 87b25b1..8de9229 100644
@@ -318,7 +318,7 @@ void flush_switched_cplbs(unsigned int cpu)
 
 	nr_cplb_flush[cpu]++;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	_disable_icplb();
 	for (i = first_switched_icplb; i < MAX_CPLBS; i++) {
 		icplb_tbl[cpu][i].data = 0;
@@ -332,7 +332,7 @@ void flush_switched_cplbs(unsigned int cpu)
 		bfin_write32(DCPLB_DATA0 + i * 4, 0);
 	}
 	_enable_dcplb();
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 
 }
 
@@ -348,7 +348,7 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
 		return;
 	}
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	current_rwx_mask[cpu] = masks;
 
 	if (L2_LENGTH && addr >= L2_START && addr < L2_START + L2_LENGTH) {
@@ -373,5 +373,5 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
 		addr += PAGE_SIZE;
 	}
 	_enable_dcplb();
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
arch/blackfin/kernel/ipipe.c +19 -19
index 1a496cd..3b1da4a 100644
@@ -219,10 +219,10 @@ int __ipipe_syscall_root(struct pt_regs *regs)
 
 	ret = __ipipe_dispatch_event(IPIPE_EVENT_SYSCALL, regs);
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	if (!__ipipe_root_domain_p) {
-		local_irq_restore_hw(flags);
+		hard_local_irq_restore(flags);
 		return 1;
 	}
 
@@ -230,7 +230,7 @@ int __ipipe_syscall_root(struct pt_regs *regs)
 	if ((p->irqpend_himask & IPIPE_IRQMASK_VIRT) != 0)
 		__ipipe_sync_pipeline(IPIPE_IRQMASK_VIRT);
 
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 
 	return -ret;
 }
@@ -239,14 +239,14 @@ unsigned long ipipe_critical_enter(void (*syncfn) (void))
 {
 	unsigned long flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	return flags;
 }
 
 void ipipe_critical_exit(unsigned long flags)
 {
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 static void __ipipe_no_irqtail(void)
@@ -279,9 +279,9 @@ int ipipe_trigger_irq(unsigned irq)
 		return -EINVAL;
 #endif
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	__ipipe_handle_irq(irq, NULL);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 
 	return 1;
 }
@@ -293,7 +293,7 @@ asmlinkage void __ipipe_sync_root(void)
 
 	BUG_ON(irqs_disabled());
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	if (irq_tail_hook)
 		irq_tail_hook();
@@ -303,7 +303,7 @@ asmlinkage void __ipipe_sync_root(void)
 	if (ipipe_root_cpudom_var(irqpend_himask) != 0)
 		__ipipe_sync_pipeline(IPIPE_IRQMASK_ANY);
 
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 void ___ipipe_sync_pipeline(unsigned long syncmask)
@@ -344,10 +344,10 @@ void __ipipe_stall_root(void)
 {
 	unsigned long *p, flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	p = &__ipipe_root_status;
 	__set_bit(IPIPE_STALL_FLAG, p);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 EXPORT_SYMBOL(__ipipe_stall_root);
 
@@ -356,10 +356,10 @@ unsigned long __ipipe_test_and_stall_root(void)
 	unsigned long *p, flags;
 	int x;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	p = &__ipipe_root_status;
 	x = __test_and_set_bit(IPIPE_STALL_FLAG, p);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 
 	return x;
 }
@@ -371,10 +371,10 @@ unsigned long __ipipe_test_root(void)
 	unsigned long flags;
 	int x;
 
-	local_irq_save_hw_smp(flags);
+	flags = hard_local_irq_save_smp();
 	p = &__ipipe_root_status;
 	x = test_bit(IPIPE_STALL_FLAG, p);
-	local_irq_restore_hw_smp(flags);
+	hard_local_irq_restore_smp(flags);
 
 	return x;
 }
@@ -384,10 +384,10 @@ void __ipipe_lock_root(void)
 {
 	unsigned long *p, flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	p = &__ipipe_root_status;
 	__set_bit(IPIPE_SYNCDEFER_FLAG, p);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 EXPORT_SYMBOL(__ipipe_lock_root);
 
@@ -395,9 +395,9 @@ void __ipipe_unlock_root(void)
 {
 	unsigned long *p, flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	p = &__ipipe_root_status;
 	__clear_bit(IPIPE_SYNCDEFER_FLAG, p);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 EXPORT_SYMBOL(__ipipe_unlock_root);
arch/blackfin/kernel/process.c +2 -2
index 01f98cb..c86a3ed 100644
@@ -65,11 +65,11 @@ static void default_idle(void)
 #ifdef CONFIG_IPIPE
 	ipipe_suspend_domain();
 #endif
-	local_irq_disable_hw();
+	hard_local_irq_disable();
 	if (!need_resched())
 		idle_with_irq_disabled();
 
-	local_irq_enable_hw();
+	hard_local_irq_enable();
 }
 
 /*
arch/blackfin/mach-bf518/include/mach/pll.h +4 -4
index 9c19a07..d550298 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf527/include/mach/pll.h +4 -4
index a910522..24f1d7c 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf533/include/mach/fio_flag.h +4 -4
index b81905a..d0bfba0 100644
@@ -15,10 +15,10 @@
 static inline void bfin_write_FIO_FLAG_##name(unsigned short val) \
 { \
 	unsigned long flags; \
-	local_irq_save_hw(flags); \
+	flags = hard_local_irq_save(); \
 	bfin_write16(FIO_FLAG_##name, val); \
 	bfin_read_CHIPID(); \
-	local_irq_restore_hw(flags); \
+	hard_local_irq_restore(flags); \
 }
 BFIN_WRITE_FIO_FLAG(D)
 BFIN_WRITE_FIO_FLAG(C)
@@ -30,10 +30,10 @@ static inline u16 bfin_read_FIO_FLAG_##name(void) \
 { \
 	unsigned long flags; \
 	u16 ret; \
-	local_irq_save_hw(flags); \
+	flags = hard_local_irq_save(); \
 	ret = bfin_read16(FIO_FLAG_##name); \
 	bfin_read_CHIPID(); \
-	local_irq_restore_hw(flags); \
+	hard_local_irq_restore(flags); \
 	return ret; \
 }
 BFIN_READ_FIO_FLAG(D)
arch/blackfin/mach-bf533/include/mach/pll.h +4 -4
index 9a0c9a2..169c106 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr = bfin_read32(SIC_IWR);
 	/* Only allow PPL Wakeup) */
@@ -29,7 +29,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	asm("IDLE;");
 
 	bfin_write32(SIC_IWR, iwr);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -40,7 +40,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr = bfin_read32(SIC_IWR);
 	/* Only allow PPL Wakeup) */
@@ -51,7 +51,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	asm("IDLE;");
 
 	bfin_write32(SIC_IWR, iwr);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf537/include/mach/pll.h +4 -4
index 9a0c9a2..169c106 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr = bfin_read32(SIC_IWR);
 	/* Only allow PPL Wakeup) */
@@ -29,7 +29,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	asm("IDLE;");
 
 	bfin_write32(SIC_IWR, iwr);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -40,7 +40,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr = bfin_read32(SIC_IWR);
 	/* Only allow PPL Wakeup) */
@@ -51,7 +51,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	asm("IDLE;");
 
 	bfin_write32(SIC_IWR, iwr);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf538/include/mach/pll.h +4 -4
index 0e67452..b30bbcd 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf548/include/mach/pll.h +4 -4
index 777fee6..7865a09 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -35,7 +35,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
 	bfin_write32(SIC_IWR2, iwr2);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -46,7 +46,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SIC_IWR0);
 	iwr1 = bfin_read32(SIC_IWR1);
@@ -63,7 +63,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	bfin_write32(SIC_IWR0, iwr0);
 	bfin_write32(SIC_IWR1, iwr1);
 	bfin_write32(SIC_IWR2, iwr2);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-bf561/include/mach/pll.h +4 -4
index 4baa44f..f2b1fbd 100644
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 	if (val == bfin_read_PLL_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SICA_IWR0);
 	iwr1 = bfin_read32(SICA_IWR1);
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val)
 
 	bfin_write32(SICA_IWR0, iwr0);
 	bfin_write32(SICA_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 /* Writing to VR_CTL initiates a PLL relock sequence. */
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 	if (val == bfin_read_VR_CTL())
 		return;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	/* Enable the PLL Wakeup bit in SIC IWR */
 	iwr0 = bfin_read32(SICA_IWR0);
 	iwr1 = bfin_read32(SICA_IWR1);
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
 
 	bfin_write32(SICA_IWR0, iwr0);
 	bfin_write32(SICA_IWR1, iwr1);
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #endif /* _MACH_PLL_H */
arch/blackfin/mach-common/cpufreq.c +2 -2
index 4391d03..f4cf11d 100644
@@ -134,7 +134,7 @@ static int bfin_target(struct cpufreq_policy *poli,
 
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 		if (cpu == CPUFREQ_CPU) {
-			local_irq_save_hw(flags);
+			flags = hard_local_irq_save();
 			plldiv = (bfin_read_PLL_DIV() & SSEL) |
 						dpm_state_table[index].csel;
 			bfin_write_PLL_DIV(plldiv);
@@ -155,7 +155,7 @@ static int bfin_target(struct cpufreq_policy *poli,
 				loops_per_jiffy = cpufreq_scale(lpj_ref,
 						lpj_ref_freq, freqs.new);
 			}
-			local_irq_restore_hw(flags);
+			hard_local_irq_restore(flags);
 		}
 		/* TODO: just test case for cycles clock source, remove later */
 		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
arch/blackfin/mach-common/ints-priority.c +12 -12
index 1c8c4c7..eaece5f 100644
@@ -132,8 +132,8 @@ static void bfin_ack_noop(unsigned int irq)
 static void bfin_core_mask_irq(unsigned int irq)
 {
 	bfin_irq_flags &= ~(1 << irq);
-	if (!irqs_disabled_hw())
-		local_irq_enable_hw();
+	if (!hard_irqs_disabled())
+		hard_local_irq_enable();
 }
 
 static void bfin_core_unmask_irq(unsigned int irq)
@@ -148,8 +148,8 @@ static void bfin_core_unmask_irq(unsigned int irq)
 	 * local_irq_enable just does "STI bfin_irq_flags", so it's exactly
 	 * what we need.
 	 */
-	if (!irqs_disabled_hw())
-		local_irq_enable_hw();
+	if (!hard_irqs_disabled())
+		hard_local_irq_enable();
 	return;
 }
 
@@ -158,12 +158,12 @@ static void bfin_internal_mask_irq(unsigned int irq)
 	unsigned long flags;
 
 #ifdef CONFIG_BF53x
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
 			     ~(1 << SIC_SYSIRQ(irq)));
 #else
 	unsigned mask_bank, mask_bit;
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	mask_bank = SIC_SYSIRQ(irq) / 32;
 	mask_bit = SIC_SYSIRQ(irq) % 32;
 	bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
@@ -173,7 +173,7 @@ static void bfin_internal_mask_irq(unsigned int irq)
 			     ~(1 << mask_bit));
 #endif
 #endif
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #ifdef CONFIG_SMP
@@ -186,12 +186,12 @@ static void bfin_internal_unmask_irq(unsigned int irq)
 	unsigned long flags;
 
 #ifdef CONFIG_BF53x
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
 			     (1 << SIC_SYSIRQ(irq)));
 #else
 	unsigned mask_bank, mask_bit;
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	mask_bank = SIC_SYSIRQ(irq) / 32;
 	mask_bit = SIC_SYSIRQ(irq) % 32;
 #ifdef CONFIG_SMP
@@ -207,7 +207,7 @@ static void bfin_internal_unmask_irq(unsigned int irq)
 			(1 << mask_bit));
 #endif
 #endif
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 #ifdef CONFIG_SMP
@@ -264,7 +264,7 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state)
 	break;
 	}
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	if (state) {
 		bfin_sic_iwr[bank] |= (1 << bit);
@@ -275,7 +275,7 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state)
 		vr_wakeup  &= ~wakeup;
 	}
 
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 
 	return 0;
 }
arch/blackfin/mach-common/pm.c +5 -5
index 09c1fb4..80884b1 100644
@@ -25,7 +25,7 @@ void bfin_pm_suspend_standby_enter(void)
 {
 	unsigned long flags;
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 	bfin_pm_standby_setup();
 
 #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER
@@ -56,7 +56,7 @@ void bfin_pm_suspend_standby_enter(void)
 	bfin_write_SIC_IWR(IWR_DISABLE_ALL);
 #endif
 
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 }
 
 int bf53x_suspend_l1_mem(unsigned char *memptr)
@@ -149,12 +149,12 @@ int bfin_pm_suspend_mem_enter(void)
 	wakeup |= GPWE;
 #endif
 
-	local_irq_save_hw(flags);
+	flags = hard_local_irq_save();
 
 	ret = blackfin_dma_suspend();
 
 	if (ret) {
-		local_irq_restore_hw(flags);
+		hard_local_irq_restore(flags);
 		kfree(memptr);
 		return ret;
 	}
@@ -178,7 +178,7 @@ int bfin_pm_suspend_mem_enter(void)
 	bfin_gpio_pm_hibernate_restore();
 	blackfin_dma_resume();
 
-	local_irq_restore_hw(flags);
+	hard_local_irq_restore(flags);
 	kfree(memptr);
 
 	return 0;
#6 lore raw

PATCH 6/17 SH: Add missing consts to sys_execve() declaration

In reply to David Howells

Add missing consts to the sys_execve() declaration which result in the following error:

arch/sh/kernel/process_32.c:303: error: conflicting types for 'sys_execve' /warthog/nfs/linux-2.6-fscache/arch/sh/include/asm/syscalls_32.h:24: error: previous declaration of 'sys_execve' was here

---

 arch/sh/include/asm/syscalls_32.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/sh/include/asm/syscalls_32.h +4 -2
index be201fd..454538a 100644
@@ -19,8 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
 asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
 			 unsigned long r6, unsigned long r7,
 			 struct pt_regs __regs);
-asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv,
-			  char __user * __user *uenvp, unsigned long r7,
+asmlinkage int sys_execve(const char __user *ufilename,
+			  const char __user *const __user *uargv,
+			  const char __user *const __user *uenvp,
+			  unsigned long r7,
 			  struct pt_regs __regs);
 asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
 			      unsigned long r6, unsigned long r7,
#7 lore raw

PATCH 7/17 Drop a couple of unnecessary asm/system.h inclusions

In reply to David Howells

Drop inclusions of asm/system.h from linux/hardirq.h and linux/list.h as they're no longer required and prevent the M68K arch's IRQ flag handling macros from being made into inlined functions due to circular dependencies.

---

 include/linux/hardirq.h |    1 -
 include/linux/list.h    |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
include/linux/hardirq.h +0 -1
index d5b3876..7dfdc06 100644
@@ -8,7 +8,6 @@
 #include <linux/lockdep.h>
 #include <linux/ftrace_irq.h>
 #include <asm/hardirq.h>
-#include <asm/system.h>
 
 /*
  * We put the hardirq and softirq counter into the preemption
include/linux/list.h +0 -1
index d167b5d..88a0006 100644
@@ -5,7 +5,6 @@
 #include <linux/stddef.h>
 #include <linux/poison.h>
 #include <linux/prefetch.h>
-#include <asm/system.h>
 
 /*
  * Simple doubly linked list implementation.
Acked-by on v1 7/17
#8 lore raw

Re: [PATCH 07/17] Drop a couple of unnecessary asm/system.h inclusions

Quoted 6 lines · David Howells

Drop inclusions of asm/system.h from linux/hardirq.h and linux/list.h as they're no longer required and prevent the M68K arch's IRQ flag handling macros from being made into inlined functions due to circular dependencies.

Quoted 23 lines

---

 include/linux/hardirq.h |    1 -
 include/linux/list.h    |    1 -

 2 files changed, 0 insertions(+), 2 deletions(-)
include/linux/hardirq.h +0 -1
index d5b3876..7dfdc06 100644
@@ -8,7 +8,6 @@
  #include <linux/lockdep.h>
  #include <linux/ftrace_irq.h>
  #include <asm/hardirq.h>
-#include <asm/system.h>
 
  /*
  * We put the hardirq and softirq counter into the preemption
include/linux/list.h +0 -0
index d167b5d..88a0006 100644

include/linux/list.h line 10

Quoted 7 lines
include/linux/list.h +0 -1
@@ -5,7 +5,6 @@
  #include <linux/stddef.h>
  #include <linux/poison.h>
  #include <linux/prefetch.h>
-#include <asm/system.h>
 
  /*
  * Simple doubly linked list implementation.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

#9 lore raw

PATCH 8/17 MIPS: TX49xx: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN

In reply to David Howells

From: FUJITA Tomonori <[email protected]>

Architectures need to set ARCH_DMA_MINALIGN to the minimum DMA alignment (the commit a6eb9fe105d5de0053b261148cee56c94b4720ca). Defining ARCH_KMALLOC_MINALIGN doesn't work anymore.

---

 arch/mips/include/asm/mach-tx49xx/kmalloc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/include/asm/mach-tx49xx/kmalloc.h +1 -1
index b74caf6..ff9a8b8 100644
@@ -1,6 +1,6 @@
 #ifndef __ASM_MACH_TX49XX_KMALLOC_H
 #define __ASM_MACH_TX49XX_KMALLOC_H
 
-#define ARCH_KMALLOC_MINALIGN	L1_CACHE_BYTES
+#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
 
 #endif /* __ASM_MACH_TX49XX_KMALLOC_H */
#10 lore raw

PATCH 9/17 smc91x: Add missing #inclusion of <linux/irq.h>

In reply to David Howells

Add missing #inclusion of <linux/irq.h>. Without it, the following error can occur with the irqflags fixup patches applied:

drivers/net/smc91x.c: In function 'smc_probe':
drivers/net/smc91x.c:1987:2: error: implicit declaration of function 'irq_canonicalize'

---

 drivers/net/smc91x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/smc91x.c +1 -0
index 10cf0cb..726df61 100644
@@ -72,6 +72,7 @@ static const char version[] =
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
 #include <linux/crc32.h>
#11 lore raw

PATCH 10/17 MIPS: Add missing #inclusions of <linux/irq.h>

In reply to David Howells

Add missing #inclusions of <linux/irq.h> to a whole bunch of files that should really include it. Note that this can replace #inclusions of <asm/irq.h>.

This is required for the patch to sort out irqflags handling function naming to compile on MIPS.

The problem is that these files require access to things like setup_irq() - which isn't available by #including <linux/interrupt.h>

---

 arch/mips/alchemy/devboards/bcsr.c             |    1 +
 arch/mips/ar7/irq.c                            |    1 +
 arch/mips/bcm63xx/irq.c                        |    1 +
 arch/mips/cavium-octeon/serial.c               |    1 +
 arch/mips/dec/setup.c                          |    1 +
 arch/mips/include/asm/mach-loongson/loongson.h |    1 +
 arch/mips/jazz/irq.c                           |    1 +
 arch/mips/kernel/cevt-bcm1480.c                |    1 +
 arch/mips/kernel/cevt-ds1287.c                 |    1 +
 arch/mips/kernel/cevt-gt641xx.c                |    1 +
 arch/mips/kernel/cevt-r4k.c                    |    1 +
 arch/mips/kernel/cevt-sb1250.c                 |    1 +
 arch/mips/kernel/cevt-smtc.c                   |    1 +
 arch/mips/kernel/cevt-txx9.c                   |    1 +
 arch/mips/kernel/i8253.c                       |    1 +
 arch/mips/kernel/i8259.c                       |    1 +
 arch/mips/kernel/irq-gic.c                     |    2 +-
 arch/mips/kernel/irq-rm7000.c                  |    1 +
 arch/mips/kernel/irq-rm9000.c                  |    1 +
 arch/mips/kernel/irq_cpu.c                     |    1 +
 arch/mips/kernel/irq_txx9.c                    |    1 +
 arch/mips/kernel/traps.c                       |    2 +-
 arch/mips/mti-malta/malta-platform.c           |    1 +
 arch/mips/pci/ops-tx3927.c                     |    1 +
 arch/mips/pci/ops-tx4927.c                     |    1 +
 arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c     |    1 +
 arch/mips/powertv/asic/irq_asic.c              |    1 +
 arch/mips/rb532/serial.c                       |    1 +
 arch/mips/sni/a20r.c                           |    1 +
 arch/mips/sni/pcimt.c                          |    1 +
 arch/mips/sni/pcit.c                           |    1 +
 arch/mips/sni/rm200.c                          |    1 +
 arch/mips/sni/time.c                           |    1 +
 arch/mips/txx9/generic/irq_tx4927.c            |    1 +
 arch/mips/txx9/generic/irq_tx4938.c            |    1 +
 arch/mips/txx9/generic/irq_tx4939.c            |    1 +
 arch/mips/txx9/generic/setup.c                 |    1 +
 arch/mips/txx9/jmr3927/irq.c                   |    1 +
 arch/mips/txx9/rbtx4927/irq.c                  |    1 +
 arch/mips/txx9/rbtx4938/irq.c                  |    1 +
 arch/mips/txx9/rbtx4939/irq.c                  |    1 +
 arch/mips/vr41xx/common/irq.c                  |    1 +
 arch/mips/vr41xx/common/siu.c                  |    1 +
 drivers/vlynq/vlynq.c                          |    1 +
 drivers/watchdog/octeon-wdt-main.c             |    1 +
 45 files changed, 45 insertions(+), 2 deletions(-)
arch/mips/alchemy/devboards/bcsr.c +1 -0
index 3bc4fd2..c52af88 100644
@@ -10,6 +10,7 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
+#include <linux/irq.h>
 #include <asm/addrspace.h>
 #include <asm/io.h>
 #include <asm/mach-db1x00/bcsr.h>
arch/mips/ar7/irq.c +1 -0
index c781556..4ec2642 100644
@@ -19,6 +19,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/io.h>
+#include <linux/irq.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
arch/mips/bcm63xx/irq.c +1 -0
index a0c5cd1..3be87f2 100644
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
+#include <linux/irq.h>
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
 #include <bcm63xx_cpu.h>
arch/mips/cavium-octeon/serial.c +1 -0
index 638adab..12dbf53 100644
@@ -13,6 +13,7 @@
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/tty.h>
+#include <linux/irq.h>
 
 #include <asm/time.h>
 
arch/mips/dec/setup.c +1 -0
index bd5431e..fa45e92 100644
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/types.h>
 #include <linux/pm.h>
+#include <linux/irq.h>
 
 #include <asm/bootinfo.h>
 #include <asm/cpu.h>
arch/mips/include/asm/mach-loongson/loongson.h +1 -0
index cb6985f..1e29b9d 100644
@@ -13,6 +13,7 @@
 
 #include <linux/io.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 
 /* loongson internal northbridge initialization */
 extern void bonito_irq_init(void);
arch/mips/jazz/irq.c +1 -0
index ee18028..35b3e2f 100644
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/spinlock.h>
+#include <linux/irq.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/i8253.h>
arch/mips/kernel/cevt-bcm1480.c +1 -0
index bfea327..36c3898 100644
@@ -19,6 +19,7 @@
 #include <linux/interrupt.h>
 #include <linux/percpu.h>
 #include <linux/smp.h>
+#include <linux/irq.h>
 
 #include <asm/addrspace.h>
 #include <asm/io.h>
arch/mips/kernel/cevt-ds1287.c +1 -0
index 00a4da2..939157e 100644
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
+#include <linux/irq.h>
 
 #include <asm/time.h>
 
arch/mips/kernel/cevt-gt641xx.c +1 -0
index 392ef37..339f363 100644
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
+#include <linux/irq.h>
 
 #include <asm/gt64120.h>
 #include <asm/time.h>
arch/mips/kernel/cevt-r4k.c +1 -0
index 2a4d50f..2f4d7a9 100644
@@ -10,6 +10,7 @@
 #include <linux/interrupt.h>
 #include <linux/percpu.h>
 #include <linux/smp.h>
+#include <linux/irq.h>
 
 #include <asm/smtc_ipi.h>
 #include <asm/time.h>
arch/mips/kernel/cevt-sb1250.c +1 -0
index da78eea..590c54f 100644
@@ -17,6 +17,7 @@
  */
 #include <linux/clockchips.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/percpu.h>
 #include <linux/smp.h>
 
arch/mips/kernel/cevt-smtc.c +1 -0
index b102e4f..2e72d30 100644
@@ -11,6 +11,7 @@
 #include <linux/interrupt.h>
 #include <linux/percpu.h>
 #include <linux/smp.h>
+#include <linux/irq.h>
 
 #include <asm/smtc_ipi.h>
 #include <asm/time.h>
arch/mips/kernel/cevt-txx9.c +1 -0
index 218ee6b..0b73773 100644
@@ -13,6 +13,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/time.h>
 #include <asm/txx9tmr.h>
 
arch/mips/kernel/i8253.c +1 -0
index 9479406..2392a7a2 100644
@@ -9,6 +9,7 @@
 #include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/spinlock.h>
+#include <linux/irq.h>
 
 #include <asm/delay.h>
 #include <asm/i8253.h>
arch/mips/kernel/i8259.c +1 -0
index 2779911..c58176c 100644
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/sysdev.h>
+#include <linux/irq.h>
 
 #include <asm/i8259.h>
 #include <asm/io.h>
arch/mips/kernel/irq-gic.c +1 -1
index b181f2f..e0ff05d 100644
@@ -3,12 +3,12 @@
 #include <linux/bitmap.h>
 #include <linux/init.h>
 #include <linux/smp.h>
+#include <linux/irq.h>
 
 #include <asm/io.h>
 #include <asm/gic.h>
 #include <asm/gcmpregs.h>
 #include <asm/mips-boards/maltaint.h>
-#include <asm/irq.h>
 #include <linux/hardirq.h>
 #include <asm-generic/bitops/find.h>
 
arch/mips/kernel/irq-rm7000.c +1 -0
index fb50cc7..9731e8b 100644
@@ -11,6 +11,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 
 #include <asm/irq_cpu.h>
arch/mips/kernel/irq-rm9000.c +1 -0
index b47e461..b7e4025 100644
@@ -11,6 +11,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
arch/mips/kernel/irq_cpu.c +1 -0
index 55c8a3c..0262abe 100644
@@ -30,6 +30,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
+#include <linux/irq.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
arch/mips/kernel/irq_txx9.c +1 -0
index 9b78029..95a96f6 100644
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/types.h>
+#include <linux/irq.h>
 #include <asm/txx9irq.h>
 
 struct txx9_irc_reg {
arch/mips/kernel/traps.c +1 -1
index 03ec001..d053bf4 100644
@@ -28,6 +28,7 @@
 #include <linux/kprobes.h>
 #include <linux/notifier.h>
 #include <linux/kdb.h>
+#include <linux/irq.h>
 
 #include <asm/bootinfo.h>
 #include <asm/branch.h>
@@ -51,7 +52,6 @@
 #include <asm/mmu_context.h>
 #include <asm/types.h>
 #include <asm/stacktrace.h>
-#include <asm/irq.h>
 #include <asm/uasm.h>
 
 extern void check_wait(void);
arch/mips/mti-malta/malta-platform.c +1 -0
index 72e32a7..4c35301 100644
@@ -25,6 +25,7 @@
 #include <linux/serial_8250.h>
 #include <linux/mc146818rtc.h>
 #include <linux/module.h>
+#include <linux/irq.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
arch/mips/pci/ops-tx3927.c +1 -0
index 31c1501..6a3bdb5 100644
@@ -38,6 +38,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/addrspace.h>
 #include <asm/txx9irq.h>
arch/mips/pci/ops-tx4927.c +1 -0
index 5989e74..a1e7e6d 100644
@@ -17,6 +17,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/txx9/pci.h>
 #include <asm/txx9/tx4927pcic.h>
 
arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c +1 -0
index 94c9c2c..07e71ff 100644
@@ -14,6 +14,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/bitops.h>
+#include <linux/irq.h>
 
 #include <asm/system.h>
 
arch/mips/powertv/asic/irq_asic.c +1 -0
index b54d244..e553824 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
+#include <linux/irq.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
arch/mips/rb532/serial.c +1 -0
index 00ed19f..7048254 100644
@@ -29,6 +29,7 @@
 #include <linux/tty.h>
 #include <linux/serial_core.h>
 #include <linux/serial_8250.h>
+#include <linux/irq.h>
 
 #include <asm/serial.h>
 #include <asm/mach-rc32434/rb.h>
arch/mips/sni/a20r.c +1 -0
index e698089..bbe7187 100644
@@ -10,6 +10,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
 
arch/mips/sni/pcimt.c +1 -0
index 51e62bb..8c92c73 100644
@@ -11,6 +11,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/pci.h>
 #include <linux/serial_8250.h>
 
arch/mips/sni/pcit.c +1 -0
index f4699d3..dc98745 100644
@@ -10,6 +10,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/pci.h>
 #include <linux/serial_8250.h>
 
arch/mips/sni/rm200.c +1 -0
index 90c558f..0e6f42c 100644
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
 #include <linux/io.h>
arch/mips/sni/time.c +1 -0
index f3b60e6..c76151b 100644
@@ -1,5 +1,6 @@
 #include <linux/types.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/smp.h>
 #include <linux/time.h>
 #include <linux/clockchips.h>
arch/mips/txx9/generic/irq_tx4927.c +1 -0
index ad2870d..e1828e8 100644
@@ -25,6 +25,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/irq_cpu.h>
 #include <asm/txx9/tx4927.h>
 
arch/mips/txx9/generic/irq_tx4938.c +1 -0
index 025ae11..a6e6e80 100644
@@ -13,6 +13,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/irq_cpu.h>
 #include <asm/txx9/tx4938.h>
 
arch/mips/txx9/generic/irq_tx4939.c +1 -0
index 013213a..3886ad7 100644
@@ -19,6 +19,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/types.h>
 #include <asm/irq_cpu.h>
 #include <asm/txx9irq.h>
arch/mips/txx9/generic/setup.c +1 -0
index 575d219b..812816c 100644
@@ -24,6 +24,7 @@
 #include <linux/leds.h>
 #include <linux/sysdev.h>
 #include <linux/slab.h>
+#include <linux/irq.h>
 #include <asm/bootinfo.h>
 #include <asm/time.h>
 #include <asm/reboot.h>
arch/mips/txx9/jmr3927/irq.c +1 -0
index 6ec626c..0a7f8e3 100644
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/io.h>
 #include <asm/mipsregs.h>
arch/mips/txx9/rbtx4927/irq.c +1 -0
index 9c14ebb..c4b54d2 100644
@@ -111,6 +111,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/io.h>
 #include <asm/mipsregs.h>
 #include <asm/txx9/generic.h>
arch/mips/txx9/rbtx4938/irq.c +1 -0
index 7d21bef..67a73a8 100644
@@ -64,6 +64,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/mipsregs.h>
 #include <asm/txx9/generic.h>
 #include <asm/txx9/rbtx4938.h>
arch/mips/txx9/rbtx4939/irq.c +1 -0
index 500cc0a..57fa740 100644
@@ -11,6 +11,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <asm/mipsregs.h>
 #include <asm/txx9/rbtx4939.h>
 
arch/mips/vr41xx/common/irq.c +1 -0
index bef0687..0975eb7 100644
@@ -19,6 +19,7 @@
  */
 #include <linux/interrupt.h>
 #include <linux/module.h>
+#include <linux/irq.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/system.h>
arch/mips/vr41xx/common/siu.c +1 -0
index 54eae56..bbd45d2 100644
@@ -22,6 +22,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/irq.h>
 
 #include <asm/cpu.h>
 #include <asm/vr41xx/siu.h>
drivers/vlynq/vlynq.c +1 -0
index f2d9e66..f885c86 100644
@@ -31,6 +31,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/slab.h>
+#include <linux/irq.h>
 
 #include <linux/vlynq.h>
 
drivers/watchdog/octeon-wdt-main.c +1 -0
index 2a41017..9099238 100644
@@ -64,6 +64,7 @@
 #include <linux/cpu.h>
 #include <linux/smp.h>
 #include <linux/fs.h>
+#include <linux/irq.h>
 
 #include <asm/mipsregs.h>
 #include <asm/uasm.h>