diff options
Diffstat (limited to 'arch')
60 files changed, 245 insertions, 134 deletions
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 4d25e49a14f..9bd1870d980 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -26,9 +26,9 @@ #include <linux/fs.h> #include <linux/file.h> #include <linux/utsname.h> +#include <linux/ipc.h> #include <asm/uaccess.h> -#include <asm/ipc.h> extern unsigned long do_mremap(unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 8e2f9bc3368..e8b98046895 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -80,7 +80,7 @@ #include <linux/sem.h> #include <linux/socket.h> #include <linux/net.h> -#include <asm/ipc.h> +#include <linux/ipc.h> #include <asm/uaccess.h> struct oldabi_stat64 { diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 992ca435a92..29696e46ed6 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c @@ -1272,7 +1272,7 @@ struct sysdev_class dma_sysclass = { /* kmem cache implementation */ -static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f) +static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p) { memset(p, 0, sizeof(struct s3c2410_dma_buf)); } diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index 099212d4567..177fea8f7b7 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c @@ -21,13 +21,13 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, int direction) switch (direction) { case DMA_FROM_DEVICE: /* invalidate only */ - dma_cache_inv(vaddr, size); + invalidate_dcache_region(vaddr, size); break; case DMA_TO_DEVICE: /* writeback only */ - dma_cache_wback(vaddr, size); + clean_dcache_region(vaddr, size); break; case DMA_BIDIRECTIONAL: /* writeback and invalidate */ - dma_cache_wback_inv(vaddr, size); + flush_dcache_region(vaddr, size); break; default: BUG(); diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c index 0aa0e0ebb3a..514359b8122 100644 --- a/arch/cris/kernel/sys_cris.c +++ b/arch/cris/kernel/sys_cris.c @@ -21,9 +21,9 @@ #include <linux/stat.h> #include <linux/mman.h> #include <linux/file.h> +#include <linux/ipc.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/segment.h> /* diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c index 6fbe2665c57..04c6b1677cc 100644 --- a/arch/frv/kernel/sys_frv.c +++ b/arch/frv/kernel/sys_frv.c @@ -23,10 +23,10 @@ #include <linux/file.h> #include <linux/utsname.h> #include <linux/syscalls.h> +#include <linux/ipc.h> #include <asm/setup.h> #include <asm/uaccess.h> -#include <asm/ipc.h> /* * sys_pipe() is the normal C calling standard for creating diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c index ddc62727dc9..00608be6d56 100644 --- a/arch/h8300/kernel/sys_h8300.c +++ b/arch/h8300/kernel/sys_h8300.c @@ -19,12 +19,12 @@ #include <linux/file.h> #include <linux/utsname.h> #include <linux/fs.h> +#include <linux/ipc.h> #include <asm/setup.h> #include <asm/uaccess.h> #include <asm/cachectl.h> #include <asm/traps.h> -#include <asm/ipc.h> #include <asm/unistd.h> /* diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index bf9aafad497..7a95c58947e 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -831,12 +831,13 @@ config CRASH_DUMP depends on HIGHMEM help Generate crash dump after being started by kexec. - This should be normally only set in special crash dump kernels + This should be normally only set in special crash dump kernels which are loaded in the main kernel with kexec-tools into a specially reserved region and then later executed after a crash by kdump/kexec. The crash dump kernel must be compiled - to a memory address not used by the main kernel or BIOS using - PHYSICAL_START. + to a memory address not used by the main kernel or BIOS using + PHYSICAL_START, or it must be built as a relocatable image + (CONFIG_RELOCATABLE=y). For more details see Documentation/kdump/kdump.txt config PHYSICAL_START @@ -882,17 +883,17 @@ config PHYSICAL_START Don't change this unless you know what you are doing. config RELOCATABLE - bool "Build a relocatable kernel(EXPERIMENTAL)" + bool "Build a relocatable kernel (EXPERIMENTAL)" depends on EXPERIMENTAL help This builds a kernel image that retains relocation information - so it can be loaded someplace besides the default 1MB. + so it can be loaded someplace besides the default 1MB. The relocations tend to make the kernel binary about 10% larger, - but are discarded at runtime. + but are discarded at runtime. One use is for the kexec on panic case where the recovery kernel - must live at a different physical address than the primary - kernel. + must live at a different physical address than the primary + kernel. config PHYSICAL_ALIGN hex "Alignment value to which kernel should be aligned" @@ -1256,7 +1257,6 @@ source "fs/Kconfig" menuconfig INSTRUMENTATION bool "Instrumentation Support" - depends on EXPERIMENTAL default y ---help--- Say Y here to get to see options related to performance measurement, diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 59b91ac861a..c60532d93c5 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -593,7 +593,6 @@ config IRQ_PER_CPU source "arch/ia64/hp/sim/Kconfig" menu "Instrumentation Support" - depends on EXPERIMENTAL source "arch/ia64/oprofile/Kconfig" diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 1cfab326fb7..f6ae3ec9381 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c @@ -240,7 +240,7 @@ static int __init check_elf32_binfmt(void) { if (cpu_uses_ia32el()) { printk("Please use IA-32 EL for executing IA-32 binaries\n"); - return unregister_binfmt(&elf_format); + unregister_binfmt(&elf_format); } return 0; } diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h index a47f63b204f..446c9aac924 100644 --- a/arch/ia64/ia32/elfcore32.h +++ b/arch/ia64/ia32/elfcore32.h @@ -117,6 +117,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr } #define ELF_CORE_COPY_XFPREGS 1 +#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG static inline int elf_core_copy_task_xfpregs(struct task_struct *tsk, elf_fpxregset_t *xfpu) { diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index 58e943a5d95..0dd3b2394cd 100644 --- a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c @@ -15,10 +15,13 @@ #include <linux/cpu.h> #include <linux/irq.h> #include <linux/efi.h> +#include <linux/numa.h> +#include <linux/mmzone.h> #include <asm/mmu_context.h> #include <asm/setup.h> #include <asm/delay.h> #include <asm/meminit.h> +#include <asm/processor.h> typedef NORET_TYPE void (*relocate_new_kernel_t)( unsigned long indirection_page, @@ -121,3 +124,28 @@ void machine_kexec(struct kimage *image) unw_init_running(ia64_machine_kexec, image); for(;;); } + +void arch_crash_save_vmcoreinfo(void) +{ +#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE + VMCOREINFO_SYMBOL(pgdat_list); + VMCOREINFO_LENGTH(pgdat_list, MAX_NUMNODES); + + VMCOREINFO_SYMBOL(node_memblk); + VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS); + VMCOREINFO_SIZE(node_memblk_s); + VMCOREINFO_OFFSET(node_memblk_s, start_paddr); + VMCOREINFO_OFFSET(node_memblk_s, size); +#endif +#ifdef CONFIG_PGTABLE_3 + VMCOREINFO_CONFIG(PGTABLE_3); +#elif CONFIG_PGTABLE_4 + VMCOREINFO_CONFIG(PGTABLE_4); +#endif +} + +unsigned long paddr_vmcoreinfo_note(void) +{ + return ia64_tpa((unsigned long)(char *)&vmcoreinfo_note); +} + diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 5628067a74d..0b567398f38 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -48,7 +48,7 @@ struct early_node_data { static struct early_node_data mem_data[MAX_NUMNODES] __initdata; static nodemask_t memory_less_mask __initdata; -static pg_data_t *pgdat_list[MAX_NUMNODES]; +pg_data_t *pgdat_list[MAX_NUMNODES]; /* * To prevent cache aliasing effects, align per-node structures so that they diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index b13dbbeaeaf..0fc2efec18f 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c @@ -20,11 +20,11 @@ #include <linux/mman.h> #include <linux/file.h> #include <linux/utsname.h> +#include <linux/ipc.h> #include <asm/uaccess.h> #include <asm/cachectl.h> #include <asm/cacheflush.h> -#include <asm/ipc.h> #include <asm/syscall.h> #include <asm/unistd.h> diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 36d78cf1a7b..e892f17ba3f 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c @@ -21,12 +21,12 @@ #include <linux/mman.h> #include <linux/file.h> #include <linux/utsname.h> +#include <linux/ipc.h> #include <asm/setup.h> #include <asm/uaccess.h> #include <asm/cachectl.h> #include <asm/traps.h> -#include <asm/ipc.h> #include <asm/page.h> #include <asm/unistd.h> diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index 15d62c5279a..65f7a95f056 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c @@ -18,13 +18,13 @@ #include <linux/mman.h> #include <linux/file.h> #include <linux/utsname.h> +#include <linux/ipc.h> #include <linux/fs.h> #include <asm/setup.h> #include <asm/uaccess.h> #include <asm/cachectl.h> #include <asm/traps.h> -#include <asm/ipc.h> #include <asm/cacheflush.h> #include <asm/unistd.h> diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6b663bec475..14164c2b879 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -279,7 +279,6 @@ core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/ cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000 -CLEAN_FILES += drivers/tc/lk201-map.c # # Wind River PPMC Board (4KC + GT64120) diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 8ef5cf4cc42..b997af713eb 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -44,11 +44,14 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); static int load_irix_library(struct file *); static int irix_core_dump(long signr, struct pt_regs * regs, - struct file *file); + struct file *file, unsigned long limit); static struct linux_binfmt irix_format = { - NULL, THIS_MODULE, load_irix_binary, load_irix_library, - irix_core_dump, PAGE_SIZE + .module = THIS_MODULE, + .load_binary = load_irix_binary, + .load_shlib = load_irix_library, + .core_dump = irix_core_dump, + .min_coredump = PAGE_SIZE, }; /* Debugging routines. */ @@ -1088,7 +1091,7 @@ end_coredump: * and then they are actually written out. If we run out of core limit * we just truncate. */ -static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) +static int irix_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) { int has_dumped = 0; mm_segment_t fs; @@ -1098,7 +1101,6 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) struct vm_area_struct *vma; struct elfhdr elf; off_t offset = 0, dataoff; - int limit = current->signal->rlim[RLIMIT_CORE].rlim_cur; int numnote = 3; struct memelfnote notes[3]; struct elf_prstatus prstatus; /* NT_PRSTATUS */ diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index d6e01215fb2..2b8ec1102e8 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -35,12 +35,12 @@ #include <linux/security.h> #include <linux/compat.h> #include <linux/vfs.h> +#include <linux/ipc.h> #include <net/sock.h> #include <net/scm.h> #include <asm/compat-signal.h> -#include <asm/ipc.h> #include <asm/sim.h> #include <asm/uaccess.h> #include <asm/mmu_context.h> diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 17c4374d220..b95fe93dd64 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -28,11 +28,11 @@ #include <linux/shm.h> #include <linux/compiler.h> #include <linux/module.h> +#include <linux/ipc.h> #include <asm/branch.h> #include <asm/cachectl.h> #include <asm/cacheflush.h> -#include <asm/ipc.h> #include <asm/asm-offsets.h> #include <asm/signal.h> #include <asm/sim.h> diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 43dde874f41..81f30ac2bff 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -47,8 +47,6 @@ void (*_dma_cache_wback)(unsigned long start, unsigned long size); void (*_dma_cache_inv)(unsigned long start, unsigned long size); EXPORT_SYMBOL(_dma_cache_wback_inv); -EXPORT_SYMBOL(_dma_cache_wback); -EXPORT_SYMBOL(_dma_cache_inv); #endif /* CONFIG_DMA_NONCOHERENT */ diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 09fa007c1d1..059eade96f2 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c @@ -206,7 +206,7 @@ static void pci_proc_init(void) } #endif /* CONFIG_PROC_FS && PCI_COUNTERS */ -spinlock_t bpci_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(bpci_lock); /***************************************************************************** * diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5e001ad588a..d11a746975b 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -670,7 +670,6 @@ source "arch/powerpc/sysdev/qe_lib/Kconfig" source "lib/Kconfig" menu "Instrumentation Support" - depends on EXPERIMENTAL source "arch/powerpc/oprofile/Kconfig" diff --git a/arch/powerpc/kernel/binfmt_elf32.c b/arch/powerpc/kernel/binfmt_elf32.c index 5cb58757e1b..1d45d7782d4 100644 --- a/arch/powerpc/kernel/binfmt_elf32.c +++ b/arch/powerpc/kernel/binfmt_elf32.c @@ -13,49 +13,44 @@ * 2 of the License, or (at your option) any later version. */ -#define ELF_ARCH EM_PPC -#define ELF_CLASS ELFCLASS32 -#define ELF_DATA ELFDATA2MSB; - #include <asm/processor.h> #include <linux/module.h> -#include <linux/elfcore.h> #include <linux/compat.h> +#include <linux/elfcore-compat.h> + +#undef ELF_ARCH +#undef ELF_CLASS +#define ELF_CLASS ELFCLASS32 +#define ELF_ARCH EM_PPC + +#undef elfhdr +#undef elf_phdr +#undef elf_note +#undef elf_addr_t +#define elfhdr elf32_hdr +#define elf_phdr elf32_phdr +#define elf_note elf32_note +#define elf_addr_t Elf32_Off -#define elf_prstatus elf_prstatus32 -struct elf_prstatus32 +#define elf_prstatus compat_elf_prstatus +#define elf_prpsinfo compat_elf_prpsinfo + +#define elf_core_copy_regs compat_elf_core_copy_regs +static inline void compat_elf_core_copy_regs(compat_elf_gregset_t *elf_regs, + struct pt_regs *regs) { - struct elf_siginfo pr_info; /* Info associated with signal */ - short pr_cursig; /* Current signal */ - unsigned int pr_sigpend; /* Set of pending signals */ - unsigned int pr_sighold; /* Set of held signals */ - pid_t pr_pid; - pid_t pr_ppid; - pid_t pr_pgrp; - pid_t pr_sid; - struct compat_timeval pr_utime; /* User time */ - struct compat_timeval pr_stime; /* System time */ - struct compat_timeval pr_cutime; /* Cumulative user time */ - struct compat_timeval pr_cstime; /* Cumulative system time */ - elf_gregset_t pr_reg; /* General purpose registers. */ - int pr_fpvalid; /* True if math co-processor being used. */ -}; + PPC_ELF_CORE_COPY_REGS((*elf_regs), regs); +} -#define elf_prpsinfo elf_prpsinfo32 -struct elf_prpsinfo32 +#define elf_core_copy_task_regs compat_elf_core_copy_task_regs +static int compat_elf_core_copy_task_regs(struct task_struct *tsk, + compat_elf_gregset_t *elf_regs) { - char pr_state; /* numeric process state */ - char pr_sname; /* char for pr_state */ - char pr_zomb; /* zombie */ - char pr_nice; /* nice val */ - unsigned int pr_flag; /* flags */ - u32 pr_uid; - u32 pr_gid; - pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* filename of executable */ - char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ -}; + struct pt_regs *regs = tsk->thread.regs; + if (regs) + compat_elf_core_copy_regs(elf_regs, regs); + return 1; +} #include <linux/time.h> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7949c203cb8..ea6ad7a2a7e 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -149,10 +149,32 @@ void flush_altivec_to_thread(struct task_struct *tsk) } } -int dump_task_altivec(struct pt_regs *regs, elf_vrregset_t *vrregs) +int dump_task_altivec(struct task_struct *tsk, elf_vrregset_t *vrregs) { - flush_altivec_to_thread(current); - memcpy(vrregs, ¤t->thread.vr[0], sizeof(*vrregs)); + /* ELF_NVRREG includes the VSCR and VRSAVE which we need to save + * separately, see below */ + const int nregs = ELF_NVRREG - 2; + elf_vrreg_t *reg; + u32 *dest; + + if (tsk == current) + flush_altivec_to_thread(tsk); + + reg = (elf_vrreg_t *)vrregs; + + /* copy the 32 vr registers */ + memcpy(reg, &tsk->thread.vr[0], nregs * sizeof(*reg)); + reg += nregs; + + /* copy the vscr */ + memcpy(reg, &tsk->thread.vscr, sizeof(*reg)); + reg++; + + /* vrsave is stored in the high 32bit slot of the final 128bits */ + memset(reg, 0, sizeof(*reg)); + dest = (u32 *)reg; + *dest = tsk->thread.vrsave; + return 1; } #endif /* CONFIG_ALTIVEC */ diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 62b7bf2f3ea..f2276593f41 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, } /* constructor for flash_block_cache */ -void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags) +void rtas_block_ctor(struct kmem_cache *cache, void *ptr) { memset(ptr, 0, RTAS_BLK_SIZE); } diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index bd85b5fd08c..4a4f5c6b560 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c @@ -41,10 +41,10 @@ #include <linux/compat.h> #include <linux/ptrace.h> #include <linux/elf.h> +#include <linux/ipc.h> #include <asm/ptrace.h> #include <asm/types.h> -#include <asm/ipc.h> #include <asm/uaccess.h> #include <asm/unistd.h> #include <asm/semaphore.h> diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index f85f402ceae..3b1d5dd6564 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c @@ -38,7 +38,6 @@ #include <linux/personality.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/semaphore.h> #include <asm/syscalls.h> #include <asm/time.h> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 08f0d9ff771..71efb38d599 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -526,7 +526,7 @@ repeat: return err; } -static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) +static void zero_ctor(struct kmem_cache *cache, void *addr) { memset(addr, 0, kmem_cache_size(cache)); } diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 702d884a338..e91da675bb3 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -142,7 +142,7 @@ static int __init setup_kcore(void) module_init(setup_kcore); #endif -static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) +static void zero_ctor(struct kmem_cache *cache, void *addr) { memset(addr, 0, kmem_cache_size(cache)); } diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 319826ef164..ad928edafb0 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c @@ -34,7 +34,7 @@ #include <asm/mmu.h> #include <asm/spu.h> -static spinlock_t slice_convert_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(slice_convert_lock); #ifdef DEBUG diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 11098747d09..0966d093db4 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -68,7 +68,7 @@ spufs_destroy_inode(struct inode *inode) } static void -spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags) +spufs_init_once(struct kmem_cache *cachep, void *p) { struct spufs_inode_info *ei = p; diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 5ddf40a66ae..3a5d112af5e 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c @@ -37,6 +37,10 @@ #include <asm/time.h> #include <asm/of_platform.h> +#include <pcmcia/ss.h> +#include <pcmcia/cistpl.h> +#include <pcmcia/ds.h> + #include "pasemi.h" /* SDC reset register, must be pre-mapped at reset time */ @@ -308,7 +312,57 @@ static void __init pas_init_early(void) iommu_init_early_pasemi(); } +#ifdef CONFIG_PCMCIA +static int pcmcia_notify(struct notifier_block *nb, unsigned long action, + void *data) +{ + struct device *dev = data; + struct device *parent; + struct pcmcia_device *pdev = to_pcmcia_dev(dev); + + /* We are only intereted in device addition */ + if (action != BUS_NOTIFY_ADD_DEVICE) + return 0; + + parent = pdev->socket->dev.parent; + + /* We know electra_cf devices will always have of_node set, since + * electra_cf is an of_platform driver. + */ + if (!parent->archdata.of_node) + return 0; + + if (!of_device_is_compatible(parent->archdata.of_node, "electra-cf")) + return 0; + + /* We use the direct ops for localbus */ + dev->archdata.dma_ops = &dma_direct_ops; + + return 0; +} + +static struct notifier_block pcmcia_notifier = { + .notifier_call = pcmcia_notify, +}; + +static inline void pasemi_pcmcia_init(void) +{ + extern struct bus_type pcmcia_bus_type; + + bus_register_notifier(&pcmcia_bus_type, &pcmcia_notifier); +} + +#else + +static inline void pasemi_pcmcia_init(void) +{ +} + +#endif + + static struct of_device_id pasemi_bus_ids[] = { + { .type = "localbus", }, { .type = "sdc", }, {}, }; @@ -318,6 +372,8 @@ static int __init pasemi_publish_devices(void) if (!machine_is(pasemi)) return 0; + pasemi_pcmcia_init(); + /* Publish OF platform devices for SDC and other non-PCI devices */ of_platform_bus_probe(NULL, pasemi_bus_ids, NULL); diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 5236fdb17fc..50b85d07ddd 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -58,9 +58,9 @@ #include <linux/vfs.h> #include <linux/ptrace.h> #include <linux/fadvise.h> +#include <linux/ipc.h> #include <asm/types.h> -#include <asm/ipc.h> #include <asm/uaccess.h> #include <asm/semaphore.h> diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 1eaff84a1eb..fefee99f28a 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c @@ -28,9 +28,9 @@ #include <linux/utsname.h> #include <linux/personality.h> #include <linux/unistd.h> +#include <linux/ipc.h> #include <asm/uaccess.h> -#include <asm/ipc.h> /* * sys_pipe() is the normal C calling standard for creating diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index fabc50adc46..d4ed93dfb9c 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -17,6 +17,7 @@ #include <linux/ctype.h> #include <linux/swap.h> #include <linux/kthread.h> +#include <linux/oom.h> #include <asm/pgalloc.h> #include <asm/uaccess.h> diff --git a/arch/sh/drivers/pci/dma-dreamcast.c b/arch/sh/drivers/pci/dma-dreamcast.c index 230d6ec0d23..888a3405059 100644 --- a/arch/sh/drivers/pci/dma-dreamcast.c +++ b/arch/sh/drivers/pci/dma-dreamcast.c @@ -51,7 +51,7 @@ void *dreamcast_consistent_alloc(struct device *dev, size_t size, buf = P2SEGADDR(buf); /* Flush the dcache before we hand off the buffer */ - dma_cache_wback_inv((void *)buf, size); + __flush_purge_region((void *)buf, size); return (void *)buf; } diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 024ce5dedd8..d545a686a20 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c @@ -22,9 +22,9 @@ #include <linux/utsname.h> #include <linux/module.h> #include <linux/fs.h> +#include <linux/ipc.h> #include <asm/cacheflush.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/unistd.h> /* diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 38c82d890ff..e220c29a3c0 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -34,7 +34,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle) /* * We must flush the cache before we pass it on to the device */ - dma_cache_wback_inv(ret, size); + __flush_purge_region(ret, size); page = virt_to_page(ret); free = page + (size >> PAGE_SHIFT); @@ -68,13 +68,13 @@ void consistent_sync(void *vaddr, size_t size, int direction) switch (direction) { case DMA_FROM_DEVICE: /* invalidate only */ - dma_cache_inv(p1addr, size); + __flush_invalidate_region(p1addr, size); break; case DMA_TO_DEVICE: /* writeback only */ - dma_cache_wback(p1addr, size); + __flush_wback_region(p1addr, size); break; case DMA_BIDIRECTIONAL: /* writeback and invalidate */ - dma_cache_wback_inv(p1addr, size); + __flush_purge_region(p1addr, size); break; default: BUG(); diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 7d43758dc24..1d45b82f0a6 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -292,8 +292,7 @@ void pmb_unmap(unsigned long addr) } while (pmbe); } -static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, - unsigned long flags) +static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb) { struct pmb_entry *pmbe = pmb; diff --git a/arch/sh64/kernel/sys_sh64.c b/arch/sh64/kernel/sys_sh64.c index b7f18e298a2..de0a303ba26 100644 --- a/arch/sh64/kernel/sys_sh64.c +++ b/arch/sh64/kernel/sys_sh64.c @@ -29,8 +29,8 @@ #include <linux/file.h> #include <linux/utsname.h> #include <linux/syscalls.h> +#include <linux/ipc.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/ptrace.h> #include <asm/unistd.h> diff --git a/arch/sh64/mm/consistent.c b/arch/sh64/mm/consistent.c index 8875a2a40da..c439620402c 100644 --- a/arch/sh64/mm/consistent.c +++ b/arch/sh64/mm/consistent.c @@ -11,6 +11,7 @@ #include <linux/mm.h> #include <linux/string.h> #include <linux/pci.h> +#include <linux/dma-mapping.h> #include <linux/module.h> #include <asm/io.h> @@ -32,7 +33,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size, if (vp != NULL) { memset(vp, 0, size); *dma_handle = virt_to_phys(ret); - dma_cache_wback_inv((unsigned long)ret, size); + dma_cache_sync(NULL, ret, size, DMA_BIDIRECTIONAL); } return vp; diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 9d327ec5975..c0f4ba109da 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -321,7 +321,6 @@ endmenu source "fs/Kconfig" menu "Instrumentation Support" - depends on EXPERIMENTAL source "arch/sparc/oprofile/Kconfig" diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index a954a0c0000..6c0221e9a9f 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c @@ -21,9 +21,9 @@ #include <linux/utsname.h> #include <linux/smp.h> #include <linux/smp_lock.h> +#include <linux/ipc.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/unistd.h> /* #define DEBUG_UNIMP_SYSCALL */ diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 2f22fa90461..59c4d752d28 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -461,7 +461,6 @@ source "drivers/fc4/Kconfig" source "fs/Kconfig" menu "Instrumentation Support" - depends on EXPERIMENTAL source "arch/sparc64/oprofile/Kconfig" diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d208cc7804f..92c1b36a2e1 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c @@ -35,11 +35,14 @@ static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout32_library(struct file*); -static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file); +static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); static struct linux_binfmt aout32_format = { - NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump, - PAGE_SIZE + .module = THIS_MODULE, + .load_binary = load_aout32_binary, + .load_shlib = load_aout32_library, + .core_dump = aout32_core_dump, + .min_coredump = PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -83,7 +86,7 @@ if (file->f_op->llseek) { \ * dumping of the process results in another error.. */ -static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) +static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) { mm_segment_t fs; int has_dumped = 0; @@ -102,13 +105,11 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) /* If the size of the dump file exceeds the rlimit, then see what would happen if we wrote the stack, but not the data area. */ - if ((dump.u_dsize+dump.u_ssize) > - current->signal->rlim[RLIMIT_CORE].rlim_cur) + if (dump.u_dsize + dump.u_ssize > limit) dump.u_dsize = 0; /* Make sure we have enough room to write the stack and data areas. */ - if ((dump.u_ssize) > - current->signal->rlim[RLIMIT_CORE].rlim_cur) + if (dump.u_ssize > limit) dump.u_ssize = 0; /* make sure we actually have a data and stack area to dump */ diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 0d5c5026494..560cb1edb1d 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -26,7 +26,6 @@ #include <linux/random.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/utrap.h> #include <asm/perfctr.h> #include <asm/a.out.h> diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index e8dce90d05d..78caff92673 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -54,7 +54,6 @@ #include <linux/highuid.h> #include <asm/types.h> -#include <asm/ipc.h> #include <asm/uaccess.h> #include <asm/fpumacro.h> #include <asm/semaphore.h> diff --git a/arch/sparc64/solaris/ipc.c b/arch/sparc64/solaris/ipc.c index a531a2cdb38..499135fa706 100644 --- a/arch/sparc64/solaris/ipc.c +++ b/arch/sparc64/solaris/ipc.c @@ -11,10 +11,10 @@ #include <linux/shm.h> #include <linux/sem.h> #include <linux/msg.h> +#include <linux/ipc.h> #include <asm/uaccess.h> #include <asm/string.h> -#include <asm/ipc.h> #include "conv.h" diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c index 710d5fb807e..e2d14268441 100644 --- a/arch/um/sys-i386/syscalls.c +++ b/arch/um/sys-i386/syscalls.c @@ -5,7 +5,7 @@ #include "linux/sched.h" #include "linux/shm.h" -#include "asm/ipc.h" +#include "linux/ipc.h" #include "asm/mman.h" #include "asm/uaccess.h" #include "asm/unistd.h" diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c index f9f00ccf532..0a4df4d6e05 100644 --- a/arch/v850/kernel/syscalls.c +++ b/arch/v850/kernel/syscalls.c @@ -30,7 +30,6 @@ #include <linux/file.h> #include <asm/uaccess.h> -#include <asm/ipc.h> #include <asm/semaphore.h> #include <asm/unistd.h> diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 08781370256..7cf1c29bf90 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c @@ -40,7 +40,7 @@ static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout_library(struct file*); #ifdef CORE_DUMP -static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file); +static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); /* * fill in the user structure for a core dump.. @@ -148,7 +148,7 @@ if (file->f_op->llseek) { \ * dumping of the process results in another error.. */ -static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file) +static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) { mm_segment_t fs; int has_dumped = 0; @@ -168,13 +168,11 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file) /* If the size of the dump file exceeds the rlimit, then see what would happen if we wrote the stack, but not the data area. */ - if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE > - current->signal->rlim[RLIMIT_CORE].rlim_cur) + if ((dump.u_dsize + dump.u_ssize + 1) * PAGE_SIZE > limit) dump.u_dsize = 0; /* Make sure we have enough room to write the stack and data areas. */ - if ((dump.u_ssize+1) * PAGE_SIZE > - current->signal->rlim[RLIMIT_CORE].rlim_cur) + if ((dump.u_ssize + 1) * PAGE_SIZE > limit) dump.u_ssize = 0; /* make sure we actually have a data and stack area to dump */ diff --git a/arch/x86/ia32/ia32_binfmt.c b/arch/x86/ia32/ia32_binfmt.c index dffd2ac7274..d3c53e8b05c 100644 --- a/arch/x86/ia32/ia32_binfmt.c +++ b/arch/x86/ia32/ia32_binfmt.c @@ -188,6 +188,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr } #define ELF_CORE_COPY_XFPREGS 1 +#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) { diff --git a/arch/x86/ia32/ipc32.c b/arch/x86/ia32/ipc32.c index 2e1869ec4db..7b3342e5aab 100644 --- a/arch/x86/ia32/ipc32.c +++ b/arch/x86/ia32/ipc32.c @@ -9,8 +9,6 @@ #include <linux/ipc.h> #include <linux/compat.h> -#include <asm/ipc.h> - asmlinkage long sys32_ipc(u32 call, int first, int second, int third, compat_uptr_t ptr, u32 fifth) diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index deda9a221cf..8459ca64bc2 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c @@ -10,6 +10,7 @@ #include <linux/kexec.h> #include <linux/delay.h> #include <linux/init.h> +#include <linux/numa.h> #include <asm/pgtable.h> #include <asm/pgalloc.h> #include <asm/tlbflush.h> @@ -169,3 +170,15 @@ static int __init parse_crashkernel(char *arg) return 0; } early_param("crashkernel", parse_crashkernel); + +void arch_crash_save_vmcoreinfo(void) +{ +#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE + VMCOREINFO_SYMBOL(node_data); + VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); +#endif +#ifdef CONFIG_X86_PAE + VMCOREINFO_CONFIG(X86_PAE); +#endif +} + diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index cd1899a2f0c..7450b69710b 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c @@ -10,6 +10,7 @@ #include <linux/kexec.h> #include <linux/string.h> #include <linux/reboot.h> +#include <linux/numa.h> #include <asm/pgtable.h> #include <asm/tlbflush.h> #include <asm/mmu_context.h> @@ -257,3 +258,11 @@ static int __init setup_crashkernel(char *arg) } early_param("crashkernel", setup_crashkernel); +void arch_crash_save_vmcoreinfo(void) +{ +#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE + VMCOREINFO_SYMBOL(node_data); + VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); +#endif +} + diff --git a/arch/x86/kernel/mce_64.c b/arch/x86/kernel/mce_64.c index a66d607f5b9..97d2b757d6b 100644 --- a/arch/x86/kernel/mce_64.c +++ b/arch/x86/kernel/mce_64.c @@ -76,9 +76,6 @@ void mce_log(struct mce *mce) wmb(); for (;;) { entry = rcu_dereference(mcelog.next); - /* The rmb forces the compiler to reload next in each - iteration */ - rmb(); for (;;) { /* When the buffer fills up discard new entries. Assume that the earlier errors are the more interesting. */ diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c index f8bae9ba032..a86d26f036e 100644 --- a/arch/x86/kernel/sys_i386_32.c +++ b/arch/x86/kernel/sys_i386_32.c @@ -17,10 +17,10 @@ #include <linux/mman.h> #include <linux/file.h> #include <linux/utsname.h> +#include <linux/ipc.h> #include <asm/uaccess.h> #include <asm/unistd.h> -#include <asm/ipc.h> /* * sys_pipe() is the normal C calling standard for creating diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 01437c46baa..ef1f6cd3ea6 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c @@ -193,7 +193,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) return pte; } -void pmd_ctor(void *pmd, struct kmem_cache *cache, unsigned long flags) +void pmd_ctor(struct kmem_cache *cache, void *pmd) { memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t)); } diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 8c83dbe4c4d..d681be88ae5 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -582,17 +582,18 @@ config CRASH_DUMP bool "kernel crash dumps (EXPERIMENTAL)" depends on EXPERIMENTAL help - Generate crash dump after being started by kexec. - This should be normally only set in special crash dump kernels - which are loaded in the main kernel with kexec-tools into - a specially reserved region and then later executed after - a crash by kdump/kexec. The crash dump kernel must be compiled + Generate crash dump after being started by kexec. + This should be normally only set in special crash dump kernels + which are loaded in the main kernel with kexec-tools into + a specially reserved region and then later executed after + a crash by kdump/kexec. The crash dump kernel must be compiled to a memory address not used by the main kernel or BIOS using - PHYSICAL_START. - For more details see Documentation/kdump/kdump.txt + PHYSICAL_START, or it must be built as a relocatable image + (CONFIG_RELOCATABLE=y). + For more details see Documentation/kdump/kdump.txt config RELOCATABLE - bool "Build a relocatable kernel(EXPERIMENTAL)" + bool "Build a relocatable kernel (EXPERIMENTAL)" depends on EXPERIMENTAL help Builds a relocatable kernel. This enables loading and running @@ -603,8 +604,8 @@ config RELOCATABLE must live at a different physical address than the primary kernel. - Note: If CONFIG_RELOCATABLE=y, then kernel run from the address - it has been loaded at and compile time physical address + Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address + it has been loaded at and the compile time physical address (CONFIG_PHYSICAL_START) is ignored. config PHYSICAL_START @@ -796,7 +797,6 @@ source "drivers/firmware/Kconfig" source fs/Kconfig menu "Instrumentation Support" - depends on EXPERIMENTAL source "arch/x86/oprofile/Kconfig" |