diff --git a/[refs] b/[refs]
index 512f0ed84a83..858ff2cc694a 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 2e1e9212ed8c532c6b324de77d3cafef5d2bc846
+refs/heads/master: a3cf5e6b6f2548b036921da5ab6325dc8a76e207
diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile
index 1d1b34500b69..0eb0d027eb32 100644
--- a/trunk/Documentation/DocBook/Makefile
+++ b/trunk/Documentation/DocBook/Makefile
@@ -12,7 +12,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
- mac80211.xml debugobjects.xml sh.xml
+ mac80211.xml debugobjects.xml
###
# The build process is as follows (targets):
diff --git a/trunk/Documentation/DocBook/sh.tmpl b/trunk/Documentation/DocBook/sh.tmpl
deleted file mode 100644
index 0c3dc4c69dd1..000000000000
--- a/trunk/Documentation/DocBook/sh.tmpl
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
- SuperH Interfaces Guide
-
-
-
- Paul
- Mundt
-
-
- lethal@linux-sh.org
-
-
-
-
-
-
- 2008
- Paul Mundt
-
-
- 2008
- Renesas Technology Corp.
-
-
-
-
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License version 2 as published by the Free Software Foundation.
-
-
-
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
-
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-
-
-
- For more details see the file COPYING in the source
- distribution of Linux.
-
-
-
-
-
-
-
- Memory Management
-
- SH-4
-
- Store Queue API
-!Earch/sh/kernel/cpu/sh4/sq.c
-
-
-
- SH-5
-
- TLB Interfaces
-!Iarch/sh/mm/tlb-sh5.c
-!Iarch/sh/include/asm/tlb_64.h
-
-
-
-
- Clock Framework Extensions
-!Iarch/sh/include/asm/clock.h
-
-
- Machine Specific Interfaces
-
- mach-dreamcast
-!Iarch/sh/boards/mach-dreamcast/rtc.c
-
-
- mach-x3proto
-!Earch/sh/boards/mach-x3proto/ilsel.c
-
-
-
- Busses
-
- SuperHyway
-!Edrivers/sh/superhyway/superhyway.c
-
-
-
- Maple
-!Edrivers/sh/maple/maple.c
-
-
-
diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt
index de4063cb4fdc..928a79ceb7aa 100644
--- a/trunk/Documentation/powerpc/booting-without-of.txt
+++ b/trunk/Documentation/powerpc/booting-without-of.txt
@@ -278,7 +278,7 @@ it with special cases.
a 64-bit platform.
d) request and get assigned a platform number (see PLATFORM_*
- constants in arch/powerpc/include/asm/processor.h
+ constants in include/asm-powerpc/processor.h
32-bit embedded kernels:
@@ -340,7 +340,7 @@ the block to RAM before passing it to the kernel.
---------
The kernel is entered with r3 pointing to an area of memory that is
- roughly described in arch/powerpc/include/asm/prom.h by the structure
+ roughly described in include/asm-powerpc/prom.h by the structure
boot_param_header:
struct boot_param_header {
diff --git a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
index 9d4e33df624c..df7afe43d462 100644
--- a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
+++ b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
@@ -133,7 +133,7 @@ error. Given an arbitrary address, the routine
pci_get_device_by_addr() will find the pci device associated
with that address (if any).
-The default arch/powerpc/include/asm/io.h macros readb(), inb(), insb(),
+The default include/asm-powerpc/io.h macros readb(), inb(), insb(),
etc. include a check to see if the i/o read returned all-0xff's.
If so, these make a call to eeh_dn_check_failure(), which in turn
asks the firmware if the all-ff's value is the sign of a true EEH
diff --git a/trunk/arch/mn10300/kernel/module.c b/trunk/arch/mn10300/kernel/module.c
index 8fa36893df7a..0e4d2f6fa6e8 100644
--- a/trunk/arch/mn10300/kernel/module.c
+++ b/trunk/arch/mn10300/kernel/module.c
@@ -24,7 +24,6 @@
#include
#include
#include
-#include
#if 0
#define DEBUGP printk
@@ -196,7 +195,7 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- return module_bug_finalize(hdr, sechdrs, me);
+ return 0;
}
/*
@@ -204,5 +203,4 @@ int module_finalize(const Elf_Ehdr *hdr,
*/
void module_arch_cleanup(struct module *mod)
{
- module_bug_cleanup(mod);
}
diff --git a/trunk/arch/powerpc/Kconfig.debug b/trunk/arch/powerpc/Kconfig.debug
index 4ebc52a19f0a..8c8aadbe9563 100644
--- a/trunk/arch/powerpc/Kconfig.debug
+++ b/trunk/arch/powerpc/Kconfig.debug
@@ -97,7 +97,7 @@ config IRQSTACKS
config VIRQ_DEBUG
bool "Expose hardware/virtual IRQ mapping via debugfs"
- depends on DEBUG_FS
+ depends on DEBUG_FS && PPC_MERGE
help
This option will show the mapping relationship between hardware irq
numbers and virtual irq numbers. The mapping is exposed via debugfs
diff --git a/trunk/arch/powerpc/boot/io.h b/trunk/arch/powerpc/boot/io.h
index 7c09f4861fe1..ccaedaec50d5 100644
--- a/trunk/arch/powerpc/boot/io.h
+++ b/trunk/arch/powerpc/boot/io.h
@@ -6,7 +6,7 @@
/*
* Low-level I/O routines.
*
- * Copied from (which has no copyright)
+ * Copied from (which has no copyright)
*/
static inline int in_8(const volatile unsigned char *addr)
{
diff --git a/trunk/arch/powerpc/kernel/Makefile b/trunk/arch/powerpc/kernel/Makefile
index 64f5948ebc9d..1a4094704b1f 100644
--- a/trunk/arch/powerpc/kernel/Makefile
+++ b/trunk/arch/powerpc/kernel/Makefile
@@ -59,6 +59,8 @@ obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o
obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_44x) += cpu_setup_44x.o
+ifeq ($(CONFIG_PPC_MERGE),y)
+
extra-$(CONFIG_PPC_STD_MMU) := head_32.o
extra-$(CONFIG_PPC64) := head_64.o
extra-$(CONFIG_40x) := head_40x.o
@@ -98,6 +100,12 @@ ifneq ($(CONFIG_PPC_INDIRECT_IO),y)
obj-y += iomap.o
endif
+else
+# stuff used from here for ARCH=ppc
+smpobj-$(CONFIG_SMP) += smp.o
+
+endif
+
obj-$(CONFIG_PPC64) += $(obj64-y)
extra-$(CONFIG_PPC_FPU) += fpu.o
@@ -113,6 +121,9 @@ PHONY += systbl_chk
systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
$(call cmd,systbl_chk)
+
+ifeq ($(CONFIG_PPC_MERGE),y)
+
$(obj)/built-in.o: prom_init_check
quiet_cmd_prom_init_check = CALL $<
@@ -122,4 +133,7 @@ PHONY += prom_init_check
prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o
$(call cmd,prom_init_check)
+endif
+
+
clean-files := vmlinux.lds
diff --git a/trunk/arch/powerpc/kernel/cpu_setup_44x.S b/trunk/arch/powerpc/kernel/cpu_setup_44x.S
index 80cac984d85d..5465e8de0e61 100644
--- a/trunk/arch/powerpc/kernel/cpu_setup_44x.S
+++ b/trunk/arch/powerpc/kernel/cpu_setup_44x.S
@@ -39,6 +39,12 @@ _GLOBAL(__setup_cpu_440gx)
_GLOBAL(__setup_cpu_440spe)
b __fixup_440A_mcheck
+ /* Temporary fixup for arch/ppc until we kill the whole thing */
+#ifndef CONFIG_PPC_MERGE
+_GLOBAL(__fixup_440A_mcheck)
+ blr
+#endif
+
/* enable APU between CPU and FPU */
_GLOBAL(__init_fpu_44x)
mfspr r3,SPRN_CCR0
diff --git a/trunk/arch/powerpc/kernel/irq.c b/trunk/arch/powerpc/kernel/irq.c
index d972decf0324..6ac8612da3c3 100644
--- a/trunk/arch/powerpc/kernel/irq.c
+++ b/trunk/arch/powerpc/kernel/irq.c
@@ -77,12 +77,22 @@ static int ppc_spurious_interrupts;
EXPORT_SYMBOL(__irq_offset_value);
atomic_t ppc_n_lost_interrupts;
+#ifndef CONFIG_PPC_MERGE
+#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
+unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
+#endif
+
#ifdef CONFIG_TAU_INT
extern int tau_initialized;
extern int tau_interrupts(int);
#endif
#endif /* CONFIG_PPC32 */
+#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE)
+extern atomic_t ipi_recv;
+extern atomic_t ipi_sent;
+#endif
+
#ifdef CONFIG_PPC64
EXPORT_SYMBOL(irq_desc);
@@ -206,14 +216,21 @@ int show_interrupts(struct seq_file *p, void *v)
skip:
spin_unlock_irqrestore(&desc->lock, flags);
} else if (i == NR_IRQS) {
-#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
+#ifdef CONFIG_PPC32
+#ifdef CONFIG_TAU_INT
if (tau_initialized){
seq_puts(p, "TAU: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", tau_interrupts(j));
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
}
-#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
+#endif
+#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE)
+ /* should this be per processor send/receive? */
+ seq_printf(p, "IPI (recv/sent): %10u/%u\n",
+ atomic_read(&ipi_recv), atomic_read(&ipi_sent));
+#endif
+#endif /* CONFIG_PPC32 */
seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
}
return 0;
@@ -437,6 +454,8 @@ void do_softirq(void)
* IRQ controller and virtual interrupts
*/
+#ifdef CONFIG_PPC_MERGE
+
static LIST_HEAD(irq_hosts);
static DEFINE_SPINLOCK(irq_big_lock);
static DEFINE_PER_CPU(unsigned int, irq_radix_reader);
@@ -1095,6 +1114,8 @@ static int __init irq_debugfs_init(void)
__initcall(irq_debugfs_init);
#endif /* CONFIG_VIRQ_DEBUG */
+#endif /* CONFIG_PPC_MERGE */
+
#ifdef CONFIG_PPC64
static int __init setup_noirqdistrib(char *str)
{
diff --git a/trunk/arch/powerpc/kernel/process.c b/trunk/arch/powerpc/kernel/process.c
index 957bded0020d..e030f3bd5024 100644
--- a/trunk/arch/powerpc/kernel/process.c
+++ b/trunk/arch/powerpc/kernel/process.c
@@ -276,8 +276,10 @@ int set_dabr(unsigned long dabr)
{
__get_cpu_var(current_dabr) = dabr;
+#ifdef CONFIG_PPC_MERGE /* XXX for now */
if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr);
+#endif
/* XXX should we have a CPU_FTR_HAS_DABR ? */
#if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
diff --git a/trunk/arch/powerpc/kernel/vdso.c b/trunk/arch/powerpc/kernel/vdso.c
index 65639a43e644..f177c60ea766 100644
--- a/trunk/arch/powerpc/kernel/vdso.c
+++ b/trunk/arch/powerpc/kernel/vdso.c
@@ -788,7 +788,9 @@ static int __init vdso_init(void)
return 0;
}
+#ifdef CONFIG_PPC_MERGE
arch_initcall(vdso_init);
+#endif
int in_gate_area_no_task(unsigned long addr)
{
diff --git a/trunk/arch/powerpc/lib/Makefile b/trunk/arch/powerpc/lib/Makefile
index d69912c07ce7..2a88e8b9a3c6 100644
--- a/trunk/arch/powerpc/lib/Makefile
+++ b/trunk/arch/powerpc/lib/Makefile
@@ -6,10 +6,12 @@ ifeq ($(CONFIG_PPC64),y)
EXTRA_CFLAGS += -mno-minimal-toc
endif
+ifeq ($(CONFIG_PPC_MERGE),y)
obj-y := string.o alloc.o \
checksum_$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o
obj-$(CONFIG_HAS_IOMEM) += devres.o
+endif
obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.o
diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c
index 1c93c255873b..702691cb9e82 100644
--- a/trunk/arch/powerpc/mm/mem.c
+++ b/trunk/arch/powerpc/mm/mem.c
@@ -311,7 +311,7 @@ void __init paging_init(void)
#endif /* CONFIG_HIGHMEM */
printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n",
- (unsigned long long)top_of_ram, total_ram);
+ (u64)top_of_ram, total_ram);
printk(KERN_DEBUG "Memory hole size: %ldMB\n",
(long int)((top_of_ram - total_ram) >> 20));
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
diff --git a/trunk/arch/powerpc/mm/ppc_mmu_32.c b/trunk/arch/powerpc/mm/ppc_mmu_32.c
index 6aa120813775..c53145f61942 100644
--- a/trunk/arch/powerpc/mm/ppc_mmu_32.c
+++ b/trunk/arch/powerpc/mm/ppc_mmu_32.c
@@ -236,8 +236,8 @@ void __init MMU_init_hw(void)
Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
- printk("Total memory = %lldMB; using %ldkB for hash table (at %p)\n",
- (unsigned long long)(total_memory >> 20), Hash_size >> 10, Hash);
+ printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
+ total_memory >> 20, Hash_size >> 10, Hash);
/*
diff --git a/trunk/arch/powerpc/mm/tlb_64.c b/trunk/arch/powerpc/mm/tlb_64.c
index be7dd422c0fa..409fcc7b63ce 100644
--- a/trunk/arch/powerpc/mm/tlb_64.c
+++ b/trunk/arch/powerpc/mm/tlb_64.c
@@ -34,7 +34,7 @@
DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
/* This is declared as we are using the more or less generic
- * arch/powerpc/include/asm/tlb.h file -- tgall
+ * include/asm-powerpc/tlb.h file -- tgall
*/
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
diff --git a/trunk/arch/powerpc/platforms/52xx/Makefile b/trunk/arch/powerpc/platforms/52xx/Makefile
index b8a52062738a..daf0e1568d6d 100644
--- a/trunk/arch/powerpc/platforms/52xx/Makefile
+++ b/trunk/arch/powerpc/platforms/52xx/Makefile
@@ -1,8 +1,10 @@
#
# Makefile for 52xx based boards
#
+ifeq ($(CONFIG_PPC_MERGE),y)
obj-y += mpc52xx_pic.o mpc52xx_common.o
obj-$(CONFIG_PCI) += mpc52xx_pci.o
+endif
obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
obj-$(CONFIG_PPC_EFIKA) += efika.o
@@ -13,4 +15,4 @@ ifeq ($(CONFIG_PPC_LITE5200),y)
obj-$(CONFIG_PM) += lite5200_sleep.o lite5200_pm.o
endif
-obj-$(CONFIG_PPC_MPC5200_GPIO) += mpc52xx_gpio.o
+obj-$(CONFIG_PPC_MPC5200_GPIO) += mpc52xx_gpio.o
\ No newline at end of file
diff --git a/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c
index 014e26cda08d..835f2dc24dc9 100644
--- a/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c
+++ b/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c
@@ -19,7 +19,7 @@
#include
#include
#include
-#include
+#include
#include
#include
diff --git a/trunk/arch/powerpc/platforms/Makefile b/trunk/arch/powerpc/platforms/Makefile
index 8079e0b4fd69..423a0234dc31 100644
--- a/trunk/arch/powerpc/platforms/Makefile
+++ b/trunk/arch/powerpc/platforms/Makefile
@@ -1,7 +1,13 @@
obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o
+ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_PMAC) += powermac/
+else
+ifeq ($(CONFIG_PPC64),y)
+obj-$(CONFIG_PPC_PMAC) += powermac/
+endif
+endif
obj-$(CONFIG_PPC_CHRP) += chrp/
obj-$(CONFIG_40x) += 40x/
obj-$(CONFIG_44x) += 44x/
diff --git a/trunk/arch/powerpc/platforms/powermac/Makefile b/trunk/arch/powerpc/platforms/powermac/Makefile
index 58ecdd72630f..89774177b209 100644
--- a/trunk/arch/powerpc/platforms/powermac/Makefile
+++ b/trunk/arch/powerpc/platforms/powermac/Makefile
@@ -7,7 +7,7 @@ endif
obj-y += pic.o setup.o time.o feature.o pci.o \
sleep.o low_i2c.o cache.o pfunc_core.o \
- pfunc_base.o udbg_scc.o udbg_adb.o
+ pfunc_base.o
obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o
obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o
obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o
@@ -19,3 +19,4 @@ obj-$(CONFIG_NVRAM:m=y) += nvram.o
obj-$(CONFIG_PPC64) += nvram.o
obj-$(CONFIG_PPC32) += bootx_init.o
obj-$(CONFIG_SMP) += smp.o
+obj-$(CONFIG_PPC_MERGE) += udbg_scc.o udbg_adb.o
diff --git a/trunk/arch/powerpc/sysdev/Makefile b/trunk/arch/powerpc/sysdev/Makefile
index a90054b56d5c..16a0ed28eb00 100644
--- a/trunk/arch/powerpc/sysdev/Makefile
+++ b/trunk/arch/powerpc/sysdev/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \
obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
obj-$(CONFIG_AXON_RAM) += axonram.o
+ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
obj-$(CONFIG_PPC_I8259) += i8259.o
obj-$(CONFIG_IPIC) += ipic.o
@@ -35,6 +36,7 @@ obj-$(CONFIG_OF_RTC) += of_rtc.o
ifeq ($(CONFIG_PCI),y)
obj-$(CONFIG_4xx) += ppc4xx_pci.o
endif
+endif
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig
index 5131d50f851a..cb992c3d6b71 100644
--- a/trunk/arch/sh/Kconfig
+++ b/trunk/arch/sh/Kconfig
@@ -48,9 +48,6 @@ config GENERIC_HWEIGHT
config GENERIC_HARDIRQS
def_bool y
-config GENERIC_HARDIRQS_NO__DO_IRQ
- def_bool y
-
config GENERIC_IRQ_PROBE
def_bool y
@@ -66,10 +63,6 @@ config GENERIC_TIME
config GENERIC_CLOCKEVENTS
def_bool n
-config GENERIC_LOCKBREAK
- def_bool y
- depends on SMP && PREEMPT
-
config SYS_SUPPORTS_PM
bool
@@ -101,6 +94,9 @@ config ARCH_HAS_ILOG2_U64
config ARCH_NO_VIRT_TO_BUS
def_bool y
+config ARCH_SUPPORTS_AOUT
+ def_bool y
+
config IO_TRAPPED
bool
@@ -487,23 +483,6 @@ config CRASH_DUMP
For more details see Documentation/kdump/kdump.txt
-config SECCOMP
- bool "Enable seccomp to safely compute untrusted bytecode"
- depends on PROC_FS
- default y
- help
- This kernel feature is useful for number crunching applications
- that may need to compute untrusted bytecode during their
- execution. By using pipes or other transports made available to
- the process as file descriptors supporting the read/write
- syscalls, it's possible to isolate those applications in
- their own address space using seccomp. Once seccomp is
- enabled via prctl, it cannot be disabled and the task is only
- allowed to execute a few safe syscalls defined by each seccomp
- mode.
-
- If unsure, say N.
-
config SMP
bool "Symmetric multi-processing support"
depends on SYS_SUPPORTS_SMP
diff --git a/trunk/arch/sh/Kconfig.debug b/trunk/arch/sh/Kconfig.debug
index 4d2d102e00d5..36f4b1f7066d 100644
--- a/trunk/arch/sh/Kconfig.debug
+++ b/trunk/arch/sh/Kconfig.debug
@@ -182,7 +182,7 @@ if SUPERH64
config SH64_PROC_ASIDS
bool "Debug: report ASIDs through /proc/asids"
- depends on PROC_FS && MMU
+ depends on PROC_FS
config SH64_SR_WATCH
bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
diff --git a/trunk/arch/sh/Makefile b/trunk/arch/sh/Makefile
index 01d85c74481d..25659ce74baa 100644
--- a/trunk/arch/sh/Makefile
+++ b/trunk/arch/sh/Makefile
@@ -95,6 +95,8 @@ head-y := arch/sh/kernel/init_task.o
head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o
head-$(CONFIG_SUPERH64) += arch/sh/kernel/head_64.o
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+
core-y += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/
core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
@@ -143,6 +145,10 @@ cpuincdir-$(CONFIG_CPU_SH4) += cpu-sh4
cpuincdir-$(CONFIG_CPU_SH5) += cpu-sh5
cpuincdir-y += cpu-common # Must be last
+libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
+libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
+libs-y += $(LIBGCC)
+
drivers-y += arch/sh/drivers/
drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
@@ -155,16 +161,10 @@ KBUILD_CFLAGS += -pipe $(cflags-y)
KBUILD_CPPFLAGS += $(cflags-y)
KBUILD_AFLAGS += $(cflags-y)
-LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
-
-libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
-libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
-libs-y += $(LIBGCC)
-
PHONY += maketools FORCE
maketools: include/linux/version.h FORCE
- $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
+ $(Q)$(MAKE) $(build)=arch/sh/tools arch/sh/include/asm/machtypes.h
all: $(KBUILD_IMAGE)
@@ -215,4 +215,4 @@ arch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S
$(call filechk,gen-syscalltab)
CLEAN_FILES += arch/sh/lib64/syscalltab.h \
- include/asm-sh/machtypes.h
+ arch/sh/include/asm/machtypes.h
diff --git a/trunk/arch/sh/boards/Makefile b/trunk/arch/sh/boards/Makefile
index 463022c7df3c..ff9b93c5a91b 100644
--- a/trunk/arch/sh/boards/Makefile
+++ b/trunk/arch/sh/boards/Makefile
@@ -5,4 +5,4 @@ obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o
obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o
obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
-obj-$(CONFIG_SH_SHMIN) += board-shmin.o
+obj-$(CONFIG_SH_SHMIN) += board-shmin..o
diff --git a/trunk/arch/sh/boards/board-ap325rxa.c b/trunk/arch/sh/boards/board-ap325rxa.c
index 025d4fe55a58..9c71603d29a2 100644
--- a/trunk/arch/sh/boards/board-ap325rxa.c
+++ b/trunk/arch/sh/boards/board-ap325rxa.c
@@ -17,6 +17,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/sh/boards/mach-se/7343/irq.c b/trunk/arch/sh/boards/mach-se/7343/irq.c
index 051c29d4eae0..5d96e2eef82a 100644
--- a/trunk/arch/sh/boards/mach-se/7343/irq.c
+++ b/trunk/arch/sh/boards/mach-se/7343/irq.c
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/sh/configs/dreamcast_defconfig b/trunk/arch/sh/configs/dreamcast_defconfig
index 3dc1cbd8a981..d4075283956d 100644
--- a/trunk/arch/sh/configs/dreamcast_defconfig
+++ b/trunk/arch/sh/configs/dreamcast_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Mon Aug 4 16:49:13 2008
+# Linux kernel version: 2.6.26
+# Wed Jul 30 01:34:24 2008
#
CONFIG_SUPERH=y
CONFIG_SUPERH32=y
@@ -11,7 +11,6 @@ CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME=y
@@ -22,6 +21,7 @@ CONFIG_LOCKDEP_SUPPORT=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_NO_VIRT_TO_BUS=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
@@ -87,7 +87,6 @@ CONFIG_HAVE_OPROFILE=y
# CONFIG_USE_GENERIC_SMP_HELPERS is not set
CONFIG_HAVE_CLK=y
CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
@@ -285,7 +284,6 @@ CONFIG_HZ=250
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set
-CONFIG_SECCOMP=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
@@ -319,6 +317,10 @@ CONFIG_PCI_LEGACY=y
#
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
+
+#
+# Networking
+#
CONFIG_NET=y
#
@@ -553,7 +555,7 @@ CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
-CONFIG_KEYBOARD_MAPLE=y
+# CONFIG_KEYBOARD_MAPLE is not set
# CONFIG_KEYBOARD_SH_KEYSC is not set
CONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_PS2 is not set
diff --git a/trunk/arch/sh/include/asm/a.out.h b/trunk/arch/sh/include/asm/a.out.h
new file mode 100644
index 000000000000..1f93130e179c
--- /dev/null
+++ b/trunk/arch/sh/include/asm/a.out.h
@@ -0,0 +1,20 @@
+#ifndef __ASM_SH_A_OUT_H
+#define __ASM_SH_A_OUT_H
+
+struct exec
+{
+ unsigned long a_info; /* Use macros N_MAGIC, etc for access */
+ unsigned a_text; /* length of text, in bytes */
+ unsigned a_data; /* length of data, in bytes */
+ unsigned a_bss; /* length of uninitialized data area for file, in bytes */
+ unsigned a_syms; /* length of symbol table data in file, in bytes */
+ unsigned a_entry; /* start address */
+ unsigned a_trsize; /* length of relocation info for text, in bytes */
+ unsigned a_drsize; /* length of relocation info for data, in bytes */
+};
+
+#define N_TRSIZE(a) ((a).a_trsize)
+#define N_DRSIZE(a) ((a).a_drsize)
+#define N_SYMSIZE(a) ((a).a_syms)
+
+#endif /* __ASM_SH_A_OUT_H */
diff --git a/trunk/arch/sh/include/asm/ptrace.h b/trunk/arch/sh/include/asm/ptrace.h
index b86aeabba61a..643ab5a7cf3b 100644
--- a/trunk/arch/sh/include/asm/ptrace.h
+++ b/trunk/arch/sh/include/asm/ptrace.h
@@ -104,15 +104,6 @@ struct pt_dspregs {
extern void show_regs(struct pt_regs *);
-/*
- * These are defined as per linux/ptrace.h.
- */
-struct task_struct;
-
-#define arch_has_single_step() (1)
-extern void user_enable_single_step(struct task_struct *);
-extern void user_disable_single_step(struct task_struct *);
-
#ifdef CONFIG_SH_DSP
#define task_pt_regs(task) \
((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
diff --git a/trunk/arch/sh/include/asm/seccomp.h b/trunk/arch/sh/include/asm/seccomp.h
deleted file mode 100644
index 3280ed3802ef..000000000000
--- a/trunk/arch/sh/include/asm/seccomp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __ASM_SECCOMP_H
-
-#include
-
-#define __NR_seccomp_read __NR_read
-#define __NR_seccomp_write __NR_write
-#define __NR_seccomp_exit __NR_exit
-#define __NR_seccomp_sigreturn __NR_rt_sigreturn
-
-#endif /* __ASM_SECCOMP_H */
diff --git a/trunk/arch/sh/include/asm/thread_info.h b/trunk/arch/sh/include/asm/thread_info.h
index 0a894cafb1dd..eeb4c747119e 100644
--- a/trunk/arch/sh/include/asm/thread_info.h
+++ b/trunk/arch/sh/include/asm/thread_info.h
@@ -117,45 +117,24 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */
#define TIF_SINGLESTEP 4 /* singlestepping active */
-#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
-#define TIF_SECCOMP 6 /* secure computing */
-#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
+#define TIF_SYSCALL_AUDIT 5
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 18
-#define TIF_FREEZE 19 /* Freezing for suspend */
-
-#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
-#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
-#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
-#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
-#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
-#define _TIF_SECCOMP (1 << TIF_SECCOMP)
-#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
-#define _TIF_USEDFPU (1 << TIF_USEDFPU)
-#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
-#define _TIF_FREEZE (1 << TIF_FREEZE)
-
-/*
- * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within a byte, or we
- * blow the tst immediate size constraints and need to fix up
- * arch/sh/kernel/entry-common.S.
- */
-
-/* work to do in syscall trace */
-#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
- _TIF_SYSCALL_AUDIT | _TIF_SECCOMP)
-
-/* work to do on any return to u-space */
-#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \
- _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \
- _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \
- _TIF_NOTIFY_RESUME)
-
-/* work to do on interrupt/exception return */
-#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
- _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP))
+#define TIF_FREEZE 19
+
+#define _TIF_SYSCALL_TRACE (1<dtlb.first; \
@@ -31,9 +33,11 @@
tlb += cpu_data->dtlb.step)
/**
- * for_each_itlb_entry - Iterate over free (non-wired) ITLB entries
+ * for_each_itlb_entry
*
* @tlb: TLB entry
+ *
+ * Iterate over free (non-wired) ITLB entries
*/
#define for_each_itlb_entry(tlb) \
for (tlb = cpu_data->itlb.first; \
@@ -41,9 +45,11 @@
tlb += cpu_data->itlb.step)
/**
- * __flush_tlb_slot - Flushes TLB slot @slot.
+ * __flush_tlb_slot
*
* @slot: Address of TLB slot.
+ *
+ * Flushes TLB slot @slot.
*/
static inline void __flush_tlb_slot(unsigned long long slot)
{
diff --git a/trunk/arch/sh/include/cpu-sh2/cpu/cache.h b/trunk/arch/sh/include/cpu-sh2/cpu/cache.h
index 673515bc4135..4e0b16500686 100644
--- a/trunk/arch/sh/include/cpu-sh2/cpu/cache.h
+++ b/trunk/arch/sh/include/cpu-sh2/cpu/cache.h
@@ -21,11 +21,11 @@
#define CCR 0xffffffec
#define CCR_CACHE_CE 0x01 /* Cache enable */
-#define CCR_CACHE_WT 0x02 /* CCR[bit1=1,bit2=1] */
+#define CCR_CACHE_WT 0x06 /* CCR[bit1=1,bit2=1] */
/* 0x00000000-0x7fffffff: Write-through */
/* 0x80000000-0x9fffffff: Write-back */
/* 0xc0000000-0xdfffffff: Write-through */
-#define CCR_CACHE_CB 0x04 /* CCR[bit1=0,bit2=0] */
+#define CCR_CACHE_CB 0x00 /* CCR[bit1=0,bit2=0] */
/* 0x00000000-0x7fffffff: Write-back */
/* 0x80000000-0x9fffffff: Write-through */
/* 0xc0000000-0xdfffffff: Write-back */
@@ -36,8 +36,6 @@
#define CCR_CACHE_ENABLE CCR_CACHE_CE
#define CCR_CACHE_INVALIDATE CCR_CACHE_CF
-#define CACHE_PHYSADDR_MASK 0x1ffffc00
-
#endif
#endif /* __ASM_CPU_SH2_CACHE_H */
diff --git a/trunk/arch/sh/include/cpu-sh2a/cpu/addrspace.h b/trunk/arch/sh/include/cpu-sh2a/cpu/addrspace.h
deleted file mode 100644
index 31eb4b58aa6d..000000000000
--- a/trunk/arch/sh/include/cpu-sh2a/cpu/addrspace.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __ASM_SH_CPU_SH2A_ADDRSPACE_H
-#define __ASM_SH_CPU_SH2A_ADDRSPACE_H
-
-#define P0SEG 0x00000000
-#define P1SEG 0x00000000
-#define P2SEG 0x20000000
-#define P3SEG 0x40000000
-#define P4SEG 0x60000000
-
-#endif /* __ASM_SH_CPU_SH2A_ADDRSPACE_H */
diff --git a/trunk/arch/sh/include/cpu-sh2a/cpu/cache.h b/trunk/arch/sh/include/cpu-sh2a/cpu/cache.h
index defb0baa5a06..afe228b3f493 100644
--- a/trunk/arch/sh/include/cpu-sh2a/cpu/cache.h
+++ b/trunk/arch/sh/include/cpu-sh2a/cpu/cache.h
@@ -36,8 +36,5 @@
#define CCR_CACHE_ENABLE (CCR_CACHE_OCE | CCR_CACHE_ICE)
#define CCR_CACHE_INVALIDATE (CCR_CACHE_OCI | CCR_CACHE_ICI)
-#define CCR_ICACHE_INVALIDATE CCR_CACHE_ICI
-#define CCR_OCACHE_INVALIDATE CCR_CACHE_OCI
-#define CACHE_PHYSADDR_MASK 0x1ffffc00
#endif /* __ASM_CPU_SH2A_CACHE_H */
diff --git a/trunk/arch/sh/include/cpu-sh2a/cpu/cacheflush.h b/trunk/arch/sh/include/cpu-sh2a/cpu/cacheflush.h
deleted file mode 100644
index 3d3b9205d2ac..000000000000
--- a/trunk/arch/sh/include/cpu-sh2a/cpu/cacheflush.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __ASM_CPU_SH2A_CACHEFLUSH_H
-#define __ASM_CPU_SH2A_CACHEFLUSH_H
-
-/*
- * Cache flushing:
- *
- * - flush_cache_all() flushes entire cache
- * - flush_cache_mm(mm) flushes the specified mm context's cache lines
- * - flush_cache_dup mm(mm) handles cache flushing when forking
- * - flush_cache_page(mm, vmaddr, pfn) flushes a single page
- * - flush_cache_range(vma, start, end) flushes a range of pages
- *
- * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
- * - flush_icache_range(start, end) flushes(invalidates) a range for icache
- * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
- *
- * Caches are indexed (effectively) by physical address on SH-2, so
- * we don't need them.
- */
-#define flush_cache_all() do { } while (0)
-#define flush_cache_mm(mm) do { } while (0)
-#define flush_cache_dup_mm(mm) do { } while (0)
-#define flush_cache_range(vma, start, end) do { } while (0)
-#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
-#define flush_dcache_page(page) do { } while (0)
-#define flush_dcache_mmap_lock(mapping) do { } while (0)
-#define flush_dcache_mmap_unlock(mapping) do { } while (0)
-void flush_icache_range(unsigned long start, unsigned long end);
-#define flush_icache_page(vma,pg) do { } while (0)
-#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
-#define flush_cache_sigtramp(vaddr) do { } while (0)
-
-#define p3_cache_init() do { } while (0)
-#endif /* __ASM_CPU_SH2A_CACHEFLUSH_H */
diff --git a/trunk/arch/sh/kernel/cpu/sh4/sq.c b/trunk/arch/sh/kernel/cpu/sh4/sq.c
index 8a8a993f55ea..dcdf959a3d44 100644
--- a/trunk/arch/sh/kernel/cpu/sh4/sq.c
+++ b/trunk/arch/sh/kernel/cpu/sh4/sq.c
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(sq_remap);
/**
* sq_unmap - Unmap a Store Queue allocation
- * @vaddr: Pre-allocated Store Queue mapping.
+ * @map: Pre-allocated Store Queue mapping.
*
* Unmaps the store queue allocation @map that was previously created by
* sq_remap(). Also frees up the pte that was previously inserted into
diff --git a/trunk/arch/sh/kernel/cpu/sh5/entry.S b/trunk/arch/sh/kernel/cpu/sh5/entry.S
index 04c7da968146..ca08e7f26a3a 100644
--- a/trunk/arch/sh/kernel/cpu/sh5/entry.S
+++ b/trunk/arch/sh/kernel/cpu/sh5/entry.S
@@ -987,11 +987,11 @@ work_resched:
work_notifysig:
gettr tr1, LINK
- movi do_notify_resume, r6
+ movi do_signal, r6
ptabs r6, tr0
or SP, ZERO, r2
- or r7, ZERO, r3
- blink tr0, LINK /* Call do_notify_resume(regs, current_thread_info->flags), return here */
+ or ZERO, ZERO, r3
+ blink tr0, LINK /* Call do_signal(regs, 0), return here */
restore_all:
/* Do prefetches */
@@ -1300,20 +1300,18 @@ syscall_allowed:
getcon KCR0, r2
ld.l r2, TI_FLAGS, r4
- movi _TIF_WORK_SYSCALL_MASK, r6
+ movi (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_SYSCALL_AUDIT), r6
and r6, r4, r6
beq/l r6, ZERO, tr0
/* Trace it by calling syscall_trace before and after */
- movi do_syscall_trace_enter, r4
+ movi syscall_trace, r4
or SP, ZERO, r2
+ or ZERO, ZERO, r3
ptabs r4, tr0
blink tr0, LINK
- /* Save the retval */
- st.q SP, FRAME_R(2), r2
-
- /* Reload syscall number as r5 is trashed by do_syscall_trace_enter */
+ /* Reload syscall number as r5 is trashed by syscall_trace */
ld.q SP, FRAME_S(FSYSCALL_ID), r5
andi r5, 0x1ff, r5
@@ -1345,8 +1343,9 @@ syscall_ret_trace:
/* We get back here only if under trace */
st.q SP, FRAME_R(9), r2 /* Save return value */
- movi do_syscall_trace_leave, LINK
+ movi syscall_trace, LINK
or SP, ZERO, r2
+ movi 1, r3
ptabs LINK, tr0
blink tr0, LINK
diff --git a/trunk/arch/sh/kernel/entry-common.S b/trunk/arch/sh/kernel/entry-common.S
index 0bc17def55a7..5e0dd1933847 100644
--- a/trunk/arch/sh/kernel/entry-common.S
+++ b/trunk/arch/sh/kernel/entry-common.S
@@ -202,7 +202,7 @@ work_resched:
syscall_exit_work:
! r0: current_thread_info->flags
! r8: current_thread_info
- tst #_TIF_WORK_SYSCALL_MASK, r0
+ tst #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_SYSCALL_AUDIT, r0
bt/s work_pending
tst #_TIF_NEED_RESCHED, r0
#ifdef CONFIG_TRACE_IRQFLAGS
@@ -211,8 +211,10 @@ syscall_exit_work:
nop
#endif
sti
+ ! XXX setup arguments...
mov r15, r4
- mov.l 8f, r0 ! do_syscall_trace_leave
+ mov #1, r5
+ mov.l 4f, r0 ! do_syscall_trace
jsr @r0
nop
bra resume_userspace
@@ -221,11 +223,12 @@ syscall_exit_work:
.align 2
syscall_trace_entry:
! Yes it is traced.
+ ! XXX setup arguments...
mov r15, r4
- mov.l 7f, r11 ! Call do_syscall_trace_enter which notifies
+ mov #0, r5
+ mov.l 4f, r11 ! Call do_syscall_trace which notifies
jsr @r11 ! superior (will chomp R[0-7])
nop
- mov.l r0, @(OFF_R0,r15) ! Save return value
! Reload R0-R4 from kernel stack, where the
! parent may have modified them using
! ptrace(POKEUSR). (Note that R0-R2 are
@@ -348,7 +351,7 @@ ENTRY(system_call)
!
get_current_thread_info r8, r10
mov.l @(TI_FLAGS,r8), r8
- mov #_TIF_WORK_SYSCALL_MASK, r10
+ mov #(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT), r10
tst r10, r8
bf syscall_trace_entry
!
@@ -386,9 +389,8 @@ syscall_exit:
#endif
2: .long NR_syscalls
3: .long sys_call_table
+4: .long do_syscall_trace
#ifdef CONFIG_TRACE_IRQFLAGS
5: .long trace_hardirqs_on
6: .long trace_hardirqs_off
#endif
-7: .long do_syscall_trace_enter
-8: .long do_syscall_trace_leave
diff --git a/trunk/arch/sh/kernel/machine_kexec.c b/trunk/arch/sh/kernel/machine_kexec.c
index 4703dff174d5..ec1eadce4aaa 100644
--- a/trunk/arch/sh/kernel/machine_kexec.c
+++ b/trunk/arch/sh/kernel/machine_kexec.c
@@ -13,7 +13,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -105,10 +104,3 @@ void machine_kexec(struct kimage *image)
(*rnk)(page_list, reboot_code_buffer, image->start, vbr_reg);
}
-void arch_crash_save_vmcoreinfo(void)
-{
-#ifdef CONFIG_NUMA
- VMCOREINFO_SYMBOL(node_data);
- VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
-#endif
-}
diff --git a/trunk/arch/sh/kernel/module.c b/trunk/arch/sh/kernel/module.c
index c43081039dd5..5482e65375a9 100644
--- a/trunk/arch/sh/kernel/module.c
+++ b/trunk/arch/sh/kernel/module.c
@@ -27,7 +27,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -37,8 +36,7 @@ void *module_alloc(unsigned long size)
{
if (size == 0)
return NULL;
-
- return vmalloc_exec(size);
+ return vmalloc(size);
}
@@ -147,10 +145,9 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- return module_bug_finalize(hdr, sechdrs, me);
+ return 0;
}
void module_arch_cleanup(struct module *mod)
{
- module_bug_cleanup(mod);
}
diff --git a/trunk/arch/sh/kernel/ptrace_32.c b/trunk/arch/sh/kernel/ptrace_32.c
index 035cb300d3dc..2bc72def5cf8 100644
--- a/trunk/arch/sh/kernel/ptrace_32.c
+++ b/trunk/arch/sh/kernel/ptrace_32.c
@@ -20,8 +20,6 @@
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -59,23 +57,7 @@ static inline int put_stack_long(struct task_struct *task, int offset,
return 0;
}
-void user_enable_single_step(struct task_struct *child)
-{
- struct pt_regs *regs = task_pt_regs(child);
- long pc;
-
- pc = get_stack_long(child, (long)®s->pc);
-
- /* Next scheduling will set up UBC */
- if (child->thread.ubc_pc == 0)
- ubc_usercnt += 1;
-
- child->thread.ubc_pc = pc;
-
- set_tsk_thread_flag(child, TIF_SINGLESTEP);
-}
-
-void user_disable_single_step(struct task_struct *child)
+static void ptrace_disable_singlestep(struct task_struct *child)
{
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
@@ -99,7 +81,7 @@ void user_disable_single_step(struct task_struct *child)
*/
void ptrace_disable(struct task_struct *child)
{
- user_disable_single_step(child);
+ ptrace_disable_singlestep(child);
}
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
@@ -108,6 +90,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
int ret;
switch (request) {
+ /* when I and D space are separate, these will need to be fixed. */
+ case PTRACE_PEEKTEXT: /* read word at location addr. */
+ case PTRACE_PEEKDATA:
+ ret = generic_ptrace_peekdata(child, addr, data);
+ break;
+
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
unsigned long tmp;
@@ -137,6 +125,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break;
}
+ /* when I and D space are separate, this will have to be fixed. */
+ case PTRACE_POKETEXT: /* write the word at location addr. */
+ case PTRACE_POKEDATA:
+ ret = generic_ptrace_pokedata(child, addr, data);
+ break;
+
case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
ret = -EIO;
if ((addr & 3) || addr < 0 ||
@@ -157,6 +151,67 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
}
break;
+ case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
+ case PTRACE_CONT: { /* restart after signal. */
+ ret = -EIO;
+ if (!valid_signal(data))
+ break;
+ if (request == PTRACE_SYSCALL)
+ set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ else
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+
+ ptrace_disable_singlestep(child);
+
+ child->exit_code = data;
+ wake_up_process(child);
+ ret = 0;
+ break;
+ }
+
+/*
+ * make the child exit. Best I can do is send it a sigkill.
+ * perhaps it should be put in the status that it wants to
+ * exit.
+ */
+ case PTRACE_KILL: {
+ ret = 0;
+ if (child->exit_state == EXIT_ZOMBIE) /* already dead */
+ break;
+ ptrace_disable_singlestep(child);
+ child->exit_code = SIGKILL;
+ wake_up_process(child);
+ break;
+ }
+
+ case PTRACE_SINGLESTEP: { /* set the trap flag. */
+ long pc;
+ struct pt_regs *regs = NULL;
+
+ ret = -EIO;
+ if (!valid_signal(data))
+ break;
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ if ((child->ptrace & PT_DTRACE) == 0) {
+ /* Spurious delayed TF traps may occur */
+ child->ptrace |= PT_DTRACE;
+ }
+
+ pc = get_stack_long(child, (long)®s->pc);
+
+ /* Next scheduling will set up UBC */
+ if (child->thread.ubc_pc == 0)
+ ubc_usercnt += 1;
+ child->thread.ubc_pc = pc;
+
+ set_tsk_thread_flag(child, TIF_SINGLESTEP);
+ child->exit_code = data;
+ /* give it a chance to run. */
+ wake_up_process(child);
+ ret = 0;
+ break;
+ }
+
#ifdef CONFIG_SH_DSP
case PTRACE_GETDSPREGS: {
unsigned long dp;
@@ -217,49 +272,39 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}
-static inline int audit_arch(void)
+asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
{
- int arch = EM_SH;
+ struct task_struct *tsk = current;
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
- arch |= __AUDIT_ARCH_LE;
-#endif
-
- return arch;
-}
+ if (unlikely(current->audit_context) && entryexit)
+ audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]),
+ regs->regs[0]);
-asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
-{
- long ret = 0;
+ if (!test_thread_flag(TIF_SYSCALL_TRACE) &&
+ !test_thread_flag(TIF_SINGLESTEP))
+ goto out;
+ if (!(tsk->ptrace & PT_PTRACED))
+ goto out;
- secure_computing(regs->regs[0]);
+ /* the 0x80 provides a way for the tracing parent to distinguish
+ between a syscall stop and SIGTRAP delivery */
+ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
+ !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
- if (test_thread_flag(TIF_SYSCALL_TRACE) &&
- tracehook_report_syscall_entry(regs))
- /*
- * Tracing decided this syscall should not happen.
- * We'll return a bogus call number to get an ENOSYS
- * error, but leave the original number in regs->regs[0].
- */
- ret = -1L;
+ /*
+ * this isn't the same as continuing with a signal, but it will do
+ * for normal use. strace only continues with a signal if the
+ * stopping signal is not SIGTRAP. -brl
+ */
+ if (tsk->exit_code) {
+ send_sig(tsk->exit_code, tsk, 1);
+ tsk->exit_code = 0;
+ }
- if (unlikely(current->audit_context))
- audit_syscall_entry(audit_arch(), regs->regs[3],
+out:
+ if (unlikely(current->audit_context) && !entryexit)
+ audit_syscall_entry(AUDIT_ARCH_SH, regs->regs[3],
regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
- return ret ?: regs->regs[0];
-}
-
-asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
-{
- int step;
-
- if (unlikely(current->audit_context))
- audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]),
- regs->regs[0]);
-
- step = test_thread_flag(TIF_SINGLESTEP);
- if (step || test_thread_flag(TIF_SYSCALL_TRACE))
- tracehook_report_syscall_exit(regs, step);
}
diff --git a/trunk/arch/sh/kernel/ptrace_64.c b/trunk/arch/sh/kernel/ptrace_64.c
index 5922edd416db..d453c47dc522 100644
--- a/trunk/arch/sh/kernel/ptrace_64.c
+++ b/trunk/arch/sh/kernel/ptrace_64.c
@@ -27,8 +27,6 @@
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -122,23 +120,18 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
return 0;
}
-void user_enable_single_step(struct task_struct *child)
-{
- struct pt_regs *regs = child->thread.uregs;
-
- regs->sr |= SR_SSTEP; /* auto-resetting upon exception */
-}
-
-void user_disable_single_step(struct task_struct *child)
-{
- regs->sr &= ~SR_SSTEP;
-}
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
int ret;
switch (request) {
+ /* when I and D space are separate, these will need to be fixed. */
+ case PTRACE_PEEKTEXT: /* read word at location addr. */
+ case PTRACE_PEEKDATA:
+ ret = generic_ptrace_peekdata(child, addr, data);
+ break;
+
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
unsigned long tmp;
@@ -161,6 +154,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break;
}
+ /* when I and D space are separate, this will have to be fixed. */
+ case PTRACE_POKETEXT: /* write the word at location addr. */
+ case PTRACE_POKEDATA:
+ ret = generic_ptrace_pokedata(child, addr, data);
+ break;
+
case PTRACE_POKEUSR:
/* write the word at location addr in the USER area. We must
disallow any changes to certain SR bits or u_fpvalid, since
@@ -192,6 +191,58 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
}
break;
+ case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
+ case PTRACE_CONT: { /* restart after signal. */
+ ret = -EIO;
+ if (!valid_signal(data))
+ break;
+ if (request == PTRACE_SYSCALL)
+ set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ else
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ child->exit_code = data;
+ wake_up_process(child);
+ ret = 0;
+ break;
+ }
+
+/*
+ * make the child exit. Best I can do is send it a sigkill.
+ * perhaps it should be put in the status that it wants to
+ * exit.
+ */
+ case PTRACE_KILL: {
+ ret = 0;
+ if (child->exit_state == EXIT_ZOMBIE) /* already dead */
+ break;
+ child->exit_code = SIGKILL;
+ wake_up_process(child);
+ break;
+ }
+
+ case PTRACE_SINGLESTEP: { /* set the trap flag. */
+ struct pt_regs *regs;
+
+ ret = -EIO;
+ if (!valid_signal(data))
+ break;
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ if ((child->ptrace & PT_DTRACE) == 0) {
+ /* Spurious delayed TF traps may occur */
+ child->ptrace |= PT_DTRACE;
+ }
+
+ regs = child->thread.uregs;
+
+ regs->sr |= SR_SSTEP; /* auto-resetting upon exception */
+
+ child->exit_code = data;
+ /* give it a chance to run. */
+ wake_up_process(child);
+ ret = 0;
+ break;
+ }
+
default:
ret = ptrace_request(child, request, addr, data);
break;
@@ -222,51 +273,38 @@ asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
return sys_ptrace(request, pid, addr, data);
}
-static inline int audit_arch(void)
+asmlinkage void syscall_trace(struct pt_regs *regs, int entryexit)
{
- int arch = EM_SH;
-
-#ifdef CONFIG_64BIT
- arch |= __AUDIT_ARCH_64BIT;
-#endif
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
- arch |= __AUDIT_ARCH_LE;
-#endif
+ struct task_struct *tsk = current;
- return arch;
-}
-
-asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
-{
- long long ret = 0;
-
- secure_computing(regs->regs[9]);
+ if (unlikely(current->audit_context) && entryexit)
+ audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
+ regs->regs[9]);
- if (test_thread_flag(TIF_SYSCALL_TRACE) &&
- tracehook_report_syscall_entry(regs))
- /*
- * Tracing decided this syscall should not happen.
- * We'll return a bogus call number to get an ENOSYS
- * error, but leave the original number in regs->regs[0].
- */
- ret = -1LL;
+ if (!test_thread_flag(TIF_SYSCALL_TRACE) &&
+ !test_thread_flag(TIF_SINGLESTEP))
+ goto out;
+ if (!(tsk->ptrace & PT_PTRACED))
+ goto out;
+
+ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
+ !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
+
+ /*
+ * this isn't the same as continuing with a signal, but it will do
+ * for normal use. strace only continues with a signal if the
+ * stopping signal is not SIGTRAP. -brl
+ */
+ if (tsk->exit_code) {
+ send_sig(tsk->exit_code, tsk, 1);
+ tsk->exit_code = 0;
+ }
- if (unlikely(current->audit_context))
- audit_syscall_entry(audit_arch(), regs->regs[1],
+out:
+ if (unlikely(current->audit_context) && !entryexit)
+ audit_syscall_entry(AUDIT_ARCH_SH, regs->regs[1],
regs->regs[2], regs->regs[3],
regs->regs[4], regs->regs[5]);
-
- return ret ?: regs->regs[9];
-}
-
-asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
-{
- if (unlikely(current->audit_context))
- audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
- regs->regs[9]);
-
- if (test_thread_flag(TIF_SYSCALL_TRACE))
- tracehook_report_syscall_exit(regs, 0);
}
/* Called with interrupts disabled */
@@ -300,5 +338,5 @@ asmlinkage void do_software_break_point(unsigned long long vec,
*/
void ptrace_disable(struct task_struct *child)
{
- user_disable_single_step(child);
+ /* nothing to do.. */
}
diff --git a/trunk/arch/sh/kernel/setup.c b/trunk/arch/sh/kernel/setup.c
index a35207655e7b..6339d0c95715 100644
--- a/trunk/arch/sh/kernel/setup.c
+++ b/trunk/arch/sh/kernel/setup.c
@@ -25,7 +25,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -287,25 +286,6 @@ static void __init setup_memory(void)
extern void __init setup_memory(void);
#endif
-/*
- * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
- * is_kdump_kernel() to determine if we are booting after a panic. Hence
- * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
- */
-#ifdef CONFIG_CRASH_DUMP
-/* elfcorehdr= specifies the location of elf core header
- * stored by the crashed kernel.
- */
-static int __init parse_elfcorehdr(char *arg)
-{
- if (!arg)
- return -EINVAL;
- elfcorehdr_addr = memparse(arg, &arg);
- return 0;
-}
-early_param("elfcorehdr", parse_elfcorehdr);
-#endif
-
void __init setup_arch(char **cmdline_p)
{
enable_mmu();
diff --git a/trunk/arch/sh/kernel/signal_32.c b/trunk/arch/sh/kernel/signal_32.c
index 51689d29ad45..4bbbde895a53 100644
--- a/trunk/arch/sh/kernel/signal_32.c
+++ b/trunk/arch/sh/kernel/signal_32.c
@@ -24,7 +24,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -508,13 +507,14 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
switch (regs->regs[0]) {
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
- no_system_call_restart:
regs->regs[0] = -EINTR;
break;
case -ERESTARTSYS:
- if (!(ka->sa.sa_flags & SA_RESTART))
- goto no_system_call_restart;
+ if (!(ka->sa.sa_flags & SA_RESTART)) {
+ regs->regs[0] = -EINTR;
+ break;
+ }
/* fallthrough */
case -ERESTARTNOINTR:
regs->regs[0] = save_r0;
@@ -589,15 +589,12 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
* clear the TIF_RESTORE_SIGMASK flag */
if (test_thread_flag(TIF_RESTORE_SIGMASK))
clear_thread_flag(TIF_RESTORE_SIGMASK);
-
- tracehook_signal_handler(signr, &info, &ka, regs,
- test_thread_flag(TIF_SINGLESTEP));
}
return;
}
-no_signal:
+ no_signal:
/* Did we come from a system call? */
if (regs->tra >= 0) {
/* Restart the system call - no handlers present */
@@ -621,14 +618,9 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
}
asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
- unsigned long thread_info_flags)
+ __u32 thread_info_flags)
{
/* deal with pending signal delivery */
- if (thread_info_flags & _TIF_SIGPENDING)
+ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs, save_r0);
-
- if (thread_info_flags & _TIF_NOTIFY_RESUME) {
- clear_thread_flag(TIF_NOTIFY_RESUME);
- tracehook_notify_resume(regs);
- }
}
diff --git a/trunk/arch/sh/kernel/signal_64.c b/trunk/arch/sh/kernel/signal_64.c
index 1d62dfef77f1..552eb810cd85 100644
--- a/trunk/arch/sh/kernel/signal_64.c
+++ b/trunk/arch/sh/kernel/signal_64.c
@@ -22,7 +22,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -43,84 +42,7 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-/*
- * Note that 'init' is a special process: it doesn't get signals it doesn't
- * want to handle. Thus you cannot kill init even with a SIGKILL even by
- * mistake.
- *
- * Note that we go through the signals twice: once to check the signals that
- * the kernel can handle, and then we build all the user-level signal handling
- * stack-frames in one go after that.
- */
-static int do_signal(struct pt_regs *regs, sigset_t *oldset)
-{
- siginfo_t info;
- int signr;
- struct k_sigaction ka;
-
- /*
- * We want the common case to go fast, which
- * is why we may in certain cases get here from
- * kernel mode. Just return without doing anything
- * if so.
- */
- if (!user_mode(regs))
- return 1;
-
- if (try_to_freeze())
- goto no_signal;
-
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- oldset = ¤t->saved_sigmask;
- else if (!oldset)
- oldset = ¤t->blocked;
-
- signr = get_signal_to_deliver(&info, &ka, regs, 0);
-
- if (signr > 0) {
- /* Whee! Actually deliver the signal. */
- handle_signal(signr, &info, &ka, oldset, regs);
-
- /*
- * If a signal was successfully delivered, the saved sigmask
- * is in its frame, and we can clear the TIF_RESTORE_SIGMASK
- * flag.
- */
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- clear_thread_flag(TIF_RESTORE_SIGMASK);
-
- tracehook_signal_handler(signr, &info, &ka, regs, 0);
- return 1;
- }
-
-no_signal:
- /* Did we come from a system call? */
- if (regs->syscall_nr >= 0) {
- /* Restart the system call - no handlers present */
- switch (regs->regs[REG_RET]) {
- case -ERESTARTNOHAND:
- case -ERESTARTSYS:
- case -ERESTARTNOINTR:
- /* Decode Syscall # */
- regs->regs[REG_RET] = regs->syscall_nr;
- regs->pc -= 4;
- break;
-
- case -ERESTART_RESTARTBLOCK:
- regs->regs[REG_RET] = __NR_restart_syscall;
- regs->pc -= 4;
- break;
- }
- }
-
- /* No signal to deliver -- put the saved sigmask back */
- if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
- clear_thread_flag(TIF_RESTORE_SIGMASK);
- sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
- }
-
- return 0;
-}
+asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
/*
* Atomically swap in the new signal mask, and wait for a signal.
@@ -721,13 +643,14 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
switch (regs->regs[REG_RET]) {
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
- no_system_call_restart:
regs->regs[REG_RET] = -EINTR;
break;
case -ERESTARTSYS:
- if (!(ka->sa.sa_flags & SA_RESTART))
- goto no_system_call_restart;
+ if (!(ka->sa.sa_flags & SA_RESTART)) {
+ regs->regs[REG_RET] = -EINTR;
+ break;
+ }
/* fallthrough */
case -ERESTARTNOINTR:
/* Decode syscall # */
@@ -750,13 +673,80 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
spin_unlock_irq(¤t->sighand->siglock);
}
-asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
+/*
+ * Note that 'init' is a special process: it doesn't get signals it doesn't
+ * want to handle. Thus you cannot kill init even with a SIGKILL even by
+ * mistake.
+ *
+ * Note that we go through the signals twice: once to check the signals that
+ * the kernel can handle, and then we build all the user-level signal handling
+ * stack-frames in one go after that.
+ */
+int do_signal(struct pt_regs *regs, sigset_t *oldset)
{
- if (thread_info_flags & _TIF_SIGPENDING)
- do_signal(regs, 0);
+ siginfo_t info;
+ int signr;
+ struct k_sigaction ka;
+
+ /*
+ * We want the common case to go fast, which
+ * is why we may in certain cases get here from
+ * kernel mode. Just return without doing anything
+ * if so.
+ */
+ if (!user_mode(regs))
+ return 1;
+
+ if (try_to_freeze())
+ goto no_signal;
+
+ if (test_thread_flag(TIF_RESTORE_SIGMASK))
+ oldset = ¤t->saved_sigmask;
+ else if (!oldset)
+ oldset = ¤t->blocked;
+
+ signr = get_signal_to_deliver(&info, &ka, regs, 0);
+
+ if (signr > 0) {
+ /* Whee! Actually deliver the signal. */
+ handle_signal(signr, &info, &ka, oldset, regs);
- if (thread_info_flags & _TIF_NOTIFY_RESUME) {
- clear_thread_flag(TIF_NOTIFY_RESUME);
- tracehook_notify_resume(regs);
+ /*
+ * If a signal was successfully delivered, the saved sigmask
+ * is in its frame, and we can clear the TIF_RESTORE_SIGMASK
+ * flag.
+ */
+ if (test_thread_flag(TIF_RESTORE_SIGMASK))
+ clear_thread_flag(TIF_RESTORE_SIGMASK);
+
+ return 1;
}
+
+no_signal:
+ /* Did we come from a system call? */
+ if (regs->syscall_nr >= 0) {
+ /* Restart the system call - no handlers present */
+ switch (regs->regs[REG_RET]) {
+ case -ERESTARTNOHAND:
+ case -ERESTARTSYS:
+ case -ERESTARTNOINTR:
+ /* Decode Syscall # */
+ regs->regs[REG_RET] = regs->syscall_nr;
+ regs->pc -= 4;
+ break;
+
+ case -ERESTART_RESTARTBLOCK:
+ regs->regs[REG_RET] = __NR_restart_syscall;
+ regs->pc -= 4;
+ break;
+ }
+ }
+
+ /* No signal to deliver -- put the saved sigmask back */
+ if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
+ clear_thread_flag(TIF_RESTORE_SIGMASK);
+ sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
+ }
+
+ return 0;
}
diff --git a/trunk/arch/sh/mm/Kconfig b/trunk/arch/sh/mm/Kconfig
index 9c131cac91a4..56d0a7daa34b 100644
--- a/trunk/arch/sh/mm/Kconfig
+++ b/trunk/arch/sh/mm/Kconfig
@@ -237,6 +237,7 @@ choice
config CACHE_WRITEBACK
bool "Write-back"
+ depends on CPU_SH2A || CPU_SH3 || CPU_SH4 || CPU_SH5
config CACHE_WRITETHROUGH
bool "Write-through"
diff --git a/trunk/arch/sh/mm/Makefile_32 b/trunk/arch/sh/mm/Makefile_32
index 70e0906023cc..e295db60b91b 100644
--- a/trunk/arch/sh/mm/Makefile_32
+++ b/trunk/arch/sh/mm/Makefile_32
@@ -5,15 +5,12 @@
obj-y := init.o extable_32.o consistent.o
ifndef CONFIG_CACHE_OFF
-cache-$(CONFIG_CPU_SH2) := cache-sh2.o
-cache-$(CONFIG_CPU_SH2A) := cache-sh2a.o
-cache-$(CONFIG_CPU_SH3) := cache-sh3.o
-cache-$(CONFIG_CPU_SH4) := cache-sh4.o
-cache-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
+obj-$(CONFIG_CPU_SH2) += cache-sh2.o
+obj-$(CONFIG_CPU_SH3) += cache-sh3.o
+obj-$(CONFIG_CPU_SH4) += cache-sh4.o
+obj-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
endif
-obj-y += $(cache-y)
-
mmu-y := tlb-nommu.o pg-nommu.o
mmu-$(CONFIG_MMU) := fault_32.o tlbflush_32.o ioremap_32.o
diff --git a/trunk/arch/sh/mm/cache-sh2.c b/trunk/arch/sh/mm/cache-sh2.c
index c4e80d2b764b..6614033f6be9 100644
--- a/trunk/arch/sh/mm/cache-sh2.c
+++ b/trunk/arch/sh/mm/cache-sh2.c
@@ -2,7 +2,6 @@
* arch/sh/mm/cache-sh2.c
*
* Copyright (C) 2002 Paul Mundt
- * Copyright (C) 2008 Yoshinori Sato
*
* Released under the terms of the GNU GPL v2.0.
*/
@@ -25,15 +24,8 @@ void __flush_wback_region(void *start, int size)
end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
& ~(L1_CACHE_BYTES-1);
for (v = begin; v < end; v+=L1_CACHE_BYTES) {
- unsigned long addr = CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0);
- int way;
- for (way = 0; way < 4; way++) {
- unsigned long data = ctrl_inl(addr | (way << 12));
- if ((data & CACHE_PHYSADDR_MASK) == (v & CACHE_PHYSADDR_MASK)) {
- data &= ~SH_CACHE_UPDATED;
- ctrl_outl(data, addr | (way << 12));
- }
- }
+ /* FIXME cache purge */
+ ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008);
}
}
@@ -45,40 +37,21 @@ void __flush_purge_region(void *start, int size)
begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
& ~(L1_CACHE_BYTES-1);
-
- for (v = begin; v < end; v+=L1_CACHE_BYTES)
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
+ for (v = begin; v < end; v+=L1_CACHE_BYTES) {
+ ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008);
+ }
}
void __flush_invalidate_region(void *start, int size)
{
-#ifdef CONFIG_CACHE_WRITEBACK
- /*
- * SH-2 does not support individual line invalidation, only a
- * global invalidate.
- */
- unsigned long ccr;
- unsigned long flags;
- local_irq_save(flags);
- jump_to_uncached();
-
- ccr = ctrl_inl(CCR);
- ccr |= CCR_CACHE_INVALIDATE;
- ctrl_outl(ccr, CCR);
-
- back_to_cached();
- local_irq_restore(flags);
-#else
unsigned long v;
unsigned long begin, end;
begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
& ~(L1_CACHE_BYTES-1);
-
- for (v = begin; v < end; v+=L1_CACHE_BYTES)
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
-#endif
+ for (v = begin; v < end; v+=L1_CACHE_BYTES) {
+ ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008);
+ }
}
+
diff --git a/trunk/arch/sh/mm/cache-sh2a.c b/trunk/arch/sh/mm/cache-sh2a.c
deleted file mode 100644
index 62c0c5f35120..000000000000
--- a/trunk/arch/sh/mm/cache-sh2a.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * arch/sh/mm/cache-sh2a.c
- *
- * Copyright (C) 2008 Yoshinori Sato
- *
- * Released under the terms of the GNU GPL v2.0.
- */
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-void __flush_wback_region(void *start, int size)
-{
- unsigned long v;
- unsigned long begin, end;
- unsigned long flags;
-
- begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
- end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
- & ~(L1_CACHE_BYTES-1);
-
- local_irq_save(flags);
- jump_to_uncached();
-
- for (v = begin; v < end; v+=L1_CACHE_BYTES) {
- unsigned long addr = CACHE_OC_ADDRESS_ARRAY | (v & 0x000007f0);
- int way;
- for (way = 0; way < 4; way++) {
- unsigned long data = ctrl_inl(addr | (way << 11));
- if ((data & CACHE_PHYSADDR_MASK) == (v & CACHE_PHYSADDR_MASK)) {
- data &= ~SH_CACHE_UPDATED;
- ctrl_outl(data, addr | (way << 11));
- }
- }
- }
-
- back_to_cached();
- local_irq_restore(flags);
-}
-
-void __flush_purge_region(void *start, int size)
-{
- unsigned long v;
- unsigned long begin, end;
- unsigned long flags;
-
- begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
- end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
- & ~(L1_CACHE_BYTES-1);
-
- local_irq_save(flags);
- jump_to_uncached();
-
- for (v = begin; v < end; v+=L1_CACHE_BYTES) {
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_OC_ADDRESS_ARRAY | (v & 0x000003f0) | 0x00000008);
- }
- back_to_cached();
- local_irq_restore(flags);
-}
-
-void __flush_invalidate_region(void *start, int size)
-{
- unsigned long v;
- unsigned long begin, end;
- unsigned long flags;
-
- begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
- end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
- & ~(L1_CACHE_BYTES-1);
- local_irq_save(flags);
- jump_to_uncached();
-
-#ifdef CONFIG_CACHE_WRITEBACK
- ctrl_outl(ctrl_inl(CCR) | CCR_OCACHE_INVALIDATE, CCR);
- /* I-cache invalidate */
- for (v = begin; v < end; v+=L1_CACHE_BYTES) {
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_IC_ADDRESS_ARRAY | (v & 0x000003f0) | 0x00000008);
- }
-#else
- for (v = begin; v < end; v+=L1_CACHE_BYTES) {
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_IC_ADDRESS_ARRAY | (v & 0x000003f0) | 0x00000008);
- ctrl_outl((v & CACHE_PHYSADDR_MASK),
- CACHE_OC_ADDRESS_ARRAY | (v & 0x000003f0) | 0x00000008);
- }
-#endif
- back_to_cached();
- local_irq_restore(flags);
-}
-
-/* WBack O-Cache and flush I-Cache */
-void flush_icache_range(unsigned long start, unsigned long end)
-{
- unsigned long v;
- unsigned long flags;
-
- start = start & ~(L1_CACHE_BYTES-1);
- end = (end + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1);
-
- local_irq_save(flags);
- jump_to_uncached();
-
- for (v = start; v < end; v+=L1_CACHE_BYTES) {
- unsigned long addr = (v & 0x000007f0);
- int way;
- /* O-Cache writeback */
- for (way = 0; way < 4; way++) {
- unsigned long data = ctrl_inl(CACHE_OC_ADDRESS_ARRAY | addr | (way << 11));
- if ((data & CACHE_PHYSADDR_MASK) == (v & CACHE_PHYSADDR_MASK)) {
- data &= ~SH_CACHE_UPDATED;
- ctrl_outl(data, CACHE_OC_ADDRESS_ARRAY | addr | (way << 11));
- }
- }
- /* I-Cache invalidate */
- ctrl_outl(addr,
- CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008);
- }
-
- back_to_cached();
- local_irq_restore(flags);
-}
diff --git a/trunk/arch/sh/mm/tlb-sh5.c b/trunk/arch/sh/mm/tlb-sh5.c
index dae131243bcc..f34274a1ded3 100644
--- a/trunk/arch/sh/mm/tlb-sh5.c
+++ b/trunk/arch/sh/mm/tlb-sh5.c
@@ -15,7 +15,9 @@
#include
/**
- * sh64_tlb_init - Perform initial setup for the DTLB and ITLB.
+ * sh64_tlb_init
+ *
+ * Perform initial setup for the DTLB and ITLB.
*/
int __init sh64_tlb_init(void)
{
@@ -44,7 +46,9 @@ int __init sh64_tlb_init(void)
}
/**
- * sh64_next_free_dtlb_entry - Find the next available DTLB entry
+ * sh64_next_free_dtlb_entry
+ *
+ * Find the next available DTLB entry
*/
unsigned long long sh64_next_free_dtlb_entry(void)
{
@@ -52,7 +56,9 @@ unsigned long long sh64_next_free_dtlb_entry(void)
}
/**
- * sh64_get_wired_dtlb_entry - Allocate a wired (locked-in) entry in the DTLB
+ * sh64_get_wired_dtlb_entry
+ *
+ * Allocate a wired (locked-in) entry in the DTLB
*/
unsigned long long sh64_get_wired_dtlb_entry(void)
{
@@ -65,10 +71,12 @@ unsigned long long sh64_get_wired_dtlb_entry(void)
}
/**
- * sh64_put_wired_dtlb_entry - Free a wired (locked-in) entry in the DTLB.
+ * sh64_put_wired_dtlb_entry
*
* @entry: Address of TLB slot.
*
+ * Free a wired (locked-in) entry in the DTLB.
+ *
* Works like a stack, last one to allocate must be first one to free.
*/
int sh64_put_wired_dtlb_entry(unsigned long long entry)
@@ -107,7 +115,7 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry)
}
/**
- * sh64_setup_tlb_slot - Load up a translation in a wired slot.
+ * sh64_setup_tlb_slot
*
* @config_addr: Address of TLB slot.
* @eaddr: Virtual address.
@@ -146,7 +154,7 @@ inline void sh64_setup_tlb_slot(unsigned long long config_addr,
}
/**
- * sh64_teardown_tlb_slot - Teardown a translation.
+ * sh64_teardown_tlb_slot
*
* @config_addr: Address of TLB slot.
*
diff --git a/trunk/arch/sh/tools/Makefile b/trunk/arch/sh/tools/Makefile
index 567516b58acc..b5d202be8206 100644
--- a/trunk/arch/sh/tools/Makefile
+++ b/trunk/arch/sh/tools/Makefile
@@ -10,7 +10,7 @@
# Shamelessly cloned from ARM.
#
-include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
+arch/sh/include/asm/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
- $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
+ $(Q)if [ ! -d arch/sh/include/asm ]; then mkdir -p arch/sh/include/asm; fi
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/trunk/arch/sparc64/mm/tsb.c b/trunk/arch/sparc64/mm/tsb.c
index 3547937b17a2..587f8efb2e05 100644
--- a/trunk/arch/sparc64/mm/tsb.c
+++ b/trunk/arch/sparc64/mm/tsb.c
@@ -1,9 +1,10 @@
/* arch/sparc64/mm/tsb.c
*
- * Copyright (C) 2006 David S. Miller
+ * Copyright (C) 2006, 2008 David S. Miller
*/
#include
+#include
#include
#include
#include
@@ -415,7 +416,9 @@ void tsb_grow(struct mm_struct *mm, unsigned long tsb_index, unsigned long rss)
tsb_context_switch(mm);
/* Now force other processors to do the same. */
+ preempt_disable();
smp_tsb_sync(mm);
+ preempt_enable();
/* Now it is safe to free the old tsb. */
kmem_cache_free(tsb_caches[old_cache_index], old_tsb);
diff --git a/trunk/block/scsi_ioctl.c b/trunk/block/scsi_ioctl.c
index 12a5182173f6..c5b9bcfc0a6d 100644
--- a/trunk/block/scsi_ioctl.c
+++ b/trunk/block/scsi_ioctl.c
@@ -518,7 +518,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q,
hdr.sbp = cgc.sense;
if (hdr.sbp)
hdr.mx_sb_len = sizeof(struct request_sense);
- hdr.timeout = jiffies_to_msecs(cgc.timeout);
+ hdr.timeout = cgc.timeout;
hdr.cmdp = ((struct cdrom_generic_command __user*) arg)->cmd;
hdr.cmd_len = sizeof(cgc.cmd);
diff --git a/trunk/drivers/char/efirtc.c b/trunk/drivers/char/efirtc.c
index 34d15d548236..67fbd7aab5db 100644
--- a/trunk/drivers/char/efirtc.c
+++ b/trunk/drivers/char/efirtc.c
@@ -37,6 +37,7 @@
#include
#include
#include
+#include
#include
#include
diff --git a/trunk/drivers/char/hvc_console.h b/trunk/drivers/char/hvc_console.h
index 9790201718ae..d9ce10915625 100644
--- a/trunk/drivers/char/hvc_console.h
+++ b/trunk/drivers/char/hvc_console.h
@@ -6,7 +6,7 @@
* Ryan S. Arnold
*
* hvc_console header information:
- * moved here from arch/powerpc/include/asm/hvconsole.h
+ * moved here from include/asm-powerpc/hvconsole.h
* and drivers/char/hvc_console.c
*
* This program is free software; you can redistribute it and/or modify
diff --git a/trunk/drivers/char/hvcs.c b/trunk/drivers/char/hvcs.c
index 473d9b14439a..786d518e9477 100644
--- a/trunk/drivers/char/hvcs.c
+++ b/trunk/drivers/char/hvcs.c
@@ -114,7 +114,7 @@
* the hvcs_final_close() function in order to get it out of the spinlock.
* Rearranged hvcs_close(). Cleaned up some printks and did some housekeeping
* on the changelog. Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from
- * arch/powerepc/include/asm/hvcserver.h
+ * include/asm-powerpc/hvcserver.h
*
* 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to
* prevent possible lockup with realtime scheduling as similarily pointed out by
diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c
index 1bc00c9d860d..82a51f38a546 100644
--- a/trunk/drivers/char/vt.c
+++ b/trunk/drivers/char/vt.c
@@ -916,6 +916,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines)
ws.ws_col = vc->vc_cols;
ws.ws_ypixel = vc->vc_scan_lines;
+ mutex_lock(&vc->vc_tty->termios_mutex);
spin_lock_irq(&vc->vc_tty->ctrl_lock);
if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col))
pgrp = get_pid(vc->vc_tty->pgrp);
@@ -925,6 +926,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines)
put_pid(pgrp);
}
*cws = ws;
+ mutex_unlock(&vc->vc_tty->termios_mutex);
}
if (CON_IS_VISIBLE(vc))
diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c
index 898c8b5c38dd..dd9bc68f1c7b 100644
--- a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c
+++ b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c
@@ -42,7 +42,7 @@
*/
-#include
+#include
#include "ehca_classes.h"
#include "ehca_tools.h"
#include "ehca_qes.h"
diff --git a/trunk/drivers/input/keyboard/maple_keyb.c b/trunk/drivers/input/keyboard/maple_keyb.c
index 22f17a593be7..7797ef6e5e64 100644
--- a/trunk/drivers/input/keyboard/maple_keyb.c
+++ b/trunk/drivers/input/keyboard/maple_keyb.c
@@ -2,7 +2,7 @@
* SEGA Dreamcast keyboard driver
* Based on drivers/usb/usbkbd.c
* Copyright YAEGASHI Takeshi, 2001
- * Porting to 2.6 Copyright Adrian McMenamin, 2007, 2008
+ * Porting to 2.6 Copyright Adrian McMenamin, 2007
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,51 +45,39 @@ struct dc_kbd {
};
static const unsigned short dc_kbd_keycode[NR_SCANCODES] = {
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_A, KEY_B,
- KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L,
- KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V,
- KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6,
- KEY_7, KEY_8, KEY_9, KEY_0, KEY_ENTER, KEY_ESC, KEY_BACKSPACE,
- KEY_TAB, KEY_SPACE, KEY_MINUS, KEY_EQUAL, KEY_LEFTBRACE,
- KEY_RIGHTBRACE, KEY_BACKSLASH, KEY_BACKSLASH, KEY_SEMICOLON,
- KEY_APOSTROPHE, KEY_GRAVE, KEY_COMMA, KEY_DOT, KEY_SLASH,
- KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_A, KEY_B, KEY_C, KEY_D,
+ KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L,
+ KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T,
+ KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_1, KEY_2,
+ KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0,
+ KEY_ENTER, KEY_ESC, KEY_BACKSPACE, KEY_TAB, KEY_SPACE, KEY_MINUS, KEY_EQUAL, KEY_LEFTBRACE,
+ KEY_RIGHTBRACE, KEY_BACKSLASH, KEY_BACKSLASH, KEY_SEMICOLON, KEY_APOSTROPHE, KEY_GRAVE, KEY_COMMA,
+ KEY_DOT, KEY_SLASH, KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6,
KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_SYSRQ,
- KEY_SCROLLLOCK, KEY_PAUSE, KEY_INSERT, KEY_HOME, KEY_PAGEUP,
- KEY_DELETE, KEY_END, KEY_PAGEDOWN, KEY_RIGHT, KEY_LEFT, KEY_DOWN,
- KEY_UP, KEY_NUMLOCK, KEY_KPSLASH, KEY_KPASTERISK, KEY_KPMINUS,
- KEY_KPPLUS, KEY_KPENTER, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5,
- KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KP0, KEY_KPDOT, KEY_102ND,
- KEY_COMPOSE, KEY_POWER, KEY_KPEQUAL, KEY_F13, KEY_F14, KEY_F15,
- KEY_F16, KEY_F17, KEY_F18, KEY_F19, KEY_F20, KEY_F21, KEY_F22,
- KEY_F23, KEY_F24, KEY_OPEN, KEY_HELP, KEY_PROPS, KEY_FRONT, KEY_STOP,
- KEY_AGAIN, KEY_UNDO, KEY_CUT, KEY_COPY, KEY_PASTE, KEY_FIND, KEY_MUTE,
- KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_KPCOMMA, KEY_RESERVED, KEY_RO, KEY_KATAKANAHIRAGANA , KEY_YEN,
- KEY_HENKAN, KEY_MUHENKAN, KEY_KPJPCOMMA, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_HANGEUL, KEY_HANJA, KEY_KATAKANA, KEY_HIRAGANA,
- KEY_ZENKAKUHANKAKU, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
- KEY_RESERVED, KEY_RESERVED, KEY_LEFTCTRL, KEY_LEFTSHIFT, KEY_LEFTALT,
- KEY_LEFTMETA, KEY_RIGHTCTRL, KEY_RIGHTSHIFT, KEY_RIGHTALT,
- KEY_RIGHTMETA, KEY_PLAYPAUSE, KEY_STOPCD, KEY_PREVIOUSSONG,
- KEY_NEXTSONG, KEY_EJECTCD, KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_MUTE,
- KEY_WWW, KEY_BACK, KEY_FORWARD, KEY_STOP, KEY_FIND, KEY_SCROLLUP,
- KEY_SCROLLDOWN, KEY_EDIT, KEY_SLEEP, KEY_SCREENLOCK, KEY_REFRESH,
- KEY_CALC, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED
+ KEY_SCROLLLOCK, KEY_PAUSE, KEY_INSERT, KEY_HOME, KEY_PAGEUP, KEY_DELETE,
+ KEY_END, KEY_PAGEDOWN, KEY_RIGHT, KEY_LEFT, KEY_DOWN, KEY_UP,
+ KEY_NUMLOCK, KEY_KPSLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS, KEY_KPENTER, KEY_KP1, KEY_KP2,
+ KEY_KP3, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KP0, KEY_KPDOT,
+ KEY_102ND, KEY_COMPOSE, KEY_POWER, KEY_KPEQUAL, KEY_F13, KEY_F14, KEY_F15,
+ KEY_F16, KEY_F17, KEY_F18, KEY_F19, KEY_F20,
+ KEY_F21, KEY_F22, KEY_F23, KEY_F24, KEY_OPEN, KEY_HELP, KEY_PROPS, KEY_FRONT,
+ KEY_STOP, KEY_AGAIN, KEY_UNDO, KEY_CUT, KEY_COPY, KEY_PASTE, KEY_FIND, KEY_MUTE,
+ KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_KPCOMMA, KEY_RESERVED, KEY_RO, KEY_KATAKANAHIRAGANA , KEY_YEN,
+ KEY_HENKAN, KEY_MUHENKAN, KEY_KPJPCOMMA, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_HANGEUL, KEY_HANJA, KEY_KATAKANA, KEY_HIRAGANA, KEY_ZENKAKUHANKAKU, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
+ KEY_LEFTCTRL, KEY_LEFTSHIFT, KEY_LEFTALT, KEY_LEFTMETA, KEY_RIGHTCTRL, KEY_RIGHTSHIFT, KEY_RIGHTALT, KEY_RIGHTMETA,
+ KEY_PLAYPAUSE, KEY_STOPCD, KEY_PREVIOUSSONG, KEY_NEXTSONG, KEY_EJECTCD, KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_MUTE,
+ KEY_WWW, KEY_BACK, KEY_FORWARD, KEY_STOP, KEY_FIND, KEY_SCROLLUP, KEY_SCROLLDOWN, KEY_EDIT, KEY_SLEEP,
+ KEY_SCREENLOCK, KEY_REFRESH, KEY_CALC, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED
};
static void dc_scan_kbd(struct dc_kbd *kbd)
@@ -139,12 +127,12 @@ static void dc_scan_kbd(struct dc_kbd *kbd)
static void dc_kbd_callback(struct mapleq *mq)
{
struct maple_device *mapledev = mq->dev;
- struct dc_kbd *kbd = maple_get_drvdata(mapledev);
+ struct dc_kbd *kbd = mapledev->private_data;
unsigned long *buf = mq->recvbuf;
/*
- * We should always get the lock because the only
- * time it may be locked is if the driver is in the cleanup phase.
+ * We should always be getting the lock because the only
+ * time it may be locked if driver is in cleanup phase.
*/
if (likely(mutex_trylock(&maple_keyb_mutex))) {
@@ -157,96 +145,106 @@ static void dc_kbd_callback(struct mapleq *mq)
}
}
-static int probe_maple_kbd(struct device *dev)
+static int dc_kbd_connect(struct maple_device *mdev)
{
- struct maple_device *mdev = to_maple_dev(dev);
- struct maple_driver *mdrv = to_maple_driver(dev->driver);
int i, error;
struct dc_kbd *kbd;
- struct input_dev *idev;
+ struct input_dev *dev;
if (!(mdev->function & MAPLE_FUNC_KEYBOARD))
return -EINVAL;
kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL);
- idev = input_allocate_device();
- if (!kbd || !idev) {
+ dev = input_allocate_device();
+ if (!kbd || !dev) {
error = -ENOMEM;
goto fail;
}
- kbd->dev = idev;
+ mdev->private_data = kbd;
+
+ kbd->dev = dev;
memcpy(kbd->keycode, dc_kbd_keycode, sizeof(kbd->keycode));
- idev->name = mdev->product_name;
- idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
- idev->keycode = kbd->keycode;
- idev->keycodesize = sizeof(unsigned short);
- idev->keycodemax = ARRAY_SIZE(kbd->keycode);
- idev->id.bustype = BUS_HOST;
- idev->dev.parent = &mdev->dev;
+ dev->name = mdev->product_name;
+ dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
+ dev->keycode = kbd->keycode;
+ dev->keycodesize = sizeof (unsigned short);
+ dev->keycodemax = ARRAY_SIZE(kbd->keycode);
+ dev->id.bustype = BUS_HOST;
+ dev->dev.parent = &mdev->dev;
for (i = 0; i < NR_SCANCODES; i++)
- __set_bit(dc_kbd_keycode[i], idev->keybit);
- __clear_bit(KEY_RESERVED, idev->keybit);
+ __set_bit(dc_kbd_keycode[i], dev->keybit);
+ __clear_bit(KEY_RESERVED, dev->keybit);
- input_set_capability(idev, EV_MSC, MSC_SCAN);
- input_set_drvdata(idev, kbd);
+ input_set_capability(dev, EV_MSC, MSC_SCAN);
+ input_set_drvdata(dev, kbd);
- error = input_register_device(idev);
+ error = input_register_device(dev);
if (error)
goto fail;
/* Maple polling is locked to VBLANK - which may be just 50/s */
- maple_getcond_callback(mdev, dc_kbd_callback, HZ/50,
- MAPLE_FUNC_KEYBOARD);
-
- mdev->driver = mdrv;
-
- maple_set_drvdata(mdev, kbd);
-
- return error;
+ maple_getcond_callback(mdev, dc_kbd_callback, HZ/50, MAPLE_FUNC_KEYBOARD);
+ return 0;
-fail:
- input_free_device(idev);
+ fail:
+ input_free_device(dev);
kfree(kbd);
- maple_set_drvdata(mdev, NULL);
+ mdev->private_data = NULL;
return error;
}
-static int remove_maple_kbd(struct device *dev)
+static void dc_kbd_disconnect(struct maple_device *mdev)
{
- struct maple_device *mdev = to_maple_dev(dev);
- struct dc_kbd *kbd = maple_get_drvdata(mdev);
+ struct dc_kbd *kbd;
mutex_lock(&maple_keyb_mutex);
+ kbd = mdev->private_data;
+ mdev->private_data = NULL;
input_unregister_device(kbd->dev);
kfree(kbd);
- maple_set_drvdata(mdev, NULL);
-
mutex_unlock(&maple_keyb_mutex);
+}
+
+/* allow the keyboard to be used */
+static int probe_maple_kbd(struct device *dev)
+{
+ struct maple_device *mdev = to_maple_dev(dev);
+ struct maple_driver *mdrv = to_maple_driver(dev->driver);
+ int error;
+
+ error = dc_kbd_connect(mdev);
+ if (error)
+ return error;
+
+ mdev->driver = mdrv;
+ mdev->registered = 1;
+
return 0;
}
static struct maple_driver dc_kbd_driver = {
.function = MAPLE_FUNC_KEYBOARD,
+ .connect = dc_kbd_connect,
+ .disconnect = dc_kbd_disconnect,
.drv = {
.name = "Dreamcast_keyboard",
.probe = probe_maple_kbd,
- .remove = remove_maple_kbd,
- },
+ },
};
static int __init dc_kbd_init(void)
{
- return maple_driver_register(&dc_kbd_driver);
+ return maple_driver_register(&dc_kbd_driver.drv);
}
static void __exit dc_kbd_exit(void)
{
- maple_driver_unregister(&dc_kbd_driver);
+ driver_unregister(&dc_kbd_driver.drv);
}
module_init(dc_kbd_init);
diff --git a/trunk/drivers/isdn/Makefile b/trunk/drivers/isdn/Makefile
index f1f777570e8e..8380a4568d11 100644
--- a/trunk/drivers/isdn/Makefile
+++ b/trunk/drivers/isdn/Makefile
@@ -5,7 +5,7 @@
obj-$(CONFIG_ISDN_I4L) += i4l/
obj-$(CONFIG_ISDN_CAPI) += capi/
obj-$(CONFIG_MISDN) += mISDN/
-obj-$(CONFIG_ISDN) += hardware/
+obj-$(CONFIG_ISDN_CAPI) += hardware/
obj-$(CONFIG_ISDN_DIVERSION) += divert/
obj-$(CONFIG_ISDN_DRV_HISAX) += hisax/
obj-$(CONFIG_ISDN_DRV_ICN) += icn/
diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
index 1eac03f39d00..2649ea55a9e8 100644
--- a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -140,7 +140,7 @@
* #define HFC_REGISTER_DEBUG
*/
-static const char *hfcmulti_revision = "2.02";
+static const char *hfcmulti_revision = "2.00";
#include
#include
@@ -427,12 +427,12 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
while (len>>2) {
- outl(cpu_to_le32(*(u32 *)data), hc->pci_iobase);
+ outl(*(u32 *)data, hc->pci_iobase);
data += 4;
len -= 4;
}
while (len>>1) {
- outw(cpu_to_le16(*(u16 *)data), hc->pci_iobase);
+ outw(*(u16 *)data, hc->pci_iobase);
data += 2;
len -= 2;
}
@@ -447,19 +447,17 @@ void
write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
- writel(cpu_to_le32(*(u32 *)data),
- hc->pci_membase + A_FIFO_DATA0);
+ writel(*(u32 *)data, (hc->pci_membase)+A_FIFO_DATA0);
data += 4;
len -= 4;
}
while (len>>1) {
- writew(cpu_to_le16(*(u16 *)data),
- hc->pci_membase + A_FIFO_DATA0);
+ writew(*(u16 *)data, (hc->pci_membase)+A_FIFO_DATA0);
data += 2;
len -= 2;
}
while (len) {
- writeb(*data, hc->pci_membase + A_FIFO_DATA0);
+ writeb(*data, (hc->pci_membase)+A_FIFO_DATA0);
data++;
len--;
}
@@ -470,12 +468,12 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
while (len>>2) {
- *(u32 *)data = le32_to_cpu(inl(hc->pci_iobase));
+ *(u32 *)data = inl(hc->pci_iobase);
data += 4;
len -= 4;
}
while (len>>1) {
- *(u16 *)data = le16_to_cpu(inw(hc->pci_iobase));
+ *(u16 *)data = inw(hc->pci_iobase);
data += 2;
len -= 2;
}
@@ -492,18 +490,18 @@ read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
*(u32 *)data =
- le32_to_cpu(readl(hc->pci_membase + A_FIFO_DATA0));
+ readl((hc->pci_membase)+A_FIFO_DATA0);
data += 4;
len -= 4;
}
while (len>>1) {
*(u16 *)data =
- le16_to_cpu(readw(hc->pci_membase + A_FIFO_DATA0));
+ readw((hc->pci_membase)+A_FIFO_DATA0);
data += 2;
len -= 2;
}
while (len) {
- *data = readb(hc->pci_membase + A_FIFO_DATA0);
+ *data = readb((hc->pci_membase)+A_FIFO_DATA0);
data++;
len--;
}
@@ -3973,7 +3971,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch,
struct bchannel *bch;
int ch;
- if (!test_channelmap(rq->adr.channel, dch->dev.channelmap))
+ if (!test_bit(rq->adr.channel, &dch->dev.channelmap[0]))
return -EINVAL;
if (rq->protocol == ISDN_P_NONE)
return -EINVAL;
@@ -4589,7 +4587,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
list_add(&bch->ch.list, &dch->dev.bchannels);
hc->chan[ch].bch = bch;
hc->chan[ch].port = 0;
- set_channelmap(bch->nr, dch->dev.channelmap);
+ test_and_set_bit(bch->nr, &dch->dev.channelmap[0]);
}
/* set optical line type */
if (port[Port_cnt] & 0x001) {
@@ -4757,7 +4755,7 @@ init_multi_port(struct hfc_multi *hc, int pt)
list_add(&bch->ch.list, &dch->dev.bchannels);
hc->chan[i + ch].bch = bch;
hc->chan[i + ch].port = pt;
- set_channelmap(bch->nr, dch->dev.channelmap);
+ test_and_set_bit(bch->nr, &dch->dev.channelmap[0]);
}
/* set master clock */
if (port[Port_cnt] & 0x001) {
@@ -5052,12 +5050,12 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev)
static const struct hm_map hfcm_map[] = {
/*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0},
-/*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0},
+/*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S},
/*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0},
/*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0},
/*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0},
/*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0},
-/*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0},
+/*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, 0, 0},
/*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0},
/*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO},
/*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0},
@@ -5253,6 +5251,9 @@ HFCmulti_init(void)
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: init entered\n", __func__);
+#ifdef __BIG_ENDIAN
+#error "not running on big endian machines now"
+#endif
hfc_interrupt = symbol_get(ztdummy_extern_interrupt);
register_interrupt = symbol_get(ztdummy_register_interrupt);
unregister_interrupt = symbol_get(ztdummy_unregister_interrupt);
diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c
index 9cf5edbb1a9b..3231814e7efa 100644
--- a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -2056,7 +2056,7 @@ setup_card(struct hfc_pci *card)
card->dch.dev.nrbchan = 2;
for (i = 0; i < 2; i++) {
card->bch[i].nr = i + 1;
- set_channelmap(i + 1, card->dch.dev.channelmap);
+ test_and_set_bit(i + 1, &card->dch.dev.channelmap[0]);
card->bch[i].debug = debug;
mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM);
card->bch[i].hw = card;
diff --git a/trunk/drivers/isdn/mISDN/l1oip_core.c b/trunk/drivers/isdn/mISDN/l1oip_core.c
index e42150a57780..155b99780c4f 100644
--- a/trunk/drivers/isdn/mISDN/l1oip_core.c
+++ b/trunk/drivers/isdn/mISDN/l1oip_core.c
@@ -1006,7 +1006,8 @@ open_bchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq)
struct bchannel *bch;
int ch;
- if (!test_channelmap(rq->adr.channel, dch->dev.channelmap))
+ if (!test_bit(rq->adr.channel & 0x1f,
+ &dch->dev.channelmap[rq->adr.channel >> 5]))
return -EINVAL;
if (rq->protocol == ISDN_P_NONE)
return -EINVAL;
@@ -1411,7 +1412,8 @@ init_card(struct l1oip *hc, int pri, int bundle)
bch->ch.nr = i + ch;
list_add(&bch->ch.list, &dch->dev.bchannels);
hc->chan[i + ch].bch = bch;
- set_channelmap(bch->nr, dch->dev.channelmap);
+ test_and_set_bit(bch->nr & 0x1f,
+ &dch->dev.channelmap[bch->nr >> 5]);
}
ret = mISDN_register_device(&dch->dev, hc->name);
if (ret)
diff --git a/trunk/drivers/isdn/mISDN/socket.c b/trunk/drivers/isdn/mISDN/socket.c
index e5a20f9542d1..4ba4cc364c9e 100644
--- a/trunk/drivers/isdn/mISDN/socket.c
+++ b/trunk/drivers/isdn/mISDN/socket.c
@@ -379,7 +379,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
di.Bprotocols = dev->Bprotocols | get_all_Bprotocols();
di.protocol = dev->D.protocol;
memcpy(di.channelmap, dev->channelmap,
- sizeof(di.channelmap));
+ MISDN_CHMAP_SIZE * 4);
di.nrbchan = dev->nrbchan;
strcpy(di.name, dev->name);
if (copy_to_user((void __user *)arg, &di, sizeof(di)))
@@ -637,7 +637,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
di.Bprotocols = dev->Bprotocols | get_all_Bprotocols();
di.protocol = dev->D.protocol;
memcpy(di.channelmap, dev->channelmap,
- sizeof(di.channelmap));
+ MISDN_CHMAP_SIZE * 4);
di.nrbchan = dev->nrbchan;
strcpy(di.name, dev->name);
if (copy_to_user((void __user *)arg, &di, sizeof(di)))
diff --git a/trunk/drivers/net/stnic.c b/trunk/drivers/net/stnic.c
index 2ed0bd596815..b65be5d70fec 100644
--- a/trunk/drivers/net/stnic.c
+++ b/trunk/drivers/net/stnic.c
@@ -19,7 +19,7 @@
#include
#include
-#include
+#include
#include
#ifdef CONFIG_SH_STANDARD_BIOS
#include
diff --git a/trunk/drivers/pcmcia/rsrc_nonstatic.c b/trunk/drivers/pcmcia/rsrc_nonstatic.c
index 203e579ebbd2..d0c1d63d1891 100644
--- a/trunk/drivers/pcmcia/rsrc_nonstatic.c
+++ b/trunk/drivers/pcmcia/rsrc_nonstatic.c
@@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res,
destroy_cis_cache(s);
}
s->cis_mem.res = NULL;
- if ((ret != 0) || (*count == 0))
+ if ((ret != 0) || (count == 0))
return 0;
return 1;
}
diff --git a/trunk/drivers/scsi/hptiop.c b/trunk/drivers/scsi/hptiop.c
index 74d12b58a263..da876d3924be 100644
--- a/trunk/drivers/scsi/hptiop.c
+++ b/trunk/drivers/scsi/hptiop.c
@@ -1249,13 +1249,6 @@ static struct pci_device_id hptiop_id_table[] = {
{ PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops },
{ PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops },
{ PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops },
- { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops },
{ PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops },
{ PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops },
{ PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops },
diff --git a/trunk/drivers/scsi/scsi_transport_spi.c b/trunk/drivers/scsi/scsi_transport_spi.c
index b29360ed0bdc..75a64a6cae8c 100644
--- a/trunk/drivers/scsi/scsi_transport_spi.c
+++ b/trunk/drivers/scsi/scsi_transport_spi.c
@@ -366,14 +366,12 @@ spi_transport_rd_attr(rti, "%d\n");
spi_transport_rd_attr(pcomp_en, "%d\n");
spi_transport_rd_attr(hold_mcs, "%d\n");
-/* we only care about the first child device that's a real SCSI device
- * so we return 1 to terminate the iteration when we find it */
+/* we only care about the first child device so we return 1 */
static int child_iter(struct device *dev, void *data)
{
- if (!scsi_is_sdev_device(dev))
- return 0;
+ struct scsi_device *sdev = to_scsi_device(dev);
- spi_dv_device(to_scsi_device(dev));
+ spi_dv_device(sdev);
return 1;
}
diff --git a/trunk/drivers/scsi/sd.c b/trunk/drivers/scsi/sd.c
index 8e08d51a0f05..e5e7d7856454 100644
--- a/trunk/drivers/scsi/sd.c
+++ b/trunk/drivers/scsi/sd.c
@@ -375,6 +375,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
struct gendisk *disk = rq->rq_disk;
struct scsi_disk *sdkp;
sector_t block = rq->sector;
+ sector_t threshold;
unsigned int this_count = rq->nr_sectors;
unsigned int timeout = sdp->timeout;
int ret;
@@ -422,13 +423,21 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
}
/*
- * Some devices (some sdcards for one) don't like it if the
- * last sector gets read in a larger then 1 sector read.
+ * Some SD card readers can't handle multi-sector accesses which touch
+ * the last one or two hardware sectors. Split accesses as needed.
*/
- if (unlikely(sdp->last_sector_bug &&
- rq->nr_sectors > sdp->sector_size / 512 &&
- block + this_count == get_capacity(disk)))
- this_count -= sdp->sector_size / 512;
+ threshold = get_capacity(disk) - SD_LAST_BUGGY_SECTORS *
+ (sdp->sector_size / 512);
+
+ if (unlikely(sdp->last_sector_bug && block + this_count > threshold)) {
+ if (block < threshold) {
+ /* Access up to the threshold but not beyond */
+ this_count = threshold - block;
+ } else {
+ /* Access only a single hardware sector */
+ this_count = sdp->sector_size / 512;
+ }
+ }
SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n",
(unsigned long long)block));
diff --git a/trunk/drivers/scsi/sd.h b/trunk/drivers/scsi/sd.h
index 550b2f70a1f8..95b9f06534d5 100644
--- a/trunk/drivers/scsi/sd.h
+++ b/trunk/drivers/scsi/sd.h
@@ -31,6 +31,12 @@
*/
#define SD_BUF_SIZE 512
+/*
+ * Number of sectors at the end of the device to avoid multi-sector
+ * accesses to in the case of last_sector_bug
+ */
+#define SD_LAST_BUGGY_SECTORS 8
+
struct scsi_disk {
struct scsi_driver *driver; /* always &sd_template */
struct scsi_device *device;
diff --git a/trunk/drivers/scsi/ses.c b/trunk/drivers/scsi/ses.c
index 1bcf3c33d7ff..0fe031f003e7 100644
--- a/trunk/drivers/scsi/ses.c
+++ b/trunk/drivers/scsi/ses.c
@@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev,
return 0;
}
-#define VPD_INQUIRY_SIZE 36
+#define VPD_INQUIRY_SIZE 512
static void ses_match_to_enclosure(struct enclosure_device *edev,
struct scsi_device *sdev)
{
unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL);
unsigned char *desc;
- u16 vpd_len;
+ int len;
struct efd efd = {
.addr = 0,
};
@@ -372,19 +372,9 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,
VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES))
goto free;
- vpd_len = (buf[2] << 8) + buf[3];
- kfree(buf);
- buf = kmalloc(vpd_len, GFP_KERNEL);
- if (!buf)
- return;
- cmd[3] = vpd_len >> 8;
- cmd[4] = vpd_len & 0xff;
- if (scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf,
- vpd_len, NULL, SES_TIMEOUT, SES_RETRIES))
- goto free;
-
+ len = (buf[2] << 8) + buf[3];
desc = buf + 4;
- while (desc < buf + vpd_len) {
+ while (desc < buf + len) {
enum scsi_protocol proto = desc[0] >> 4;
u8 code_set = desc[0] & 0x0f;
u8 piv = desc[1] & 0x80;
diff --git a/trunk/drivers/serial/bfin_5xx.c b/trunk/drivers/serial/bfin_5xx.c
index efcd44344fb1..9d8543762a30 100644
--- a/trunk/drivers/serial/bfin_5xx.c
+++ b/trunk/drivers/serial/bfin_5xx.c
@@ -817,7 +817,7 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
if (line >= port->info->port.tty->driver->num)
return;
- switch (port->info->port.tty->termios->c_line) {
+ switch (port->info->port.tty->ldisc.num) {
case N_IRDA:
val = UART_GET_GCTL(&bfin_serial_ports[line]);
val |= (IREN | RPOLC);
diff --git a/trunk/drivers/serial/crisv10.c b/trunk/drivers/serial/crisv10.c
index bf94a770bb44..8249ac490559 100644
--- a/trunk/drivers/serial/crisv10.c
+++ b/trunk/drivers/serial/crisv10.c
@@ -234,7 +234,7 @@ unsigned long r_alt_ser_baudrate_shadow = 0;
static struct e100_serial rs_table[] = {
{ .baud = DEF_BAUD,
- .ioport = (unsigned char *)R_SERIAL0_CTRL,
+ .port = (unsigned char *)R_SERIAL0_CTRL,
.irq = 1U << 12, /* uses DMA 6 and 7 */
.oclrintradr = R_DMA_CH6_CLR_INTR,
.ofirstadr = R_DMA_CH6_FIRST,
@@ -288,7 +288,7 @@ static struct e100_serial rs_table[] = {
}, /* ttyS0 */
#ifndef CONFIG_SVINTO_SIM
{ .baud = DEF_BAUD,
- .ioport = (unsigned char *)R_SERIAL1_CTRL,
+ .port = (unsigned char *)R_SERIAL1_CTRL,
.irq = 1U << 16, /* uses DMA 8 and 9 */
.oclrintradr = R_DMA_CH8_CLR_INTR,
.ofirstadr = R_DMA_CH8_FIRST,
@@ -344,7 +344,7 @@ static struct e100_serial rs_table[] = {
}, /* ttyS1 */
{ .baud = DEF_BAUD,
- .ioport = (unsigned char *)R_SERIAL2_CTRL,
+ .port = (unsigned char *)R_SERIAL2_CTRL,
.irq = 1U << 4, /* uses DMA 2 and 3 */
.oclrintradr = R_DMA_CH2_CLR_INTR,
.ofirstadr = R_DMA_CH2_FIRST,
@@ -398,7 +398,7 @@ static struct e100_serial rs_table[] = {
}, /* ttyS2 */
{ .baud = DEF_BAUD,
- .ioport = (unsigned char *)R_SERIAL3_CTRL,
+ .port = (unsigned char *)R_SERIAL3_CTRL,
.irq = 1U << 8, /* uses DMA 4 and 5 */
.oclrintradr = R_DMA_CH4_CLR_INTR,
.ofirstadr = R_DMA_CH4_FIRST,
@@ -939,7 +939,7 @@ static const struct control_pins e100_modem_pins[NR_PORTS] =
/* Output */
#define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK)
/* Input */
-#define E100_CTS_GET(info) ((info)->ioport[REG_STATUS] & E100_CTS_MASK)
+#define E100_CTS_GET(info) ((info)->port[REG_STATUS] & E100_CTS_MASK)
/* These are typically PA or PB and 0 means 0V, 1 means 3.3V */
/* Is an output */
@@ -1092,7 +1092,7 @@ e100_rts(struct e100_serial *info, int set)
local_irq_save(flags);
info->rx_ctrl &= ~E100_RTS_MASK;
info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */
- info->ioport[REG_REC_CTRL] = info->rx_ctrl;
+ info->port[REG_REC_CTRL] = info->rx_ctrl;
local_irq_restore(flags);
#ifdef SERIAL_DEBUG_IO
printk("ser%i rts %i\n", info->line, set);
@@ -1142,7 +1142,7 @@ e100_disable_rx(struct e100_serial *info)
{
#ifndef CONFIG_SVINTO_SIM
/* disable the receiver */
- info->ioport[REG_REC_CTRL] =
+ info->port[REG_REC_CTRL] =
(info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable));
#endif
}
@@ -1152,7 +1152,7 @@ e100_enable_rx(struct e100_serial *info)
{
#ifndef CONFIG_SVINTO_SIM
/* enable the receiver */
- info->ioport[REG_REC_CTRL] =
+ info->port[REG_REC_CTRL] =
(info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable));
#endif
}
@@ -1490,7 +1490,7 @@ rs_stop(struct tty_struct *tty)
xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable);
}
- *((unsigned long *)&info->ioport[REG_XOFF]) = xoff;
+ *((unsigned long *)&info->port[REG_XOFF]) = xoff;
local_irq_restore(flags);
}
}
@@ -1513,7 +1513,7 @@ rs_start(struct tty_struct *tty)
xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable);
}
- *((unsigned long *)&info->ioport[REG_XOFF]) = xoff;
+ *((unsigned long *)&info->port[REG_XOFF]) = xoff;
if (!info->uses_dma_out &&
info->xmit.head != info->xmit.tail && info->xmit.buf)
e100_enable_serial_tx_ready_irq(info);
@@ -1888,7 +1888,7 @@ static void receive_chars_dma(struct e100_serial *info)
handle_all_descr_data(info);
/* Read the status register to detect errors */
- rstat = info->ioport[REG_STATUS];
+ rstat = info->port[REG_STATUS];
if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) {
DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat));
}
@@ -1897,7 +1897,7 @@ static void receive_chars_dma(struct e100_serial *info)
/* If we got an error, we must reset it by reading the
* data_in field
*/
- unsigned char data = info->ioport[REG_DATA];
+ unsigned char data = info->port[REG_DATA];
PROCSTAT(ser_stat[info->line].errors_cnt++);
DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n",
@@ -2077,7 +2077,7 @@ static int force_eop_if_needed(struct e100_serial *info)
/* We check data_avail bit to determine if data has
* arrived since last time
*/
- unsigned char rstat = info->ioport[REG_STATUS];
+ unsigned char rstat = info->port[REG_STATUS];
/* error or datavail? */
if (rstat & SER_ERROR_MASK) {
@@ -2096,7 +2096,7 @@ static int force_eop_if_needed(struct e100_serial *info)
TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n",
rstat | (info->line << 8)));
/* Read data to clear status flags */
- (void)info->ioport[REG_DATA];
+ (void)info->port[REG_DATA];
info->forced_eop = 0;
START_FLUSH_FAST_TIMER(info, "magic");
@@ -2296,7 +2296,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info)
}
/* Read data and status at the same time */
- data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]);
+ data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]);
more_data:
if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) {
DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0));
@@ -2391,7 +2391,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info)
info->icount.rx++;
- data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]);
+ data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]);
if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) {
DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read));
goto more_data;
@@ -2413,7 +2413,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info)
return handle_ser_rx_interrupt_no_dma(info);
}
/* DMA is used */
- rstat = info->ioport[REG_STATUS];
+ rstat = info->port[REG_STATUS];
if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) {
DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0));
}
@@ -2426,7 +2426,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info)
/* If we got an error, we must reset it by reading the
* data_in field
*/
- data = info->ioport[REG_DATA];
+ data = info->port[REG_DATA];
DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data));
DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat));
if (!data && (rstat & SER_FRAMING_ERR_MASK)) {
@@ -2528,10 +2528,10 @@ static void handle_ser_tx_interrupt(struct e100_serial *info)
unsigned char rstat;
DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char));
local_irq_save(flags);
- rstat = info->ioport[REG_STATUS];
+ rstat = info->port[REG_STATUS];
DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat));
- info->ioport[REG_TR_DATA] = info->x_char;
+ info->port[REG_TR_DATA] = info->x_char;
info->icount.tx++;
info->x_char = 0;
/* We must enable since it is disabled in ser_interrupt */
@@ -2545,7 +2545,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info)
/* We only use normal tx interrupt when sending x_char */
DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0));
local_irq_save(flags);
- rstat = info->ioport[REG_STATUS];
+ rstat = info->port[REG_STATUS];
DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat));
e100_disable_serial_tx_ready_irq(info);
if (info->port.tty->stopped)
@@ -2573,7 +2573,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info)
DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail]));
/* Send a byte, rs485 timing is critical so turn of ints */
local_irq_save(flags);
- info->ioport[REG_TR_DATA] = info->xmit.buf[info->xmit.tail];
+ info->port[REG_TR_DATA] = info->xmit.buf[info->xmit.tail];
info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1);
info->icount.tx++;
if (info->xmit.head == info->xmit.tail) {
@@ -2848,7 +2848,7 @@ startup(struct e100_serial * info)
/* dummy read to reset any serial errors */
- (void)info->ioport[REG_DATA];
+ (void)info->port[REG_DATA];
/* enable the interrupts */
if (info->uses_dma_out)
@@ -2897,7 +2897,7 @@ shutdown(struct e100_serial * info)
/* shut down the transmitter and receiver */
DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line));
e100_disable_rx(info);
- info->ioport[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40);
+ info->port[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40);
/* disable interrupts, reset dma channels */
if (info->uses_dma_in) {
@@ -2968,7 +2968,7 @@ change_speed(struct e100_serial *info)
if (!info->port.tty || !info->port.tty->termios)
return;
- if (!info->ioport)
+ if (!info->port)
return;
cflag = info->port.tty->termios->c_cflag;
@@ -3037,7 +3037,7 @@ change_speed(struct e100_serial *info)
info->baud = cflag_to_baud(cflag);
#ifndef CONFIG_SVINTO_SIM
- info->ioport[REG_BAUD] = cflag_to_etrax_baud(cflag);
+ info->port[REG_BAUD] = cflag_to_etrax_baud(cflag);
#endif /* CONFIG_SVINTO_SIM */
}
@@ -3097,8 +3097,8 @@ change_speed(struct e100_serial *info)
/* actually write the control regs to the hardware */
- info->ioport[REG_TR_CTRL] = info->tx_ctrl;
- info->ioport[REG_REC_CTRL] = info->rx_ctrl;
+ info->port[REG_TR_CTRL] = info->tx_ctrl;
+ info->port[REG_REC_CTRL] = info->rx_ctrl;
xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty));
xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable);
if (info->port.tty->termios->c_iflag & IXON ) {
@@ -3107,7 +3107,7 @@ change_speed(struct e100_serial *info)
xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable);
}
- *((unsigned long *)&info->ioport[REG_XOFF]) = xoff;
+ *((unsigned long *)&info->port[REG_XOFF]) = xoff;
local_irq_restore(flags);
#endif /* !CONFIG_SVINTO_SIM */
@@ -3156,7 +3156,7 @@ static int rs_raw_write(struct tty_struct *tty,
#ifdef SERIAL_DEBUG_DATA
if (info->line == SERIAL_DEBUG_LINE)
printk("rs_raw_write (%d), status %d\n",
- count, info->ioport[REG_STATUS]);
+ count, info->port[REG_STATUS]);
#endif
#ifdef CONFIG_SVINTO_SIM
@@ -3427,7 +3427,7 @@ get_serial_info(struct e100_serial * info,
memset(&tmp, 0, sizeof(tmp));
tmp.type = info->type;
tmp.line = info->line;
- tmp.port = (int)info->ioport;
+ tmp.port = (int)info->port;
tmp.irq = info->irq;
tmp.flags = info->flags;
tmp.baud_base = info->baud_base;
@@ -3557,14 +3557,14 @@ char *get_control_state_str(int MLines, char *s)
}
#endif
-static int
+static void
rs_break(struct tty_struct *tty, int break_state)
{
struct e100_serial *info = (struct e100_serial *)tty->driver_data;
unsigned long flags;
- if (!info->ioport)
- return -EIO;
+ if (!info->port)
+ return;
local_irq_save(flags);
if (break_state == -1) {
@@ -3575,9 +3575,8 @@ rs_break(struct tty_struct *tty, int break_state)
/* Set bit 7 (txd) and 6 (tr_enable) */
info->tx_ctrl |= (0x80 | 0x40);
}
- info->ioport[REG_TR_CTRL] = info->tx_ctrl;
+ info->port[REG_TR_CTRL] = info->tx_ctrl;
local_irq_restore(flags);
- return 0;
}
static int
@@ -4232,9 +4231,9 @@ static int line_info(char *buf, struct e100_serial *info)
unsigned long tmp;
ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d",
- info->line, (unsigned long)info->ioport, info->irq);
+ info->line, (unsigned long)info->port, info->irq);
- if (!info->ioport || (info->type == PORT_UNKNOWN)) {
+ if (!info->port || (info->type == PORT_UNKNOWN)) {
ret += sprintf(buf+ret, "\n");
return ret;
}
@@ -4282,7 +4281,7 @@ static int line_info(char *buf, struct e100_serial *info)
}
{
- unsigned char rstat = info->ioport[REG_STATUS];
+ unsigned char rstat = info->port[REG_STATUS];
if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) )
ret += sprintf(buf+ret, " xoff_detect:1");
}
@@ -4503,7 +4502,7 @@ rs_init(void)
if (info->enabled) {
printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n",
- serial_driver->name, info->line, (unsigned int)info->ioport);
+ serial_driver->name, info->line, (unsigned int)info->port);
}
}
#ifdef CONFIG_ETRAX_FAST_TIMER
diff --git a/trunk/drivers/serial/crisv10.h b/trunk/drivers/serial/crisv10.h
index e3c5c8c3c09b..ccd0f32b7372 100644
--- a/trunk/drivers/serial/crisv10.h
+++ b/trunk/drivers/serial/crisv10.h
@@ -36,9 +36,8 @@ struct etrax_recv_buffer {
};
struct e100_serial {
- struct tty_port port;
int baud;
- volatile u8 *ioport; /* R_SERIALx_CTRL */
+ volatile u8 *port; /* R_SERIALx_CTRL */
u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */
/* Output registers */
diff --git a/trunk/drivers/sh/maple/maple.c b/trunk/drivers/sh/maple/maple.c
index d1812d32f47d..be97789fa5fd 100644
--- a/trunk/drivers/sh/maple/maple.c
+++ b/trunk/drivers/sh/maple/maple.c
@@ -2,7 +2,6 @@
* Core maple bus functionality
*
* Copyright (C) 2007, 2008 Adrian McMenamin
- * Copyright (C) 2001 - 2008 Paul Mundt
*
* Based on 2.4 code by:
*
@@ -32,7 +31,7 @@
#include
#include
-MODULE_AUTHOR("Yaegashi Takeshi, Paul Mundt, M. R. Brown, Adrian McMenamin");
+MODULE_AUTHOR("Yaegshi Takeshi, Paul Mundt, M.R. Brown, Adrian McMenamin");
MODULE_DESCRIPTION("Maple bus driver for Dreamcast");
MODULE_LICENSE("GPL v2");
MODULE_SUPPORTED_DEVICE("{{SEGA, Dreamcast/Maple}}");
@@ -66,36 +65,19 @@ static bool checked[4];
static struct maple_device *baseunits[4];
/**
- * maple_driver_register - register a maple driver
- * @drv: maple driver to be registered.
- *
- * Registers the passed in @drv, while updating the bus type.
- * Devices with matching function IDs will be automatically probed.
+ * maple_driver_register - register a device driver
+ * automatically makes the driver bus a maple bus
+ * @drv: the driver to be registered
*/
-int maple_driver_register(struct maple_driver *drv)
+int maple_driver_register(struct device_driver *drv)
{
if (!drv)
return -EINVAL;
-
- drv->drv.bus = &maple_bus_type;
-
- return driver_register(&drv->drv);
+ drv->bus = &maple_bus_type;
+ return driver_register(drv);
}
EXPORT_SYMBOL_GPL(maple_driver_register);
-/**
- * maple_driver_unregister - unregister a maple driver.
- * @drv: maple driver to unregister.
- *
- * Cleans up after maple_driver_register(). To be invoked in the exit
- * path of any module drivers.
- */
-void maple_driver_unregister(struct maple_driver *drv)
-{
- driver_unregister(&drv->drv);
-}
-EXPORT_SYMBOL_GPL(maple_driver_unregister);
-
/* set hardware registers to enable next round of dma */
static void maplebus_dma_reset(void)
{
@@ -147,13 +129,13 @@ static void maple_release_device(struct device *dev)
kfree(mdev);
}
-/**
+/*
* maple_add_packet - add a single instruction to the queue
- * @mdev: maple device
- * @function: function on device being queried
- * @command: maple command to add
- * @length: length of command string (in 32 bit words)
- * @data: remainder of command string
+ * @mdev - maple device
+ * @function - function on device being queried
+ * @command - maple command to add
+ * @length - length of command string (in 32 bit words)
+ * @data - remainder of command string
*/
int maple_add_packet(struct maple_device *mdev, u32 function, u32 command,
size_t length, void *data)
@@ -194,15 +176,14 @@ int maple_add_packet(struct maple_device *mdev, u32 function, u32 command,
}
EXPORT_SYMBOL_GPL(maple_add_packet);
-/**
+/*
* maple_add_packet_sleeps - add a single instruction to the queue
- * @mdev: maple device
- * @function: function on device being queried
- * @command: maple command to add
- * @length: length of command string (in 32 bit words)
- * @data: remainder of command string
- *
- * Same as maple_add_packet(), but waits for the lock to become free.
+ * - waits for lock to be free
+ * @mdev - maple device
+ * @function - function on device being queried
+ * @command - maple command to add
+ * @length - length of command string (in 32 bit words)
+ * @data - remainder of command string
*/
int maple_add_packet_sleeps(struct maple_device *mdev, u32 function,
u32 command, size_t length, void *data)
@@ -743,9 +724,11 @@ static int maple_get_dma_buffer(void)
static int match_maple_bus_driver(struct device *devptr,
struct device_driver *drvptr)
{
- struct maple_driver *maple_drv = to_maple_driver(drvptr);
- struct maple_device *maple_dev = to_maple_dev(devptr);
+ struct maple_driver *maple_drv;
+ struct maple_device *maple_dev;
+ maple_drv = container_of(drvptr, struct maple_driver, drv);
+ maple_dev = container_of(devptr, struct maple_device, dev);
/* Trap empty port case */
if (maple_dev->devinfo.function == 0xFFFFFFFF)
return 0;
diff --git a/trunk/drivers/spi/atmel_spi.c b/trunk/drivers/spi/atmel_spi.c
index 95190c619c10..0c7165660853 100644
--- a/trunk/drivers/spi/atmel_spi.c
+++ b/trunk/drivers/spi/atmel_spi.c
@@ -184,8 +184,7 @@ static void atmel_spi_next_xfer(struct spi_master *master,
{
struct atmel_spi *as = spi_master_get_devdata(master);
struct spi_transfer *xfer;
- u32 len, remaining;
- u32 ieval;
+ u32 len, remaining, total;
dma_addr_t tx_dma, rx_dma;
if (!as->current_transfer)
@@ -198,8 +197,6 @@ static void atmel_spi_next_xfer(struct spi_master *master,
xfer = NULL;
if (xfer) {
- spi_writel(as, PTCR, SPI_BIT(RXTDIS) | SPI_BIT(TXTDIS));
-
len = xfer->len;
atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len);
remaining = xfer->len - len;
@@ -237,8 +234,6 @@ static void atmel_spi_next_xfer(struct spi_master *master,
as->next_transfer = xfer;
if (xfer) {
- u32 total;
-
total = len;
atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len);
as->next_remaining_bytes = total - len;
@@ -255,11 +250,9 @@ static void atmel_spi_next_xfer(struct spi_master *master,
" next xfer %p: len %u tx %p/%08x rx %p/%08x\n",
xfer, xfer->len, xfer->tx_buf, xfer->tx_dma,
xfer->rx_buf, xfer->rx_dma);
- ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES);
} else {
spi_writel(as, RNCR, 0);
spi_writel(as, TNCR, 0);
- ieval = SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) | SPI_BIT(OVRES);
}
/* REVISIT: We're waiting for ENDRX before we start the next
@@ -272,7 +265,7 @@ static void atmel_spi_next_xfer(struct spi_master *master,
*
* It should be doable, though. Just not now...
*/
- spi_writel(as, IER, ieval);
+ spi_writel(as, IER, SPI_BIT(ENDRX) | SPI_BIT(OVRES));
spi_writel(as, PTCR, SPI_BIT(TXTEN) | SPI_BIT(RXTEN));
}
@@ -403,7 +396,7 @@ atmel_spi_interrupt(int irq, void *dev_id)
ret = IRQ_HANDLED;
- spi_writel(as, IDR, (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX)
+ spi_writel(as, IDR, (SPI_BIT(ENDTX) | SPI_BIT(ENDRX)
| SPI_BIT(OVRES)));
/*
@@ -425,7 +418,7 @@ atmel_spi_interrupt(int irq, void *dev_id)
if (xfer->delay_usecs)
udelay(xfer->delay_usecs);
- dev_warn(master->dev.parent, "overrun (%u/%u remaining)\n",
+ dev_warn(master->dev.parent, "fifo overrun (%u/%u remaining)\n",
spi_readl(as, TCR), spi_readl(as, RCR));
/*
@@ -449,7 +442,7 @@ atmel_spi_interrupt(int irq, void *dev_id)
spi_readl(as, SR);
atmel_spi_msg_done(master, as, msg, -EIO, 0);
- } else if (pending & (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX))) {
+ } else if (pending & SPI_BIT(ENDRX)) {
ret = IRQ_HANDLED;
spi_writel(as, IDR, pending);
diff --git a/trunk/drivers/spi/spi_s3c24xx.c b/trunk/drivers/spi/spi_s3c24xx.c
index 21661c7959c8..1c643c9e1f15 100644
--- a/trunk/drivers/spi/spi_s3c24xx.c
+++ b/trunk/drivers/spi/spi_s3c24xx.c
@@ -236,19 +236,6 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
return IRQ_HANDLED;
}
-static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw)
-{
- /* for the moment, permanently enable the clock */
-
- clk_enable(hw->clk);
-
- /* program defaults into the registers */
-
- writeb(0xff, hw->regs + S3C2410_SPPRE);
- writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
- writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
-}
-
static int __init s3c24xx_spi_probe(struct platform_device *pdev)
{
struct s3c2410_spi_info *pdata;
@@ -340,7 +327,15 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
goto err_no_clk;
}
- s3c24xx_spi_initialsetup(hw);
+ /* for the moment, permanently enable the clock */
+
+ clk_enable(hw->clk);
+
+ /* program defaults into the registers */
+
+ writeb(0xff, hw->regs + S3C2410_SPPRE);
+ writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
+ writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
/* setup any gpio we can */
@@ -420,7 +415,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
{
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
- s3c24xx_spi_initialsetup(hw);
+ clk_enable(hw->clk);
return 0;
}
diff --git a/trunk/drivers/watchdog/ar7_wdt.c b/trunk/drivers/watchdog/ar7_wdt.c
index ef7b0d67095e..2eb48c0df32c 100644
--- a/trunk/drivers/watchdog/ar7_wdt.c
+++ b/trunk/drivers/watchdog/ar7_wdt.c
@@ -69,8 +69,7 @@ struct ar7_wdt {
u32 prescale;
};
-static unsigned long wdt_is_open;
-static spinlock_t wdt_lock;
+static struct semaphore open_semaphore;
static unsigned expect_close;
/* XXX currently fixed, allows max margin ~68.72 secs */
@@ -155,10 +154,8 @@ static void ar7_wdt_update_margin(int new_margin)
u32 change;
change = new_margin * (ar7_vbus_freq() / prescale_value);
- if (change < 1)
- change = 1;
- if (change > 0xffff)
- change = 0xffff;
+ if (change < 1) change = 1;
+ if (change > 0xffff) change = 0xffff;
ar7_wdt_change(change);
margin = change * prescale_value / ar7_vbus_freq();
printk(KERN_INFO DRVNAME
@@ -182,7 +179,7 @@ static void ar7_wdt_disable_wdt(void)
static int ar7_wdt_open(struct inode *inode, struct file *file)
{
/* only allow one at a time */
- if (test_and_set_bit(0, &wdt_is_open))
+ if (down_trylock(&open_semaphore))
return -EBUSY;
ar7_wdt_enable_wdt();
expect_close = 0;
@@ -198,7 +195,9 @@ static int ar7_wdt_release(struct inode *inode, struct file *file)
"will not disable the watchdog timer\n");
else if (!nowayout)
ar7_wdt_disable_wdt();
- clear_bit(0, &wdt_is_open);
+
+ up(&open_semaphore);
+
return 0;
}
@@ -223,9 +222,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data,
if (len) {
size_t i;
- spin_lock(&wdt_lock);
ar7_wdt_kick(1);
- spin_unlock(&wdt_lock);
expect_close = 0;
for (i = 0; i < len; ++i) {
@@ -240,8 +237,8 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data,
return len;
}
-static long ar7_wdt_ioctl(struct file *file,
- unsigned int cmd, unsigned long arg)
+static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
{
static struct watchdog_info ident = {
.identity = LONGNAME,
@@ -272,10 +269,8 @@ static long ar7_wdt_ioctl(struct file *file,
if (new_margin < 1)
return -EINVAL;
- spin_lock(&wdt_lock);
ar7_wdt_update_margin(new_margin);
ar7_wdt_kick(1);
- spin_unlock(&wdt_lock);
case WDIOC_GETTIMEOUT:
if (put_user(margin, (int *)arg))
@@ -287,7 +282,7 @@ static long ar7_wdt_ioctl(struct file *file,
static const struct file_operations ar7_wdt_fops = {
.owner = THIS_MODULE,
.write = ar7_wdt_write,
- .unlocked_ioctl = ar7_wdt_ioctl,
+ .ioctl = ar7_wdt_ioctl,
.open = ar7_wdt_open,
.release = ar7_wdt_release,
};
@@ -302,8 +297,6 @@ static int __init ar7_wdt_init(void)
{
int rc;
- spin_lock_init(&wdt_lock);
-
ar7_wdt_get_regs();
if (!request_mem_region(ar7_regs_wdt, sizeof(struct ar7_wdt),
@@ -319,6 +312,8 @@ static int __init ar7_wdt_init(void)
ar7_wdt_prescale(prescale_value);
ar7_wdt_update_margin(margin);
+ sema_init(&open_semaphore, 1);
+
rc = register_reboot_notifier(&ar7_wdt_notifier);
if (rc) {
printk(KERN_ERR DRVNAME
diff --git a/trunk/drivers/watchdog/it8712f_wdt.c b/trunk/drivers/watchdog/it8712f_wdt.c
index 51bfd5721833..445b7e812112 100644
--- a/trunk/drivers/watchdog/it8712f_wdt.c
+++ b/trunk/drivers/watchdog/it8712f_wdt.c
@@ -30,8 +30,9 @@
#include
#include
#include
-#include
-#include
+
+#include
+#include
#define NAME "it8712f_wdt"
@@ -49,7 +50,7 @@ static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
-static unsigned long wdt_open;
+static struct semaphore it8712f_wdt_sem;
static unsigned expect_close;
static spinlock_t io_lock;
static unsigned char revision;
@@ -85,19 +86,22 @@ static unsigned short address;
#define WDT_OUT_PWROK 0x10
#define WDT_OUT_KRST 0x40
-static int superio_inb(int reg)
+static int
+superio_inb(int reg)
{
outb(reg, REG);
return inb(VAL);
}
-static void superio_outb(int val, int reg)
+static void
+superio_outb(int val, int reg)
{
outb(reg, REG);
outb(val, VAL);
}
-static int superio_inw(int reg)
+static int
+superio_inw(int reg)
{
int val;
outb(reg++, REG);
@@ -107,13 +111,15 @@ static int superio_inw(int reg)
return val;
}
-static inline void superio_select(int ldn)
+static inline void
+superio_select(int ldn)
{
outb(LDN, REG);
outb(ldn, VAL);
}
-static inline void superio_enter(void)
+static inline void
+superio_enter(void)
{
spin_lock(&io_lock);
outb(0x87, REG);
@@ -122,19 +128,22 @@ static inline void superio_enter(void)
outb(0x55, REG);
}
-static inline void superio_exit(void)
+static inline void
+superio_exit(void)
{
outb(0x02, REG);
outb(0x02, VAL);
spin_unlock(&io_lock);
}
-static inline void it8712f_wdt_ping(void)
+static inline void
+it8712f_wdt_ping(void)
{
inb(address);
}
-static void it8712f_wdt_update_margin(void)
+static void
+it8712f_wdt_update_margin(void)
{
int config = WDT_OUT_KRST | WDT_OUT_PWROK;
int units = margin;
@@ -156,7 +165,8 @@ static void it8712f_wdt_update_margin(void)
superio_outb(units, WDT_TIMEOUT);
}
-static int it8712f_wdt_get_status(void)
+static int
+it8712f_wdt_get_status(void)
{
if (superio_inb(WDT_CONTROL) & 0x01)
return WDIOF_CARDRESET;
@@ -164,7 +174,8 @@ static int it8712f_wdt_get_status(void)
return 0;
}
-static void it8712f_wdt_enable(void)
+static void
+it8712f_wdt_enable(void)
{
printk(KERN_DEBUG NAME ": enabling watchdog timer\n");
superio_enter();
@@ -179,7 +190,8 @@ static void it8712f_wdt_enable(void)
it8712f_wdt_ping();
}
-static void it8712f_wdt_disable(void)
+static void
+it8712f_wdt_disable(void)
{
printk(KERN_DEBUG NAME ": disabling watchdog timer\n");
@@ -195,7 +207,8 @@ static void it8712f_wdt_disable(void)
superio_exit();
}
-static int it8712f_wdt_notify(struct notifier_block *this,
+static int
+it8712f_wdt_notify(struct notifier_block *this,
unsigned long code, void *unused)
{
if (code == SYS_HALT || code == SYS_POWER_OFF)
@@ -209,8 +222,9 @@ static struct notifier_block it8712f_wdt_notifier = {
.notifier_call = it8712f_wdt_notify,
};
-static ssize_t it8712f_wdt_write(struct file *file, const char __user *data,
- size_t len, loff_t *ppos)
+static ssize_t
+it8712f_wdt_write(struct file *file, const char __user *data,
+ size_t len, loff_t *ppos)
{
/* check for a magic close character */
if (len) {
@@ -231,8 +245,9 @@ static ssize_t it8712f_wdt_write(struct file *file, const char __user *data,
return len;
}
-static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
+static int
+it8712f_wdt_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
@@ -287,16 +302,19 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,
}
}
-static int it8712f_wdt_open(struct inode *inode, struct file *file)
+static int
+it8712f_wdt_open(struct inode *inode, struct file *file)
{
/* only allow one at a time */
- if (test_and_set_bit(0, &wdt_open))
+ if (down_trylock(&it8712f_wdt_sem))
return -EBUSY;
it8712f_wdt_enable();
+
return nonseekable_open(inode, file);
}
-static int it8712f_wdt_release(struct inode *inode, struct file *file)
+static int
+it8712f_wdt_release(struct inode *inode, struct file *file)
{
if (expect_close != 42) {
printk(KERN_WARNING NAME
@@ -306,7 +324,7 @@ static int it8712f_wdt_release(struct inode *inode, struct file *file)
it8712f_wdt_disable();
}
expect_close = 0;
- clear_bit(0, &wdt_open);
+ up(&it8712f_wdt_sem);
return 0;
}
@@ -315,7 +333,7 @@ static const struct file_operations it8712f_wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = it8712f_wdt_write,
- .unlocked_ioctl = it8712f_wdt_ioctl,
+ .ioctl = it8712f_wdt_ioctl,
.open = it8712f_wdt_open,
.release = it8712f_wdt_release,
};
@@ -326,7 +344,8 @@ static struct miscdevice it8712f_wdt_miscdev = {
.fops = &it8712f_wdt_fops,
};
-static int __init it8712f_wdt_find(unsigned short *address)
+static int __init
+it8712f_wdt_find(unsigned short *address)
{
int err = -ENODEV;
int chip_type;
@@ -368,7 +387,8 @@ static int __init it8712f_wdt_find(unsigned short *address)
return err;
}
-static int __init it8712f_wdt_init(void)
+static int __init
+it8712f_wdt_init(void)
{
int err = 0;
@@ -384,6 +404,8 @@ static int __init it8712f_wdt_init(void)
it8712f_wdt_disable();
+ sema_init(&it8712f_wdt_sem, 1);
+
err = register_reboot_notifier(&it8712f_wdt_notifier);
if (err) {
printk(KERN_ERR NAME ": unable to register reboot notifier\n");
@@ -408,7 +430,8 @@ static int __init it8712f_wdt_init(void)
return err;
}
-static void __exit it8712f_wdt_exit(void)
+static void __exit
+it8712f_wdt_exit(void)
{
misc_deregister(&it8712f_wdt_miscdev);
unregister_reboot_notifier(&it8712f_wdt_notifier);
diff --git a/trunk/drivers/watchdog/s3c2410_wdt.c b/trunk/drivers/watchdog/s3c2410_wdt.c
index 97b4a2e8eb09..98532c0e0689 100644
--- a/trunk/drivers/watchdog/s3c2410_wdt.c
+++ b/trunk/drivers/watchdog/s3c2410_wdt.c
@@ -46,8 +46,9 @@
#include
#include
#include
-#include
-#include
+
+#include
+#include
#include
@@ -64,8 +65,8 @@
static int nowayout = WATCHDOG_NOWAYOUT;
static int tmr_margin = CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME;
static int tmr_atboot = CONFIG_S3C2410_WATCHDOG_ATBOOT;
-static int soft_noboot;
-static int debug;
+static int soft_noboot = 0;
+static int debug = 0;
module_param(tmr_margin, int, 0);
module_param(tmr_atboot, int, 0);
@@ -73,23 +74,24 @@ module_param(nowayout, int, 0);
module_param(soft_noboot, int, 0);
module_param(debug, int, 0);
-MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default="
- __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")");
-MODULE_PARM_DESC(tmr_atboot,
- "Watchdog is started at boot time if set to 1, default="
- __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT));
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
- __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")");
+
+MODULE_PARM_DESC(tmr_atboot, "Watchdog is started at boot time if set to 1, default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT));
+
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+
MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)");
+
MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)");
typedef enum close_state {
CLOSE_STATE_NOT,
- CLOSE_STATE_ALLOW = 0x4021
+ CLOSE_STATE_ALLOW=0x4021
} close_state_t;
-static unsigned long open_lock;
+static DECLARE_MUTEX(open_lock);
+
static struct device *wdt_dev; /* platform device attached to */
static struct resource *wdt_mem;
static struct resource *wdt_irq;
@@ -97,58 +99,38 @@ static struct clk *wdt_clock;
static void __iomem *wdt_base;
static unsigned int wdt_count;
static close_state_t allow_close;
-static DEFINE_SPINLOCK(wdt_lock);
/* watchdog control routines */
#define DBG(msg...) do { \
if (debug) \
printk(KERN_INFO msg); \
- } while (0)
+ } while(0)
/* functions */
-static void s3c2410wdt_keepalive(void)
+static int s3c2410wdt_keepalive(void)
{
- spin_lock(&wdt_lock);
writel(wdt_count, wdt_base + S3C2410_WTCNT);
- spin_unlock(&wdt_lock);
-}
-
-static void __s3c2410wdt_stop(void)
-{
- unsigned long wtcon;
-
- spin_lock(&wdt_lock);
- wtcon = readl(wdt_base + S3C2410_WTCON);
- wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN);
- writel(wtcon, wdt_base + S3C2410_WTCON);
- spin_unlock(&wdt_lock);
+ return 0;
}
-static void __s3c2410wdt_stop(void)
+static int s3c2410wdt_stop(void)
{
unsigned long wtcon;
wtcon = readl(wdt_base + S3C2410_WTCON);
wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN);
writel(wtcon, wdt_base + S3C2410_WTCON);
-}
-static void s3c2410wdt_stop(void)
-{
- spin_lock(&wdt_lock);
- __s3c2410wdt_stop();
- spin_unlock(&wdt_lock);
+ return 0;
}
-static void s3c2410wdt_start(void)
+static int s3c2410wdt_start(void)
{
unsigned long wtcon;
- spin_lock(&wdt_lock);
-
- __s3c2410wdt_stop();
+ s3c2410wdt_stop();
wtcon = readl(wdt_base + S3C2410_WTCON);
wtcon |= S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128;
@@ -167,7 +149,6 @@ static void s3c2410wdt_start(void)
writel(wdt_count, wdt_base + S3C2410_WTDAT);
writel(wdt_count, wdt_base + S3C2410_WTCNT);
writel(wtcon, wdt_base + S3C2410_WTCON);
- spin_unlock(&wdt_lock);
return 0;
}
@@ -230,7 +211,7 @@ static int s3c2410wdt_set_heartbeat(int timeout)
static int s3c2410wdt_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(0, &open_lock))
+ if(down_trylock(&open_lock))
return -EBUSY;
if (nowayout)
@@ -250,14 +231,15 @@ static int s3c2410wdt_release(struct inode *inode, struct file *file)
* Lock it in if it's a module and we set nowayout
*/
- if (allow_close == CLOSE_STATE_ALLOW)
+ if (allow_close == CLOSE_STATE_ALLOW) {
s3c2410wdt_stop();
- else {
+ } else {
dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n");
s3c2410wdt_keepalive();
}
+
allow_close = CLOSE_STATE_NOT;
- clear_bit(0, &open_lock);
+ up(&open_lock);
return 0;
}
@@ -267,7 +249,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
/*
* Refresh the timer.
*/
- if (len) {
+ if(len) {
if (!nowayout) {
size_t i;
@@ -283,6 +265,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
allow_close = CLOSE_STATE_ALLOW;
}
}
+
s3c2410wdt_keepalive();
}
return len;
@@ -290,41 +273,48 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
#define OPTIONS WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE
-static const struct watchdog_info s3c2410_wdt_ident = {
+static struct watchdog_info s3c2410_wdt_ident = {
.options = OPTIONS,
.firmware_version = 0,
.identity = "S3C2410 Watchdog",
};
-static long s3c2410wdt_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
+static int s3c2410wdt_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
int new_margin;
switch (cmd) {
- default:
- return -ENOTTY;
- case WDIOC_GETSUPPORT:
- return copy_to_user(argp, &s3c2410_wdt_ident,
- sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0;
- case WDIOC_GETSTATUS:
- case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
- case WDIOC_KEEPALIVE:
- s3c2410wdt_keepalive();
- return 0;
- case WDIOC_SETTIMEOUT:
- if (get_user(new_margin, p))
- return -EFAULT;
- if (s3c2410wdt_set_heartbeat(new_margin))
- return -EINVAL;
- s3c2410wdt_keepalive();
- return put_user(tmr_margin, p);
- case WDIOC_GETTIMEOUT:
- return put_user(tmr_margin, p);
+ default:
+ return -ENOTTY;
+
+ case WDIOC_GETSUPPORT:
+ return copy_to_user(argp, &s3c2410_wdt_ident,
+ sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0;
+
+ case WDIOC_GETSTATUS:
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(0, p);
+
+ case WDIOC_KEEPALIVE:
+ s3c2410wdt_keepalive();
+ return 0;
+
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_margin, p))
+ return -EFAULT;
+
+ if (s3c2410wdt_set_heartbeat(new_margin))
+ return -EINVAL;
+
+ s3c2410wdt_keepalive();
+ return put_user(tmr_margin, p);
+
+ case WDIOC_GETTIMEOUT:
+ return put_user(tmr_margin, p);
}
}
@@ -334,7 +324,7 @@ static const struct file_operations s3c2410wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = s3c2410wdt_write,
- .unlocked_ioctl = s3c2410wdt_ioctl,
+ .ioctl = s3c2410wdt_ioctl,
.open = s3c2410wdt_open,
.release = s3c2410wdt_release,
};
@@ -421,15 +411,14 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
* not, try the default value */
if (s3c2410wdt_set_heartbeat(tmr_margin)) {
- started = s3c2410wdt_set_heartbeat(
- CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME);
+ started = s3c2410wdt_set_heartbeat(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME);
- if (started == 0)
- dev_info(dev,
- "tmr_margin value out of range, default %d used\n",
+ if (started == 0) {
+ dev_info(dev,"tmr_margin value out of range, default %d used\n",
CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME);
- else
+ } else {
dev_info(dev, "default timer value is out of range, cannot start\n");
+ }
}
ret = misc_register(&s3c2410wdt_miscdev);
@@ -458,7 +447,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
(wtcon & S3C2410_WTCON_ENABLE) ? "" : "in",
(wtcon & S3C2410_WTCON_RSTEN) ? "" : "dis",
(wtcon & S3C2410_WTCON_INTEN) ? "" : "en");
-
+
return 0;
err_clk:
@@ -498,7 +487,7 @@ static int s3c2410wdt_remove(struct platform_device *dev)
static void s3c2410wdt_shutdown(struct platform_device *dev)
{
- s3c2410wdt_stop();
+ s3c2410wdt_stop();
}
#ifdef CONFIG_PM
@@ -551,8 +540,7 @@ static struct platform_driver s3c2410wdt_driver = {
};
-static char banner[] __initdata =
- KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n";
+static char banner[] __initdata = KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n";
static int __init watchdog_init(void)
{
diff --git a/trunk/drivers/watchdog/sc1200wdt.c b/trunk/drivers/watchdog/sc1200wdt.c
index 621ebad56d86..35cddff7020f 100644
--- a/trunk/drivers/watchdog/sc1200wdt.c
+++ b/trunk/drivers/watchdog/sc1200wdt.c
@@ -15,18 +15,14 @@
*
* Changelog:
* 20020220 Zwane Mwaikambo Code based on datasheet, no hardware.
- * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik
- * and Alan Cox.
+ * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik and Alan Cox.
* 20020222 Zwane Mwaikambo Added probing.
* 20020225 Zwane Mwaikambo Added ISAPNP support.
* 20020412 Rob Radez Broke out start/stop functions
- * Return proper status instead of
- * temperature warning
- * Add WDIOC_GETBOOTSTATUS and
- * WDIOC_SETOPTIONS ioctls
+ * Return proper status instead of temperature warning
+ * Add WDIOC_GETBOOTSTATUS and WDIOC_SETOPTIONS ioctls
* Fix CONFIG_WATCHDOG_NOWAYOUT
- * 20020530 Joel Becker Add Matt Domsch's nowayout module
- * option
+ * 20020530 Joel Becker Add Matt Domsch's nowayout module option
* 20030116 Adam Belay Updated to the latest pnp code
*
*/
@@ -43,8 +39,9 @@
#include
#include
#include
-#include
-#include
+
+#include
+#include
#define SC1200_MODULE_VER "build 20020303"
#define SC1200_MODULE_NAME "sc1200wdt"
@@ -75,7 +72,7 @@ static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER;
static int timeout = 1;
static int io = -1;
static int io_len = 2; /* for non plug and play */
-static unsigned long open_flag;
+static struct semaphore open_sem;
static char expect_close;
static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */
@@ -84,8 +81,7 @@ static int isapnp = 1;
static struct pnp_dev *wdt_dev;
module_param(isapnp, int, 0);
-MODULE_PARM_DESC(isapnp,
- "When set to 0 driver ISA PnP support will be disabled");
+MODULE_PARM_DESC(isapnp, "When set to 0 driver ISA PnP support will be disabled");
#endif
module_param(io, int, 0);
@@ -95,40 +91,26 @@ MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1");
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout,
- "Watchdog cannot be stopped once started (default="
- __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
/* Read from Data Register */
-static inline void __sc1200wdt_read_data(unsigned char index,
- unsigned char *data)
+static inline void sc1200wdt_read_data(unsigned char index, unsigned char *data)
{
+ spin_lock(&sc1200wdt_lock);
outb_p(index, PMIR);
*data = inb(PMDR);
-}
-
-static void sc1200wdt_read_data(unsigned char index, unsigned char *data)
-{
- spin_lock(&sc1200wdt_lock);
- __sc1200wdt_read_data(index, data);
spin_unlock(&sc1200wdt_lock);
}
+
/* Write to Data Register */
-static inline void __sc1200wdt_write_data(unsigned char index,
- unsigned char data)
+static inline void sc1200wdt_write_data(unsigned char index, unsigned char data)
{
+ spin_lock(&sc1200wdt_lock);
outb_p(index, PMIR);
outb(data, PMDR);
-}
-
-static inline void sc1200wdt_write_data(unsigned char index,
- unsigned char data)
-{
- spin_lock(&sc1200wdt_lock);
- __sc1200wdt_write_data(index, data);
spin_unlock(&sc1200wdt_lock);
}
@@ -136,23 +118,22 @@ static inline void sc1200wdt_write_data(unsigned char index,
static void sc1200wdt_start(void)
{
unsigned char reg;
- spin_lock(&sc1200wdt_lock);
- __sc1200wdt_read_data(WDCF, ®);
+ sc1200wdt_read_data(WDCF, ®);
/* assert WDO when any of the following interrupts are triggered too */
reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ);
- __sc1200wdt_write_data(WDCF, reg);
+ sc1200wdt_write_data(WDCF, reg);
/* set the timeout and get the ball rolling */
- __sc1200wdt_write_data(WDTO, timeout);
-
- spin_unlock(&sc1200wdt_lock);
+ sc1200wdt_write_data(WDTO, timeout);
}
+
static void sc1200wdt_stop(void)
{
sc1200wdt_write_data(WDTO, 0);
}
+
/* This returns the status of the WDO signal, inactive high. */
static inline int sc1200wdt_status(void)
{
@@ -163,13 +144,14 @@ static inline int sc1200wdt_status(void)
* KEEPALIVEPING which is a bit of a kludge because there's nothing
* else for enabled/disabled status
*/
- return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING;
+ return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING; /* bits 1 - 7 are undefined */
}
+
static int sc1200wdt_open(struct inode *inode, struct file *file)
{
/* allow one at a time */
- if (test_and_set_bit(0, &open_flag))
+ if (down_trylock(&open_sem))
return -EBUSY;
if (timeout > MAX_TIMEOUT)
@@ -182,71 +164,71 @@ static int sc1200wdt_open(struct inode *inode, struct file *file)
}
-static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
+static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{
int new_timeout;
void __user *argp = (void __user *)arg;
int __user *p = argp;
- static const struct watchdog_info ident = {
- .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
- WDIOF_MAGICCLOSE,
+ static struct watchdog_info ident = {
+ .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
.firmware_version = 0,
.identity = "PC87307/PC97307",
};
switch (cmd) {
+ default:
+ return -ENOTTY;
- case WDIOC_GETSUPPORT:
- if (copy_to_user(argp, &ident, sizeof ident))
- return -EFAULT;
- return 0;
+ case WDIOC_GETSUPPORT:
+ if (copy_to_user(argp, &ident, sizeof ident))
+ return -EFAULT;
+ return 0;
- case WDIOC_GETSTATUS:
- return put_user(sc1200wdt_status(), p);
+ case WDIOC_GETSTATUS:
+ return put_user(sc1200wdt_status(), p);
- case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(0, p);
- case WDIOC_KEEPALIVE:
- sc1200wdt_write_data(WDTO, timeout);
- return 0;
-
- case WDIOC_SETTIMEOUT:
- if (get_user(new_timeout, p))
- return -EFAULT;
- /* the API states this is given in secs */
- new_timeout /= 60;
- if (new_timeout < 0 || new_timeout > MAX_TIMEOUT)
- return -EINVAL;
- timeout = new_timeout;
- sc1200wdt_write_data(WDTO, timeout);
- /* fall through and return the new timeout */
+ case WDIOC_KEEPALIVE:
+ sc1200wdt_write_data(WDTO, timeout);
+ return 0;
- case WDIOC_GETTIMEOUT:
- return put_user(timeout * 60, p);
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_timeout, p))
+ return -EFAULT;
- case WDIOC_SETOPTIONS:
- {
- int options, retval = -EINVAL;
+ /* the API states this is given in secs */
+ new_timeout /= 60;
+ if (new_timeout < 0 || new_timeout > MAX_TIMEOUT)
+ return -EINVAL;
- if (get_user(options, p))
- return -EFAULT;
+ timeout = new_timeout;
+ sc1200wdt_write_data(WDTO, timeout);
+ /* fall through and return the new timeout */
- if (options & WDIOS_DISABLECARD) {
- sc1200wdt_stop();
- retval = 0;
- }
+ case WDIOC_GETTIMEOUT:
+ return put_user(timeout * 60, p);
- if (options & WDIOS_ENABLECARD) {
- sc1200wdt_start();
- retval = 0;
- }
+ case WDIOC_SETOPTIONS:
+ {
+ int options, retval = -EINVAL;
- return retval;
- }
- default:
- return -ENOTTY;
+ if (get_user(options, p))
+ return -EFAULT;
+
+ if (options & WDIOS_DISABLECARD) {
+ sc1200wdt_stop();
+ retval = 0;
+ }
+
+ if (options & WDIOS_ENABLECARD) {
+ sc1200wdt_start();
+ retval = 0;
+ }
+
+ return retval;
+ }
}
}
@@ -258,18 +240,16 @@ static int sc1200wdt_release(struct inode *inode, struct file *file)
printk(KERN_INFO PFX "Watchdog disabled\n");
} else {
sc1200wdt_write_data(WDTO, timeout);
- printk(KERN_CRIT PFX
- "Unexpected close!, timeout = %d min(s)\n", timeout);
+ printk(KERN_CRIT PFX "Unexpected close!, timeout = %d min(s)\n", timeout);
}
- clear_bit(0, &open_flag);
+ up(&open_sem);
expect_close = 0;
return 0;
}
-static ssize_t sc1200wdt_write(struct file *file, const char __user *data,
- size_t len, loff_t *ppos)
+static ssize_t sc1200wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos)
{
if (len) {
if (!nowayout) {
@@ -295,8 +275,7 @@ static ssize_t sc1200wdt_write(struct file *file, const char __user *data,
}
-static int sc1200wdt_notify_sys(struct notifier_block *this,
- unsigned long code, void *unused)
+static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
{
if (code == SYS_DOWN || code == SYS_HALT)
sc1200wdt_stop();
@@ -305,20 +284,23 @@ static int sc1200wdt_notify_sys(struct notifier_block *this,
}
-static struct notifier_block sc1200wdt_notifier = {
+static struct notifier_block sc1200wdt_notifier =
+{
.notifier_call = sc1200wdt_notify_sys,
};
-static const struct file_operations sc1200wdt_fops = {
+static const struct file_operations sc1200wdt_fops =
+{
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = sc1200wdt_write,
- .unlocked_ioctl = sc1200wdt_ioctl,
+ .ioctl = sc1200wdt_ioctl,
.open = sc1200wdt_open,
.release = sc1200wdt_release,
};
-static struct miscdevice sc1200wdt_miscdev = {
+static struct miscdevice sc1200wdt_miscdev =
+{
.minor = WATCHDOG_MINOR,
.name = "watchdog",
.fops = &sc1200wdt_fops,
@@ -330,14 +312,14 @@ static int __init sc1200wdt_probe(void)
/* The probe works by reading the PMC3 register's default value of 0x0e
* there is one caveat, if the device disables the parallel port or any
* of the UARTs we won't be able to detect it.
- * NB. This could be done with accuracy by reading the SID registers,
- * but we don't have access to those io regions.
+ * Nb. This could be done with accuracy by reading the SID registers, but
+ * we don't have access to those io regions.
*/
unsigned char reg;
sc1200wdt_read_data(PMC3, ®);
- reg &= 0x0f; /* we don't want the UART busy bits */
+ reg &= 0x0f; /* we don't want the UART busy bits */
return (reg == 0x0e) ? 0 : -ENODEV;
}
@@ -350,8 +332,7 @@ static struct pnp_device_id scl200wdt_pnp_devices[] = {
{.id = ""},
};
-static int scl200wdt_pnp_probe(struct pnp_dev *dev,
- const struct pnp_device_id *dev_id)
+static int scl200wdt_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
{
/* this driver only supports one card at a time */
if (wdt_dev || !isapnp)
@@ -366,14 +347,13 @@ static int scl200wdt_pnp_probe(struct pnp_dev *dev,
return -EBUSY;
}
- printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n",
- io, io_len);
+ printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n", io, io_len);
return 0;
}
-static void scl200wdt_pnp_remove(struct pnp_dev *dev)
+static void scl200wdt_pnp_remove(struct pnp_dev * dev)
{
- if (wdt_dev) {
+ if (wdt_dev){
release_region(io, io_len);
wdt_dev = NULL;
}
@@ -395,6 +375,8 @@ static int __init sc1200wdt_init(void)
printk("%s\n", banner);
+ sema_init(&open_sem, 1);
+
#if defined CONFIG_PNP
if (isapnp) {
ret = pnp_register_driver(&scl200wdt_pnp_driver);
@@ -428,16 +410,13 @@ static int __init sc1200wdt_init(void)
ret = register_reboot_notifier(&sc1200wdt_notifier);
if (ret) {
- printk(KERN_ERR PFX
- "Unable to register reboot notifier err = %d\n", ret);
+ printk(KERN_ERR PFX "Unable to register reboot notifier err = %d\n", ret);
goto out_io;
}
ret = misc_register(&sc1200wdt_miscdev);
if (ret) {
- printk(KERN_ERR PFX
- "Unable to register miscdev on minor %d\n",
- WATCHDOG_MINOR);
+ printk(KERN_ERR PFX "Unable to register miscdev on minor %d\n", WATCHDOG_MINOR);
goto out_rbt;
}
@@ -467,7 +446,7 @@ static void __exit sc1200wdt_exit(void)
unregister_reboot_notifier(&sc1200wdt_notifier);
#if defined CONFIG_PNP
- if (isapnp)
+ if(isapnp)
pnp_unregister_driver(&scl200wdt_pnp_driver);
else
#endif
diff --git a/trunk/drivers/watchdog/wdt.c b/trunk/drivers/watchdog/wdt.c
index 53a6b18bcb9a..756fb15fdce7 100644
--- a/trunk/drivers/watchdog/wdt.c
+++ b/trunk/drivers/watchdog/wdt.c
@@ -24,10 +24,9 @@
* Matt Crocker).
* Alan Cox : Added wdt= boot option
* Alan Cox : Cleaned up copy/user stuff
- * Tim Hockin : Added insmod parameters, comment
- * cleanup, parameterized timeout
- * Tigran Aivazian : Restructured wdt_init() to handle
- * failures
+ * Tim Hockin : Added insmod parameters, comment cleanup
+ * Parameterized timeout
+ * Tigran Aivazian : Restructured wdt_init() to handle failures
* Joel Becker : Added WDIOC_GET/SETTIMEOUT
* Matt Domsch : Added nowayout module option
*/
@@ -43,9 +42,9 @@
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include "wd501p.h"
@@ -61,19 +60,15 @@ static char expect_close;
static int heartbeat = WD_TIMO;
static int wd_heartbeat;
module_param(heartbeat, int, 0);
-MODULE_PARM_DESC(heartbeat,
- "Watchdog heartbeat in seconds. (0 < heartbeat < 65536, default="
- __MODULE_STRING(WD_TIMO) ")");
+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0 65535)
+ if ((t < 1) || (t > 65535))
return -EINVAL;
heartbeat = t;
@@ -211,7 +200,7 @@ static int wdt_get_status(int *status)
new_status = inb_p(WDT_SR);
spin_unlock_irqrestore(&wdt_lock, flags);
- *status = 0;
+ *status=0;
if (new_status & WDC_SR_ISOI0)
*status |= WDIOF_EXTERN1;
if (new_status & WDC_SR_ISII1)
@@ -277,7 +266,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
#ifdef CONFIG_WDT_501
if (!(status & WDC_SR_TGOOD))
- printk(KERN_CRIT "Overheat alarm.(%d)\n", inb_p(WDT_RT));
+ printk(KERN_CRIT "Overheat alarm.(%d)\n",inb_p(WDT_RT));
if (!(status & WDC_SR_PSUOVER))
printk(KERN_CRIT "PSU over voltage.\n");
if (!(status & WDC_SR_PSUUNDR))
@@ -315,10 +304,9 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
* write of data will do, as we we don't define content meaning.
*/
-static ssize_t wdt_write(struct file *file, const char __user *buf,
- size_t count, loff_t *ppos)
+static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
- if (count) {
+ if(count) {
if (!nowayout) {
size_t i;
@@ -340,6 +328,7 @@ static ssize_t wdt_write(struct file *file, const char __user *buf,
/**
* wdt_ioctl:
+ * @inode: inode of the device
* @file: file handle to the device
* @cmd: watchdog command
* @arg: argument pointer
@@ -349,7 +338,8 @@ static ssize_t wdt_write(struct file *file, const char __user *buf,
* querying capabilities and current status.
*/
-static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+ unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
@@ -372,28 +362,32 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
ident.options |= WDIOF_FANFAULT;
#endif /* CONFIG_WDT_501 */
- switch (cmd) {
- default:
- return -ENOTTY;
- case WDIOC_GETSUPPORT:
- return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
- case WDIOC_GETSTATUS:
- wdt_get_status(&status);
- return put_user(status, p);
- case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
- case WDIOC_KEEPALIVE:
- wdt_ping();
- return 0;
- case WDIOC_SETTIMEOUT:
- if (get_user(new_heartbeat, p))
- return -EFAULT;
- if (wdt_set_heartbeat(new_heartbeat))
- return -EINVAL;
- wdt_ping();
- /* Fall */
- case WDIOC_GETTIMEOUT:
- return put_user(heartbeat, p);
+ switch(cmd)
+ {
+ default:
+ return -ENOTTY;
+ case WDIOC_GETSUPPORT:
+ return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
+
+ case WDIOC_GETSTATUS:
+ wdt_get_status(&status);
+ return put_user(status, p);
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(0, p);
+ case WDIOC_KEEPALIVE:
+ wdt_ping();
+ return 0;
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_heartbeat, p))
+ return -EFAULT;
+
+ if (wdt_set_heartbeat(new_heartbeat))
+ return -EINVAL;
+
+ wdt_ping();
+ /* Fall */
+ case WDIOC_GETTIMEOUT:
+ return put_user(heartbeat, p);
}
}
@@ -411,7 +405,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static int wdt_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(0, &wdt_is_open))
+ if(test_and_set_bit(0, &wdt_is_open))
return -EBUSY;
/*
* Activate
@@ -438,8 +432,7 @@ static int wdt_release(struct inode *inode, struct file *file)
wdt_stop();
clear_bit(0, &wdt_is_open);
} else {
- printk(KERN_CRIT
- "wdt: WDT device closed unexpectedly. WDT will not stop!\n");
+ printk(KERN_CRIT "wdt: WDT device closed unexpectedly. WDT will not stop!\n");
wdt_ping();
}
expect_close = 0;
@@ -458,15 +451,14 @@ static int wdt_release(struct inode *inode, struct file *file)
* farenheit. It was designed by an imperial measurement luddite.
*/
-static ssize_t wdt_temp_read(struct file *file, char __user *buf,
- size_t count, loff_t *ptr)
+static ssize_t wdt_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
{
int temperature;
if (wdt_get_temperature(&temperature))
return -EFAULT;
- if (copy_to_user(buf, &temperature, 1))
+ if (copy_to_user (buf, &temperature, 1))
return -EFAULT;
return 1;
@@ -514,8 +506,10 @@ static int wdt_temp_release(struct inode *inode, struct file *file)
static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
void *unused)
{
- if (code == SYS_DOWN || code == SYS_HALT)
+ if(code==SYS_DOWN || code==SYS_HALT) {
+ /* Turn the card off */
wdt_stop();
+ }
return NOTIFY_DONE;
}
@@ -528,7 +522,7 @@ static const struct file_operations wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = wdt_write,
- .unlocked_ioctl = wdt_ioctl,
+ .ioctl = wdt_ioctl,
.open = wdt_open,
.release = wdt_release,
};
@@ -582,7 +576,7 @@ static void __exit wdt_exit(void)
#endif /* CONFIG_WDT_501 */
unregister_reboot_notifier(&wdt_notifier);
free_irq(irq, NULL);
- release_region(io, 8);
+ release_region(io,8);
}
/**
@@ -597,49 +591,44 @@ static int __init wdt_init(void)
{
int ret;
- /* Check that the heartbeat value is within it's range;
- if not reset to the default */
+ /* Check that the heartbeat value is within it's range ; if not reset to the default */
if (wdt_set_heartbeat(heartbeat)) {
wdt_set_heartbeat(WD_TIMO);
- printk(KERN_INFO "wdt: heartbeat value must be 0 < heartbeat < 65536, using %d\n",
+ printk(KERN_INFO "wdt: heartbeat value must be 0
#include
#include
-#include
#include
#include
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#define WDT_IS_PCI
@@ -76,7 +73,7 @@
/* We can only use 1 card due to the /dev/watchdog restriction */
static int dev_count;
-static unsigned long open_lock;
+static struct semaphore open_sem;
static DEFINE_SPINLOCK(wdtpci_lock);
static char expect_close;
@@ -89,23 +86,18 @@ static int irq;
static int heartbeat = WD_TIMO;
static int wd_heartbeat;
module_param(heartbeat, int, 0);
-MODULE_PARM_DESC(heartbeat,
- "Watchdog heartbeat in seconds. (0> 8, WDT_COUNT0 + ctr);
- udelay(8);
+ outb_p(val&0xFF, WDT_COUNT0+ctr);
+ outb_p(val>>8, WDT_COUNT0+ctr);
}
/**
@@ -145,35 +134,23 @@ static int wdtpci_start(void)
* "pet" the watchdog, as Access says.
* This resets the clock outputs.
*/
- inb(WDT_DC); /* Disable watchdog */
- udelay(8);
- wdtpci_ctr_mode(2, 0); /* Program CTR2 for Mode 0:
- Pulse on Terminal Count */
- outb(0, WDT_DC); /* Enable watchdog */
- udelay(8);
- inb(WDT_DC); /* Disable watchdog */
- udelay(8);
- outb(0, WDT_CLOCK); /* 2.0833MHz clock */
- udelay(8);
- inb(WDT_BUZZER); /* disable */
- udelay(8);
- inb(WDT_OPTONOTRST); /* disable */
- udelay(8);
- inb(WDT_OPTORST); /* disable */
- udelay(8);
- inb(WDT_PROGOUT); /* disable */
- udelay(8);
- wdtpci_ctr_mode(0, 3); /* Program CTR0 for Mode 3:
- Square Wave Generator */
- wdtpci_ctr_mode(1, 2); /* Program CTR1 for Mode 2:
- Rate Generator */
- wdtpci_ctr_mode(2, 1); /* Program CTR2 for Mode 1:
- Retriggerable One-Shot */
- wdtpci_ctr_load(0, 20833); /* count at 100Hz */
- wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */
+ inb_p(WDT_DC); /* Disable watchdog */
+ wdtpci_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */
+ outb_p(0, WDT_DC); /* Enable watchdog */
+
+ inb_p(WDT_DC); /* Disable watchdog */
+ outb_p(0, WDT_CLOCK); /* 2.0833MHz clock */
+ inb_p(WDT_BUZZER); /* disable */
+ inb_p(WDT_OPTONOTRST); /* disable */
+ inb_p(WDT_OPTORST); /* disable */
+ inb_p(WDT_PROGOUT); /* disable */
+ wdtpci_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */
+ wdtpci_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */
+ wdtpci_ctr_mode(2,1); /* Program CTR2 for Mode 1: Retriggerable One-Shot */
+ wdtpci_ctr_load(0,20833); /* count at 100Hz */
+ wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */
/* DO NOT LOAD CTR2 on PCI card! -- JPN */
- outb(0, WDT_DC); /* Enable watchdog */
- udelay(8);
+ outb_p(0, WDT_DC); /* Enable watchdog */
spin_unlock_irqrestore(&wdtpci_lock, flags);
return 0;
@@ -185,15 +162,14 @@ static int wdtpci_start(void)
* Stop the watchdog driver.
*/
-static int wdtpci_stop(void)
+static int wdtpci_stop (void)
{
unsigned long flags;
/* Turn the card off */
spin_lock_irqsave(&wdtpci_lock, flags);
- inb(WDT_DC); /* Disable watchdog */
- udelay(8);
- wdtpci_ctr_load(2, 0); /* 0 length reset pulses now */
+ inb_p(WDT_DC); /* Disable watchdog */
+ wdtpci_ctr_load(2,0); /* 0 length reset pulses now */
spin_unlock_irqrestore(&wdtpci_lock, flags);
return 0;
}
@@ -201,23 +177,20 @@ static int wdtpci_stop(void)
/**
* wdtpci_ping:
*
- * Reload counter one with the watchdog heartbeat. We don't bother
- * reloading the cascade counter.
+ * Reload counter one with the watchdog heartbeat. We don't bother reloading
+ * the cascade counter.
*/
static int wdtpci_ping(void)
{
unsigned long flags;
- spin_lock_irqsave(&wdtpci_lock, flags);
/* Write a watchdog value */
- inb(WDT_DC); /* Disable watchdog */
- udelay(8);
- wdtpci_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2:
- Rate Generator */
- wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */
- outb(0, WDT_DC); /* Enable watchdog */
- udelay(8);
+ spin_lock_irqsave(&wdtpci_lock, flags);
+ inb_p(WDT_DC); /* Disable watchdog */
+ wdtpci_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */
+ wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */
+ outb_p(0, WDT_DC); /* Enable watchdog */
spin_unlock_irqrestore(&wdtpci_lock, flags);
return 0;
}
@@ -226,14 +199,14 @@ static int wdtpci_ping(void)
* wdtpci_set_heartbeat:
* @t: the new heartbeat value that needs to be set.
*
- * Set a new heartbeat value for the watchdog device. If the heartbeat
- * value is incorrect we keep the old value and return -EINVAL.
- * If successful we return 0.
+ * Set a new heartbeat value for the watchdog device. If the heartbeat value is
+ * incorrect we keep the old value and return -EINVAL. If successfull we
+ * return 0.
*/
static int wdtpci_set_heartbeat(int t)
{
/* Arbitrary, can't find the card's limits */
- if (t < 1 || t > 65535)
+ if ((t < 1) || (t > 65535))
return -EINVAL;
heartbeat = t;
@@ -254,14 +227,9 @@ static int wdtpci_set_heartbeat(int t)
static int wdtpci_get_status(int *status)
{
- unsigned char new_status;
- unsigned long flags;
-
- spin_lock_irqsave(&wdtpci_lock, flags);
- new_status = inb(WDT_SR);
- spin_unlock_irqrestore(&wdtpci_lock, flags);
+ unsigned char new_status=inb_p(WDT_SR);
- *status = 0;
+ *status=0;
if (new_status & WDC_SR_ISOI0)
*status |= WDIOF_EXTERN1;
if (new_status & WDC_SR_ISII1)
@@ -291,12 +259,8 @@ static int wdtpci_get_status(int *status)
static int wdtpci_get_temperature(int *temperature)
{
- unsigned short c;
- unsigned long flags;
- spin_lock_irqsave(&wdtpci_lock, flags);
- c = inb(WDT_RT);
- udelay(8);
- spin_unlock_irqrestore(&wdtpci_lock, flags);
+ unsigned short c=inb_p(WDT_RT);
+
*temperature = (c * 11 / 15) + 7;
return 0;
}
@@ -318,25 +282,17 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
* Read the status register see what is up and
* then printk it.
*/
- unsigned char status;
-
- spin_lock(&wdtpci_lock);
-
- status = inb(WDT_SR);
- udelay(8);
+ unsigned char status=inb_p(WDT_SR);
printk(KERN_CRIT PFX "status %d\n", status);
#ifdef CONFIG_WDT_501_PCI
- if (!(status & WDC_SR_TGOOD)) {
- u8 alarm = inb(WDT_RT);
- printk(KERN_CRIT PFX "Overheat alarm.(%d)\n", alarm);
- udelay(8);
- }
+ if (!(status & WDC_SR_TGOOD))
+ printk(KERN_CRIT PFX "Overheat alarm.(%d)\n",inb_p(WDT_RT));
if (!(status & WDC_SR_PSUOVER))
- printk(KERN_CRIT PFX "PSU over voltage.\n");
+ printk(KERN_CRIT PFX "PSU over voltage.\n");
if (!(status & WDC_SR_PSUUNDR))
- printk(KERN_CRIT PFX "PSU under voltage.\n");
+ printk(KERN_CRIT PFX "PSU under voltage.\n");
if (tachometer) {
if (!(status & WDC_SR_FANGOOD))
printk(KERN_CRIT PFX "Possible fan fault.\n");
@@ -354,7 +310,6 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
printk(KERN_CRIT PFX "Reset in 5ms.\n");
#endif
}
- spin_unlock(&wdtpci_lock);
return IRQ_HANDLED;
}
@@ -370,8 +325,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
* write of data will do, as we we don't define content meaning.
*/
-static ssize_t wdtpci_write(struct file *file, const char __user *buf,
- size_t count, loff_t *ppos)
+static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
if (count) {
if (!nowayout) {
@@ -381,7 +335,7 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf,
for (i = 0; i != count; i++) {
char c;
- if (get_user(c, buf+i))
+ if(get_user(c, buf+i))
return -EFAULT;
if (c == 'V')
expect_close = 42;
@@ -389,11 +343,13 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf,
}
wdtpci_ping();
}
+
return count;
}
/**
* wdtpci_ioctl:
+ * @inode: inode of the device
* @file: file handle to the device
* @cmd: watchdog command
* @arg: argument pointer
@@ -403,8 +359,8 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf,
* querying capabilities and current status.
*/
-static long wdtpci_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
+static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+ unsigned long arg)
{
int new_heartbeat;
int status;
@@ -427,29 +383,33 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,
ident.options |= WDIOF_FANFAULT;
#endif /* CONFIG_WDT_501_PCI */
- switch (cmd) {
- default:
- return -ENOTTY;
- case WDIOC_GETSUPPORT:
- return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
- case WDIOC_GETSTATUS:
- wdtpci_get_status(&status);
- return put_user(status, p);
- case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
- case WDIOC_KEEPALIVE:
- wdtpci_ping();
- return 0;
- case WDIOC_SETTIMEOUT:
- if (get_user(new_heartbeat, p))
- return -EFAULT;
- if (wdtpci_set_heartbeat(new_heartbeat))
- return -EINVAL;
- wdtpci_ping();
- /* Fall */
- case WDIOC_GETTIMEOUT:
- return put_user(heartbeat, p);
- }
+ switch(cmd)
+ {
+ default:
+ return -ENOTTY;
+ case WDIOC_GETSUPPORT:
+ return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
+
+ case WDIOC_GETSTATUS:
+ wdtpci_get_status(&status);
+ return put_user(status, p);
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(0, p);
+ case WDIOC_KEEPALIVE:
+ wdtpci_ping();
+ return 0;
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_heartbeat, p))
+ return -EFAULT;
+
+ if (wdtpci_set_heartbeat(new_heartbeat))
+ return -EINVAL;
+
+ wdtpci_ping();
+ /* Fall */
+ case WDIOC_GETTIMEOUT:
+ return put_user(heartbeat, p);
+ }
}
/**
@@ -466,11 +426,12 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,
static int wdtpci_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(0, &open_lock))
+ if (down_trylock(&open_sem))
return -EBUSY;
- if (nowayout)
+ if (nowayout) {
__module_get(THIS_MODULE);
+ }
/*
* Activate
*/
@@ -499,7 +460,7 @@ static int wdtpci_release(struct inode *inode, struct file *file)
wdtpci_ping();
}
expect_close = 0;
- clear_bit(0, &open_lock);
+ up(&open_sem);
return 0;
}
@@ -515,15 +476,14 @@ static int wdtpci_release(struct inode *inode, struct file *file)
* fahrenheit. It was designed by an imperial measurement luddite.
*/
-static ssize_t wdtpci_temp_read(struct file *file, char __user *buf,
- size_t count, loff_t *ptr)
+static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
{
int temperature;
if (wdtpci_get_temperature(&temperature))
return -EFAULT;
- if (copy_to_user(buf, &temperature, 1))
+ if (copy_to_user (buf, &temperature, 1))
return -EFAULT;
return 1;
@@ -569,10 +529,12 @@ static int wdtpci_temp_release(struct inode *inode, struct file *file)
*/
static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code,
- void *unused)
+ void *unused)
{
- if (code == SYS_DOWN || code == SYS_HALT)
+ if (code==SYS_DOWN || code==SYS_HALT) {
+ /* Turn the card off */
wdtpci_stop();
+ }
return NOTIFY_DONE;
}
@@ -585,7 +547,7 @@ static const struct file_operations wdtpci_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = wdtpci_write,
- .unlocked_ioctl = wdtpci_ioctl,
+ .ioctl = wdtpci_ioctl,
.open = wdtpci_open,
.release = wdtpci_release,
};
@@ -622,85 +584,80 @@ static struct notifier_block wdtpci_notifier = {
};
-static int __devinit wdtpci_init_one(struct pci_dev *dev,
- const struct pci_device_id *ent)
+static int __devinit wdtpci_init_one (struct pci_dev *dev,
+ const struct pci_device_id *ent)
{
int ret = -EIO;
dev_count++;
if (dev_count > 1) {
- printk(KERN_ERR PFX "This driver only supports one device\n");
+ printk (KERN_ERR PFX "this driver only supports 1 device\n");
return -ENODEV;
}
- if (pci_enable_device(dev)) {
- printk(KERN_ERR PFX "Not possible to enable PCI Device\n");
+ if (pci_enable_device (dev)) {
+ printk (KERN_ERR PFX "Not possible to enable PCI Device\n");
return -ENODEV;
}
- if (pci_resource_start(dev, 2) == 0x0000) {
- printk(KERN_ERR PFX "No I/O-Address for card detected\n");
+ if (pci_resource_start (dev, 2) == 0x0000) {
+ printk (KERN_ERR PFX "No I/O-Address for card detected\n");
ret = -ENODEV;
goto out_pci;
}
+ sema_init(&open_sem, 1);
+
irq = dev->irq;
- io = pci_resource_start(dev, 2);
+ io = pci_resource_start (dev, 2);
- if (request_region(io, 16, "wdt_pci") == NULL) {
- printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", io);
+ if (request_region (io, 16, "wdt_pci") == NULL) {
+ printk (KERN_ERR PFX "I/O address 0x%04x already in use\n", io);
goto out_pci;
}
- if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED,
+ if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED,
"wdt_pci", &wdtpci_miscdev)) {
- printk(KERN_ERR PFX "IRQ %d is not free\n", irq);
+ printk (KERN_ERR PFX "IRQ %d is not free\n", irq);
goto out_reg;
}
- printk(KERN_INFO
- "PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n",
- io, irq);
+ printk ("PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n",
+ io, irq);
- /* Check that the heartbeat value is within its range;
- if not reset to the default */
+ /* Check that the heartbeat value is within it's range ; if not reset to the default */
if (wdtpci_set_heartbeat(heartbeat)) {
wdtpci_set_heartbeat(WD_TIMO);
- printk(KERN_INFO PFX
- "heartbeat value must be 0 < heartbeat < 65536, using %d\n",
- WD_TIMO);
+ printk(KERN_INFO PFX "heartbeat value must be 0len + 9) & ~3;
p->addr = htonl(p->addr);
- p->len = htons(p->len);
+ p->len = htonl(p->len);
write(outfd, &p->addr, writelen);
p = p->next;
}
/* EOF record is zero length, since we don't bother to represent
the type field in the binary version */
- write(outfd, zeroes, 6);
+ write(outfd, zeroes, 5);
return 0;
}
diff --git a/trunk/fs/nfs/nfsroot.c b/trunk/fs/nfs/nfsroot.c
index 46763d1cd397..8478fc25daee 100644
--- a/trunk/fs/nfs/nfsroot.c
+++ b/trunk/fs/nfs/nfsroot.c
@@ -127,7 +127,7 @@ enum {
Opt_err
};
-static match_table_t __initdata tokens = {
+static match_table_t __initconst tokens = {
{Opt_port, "port=%u"},
{Opt_rsize, "rsize=%u"},
{Opt_wsize, "wsize=%u"},
diff --git a/trunk/fs/ufs/super.c b/trunk/fs/ufs/super.c
index 3141969b456d..3e30e40aa24d 100644
--- a/trunk/fs/ufs/super.c
+++ b/trunk/fs/ufs/super.c
@@ -1233,7 +1233,7 @@ static int ufs_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb);
unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE;
- struct match_token *tp = tokens;
+ const struct match_token *tp = tokens;
while (tp->token != Opt_onerror_panic && tp->token != mval)
++tp;
diff --git a/trunk/include/asm-m68k/contregs.h b/trunk/include/asm-m68k/contregs.h
index d1ea750bddfe..1e233e7d191e 100644
--- a/trunk/include/asm-m68k/contregs.h
+++ b/trunk/include/asm-m68k/contregs.h
@@ -1,53 +1,4 @@
#ifndef _M68K_CONTREGS_H
#define _M68K_CONTREGS_H
-
-/* contregs.h: Addresses of registers in the ASI_CONTROL alternate address
- * space. These are for the mmu's context register, etc.
- *
- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
- */
-
-/* 3=sun3
- 4=sun4 (as in sun4 sysmaint student book)
- c=sun4c (according to davem) */
-
-#define AC_IDPROM 0x00000000 /* 34 ID PROM, R/O, byte, 32 bytes */
-#define AC_PAGEMAP 0x10000000 /* 3 Pagemap R/W, long */
-#define AC_SEGMAP 0x20000000 /* 3 Segment map, byte */
-#define AC_CONTEXT 0x30000000 /* 34c current mmu-context */
-#define AC_SENABLE 0x40000000 /* 34c system dvma/cache/reset enable reg*/
-#define AC_UDVMA_ENB 0x50000000 /* 34 Not used on Sun boards, byte */
-#define AC_BUS_ERROR 0x60000000 /* 34 Not cleared on read, byte. */
-#define AC_SYNC_ERR 0x60000000 /* c fault type */
-#define AC_SYNC_VA 0x60000004 /* c fault virtual address */
-#define AC_ASYNC_ERR 0x60000008 /* c asynchronous fault type */
-#define AC_ASYNC_VA 0x6000000c /* c async fault virtual address */
-#define AC_LEDS 0x70000000 /* 34 Zero turns on LEDs, byte */
-#define AC_CACHETAGS 0x80000000 /* 34c direct access to the VAC tags */
-#define AC_CACHEDDATA 0x90000000 /* 3 c direct access to the VAC data */
-#define AC_UDVMA_MAP 0xD0000000 /* 4 Not used on Sun boards, byte */
-#define AC_VME_VECTOR 0xE0000000 /* 4 For non-Autovector VME, byte */
-#define AC_BOOT_SCC 0xF0000000 /* 34 bypass to access Zilog 8530. byte.*/
-
-/* s=Swift, h=Ross_HyperSPARC, v=TI_Viking, t=Tsunami, r=Ross_Cypress */
-#define AC_M_PCR 0x0000 /* shv Processor Control Reg */
-#define AC_M_CTPR 0x0100 /* shv Context Table Pointer Reg */
-#define AC_M_CXR 0x0200 /* shv Context Register */
-#define AC_M_SFSR 0x0300 /* shv Synchronous Fault Status Reg */
-#define AC_M_SFAR 0x0400 /* shv Synchronous Fault Address Reg */
-#define AC_M_AFSR 0x0500 /* hv Asynchronous Fault Status Reg */
-#define AC_M_AFAR 0x0600 /* hv Asynchronous Fault Address Reg */
-#define AC_M_RESET 0x0700 /* hv Reset Reg */
-#define AC_M_RPR 0x1000 /* hv Root Pointer Reg */
-#define AC_M_TSUTRCR 0x1000 /* s TLB Replacement Ctrl Reg */
-#define AC_M_IAPTP 0x1100 /* hv Instruction Access PTP */
-#define AC_M_DAPTP 0x1200 /* hv Data Access PTP */
-#define AC_M_ITR 0x1300 /* hv Index Tag Register */
-#define AC_M_TRCR 0x1400 /* hv TLB Replacement Control Reg */
-#define AC_M_SFSRX 0x1300 /* s Synch Fault Status Reg prim */
-#define AC_M_SFARX 0x1400 /* s Synch Fault Address Reg prim */
-#define AC_M_RPR1 0x1500 /* h Root Pointer Reg (entry 2) */
-#define AC_M_IAPTP1 0x1600 /* h Instruction Access PTP (entry 2) */
-#define AC_M_DAPTP1 0x1700 /* h Data Access PTP (entry 2) */
-
+#include
#endif /* _M68K_CONTREGS_H */
diff --git a/trunk/include/asm-m68k/fbio.h b/trunk/include/asm-m68k/fbio.h
index b9215a0907d3..c17edf8c7bc4 100644
--- a/trunk/include/asm-m68k/fbio.h
+++ b/trunk/include/asm-m68k/fbio.h
@@ -1,330 +1 @@
-#ifndef __LINUX_FBIO_H
-#define __LINUX_FBIO_H
-
-#include
-#include
-
-/* Constants used for fbio SunOS compatibility */
-/* (C) 1996 Miguel de Icaza */
-
-/* Frame buffer types */
-#define FBTYPE_NOTYPE -1
-#define FBTYPE_SUN1BW 0 /* mono */
-#define FBTYPE_SUN1COLOR 1
-#define FBTYPE_SUN2BW 2
-#define FBTYPE_SUN2COLOR 3
-#define FBTYPE_SUN2GP 4
-#define FBTYPE_SUN5COLOR 5
-#define FBTYPE_SUN3COLOR 6
-#define FBTYPE_MEMCOLOR 7
-#define FBTYPE_SUN4COLOR 8
-
-#define FBTYPE_NOTSUN1 9
-#define FBTYPE_NOTSUN2 10
-#define FBTYPE_NOTSUN3 11
-
-#define FBTYPE_SUNFAST_COLOR 12 /* cg6 */
-#define FBTYPE_SUNROP_COLOR 13
-#define FBTYPE_SUNFB_VIDEO 14
-#define FBTYPE_SUNGIFB 15
-#define FBTYPE_SUNGPLAS 16
-#define FBTYPE_SUNGP3 17
-#define FBTYPE_SUNGT 18
-#define FBTYPE_SUNLEO 19 /* zx Leo card */
-#define FBTYPE_MDICOLOR 20 /* cg14 */
-#define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */
-
-#define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */
-
-/* Does not seem to be listed in the Sun file either */
-#define FBTYPE_CREATOR 22
-#define FBTYPE_PCI_IGA1682 23
-#define FBTYPE_P9100COLOR 24
-
-#define FBTYPE_PCI_GENERIC 1000
-#define FBTYPE_PCI_MACH64 1001
-
-/* fbio ioctls */
-/* Returned by FBIOGTYPE */
-struct fbtype {
- int fb_type; /* fb type, see above */
- int fb_height; /* pixels */
- int fb_width; /* pixels */
- int fb_depth;
- int fb_cmsize; /* color map entries */
- int fb_size; /* fb size in bytes */
-};
-#define FBIOGTYPE _IOR('F', 0, struct fbtype)
-
-struct fbcmap {
- int index; /* first element (0 origin) */
- int count;
- unsigned char __user *red;
- unsigned char __user *green;
- unsigned char __user *blue;
-};
-
-#ifdef __KERNEL__
-#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap)
-#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap)
-#else
-#define FBIOPUTCMAP _IOW('F', 3, struct fbcmap)
-#define FBIOGETCMAP _IOW('F', 4, struct fbcmap)
-#endif
-
-/* # of device specific values */
-#define FB_ATTR_NDEVSPECIFIC 8
-/* # of possible emulations */
-#define FB_ATTR_NEMUTYPES 4
-
-struct fbsattr {
- int flags;
- int emu_type; /* -1 if none */
- int dev_specific[FB_ATTR_NDEVSPECIFIC];
-};
-
-struct fbgattr {
- int real_type; /* real frame buffer type */
- int owner; /* unknown */
- struct fbtype fbtype; /* real frame buffer fbtype */
- struct fbsattr sattr;
- int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */
-};
-#define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */
-#define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */
-
-#define FBIOSVIDEO _IOW('F', 7, int)
-#define FBIOGVIDEO _IOR('F', 8, int)
-
-struct fbcursor {
- short set; /* what to set, choose from the list above */
- short enable; /* cursor on/off */
- struct fbcurpos pos; /* cursor position */
- struct fbcurpos hot; /* cursor hot spot */
- struct fbcmap cmap; /* color map info */
- struct fbcurpos size; /* cursor bit map size */
- char __user *image; /* cursor image bits */
- char __user *mask; /* cursor mask bits */
-};
-
-/* set/get cursor attributes/shape */
-#define FBIOSCURSOR _IOW('F', 24, struct fbcursor)
-#define FBIOGCURSOR _IOWR('F', 25, struct fbcursor)
-
-/* set/get cursor position */
-#define FBIOSCURPOS _IOW('F', 26, struct fbcurpos)
-#define FBIOGCURPOS _IOW('F', 27, struct fbcurpos)
-
-/* get max cursor size */
-#define FBIOGCURMAX _IOR('F', 28, struct fbcurpos)
-
-/* wid manipulation */
-struct fb_wid_alloc {
-#define FB_WID_SHARED_8 0
-#define FB_WID_SHARED_24 1
-#define FB_WID_DBL_8 2
-#define FB_WID_DBL_24 3
- __u32 wa_type;
- __s32 wa_index; /* Set on return */
- __u32 wa_count;
-};
-struct fb_wid_item {
- __u32 wi_type;
- __s32 wi_index;
- __u32 wi_attrs;
- __u32 wi_values[32];
-};
-struct fb_wid_list {
- __u32 wl_flags;
- __u32 wl_count;
- struct fb_wid_item *wl_list;
-};
-
-#define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc)
-#define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc)
-#define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list)
-#define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list)
-
-/* Creator ioctls */
-#define FFB_IOCTL ('F'<<8)
-#define FFB_SYS_INFO (FFB_IOCTL|80)
-#define FFB_CLUTREAD (FFB_IOCTL|81)
-#define FFB_CLUTPOST (FFB_IOCTL|82)
-#define FFB_SETDIAGMODE (FFB_IOCTL|83)
-#define FFB_GETMONITORID (FFB_IOCTL|84)
-#define FFB_GETVIDEOMODE (FFB_IOCTL|85)
-#define FFB_SETVIDEOMODE (FFB_IOCTL|86)
-#define FFB_SETSERVER (FFB_IOCTL|87)
-#define FFB_SETOVCTL (FFB_IOCTL|88)
-#define FFB_GETOVCTL (FFB_IOCTL|89)
-#define FFB_GETSAXNUM (FFB_IOCTL|90)
-#define FFB_FBDEBUG (FFB_IOCTL|91)
-
-/* Cg14 ioctls */
-#define MDI_IOCTL ('M'<<8)
-#define MDI_RESET (MDI_IOCTL|1)
-#define MDI_GET_CFGINFO (MDI_IOCTL|2)
-#define MDI_SET_PIXELMODE (MDI_IOCTL|3)
-# define MDI_32_PIX 32
-# define MDI_16_PIX 16
-# define MDI_8_PIX 8
-
-struct mdi_cfginfo {
- int mdi_ncluts; /* Number of implemented CLUTs in this MDI */
- int mdi_type; /* FBTYPE name */
- int mdi_height; /* height */
- int mdi_width; /* widht */
- int mdi_size; /* available ram */
- int mdi_mode; /* 8bpp, 16bpp or 32bpp */
- int mdi_pixfreq; /* pixel clock (from PROM) */
-};
-
-/* SparcLinux specific ioctl for the MDI, should be replaced for
- * the SET_XLUT/SET_CLUTn ioctls instead
- */
-#define MDI_CLEAR_XLUT (MDI_IOCTL|9)
-
-/* leo & ffb ioctls */
-struct fb_clut_alloc {
- __u32 clutid; /* Set on return */
- __u32 flag;
- __u32 index;
-};
-
-struct fb_clut {
-#define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */
- __u32 flag;
- __u32 clutid;
- __u32 offset;
- __u32 count;
- char * red;
- char * green;
- char * blue;
-};
-
-struct fb_clut32 {
- __u32 flag;
- __u32 clutid;
- __u32 offset;
- __u32 count;
- __u32 red;
- __u32 green;
- __u32 blue;
-};
-
-#define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc)
-#define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc)
-#define LEO_CLUTREAD _IOW('L', 55, struct fb_clut)
-#define LEO_CLUTPOST _IOW('L', 56, struct fb_clut)
-#define LEO_SETGAMMA _IOW('L', 68, int) /* Not yet implemented */
-#define LEO_GETGAMMA _IOR('L', 69, int) /* Not yet implemented */
-
-#ifdef __KERNEL__
-/* Addresses on the fd of a cgsix that are mappable */
-#define CG6_FBC 0x70000000
-#define CG6_TEC 0x70001000
-#define CG6_BTREGS 0x70002000
-#define CG6_FHC 0x70004000
-#define CG6_THC 0x70005000
-#define CG6_ROM 0x70006000
-#define CG6_RAM 0x70016000
-#define CG6_DHC 0x80000000
-
-#define CG3_MMAP_OFFSET 0x4000000
-
-/* Addresses on the fd of a tcx that are mappable */
-#define TCX_RAM8BIT 0x00000000
-#define TCX_RAM24BIT 0x01000000
-#define TCX_UNK3 0x10000000
-#define TCX_UNK4 0x20000000
-#define TCX_CONTROLPLANE 0x28000000
-#define TCX_UNK6 0x30000000
-#define TCX_UNK7 0x38000000
-#define TCX_TEC 0x70000000
-#define TCX_BTREGS 0x70002000
-#define TCX_THC 0x70004000
-#define TCX_DHC 0x70008000
-#define TCX_ALT 0x7000a000
-#define TCX_SYNC 0x7000e000
-#define TCX_UNK2 0x70010000
-
-/* CG14 definitions */
-
-/* Offsets into the OBIO space: */
-#define CG14_REGS 0 /* registers */
-#define CG14_CURSORREGS 0x1000 /* cursor registers */
-#define CG14_DACREGS 0x2000 /* DAC registers */
-#define CG14_XLUT 0x3000 /* X Look Up Table -- ??? */
-#define CG14_CLUT1 0x4000 /* Color Look Up Table */
-#define CG14_CLUT2 0x5000 /* Color Look Up Table */
-#define CG14_CLUT3 0x6000 /* Color Look Up Table */
-#define CG14_AUTO 0xf000
-
-#endif /* KERNEL */
-
-/* These are exported to userland for applications to use */
-/* Mappable offsets for the cg14: control registers */
-#define MDI_DIRECT_MAP 0x10000000
-#define MDI_CTLREG_MAP 0x20000000
-#define MDI_CURSOR_MAP 0x30000000
-#define MDI_SHDW_VRT_MAP 0x40000000
-
-/* Mappable offsets for the cg14: frame buffer resolutions */
-/* 32 bits */
-#define MDI_CHUNKY_XBGR_MAP 0x50000000
-#define MDI_CHUNKY_BGR_MAP 0x60000000
-
-/* 16 bits */
-#define MDI_PLANAR_X16_MAP 0x70000000
-#define MDI_PLANAR_C16_MAP 0x80000000
-
-/* 8 bit is done as CG3 MMAP offset */
-/* 32 bits, planar */
-#define MDI_PLANAR_X32_MAP 0x90000000
-#define MDI_PLANAR_B32_MAP 0xa0000000
-#define MDI_PLANAR_G32_MAP 0xb0000000
-#define MDI_PLANAR_R32_MAP 0xc0000000
-
-/* Mappable offsets on leo */
-#define LEO_SS0_MAP 0x00000000
-#define LEO_LC_SS0_USR_MAP 0x00800000
-#define LEO_LD_SS0_MAP 0x00801000
-#define LEO_LX_CURSOR_MAP 0x00802000
-#define LEO_SS1_MAP 0x00803000
-#define LEO_LC_SS1_USR_MAP 0x01003000
-#define LEO_LD_SS1_MAP 0x01004000
-#define LEO_UNK_MAP 0x01005000
-#define LEO_LX_KRN_MAP 0x01006000
-#define LEO_LC_SS0_KRN_MAP 0x01007000
-#define LEO_LC_SS1_KRN_MAP 0x01008000
-#define LEO_LD_GBL_MAP 0x01009000
-#define LEO_UNK2_MAP 0x0100a000
-
-#ifdef __KERNEL__
-struct fbcmap32 {
- int index; /* first element (0 origin) */
- int count;
- u32 red;
- u32 green;
- u32 blue;
-};
-
-#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
-#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
-
-struct fbcursor32 {
- short set; /* what to set, choose from the list above */
- short enable; /* cursor on/off */
- struct fbcurpos pos; /* cursor position */
- struct fbcurpos hot; /* cursor hot spot */
- struct fbcmap32 cmap; /* color map info */
- struct fbcurpos size; /* cursor bit map size */
- u32 image; /* cursor image bits */
- u32 mask; /* cursor mask bits */
-};
-
-#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
-#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
-#endif
-
-#endif /* __LINUX_FBIO_H */
+#include
diff --git a/trunk/include/asm-m68k/idprom.h b/trunk/include/asm-m68k/idprom.h
index 160616a89e05..4349eaf3cfe4 100644
--- a/trunk/include/asm-m68k/idprom.h
+++ b/trunk/include/asm-m68k/idprom.h
@@ -1,25 +1,6 @@
#ifndef _M68K_IDPROM_H
#define _M68K_IDPROM_H
-/*
- * idprom.h: Macros and defines for idprom routines
- *
- * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
- */
-
-#include
-
-struct idprom {
- u8 id_format; /* Format identifier (always 0x01) */
- u8 id_machtype; /* Machine type */
- u8 id_ethaddr[6]; /* Hardware ethernet address */
- s32 id_date; /* Date of manufacture */
- u32 id_sernum:24; /* Unique serial number */
- u8 id_cksum; /* Checksum - xor of the data bytes */
- u8 reserved[16];
-};
-
-extern struct idprom *idprom;
-extern void idprom_init(void);
+#include
/* Sun3: in control space */
#define SUN3_IDPROM_BASE 0x00000000
diff --git a/trunk/arch/powerpc/include/asm/8253pit.h b/trunk/include/asm-powerpc/8253pit.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/8253pit.h
rename to trunk/include/asm-powerpc/8253pit.h
diff --git a/trunk/arch/powerpc/include/asm/8xx_immap.h b/trunk/include/asm-powerpc/8xx_immap.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/8xx_immap.h
rename to trunk/include/asm-powerpc/8xx_immap.h
diff --git a/trunk/arch/powerpc/include/asm/Kbuild b/trunk/include/asm-powerpc/Kbuild
similarity index 100%
rename from trunk/arch/powerpc/include/asm/Kbuild
rename to trunk/include/asm-powerpc/Kbuild
diff --git a/trunk/arch/powerpc/include/asm/a.out.h b/trunk/include/asm-powerpc/a.out.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/a.out.h
rename to trunk/include/asm-powerpc/a.out.h
diff --git a/trunk/arch/powerpc/include/asm/abs_addr.h b/trunk/include/asm-powerpc/abs_addr.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/abs_addr.h
rename to trunk/include/asm-powerpc/abs_addr.h
diff --git a/trunk/arch/powerpc/include/asm/agp.h b/trunk/include/asm-powerpc/agp.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/agp.h
rename to trunk/include/asm-powerpc/agp.h
diff --git a/trunk/arch/powerpc/include/asm/asm-compat.h b/trunk/include/asm-powerpc/asm-compat.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/asm-compat.h
rename to trunk/include/asm-powerpc/asm-compat.h
diff --git a/trunk/arch/powerpc/include/asm/atomic.h b/trunk/include/asm-powerpc/atomic.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/atomic.h
rename to trunk/include/asm-powerpc/atomic.h
diff --git a/trunk/arch/powerpc/include/asm/auxvec.h b/trunk/include/asm-powerpc/auxvec.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/auxvec.h
rename to trunk/include/asm-powerpc/auxvec.h
diff --git a/trunk/arch/powerpc/include/asm/backlight.h b/trunk/include/asm-powerpc/backlight.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/backlight.h
rename to trunk/include/asm-powerpc/backlight.h
diff --git a/trunk/arch/powerpc/include/asm/bitops.h b/trunk/include/asm-powerpc/bitops.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/bitops.h
rename to trunk/include/asm-powerpc/bitops.h
diff --git a/trunk/arch/powerpc/include/asm/bootx.h b/trunk/include/asm-powerpc/bootx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/bootx.h
rename to trunk/include/asm-powerpc/bootx.h
diff --git a/trunk/arch/powerpc/include/asm/btext.h b/trunk/include/asm-powerpc/btext.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/btext.h
rename to trunk/include/asm-powerpc/btext.h
diff --git a/trunk/arch/powerpc/include/asm/bug.h b/trunk/include/asm-powerpc/bug.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/bug.h
rename to trunk/include/asm-powerpc/bug.h
diff --git a/trunk/arch/powerpc/include/asm/bugs.h b/trunk/include/asm-powerpc/bugs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/bugs.h
rename to trunk/include/asm-powerpc/bugs.h
diff --git a/trunk/arch/powerpc/include/asm/byteorder.h b/trunk/include/asm-powerpc/byteorder.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/byteorder.h
rename to trunk/include/asm-powerpc/byteorder.h
diff --git a/trunk/arch/powerpc/include/asm/cache.h b/trunk/include/asm-powerpc/cache.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cache.h
rename to trunk/include/asm-powerpc/cache.h
diff --git a/trunk/arch/powerpc/include/asm/cacheflush.h b/trunk/include/asm-powerpc/cacheflush.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cacheflush.h
rename to trunk/include/asm-powerpc/cacheflush.h
diff --git a/trunk/arch/powerpc/include/asm/cell-pmu.h b/trunk/include/asm-powerpc/cell-pmu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cell-pmu.h
rename to trunk/include/asm-powerpc/cell-pmu.h
diff --git a/trunk/arch/powerpc/include/asm/cell-regs.h b/trunk/include/asm-powerpc/cell-regs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cell-regs.h
rename to trunk/include/asm-powerpc/cell-regs.h
diff --git a/trunk/arch/powerpc/include/asm/checksum.h b/trunk/include/asm-powerpc/checksum.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/checksum.h
rename to trunk/include/asm-powerpc/checksum.h
diff --git a/trunk/arch/powerpc/include/asm/clk_interface.h b/trunk/include/asm-powerpc/clk_interface.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/clk_interface.h
rename to trunk/include/asm-powerpc/clk_interface.h
diff --git a/trunk/arch/powerpc/include/asm/code-patching.h b/trunk/include/asm-powerpc/code-patching.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/code-patching.h
rename to trunk/include/asm-powerpc/code-patching.h
diff --git a/trunk/arch/powerpc/include/asm/compat.h b/trunk/include/asm-powerpc/compat.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/compat.h
rename to trunk/include/asm-powerpc/compat.h
diff --git a/trunk/arch/powerpc/include/asm/cpm.h b/trunk/include/asm-powerpc/cpm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cpm.h
rename to trunk/include/asm-powerpc/cpm.h
diff --git a/trunk/arch/powerpc/include/asm/cpm1.h b/trunk/include/asm-powerpc/cpm1.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cpm1.h
rename to trunk/include/asm-powerpc/cpm1.h
diff --git a/trunk/arch/powerpc/include/asm/cpm2.h b/trunk/include/asm-powerpc/cpm2.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cpm2.h
rename to trunk/include/asm-powerpc/cpm2.h
diff --git a/trunk/arch/powerpc/include/asm/cputable.h b/trunk/include/asm-powerpc/cputable.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cputable.h
rename to trunk/include/asm-powerpc/cputable.h
diff --git a/trunk/arch/powerpc/include/asm/cputhreads.h b/trunk/include/asm-powerpc/cputhreads.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cputhreads.h
rename to trunk/include/asm-powerpc/cputhreads.h
diff --git a/trunk/arch/powerpc/include/asm/cputime.h b/trunk/include/asm-powerpc/cputime.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/cputime.h
rename to trunk/include/asm-powerpc/cputime.h
diff --git a/trunk/arch/powerpc/include/asm/current.h b/trunk/include/asm-powerpc/current.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/current.h
rename to trunk/include/asm-powerpc/current.h
diff --git a/trunk/arch/powerpc/include/asm/dbdma.h b/trunk/include/asm-powerpc/dbdma.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dbdma.h
rename to trunk/include/asm-powerpc/dbdma.h
diff --git a/trunk/arch/powerpc/include/asm/dcr-generic.h b/trunk/include/asm-powerpc/dcr-generic.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dcr-generic.h
rename to trunk/include/asm-powerpc/dcr-generic.h
diff --git a/trunk/arch/powerpc/include/asm/dcr-mmio.h b/trunk/include/asm-powerpc/dcr-mmio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dcr-mmio.h
rename to trunk/include/asm-powerpc/dcr-mmio.h
diff --git a/trunk/arch/powerpc/include/asm/dcr-native.h b/trunk/include/asm-powerpc/dcr-native.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dcr-native.h
rename to trunk/include/asm-powerpc/dcr-native.h
diff --git a/trunk/arch/powerpc/include/asm/dcr-regs.h b/trunk/include/asm-powerpc/dcr-regs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dcr-regs.h
rename to trunk/include/asm-powerpc/dcr-regs.h
diff --git a/trunk/arch/powerpc/include/asm/dcr.h b/trunk/include/asm-powerpc/dcr.h
similarity index 94%
rename from trunk/arch/powerpc/include/asm/dcr.h
rename to trunk/include/asm-powerpc/dcr.h
index d13fb68bb5c0..53b283050ab3 100644
--- a/trunk/arch/powerpc/include/asm/dcr.h
+++ b/trunk/include/asm-powerpc/dcr.h
@@ -65,13 +65,17 @@ typedef dcr_host_mmio_t dcr_host_t;
#endif /* defined(CONFIG_PPC_DCR_NATIVE) && defined(CONFIG_PPC_DCR_MMIO) */
/*
- * additional helpers to read the DCR * base from the device-tree
+ * On CONFIG_PPC_MERGE, we have additional helpers to read the DCR
+ * base from the device-tree
*/
+#ifdef CONFIG_PPC_MERGE
struct device_node;
extern unsigned int dcr_resource_start(struct device_node *np,
unsigned int index);
extern unsigned int dcr_resource_len(struct device_node *np,
unsigned int index);
+#endif /* CONFIG_PPC_MERGE */
+
#endif /* CONFIG_PPC_DCR */
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
diff --git a/trunk/arch/powerpc/include/asm/delay.h b/trunk/include/asm-powerpc/delay.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/delay.h
rename to trunk/include/asm-powerpc/delay.h
diff --git a/trunk/arch/powerpc/include/asm/device.h b/trunk/include/asm-powerpc/device.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/device.h
rename to trunk/include/asm-powerpc/device.h
diff --git a/trunk/arch/powerpc/include/asm/div64.h b/trunk/include/asm-powerpc/div64.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/div64.h
rename to trunk/include/asm-powerpc/div64.h
diff --git a/trunk/arch/powerpc/include/asm/dma-mapping.h b/trunk/include/asm-powerpc/dma-mapping.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dma-mapping.h
rename to trunk/include/asm-powerpc/dma-mapping.h
diff --git a/trunk/arch/powerpc/include/asm/dma.h b/trunk/include/asm-powerpc/dma.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/dma.h
rename to trunk/include/asm-powerpc/dma.h
diff --git a/trunk/arch/powerpc/include/asm/edac.h b/trunk/include/asm-powerpc/edac.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/edac.h
rename to trunk/include/asm-powerpc/edac.h
diff --git a/trunk/arch/powerpc/include/asm/eeh.h b/trunk/include/asm-powerpc/eeh.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/eeh.h
rename to trunk/include/asm-powerpc/eeh.h
diff --git a/trunk/arch/powerpc/include/asm/eeh_event.h b/trunk/include/asm-powerpc/eeh_event.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/eeh_event.h
rename to trunk/include/asm-powerpc/eeh_event.h
diff --git a/trunk/arch/powerpc/include/asm/elf.h b/trunk/include/asm-powerpc/elf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/elf.h
rename to trunk/include/asm-powerpc/elf.h
diff --git a/trunk/arch/powerpc/include/asm/emergency-restart.h b/trunk/include/asm-powerpc/emergency-restart.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/emergency-restart.h
rename to trunk/include/asm-powerpc/emergency-restart.h
diff --git a/trunk/arch/powerpc/include/asm/errno.h b/trunk/include/asm-powerpc/errno.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/errno.h
rename to trunk/include/asm-powerpc/errno.h
diff --git a/trunk/arch/powerpc/include/asm/exception.h b/trunk/include/asm-powerpc/exception.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/exception.h
rename to trunk/include/asm-powerpc/exception.h
diff --git a/trunk/arch/powerpc/include/asm/fb.h b/trunk/include/asm-powerpc/fb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fb.h
rename to trunk/include/asm-powerpc/fb.h
diff --git a/trunk/arch/powerpc/include/asm/fcntl.h b/trunk/include/asm-powerpc/fcntl.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fcntl.h
rename to trunk/include/asm-powerpc/fcntl.h
diff --git a/trunk/arch/powerpc/include/asm/feature-fixups.h b/trunk/include/asm-powerpc/feature-fixups.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/feature-fixups.h
rename to trunk/include/asm-powerpc/feature-fixups.h
diff --git a/trunk/arch/powerpc/include/asm/firmware.h b/trunk/include/asm-powerpc/firmware.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/firmware.h
rename to trunk/include/asm-powerpc/firmware.h
diff --git a/trunk/arch/powerpc/include/asm/fixmap.h b/trunk/include/asm-powerpc/fixmap.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fixmap.h
rename to trunk/include/asm-powerpc/fixmap.h
diff --git a/trunk/arch/powerpc/include/asm/floppy.h b/trunk/include/asm-powerpc/floppy.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/floppy.h
rename to trunk/include/asm-powerpc/floppy.h
diff --git a/trunk/arch/powerpc/include/asm/fs_pd.h b/trunk/include/asm-powerpc/fs_pd.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fs_pd.h
rename to trunk/include/asm-powerpc/fs_pd.h
diff --git a/trunk/arch/powerpc/include/asm/fsl_gtm.h b/trunk/include/asm-powerpc/fsl_gtm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fsl_gtm.h
rename to trunk/include/asm-powerpc/fsl_gtm.h
diff --git a/trunk/arch/powerpc/include/asm/fsl_lbc.h b/trunk/include/asm-powerpc/fsl_lbc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/fsl_lbc.h
rename to trunk/include/asm-powerpc/fsl_lbc.h
diff --git a/trunk/arch/powerpc/include/asm/ftrace.h b/trunk/include/asm-powerpc/ftrace.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ftrace.h
rename to trunk/include/asm-powerpc/ftrace.h
diff --git a/trunk/arch/powerpc/include/asm/futex.h b/trunk/include/asm-powerpc/futex.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/futex.h
rename to trunk/include/asm-powerpc/futex.h
diff --git a/trunk/arch/powerpc/include/asm/gpio.h b/trunk/include/asm-powerpc/gpio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/gpio.h
rename to trunk/include/asm-powerpc/gpio.h
diff --git a/trunk/arch/powerpc/include/asm/grackle.h b/trunk/include/asm-powerpc/grackle.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/grackle.h
rename to trunk/include/asm-powerpc/grackle.h
diff --git a/trunk/arch/powerpc/include/asm/hardirq.h b/trunk/include/asm-powerpc/hardirq.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hardirq.h
rename to trunk/include/asm-powerpc/hardirq.h
diff --git a/trunk/arch/powerpc/include/asm/heathrow.h b/trunk/include/asm-powerpc/heathrow.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/heathrow.h
rename to trunk/include/asm-powerpc/heathrow.h
diff --git a/trunk/arch/powerpc/include/asm/highmem.h b/trunk/include/asm-powerpc/highmem.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/highmem.h
rename to trunk/include/asm-powerpc/highmem.h
diff --git a/trunk/arch/powerpc/include/asm/hugetlb.h b/trunk/include/asm-powerpc/hugetlb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hugetlb.h
rename to trunk/include/asm-powerpc/hugetlb.h
diff --git a/trunk/arch/powerpc/include/asm/hvcall.h b/trunk/include/asm-powerpc/hvcall.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hvcall.h
rename to trunk/include/asm-powerpc/hvcall.h
diff --git a/trunk/arch/powerpc/include/asm/hvconsole.h b/trunk/include/asm-powerpc/hvconsole.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hvconsole.h
rename to trunk/include/asm-powerpc/hvconsole.h
diff --git a/trunk/arch/powerpc/include/asm/hvcserver.h b/trunk/include/asm-powerpc/hvcserver.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hvcserver.h
rename to trunk/include/asm-powerpc/hvcserver.h
diff --git a/trunk/arch/powerpc/include/asm/hw_irq.h b/trunk/include/asm-powerpc/hw_irq.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hw_irq.h
rename to trunk/include/asm-powerpc/hw_irq.h
diff --git a/trunk/arch/powerpc/include/asm/hydra.h b/trunk/include/asm-powerpc/hydra.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/hydra.h
rename to trunk/include/asm-powerpc/hydra.h
diff --git a/trunk/arch/powerpc/include/asm/i8259.h b/trunk/include/asm-powerpc/i8259.h
similarity index 71%
rename from trunk/arch/powerpc/include/asm/i8259.h
rename to trunk/include/asm-powerpc/i8259.h
index 105ade297aad..db1362f8c603 100644
--- a/trunk/arch/powerpc/include/asm/i8259.h
+++ b/trunk/include/asm-powerpc/i8259.h
@@ -4,9 +4,14 @@
#include
+#ifdef CONFIG_PPC_MERGE
extern void i8259_init(struct device_node *node, unsigned long intack_addr);
extern unsigned int i8259_irq(void);
extern struct irq_host *i8259_get_host(void);
+#else
+extern void i8259_init(unsigned long intack_addr, int offset);
+extern int i8259_irq(void);
+#endif
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_I8259_H */
diff --git a/trunk/arch/powerpc/include/asm/ibmebus.h b/trunk/include/asm-powerpc/ibmebus.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ibmebus.h
rename to trunk/include/asm-powerpc/ibmebus.h
diff --git a/trunk/arch/powerpc/include/asm/ide.h b/trunk/include/asm-powerpc/ide.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ide.h
rename to trunk/include/asm-powerpc/ide.h
diff --git a/trunk/arch/powerpc/include/asm/immap_86xx.h b/trunk/include/asm-powerpc/immap_86xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/immap_86xx.h
rename to trunk/include/asm-powerpc/immap_86xx.h
diff --git a/trunk/arch/powerpc/include/asm/immap_cpm2.h b/trunk/include/asm-powerpc/immap_cpm2.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/immap_cpm2.h
rename to trunk/include/asm-powerpc/immap_cpm2.h
diff --git a/trunk/arch/powerpc/include/asm/immap_qe.h b/trunk/include/asm-powerpc/immap_qe.h
similarity index 99%
rename from trunk/arch/powerpc/include/asm/immap_qe.h
rename to trunk/include/asm-powerpc/immap_qe.h
index 3c2fced3ac22..7b6f411db3e6 100644
--- a/trunk/arch/powerpc/include/asm/immap_qe.h
+++ b/trunk/include/asm-powerpc/immap_qe.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/immap_qe.h
+ *
* QUICC Engine (QE) Internal Memory Map.
* The Internal Memory Map for devices with QE on them. This
* is the superset of all QE devices (8360, etc.).
diff --git a/trunk/arch/powerpc/include/asm/io-defs.h b/trunk/include/asm-powerpc/io-defs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/io-defs.h
rename to trunk/include/asm-powerpc/io-defs.h
diff --git a/trunk/arch/powerpc/include/asm/io.h b/trunk/include/asm-powerpc/io.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/io.h
rename to trunk/include/asm-powerpc/io.h
diff --git a/trunk/arch/powerpc/include/asm/ioctl.h b/trunk/include/asm-powerpc/ioctl.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ioctl.h
rename to trunk/include/asm-powerpc/ioctl.h
diff --git a/trunk/arch/powerpc/include/asm/ioctls.h b/trunk/include/asm-powerpc/ioctls.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ioctls.h
rename to trunk/include/asm-powerpc/ioctls.h
diff --git a/trunk/arch/powerpc/include/asm/iommu.h b/trunk/include/asm-powerpc/iommu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iommu.h
rename to trunk/include/asm-powerpc/iommu.h
diff --git a/trunk/arch/powerpc/include/asm/ipcbuf.h b/trunk/include/asm-powerpc/ipcbuf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ipcbuf.h
rename to trunk/include/asm-powerpc/ipcbuf.h
diff --git a/trunk/arch/powerpc/include/asm/ipic.h b/trunk/include/asm-powerpc/ipic.h
similarity index 93%
rename from trunk/arch/powerpc/include/asm/ipic.h
rename to trunk/include/asm-powerpc/ipic.h
index fb59829983b8..8ff08be00146 100644
--- a/trunk/arch/powerpc/include/asm/ipic.h
+++ b/trunk/include/asm-powerpc/ipic.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/ipic.h
+ *
* IPIC external definitions and structure.
*
* Maintainer: Kumar Gala
@@ -77,8 +79,15 @@ extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq);
extern u32 ipic_get_mcp_status(void);
extern void ipic_clear_mcp_status(u32 mask);
+#ifdef CONFIG_PPC_MERGE
extern struct ipic * ipic_init(struct device_node *node, unsigned int flags);
extern unsigned int ipic_get_irq(void);
+#else
+extern void ipic_init(phys_addr_t phys_addr, unsigned int flags,
+ unsigned int irq_offset,
+ unsigned char *senses, unsigned int senses_count);
+extern int ipic_get_irq(void);
+#endif
#endif /* __ASM_IPIC_H__ */
#endif /* __KERNEL__ */
diff --git a/trunk/arch/powerpc/include/asm/irq.h b/trunk/include/asm-powerpc/irq.h
similarity index 58%
rename from trunk/arch/powerpc/include/asm/irq.h
rename to trunk/include/asm-powerpc/irq.h
index a372f76836c2..1ef8e304e0ea 100644
--- a/trunk/arch/powerpc/include/asm/irq.h
+++ b/trunk/include/asm-powerpc/irq.h
@@ -25,6 +25,8 @@
extern atomic_t ppc_n_lost_interrupts;
+#ifdef CONFIG_PPC_MERGE
+
/* This number is used when no interrupt has been assigned */
#define NO_IRQ (0)
@@ -324,6 +326,292 @@ static __inline__ int irq_canonicalize(int irq)
return irq;
}
+
+#else /* CONFIG_PPC_MERGE */
+
+/* This number is used when no interrupt has been assigned */
+#define NO_IRQ (-1)
+#define NO_IRQ_IGNORE (-2)
+
+
+/*
+ * These constants are used for passing information about interrupt
+ * signal polarity and level/edge sensing to the low-level PIC chip
+ * drivers.
+ */
+#define IRQ_SENSE_MASK 0x1
+#define IRQ_SENSE_LEVEL 0x1 /* interrupt on active level */
+#define IRQ_SENSE_EDGE 0x0 /* interrupt triggered by edge */
+
+#define IRQ_POLARITY_MASK 0x2
+#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */
+#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */
+
+
+#if defined(CONFIG_40x)
+#include
+
+#ifndef NR_BOARD_IRQS
+#define NR_BOARD_IRQS 0
+#endif
+
+#ifndef UIC_WIDTH /* Number of interrupts per device */
+#define UIC_WIDTH 32
+#endif
+
+#ifndef NR_UICS /* number of UIC devices */
+#define NR_UICS 1
+#endif
+
+#if defined (CONFIG_403)
+/*
+ * The PowerPC 403 cores' Asynchronous Interrupt Controller (AIC) has
+ * 32 possible interrupts, a majority of which are not implemented on
+ * all cores. There are six configurable, external interrupt pins and
+ * there are eight internal interrupts for the on-chip serial port
+ * (SPU), DMA controller, and JTAG controller.
+ *
+ */
+
+#define NR_AIC_IRQS 32
+#define NR_IRQS (NR_AIC_IRQS + NR_BOARD_IRQS)
+
+#elif !defined (CONFIG_403)
+
+/*
+ * The PowerPC 405 cores' Universal Interrupt Controller (UIC) has 32
+ * possible interrupts as well. There are seven, configurable external
+ * interrupt pins and there are 17 internal interrupts for the on-chip
+ * serial port, DMA controller, on-chip Ethernet controller, PCI, etc.
+ *
+ */
+
+
+#define NR_UIC_IRQS UIC_WIDTH
+#define NR_IRQS ((NR_UIC_IRQS * NR_UICS) + NR_BOARD_IRQS)
+#endif
+
+#elif defined(CONFIG_44x)
+#include
+
+#define NR_UIC_IRQS 32
+#define NR_IRQS ((NR_UIC_IRQS * NR_UICS) + NR_BOARD_IRQS)
+
+#elif defined(CONFIG_8xx)
+
+/* Now include the board configuration specific associations.
+*/
+#include
+
+/* The MPC8xx cores have 16 possible interrupts. There are eight
+ * possible level sensitive interrupts assigned and generated internally
+ * from such devices as CPM, PCMCIA, RTC, PIT, TimeBase and Decrementer.
+ * There are eight external interrupts (IRQs) that can be configured
+ * as either level or edge sensitive.
+ *
+ * On some implementations, there is also the possibility of an 8259
+ * through the PCI and PCI-ISA bridges.
+ *
+ * We are "flattening" the interrupt vectors of the cascaded CPM
+ * and 8259 interrupt controllers so that we can uniquely identify
+ * any interrupt source with a single integer.
+ */
+#define NR_SIU_INTS 16
+#define NR_CPM_INTS 32
+#ifndef NR_8259_INTS
+#define NR_8259_INTS 0
+#endif
+
+#define SIU_IRQ_OFFSET 0
+#define CPM_IRQ_OFFSET (SIU_IRQ_OFFSET + NR_SIU_INTS)
+#define I8259_IRQ_OFFSET (CPM_IRQ_OFFSET + NR_CPM_INTS)
+
+#define NR_IRQS (NR_SIU_INTS + NR_CPM_INTS + NR_8259_INTS)
+
+/* These values must be zero-based and map 1:1 with the SIU configuration.
+ * They are used throughout the 8xx I/O subsystem to generate
+ * interrupt masks, flags, and other control patterns. This is why the
+ * current kernel assumption of the 8259 as the base controller is such
+ * a pain in the butt.
+ */
+#define SIU_IRQ0 (0) /* Highest priority */
+#define SIU_LEVEL0 (1)
+#define SIU_IRQ1 (2)
+#define SIU_LEVEL1 (3)
+#define SIU_IRQ2 (4)
+#define SIU_LEVEL2 (5)
+#define SIU_IRQ3 (6)
+#define SIU_LEVEL3 (7)
+#define SIU_IRQ4 (8)
+#define SIU_LEVEL4 (9)
+#define SIU_IRQ5 (10)
+#define SIU_LEVEL5 (11)
+#define SIU_IRQ6 (12)
+#define SIU_LEVEL6 (13)
+#define SIU_IRQ7 (14)
+#define SIU_LEVEL7 (15)
+
+#define MPC8xx_INT_FEC1 SIU_LEVEL1
+#define MPC8xx_INT_FEC2 SIU_LEVEL3
+
+#define MPC8xx_INT_SCC1 (CPM_IRQ_OFFSET + CPMVEC_SCC1)
+#define MPC8xx_INT_SCC2 (CPM_IRQ_OFFSET + CPMVEC_SCC2)
+#define MPC8xx_INT_SCC3 (CPM_IRQ_OFFSET + CPMVEC_SCC3)
+#define MPC8xx_INT_SCC4 (CPM_IRQ_OFFSET + CPMVEC_SCC4)
+#define MPC8xx_INT_SMC1 (CPM_IRQ_OFFSET + CPMVEC_SMC1)
+#define MPC8xx_INT_SMC2 (CPM_IRQ_OFFSET + CPMVEC_SMC2)
+
+/* The internal interrupts we can configure as we see fit.
+ * My personal preference is CPM at level 2, which puts it above the
+ * MBX PCI/ISA/IDE interrupts.
+ */
+#ifndef PIT_INTERRUPT
+#define PIT_INTERRUPT SIU_LEVEL0
+#endif
+#ifndef CPM_INTERRUPT
+#define CPM_INTERRUPT SIU_LEVEL2
+#endif
+#ifndef PCMCIA_INTERRUPT
+#define PCMCIA_INTERRUPT SIU_LEVEL6
+#endif
+#ifndef DEC_INTERRUPT
+#define DEC_INTERRUPT SIU_LEVEL7
+#endif
+
+/* Some internal interrupt registers use an 8-bit mask for the interrupt
+ * level instead of a number.
+ */
+#define mk_int_int_mask(IL) (1 << (7 - (IL/2)))
+
+#else /* CONFIG_40x + CONFIG_8xx */
+/*
+ * this is the # irq's for all ppc arch's (pmac/chrp/prep)
+ * so it is the max of them all
+ */
+#define NR_IRQS 256
+#define __DO_IRQ_CANON 1
+
+#ifndef CONFIG_8260
+
+#define NUM_8259_INTERRUPTS 16
+
+#else /* CONFIG_8260 */
+
+/* The 8260 has an internal interrupt controller with a maximum of
+ * 64 IRQs. We will use NR_IRQs from above since it is large enough.
+ * Don't be confused by the 8260 documentation where they list an
+ * "interrupt number" and "interrupt vector". We are only interested
+ * in the interrupt vector. There are "reserved" holes where the
+ * vector number increases, but the interrupt number in the table does not.
+ * (Document errata updates have fixed this...make sure you have up to
+ * date processor documentation -- Dan).
+ */
+
+#ifndef CPM_IRQ_OFFSET
+#define CPM_IRQ_OFFSET 0
+#endif
+
+#define NR_CPM_INTS 64
+
+#define SIU_INT_ERROR ((uint)0x00 + CPM_IRQ_OFFSET)
+#define SIU_INT_I2C ((uint)0x01 + CPM_IRQ_OFFSET)
+#define SIU_INT_SPI ((uint)0x02 + CPM_IRQ_OFFSET)
+#define SIU_INT_RISC ((uint)0x03 + CPM_IRQ_OFFSET)
+#define SIU_INT_SMC1 ((uint)0x04 + CPM_IRQ_OFFSET)
+#define SIU_INT_SMC2 ((uint)0x05 + CPM_IRQ_OFFSET)
+#define SIU_INT_IDMA1 ((uint)0x06 + CPM_IRQ_OFFSET)
+#define SIU_INT_IDMA2 ((uint)0x07 + CPM_IRQ_OFFSET)
+#define SIU_INT_IDMA3 ((uint)0x08 + CPM_IRQ_OFFSET)
+#define SIU_INT_IDMA4 ((uint)0x09 + CPM_IRQ_OFFSET)
+#define SIU_INT_SDMA ((uint)0x0a + CPM_IRQ_OFFSET)
+#define SIU_INT_USB ((uint)0x0b + CPM_IRQ_OFFSET)
+#define SIU_INT_TIMER1 ((uint)0x0c + CPM_IRQ_OFFSET)
+#define SIU_INT_TIMER2 ((uint)0x0d + CPM_IRQ_OFFSET)
+#define SIU_INT_TIMER3 ((uint)0x0e + CPM_IRQ_OFFSET)
+#define SIU_INT_TIMER4 ((uint)0x0f + CPM_IRQ_OFFSET)
+#define SIU_INT_TMCNT ((uint)0x10 + CPM_IRQ_OFFSET)
+#define SIU_INT_PIT ((uint)0x11 + CPM_IRQ_OFFSET)
+#define SIU_INT_PCI ((uint)0x12 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ1 ((uint)0x13 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ2 ((uint)0x14 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ3 ((uint)0x15 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ4 ((uint)0x16 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ5 ((uint)0x17 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ6 ((uint)0x18 + CPM_IRQ_OFFSET)
+#define SIU_INT_IRQ7 ((uint)0x19 + CPM_IRQ_OFFSET)
+#define SIU_INT_FCC1 ((uint)0x20 + CPM_IRQ_OFFSET)
+#define SIU_INT_FCC2 ((uint)0x21 + CPM_IRQ_OFFSET)
+#define SIU_INT_FCC3 ((uint)0x22 + CPM_IRQ_OFFSET)
+#define SIU_INT_MCC1 ((uint)0x24 + CPM_IRQ_OFFSET)
+#define SIU_INT_MCC2 ((uint)0x25 + CPM_IRQ_OFFSET)
+#define SIU_INT_SCC1 ((uint)0x28 + CPM_IRQ_OFFSET)
+#define SIU_INT_SCC2 ((uint)0x29 + CPM_IRQ_OFFSET)
+#define SIU_INT_SCC3 ((uint)0x2a + CPM_IRQ_OFFSET)
+#define SIU_INT_SCC4 ((uint)0x2b + CPM_IRQ_OFFSET)
+#define SIU_INT_PC15 ((uint)0x30 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC14 ((uint)0x31 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC13 ((uint)0x32 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC12 ((uint)0x33 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC11 ((uint)0x34 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC10 ((uint)0x35 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC9 ((uint)0x36 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC8 ((uint)0x37 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC7 ((uint)0x38 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC6 ((uint)0x39 + CPM_IRQ_OFFSET)
+#define SIU_INT_PC5 ((uint)0x3a + CPM_IRQ_OFFSET)
+#define SIU_INT_PC4 ((uint)0x3b + CPM_IRQ_OFFSET)
+#define SIU_INT_PC3 ((uint)0x3c + CPM_IRQ_OFFSET)
+#define SIU_INT_PC2 ((uint)0x3d + CPM_IRQ_OFFSET)
+#define SIU_INT_PC1 ((uint)0x3e + CPM_IRQ_OFFSET)
+#define SIU_INT_PC0 ((uint)0x3f + CPM_IRQ_OFFSET)
+
+#endif /* CONFIG_8260 */
+
+#endif /* Whatever way too big #ifdef */
+
+#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
+/* pedantic: these are long because they are used with set_bit --RR */
+extern unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
+
+/*
+ * Because many systems have two overlapping names spaces for
+ * interrupts (ISA and XICS for example), and the ISA interrupts
+ * have historically not been easy to renumber, we allow ISA
+ * interrupts to take values 0 - 15, and shift up the remaining
+ * interrupts by 0x10.
+ */
+#define NUM_ISA_INTERRUPTS 0x10
+extern int __irq_offset_value;
+
+static inline int irq_offset_up(int irq)
+{
+ return(irq + __irq_offset_value);
+}
+
+static inline int irq_offset_down(int irq)
+{
+ return(irq - __irq_offset_value);
+}
+
+static inline int irq_offset_value(void)
+{
+ return __irq_offset_value;
+}
+
+#ifdef __DO_IRQ_CANON
+extern int ppc_do_canonicalize_irqs;
+#else
+#define ppc_do_canonicalize_irqs 0
+#endif
+
+static __inline__ int irq_canonicalize(int irq)
+{
+ if (ppc_do_canonicalize_irqs && irq == 2)
+ irq = 9;
+ return irq;
+}
+#endif /* CONFIG_PPC_MERGE */
+
extern int distribute_irqs;
struct irqaction;
diff --git a/trunk/arch/powerpc/include/asm/irq_regs.h b/trunk/include/asm-powerpc/irq_regs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/irq_regs.h
rename to trunk/include/asm-powerpc/irq_regs.h
diff --git a/trunk/arch/powerpc/include/asm/irqflags.h b/trunk/include/asm-powerpc/irqflags.h
similarity index 93%
rename from trunk/arch/powerpc/include/asm/irqflags.h
rename to trunk/include/asm-powerpc/irqflags.h
index 17ba3a881bfd..cc6fdba33660 100644
--- a/trunk/arch/powerpc/include/asm/irqflags.h
+++ b/trunk/include/asm-powerpc/irqflags.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/irqflags.h
+ *
* IRQ flags handling
*/
#ifndef _ASM_IRQFLAGS_H
@@ -8,7 +10,7 @@
/*
* Get definitions for raw_local_save_flags(x), etc.
*/
-#include
+#include
#else
#ifdef CONFIG_TRACE_IRQFLAGS
diff --git a/trunk/arch/powerpc/include/asm/iseries/alpaca.h b/trunk/include/asm-powerpc/iseries/alpaca.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/alpaca.h
rename to trunk/include/asm-powerpc/iseries/alpaca.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_call.h b/trunk/include/asm-powerpc/iseries/hv_call.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_call.h
rename to trunk/include/asm-powerpc/iseries/hv_call.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_call_event.h b/trunk/include/asm-powerpc/iseries/hv_call_event.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_call_event.h
rename to trunk/include/asm-powerpc/iseries/hv_call_event.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_call_sc.h b/trunk/include/asm-powerpc/iseries/hv_call_sc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_call_sc.h
rename to trunk/include/asm-powerpc/iseries/hv_call_sc.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_call_xm.h b/trunk/include/asm-powerpc/iseries/hv_call_xm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_call_xm.h
rename to trunk/include/asm-powerpc/iseries/hv_call_xm.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_lp_config.h b/trunk/include/asm-powerpc/iseries/hv_lp_config.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_lp_config.h
rename to trunk/include/asm-powerpc/iseries/hv_lp_config.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_lp_event.h b/trunk/include/asm-powerpc/iseries/hv_lp_event.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_lp_event.h
rename to trunk/include/asm-powerpc/iseries/hv_lp_event.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/hv_types.h b/trunk/include/asm-powerpc/iseries/hv_types.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/hv_types.h
rename to trunk/include/asm-powerpc/iseries/hv_types.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/iommu.h b/trunk/include/asm-powerpc/iseries/iommu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/iommu.h
rename to trunk/include/asm-powerpc/iseries/iommu.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/it_lp_queue.h b/trunk/include/asm-powerpc/iseries/it_lp_queue.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/it_lp_queue.h
rename to trunk/include/asm-powerpc/iseries/it_lp_queue.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/lpar_map.h b/trunk/include/asm-powerpc/iseries/lpar_map.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/lpar_map.h
rename to trunk/include/asm-powerpc/iseries/lpar_map.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/mf.h b/trunk/include/asm-powerpc/iseries/mf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/mf.h
rename to trunk/include/asm-powerpc/iseries/mf.h
diff --git a/trunk/arch/powerpc/include/asm/iseries/vio.h b/trunk/include/asm-powerpc/iseries/vio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/iseries/vio.h
rename to trunk/include/asm-powerpc/iseries/vio.h
diff --git a/trunk/arch/powerpc/include/asm/kdebug.h b/trunk/include/asm-powerpc/kdebug.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kdebug.h
rename to trunk/include/asm-powerpc/kdebug.h
diff --git a/trunk/arch/powerpc/include/asm/kdump.h b/trunk/include/asm-powerpc/kdump.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kdump.h
rename to trunk/include/asm-powerpc/kdump.h
diff --git a/trunk/arch/powerpc/include/asm/kexec.h b/trunk/include/asm-powerpc/kexec.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kexec.h
rename to trunk/include/asm-powerpc/kexec.h
diff --git a/trunk/arch/powerpc/include/asm/keylargo.h b/trunk/include/asm-powerpc/keylargo.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/keylargo.h
rename to trunk/include/asm-powerpc/keylargo.h
diff --git a/trunk/arch/powerpc/include/asm/kgdb.h b/trunk/include/asm-powerpc/kgdb.h
similarity index 98%
rename from trunk/arch/powerpc/include/asm/kgdb.h
rename to trunk/include/asm-powerpc/kgdb.h
index edd217006d27..1399caf719ae 100644
--- a/trunk/arch/powerpc/include/asm/kgdb.h
+++ b/trunk/include/asm-powerpc/kgdb.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/kgdb.h
+ *
* The PowerPC (32/64) specific defines / externs for KGDB. Based on
* the previous 32bit and 64bit specific files, which had the following
* copyrights:
diff --git a/trunk/arch/powerpc/include/asm/kmap_types.h b/trunk/include/asm-powerpc/kmap_types.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kmap_types.h
rename to trunk/include/asm-powerpc/kmap_types.h
diff --git a/trunk/arch/powerpc/include/asm/kprobes.h b/trunk/include/asm-powerpc/kprobes.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kprobes.h
rename to trunk/include/asm-powerpc/kprobes.h
diff --git a/trunk/arch/powerpc/include/asm/kvm.h b/trunk/include/asm-powerpc/kvm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kvm.h
rename to trunk/include/asm-powerpc/kvm.h
diff --git a/trunk/arch/powerpc/include/asm/kvm_asm.h b/trunk/include/asm-powerpc/kvm_asm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kvm_asm.h
rename to trunk/include/asm-powerpc/kvm_asm.h
diff --git a/trunk/arch/powerpc/include/asm/kvm_host.h b/trunk/include/asm-powerpc/kvm_host.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kvm_host.h
rename to trunk/include/asm-powerpc/kvm_host.h
diff --git a/trunk/arch/powerpc/include/asm/kvm_para.h b/trunk/include/asm-powerpc/kvm_para.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kvm_para.h
rename to trunk/include/asm-powerpc/kvm_para.h
diff --git a/trunk/arch/powerpc/include/asm/kvm_ppc.h b/trunk/include/asm-powerpc/kvm_ppc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/kvm_ppc.h
rename to trunk/include/asm-powerpc/kvm_ppc.h
diff --git a/trunk/arch/powerpc/include/asm/libata-portmap.h b/trunk/include/asm-powerpc/libata-portmap.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/libata-portmap.h
rename to trunk/include/asm-powerpc/libata-portmap.h
diff --git a/trunk/arch/powerpc/include/asm/linkage.h b/trunk/include/asm-powerpc/linkage.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/linkage.h
rename to trunk/include/asm-powerpc/linkage.h
diff --git a/trunk/arch/powerpc/include/asm/lmb.h b/trunk/include/asm-powerpc/lmb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/lmb.h
rename to trunk/include/asm-powerpc/lmb.h
diff --git a/trunk/arch/powerpc/include/asm/local.h b/trunk/include/asm-powerpc/local.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/local.h
rename to trunk/include/asm-powerpc/local.h
diff --git a/trunk/arch/powerpc/include/asm/lppaca.h b/trunk/include/asm-powerpc/lppaca.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/lppaca.h
rename to trunk/include/asm-powerpc/lppaca.h
diff --git a/trunk/arch/powerpc/include/asm/lv1call.h b/trunk/include/asm-powerpc/lv1call.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/lv1call.h
rename to trunk/include/asm-powerpc/lv1call.h
diff --git a/trunk/arch/powerpc/include/asm/machdep.h b/trunk/include/asm-powerpc/machdep.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/machdep.h
rename to trunk/include/asm-powerpc/machdep.h
diff --git a/trunk/arch/powerpc/include/asm/macio.h b/trunk/include/asm-powerpc/macio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/macio.h
rename to trunk/include/asm-powerpc/macio.h
diff --git a/trunk/arch/powerpc/include/asm/mc146818rtc.h b/trunk/include/asm-powerpc/mc146818rtc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mc146818rtc.h
rename to trunk/include/asm-powerpc/mc146818rtc.h
diff --git a/trunk/arch/powerpc/include/asm/mediabay.h b/trunk/include/asm-powerpc/mediabay.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mediabay.h
rename to trunk/include/asm-powerpc/mediabay.h
diff --git a/trunk/arch/powerpc/include/asm/mman.h b/trunk/include/asm-powerpc/mman.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mman.h
rename to trunk/include/asm-powerpc/mman.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-40x.h b/trunk/include/asm-powerpc/mmu-40x.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-40x.h
rename to trunk/include/asm-powerpc/mmu-40x.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-44x.h b/trunk/include/asm-powerpc/mmu-44x.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-44x.h
rename to trunk/include/asm-powerpc/mmu-44x.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-8xx.h b/trunk/include/asm-powerpc/mmu-8xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-8xx.h
rename to trunk/include/asm-powerpc/mmu-8xx.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-fsl-booke.h b/trunk/include/asm-powerpc/mmu-fsl-booke.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-fsl-booke.h
rename to trunk/include/asm-powerpc/mmu-fsl-booke.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-hash32.h b/trunk/include/asm-powerpc/mmu-hash32.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-hash32.h
rename to trunk/include/asm-powerpc/mmu-hash32.h
diff --git a/trunk/arch/powerpc/include/asm/mmu-hash64.h b/trunk/include/asm-powerpc/mmu-hash64.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu-hash64.h
rename to trunk/include/asm-powerpc/mmu-hash64.h
diff --git a/trunk/arch/powerpc/include/asm/mmu.h b/trunk/include/asm-powerpc/mmu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu.h
rename to trunk/include/asm-powerpc/mmu.h
diff --git a/trunk/arch/powerpc/include/asm/mmu_context.h b/trunk/include/asm-powerpc/mmu_context.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmu_context.h
rename to trunk/include/asm-powerpc/mmu_context.h
diff --git a/trunk/arch/powerpc/include/asm/mmzone.h b/trunk/include/asm-powerpc/mmzone.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mmzone.h
rename to trunk/include/asm-powerpc/mmzone.h
diff --git a/trunk/arch/powerpc/include/asm/module.h b/trunk/include/asm-powerpc/module.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/module.h
rename to trunk/include/asm-powerpc/module.h
diff --git a/trunk/arch/powerpc/include/asm/mpc512x.h b/trunk/include/asm-powerpc/mpc512x.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc512x.h
rename to trunk/include/asm-powerpc/mpc512x.h
diff --git a/trunk/arch/powerpc/include/asm/mpc52xx.h b/trunk/include/asm-powerpc/mpc52xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc52xx.h
rename to trunk/include/asm-powerpc/mpc52xx.h
diff --git a/trunk/arch/powerpc/include/asm/mpc52xx_psc.h b/trunk/include/asm-powerpc/mpc52xx_psc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc52xx_psc.h
rename to trunk/include/asm-powerpc/mpc52xx_psc.h
diff --git a/trunk/arch/powerpc/include/asm/mpc6xx.h b/trunk/include/asm-powerpc/mpc6xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc6xx.h
rename to trunk/include/asm-powerpc/mpc6xx.h
diff --git a/trunk/arch/powerpc/include/asm/mpc8260.h b/trunk/include/asm-powerpc/mpc8260.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc8260.h
rename to trunk/include/asm-powerpc/mpc8260.h
diff --git a/trunk/arch/powerpc/include/asm/mpc86xx.h b/trunk/include/asm-powerpc/mpc86xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc86xx.h
rename to trunk/include/asm-powerpc/mpc86xx.h
diff --git a/trunk/arch/powerpc/include/asm/mpc8xx.h b/trunk/include/asm-powerpc/mpc8xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpc8xx.h
rename to trunk/include/asm-powerpc/mpc8xx.h
diff --git a/trunk/arch/powerpc/include/asm/mpic.h b/trunk/include/asm-powerpc/mpic.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mpic.h
rename to trunk/include/asm-powerpc/mpic.h
diff --git a/trunk/arch/powerpc/include/asm/msgbuf.h b/trunk/include/asm-powerpc/msgbuf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/msgbuf.h
rename to trunk/include/asm-powerpc/msgbuf.h
diff --git a/trunk/arch/powerpc/include/asm/mutex.h b/trunk/include/asm-powerpc/mutex.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/mutex.h
rename to trunk/include/asm-powerpc/mutex.h
diff --git a/trunk/arch/powerpc/include/asm/nvram.h b/trunk/include/asm-powerpc/nvram.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/nvram.h
rename to trunk/include/asm-powerpc/nvram.h
diff --git a/trunk/arch/powerpc/include/asm/of_device.h b/trunk/include/asm-powerpc/of_device.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/of_device.h
rename to trunk/include/asm-powerpc/of_device.h
diff --git a/trunk/arch/powerpc/include/asm/of_platform.h b/trunk/include/asm-powerpc/of_platform.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/of_platform.h
rename to trunk/include/asm-powerpc/of_platform.h
diff --git a/trunk/arch/powerpc/include/asm/ohare.h b/trunk/include/asm-powerpc/ohare.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ohare.h
rename to trunk/include/asm-powerpc/ohare.h
diff --git a/trunk/arch/powerpc/include/asm/oprofile_impl.h b/trunk/include/asm-powerpc/oprofile_impl.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/oprofile_impl.h
rename to trunk/include/asm-powerpc/oprofile_impl.h
diff --git a/trunk/arch/powerpc/include/asm/pSeries_reconfig.h b/trunk/include/asm-powerpc/pSeries_reconfig.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pSeries_reconfig.h
rename to trunk/include/asm-powerpc/pSeries_reconfig.h
diff --git a/trunk/arch/powerpc/include/asm/paca.h b/trunk/include/asm-powerpc/paca.h
similarity index 99%
rename from trunk/arch/powerpc/include/asm/paca.h
rename to trunk/include/asm-powerpc/paca.h
index 6493a395508b..7b564444ff61 100644
--- a/trunk/arch/powerpc/include/asm/paca.h
+++ b/trunk/include/asm-powerpc/paca.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/paca.h
+ *
* This control block defines the PACA which defines the processor
* specific data for each logical processor on the system.
* There are some pointers defined that are utilized by PLIC.
diff --git a/trunk/arch/powerpc/include/asm/page.h b/trunk/include/asm-powerpc/page.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/page.h
rename to trunk/include/asm-powerpc/page.h
diff --git a/trunk/arch/powerpc/include/asm/page_32.h b/trunk/include/asm-powerpc/page_32.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/page_32.h
rename to trunk/include/asm-powerpc/page_32.h
diff --git a/trunk/arch/powerpc/include/asm/page_64.h b/trunk/include/asm-powerpc/page_64.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/page_64.h
rename to trunk/include/asm-powerpc/page_64.h
diff --git a/trunk/arch/powerpc/include/asm/param.h b/trunk/include/asm-powerpc/param.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/param.h
rename to trunk/include/asm-powerpc/param.h
diff --git a/trunk/arch/powerpc/include/asm/parport.h b/trunk/include/asm-powerpc/parport.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/parport.h
rename to trunk/include/asm-powerpc/parport.h
diff --git a/trunk/arch/powerpc/include/asm/pasemi_dma.h b/trunk/include/asm-powerpc/pasemi_dma.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pasemi_dma.h
rename to trunk/include/asm-powerpc/pasemi_dma.h
diff --git a/trunk/arch/powerpc/include/asm/pci-bridge.h b/trunk/include/asm-powerpc/pci-bridge.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pci-bridge.h
rename to trunk/include/asm-powerpc/pci-bridge.h
diff --git a/trunk/arch/powerpc/include/asm/pci.h b/trunk/include/asm-powerpc/pci.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pci.h
rename to trunk/include/asm-powerpc/pci.h
diff --git a/trunk/arch/powerpc/include/asm/percpu.h b/trunk/include/asm-powerpc/percpu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/percpu.h
rename to trunk/include/asm-powerpc/percpu.h
diff --git a/trunk/arch/powerpc/include/asm/pgalloc-32.h b/trunk/include/asm-powerpc/pgalloc-32.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgalloc-32.h
rename to trunk/include/asm-powerpc/pgalloc-32.h
diff --git a/trunk/arch/powerpc/include/asm/pgalloc-64.h b/trunk/include/asm-powerpc/pgalloc-64.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgalloc-64.h
rename to trunk/include/asm-powerpc/pgalloc-64.h
diff --git a/trunk/arch/powerpc/include/asm/pgalloc.h b/trunk/include/asm-powerpc/pgalloc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgalloc.h
rename to trunk/include/asm-powerpc/pgalloc.h
diff --git a/trunk/arch/powerpc/include/asm/pgtable-4k.h b/trunk/include/asm-powerpc/pgtable-4k.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgtable-4k.h
rename to trunk/include/asm-powerpc/pgtable-4k.h
diff --git a/trunk/arch/powerpc/include/asm/pgtable-64k.h b/trunk/include/asm-powerpc/pgtable-64k.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgtable-64k.h
rename to trunk/include/asm-powerpc/pgtable-64k.h
diff --git a/trunk/arch/powerpc/include/asm/pgtable-ppc32.h b/trunk/include/asm-powerpc/pgtable-ppc32.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgtable-ppc32.h
rename to trunk/include/asm-powerpc/pgtable-ppc32.h
diff --git a/trunk/arch/powerpc/include/asm/pgtable-ppc64.h b/trunk/include/asm-powerpc/pgtable-ppc64.h
similarity index 99%
rename from trunk/arch/powerpc/include/asm/pgtable-ppc64.h
rename to trunk/include/asm-powerpc/pgtable-ppc64.h
index db0b8f3b8807..74c6f380b805 100644
--- a/trunk/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/trunk/include/asm-powerpc/pgtable-ppc64.h
@@ -100,7 +100,7 @@
#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY)
-/* __pgprot defined in arch/powerpc/incliude/asm/page.h */
+/* __pgprot defined in asm-powerpc/page.h */
#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER)
diff --git a/trunk/arch/powerpc/include/asm/pgtable.h b/trunk/include/asm-powerpc/pgtable.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pgtable.h
rename to trunk/include/asm-powerpc/pgtable.h
diff --git a/trunk/arch/powerpc/include/asm/phyp_dump.h b/trunk/include/asm-powerpc/phyp_dump.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/phyp_dump.h
rename to trunk/include/asm-powerpc/phyp_dump.h
diff --git a/trunk/arch/powerpc/include/asm/pmac_feature.h b/trunk/include/asm-powerpc/pmac_feature.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pmac_feature.h
rename to trunk/include/asm-powerpc/pmac_feature.h
diff --git a/trunk/arch/powerpc/include/asm/pmac_low_i2c.h b/trunk/include/asm-powerpc/pmac_low_i2c.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pmac_low_i2c.h
rename to trunk/include/asm-powerpc/pmac_low_i2c.h
diff --git a/trunk/arch/powerpc/include/asm/pmac_pfunc.h b/trunk/include/asm-powerpc/pmac_pfunc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pmac_pfunc.h
rename to trunk/include/asm-powerpc/pmac_pfunc.h
diff --git a/trunk/arch/powerpc/include/asm/pmc.h b/trunk/include/asm-powerpc/pmc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pmc.h
rename to trunk/include/asm-powerpc/pmc.h
diff --git a/trunk/arch/powerpc/include/asm/pmi.h b/trunk/include/asm-powerpc/pmi.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/pmi.h
rename to trunk/include/asm-powerpc/pmi.h
diff --git a/trunk/arch/powerpc/include/asm/poll.h b/trunk/include/asm-powerpc/poll.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/poll.h
rename to trunk/include/asm-powerpc/poll.h
diff --git a/trunk/arch/powerpc/include/asm/posix_types.h b/trunk/include/asm-powerpc/posix_types.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/posix_types.h
rename to trunk/include/asm-powerpc/posix_types.h
diff --git a/trunk/arch/powerpc/include/asm/ppc-pci.h b/trunk/include/asm-powerpc/ppc-pci.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ppc-pci.h
rename to trunk/include/asm-powerpc/ppc-pci.h
diff --git a/trunk/arch/powerpc/include/asm/ppc4xx.h b/trunk/include/asm-powerpc/ppc4xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ppc4xx.h
rename to trunk/include/asm-powerpc/ppc4xx.h
diff --git a/trunk/arch/powerpc/include/asm/ppc_asm.h b/trunk/include/asm-powerpc/ppc_asm.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ppc_asm.h
rename to trunk/include/asm-powerpc/ppc_asm.h
diff --git a/trunk/arch/powerpc/include/asm/processor.h b/trunk/include/asm-powerpc/processor.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/processor.h
rename to trunk/include/asm-powerpc/processor.h
diff --git a/trunk/arch/powerpc/include/asm/prom.h b/trunk/include/asm-powerpc/prom.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/prom.h
rename to trunk/include/asm-powerpc/prom.h
diff --git a/trunk/arch/powerpc/include/asm/ps3.h b/trunk/include/asm-powerpc/ps3.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ps3.h
rename to trunk/include/asm-powerpc/ps3.h
diff --git a/trunk/arch/powerpc/include/asm/ps3av.h b/trunk/include/asm-powerpc/ps3av.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ps3av.h
rename to trunk/include/asm-powerpc/ps3av.h
diff --git a/trunk/arch/powerpc/include/asm/ps3fb.h b/trunk/include/asm-powerpc/ps3fb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ps3fb.h
rename to trunk/include/asm-powerpc/ps3fb.h
diff --git a/trunk/arch/powerpc/include/asm/ps3stor.h b/trunk/include/asm-powerpc/ps3stor.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ps3stor.h
rename to trunk/include/asm-powerpc/ps3stor.h
diff --git a/trunk/arch/powerpc/include/asm/ptrace.h b/trunk/include/asm-powerpc/ptrace.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ptrace.h
rename to trunk/include/asm-powerpc/ptrace.h
diff --git a/trunk/arch/powerpc/include/asm/qe.h b/trunk/include/asm-powerpc/qe.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/qe.h
rename to trunk/include/asm-powerpc/qe.h
diff --git a/trunk/arch/powerpc/include/asm/qe_ic.h b/trunk/include/asm-powerpc/qe_ic.h
similarity index 99%
rename from trunk/arch/powerpc/include/asm/qe_ic.h
rename to trunk/include/asm-powerpc/qe_ic.h
index 56a7745ca343..a779b2c9eaf1 100644
--- a/trunk/arch/powerpc/include/asm/qe_ic.h
+++ b/trunk/include/asm-powerpc/qe_ic.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/qe_ic.h
+ *
* Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved.
*
* Authors: Shlomi Gridish
diff --git a/trunk/arch/powerpc/include/asm/reg.h b/trunk/include/asm-powerpc/reg.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/reg.h
rename to trunk/include/asm-powerpc/reg.h
diff --git a/trunk/arch/powerpc/include/asm/reg_8xx.h b/trunk/include/asm-powerpc/reg_8xx.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/reg_8xx.h
rename to trunk/include/asm-powerpc/reg_8xx.h
diff --git a/trunk/arch/powerpc/include/asm/reg_booke.h b/trunk/include/asm-powerpc/reg_booke.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/reg_booke.h
rename to trunk/include/asm-powerpc/reg_booke.h
diff --git a/trunk/arch/powerpc/include/asm/reg_fsl_emb.h b/trunk/include/asm-powerpc/reg_fsl_emb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/reg_fsl_emb.h
rename to trunk/include/asm-powerpc/reg_fsl_emb.h
diff --git a/trunk/arch/powerpc/include/asm/resource.h b/trunk/include/asm-powerpc/resource.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/resource.h
rename to trunk/include/asm-powerpc/resource.h
diff --git a/trunk/arch/powerpc/include/asm/rheap.h b/trunk/include/asm-powerpc/rheap.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/rheap.h
rename to trunk/include/asm-powerpc/rheap.h
diff --git a/trunk/arch/powerpc/include/asm/rio.h b/trunk/include/asm-powerpc/rio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/rio.h
rename to trunk/include/asm-powerpc/rio.h
diff --git a/trunk/arch/powerpc/include/asm/rtas.h b/trunk/include/asm-powerpc/rtas.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/rtas.h
rename to trunk/include/asm-powerpc/rtas.h
diff --git a/trunk/arch/powerpc/include/asm/rtc.h b/trunk/include/asm-powerpc/rtc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/rtc.h
rename to trunk/include/asm-powerpc/rtc.h
diff --git a/trunk/arch/powerpc/include/asm/rwsem.h b/trunk/include/asm-powerpc/rwsem.h
similarity index 96%
rename from trunk/arch/powerpc/include/asm/rwsem.h
rename to trunk/include/asm-powerpc/rwsem.h
index 24cd9281ec37..a6cc93b78b98 100644
--- a/trunk/arch/powerpc/include/asm/rwsem.h
+++ b/trunk/include/asm-powerpc/rwsem.h
@@ -8,8 +8,8 @@
#ifdef __KERNEL__
/*
- * R/W semaphores for PPC using the stuff in lib/rwsem.c.
- * Adapted largely from include/asm-i386/rwsem.h
+ * include/asm-powerpc/rwsem.h: R/W semaphores for PPC using the stuff
+ * in lib/rwsem.c. Adapted largely from include/asm-i386/rwsem.h
* by Paul Mackerras .
*/
diff --git a/trunk/arch/powerpc/include/asm/scatterlist.h b/trunk/include/asm-powerpc/scatterlist.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/scatterlist.h
rename to trunk/include/asm-powerpc/scatterlist.h
diff --git a/trunk/arch/powerpc/include/asm/seccomp.h b/trunk/include/asm-powerpc/seccomp.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/seccomp.h
rename to trunk/include/asm-powerpc/seccomp.h
diff --git a/trunk/arch/powerpc/include/asm/sections.h b/trunk/include/asm-powerpc/sections.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sections.h
rename to trunk/include/asm-powerpc/sections.h
diff --git a/trunk/arch/powerpc/include/asm/sembuf.h b/trunk/include/asm-powerpc/sembuf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sembuf.h
rename to trunk/include/asm-powerpc/sembuf.h
diff --git a/trunk/arch/powerpc/include/asm/serial.h b/trunk/include/asm-powerpc/serial.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/serial.h
rename to trunk/include/asm-powerpc/serial.h
diff --git a/trunk/arch/powerpc/include/asm/setjmp.h b/trunk/include/asm-powerpc/setjmp.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/setjmp.h
rename to trunk/include/asm-powerpc/setjmp.h
diff --git a/trunk/arch/powerpc/include/asm/setup.h b/trunk/include/asm-powerpc/setup.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/setup.h
rename to trunk/include/asm-powerpc/setup.h
diff --git a/trunk/arch/powerpc/include/asm/shmbuf.h b/trunk/include/asm-powerpc/shmbuf.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/shmbuf.h
rename to trunk/include/asm-powerpc/shmbuf.h
diff --git a/trunk/arch/powerpc/include/asm/shmparam.h b/trunk/include/asm-powerpc/shmparam.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/shmparam.h
rename to trunk/include/asm-powerpc/shmparam.h
diff --git a/trunk/arch/powerpc/include/asm/sigcontext.h b/trunk/include/asm-powerpc/sigcontext.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sigcontext.h
rename to trunk/include/asm-powerpc/sigcontext.h
diff --git a/trunk/arch/powerpc/include/asm/siginfo.h b/trunk/include/asm-powerpc/siginfo.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/siginfo.h
rename to trunk/include/asm-powerpc/siginfo.h
diff --git a/trunk/arch/powerpc/include/asm/signal.h b/trunk/include/asm-powerpc/signal.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/signal.h
rename to trunk/include/asm-powerpc/signal.h
diff --git a/trunk/arch/powerpc/include/asm/smp.h b/trunk/include/asm-powerpc/smp.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/smp.h
rename to trunk/include/asm-powerpc/smp.h
diff --git a/trunk/arch/powerpc/include/asm/smu.h b/trunk/include/asm-powerpc/smu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/smu.h
rename to trunk/include/asm-powerpc/smu.h
diff --git a/trunk/arch/powerpc/include/asm/socket.h b/trunk/include/asm-powerpc/socket.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/socket.h
rename to trunk/include/asm-powerpc/socket.h
diff --git a/trunk/arch/powerpc/include/asm/sockios.h b/trunk/include/asm-powerpc/sockios.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sockios.h
rename to trunk/include/asm-powerpc/sockios.h
diff --git a/trunk/arch/powerpc/include/asm/sparsemem.h b/trunk/include/asm-powerpc/sparsemem.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sparsemem.h
rename to trunk/include/asm-powerpc/sparsemem.h
diff --git a/trunk/arch/powerpc/include/asm/spinlock.h b/trunk/include/asm-powerpc/spinlock.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spinlock.h
rename to trunk/include/asm-powerpc/spinlock.h
diff --git a/trunk/arch/powerpc/include/asm/spinlock_types.h b/trunk/include/asm-powerpc/spinlock_types.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spinlock_types.h
rename to trunk/include/asm-powerpc/spinlock_types.h
diff --git a/trunk/arch/powerpc/include/asm/spu.h b/trunk/include/asm-powerpc/spu.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spu.h
rename to trunk/include/asm-powerpc/spu.h
diff --git a/trunk/arch/powerpc/include/asm/spu_csa.h b/trunk/include/asm-powerpc/spu_csa.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spu_csa.h
rename to trunk/include/asm-powerpc/spu_csa.h
diff --git a/trunk/arch/powerpc/include/asm/spu_info.h b/trunk/include/asm-powerpc/spu_info.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spu_info.h
rename to trunk/include/asm-powerpc/spu_info.h
diff --git a/trunk/arch/powerpc/include/asm/spu_priv1.h b/trunk/include/asm-powerpc/spu_priv1.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/spu_priv1.h
rename to trunk/include/asm-powerpc/spu_priv1.h
diff --git a/trunk/arch/powerpc/include/asm/sstep.h b/trunk/include/asm-powerpc/sstep.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/sstep.h
rename to trunk/include/asm-powerpc/sstep.h
diff --git a/trunk/arch/powerpc/include/asm/stat.h b/trunk/include/asm-powerpc/stat.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/stat.h
rename to trunk/include/asm-powerpc/stat.h
diff --git a/trunk/arch/powerpc/include/asm/statfs.h b/trunk/include/asm-powerpc/statfs.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/statfs.h
rename to trunk/include/asm-powerpc/statfs.h
diff --git a/trunk/arch/powerpc/include/asm/string.h b/trunk/include/asm-powerpc/string.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/string.h
rename to trunk/include/asm-powerpc/string.h
diff --git a/trunk/arch/powerpc/include/asm/suspend.h b/trunk/include/asm-powerpc/suspend.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/suspend.h
rename to trunk/include/asm-powerpc/suspend.h
diff --git a/trunk/arch/powerpc/include/asm/synch.h b/trunk/include/asm-powerpc/synch.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/synch.h
rename to trunk/include/asm-powerpc/synch.h
diff --git a/trunk/arch/powerpc/include/asm/syscall.h b/trunk/include/asm-powerpc/syscall.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/syscall.h
rename to trunk/include/asm-powerpc/syscall.h
diff --git a/trunk/arch/powerpc/include/asm/syscalls.h b/trunk/include/asm-powerpc/syscalls.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/syscalls.h
rename to trunk/include/asm-powerpc/syscalls.h
diff --git a/trunk/arch/powerpc/include/asm/systbl.h b/trunk/include/asm-powerpc/systbl.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/systbl.h
rename to trunk/include/asm-powerpc/systbl.h
diff --git a/trunk/arch/powerpc/include/asm/system.h b/trunk/include/asm-powerpc/system.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/system.h
rename to trunk/include/asm-powerpc/system.h
diff --git a/trunk/arch/powerpc/include/asm/tce.h b/trunk/include/asm-powerpc/tce.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tce.h
rename to trunk/include/asm-powerpc/tce.h
diff --git a/trunk/arch/powerpc/include/asm/termbits.h b/trunk/include/asm-powerpc/termbits.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/termbits.h
rename to trunk/include/asm-powerpc/termbits.h
diff --git a/trunk/arch/powerpc/include/asm/termios.h b/trunk/include/asm-powerpc/termios.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/termios.h
rename to trunk/include/asm-powerpc/termios.h
diff --git a/trunk/arch/powerpc/include/asm/thread_info.h b/trunk/include/asm-powerpc/thread_info.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/thread_info.h
rename to trunk/include/asm-powerpc/thread_info.h
diff --git a/trunk/arch/powerpc/include/asm/time.h b/trunk/include/asm-powerpc/time.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/time.h
rename to trunk/include/asm-powerpc/time.h
diff --git a/trunk/arch/powerpc/include/asm/timex.h b/trunk/include/asm-powerpc/timex.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/timex.h
rename to trunk/include/asm-powerpc/timex.h
diff --git a/trunk/arch/powerpc/include/asm/tlb.h b/trunk/include/asm-powerpc/tlb.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tlb.h
rename to trunk/include/asm-powerpc/tlb.h
diff --git a/trunk/arch/powerpc/include/asm/tlbflush.h b/trunk/include/asm-powerpc/tlbflush.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tlbflush.h
rename to trunk/include/asm-powerpc/tlbflush.h
diff --git a/trunk/arch/powerpc/include/asm/topology.h b/trunk/include/asm-powerpc/topology.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/topology.h
rename to trunk/include/asm-powerpc/topology.h
diff --git a/trunk/arch/powerpc/include/asm/tsi108.h b/trunk/include/asm-powerpc/tsi108.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tsi108.h
rename to trunk/include/asm-powerpc/tsi108.h
diff --git a/trunk/arch/powerpc/include/asm/tsi108_irq.h b/trunk/include/asm-powerpc/tsi108_irq.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tsi108_irq.h
rename to trunk/include/asm-powerpc/tsi108_irq.h
diff --git a/trunk/arch/powerpc/include/asm/tsi108_pci.h b/trunk/include/asm-powerpc/tsi108_pci.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/tsi108_pci.h
rename to trunk/include/asm-powerpc/tsi108_pci.h
diff --git a/trunk/arch/powerpc/include/asm/types.h b/trunk/include/asm-powerpc/types.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/types.h
rename to trunk/include/asm-powerpc/types.h
diff --git a/trunk/arch/powerpc/include/asm/uaccess.h b/trunk/include/asm-powerpc/uaccess.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/uaccess.h
rename to trunk/include/asm-powerpc/uaccess.h
diff --git a/trunk/arch/powerpc/include/asm/ucc.h b/trunk/include/asm-powerpc/ucc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ucc.h
rename to trunk/include/asm-powerpc/ucc.h
diff --git a/trunk/arch/powerpc/include/asm/ucc_fast.h b/trunk/include/asm-powerpc/ucc_fast.h
similarity index 99%
rename from trunk/arch/powerpc/include/asm/ucc_fast.h
rename to trunk/include/asm-powerpc/ucc_fast.h
index 839aab8bf37d..fce16abe7ee1 100644
--- a/trunk/arch/powerpc/include/asm/ucc_fast.h
+++ b/trunk/include/asm-powerpc/ucc_fast.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/ucc_fast.h
+ *
* Internal header file for UCC FAST unit routines.
*
* Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved.
diff --git a/trunk/arch/powerpc/include/asm/ucc_slow.h b/trunk/include/asm-powerpc/ucc_slow.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ucc_slow.h
rename to trunk/include/asm-powerpc/ucc_slow.h
diff --git a/trunk/arch/powerpc/include/asm/ucontext.h b/trunk/include/asm-powerpc/ucontext.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/ucontext.h
rename to trunk/include/asm-powerpc/ucontext.h
diff --git a/trunk/arch/powerpc/include/asm/udbg.h b/trunk/include/asm-powerpc/udbg.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/udbg.h
rename to trunk/include/asm-powerpc/udbg.h
diff --git a/trunk/arch/powerpc/include/asm/uic.h b/trunk/include/asm-powerpc/uic.h
similarity index 95%
rename from trunk/arch/powerpc/include/asm/uic.h
rename to trunk/include/asm-powerpc/uic.h
index 597edfcae3d6..970eb7e2186a 100644
--- a/trunk/arch/powerpc/include/asm/uic.h
+++ b/trunk/include/asm-powerpc/uic.h
@@ -1,4 +1,6 @@
/*
+ * include/asm-powerpc/uic.h
+ *
* IBM PPC4xx UIC external definitions and structure.
*
* Maintainer: David Gibson
diff --git a/trunk/arch/powerpc/include/asm/unaligned.h b/trunk/include/asm-powerpc/unaligned.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/unaligned.h
rename to trunk/include/asm-powerpc/unaligned.h
diff --git a/trunk/arch/powerpc/include/asm/uninorth.h b/trunk/include/asm-powerpc/uninorth.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/uninorth.h
rename to trunk/include/asm-powerpc/uninorth.h
diff --git a/trunk/arch/powerpc/include/asm/unistd.h b/trunk/include/asm-powerpc/unistd.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/unistd.h
rename to trunk/include/asm-powerpc/unistd.h
diff --git a/trunk/arch/powerpc/include/asm/user.h b/trunk/include/asm-powerpc/user.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/user.h
rename to trunk/include/asm-powerpc/user.h
diff --git a/trunk/arch/powerpc/include/asm/vdso.h b/trunk/include/asm-powerpc/vdso.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/vdso.h
rename to trunk/include/asm-powerpc/vdso.h
diff --git a/trunk/arch/powerpc/include/asm/vdso_datapage.h b/trunk/include/asm-powerpc/vdso_datapage.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/vdso_datapage.h
rename to trunk/include/asm-powerpc/vdso_datapage.h
diff --git a/trunk/arch/powerpc/include/asm/vga.h b/trunk/include/asm-powerpc/vga.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/vga.h
rename to trunk/include/asm-powerpc/vga.h
diff --git a/trunk/arch/powerpc/include/asm/vio.h b/trunk/include/asm-powerpc/vio.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/vio.h
rename to trunk/include/asm-powerpc/vio.h
diff --git a/trunk/arch/powerpc/include/asm/xilinx_intc.h b/trunk/include/asm-powerpc/xilinx_intc.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/xilinx_intc.h
rename to trunk/include/asm-powerpc/xilinx_intc.h
diff --git a/trunk/arch/powerpc/include/asm/xmon.h b/trunk/include/asm-powerpc/xmon.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/xmon.h
rename to trunk/include/asm-powerpc/xmon.h
diff --git a/trunk/arch/powerpc/include/asm/xor.h b/trunk/include/asm-powerpc/xor.h
similarity index 100%
rename from trunk/arch/powerpc/include/asm/xor.h
rename to trunk/include/asm-powerpc/xor.h
diff --git a/trunk/arch/s390/include/asm/Kbuild b/trunk/include/asm-s390/Kbuild
similarity index 100%
rename from trunk/arch/s390/include/asm/Kbuild
rename to trunk/include/asm-s390/Kbuild
diff --git a/trunk/arch/s390/include/asm/airq.h b/trunk/include/asm-s390/airq.h
similarity index 100%
rename from trunk/arch/s390/include/asm/airq.h
rename to trunk/include/asm-s390/airq.h
diff --git a/trunk/arch/s390/include/asm/appldata.h b/trunk/include/asm-s390/appldata.h
similarity index 100%
rename from trunk/arch/s390/include/asm/appldata.h
rename to trunk/include/asm-s390/appldata.h
diff --git a/trunk/arch/s390/include/asm/atomic.h b/trunk/include/asm-s390/atomic.h
similarity index 100%
rename from trunk/arch/s390/include/asm/atomic.h
rename to trunk/include/asm-s390/atomic.h
diff --git a/trunk/arch/s390/include/asm/auxvec.h b/trunk/include/asm-s390/auxvec.h
similarity index 100%
rename from trunk/arch/s390/include/asm/auxvec.h
rename to trunk/include/asm-s390/auxvec.h
diff --git a/trunk/arch/s390/include/asm/bitops.h b/trunk/include/asm-s390/bitops.h
similarity index 100%
rename from trunk/arch/s390/include/asm/bitops.h
rename to trunk/include/asm-s390/bitops.h
diff --git a/trunk/arch/s390/include/asm/bug.h b/trunk/include/asm-s390/bug.h
similarity index 100%
rename from trunk/arch/s390/include/asm/bug.h
rename to trunk/include/asm-s390/bug.h
diff --git a/trunk/arch/s390/include/asm/bugs.h b/trunk/include/asm-s390/bugs.h
similarity index 100%
rename from trunk/arch/s390/include/asm/bugs.h
rename to trunk/include/asm-s390/bugs.h
diff --git a/trunk/arch/s390/include/asm/byteorder.h b/trunk/include/asm-s390/byteorder.h
similarity index 100%
rename from trunk/arch/s390/include/asm/byteorder.h
rename to trunk/include/asm-s390/byteorder.h
diff --git a/trunk/arch/s390/include/asm/cache.h b/trunk/include/asm-s390/cache.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cache.h
rename to trunk/include/asm-s390/cache.h
diff --git a/trunk/arch/s390/include/asm/cacheflush.h b/trunk/include/asm-s390/cacheflush.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cacheflush.h
rename to trunk/include/asm-s390/cacheflush.h
diff --git a/trunk/arch/s390/include/asm/ccwdev.h b/trunk/include/asm-s390/ccwdev.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ccwdev.h
rename to trunk/include/asm-s390/ccwdev.h
diff --git a/trunk/arch/s390/include/asm/ccwgroup.h b/trunk/include/asm-s390/ccwgroup.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ccwgroup.h
rename to trunk/include/asm-s390/ccwgroup.h
diff --git a/trunk/arch/s390/include/asm/checksum.h b/trunk/include/asm-s390/checksum.h
similarity index 100%
rename from trunk/arch/s390/include/asm/checksum.h
rename to trunk/include/asm-s390/checksum.h
diff --git a/trunk/arch/s390/include/asm/chpid.h b/trunk/include/asm-s390/chpid.h
similarity index 100%
rename from trunk/arch/s390/include/asm/chpid.h
rename to trunk/include/asm-s390/chpid.h
diff --git a/trunk/arch/s390/include/asm/chsc.h b/trunk/include/asm-s390/chsc.h
similarity index 100%
rename from trunk/arch/s390/include/asm/chsc.h
rename to trunk/include/asm-s390/chsc.h
diff --git a/trunk/arch/s390/include/asm/cio.h b/trunk/include/asm-s390/cio.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cio.h
rename to trunk/include/asm-s390/cio.h
diff --git a/trunk/arch/s390/include/asm/cmb.h b/trunk/include/asm-s390/cmb.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cmb.h
rename to trunk/include/asm-s390/cmb.h
diff --git a/trunk/arch/s390/include/asm/compat.h b/trunk/include/asm-s390/compat.h
similarity index 100%
rename from trunk/arch/s390/include/asm/compat.h
rename to trunk/include/asm-s390/compat.h
diff --git a/trunk/arch/s390/include/asm/cpcmd.h b/trunk/include/asm-s390/cpcmd.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cpcmd.h
rename to trunk/include/asm-s390/cpcmd.h
diff --git a/trunk/arch/s390/include/asm/cpu.h b/trunk/include/asm-s390/cpu.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cpu.h
rename to trunk/include/asm-s390/cpu.h
diff --git a/trunk/arch/s390/include/asm/cputime.h b/trunk/include/asm-s390/cputime.h
similarity index 100%
rename from trunk/arch/s390/include/asm/cputime.h
rename to trunk/include/asm-s390/cputime.h
diff --git a/trunk/arch/s390/include/asm/current.h b/trunk/include/asm-s390/current.h
similarity index 100%
rename from trunk/arch/s390/include/asm/current.h
rename to trunk/include/asm-s390/current.h
diff --git a/trunk/arch/s390/include/asm/dasd.h b/trunk/include/asm-s390/dasd.h
similarity index 100%
rename from trunk/arch/s390/include/asm/dasd.h
rename to trunk/include/asm-s390/dasd.h
diff --git a/trunk/arch/s390/include/asm/debug.h b/trunk/include/asm-s390/debug.h
similarity index 100%
rename from trunk/arch/s390/include/asm/debug.h
rename to trunk/include/asm-s390/debug.h
diff --git a/trunk/arch/s390/include/asm/delay.h b/trunk/include/asm-s390/delay.h
similarity index 100%
rename from trunk/arch/s390/include/asm/delay.h
rename to trunk/include/asm-s390/delay.h
diff --git a/trunk/arch/s390/include/asm/device.h b/trunk/include/asm-s390/device.h
similarity index 100%
rename from trunk/arch/s390/include/asm/device.h
rename to trunk/include/asm-s390/device.h
diff --git a/trunk/arch/s390/include/asm/diag.h b/trunk/include/asm-s390/diag.h
similarity index 100%
rename from trunk/arch/s390/include/asm/diag.h
rename to trunk/include/asm-s390/diag.h
diff --git a/trunk/arch/s390/include/asm/div64.h b/trunk/include/asm-s390/div64.h
similarity index 100%
rename from trunk/arch/s390/include/asm/div64.h
rename to trunk/include/asm-s390/div64.h
diff --git a/trunk/arch/s390/include/asm/dma.h b/trunk/include/asm-s390/dma.h
similarity index 100%
rename from trunk/arch/s390/include/asm/dma.h
rename to trunk/include/asm-s390/dma.h
diff --git a/trunk/arch/s390/include/asm/ebcdic.h b/trunk/include/asm-s390/ebcdic.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ebcdic.h
rename to trunk/include/asm-s390/ebcdic.h
diff --git a/trunk/arch/s390/include/asm/elf.h b/trunk/include/asm-s390/elf.h
similarity index 100%
rename from trunk/arch/s390/include/asm/elf.h
rename to trunk/include/asm-s390/elf.h
diff --git a/trunk/arch/s390/include/asm/emergency-restart.h b/trunk/include/asm-s390/emergency-restart.h
similarity index 100%
rename from trunk/arch/s390/include/asm/emergency-restart.h
rename to trunk/include/asm-s390/emergency-restart.h
diff --git a/trunk/arch/s390/include/asm/errno.h b/trunk/include/asm-s390/errno.h
similarity index 100%
rename from trunk/arch/s390/include/asm/errno.h
rename to trunk/include/asm-s390/errno.h
diff --git a/trunk/arch/s390/include/asm/etr.h b/trunk/include/asm-s390/etr.h
similarity index 100%
rename from trunk/arch/s390/include/asm/etr.h
rename to trunk/include/asm-s390/etr.h
diff --git a/trunk/arch/s390/include/asm/extmem.h b/trunk/include/asm-s390/extmem.h
similarity index 100%
rename from trunk/arch/s390/include/asm/extmem.h
rename to trunk/include/asm-s390/extmem.h
diff --git a/trunk/arch/s390/include/asm/fb.h b/trunk/include/asm-s390/fb.h
similarity index 100%
rename from trunk/arch/s390/include/asm/fb.h
rename to trunk/include/asm-s390/fb.h
diff --git a/trunk/arch/s390/include/asm/fcntl.h b/trunk/include/asm-s390/fcntl.h
similarity index 100%
rename from trunk/arch/s390/include/asm/fcntl.h
rename to trunk/include/asm-s390/fcntl.h
diff --git a/trunk/arch/s390/include/asm/fcx.h b/trunk/include/asm-s390/fcx.h
similarity index 100%
rename from trunk/arch/s390/include/asm/fcx.h
rename to trunk/include/asm-s390/fcx.h
diff --git a/trunk/arch/s390/include/asm/futex.h b/trunk/include/asm-s390/futex.h
similarity index 100%
rename from trunk/arch/s390/include/asm/futex.h
rename to trunk/include/asm-s390/futex.h
diff --git a/trunk/arch/s390/include/asm/hardirq.h b/trunk/include/asm-s390/hardirq.h
similarity index 100%
rename from trunk/arch/s390/include/asm/hardirq.h
rename to trunk/include/asm-s390/hardirq.h
diff --git a/trunk/arch/s390/include/asm/hugetlb.h b/trunk/include/asm-s390/hugetlb.h
similarity index 100%
rename from trunk/arch/s390/include/asm/hugetlb.h
rename to trunk/include/asm-s390/hugetlb.h
diff --git a/trunk/arch/s390/include/asm/idals.h b/trunk/include/asm-s390/idals.h
similarity index 100%
rename from trunk/arch/s390/include/asm/idals.h
rename to trunk/include/asm-s390/idals.h
diff --git a/trunk/arch/s390/include/asm/io.h b/trunk/include/asm-s390/io.h
similarity index 100%
rename from trunk/arch/s390/include/asm/io.h
rename to trunk/include/asm-s390/io.h
diff --git a/trunk/arch/s390/include/asm/ioctl.h b/trunk/include/asm-s390/ioctl.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ioctl.h
rename to trunk/include/asm-s390/ioctl.h
diff --git a/trunk/arch/s390/include/asm/ioctls.h b/trunk/include/asm-s390/ioctls.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ioctls.h
rename to trunk/include/asm-s390/ioctls.h
diff --git a/trunk/arch/s390/include/asm/ipcbuf.h b/trunk/include/asm-s390/ipcbuf.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ipcbuf.h
rename to trunk/include/asm-s390/ipcbuf.h
diff --git a/trunk/arch/s390/include/asm/ipl.h b/trunk/include/asm-s390/ipl.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ipl.h
rename to trunk/include/asm-s390/ipl.h
diff --git a/trunk/arch/s390/include/asm/irq.h b/trunk/include/asm-s390/irq.h
similarity index 100%
rename from trunk/arch/s390/include/asm/irq.h
rename to trunk/include/asm-s390/irq.h
diff --git a/trunk/arch/s390/include/asm/irq_regs.h b/trunk/include/asm-s390/irq_regs.h
similarity index 100%
rename from trunk/arch/s390/include/asm/irq_regs.h
rename to trunk/include/asm-s390/irq_regs.h
diff --git a/trunk/arch/s390/include/asm/irqflags.h b/trunk/include/asm-s390/irqflags.h
similarity index 100%
rename from trunk/arch/s390/include/asm/irqflags.h
rename to trunk/include/asm-s390/irqflags.h
diff --git a/trunk/arch/s390/include/asm/isc.h b/trunk/include/asm-s390/isc.h
similarity index 100%
rename from trunk/arch/s390/include/asm/isc.h
rename to trunk/include/asm-s390/isc.h
diff --git a/trunk/arch/s390/include/asm/itcw.h b/trunk/include/asm-s390/itcw.h
similarity index 100%
rename from trunk/arch/s390/include/asm/itcw.h
rename to trunk/include/asm-s390/itcw.h
diff --git a/trunk/arch/s390/include/asm/kdebug.h b/trunk/include/asm-s390/kdebug.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kdebug.h
rename to trunk/include/asm-s390/kdebug.h
diff --git a/trunk/arch/s390/include/asm/kexec.h b/trunk/include/asm-s390/kexec.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kexec.h
rename to trunk/include/asm-s390/kexec.h
diff --git a/trunk/arch/s390/include/asm/kmap_types.h b/trunk/include/asm-s390/kmap_types.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kmap_types.h
rename to trunk/include/asm-s390/kmap_types.h
diff --git a/trunk/arch/s390/include/asm/kprobes.h b/trunk/include/asm-s390/kprobes.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kprobes.h
rename to trunk/include/asm-s390/kprobes.h
diff --git a/trunk/arch/s390/include/asm/kvm.h b/trunk/include/asm-s390/kvm.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kvm.h
rename to trunk/include/asm-s390/kvm.h
diff --git a/trunk/arch/s390/include/asm/kvm_host.h b/trunk/include/asm-s390/kvm_host.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kvm_host.h
rename to trunk/include/asm-s390/kvm_host.h
diff --git a/trunk/arch/s390/include/asm/kvm_para.h b/trunk/include/asm-s390/kvm_para.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kvm_para.h
rename to trunk/include/asm-s390/kvm_para.h
diff --git a/trunk/arch/s390/include/asm/kvm_virtio.h b/trunk/include/asm-s390/kvm_virtio.h
similarity index 100%
rename from trunk/arch/s390/include/asm/kvm_virtio.h
rename to trunk/include/asm-s390/kvm_virtio.h
diff --git a/trunk/arch/s390/include/asm/linkage.h b/trunk/include/asm-s390/linkage.h
similarity index 100%
rename from trunk/arch/s390/include/asm/linkage.h
rename to trunk/include/asm-s390/linkage.h
diff --git a/trunk/arch/s390/include/asm/local.h b/trunk/include/asm-s390/local.h
similarity index 100%
rename from trunk/arch/s390/include/asm/local.h
rename to trunk/include/asm-s390/local.h
diff --git a/trunk/arch/s390/include/asm/lowcore.h b/trunk/include/asm-s390/lowcore.h
similarity index 100%
rename from trunk/arch/s390/include/asm/lowcore.h
rename to trunk/include/asm-s390/lowcore.h
diff --git a/trunk/arch/s390/include/asm/mathemu.h b/trunk/include/asm-s390/mathemu.h
similarity index 100%
rename from trunk/arch/s390/include/asm/mathemu.h
rename to trunk/include/asm-s390/mathemu.h
diff --git a/trunk/arch/s390/include/asm/mman.h b/trunk/include/asm-s390/mman.h
similarity index 100%
rename from trunk/arch/s390/include/asm/mman.h
rename to trunk/include/asm-s390/mman.h
diff --git a/trunk/arch/s390/include/asm/mmu.h b/trunk/include/asm-s390/mmu.h
similarity index 100%
rename from trunk/arch/s390/include/asm/mmu.h
rename to trunk/include/asm-s390/mmu.h
diff --git a/trunk/arch/s390/include/asm/mmu_context.h b/trunk/include/asm-s390/mmu_context.h
similarity index 100%
rename from trunk/arch/s390/include/asm/mmu_context.h
rename to trunk/include/asm-s390/mmu_context.h
diff --git a/trunk/arch/s390/include/asm/module.h b/trunk/include/asm-s390/module.h
similarity index 100%
rename from trunk/arch/s390/include/asm/module.h
rename to trunk/include/asm-s390/module.h
diff --git a/trunk/arch/s390/include/asm/monwriter.h b/trunk/include/asm-s390/monwriter.h
similarity index 100%
rename from trunk/arch/s390/include/asm/monwriter.h
rename to trunk/include/asm-s390/monwriter.h
diff --git a/trunk/arch/s390/include/asm/msgbuf.h b/trunk/include/asm-s390/msgbuf.h
similarity index 100%
rename from trunk/arch/s390/include/asm/msgbuf.h
rename to trunk/include/asm-s390/msgbuf.h
diff --git a/trunk/arch/s390/include/asm/mutex.h b/trunk/include/asm-s390/mutex.h
similarity index 100%
rename from trunk/arch/s390/include/asm/mutex.h
rename to trunk/include/asm-s390/mutex.h
diff --git a/trunk/arch/s390/include/asm/page.h b/trunk/include/asm-s390/page.h
similarity index 100%
rename from trunk/arch/s390/include/asm/page.h
rename to trunk/include/asm-s390/page.h
diff --git a/trunk/arch/s390/include/asm/param.h b/trunk/include/asm-s390/param.h
similarity index 100%
rename from trunk/arch/s390/include/asm/param.h
rename to trunk/include/asm-s390/param.h
diff --git a/trunk/arch/s390/include/asm/pci.h b/trunk/include/asm-s390/pci.h
similarity index 100%
rename from trunk/arch/s390/include/asm/pci.h
rename to trunk/include/asm-s390/pci.h
diff --git a/trunk/arch/s390/include/asm/percpu.h b/trunk/include/asm-s390/percpu.h
similarity index 100%
rename from trunk/arch/s390/include/asm/percpu.h
rename to trunk/include/asm-s390/percpu.h
diff --git a/trunk/arch/s390/include/asm/pgalloc.h b/trunk/include/asm-s390/pgalloc.h
similarity index 100%
rename from trunk/arch/s390/include/asm/pgalloc.h
rename to trunk/include/asm-s390/pgalloc.h
diff --git a/trunk/arch/s390/include/asm/pgtable.h b/trunk/include/asm-s390/pgtable.h
similarity index 100%
rename from trunk/arch/s390/include/asm/pgtable.h
rename to trunk/include/asm-s390/pgtable.h
diff --git a/trunk/arch/s390/include/asm/poll.h b/trunk/include/asm-s390/poll.h
similarity index 100%
rename from trunk/arch/s390/include/asm/poll.h
rename to trunk/include/asm-s390/poll.h
diff --git a/trunk/arch/s390/include/asm/posix_types.h b/trunk/include/asm-s390/posix_types.h
similarity index 100%
rename from trunk/arch/s390/include/asm/posix_types.h
rename to trunk/include/asm-s390/posix_types.h
diff --git a/trunk/arch/s390/include/asm/processor.h b/trunk/include/asm-s390/processor.h
similarity index 100%
rename from trunk/arch/s390/include/asm/processor.h
rename to trunk/include/asm-s390/processor.h
diff --git a/trunk/arch/s390/include/asm/ptrace.h b/trunk/include/asm-s390/ptrace.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ptrace.h
rename to trunk/include/asm-s390/ptrace.h
diff --git a/trunk/arch/s390/include/asm/qdio.h b/trunk/include/asm-s390/qdio.h
similarity index 100%
rename from trunk/arch/s390/include/asm/qdio.h
rename to trunk/include/asm-s390/qdio.h
diff --git a/trunk/arch/s390/include/asm/qeth.h b/trunk/include/asm-s390/qeth.h
similarity index 100%
rename from trunk/arch/s390/include/asm/qeth.h
rename to trunk/include/asm-s390/qeth.h
diff --git a/trunk/arch/s390/include/asm/reset.h b/trunk/include/asm-s390/reset.h
similarity index 100%
rename from trunk/arch/s390/include/asm/reset.h
rename to trunk/include/asm-s390/reset.h
diff --git a/trunk/arch/s390/include/asm/resource.h b/trunk/include/asm-s390/resource.h
similarity index 100%
rename from trunk/arch/s390/include/asm/resource.h
rename to trunk/include/asm-s390/resource.h
diff --git a/trunk/arch/s390/include/asm/rwsem.h b/trunk/include/asm-s390/rwsem.h
similarity index 100%
rename from trunk/arch/s390/include/asm/rwsem.h
rename to trunk/include/asm-s390/rwsem.h
diff --git a/trunk/arch/s390/include/asm/s390_ext.h b/trunk/include/asm-s390/s390_ext.h
similarity index 100%
rename from trunk/arch/s390/include/asm/s390_ext.h
rename to trunk/include/asm-s390/s390_ext.h
diff --git a/trunk/arch/s390/include/asm/s390_rdev.h b/trunk/include/asm-s390/s390_rdev.h
similarity index 100%
rename from trunk/arch/s390/include/asm/s390_rdev.h
rename to trunk/include/asm-s390/s390_rdev.h
diff --git a/trunk/arch/s390/include/asm/scatterlist.h b/trunk/include/asm-s390/scatterlist.h
similarity index 100%
rename from trunk/arch/s390/include/asm/scatterlist.h
rename to trunk/include/asm-s390/scatterlist.h
diff --git a/trunk/arch/s390/include/asm/schid.h b/trunk/include/asm-s390/schid.h
similarity index 100%
rename from trunk/arch/s390/include/asm/schid.h
rename to trunk/include/asm-s390/schid.h
diff --git a/trunk/arch/s390/include/asm/sclp.h b/trunk/include/asm-s390/sclp.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sclp.h
rename to trunk/include/asm-s390/sclp.h
diff --git a/trunk/arch/s390/include/asm/sections.h b/trunk/include/asm-s390/sections.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sections.h
rename to trunk/include/asm-s390/sections.h
diff --git a/trunk/arch/s390/include/asm/segment.h b/trunk/include/asm-s390/segment.h
similarity index 100%
rename from trunk/arch/s390/include/asm/segment.h
rename to trunk/include/asm-s390/segment.h
diff --git a/trunk/arch/s390/include/asm/sembuf.h b/trunk/include/asm-s390/sembuf.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sembuf.h
rename to trunk/include/asm-s390/sembuf.h
diff --git a/trunk/arch/s390/include/asm/setup.h b/trunk/include/asm-s390/setup.h
similarity index 100%
rename from trunk/arch/s390/include/asm/setup.h
rename to trunk/include/asm-s390/setup.h
diff --git a/trunk/arch/s390/include/asm/sfp-machine.h b/trunk/include/asm-s390/sfp-machine.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sfp-machine.h
rename to trunk/include/asm-s390/sfp-machine.h
diff --git a/trunk/arch/s390/include/asm/sfp-util.h b/trunk/include/asm-s390/sfp-util.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sfp-util.h
rename to trunk/include/asm-s390/sfp-util.h
diff --git a/trunk/arch/s390/include/asm/shmbuf.h b/trunk/include/asm-s390/shmbuf.h
similarity index 100%
rename from trunk/arch/s390/include/asm/shmbuf.h
rename to trunk/include/asm-s390/shmbuf.h
diff --git a/trunk/arch/s390/include/asm/shmparam.h b/trunk/include/asm-s390/shmparam.h
similarity index 100%
rename from trunk/arch/s390/include/asm/shmparam.h
rename to trunk/include/asm-s390/shmparam.h
diff --git a/trunk/arch/s390/include/asm/sigcontext.h b/trunk/include/asm-s390/sigcontext.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sigcontext.h
rename to trunk/include/asm-s390/sigcontext.h
diff --git a/trunk/arch/s390/include/asm/siginfo.h b/trunk/include/asm-s390/siginfo.h
similarity index 100%
rename from trunk/arch/s390/include/asm/siginfo.h
rename to trunk/include/asm-s390/siginfo.h
diff --git a/trunk/arch/s390/include/asm/signal.h b/trunk/include/asm-s390/signal.h
similarity index 100%
rename from trunk/arch/s390/include/asm/signal.h
rename to trunk/include/asm-s390/signal.h
diff --git a/trunk/arch/s390/include/asm/sigp.h b/trunk/include/asm-s390/sigp.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sigp.h
rename to trunk/include/asm-s390/sigp.h
diff --git a/trunk/arch/s390/include/asm/smp.h b/trunk/include/asm-s390/smp.h
similarity index 100%
rename from trunk/arch/s390/include/asm/smp.h
rename to trunk/include/asm-s390/smp.h
diff --git a/trunk/arch/s390/include/asm/socket.h b/trunk/include/asm-s390/socket.h
similarity index 100%
rename from trunk/arch/s390/include/asm/socket.h
rename to trunk/include/asm-s390/socket.h
diff --git a/trunk/arch/s390/include/asm/sockios.h b/trunk/include/asm-s390/sockios.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sockios.h
rename to trunk/include/asm-s390/sockios.h
diff --git a/trunk/arch/s390/include/asm/sparsemem.h b/trunk/include/asm-s390/sparsemem.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sparsemem.h
rename to trunk/include/asm-s390/sparsemem.h
diff --git a/trunk/arch/s390/include/asm/spinlock.h b/trunk/include/asm-s390/spinlock.h
similarity index 100%
rename from trunk/arch/s390/include/asm/spinlock.h
rename to trunk/include/asm-s390/spinlock.h
diff --git a/trunk/arch/s390/include/asm/spinlock_types.h b/trunk/include/asm-s390/spinlock_types.h
similarity index 100%
rename from trunk/arch/s390/include/asm/spinlock_types.h
rename to trunk/include/asm-s390/spinlock_types.h
diff --git a/trunk/arch/s390/include/asm/stat.h b/trunk/include/asm-s390/stat.h
similarity index 100%
rename from trunk/arch/s390/include/asm/stat.h
rename to trunk/include/asm-s390/stat.h
diff --git a/trunk/arch/s390/include/asm/statfs.h b/trunk/include/asm-s390/statfs.h
similarity index 100%
rename from trunk/arch/s390/include/asm/statfs.h
rename to trunk/include/asm-s390/statfs.h
diff --git a/trunk/arch/s390/include/asm/string.h b/trunk/include/asm-s390/string.h
similarity index 100%
rename from trunk/arch/s390/include/asm/string.h
rename to trunk/include/asm-s390/string.h
diff --git a/trunk/arch/s390/include/asm/suspend.h b/trunk/include/asm-s390/suspend.h
similarity index 100%
rename from trunk/arch/s390/include/asm/suspend.h
rename to trunk/include/asm-s390/suspend.h
diff --git a/trunk/arch/s390/include/asm/sysinfo.h b/trunk/include/asm-s390/sysinfo.h
similarity index 100%
rename from trunk/arch/s390/include/asm/sysinfo.h
rename to trunk/include/asm-s390/sysinfo.h
diff --git a/trunk/arch/s390/include/asm/system.h b/trunk/include/asm-s390/system.h
similarity index 100%
rename from trunk/arch/s390/include/asm/system.h
rename to trunk/include/asm-s390/system.h
diff --git a/trunk/arch/s390/include/asm/tape390.h b/trunk/include/asm-s390/tape390.h
similarity index 100%
rename from trunk/arch/s390/include/asm/tape390.h
rename to trunk/include/asm-s390/tape390.h
diff --git a/trunk/arch/s390/include/asm/termbits.h b/trunk/include/asm-s390/termbits.h
similarity index 100%
rename from trunk/arch/s390/include/asm/termbits.h
rename to trunk/include/asm-s390/termbits.h
diff --git a/trunk/arch/s390/include/asm/termios.h b/trunk/include/asm-s390/termios.h
similarity index 100%
rename from trunk/arch/s390/include/asm/termios.h
rename to trunk/include/asm-s390/termios.h
diff --git a/trunk/arch/s390/include/asm/thread_info.h b/trunk/include/asm-s390/thread_info.h
similarity index 100%
rename from trunk/arch/s390/include/asm/thread_info.h
rename to trunk/include/asm-s390/thread_info.h
diff --git a/trunk/arch/s390/include/asm/timer.h b/trunk/include/asm-s390/timer.h
similarity index 100%
rename from trunk/arch/s390/include/asm/timer.h
rename to trunk/include/asm-s390/timer.h
diff --git a/trunk/arch/s390/include/asm/timex.h b/trunk/include/asm-s390/timex.h
similarity index 100%
rename from trunk/arch/s390/include/asm/timex.h
rename to trunk/include/asm-s390/timex.h
diff --git a/trunk/arch/s390/include/asm/tlb.h b/trunk/include/asm-s390/tlb.h
similarity index 100%
rename from trunk/arch/s390/include/asm/tlb.h
rename to trunk/include/asm-s390/tlb.h
diff --git a/trunk/arch/s390/include/asm/tlbflush.h b/trunk/include/asm-s390/tlbflush.h
similarity index 100%
rename from trunk/arch/s390/include/asm/tlbflush.h
rename to trunk/include/asm-s390/tlbflush.h
diff --git a/trunk/arch/s390/include/asm/todclk.h b/trunk/include/asm-s390/todclk.h
similarity index 100%
rename from trunk/arch/s390/include/asm/todclk.h
rename to trunk/include/asm-s390/todclk.h
diff --git a/trunk/arch/s390/include/asm/topology.h b/trunk/include/asm-s390/topology.h
similarity index 100%
rename from trunk/arch/s390/include/asm/topology.h
rename to trunk/include/asm-s390/topology.h
diff --git a/trunk/arch/s390/include/asm/types.h b/trunk/include/asm-s390/types.h
similarity index 100%
rename from trunk/arch/s390/include/asm/types.h
rename to trunk/include/asm-s390/types.h
diff --git a/trunk/arch/s390/include/asm/uaccess.h b/trunk/include/asm-s390/uaccess.h
similarity index 100%
rename from trunk/arch/s390/include/asm/uaccess.h
rename to trunk/include/asm-s390/uaccess.h
diff --git a/trunk/arch/s390/include/asm/ucontext.h b/trunk/include/asm-s390/ucontext.h
similarity index 100%
rename from trunk/arch/s390/include/asm/ucontext.h
rename to trunk/include/asm-s390/ucontext.h
diff --git a/trunk/arch/s390/include/asm/unaligned.h b/trunk/include/asm-s390/unaligned.h
similarity index 100%
rename from trunk/arch/s390/include/asm/unaligned.h
rename to trunk/include/asm-s390/unaligned.h
diff --git a/trunk/arch/s390/include/asm/unistd.h b/trunk/include/asm-s390/unistd.h
similarity index 100%
rename from trunk/arch/s390/include/asm/unistd.h
rename to trunk/include/asm-s390/unistd.h
diff --git a/trunk/arch/s390/include/asm/user.h b/trunk/include/asm-s390/user.h
similarity index 100%
rename from trunk/arch/s390/include/asm/user.h
rename to trunk/include/asm-s390/user.h
diff --git a/trunk/arch/s390/include/asm/vtoc.h b/trunk/include/asm-s390/vtoc.h
similarity index 100%
rename from trunk/arch/s390/include/asm/vtoc.h
rename to trunk/include/asm-s390/vtoc.h
diff --git a/trunk/arch/s390/include/asm/xor.h b/trunk/include/asm-s390/xor.h
similarity index 100%
rename from trunk/arch/s390/include/asm/xor.h
rename to trunk/include/asm-s390/xor.h
diff --git a/trunk/arch/s390/include/asm/zcrypt.h b/trunk/include/asm-s390/zcrypt.h
similarity index 100%
rename from trunk/arch/s390/include/asm/zcrypt.h
rename to trunk/include/asm-s390/zcrypt.h
diff --git a/trunk/include/linux/ihex.h b/trunk/include/linux/ihex.h
index 31d8629e75a1..2baace2788a7 100644
--- a/trunk/include/linux/ihex.h
+++ b/trunk/include/linux/ihex.h
@@ -18,7 +18,7 @@ struct ihex_binrec {
__be32 addr;
__be16 len;
uint8_t data[0];
-} __attribute__((packed));
+} __attribute__((aligned(4)));
/* Find the next record, taking into account the 4-byte alignment */
static inline const struct ihex_binrec *
diff --git a/trunk/include/linux/mISDNif.h b/trunk/include/linux/mISDNif.h
index 8f2d60da04e7..5c948f337817 100644
--- a/trunk/include/linux/mISDNif.h
+++ b/trunk/include/linux/mISDNif.h
@@ -37,7 +37,7 @@
*/
#define MISDN_MAJOR_VERSION 1
#define MISDN_MINOR_VERSION 0
-#define MISDN_RELEASE 19
+#define MISDN_RELEASE 18
/* primitives for information exchange
* generell format
@@ -242,8 +242,7 @@ struct mISDNhead {
#define TEI_SAPI 63
#define CTRL_SAPI 0
-#define MISDN_MAX_CHANNEL 127
-#define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3)
+#define MISDN_CHMAP_SIZE 4
#define SOL_MISDN 0
@@ -276,32 +275,11 @@ struct mISDN_devinfo {
u_int Dprotocols;
u_int Bprotocols;
u_int protocol;
- u_char channelmap[MISDN_CHMAP_SIZE];
+ u_long channelmap[MISDN_CHMAP_SIZE];
u_int nrbchan;
char name[MISDN_MAX_IDLEN];
};
-static inline int
-test_channelmap(u_int nr, u_char *map)
-{
- if (nr <= MISDN_MAX_CHANNEL)
- return map[nr >> 3] & (1 << (nr & 7));
- else
- return 0;
-}
-
-static inline void
-set_channelmap(u_int nr, u_char *map)
-{
- map[nr >> 3] |= (1 << (nr & 7));
-}
-
-static inline void
-clear_channelmap(u_int nr, u_char *map)
-{
- map[nr >> 3] &= ~(1 << (nr & 7));
-}
-
/* CONTROL_CHANNEL parameters */
#define MISDN_CTRL_GETOP 0x0000
#define MISDN_CTRL_LOOP 0x0001
@@ -427,7 +405,7 @@ struct mISDNdevice {
u_int Dprotocols;
u_int Bprotocols;
u_int nrbchan;
- u_char channelmap[MISDN_CHMAP_SIZE];
+ u_long channelmap[MISDN_CHMAP_SIZE];
struct list_head bchannels;
struct mISDNchannel *teimgr;
struct device dev;
@@ -452,7 +430,7 @@ struct mISDNstack {
#endif
};
-/* global alloc/queue functions */
+/* global alloc/queue dunctions */
static inline struct sk_buff *
mI_alloc_skb(unsigned int len, gfp_t gfp_mask)
diff --git a/trunk/include/linux/maple.h b/trunk/include/linux/maple.h
index c23d3f51ba40..c853b1066018 100644
--- a/trunk/include/linux/maple.h
+++ b/trunk/include/linux/maple.h
@@ -51,6 +51,7 @@ struct maple_devinfo {
struct maple_device {
struct maple_driver *driver;
struct mapleq *mq;
+ void *private_data;
void (*callback) (struct mapleq * mq);
unsigned long when, interval, function;
struct maple_devinfo devinfo;
@@ -69,9 +70,7 @@ void maple_getcond_callback(struct maple_device *dev,
void (*callback) (struct mapleq * mq),
unsigned long interval,
unsigned long function);
-int maple_driver_register(struct maple_driver *);
-void maple_driver_unregister(struct maple_driver *);
-
+int maple_driver_register(struct device_driver *drv);
int maple_add_packet_sleeps(struct maple_device *mdev, u32 function,
u32 command, u32 length, void *data);
void maple_clear_dev(struct maple_device *mdev);
@@ -79,7 +78,4 @@ void maple_clear_dev(struct maple_device *mdev);
#define to_maple_dev(n) container_of(n, struct maple_device, dev)
#define to_maple_driver(n) container_of(n, struct maple_driver, drv)
-#define maple_get_drvdata(d) dev_get_drvdata(&(d)->dev)
-#define maple_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p))
-
#endif /* __LINUX_MAPLE_H */
diff --git a/trunk/include/linux/parser.h b/trunk/include/linux/parser.h
index 7dcd05075756..cc554ca8bc78 100644
--- a/trunk/include/linux/parser.h
+++ b/trunk/include/linux/parser.h
@@ -14,7 +14,7 @@ struct match_token {
const char *pattern;
};
-typedef struct match_token match_table_t[];
+typedef const struct match_token match_table_t[];
/* Maximum number of arguments that match_token will find in a pattern */
enum {MAX_OPT_ARGS = 3};
diff --git a/trunk/include/linux/tracehook.h b/trunk/include/linux/tracehook.h
index ab3ef7aefa95..12532839f508 100644
--- a/trunk/include/linux/tracehook.h
+++ b/trunk/include/linux/tracehook.h
@@ -487,9 +487,6 @@ static inline int tracehook_notify_jctl(int notify, int why)
return notify || (current->ptrace & PT_PTRACED);
}
-#define DEATH_REAP -1
-#define DEATH_DELAYED_GROUP_LEADER -2
-
/**
* tracehook_notify_death - task is dead, ready to notify parent
* @task: @current task now exiting
@@ -504,6 +501,8 @@ static inline int tracehook_notify_jctl(int notify, int why)
*
* Called with write_lock_irq(&tasklist_lock) held.
*/
+#define DEATH_REAP -1
+#define DEATH_DELAYED_GROUP_LEADER -2
static inline int tracehook_notify_death(struct task_struct *task,
void **death_cookie, int group_dead)
{
diff --git a/trunk/include/linux/vt_kern.h b/trunk/include/linux/vt_kern.h
index 1c78d56c57e5..8c8119ffee12 100644
--- a/trunk/include/linux/vt_kern.h
+++ b/trunk/include/linux/vt_kern.h
@@ -86,7 +86,6 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
#define con_copy_unimap(d, s) (0)
#define con_get_unimap(vc, ct, uct, list) (-EINVAL)
#define con_free_unimap(vc) do { ; } while (0)
-#define con_protect_unimap(vc, rdonly) do { ; } while (0)
#define vc_translate(vc, c) (c)
#endif
diff --git a/trunk/include/scsi/scsi_device.h b/trunk/include/scsi/scsi_device.h
index 9cecc409f0f8..291d56a19167 100644
--- a/trunk/include/scsi/scsi_device.h
+++ b/trunk/include/scsi/scsi_device.h
@@ -140,7 +140,8 @@ struct scsi_device {
unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */
unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */
unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */
- unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */
+ unsigned last_sector_bug:1; /* do not use multisector accesses on
+ SD_LAST_BUGGY_SECTORS */
DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
struct list_head event_list; /* asserted events */
diff --git a/trunk/kernel/auditsc.c b/trunk/kernel/auditsc.c
index 972f8e61d36a..496c3dd37276 100644
--- a/trunk/kernel/auditsc.c
+++ b/trunk/kernel/auditsc.c
@@ -243,9 +243,6 @@ static inline int open_arg(int flags, int mask)
static int audit_match_perm(struct audit_context *ctx, int mask)
{
- if (unlikely(!ctx))
- return 0;
-
unsigned n = ctx->major;
switch (audit_classify_syscall(ctx->arch, n)) {
case 0: /* native */
@@ -287,10 +284,6 @@ static int audit_match_filetype(struct audit_context *ctx, int which)
{
unsigned index = which & ~S_IFMT;
mode_t mode = which & S_IFMT;
-
- if (unlikely(!ctx))
- return 0;
-
if (index >= ctx->name_count)
return 0;
if (ctx->names[index].ino == -1)
diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c
index 04160d277e7a..21f7da94662e 100644
--- a/trunk/kernel/sched.c
+++ b/trunk/kernel/sched.c
@@ -5004,21 +5004,19 @@ static int __sched_setscheduler(struct task_struct *p, int policy,
return -EPERM;
}
- if (user) {
#ifdef CONFIG_RT_GROUP_SCHED
- /*
- * Do not allow realtime tasks into groups that have no runtime
- * assigned.
- */
- if (rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0)
- return -EPERM;
+ /*
+ * Do not allow realtime tasks into groups that have no runtime
+ * assigned.
+ */
+ if (user
+ && rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0)
+ return -EPERM;
#endif
- retval = security_task_setscheduler(p, policy, param);
- if (retval)
- return retval;
- }
-
+ retval = security_task_setscheduler(p, policy, param);
+ if (retval)
+ return retval;
/*
* make sure no PI-waiters arrive (or leave) while we are
* changing the priority of the task:
diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c
index a472bcd4b061..6793b9c68107 100644
--- a/trunk/mm/memory.c
+++ b/trunk/mm/memory.c
@@ -2765,26 +2765,16 @@ int make_pages_present(unsigned long addr, unsigned long end)
vma = find_vma(current->mm, addr);
if (!vma)
- return -ENOMEM;
+ return -1;
write = (vma->vm_flags & VM_WRITE) != 0;
BUG_ON(addr >= end);
BUG_ON(end > vma->vm_end);
len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE;
ret = get_user_pages(current, current->mm, addr,
len, write, 0, NULL, NULL);
- if (ret < 0) {
- /*
- SUS require strange return value to mlock
- - invalid addr generate to ENOMEM.
- - out of memory should generate EAGAIN.
- */
- if (ret == -EFAULT)
- ret = -ENOMEM;
- else if (ret == -ENOMEM)
- ret = -EAGAIN;
+ if (ret < 0)
return ret;
- }
- return ret == len ? 0 : -ENOMEM;
+ return ret == len ? 0 : -1;
}
#if !defined(__HAVE_ARCH_GATE_AREA)
diff --git a/trunk/mm/mlock.c b/trunk/mm/mlock.c
index 01fbe93eff5c..7b2656055d6a 100644
--- a/trunk/mm/mlock.c
+++ b/trunk/mm/mlock.c
@@ -78,6 +78,8 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
mm->locked_vm -= pages;
out:
+ if (ret == -ENOMEM)
+ ret = -EAGAIN;
return ret;
}
diff --git a/trunk/mm/nommu.c b/trunk/mm/nommu.c
index ed75bc962fbe..5edccd9c9218 100644
--- a/trunk/mm/nommu.c
+++ b/trunk/mm/nommu.c
@@ -266,27 +266,6 @@ void *vmalloc_node(unsigned long size, int node)
}
EXPORT_SYMBOL(vmalloc_node);
-#ifndef PAGE_KERNEL_EXEC
-# define PAGE_KERNEL_EXEC PAGE_KERNEL
-#endif
-
-/**
- * vmalloc_exec - allocate virtually contiguous, executable memory
- * @size: allocation size
- *
- * Kernel-internal function to allocate enough pages to cover @size
- * the page level allocator and map them into contiguous and
- * executable kernel virtual space.
- *
- * For tight control over page level allocator and protection flags
- * use __vmalloc() instead.
- */
-
-void *vmalloc_exec(unsigned long size)
-{
- return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
-}
-
/**
* vmalloc_32 - allocate virtually contiguous memory (32bit addressable)
* @size: allocation size
diff --git a/trunk/scripts/kconfig/conf.c b/trunk/scripts/kconfig/conf.c
index 36b5eedcdc75..9fba838c7069 100644
--- a/trunk/scripts/kconfig/conf.c
+++ b/trunk/scripts/kconfig/conf.c
@@ -596,7 +596,7 @@ int main(int ac, char **av)
break;
}
- if (conf_write(NULL)) {
+ if (conf_get_changed() && conf_write(NULL)) {
fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
exit(1);
}
diff --git a/trunk/scripts/kconfig/confdata.c b/trunk/scripts/kconfig/confdata.c
index df6a188b9930..07597611cc50 100644
--- a/trunk/scripts/kconfig/confdata.c
+++ b/trunk/scripts/kconfig/confdata.c
@@ -222,8 +222,10 @@ int conf_read_simple(const char *name, int def)
continue;
if (def == S_DEF_USER) {
sym = sym_find(line + 9);
- if (!sym)
+ if (!sym) {
+ conf_warning("trying to assign nonexistent symbol %s", line + 9);
break;
+ }
} else {
sym = sym_lookup(line + 9, 0);
if (sym->type == S_UNKNOWN)
@@ -259,8 +261,10 @@ int conf_read_simple(const char *name, int def)
}
if (def == S_DEF_USER) {
sym = sym_find(line + 7);
- if (!sym)
+ if (!sym) {
+ conf_warning("trying to assign nonexistent symbol %s", line + 7);
break;
+ }
} else {
sym = sym_lookup(line + 7, 0);
if (sym->type == S_UNKNOWN)
diff --git a/trunk/sound/core/seq/oss/seq_oss_synth.c b/trunk/sound/core/seq/oss/seq_oss_synth.c
index e024e4588b82..558dadbf45f1 100644
--- a/trunk/sound/core/seq/oss/seq_oss_synth.c
+++ b/trunk/sound/core/seq/oss/seq_oss_synth.c
@@ -604,9 +604,6 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
{
struct seq_oss_synth *rec;
- if (dev < 0 || dev >= dp->max_synthdev)
- return -ENXIO;
-
if (dp->synths[dev].is_midi) {
struct midi_info minf;
snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);