]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Aug 2010 16:30:08 +0000 (09:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Aug 2010 16:30:08 +0000 (09:30 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)
  ALSA: hda - Fix ALC680 base model capture
  ASoC: Remove DSP mode support for WM8776
  ALSA: hda - Add quirk for Dell Vostro 1220
  ALSA: riptide - Fix detection / load of firmware files

119 files changed:
Documentation/laptops/thinkpad-acpi.txt
Documentation/powerpc/booting-without-of.txt
arch/alpha/kernel/process.c
arch/arm/Makefile
arch/arm/include/asm/ptrace.h
arch/arm/include/asm/unistd.h
arch/arm/kernel/calls.S
arch/arm/kernel/kgdb.c
arch/arm/kernel/sys_arm.c
arch/avr32/kernel/process.c
arch/avr32/kernel/sys_avr32.c
arch/blackfin/kernel/process.c
arch/cris/arch-v10/kernel/process.c
arch/cris/arch-v32/kernel/process.c
arch/frv/kernel/process.c
arch/h8300/kernel/process.c
arch/h8300/kernel/sys_h8300.c
arch/ia64/kernel/process.c
arch/m32r/kernel/process.c
arch/m32r/kernel/sys_m32r.c
arch/m68k/include/asm/ide.h
arch/m68k/kernel/process.c
arch/m68k/kernel/sys_m68k.c
arch/m68knommu/kernel/process.c
arch/m68knommu/kernel/sys_m68k.c
arch/microblaze/kernel/prom_parse.c
arch/microblaze/kernel/sys_microblaze.c
arch/microblaze/pci/pci-common.c
arch/microblaze/pci/xilinx_pci.c
arch/mips/kernel/syscall.c
arch/mn10300/kernel/process.c
arch/parisc/hpux/fs.c
arch/parisc/kernel/process.c
arch/powerpc/kernel/process.c
arch/s390/kernel/process.c
arch/score/kernel/sys_score.c
arch/sh/kernel/process_32.c
arch/sh/kernel/process_64.c
arch/sh/kernel/sys_sh32.c
arch/sh/kernel/sys_sh64.c
arch/sparc/include/asm/atomic_64.h
arch/sparc/include/asm/fb.h
arch/sparc/include/asm/rwsem-const.h
arch/sparc/include/asm/unistd.h
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_64.c
arch/sparc/kernel/sys32.S
arch/sparc/kernel/sys_sparc_32.c
arch/sparc/kernel/sys_sparc_64.c
arch/sparc/kernel/systbls_32.S
arch/sparc/kernel/systbls_64.S
arch/tile/kernel/process.c
arch/um/kernel/exec.c
arch/um/kernel/syscall.c
arch/x86/include/asm/syscalls.h
arch/x86/kernel/kgdb.c
arch/x86/kernel/process.c
arch/x86/kernel/sys_i386_32.c
arch/xtensa/kernel/process.c
drivers/ata/sata_dwc_460ex.c
drivers/block/xsysace.c
drivers/char/vt.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/mtd/maps/physmap_of.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath9k/eeprom.h
drivers/net/wireless/ath/ath9k/eeprom_9287.c
drivers/net/wireless/ath/ath9k/hif_usb.c
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
drivers/net/wireless/ath/ath9k/reg.h
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/wl12xx/wl1251_cmd.c
drivers/platform/x86/asus_acpi.c
drivers/platform/x86/compal-laptop.c
drivers/platform/x86/dell-laptop.c
drivers/platform/x86/intel_ips.c
drivers/platform/x86/thinkpad_acpi.c
drivers/scsi/arcmsr/arcmsr_hba.c
drivers/serial/of_serial.c
drivers/serial/suncore.c
drivers/spi/coldfire_qspi.c
drivers/video/amba-clcd.c
fs/binfmt_misc.c
fs/binfmt_script.c
fs/exec.c
fs/nilfs2/super.c
fs/nilfs2/the_nilfs.c
include/linux/amba/clcd.h
include/linux/binfmts.h
include/linux/sched.h
include/linux/spi/spi.h
include/linux/syscalls.h
init/do_mounts_initrd.c
init/main.c
kernel/debug/kdb/kdb_private.h
kernel/debug/kdb/kdb_support.c
kernel/exit.c
kernel/kmod.c
mm/shmem.c
net/core/dev.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/route.c
net/netlink/af_netlink.c
net/sched/act_gact.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/xfrm/xfrm_user.c
security/apparmor/lsm.c
security/commoncap.c

index f6f80257addb12a3f498c65f6ae6cfe279439df5..1565eefd6fd52a4c225fd19f4036164b62af2cbc 100644 (file)
@@ -1024,6 +1024,10 @@ ThinkPad-specific interface.  The driver will disable its native
 backlight brightness control interface if it detects that the standard
 ACPI interface is available in the ThinkPad.
 
+If you want to use the thinkpad-acpi backlight brightness control
+instead of the generic ACPI video backlight brightness control for some
+reason, you should use the acpi_backlight=vendor kernel parameter.
+
 The brightness_enable module parameter can be used to control whether
 the LCD brightness control feature will be enabled when available.
 brightness_enable=0 forces it to be disabled.  brightness_enable=1
index 568fa08e82e54d03322810eab5bb26ae192f2065..302db5da49b37812eb19bf79ea0e2952e5f3a21f 100644 (file)
@@ -49,40 +49,13 @@ Table of Contents
       f) MDIO on GPIOs
       g) SPI busses
 
-  VII - Marvell Discovery mv64[345]6x System Controller chips
-    1) The /system-controller node
-    2) Child nodes of /system-controller
-      a) Marvell Discovery MDIO bus
-      b) Marvell Discovery ethernet controller
-      c) Marvell Discovery PHY nodes
-      d) Marvell Discovery SDMA nodes
-      e) Marvell Discovery BRG nodes
-      f) Marvell Discovery CUNIT nodes
-      g) Marvell Discovery MPSCROUTING nodes
-      h) Marvell Discovery MPSCINTR nodes
-      i) Marvell Discovery MPSC nodes
-      j) Marvell Discovery Watch Dog Timer nodes
-      k) Marvell Discovery I2C nodes
-      l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
-      m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
-      n) Marvell Discovery GPP (General Purpose Pins) nodes
-      o) Marvell Discovery PCI host bridge node
-      p) Marvell Discovery CPU Error nodes
-      q) Marvell Discovery SRAM Controller nodes
-      r) Marvell Discovery PCI Error Handler nodes
-      s) Marvell Discovery Memory Controller nodes
-
-  VIII - Specifying interrupt information for devices
+  VII - Specifying interrupt information for devices
     1) interrupts property
     2) interrupt-parent property
     3) OpenPIC Interrupt Controllers
     4) ISA Interrupt Controllers
 
-  IX - Specifying GPIO information for devices
-    1) gpios property
-    2) gpio-controller nodes
-
-  X - Specifying device power management information (sleep property)
+  VIII - Specifying device power management information (sleep property)
 
   Appendix A - Sample SOC node for MPC8540
 
index 88e608aebc8ccb61351d7be3b83364e4e590fe31..842dba308eab3065510857e50312496c674c1097 100644 (file)
@@ -387,8 +387,9 @@ EXPORT_SYMBOL(dump_elf_task_fp);
  * sys_execve() executes a new program.
  */
 asmlinkage int
-do_sys_execve(const char __user *ufilename, char __user * __user *argv,
-             char __user * __user *envp, struct pt_regs *regs)
+do_sys_execve(const char __user *ufilename,
+             const char __user *const __user *argv,
+             const char __user *const __user *envp, struct pt_regs *regs)
 {
        int error;
        char *filename;
index 99b8200138d203e49df0f0c3c4735a0bfd4255eb..59c1ce858fc8b18d4ec613e6dd2bfe62ed06047e 100644 (file)
@@ -21,6 +21,9 @@ GZFLAGS               :=-9
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
 KBUILD_CFLAGS  +=$(call cc-option,-marm,)
 
+# Never generate .eh_frame
+KBUILD_CFLAGS  += $(call cc-option,-fno-dwarf2-cfi-asm)
+
 # Do not use arch/arm/defconfig - it's always outdated.
 # Select a platform tht is kept up-to-date
 KBUILD_DEFCONFIG := versatile_defconfig
index c974be8913a76dda0a25e8c8f5ad1e7f3a03610d..7ce15eb15f72992289c899b5fa05385300aa0c8e 100644 (file)
@@ -158,15 +158,24 @@ struct pt_regs {
  */
 static inline int valid_user_regs(struct pt_regs *regs)
 {
-       if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) {
-               regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT);
-               return 1;
+       unsigned long mode = regs->ARM_cpsr & MODE_MASK;
+
+       /*
+        * Always clear the F (FIQ) and A (delayed abort) bits
+        */
+       regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT);
+
+       if ((regs->ARM_cpsr & PSR_I_BIT) == 0) {
+               if (mode == USR_MODE)
+                       return 1;
+               if (elf_hwcap & HWCAP_26BIT && mode == USR26_MODE)
+                       return 1;
        }
 
        /*
         * Force CPSR to something logical...
         */
-       regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT;
+       regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT;
        if (!(elf_hwcap & HWCAP_26BIT))
                regs->ARM_cpsr |= USR_MODE;
 
index dd2bf53000fe4cc06038e87f86587c6bc5e6c0f3..d02cfb683487eeafea4ef407a1a4e6f2d4ce4112 100644 (file)
 #define __NR_rt_tgsigqueueinfo         (__NR_SYSCALL_BASE+363)
 #define __NR_perf_event_open           (__NR_SYSCALL_BASE+364)
 #define __NR_recvmmsg                  (__NR_SYSCALL_BASE+365)
+#define __NR_accept4                   (__NR_SYSCALL_BASE+366)
 
 /*
  * The following SWIs are ARM private.
index 37ae301cc47c81ccf8bb80d02e4d7aaed67622e9..afeb71fa72cb81fc0e2fb5652c653ef34e7258bb 100644 (file)
                CALL(sys_rt_tgsigqueueinfo)
                CALL(sys_perf_event_open)
 /* 365 */      CALL(sys_recvmmsg)
+               CALL(sys_accept4)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
index 778c2f7024ff57304227ce67665e749f39b05fc7..d6e8b4d2e60dacde3ceff47584fe43b75ddb496d 100644 (file)
@@ -79,7 +79,7 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
                return;
 
        /* Initialize to zero */
-       for (regno = 0; regno < GDB_MAX_REGS; regno++)
+       for (regno = 0; regno < DBG_MAX_REG_NUM; regno++)
                gdb_regs[regno] = 0;
 
        /* Otherwise, we have only some registers from switch_to() */
index 5b7c541a4c63d0dc6ae9405f70470f1f4c2108c4..62e7c61d0342754193cf4833b16b57723b081f73 100644 (file)
@@ -62,8 +62,9 @@ asmlinkage int sys_vfork(struct pt_regs *regs)
 /* sys_execve() executes a new program.
  * This is called indirectly via a small wrapper
  */
-asmlinkage int sys_execve(const char __user *filenamei, char __user * __user *argv,
-                         char __user * __user *envp, struct pt_regs *regs)
+asmlinkage int sys_execve(const char __user *filenamei,
+                         const char __user *const __user *argv,
+                         const char __user *const __user *envp, struct pt_regs *regs)
 {
        int error;
        char * filename;
@@ -78,14 +79,17 @@ out:
        return error;
 }
 
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        struct pt_regs regs;
        int ret;
 
        memset(&regs, 0, sizeof(struct pt_regs));
-       ret = do_execve(filename, (char __user * __user *)argv,
-                       (char __user * __user *)envp, &regs);
+       ret = do_execve(filename,
+                       (const char __user *const __user *)argv,
+                       (const char __user *const __user *)envp, &regs);
        if (ret < 0)
                goto out;
 
index e5daddff397dd166e9ba16b089f2cdc2daf022fb..9c46aaad11ce67334385f2b70a99ef3700cd8c0f 100644 (file)
@@ -384,8 +384,9 @@ asmlinkage int sys_vfork(struct pt_regs *regs)
 }
 
 asmlinkage int sys_execve(const char __user *ufilename,
-                         char __user *__user *uargv,
-                         char __user *__user *uenvp, struct pt_regs *regs)
+                         const char __user *const __user *uargv,
+                         const char __user *const __user *uenvp,
+                         struct pt_regs *regs)
 {
        int error;
        char *filename;
index 459349b5ed5aa9d74982f2079edeb205ecdbef90..62635a09ae3eca1f37ae17b54ffe705b9086cb2f 100644 (file)
@@ -7,7 +7,9 @@
  */
 #include <linux/unistd.h>
 
-int kernel_execve(const char *file, char **argv, char **envp)
+int kernel_execve(const char *file,
+                 const char *const *argv,
+                 const char *const *envp)
 {
        register long scno asm("r8") = __NR_execve;
        register long sc1 asm("r12") = (long)file;
index a566f61c002aecaec8caa8f8ccca6a2f318ca7fa..01f98cb964d2654e4d7c235e6db4d647f893696b 100644 (file)
@@ -209,7 +209,9 @@ copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char __user *name, char __user * __user *argv, char __user * __user *envp)
+asmlinkage int sys_execve(const char __user *name,
+                         const char __user *const __user *argv,
+                         const char __user *const __user *envp)
 {
        int error;
        char *filename;
index 93f0f64b132649d9446a5580d6b1ab740df255e3..9a57db6907f5bb81762c6cc97b543284b289e703 100644 (file)
@@ -204,7 +204,9 @@ asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char *fname, char **argv, char **envp,
+asmlinkage int sys_execve(const char *fname,
+                         const char *const *argv,
+                         const char *const *envp,
                          long r13, long mof, long srp, 
                          struct pt_regs *regs)
 {
index 2661a9529d701a85d0d41358627912e192a10539..562f84718906b2de88416b1ca48e685992d0b400 100644 (file)
@@ -218,8 +218,10 @@ sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp,
 
 /* sys_execve() executes a new program. */
 asmlinkage int
-sys_execve(const char *fname, char **argv, char **envp, long r13, long mof, long srp,
-       struct pt_regs *regs)
+sys_execve(const char *fname,
+          const char *const *argv,
+          const char *const *envp, long r13, long mof, long srp,
+          struct pt_regs *regs)
 {
        int error;
        char *filename;
index 428931cf2f0c44adc9d6092bff72cca6c596c54a..2b63b0191f529d187f0cde1298c637e32973fabb 100644 (file)
@@ -250,8 +250,9 @@ int copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char __user *name, char __user * __user *argv,
-                         char __user * __user *envp)
+asmlinkage int sys_execve(const char __user *name,
+                         const char __user *const __user *argv,
+                         const char __user *const __user *envp)
 {
        int error;
        char * filename;
index 8b7b78d77d5c46ba3b9d31bf1933cf504c7f377a..97478138e361ad702308539b4d067543402df7cb 100644 (file)
@@ -212,7 +212,10 @@ int copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char *name, char **argv, char **envp,int dummy,...)
+asmlinkage int sys_execve(const char *name,
+                         const char *const *argv,
+                         const char *const *envp,
+                         int dummy, ...)
 {
        int error;
        char * filename;
index f9b3f44da69fe655dc7f2f1c0b82c4ac0b55990d..dc1ac0243b78d0532640c55517753cdbdeacc8f0 100644 (file)
@@ -51,7 +51,9 @@ asmlinkage void syscall_print(void *dummy,...)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register long res __asm__("er0");
        register char *const *_c __asm__("er3") = envp;
index a879c03b7f1cc0f97309c2cfff3ccb8b8a118385..16f1c7b04c69330c0c8a73cdd2e127f87122a627 100644 (file)
@@ -633,7 +633,9 @@ dump_fpu (struct pt_regs *pt, elf_fpregset_t dst)
 }
 
 long
-sys_execve (const char __user *filename, char __user * __user *argv, char __user * __user *envp,
+sys_execve (const char __user *filename,
+           const char __user *const __user *argv,
+           const char __user *const __user *envp,
            struct pt_regs *regs)
 {
        char *fname;
index 8665a4d868ecb6f48506c6c354b9813be3f92b69..422bea9f1dbcbcab749fe0d6a7317d366de45ba1 100644 (file)
@@ -289,8 +289,8 @@ asmlinkage int sys_vfork(unsigned long r0, unsigned long r1, unsigned long r2,
  * sys_execve() executes a new program.
  */
 asmlinkage int sys_execve(const char __user *ufilename,
-                         char __user * __user *uargv,
-                         char __user * __user *uenvp,
+                         const char __user *const __user *uargv,
+                         const char __user *const __user *uenvp,
                          unsigned long r3, unsigned long r4, unsigned long r5,
                          unsigned long r6, struct pt_regs regs)
 {
index 0a00f467edfa9645f49ea0d7b614c905921dcc44..d841fb6cc70325a23c25e71f3552b14751284b56 100644 (file)
@@ -93,7 +93,9 @@ asmlinkage int sys_cachectl(char *addr, int nbytes, int op)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register long __scno __asm__ ("r7") = __NR_execve;
        register long __arg3 __asm__ ("r2") = (long)(envp);
index 3958726664bad268c0e185a462f6859bfe3e67f5..492fee8a1ab2e6491f52c961b1a93017eef49a41 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/include/asm-m68k/ide.h
- *
  *  Copyright (C) 1994-1996  Linus Torvalds & authors
  */
 
@@ -34,6 +32,8 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
+#ifdef CONFIG_MMU
+
 /*
  * Get rid of defs from io.h - ide has its private and conflicting versions
  * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
 #define __ide_mm_outsw(port, addr, n)  raw_outsw((u16 *)port, addr, n)
 #define __ide_mm_outsl(port, addr, n)  raw_outsl((u32 *)port, addr, n)
 
+#else
+
+#define __ide_mm_insw(port, addr, n)   io_insw((unsigned int)port, addr, n)
+#define __ide_mm_insl(port, addr, n)   io_insl((unsigned int)port, addr, n)
+#define __ide_mm_outsw(port, addr, n)  io_outsw((unsigned int)port, addr, n)
+#define __ide_mm_outsl(port, addr, n)  io_outsl((unsigned int)port, addr, n)
+
+#endif /* CONFIG_MMU */
+
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */
index 221d0b71ce3934948a7e4c3581975bfe5b37c4d4..18732ab232923faeedbbcd80c02a98364f285215 100644 (file)
@@ -315,7 +315,9 @@ EXPORT_SYMBOL(dump_fpu);
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char __user *name, char __user * __user *argv, char __user * __user *envp)
+asmlinkage int sys_execve(const char __user *name,
+                         const char __user *const __user *argv,
+                         const char __user *const __user *envp)
 {
        int error;
        char * filename;
index 77896692eb0a69f34609cb4809e221fc84fb4bd3..2f431ece7b5f5c7f2afe8782eb7fe9b98cc26d6c 100644 (file)
@@ -459,7 +459,9 @@ asmlinkage int sys_getpagesize(void)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register long __res asm ("%d0") = __NR_execve;
        register long __a asm ("%d1") = (long)(filename);
index 6350f68cd0262ba7f78c2a60f3fb76e574b2d857..6d3390590e5ba24be497b5c4a42d0327dbae6cf9 100644 (file)
@@ -316,14 +316,14 @@ void dump(struct pt_regs *fp)
                fp->d0, fp->d1, fp->d2, fp->d3);
        printk(KERN_EMERG "d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
                fp->d4, fp->d5, fp->a0, fp->a1);
-       printk(KERN_EMERG "\nUSP: %08x   TRAPFRAME: %08x\n",
-               (unsigned int) rdusp(), (unsigned int) fp);
+       printk(KERN_EMERG "\nUSP: %08x   TRAPFRAME: %p\n",
+               (unsigned int) rdusp(), fp);
 
        printk(KERN_EMERG "\nCODE:");
        tp = ((unsigned char *) fp->pc) - 0x20;
        for (sp = (unsigned long *) tp, i = 0; (i < 0x40);  i += 4) {
                if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%08x: ", (int) (tp + i));
+                       printk(KERN_EMERG "%p: ", tp + i);
                printk("%08x ", (int) *sp++);
        }
        printk(KERN_EMERG "\n");
@@ -332,7 +332,7 @@ void dump(struct pt_regs *fp)
        tp = ((unsigned char *) fp) - 0x40;
        for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) {
                if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%08x: ", (int) (tp + i));
+                       printk(KERN_EMERG "%p: ", tp + i);
                printk("%08x ", (int) *sp++);
        }
        printk(KERN_EMERG "\n");
@@ -341,7 +341,7 @@ void dump(struct pt_regs *fp)
        tp = (unsigned char *) (rdusp() - 0x10);
        for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) {
                if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%08x: ", (int) (tp + i));
+                       printk(KERN_EMERG "%p: ", tp + i);
                printk("%08x ", (int) *sp++);
        }
        printk(KERN_EMERG "\n");
@@ -350,7 +350,9 @@ void dump(struct pt_regs *fp)
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(const char *name, char **argv, char **envp)
+asmlinkage int sys_execve(const char *name,
+                         const char *const *argv,
+                         const char *const *envp)
 {
        int error;
        char * filename;
index d65e9c4c930cdf59821ffc5f61031a9d4a05b51c..68488ae47f0a4ba97f389e68d75c91a1402d123b 100644 (file)
@@ -44,7 +44,9 @@ asmlinkage int sys_getpagesize(void)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register long __res asm ("%d0") = __NR_execve;
        register long __a asm ("%d1") = (long)(filename);
index d33ba17601fa20d61c86c3ea982aab72ca6508e1..99d9b61cccb592cb34985bf79fb777b0521a36bf 100644 (file)
@@ -73,7 +73,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
                /* We can only get here if we hit a P2P bridge with no node,
                 * let's do standard swizzling and try again
                 */
-               lspec = of_irq_pci_swizzle(PCI_SLOT(pdev->devfn), lspec);
+               lspec = pci_swizzle_interrupt_pin(pdev, lspec);
                pdev = ppdev;
        }
 
index 6abab6ebedbee2514d23ebe0cdfeeeec4fe3ad39..2250fe9d269b7e150333186b1948d059c4a1c85a 100644 (file)
@@ -47,8 +47,10 @@ asmlinkage long microblaze_clone(int flags, unsigned long stack, struct pt_regs
        return do_fork(flags, stack, regs, 0, NULL, NULL);
 }
 
-asmlinkage long microblaze_execve(const char __user *filenamei, char __user *__user *argv,
-                       char __user *__user *envp, struct pt_regs *regs)
+asmlinkage long microblaze_execve(const char __user *filenamei,
+                                 const char __user *const __user *argv,
+                                 const char __user *const __user *envp,
+                                 struct pt_regs *regs)
 {
        int error;
        char *filename;
@@ -77,7 +79,9 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register const char *__a __asm__("r5") = filename;
        register const void *__b __asm__("r6") = argv;
index 23be25fec4d67bf7e48d612b50e1da9f766371ae..55ef532f32be6fc3c174e1280a7971ffc5329406 100644 (file)
 #include <linux/irq.h>
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
-#include <asm/prom.h>
 #include <asm/pci-bridge.h>
 #include <asm/byteorder.h>
 
@@ -1077,7 +1078,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
                struct dev_archdata *sd = &dev->dev.archdata;
 
                /* Setup OF node pointer in archdata */
-               sd->of_node = pci_device_to_OF_node(dev);
+               dev->dev.of_node = pci_device_to_OF_node(dev);
 
                /* Fixup NUMA node as it may not be setup yet by the generic
                 * code and is needed by the DMA init
index 7869a41b0f94cadff95ad17dc4eaf5a713b536c3..0687a42a5bd475166afed6e816c721a51517b4c9 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/ioport.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/pci.h>
 #include <asm/io.h>
 
index bddce0bca1950ea599fcc8c7d954841250f85e0f..1dc6edff45e08a604377862ec3d8980c6b333cf0 100644 (file)
@@ -258,8 +258,10 @@ asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs)
        error = PTR_ERR(filename);
        if (IS_ERR(filename))
                goto out;
-       error = do_execve(filename, (char __user *__user *) (long)regs.regs[5],
-                         (char __user *__user *) (long)regs.regs[6], &regs);
+       error = do_execve(filename,
+                         (const char __user *const __user *) (long)regs.regs[5],
+                         (const char __user *const __user *) (long)regs.regs[6],
+                         &regs);
        putname(filename);
 
 out:
@@ -436,7 +438,9 @@ asmlinkage void bad_stack(void)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register unsigned long __a0 asm("$4") = (unsigned long) filename;
        register unsigned long __a1 asm("$5") = (unsigned long) argv;
index 762eb325b949a9869dac416318ef277ced79ece0..f48373e2bc1cffab139be817cf6f540776c51b79 100644 (file)
@@ -269,8 +269,8 @@ asmlinkage long sys_vfork(void)
 }
 
 asmlinkage long sys_execve(const char __user *name,
-                          char __user * __user *argv,
-                          char __user * __user *envp)
+                          const char __user *const __user *argv,
+                          const char __user *const __user *envp)
 {
        char *filename;
        int error;
index 1444875a761165334ff1f9916bc7c5c31dd6eb19..0dc8543acb4fc31e9e13c3ba0c124096b6471648 100644 (file)
@@ -41,8 +41,10 @@ int hpux_execve(struct pt_regs *regs)
        if (IS_ERR(filename))
                goto out;
 
-       error = do_execve(filename, (char __user * __user *) regs->gr[25],
-               (char __user * __user *) regs->gr[24], regs);
+       error = do_execve(filename,
+                         (const char __user *const __user *) regs->gr[25],
+                         (const char __user *const __user *) regs->gr[24],
+                         regs);
 
        putname(filename);
 
index 76332dadc6e93e64e6b0557dc0e5c0bd2e0b0986..4b4b9181a1a0aef8df25667f4a0229bb275e8d7f 100644 (file)
@@ -348,17 +348,22 @@ asmlinkage int sys_execve(struct pt_regs *regs)
        error = PTR_ERR(filename);
        if (IS_ERR(filename))
                goto out;
-       error = do_execve(filename, (char __user * __user *) regs->gr[25],
-               (char __user * __user *) regs->gr[24], regs);
+       error = do_execve(filename,
+                         (const char __user *const __user *) regs->gr[25],
+                         (const char __user *const __user *) regs->gr[24],
+                         regs);
        putname(filename);
 out:
 
        return error;
 }
 
-extern int __execve(const char *filename, char *const argv[],
-               char *const envp[], struct task_struct *task);
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+extern int __execve(const char *filename,
+                   const char *const argv[],
+                   const char *const envp[], struct task_struct *task);
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        return __execve(filename, argv, envp, current);
 }
index feacfb7896863240eb5d447ea6c48b772c6906a9..91356ffda2ca3230e930245a0db1cc58cca323a0 100644 (file)
@@ -1034,8 +1034,9 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
        flush_fp_to_thread(current);
        flush_altivec_to_thread(current);
        flush_spe_to_thread(current);
-       error = do_execve(filename, (char __user * __user *) a1,
-                         (char __user * __user *) a2, regs);
+       error = do_execve(filename,
+                         (const char __user *const __user *) a1,
+                         (const char __user *const __user *) a2, regs);
        putname(filename);
 out:
        return error;
index 7eafaf2662b92fca4aff3f36ea980148695cb24a..d3a2d1c6438ee08c1216353c8fefec7f2ee0dc31 100644 (file)
@@ -267,8 +267,9 @@ asmlinkage void execve_tail(void)
 /*
  * sys_execve() executes a new program.
  */
-SYSCALL_DEFINE3(execve, const char __user *, name, char __user * __user *, argv,
-               char __user * __user *, envp)
+SYSCALL_DEFINE3(execve, const char __user *, name,
+               const char __user *const __user *, argv,
+               const char __user *const __user *, envp)
 {
        struct pt_regs *regs = task_pt_regs(current);
        char *filename;
index 651096ff8db49e2c9c4b564c00a0a12510a8b050..e478bf9a7e9181cd2e929535aaf0c3680e71a17b 100644 (file)
@@ -99,8 +99,10 @@ score_execve(struct pt_regs *regs)
        if (IS_ERR(filename))
                return error;
 
-       error = do_execve(filename, (char __user *__user*)regs->regs[5],
-                         (char __user *__user *) regs->regs[6], regs);
+       error = do_execve(filename,
+                         (const char __user *const __user *)regs->regs[5],
+                         (const char __user *const __user *)regs->regs[6],
+                         regs);
 
        putname(filename);
        return error;
@@ -110,7 +112,9 @@ score_execve(struct pt_regs *regs)
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register unsigned long __r4 asm("r4") = (unsigned long) filename;
        register unsigned long __r5 asm("r5") = (unsigned long) argv;
index 052981972ae68ecd299a00bf8ca1196de6605507..762a13984bbd76c897963c10f6513809d0cc345f 100644 (file)
@@ -296,9 +296,10 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
 /*
  * sys_execve() executes a new program.
  */
-asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
-                         char __user * __user *uenvp, unsigned long r7,
-                         struct pt_regs __regs)
+asmlinkage int sys_execve(const char __user *ufilename,
+                         const char __user *const __user *uargv,
+                         const char __user *const __user *uenvp,
+                         unsigned long r7, struct pt_regs __regs)
 {
        struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
        int error;
index 68d128d651b32cb7df96249260d73e6e49012c42..210c1cabcb7fd3fe0903442c40c56d37a34b2ccc 100644 (file)
@@ -497,8 +497,8 @@ asmlinkage int sys_execve(const char *ufilename, char **uargv,
                goto out;
 
        error = do_execve(filename,
-                         (char __user * __user *)uargv,
-                         (char __user * __user *)uenvp,
+                         (const char __user *const __user *)uargv,
+                         (const char __user *const __user *)uenvp,
                          pregs);
        putname(filename);
 out:
index eb68bfdd86e66be57464425896b887abd63c3af4..f56b6fe5c5d02d7cdb5084bce5732cba7c32ec68 100644 (file)
@@ -71,7 +71,9 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register long __sc0 __asm__ ("r3") = __NR_execve;
        register long __sc4 __asm__ ("r4") = (long) filename;
index 287235768bc5028bb0da239e5b5b46a10d891f8b..c5a38c4bf410f5375be87cc7416a003709c10a3b 100644 (file)
@@ -33,7 +33,9 @@
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_execve);
        register unsigned long __sc2 __asm__ ("r2") = (unsigned long) filename;
index 2050ca02c4230cff6c447ee3d84c5f3e058cb24b..f0c74227c737e0a94efb33c95640375ad38c89bc 100644 (file)
@@ -25,9 +25,9 @@ extern void atomic_sub(int, atomic_t *);
 extern void atomic64_sub(int, atomic64_t *);
 
 extern int atomic_add_ret(int, atomic_t *);
-extern int atomic64_add_ret(int, atomic64_t *);
+extern long atomic64_add_ret(int, atomic64_t *);
 extern int atomic_sub_ret(int, atomic_t *);
-extern int atomic64_sub_ret(int, atomic64_t *);
+extern long atomic64_sub_ret(int, atomic64_t *);
 
 #define atomic_dec_return(v) atomic_sub_ret(1, v)
 #define atomic64_dec_return(v) atomic64_sub_ret(1, v)
@@ -91,7 +91,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
        ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
 
-static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
+static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
 {
        long c, old;
        c = atomic64_read(v);
index e834880be2040944783d7b0e31be1158ed788d4c..2173432ad7f72ec8326f55048b440cbba7c68048 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef _SPARC_FB_H_
 #define _SPARC_FB_H_
+#include <linux/console.h>
 #include <linux/fb.h>
 #include <linux/fs.h>
 #include <asm/page.h>
@@ -18,6 +19,9 @@ static inline int fb_is_primary_device(struct fb_info *info)
        struct device *dev = info->device;
        struct device_node *node;
 
+       if (console_set_on_cmdline)
+               return 0;
+
        node = dev->of_node;
        if (node &&
            node == of_console_device)
index a303c9d64d845989e313a326f4c5e92f283148a5..e4c61a18bb2843855c493bb86c45d7787e862a38 100644 (file)
@@ -5,7 +5,7 @@
 #define RWSEM_UNLOCKED_VALUE           0x00000000
 #define RWSEM_ACTIVE_BIAS              0x00000001
 #define RWSEM_ACTIVE_MASK              0x0000ffff
-#define RWSEM_WAITING_BIAS             0xffff0000
+#define RWSEM_WAITING_BIAS             (-0x00010000)
 #define RWSEM_ACTIVE_READ_BIAS         RWSEM_ACTIVE_BIAS
 #define RWSEM_ACTIVE_WRITE_BIAS                (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
 
index d0b3b01ac9d4316962ed744c71fa805e94d4d204..03eb5a8f6f9363ccc55410e011328f843aa05474 100644 (file)
 #define __NR_rt_tgsigqueueinfo 326
 #define __NR_perf_event_open   327
 #define __NR_recvmmsg          328
+#define __NR_fanotify_init     329
+#define __NR_fanotify_mark     330
+#define __NR_prlimit64         331
 
-#define NR_syscalls            329
+#define NR_syscalls            332
 
 #ifdef __32bit_syscall_numbers__
 /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
index 40e29fc8a4d62bff77080a791ebf0a8a280efaae..17529298c50a2e283ede3342830747fe54641384 100644 (file)
@@ -633,8 +633,10 @@ asmlinkage int sparc_execve(struct pt_regs *regs)
        if(IS_ERR(filename))
                goto out;
        error = do_execve(filename,
-                         (char __user * __user *)regs->u_regs[base + UREG_I1],
-                         (char __user * __user *)regs->u_regs[base + UREG_I2],
+                         (const char __user *const  __user *)
+                         regs->u_regs[base + UREG_I1],
+                         (const char __user *const  __user *)
+                         regs->u_regs[base + UREG_I2],
                          regs);
        putname(filename);
 out:
index dbe81a368b4588001bb4cb56b20283a08cfcc264..485f547483847da14aebfaa0e327c6cbb75dce24 100644 (file)
@@ -739,9 +739,9 @@ asmlinkage int sparc_execve(struct pt_regs *regs)
        if (IS_ERR(filename))
                goto out;
        error = do_execve(filename,
-                         (char __user * __user *)
+                         (const char __user *const __user *)
                          regs->u_regs[base + UREG_I1],
-                         (char __user * __user *)
+                         (const char __user *const __user *)
                          regs->u_regs[base + UREG_I2], regs);
        putname(filename);
        if (!error) {
index 46a76ba3fb4bd21d2b911b9ce99cf5f235264b68..44e5faf1ad5f47dbee83ff3b00e77f479d907d0d 100644 (file)
@@ -330,6 +330,15 @@ do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */
        nop
        nop
 
+       .globl          sys32_fanotify_mark
+sys32_fanotify_mark:
+       sethi           %hi(sys_fanotify_mark), %g1
+       sllx            %o2, 32, %o2
+       or              %o2, %o3, %o2
+       mov             %o4, %o3
+       jmpl            %g1 + %lo(sys_fanotify_mark), %g0
+        mov            %o5, %o4
+
        .section        __ex_table,"a"
        .align          4
        .word           1b, __retl_efault, 2b, __retl_efault
index ee995b7dae7e8d3f4509ed378761ac131266515a..50794137d710d71bfa197cbb055d14377f2cd770 100644 (file)
@@ -282,7 +282,9 @@ out:
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        long __res;
        register long __g1 __asm__ ("g1") = __NR_execve;
index 3d435c42e6db58d62df3c5193a081816d6c7639a..f836f4e93afe08b66f37955084896abeb82a8a0a 100644 (file)
@@ -758,7 +758,9 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        long __res;
        register long __g1 __asm__ ("g1") = __NR_execve;
index 801fc8e5a0e87cf20fc58550b4f603a6e4085723..ec396e1916b92e4560505175bcdee3b59b3fef49 100644 (file)
@@ -82,5 +82,6 @@ sys_call_table:
 /*310*/        .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
 /*315*/        .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
 /*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
-/*325*/        .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg
+/*325*/        .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
+/*330*/        .long sys_fanotify_mark, sys_prlimit64
 
index 9db058dd039e5d0361e1276523e6a59f4cef8452..8cfcaa54958054535dcd376296c1f71f780cc147 100644 (file)
@@ -83,7 +83,8 @@ sys_call_table32:
 /*310*/        .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
        .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
 /*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
-       .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg
+       .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
+/*330*/        .word sys32_fanotify_mark, sys_prlimit64
 
 #endif /* CONFIG_COMPAT */
 
@@ -158,4 +159,5 @@ sys_call_table:
 /*310*/        .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
        .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
 /*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
-       .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg
+       .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
+/*330*/        .word sys_fanotify_mark, sys_prlimit64
index ed590ad0acdc614b65b8312835a2f573a1535ba8..985cc28c74c5696f91adcf82d6347439999bfa41 100644 (file)
@@ -543,8 +543,9 @@ long _sys_vfork(struct pt_regs *regs)
 /*
  * sys_execve() executes a new program.
  */
-long _sys_execve(char __user *path, char __user *__user *argv,
-                char __user *__user *envp, struct pt_regs *regs)
+long _sys_execve(const char __user *path,
+                const char __user *const __user *argv,
+                const char __user *const __user *envp, struct pt_regs *regs)
 {
        long error;
        char *filename;
index 59b20d93b6d43b80047bc4012089e2b8d31c1708..cd145eda357950b66b1ad2f05f55bd0094df6006 100644 (file)
@@ -44,8 +44,9 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
        PT_REGS_SP(regs) = esp;
 }
 
-static long execve1(const char *file, char __user * __user *argv,
-                   char __user *__user *env)
+static long execve1(const char *file,
+                   const char __user *const __user *argv,
+                   const char __user *const __user *env)
 {
        long error;
 
index 7427c0b1930cbb18879ccfb047b90391bb322e39..5ddb246626dbb87afe7484b87c0c495c8643de8f 100644 (file)
@@ -51,7 +51,9 @@ long old_mmap(unsigned long addr, unsigned long len,
        return err;
 }
 
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        mm_segment_t fs;
        int ret;
index feb2ff9bfc2d178855b19fb8cf4a26e506e3317a..f1d8b441fc775b4920b7397d6a151d2eed314a09 100644 (file)
@@ -23,8 +23,9 @@ long sys_iopl(unsigned int, struct pt_regs *);
 /* kernel/process.c */
 int sys_fork(struct pt_regs *);
 int sys_vfork(struct pt_regs *);
-long sys_execve(const char __user *, char __user * __user *,
-               char __user * __user *, struct pt_regs *);
+long sys_execve(const char __user *,
+               const char __user *const __user *,
+               const char __user *const __user *, struct pt_regs *);
 long sys_clone(unsigned long, unsigned long, void __user *,
               void __user *, struct pt_regs *);
 
index ef10940e1af0534e18c88635d79e25eff73797cf..852b81967a3774b3e252c8affed666423a5b784b 100644 (file)
@@ -194,7 +194,7 @@ static struct hw_breakpoint {
        unsigned long           addr;
        int                     len;
        int                     type;
-       struct perf_event       **pev;
+       struct perf_event       * __percpu *pev;
 } breakinfo[HBP_NUM];
 
 static unsigned long early_dr7;
index 64ecaf0af9af4a88132994049570250809a585ea..57d1868a86aadc060bc2260b34139809a98ffab5 100644 (file)
@@ -301,8 +301,9 @@ EXPORT_SYMBOL(kernel_thread);
 /*
  * sys_execve() executes a new program.
  */
-long sys_execve(const char __user *name, char __user * __user *argv,
-               char __user * __user *envp, struct pt_regs *regs)
+long sys_execve(const char __user *name,
+               const char __user *const __user *argv,
+               const char __user *const __user *envp, struct pt_regs *regs)
 {
        long error;
        char *filename;
index 196552bb412c76a129cc8f63ad6e836b91dd51ee..d5e06624e34a556552585690b4532509fe21552f 100644 (file)
@@ -28,7 +28,9 @@
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
  */
-int kernel_execve(const char *filename, char *const argv[], char *const envp[])
+int kernel_execve(const char *filename,
+                 const char *const argv[],
+                 const char *const envp[])
 {
        long __res;
        asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx"
index 7c2f38f68ebb5196e67f6a896a5a09ebce343179..e3558b9a58bab8f9d114e3cdab44d7fe3bf1ea4f 100644 (file)
@@ -318,8 +318,9 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp,
  */
 
 asmlinkage
-long xtensa_execve(const char __user *name, char __user * __user *argv,
-                   char __user * __user *envp,
+long xtensa_execve(const char __user *name,
+                  const char __user *const __user *argv,
+                   const char __user *const __user *envp,
                    long a3, long a4, long a5,
                    struct pt_regs *regs)
 {
index ea24c1e51be221e167ebc7fc7c2bd2658aff8e58..2673a3d1480654ceec39f2ab144b15cde72ba72e 100644 (file)
@@ -1588,7 +1588,7 @@ static const struct ata_port_info sata_dwc_port_info[] = {
        },
 };
 
-static int sata_dwc_probe(struct of_device *ofdev,
+static int sata_dwc_probe(struct platform_device *ofdev,
                        const struct of_device_id *match)
 {
        struct sata_dwc_device *hsdev;
@@ -1702,7 +1702,7 @@ error_out:
        return err;
 }
 
-static int sata_dwc_remove(struct of_device *ofdev)
+static int sata_dwc_remove(struct platform_device *ofdev)
 {
        struct device *dev = &ofdev->dev;
        struct ata_host *host = dev_get_drvdata(dev);
index 2982b3ee9465d1521a6296186c52be9c3a8dc462..057413bb16e294d20d476d49ea4770b56a8e986c 100644 (file)
@@ -94,6 +94,7 @@
 #include <linux/hdreg.h>
 #include <linux/platform_device.h>
 #if defined(CONFIG_OF)
+#include <linux/of_address.h>
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 #endif
index c734f9b1263a7d020550f930e3619fb0f7759d80..50590c7f2c01ac4c2a71595e94fbebe930081079 100644 (file)
@@ -194,10 +194,11 @@ static DECLARE_WORK(console_work, console_callback);
 int fg_console;
 int last_console;
 int want_console = -1;
-int saved_fg_console;
-int saved_last_console;
-int saved_want_console;
-int saved_vc_mode;
+static int saved_fg_console;
+static int saved_last_console;
+static int saved_want_console;
+static int saved_vc_mode;
+static int saved_console_blanked;
 
 /*
  * For each existing display, we have a pointer to console currently visible
@@ -3449,6 +3450,7 @@ int con_debug_enter(struct vc_data *vc)
        saved_last_console = last_console;
        saved_want_console = want_console;
        saved_vc_mode = vc->vc_mode;
+       saved_console_blanked = console_blanked;
        vc->vc_mode = KD_TEXT;
        console_blanked = 0;
        if (vc->vc_sw->con_debug_enter)
@@ -3492,6 +3494,7 @@ int con_debug_leave(void)
        fg_console = saved_fg_console;
        last_console = saved_last_console;
        want_console = saved_want_console;
+       console_blanked = saved_console_blanked;
        vc_cons[fg_console].d->vc_mode = saved_vc_mode;
 
        vc = vc_cons[fg_console].d;
index 0ed763cd2e77499471bc6f4abc0da36e199ec3dd..b663d573aad99ed5257f9ab324d566309e70ac37 100644 (file)
@@ -94,6 +94,7 @@
 
 #ifdef CONFIG_OF
 /* For open firmware. */
+#include <linux/of_address.h>
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 #endif
index 11567c7999a243d3d95ebecdb623c26de49705ce..c148b630215484f9689bf9257d6acf286685c37a 100644 (file)
@@ -2136,16 +2136,6 @@ static void sync_sbs(mddev_t * mddev, int nospares)
         * with the rest of the array)
         */
        mdk_rdev_t *rdev;
-
-       /* First make sure individual recovery_offsets are correct */
-       list_for_each_entry(rdev, &mddev->disks, same_set) {
-               if (rdev->raid_disk >= 0 &&
-                   mddev->delta_disks >= 0 &&
-                   !test_bit(In_sync, &rdev->flags) &&
-                   mddev->curr_resync_completed > rdev->recovery_offset)
-                               rdev->recovery_offset = mddev->curr_resync_completed;
-
-       }       
        list_for_each_entry(rdev, &mddev->disks, same_set) {
                if (rdev->sb_events == mddev->events ||
                    (nospares &&
@@ -2167,12 +2157,27 @@ static void md_update_sb(mddev_t * mddev, int force_change)
        int sync_req;
        int nospares = 0;
 
-       mddev->utime = get_seconds();
-       if (mddev->external)
-               return;
 repeat:
+       /* First make sure individual recovery_offsets are correct */
+       list_for_each_entry(rdev, &mddev->disks, same_set) {
+               if (rdev->raid_disk >= 0 &&
+                   mddev->delta_disks >= 0 &&
+                   !test_bit(In_sync, &rdev->flags) &&
+                   mddev->curr_resync_completed > rdev->recovery_offset)
+                               rdev->recovery_offset = mddev->curr_resync_completed;
+
+       }       
+       if (mddev->external || !mddev->persistent) {
+               clear_bit(MD_CHANGE_DEVS, &mddev->flags);
+               clear_bit(MD_CHANGE_CLEAN, &mddev->flags);
+               wake_up(&mddev->sb_wait);
+               return;
+       }
+
        spin_lock_irq(&mddev->write_lock);
 
+       mddev->utime = get_seconds();
+
        set_bit(MD_CHANGE_PENDING, &mddev->flags);
        if (test_and_clear_bit(MD_CHANGE_DEVS, &mddev->flags))
                force_change = 1;
@@ -2221,19 +2226,6 @@ repeat:
                MD_BUG();
                mddev->events --;
        }
-
-       /*
-        * do not write anything to disk if using
-        * nonpersistent superblocks
-        */
-       if (!mddev->persistent) {
-               if (!mddev->external)
-                       clear_bit(MD_CHANGE_PENDING, &mddev->flags);
-
-               spin_unlock_irq(&mddev->write_lock);
-               wake_up(&mddev->sb_wait);
-               return;
-       }
        sync_sbs(mddev, nospares);
        spin_unlock_irq(&mddev->write_lock);
 
index 73cc74ffc26bd5eefb7166aa37130e4c47daa56a..ad83a4dcadc3ed7cafa914d2e4dcb7ef1a939fdf 100644 (file)
@@ -787,8 +787,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        struct bio_list bl;
        struct page **behind_pages = NULL;
        const int rw = bio_data_dir(bio);
-       const bool do_sync = (bio->bi_rw & REQ_SYNC);
-       bool do_barriers;
+       const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
+       unsigned long do_barriers;
        mdk_rdev_t *blocked_rdev;
 
        /*
@@ -1120,6 +1120,8 @@ static int raid1_spare_active(mddev_t *mddev)
 {
        int i;
        conf_t *conf = mddev->private;
+       int count = 0;
+       unsigned long flags;
 
        /*
         * Find all failed disks within the RAID1 configuration 
@@ -1131,15 +1133,16 @@ static int raid1_spare_active(mddev_t *mddev)
                if (rdev
                    && !test_bit(Faulty, &rdev->flags)
                    && !test_and_set_bit(In_sync, &rdev->flags)) {
-                       unsigned long flags;
-                       spin_lock_irqsave(&conf->device_lock, flags);
-                       mddev->degraded--;
-                       spin_unlock_irqrestore(&conf->device_lock, flags);
+                       count++;
+                       sysfs_notify_dirent(rdev->sysfs_state);
                }
        }
+       spin_lock_irqsave(&conf->device_lock, flags);
+       mddev->degraded -= count;
+       spin_unlock_irqrestore(&conf->device_lock, flags);
 
        print_conf(conf);
-       return 0;
+       return count;
 }
 
 
@@ -1640,7 +1643,7 @@ static void raid1d(mddev_t *mddev)
                         * We already have a nr_pending reference on these rdevs.
                         */
                        int i;
-                       const bool do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC);
+                       const unsigned long do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC);
                        clear_bit(R1BIO_BarrierRetry, &r1_bio->state);
                        clear_bit(R1BIO_Barrier, &r1_bio->state);
                        for (i=0; i < conf->raid_disks; i++)
@@ -1696,7 +1699,7 @@ static void raid1d(mddev_t *mddev)
                                       (unsigned long long)r1_bio->sector);
                                raid_end_bio_io(r1_bio);
                        } else {
-                               const bool do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC;
+                               const unsigned long do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC;
                                r1_bio->bios[r1_bio->read_disk] =
                                        mddev->ro ? IO_BLOCKED : NULL;
                                r1_bio->read_disk = disk;
index a88aeb5198c76a6c3a5ed58693d71f751ae975a7..84718383124d665f2c9382f5149d99773acde408 100644 (file)
@@ -799,7 +799,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        int i;
        int chunk_sects = conf->chunk_mask + 1;
        const int rw = bio_data_dir(bio);
-       const bool do_sync = (bio->bi_rw & REQ_SYNC);
+       const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
        struct bio_list bl;
        unsigned long flags;
        mdk_rdev_t *blocked_rdev;
@@ -1116,6 +1116,8 @@ static int raid10_spare_active(mddev_t *mddev)
        int i;
        conf_t *conf = mddev->private;
        mirror_info_t *tmp;
+       int count = 0;
+       unsigned long flags;
 
        /*
         * Find all non-in_sync disks within the RAID10 configuration
@@ -1126,15 +1128,16 @@ static int raid10_spare_active(mddev_t *mddev)
                if (tmp->rdev
                    && !test_bit(Faulty, &tmp->rdev->flags)
                    && !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
-                       unsigned long flags;
-                       spin_lock_irqsave(&conf->device_lock, flags);
-                       mddev->degraded--;
-                       spin_unlock_irqrestore(&conf->device_lock, flags);
+                       count++;
+                       sysfs_notify_dirent(tmp->rdev->sysfs_state);
                }
        }
+       spin_lock_irqsave(&conf->device_lock, flags);
+       mddev->degraded -= count;
+       spin_unlock_irqrestore(&conf->device_lock, flags);
 
        print_conf(conf);
-       return 0;
+       return count;
 }
 
 
@@ -1734,7 +1737,7 @@ static void raid10d(mddev_t *mddev)
                                raid_end_bio_io(r10_bio);
                                bio_put(bio);
                        } else {
-                               const bool do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
+                               const unsigned long do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
                                bio_put(bio);
                                rdev = conf->mirrors[mirror].rdev;
                                if (printk_ratelimit())
index 866d4b5a144c465daf21e439b9b0e6ef36571d6a..69b0a169e43d483094200d88cd7d4e5ae05e9d19 100644 (file)
@@ -5330,6 +5330,8 @@ static int raid5_spare_active(mddev_t *mddev)
        int i;
        raid5_conf_t *conf = mddev->private;
        struct disk_info *tmp;
+       int count = 0;
+       unsigned long flags;
 
        for (i = 0; i < conf->raid_disks; i++) {
                tmp = conf->disks + i;
@@ -5337,14 +5339,15 @@ static int raid5_spare_active(mddev_t *mddev)
                    && tmp->rdev->recovery_offset == MaxSector
                    && !test_bit(Faulty, &tmp->rdev->flags)
                    && !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
-                       unsigned long flags;
-                       spin_lock_irqsave(&conf->device_lock, flags);
-                       mddev->degraded--;
-                       spin_unlock_irqrestore(&conf->device_lock, flags);
+                       count++;
+                       sysfs_notify_dirent(tmp->rdev->sysfs_state);
                }
        }
+       spin_lock_irqsave(&conf->device_lock, flags);
+       mddev->degraded -= count;
+       spin_unlock_irqrestore(&conf->device_lock, flags);
        print_raid5_conf(conf);
-       return 0;
+       return count;
 }
 
 static int raid5_remove_disk(mddev_t *mddev, int number)
index 00af55d7afba60785b61b011814aba2e46a6f0df..fe63f6bd663c1f7a5ac8db57a0014c1c4a019da0 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/concat.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/slab.h>
 
index 0d5de2574dd106af6c3bdbad8e8028b4c24b3987..373dcfec689c40c2bf1be9af2b9bddb7a15dcacb 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/netdevice.h>
 #include <linux/cache.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/ethtool.h>
 #include <linux/uaccess.h>
 #include <linux/slab.h>
@@ -476,6 +477,26 @@ ath5k_pci_probe(struct pci_dev *pdev,
        int ret;
        u8 csz;
 
+       /*
+        * L0s needs to be disabled on all ath5k cards.
+        *
+        * For distributions shipping with CONFIG_PCIEASPM (this will be enabled
+        * by default in the future in 2.6.36) this will also mean both L1 and
+        * L0s will be disabled when a pre 1.1 PCIe device is detected. We do
+        * know L1 works correctly even for all ath5k pre 1.1 PCIe devices
+        * though but cannot currently undue the effect of a blacklist, for
+        * details you can read pcie_aspm_sanity_check() and see how it adjusts
+        * the device link capability.
+        *
+        * It may be possible in the future to implement some PCI API to allow
+        * drivers to override blacklists for pre 1.1 PCIe but for now it is
+        * best to accept that both L0s and L1 will be disabled completely for
+        * distributions shipping with CONFIG_PCIEASPM rather than having this
+        * issue present. Motivation for adding this new API will be to help
+        * with power consumption for some of these devices.
+        */
+       pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
        ret = pci_enable_device(pdev);
        if (ret) {
                dev_err(&pdev->dev, "can't enable device\n");
index 8750c558c221658302c18fabff9a25f83906b730..7f48df1e2903008f0a68bf991817bee64edf5b81 100644 (file)
 #define AR9287_EEP_NO_BACK_VER       AR9287_EEP_MINOR_VER_1
 
 #define AR9287_EEP_START_LOC            128
+#define AR9287_HTC_EEP_START_LOC        256
 #define AR9287_NUM_2G_CAL_PIERS         3
 #define AR9287_NUM_2G_CCK_TARGET_POWERS 3
 #define AR9287_NUM_2G_20_TARGET_POWERS  3
index 4a52cf03808b1aa207acb02fdd1f0394c38b73fa..dff2da777312bbb0e5b1c8902b370e79c41f75b4 100644 (file)
@@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
        struct ar9287_eeprom *eep = &ah->eeprom.map9287;
        struct ath_common *common = ath9k_hw_common(ah);
        u16 *eep_data;
-       int addr, eep_start_loc = AR9287_EEP_START_LOC;
+       int addr, eep_start_loc;
        eep_data = (u16 *)eep;
 
+       if (ah->hw_version.devid == 0x7015)
+               eep_start_loc = AR9287_HTC_EEP_START_LOC;
+       else
+               eep_start_loc = AR9287_EEP_START_LOC;
+
        if (!ath9k_hw_use_flash(ah)) {
                ath_print(common, ATH_DBG_EEPROM,
                          "Reading from EEPROM, not flash\n");
index 61c1bee3f26a1159b6ac869e621d1573e0250f5c..17e7a9a367e70340a42d13c57beb167bfd4979d3 100644 (file)
@@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
        }
        kfree(buf);
 
-       if (hif_dev->device_id == 0x7010)
+       if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
                firm_offset = AR7010_FIRMWARE_TEXT;
        else
                firm_offset = AR9271_FIRMWARE_TEXT;
@@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
 
        switch(hif_dev->device_id) {
        case 0x7010:
+       case 0x7015:
        case 0x9018:
                if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
                        hif_dev->fw_name = FIRMWARE_AR7010_1_1;
@@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
                break;
        }
 
-       if (!hif_dev->fw_name) {
-               dev_err(&udev->dev, "Can't determine firmware !\n");
-               goto err_htc_hw_alloc;
-       }
-
        ret = ath9k_hif_usb_dev_init(hif_dev);
        if (ret) {
                ret = -EINVAL;
index 148b43317fdb1d6b78502ff42d208b197be28c33..2d4279191d7a7d6d1690d12a809cf9eb6dd8ef8a 100644 (file)
@@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
 
        switch(devid) {
        case 0x7010:
+       case 0x7015:
        case 0x9018:
                priv->htc->credits = 45;
                break;
index ebed9d1691a5110ee3222ab12e652da4dcdde9d5..7d09b4b17bbd4b5e1146fa295ea6a22ffb571014 100644 (file)
@@ -366,7 +366,8 @@ static void ath9k_htc_setup_rate(struct ath9k_htc_priv *priv,
                caps = WLAN_RC_HT_FLAG;
                if (sta->ht_cap.mcs.rx_mask[1])
                        caps |= WLAN_RC_DS_FLAG;
-               if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+               if ((sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+                    (conf_is_ht40(&priv->hw->conf)))
                        caps |= WLAN_RC_40_FLAG;
                if (conf_is_ht40(&priv->hw->conf) &&
                    (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40))
index bd0b4acc3ece542d15413a1409421c1e538b73da..2a6e45a293a90f38b7add877b0ca231c603ebe1b 100644 (file)
@@ -78,18 +78,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
        struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
        struct ieee80211_sta *sta = tx_info->control.sta;
        struct ath9k_htc_sta *ista;
-       struct ath9k_htc_vif *avp;
        struct ath9k_htc_tx_ctl tx_ctl;
        enum htc_endpoint_id epid;
        u16 qnum;
        __le16 fc;
        u8 *tx_fhdr;
-       u8 sta_idx;
+       u8 sta_idx, vif_idx;
 
        hdr = (struct ieee80211_hdr *) skb->data;
        fc = hdr->frame_control;
 
-       avp = (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv;
+       if (tx_info->control.vif &&
+                       (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv)
+               vif_idx = ((struct ath9k_htc_vif *)
+                               tx_info->control.vif->drv_priv)->index;
+       else
+               vif_idx = priv->nvifs;
+
        if (sta) {
                ista = (struct ath9k_htc_sta *) sta->drv_priv;
                sta_idx = ista->index;
@@ -106,7 +111,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
                memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr));
 
                tx_hdr.node_idx = sta_idx;
-               tx_hdr.vif_idx = avp->index;
+               tx_hdr.vif_idx = vif_idx;
 
                if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
                        tx_ctl.type = ATH9K_HTC_AMPDU;
@@ -169,7 +174,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
                tx_ctl.type = ATH9K_HTC_NORMAL;
 
                mgmt_hdr.node_idx = sta_idx;
-               mgmt_hdr.vif_idx = avp->index;
+               mgmt_hdr.vif_idx = vif_idx;
                mgmt_hdr.tidno = 0;
                mgmt_hdr.flags = 0;
 
index 633e3d949ec09f172fab67d797ab449a557ae4f1..d01c4adab8d67bef80e37dce242c668210a783b4 100644 (file)
 
 #define AR_DEVID_7010(_ah) \
        (((_ah)->hw_version.devid == 0x7010) || \
+        ((_ah)->hw_version.devid == 0x7015) || \
         ((_ah)->hw_version.devid == 0x9018))
 
 #define AR_RADIO_SREV_MAJOR                   0xf0
index 16bbfa3189a59cb65998318c8dc06b90995ee6c5..1189dbb6e2a62abcdc090ca5eea61a9eb5824aa7 100644 (file)
@@ -6665,12 +6665,13 @@ static int __init ipw2100_init(void)
        printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
        printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
 
+       pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
+                          PM_QOS_DEFAULT_VALUE);
+
        ret = pci_register_driver(&ipw2100_pci_driver);
        if (ret)
                goto out;
 
-       pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
-                          PM_QOS_DEFAULT_VALUE);
 #ifdef CONFIG_IPW2100_DEBUG
        ipw2100_debug_level = debug;
        ret = driver_create_file(&ipw2100_pci_driver.driver,
index a37b30cef4894c6da466989be64546de3f38af94..ce3722f4c3e38e532c587051bce253257bcd89eb 100644 (file)
@@ -484,7 +484,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout)
 
        cmd->timeout = timeout;
 
-       ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd));
+       ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd));
        if (ret < 0) {
                wl1251_error("cmd trigger scan to failed: %d", ret);
                goto out;
index e058c2ba2a1585cf3a81442c845906b24fcc225b..ca05aefd03bfbe1cb1f95f8d8fae899206af99da 100644 (file)
@@ -938,10 +938,11 @@ static int set_brightness(int value)
        /* SPLV laptop */
        if (hotk->methods->brightness_set) {
                if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set,
-                                   value, NULL))
+                                   value, NULL)) {
                        printk(KERN_WARNING
                               "Asus ACPI: Error changing brightness\n");
                        ret = -EIO;
+               }
                goto out;
        }
 
@@ -953,10 +954,11 @@ static int set_brightness(int value)
                                              hotk->methods->brightness_down,
                                              NULL, NULL);
                (value > 0) ? value-- : value++;
-               if (ACPI_FAILURE(status))
+               if (ACPI_FAILURE(status)) {
                        printk(KERN_WARNING
                               "Asus ACPI: Error changing brightness\n");
                        ret = -EIO;
+               }
        }
 out:
        return ret;
index d071ce05632265176cb9434524725fdc976728fb..097083cac4135c7d413cc9d5932dd6cf55c7f269 100644 (file)
@@ -840,6 +840,14 @@ static struct dmi_system_id __initdata compal_dmi_table[] = {
                },
                .callback = dmi_check_cb
        },
+       {
+               .ident = "Dell Mini 1012",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
+               },
+               .callback = dmi_check_cb
+       },
        {
                .ident = "Dell Inspiron 11z",
                .matches = {
@@ -1092,5 +1100,6 @@ MODULE_ALIAS("dmi:*:rnJHL90:rvrREFERENCE:*");
 MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron910:*");
 MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1010:*");
 MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1011:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1012:*");
 MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1110:*");
 MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1210:*");
index b41ed5cab3e793105ede42b1e2d7199c04dd6c25..4413975912e036d71961a3430aa00be964de4b39 100644 (file)
@@ -121,6 +121,13 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1011"),
                },
        },
+       {
+               .ident = "Dell Mini 1012",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
+               },
+       },
        {
                .ident = "Dell Inspiron 11z",
                .matches = {
index afe82e50dfea1b03bf53820cf9f9d2edb76e6355..9024480a82288ec071e26008f616fe2d9556c18b 100644 (file)
@@ -1342,8 +1342,10 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
                limits = &ips_lv_limits;
        else if (strstr(boot_cpu_data.x86_model_id, "CPU       U"))
                limits = &ips_ulv_limits;
-       else
+       else {
                dev_info(&ips->dev->dev, "No CPUID match found.\n");
+               goto out;
+       }
 
        rdmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_power);
        tdp = turbo_power & TURBO_TDP_MASK;
@@ -1432,6 +1434,12 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
        spin_lock_init(&ips->turbo_status_lock);
 
+       ret = pci_enable_device(dev);
+       if (ret) {
+               dev_err(&dev->dev, "can't enable PCI device, aborting\n");
+               goto error_free;
+       }
+
        if (!pci_resource_start(dev, 0)) {
                dev_err(&dev->dev, "TBAR not assigned, aborting\n");
                ret = -ENXIO;
@@ -1444,11 +1452,6 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
                goto error_free;
        }
 
-       ret = pci_enable_device(dev);
-       if (ret) {
-               dev_err(&dev->dev, "can't enable PCI device, aborting\n");
-               goto error_free;
-       }
 
        ips->regmap = ioremap(pci_resource_start(dev, 0),
                              pci_resource_len(dev, 0));
index 5d6119bed00c6500e62bbf19073d772bc8af9e77..e35ed128bdef439313a107106f36c47e03dc5b7e 100644 (file)
@@ -1911,6 +1911,17 @@ enum {   /* hot key scan codes (derived from ACPI DSDT) */
        TP_ACPI_HOTKEYSCAN_VOLUMEDOWN,
        TP_ACPI_HOTKEYSCAN_MUTE,
        TP_ACPI_HOTKEYSCAN_THINKPAD,
+       TP_ACPI_HOTKEYSCAN_UNK1,
+       TP_ACPI_HOTKEYSCAN_UNK2,
+       TP_ACPI_HOTKEYSCAN_UNK3,
+       TP_ACPI_HOTKEYSCAN_UNK4,
+       TP_ACPI_HOTKEYSCAN_UNK5,
+       TP_ACPI_HOTKEYSCAN_UNK6,
+       TP_ACPI_HOTKEYSCAN_UNK7,
+       TP_ACPI_HOTKEYSCAN_UNK8,
+
+       /* Hotkey keymap size */
+       TPACPI_HOTKEY_MAP_LEN
 };
 
 enum { /* Keys/events available through NVRAM polling */
@@ -3082,6 +3093,8 @@ static const struct tpacpi_quirk tpacpi_hotkey_qtable[] __initconst = {
        TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
 };
 
+typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
+
 static int __init hotkey_init(struct ibm_init_struct *iibm)
 {
        /* Requirements for changing the default keymaps:
@@ -3113,9 +3126,17 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
         * If the above is too much to ask, don't change the keymap.
         * Ask the thinkpad-acpi maintainer to do it, instead.
         */
-       static u16 ibm_keycode_map[] __initdata = {
+
+       enum keymap_index {
+               TPACPI_KEYMAP_IBM_GENERIC = 0,
+               TPACPI_KEYMAP_LENOVO_GENERIC,
+       };
+
+       static const tpacpi_keymap_t tpacpi_keymaps[] __initconst = {
+       /* Generic keymap for IBM ThinkPads */
+       [TPACPI_KEYMAP_IBM_GENERIC] = {
                /* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */
-               KEY_FN_F1,      KEY_FN_F2,      KEY_COFFEE,     KEY_SLEEP,
+               KEY_FN_F1,      KEY_BATTERY,    KEY_COFFEE,     KEY_SLEEP,
                KEY_WLAN,       KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
                KEY_FN_F9,      KEY_FN_F10,     KEY_FN_F11,     KEY_SUSPEND,
 
@@ -3146,11 +3167,13 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
                /* (assignments unknown, please report if found) */
                KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
                KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
-       };
-       static u16 lenovo_keycode_map[] __initdata = {
+               },
+
+       /* Generic keymap for Lenovo ThinkPads */
+       [TPACPI_KEYMAP_LENOVO_GENERIC] = {
                /* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */
                KEY_FN_F1,      KEY_COFFEE,     KEY_BATTERY,    KEY_SLEEP,
-               KEY_WLAN,       KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
+               KEY_WLAN,       KEY_CAMERA, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
                KEY_FN_F9,      KEY_FN_F10,     KEY_FN_F11,     KEY_SUSPEND,
 
                /* Scan codes 0x0C to 0x1F: Other ACPI HKEY hot keys */
@@ -3189,11 +3212,25 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
                /* (assignments unknown, please report if found) */
                KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
                KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
+               },
+       };
+
+       static const struct tpacpi_quirk tpacpi_keymap_qtable[] __initconst = {
+               /* Generic maps (fallback) */
+               {
+                 .vendor = PCI_VENDOR_ID_IBM,
+                 .bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
+                 .quirks = TPACPI_KEYMAP_IBM_GENERIC,
+               },
+               {
+                 .vendor = PCI_VENDOR_ID_LENOVO,
+                 .bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
+                 .quirks = TPACPI_KEYMAP_LENOVO_GENERIC,
+               },
        };
 
-#define TPACPI_HOTKEY_MAP_LEN          ARRAY_SIZE(ibm_keycode_map)
-#define TPACPI_HOTKEY_MAP_SIZE         sizeof(ibm_keycode_map)
-#define TPACPI_HOTKEY_MAP_TYPESIZE     sizeof(ibm_keycode_map[0])
+#define TPACPI_HOTKEY_MAP_SIZE         sizeof(tpacpi_keymap_t)
+#define TPACPI_HOTKEY_MAP_TYPESIZE     sizeof(tpacpi_keymap_t[0])
 
        int res, i;
        int status;
@@ -3202,6 +3239,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
        bool tabletsw_state = false;
 
        unsigned long quirks;
+       unsigned long keymap_id;
 
        vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
                        "initializing hotkey subdriver\n");
@@ -3342,7 +3380,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
                goto err_exit;
 
        /* Set up key map */
-
        hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE,
                                        GFP_KERNEL);
        if (!hotkey_keycode_map) {
@@ -3352,17 +3389,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
                goto err_exit;
        }
 
-       if (tpacpi_is_lenovo()) {
-               dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
-                          "using Lenovo default hot key map\n");
-               memcpy(hotkey_keycode_map, &lenovo_keycode_map,
-                       TPACPI_HOTKEY_MAP_SIZE);
-       } else {
-               dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
-                          "using IBM default hot key map\n");
-               memcpy(hotkey_keycode_map, &ibm_keycode_map,
-                       TPACPI_HOTKEY_MAP_SIZE);
-       }
+       keymap_id = tpacpi_check_quirks(tpacpi_keymap_qtable,
+                                       ARRAY_SIZE(tpacpi_keymap_qtable));
+       BUG_ON(keymap_id >= ARRAY_SIZE(tpacpi_keymaps));
+       dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
+                  "using keymap number %lu\n", keymap_id);
+
+       memcpy(hotkey_keycode_map, &tpacpi_keymaps[keymap_id],
+               TPACPI_HOTKEY_MAP_SIZE);
 
        input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN);
        tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
@@ -3469,7 +3503,8 @@ static bool hotkey_notify_hotkey(const u32 hkey,
        *send_acpi_ev = true;
        *ignore_acpi_ev = false;
 
-       if (scancode > 0 && scancode < 0x21) {
+       /* HKEY event 0x1001 is scancode 0x00 */
+       if (scancode > 0 && scancode <= TPACPI_HOTKEY_MAP_LEN) {
                scancode--;
                if (!(hotkey_source_mask & (1 << scancode))) {
                        tpacpi_input_send_key_masked(scancode);
@@ -6080,13 +6115,18 @@ static struct backlight_ops ibm_backlight_data = {
 
 /* --------------------------------------------------------------------- */
 
+/*
+ * Call _BCL method of video device.  On some ThinkPads this will
+ * switch the firmware to the ACPI brightness control mode.
+ */
+
 static int __init tpacpi_query_bcl_levels(acpi_handle handle)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *obj;
        int rc;
 
-       if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) {
+       if (ACPI_SUCCESS(acpi_evaluate_object(handle, "_BCL", NULL, &buffer))) {
                obj = (union acpi_object *)buffer.pointer;
                if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
                        printk(TPACPI_ERR "Unknown _BCL data, "
@@ -6103,55 +6143,22 @@ static int __init tpacpi_query_bcl_levels(acpi_handle handle)
        return rc;
 }
 
-static acpi_status __init tpacpi_acpi_walk_find_bcl(acpi_handle handle,
-                                       u32 lvl, void *context, void **rv)
-{
-       char name[ACPI_PATH_SEGMENT_LENGTH];
-       struct acpi_buffer buffer = { sizeof(name), &name };
-
-       if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) &&
-           !strncmp("_BCL", name, sizeof(name) - 1)) {
-               BUG_ON(!rv || !*rv);
-               **(int **)rv = tpacpi_query_bcl_levels(handle);
-               return AE_CTRL_TERMINATE;
-       } else {
-               return AE_OK;
-       }
-}
 
 /*
  * Returns 0 (no ACPI _BCL or _BCL invalid), or size of brightness map
  */
 static unsigned int __init tpacpi_check_std_acpi_brightness_support(void)
 {
-       int status;
+       acpi_handle video_device;
        int bcl_levels = 0;
-       void *bcl_ptr = &bcl_levels;
-
-       if (!vid_handle)
-               TPACPI_ACPIHANDLE_INIT(vid);
-
-       if (!vid_handle)
-               return 0;
-
-       /*
-        * Search for a _BCL method, and execute it.  This is safe on all
-        * ThinkPads, and as a side-effect, _BCL will place a Lenovo Vista
-        * BIOS in ACPI backlight control mode.  We do NOT have to care
-        * about calling the _BCL method in an enabled video device, any
-        * will do for our purposes.
-        */
 
-       status = acpi_walk_namespace(ACPI_TYPE_METHOD, vid_handle, 3,
-                                    tpacpi_acpi_walk_find_bcl, NULL, NULL,
-                                    &bcl_ptr);
+       tpacpi_acpi_handle_locate("video", ACPI_VIDEO_HID, &video_device);
+       if (video_device)
+               bcl_levels = tpacpi_query_bcl_levels(video_device);
 
-       if (ACPI_SUCCESS(status) && bcl_levels > 2) {
-               tp_features.bright_acpimode = 1;
-               return bcl_levels - 2;
-       }
+       tp_features.bright_acpimode = (bcl_levels > 0);
 
-       return 0;
+       return (bcl_levels > 2) ? (bcl_levels - 2) : 0;
 }
 
 /*
@@ -6244,28 +6251,6 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
        if (tp_features.bright_unkfw)
                return 1;
 
-       if (tp_features.bright_acpimode) {
-               if (acpi_video_backlight_support()) {
-                       if (brightness_enable > 1) {
-                               printk(TPACPI_NOTICE
-                                      "Standard ACPI backlight interface "
-                                      "available, not loading native one.\n");
-                               return 1;
-                       } else if (brightness_enable == 1) {
-                               printk(TPACPI_NOTICE
-                                      "Backlight control force enabled, even if standard "
-                                      "ACPI backlight interface is available\n");
-                       }
-               } else {
-                       if (brightness_enable > 1) {
-                               printk(TPACPI_NOTICE
-                                      "Standard ACPI backlight interface not "
-                                      "available, thinkpad_acpi native "
-                                      "brightness control enabled\n");
-                       }
-               }
-       }
-
        if (!brightness_enable) {
                dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_BRGHT,
                           "brightness support disabled by "
@@ -6273,6 +6258,26 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
                return 1;
        }
 
+       if (acpi_video_backlight_support()) {
+               if (brightness_enable > 1) {
+                       printk(TPACPI_INFO
+                              "Standard ACPI backlight interface "
+                              "available, not loading native one.\n");
+                       return 1;
+               } else if (brightness_enable == 1) {
+                       printk(TPACPI_WARN
+                               "Cannot enable backlight brightness support, "
+                               "ACPI is already handling it.  Refer to the "
+                               "acpi_backlight kernel parameter\n");
+                       return 1;
+               }
+       } else if (tp_features.bright_acpimode && brightness_enable > 1) {
+               printk(TPACPI_NOTICE
+                       "Standard ACPI backlight interface not "
+                       "available, thinkpad_acpi native "
+                       "brightness control enabled\n");
+       }
+
        /*
         * Check for module parameter bogosity, note that we
         * init brightness_mode to TPACPI_BRGHT_MODE_MAX in order to be
index 95a895dd4f132883aa7dc8c379332aa917863aa0..c8dc392edd57534c18cf45257251f42b49c070c7 100644 (file)
@@ -56,6 +56,7 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/timer.h>
+#include <linux/slab.h>
 #include <linux/pci.h>
 #include <linux/aer.h>
 #include <asm/dma.h>
index 659a695bdad6474e832c9d4ffbef7648fe45c4d5..2af8fd1131234be29fd612b207da23543c78870b 100644 (file)
 #include <linux/slab.h>
 #include <linux/serial_core.h>
 #include <linux/serial_8250.h>
+#include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/nwpserial.h>
 
-#include <asm/prom.h>
-
 struct of_serial_info {
        int type;
        int line;
index 544f2e25d0e545f30f959019f4a176bdccb20af8..6381a0282ee79ab3f43e464f19a48a0880faa4bc 100644 (file)
@@ -55,7 +55,12 @@ EXPORT_SYMBOL(sunserial_unregister_minors);
 int sunserial_console_match(struct console *con, struct device_node *dp,
                            struct uart_driver *drv, int line, bool ignore_line)
 {
-       if (!con || of_console_device != dp)
+       if (!con)
+               return 0;
+
+       drv->cons = con;
+
+       if (of_console_device != dp)
                return 0;
 
        if (!ignore_line) {
@@ -69,12 +74,10 @@ int sunserial_console_match(struct console *con, struct device_node *dp,
                        return 0;
        }
 
-       con->index = line;
-       drv->cons = con;
-
-       if (!console_set_on_cmdline)
+       if (!console_set_on_cmdline) {
+               con->index = line;
                add_preferred_console(con->name, line, NULL);
-
+       }
        return 1;
 }
 EXPORT_SYMBOL(sunserial_console_match);
index 59be3efe063621e2fffb7b576e8ea0d8daa10b32..052b3c7fa6a0f644d26c613e67e69ffe00ad05be 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/errno.h>
 #include <linux/platform_device.h>
+#include <linux/sched.h>
 #include <linux/workqueue.h>
 #include <linux/delay.h>
 #include <linux/io.h>
index afe21e6eb5443cc8e8056e6f630fbd1c89caf991..1c2c68356ea7ecce8d3983fba656a4faf9cd26ae 100644 (file)
@@ -80,7 +80,10 @@ static void clcdfb_disable(struct clcd_fb *fb)
        /*
         * Disable CLCD clock source.
         */
-       clk_disable(fb->clk);
+       if (fb->clk_enabled) {
+               fb->clk_enabled = false;
+               clk_disable(fb->clk);
+       }
 }
 
 static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
@@ -88,7 +91,10 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
        /*
         * Enable the CLCD clock source.
         */
-       clk_enable(fb->clk);
+       if (!fb->clk_enabled) {
+               fb->clk_enabled = true;
+               clk_enable(fb->clk);
+       }
 
        /*
         * Bring up by first enabling..
index 9e60fd201716020c8506a392ecf76204b3884cb1..a7528b91393676bb1f1affa72f6b78f38206d4c5 100644 (file)
@@ -108,7 +108,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        Node *fmt;
        struct file * interp_file = NULL;
        char iname[BINPRM_BUF_SIZE];
-       char *iname_addr = iname;
+       const char *iname_addr = iname;
        int retval;
        int fd_binary = -1;
 
index aca9d55afb220fddd5998a5d37bfd7a402bb5995..396a9884591f5f6a9cc2e7cfa7c80220bf62ef87 100644 (file)
@@ -16,7 +16,8 @@
 
 static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
 {
-       char *cp, *i_name, *i_arg;
+       const char *i_arg, *i_name;
+       char *cp;
        struct file *file;
        char interp[BINPRM_BUF_SIZE];
        int retval;
index 7761837e4500f0c3fee3c3dd51427dcd6adef82a..05c7d6b84df7c770f07aa7148b9f47e6aacd060f 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -361,13 +361,13 @@ err:
 /*
  * count() counts the number of strings in array ARGV.
  */
-static int count(char __user * __user * argv, int max)
+static int count(const char __user * const __user * argv, int max)
 {
        int i = 0;
 
        if (argv != NULL) {
                for (;;) {
-                       char __user * p;
+                       const char __user * p;
 
                        if (get_user(p, argv))
                                return -EFAULT;
@@ -387,7 +387,7 @@ static int count(char __user * __user * argv, int max)
  * processes's memory to the new process's stack.  The call to get_user_pages()
  * ensures the destination page is created and not swapped out.
  */
-static int copy_strings(int argc, char __user * __user * argv,
+static int copy_strings(int argc, const char __user *const __user *argv,
                        struct linux_binprm *bprm)
 {
        struct page *kmapped_page = NULL;
@@ -396,7 +396,7 @@ static int copy_strings(int argc, char __user * __user * argv,
        int ret;
 
        while (argc-- > 0) {
-               char __user *str;
+               const char __user *str;
                int len;
                unsigned long pos;
 
@@ -470,12 +470,13 @@ out:
 /*
  * Like copy_strings, but get argv and its values from kernel memory.
  */
-int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm)
+int copy_strings_kernel(int argc, const char *const *argv,
+                       struct linux_binprm *bprm)
 {
        int r;
        mm_segment_t oldfs = get_fs();
        set_fs(KERNEL_DS);
-       r = copy_strings(argc, (char __user * __user *)argv, bprm);
+       r = copy_strings(argc, (const char __user *const  __user *)argv, bprm);
        set_fs(oldfs);
        return r;
 }
@@ -997,7 +998,7 @@ EXPORT_SYMBOL(flush_old_exec);
 void setup_new_exec(struct linux_binprm * bprm)
 {
        int i, ch;
-       char * name;
+       const char *name;
        char tcomm[sizeof(current->comm)];
 
        arch_pick_mmap_layout(current->mm);
@@ -1316,9 +1317,9 @@ EXPORT_SYMBOL(search_binary_handler);
 /*
  * sys_execve() executes a new program.
  */
-int do_execve(char * filename,
-       char __user *__user *argv,
-       char __user *__user *envp,
+int do_execve(const char * filename,
+       const char __user *const __user *argv,
+       const char __user *const __user *envp,
        struct pt_regs * regs)
 {
        struct linux_binprm *bprm;
index 1fa86b9df73b4c885190b6b3bbf95291b7630d4e..bee60c04109a29b61d9cf4baffece2d18f7f75c3 100644 (file)
@@ -400,9 +400,10 @@ int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno)
        list_add(&sbi->s_list, &nilfs->ns_supers);
        up_write(&nilfs->ns_super_sem);
 
+       err = -ENOMEM;
        sbi->s_ifile = nilfs_ifile_new(sbi, nilfs->ns_inode_size);
        if (!sbi->s_ifile)
-               return -ENOMEM;
+               goto delist;
 
        down_read(&nilfs->ns_segctor_sem);
        err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp,
@@ -433,6 +434,7 @@ int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno)
        nilfs_mdt_destroy(sbi->s_ifile);
        sbi->s_ifile = NULL;
 
+ delist:
        down_write(&nilfs->ns_super_sem);
        list_del_init(&sbi->s_list);
        up_write(&nilfs->ns_super_sem);
index 37de1f062d81146126e75870b04d03a7640e38d1..6af1c0073e9ec8a871a9fe51d42e69d1daaf6cf7 100644 (file)
@@ -608,11 +608,11 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,
                return -EINVAL;
        }
 
-       if (swp) {
+       if (!valid[!swp])
                printk(KERN_WARNING "NILFS warning: broken superblock. "
                       "using spare superblock.\n");
+       if (swp)
                nilfs_swap_super_block(nilfs);
-       }
 
        nilfs->ns_sbwcount = 0;
        nilfs->ns_sbwtime = le64_to_cpu(sbp[0]->s_wtime);
index ca16c3801a1e7c26332efd842be95c4299bcd1b4..be33b3affc8ada39fdaaf78bb2deefaca8385615 100644 (file)
@@ -150,6 +150,7 @@ struct clcd_fb {
        u16                     off_cntl;
        u32                     clcd_cntl;
        u32                     cmap[16];
+       bool                    clk_enabled;
 };
 
 static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs)
index c809e286d213df3cb1d63caa7f6b97b82162c34a..a065612fc928768268cf0352c91c34dc3f7c448a 100644 (file)
@@ -50,8 +50,8 @@ struct linux_binprm{
        int unsafe;             /* how unsafe this exec is (mask of LSM_UNSAFE_*) */
        unsigned int per_clear; /* bits to clear in current->personality */
        int argc, envc;
-       char * filename;        /* Name of binary as seen by procps */
-       char * interp;          /* Name of the binary really executed. Most
+       const char * filename;  /* Name of binary as seen by procps */
+       const char * interp;    /* Name of the binary really executed. Most
                                   of the time same as filename, but could be
                                   different for binfmt_{misc,script} */
        unsigned interp_flags;
@@ -126,7 +126,8 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
                           unsigned long stack_top,
                           int executable_stack);
 extern int bprm_mm_init(struct linux_binprm *bprm);
-extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
+extern int copy_strings_kernel(int argc, const char *const *argv,
+                              struct linux_binprm *bprm);
 extern int prepare_bprm_creds(struct linux_binprm *bprm);
 extern void install_exec_creds(struct linux_binprm *bprm);
 extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
index ce160d68f5e706fb3c157940e68ccac3627dccef..1e2a6db2d7dd03466bf850dc5011860c23e8f9c9 100644 (file)
@@ -2109,7 +2109,9 @@ extern void daemonize(const char *, ...);
 extern int allow_signal(int);
 extern int disallow_signal(int);
 
-extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *);
+extern int do_execve(const char *,
+                    const char __user * const __user *,
+                    const char __user * const __user *, struct pt_regs *);
 extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *);
 struct task_struct *fork_idle(int);
 
index ae0a5286f558f334859a6d5a2163c18bcc974c3e..92e52a1e6af3fd8478bb451f04d34a3c63b1625f 100644 (file)
@@ -213,6 +213,9 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  * @dma_alignment: SPI controller constraint on DMA buffers alignment.
  * @mode_bits: flags understood by this controller driver
  * @flags: other constraints relevant to this driver
+ * @bus_lock_spinlock: spinlock for SPI bus locking
+ * @bus_lock_mutex: mutex for SPI bus locking
+ * @bus_lock_flag: indicates that the SPI bus is locked for exclusive use
  * @setup: updates the device mode and clocking records used by a
  *     device's SPI controller; protocol code may call this.  This
  *     must fail if an unrecognized or unsupported mode is requested.
index 6e5d19788634f751ab18e980c2cee847bb7d3560..e6319d18a55d93066ac49b39ecd05de5e9be0424 100644 (file)
@@ -820,7 +820,7 @@ asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags,
                                  u64 mask, int fd,
                                  const char  __user *pathname);
 
-int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
+int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]);
 
 
 asmlinkage long sys_perf_event_open(
index 2b108538d0d95684be2048fcc80a7acf484970c4..3098a38f3ae1b6a980da5e645b7c093e799721bf 100644 (file)
@@ -24,10 +24,11 @@ static int __init no_initrd(char *str)
 
 __setup("noinitrd", no_initrd);
 
-static int __init do_linuxrc(void * shell)
+static int __init do_linuxrc(void *_shell)
 {
-       static char *argv[] = { "linuxrc", NULL, };
-       extern char * envp_init[];
+       static const char *argv[] = { "linuxrc", NULL, };
+       extern const char *envp_init[];
+       const char *shell = _shell;
 
        sys_close(old_fd);sys_close(root_fd);
        sys_setsid();
index 22d61cb06f98ab6fc31333213477197e93394416..94ab488039aab1dde97d442f785046475f09c978 100644 (file)
@@ -197,8 +197,8 @@ static int __init set_reset_devices(char *str)
 
 __setup("reset_devices", set_reset_devices);
 
-static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
-char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
+static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
+const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
 static const char *panic_later, *panic_param;
 
 extern const struct obs_kernel_param __setup_start[], __setup_end[];
@@ -809,7 +809,7 @@ static void __init do_pre_smp_initcalls(void)
                do_one_initcall(*fn);
 }
 
-static void run_init_process(char *init_filename)
+static void run_init_process(const char *init_filename)
 {
        argv_init[0] = init_filename;
        kernel_execve(init_filename, argv_init, envp_init);
index c438f545a3217eca47dcae2ff98618467971a9f7..be775f7e81e08809dea392cd3a4dd1488a7e6cd9 100644 (file)
@@ -255,7 +255,14 @@ extern void kdb_ps1(const struct task_struct *p);
 extern void kdb_print_nameval(const char *name, unsigned long val);
 extern void kdb_send_sig_info(struct task_struct *p, struct siginfo *info);
 extern void kdb_meminfo_proc_show(void);
+#ifdef CONFIG_KALLSYMS
 extern const char *kdb_walk_kallsyms(loff_t *pos);
+#else /* ! CONFIG_KALLSYMS */
+static inline const char *kdb_walk_kallsyms(loff_t *pos)
+{
+       return NULL;
+}
+#endif /* ! CONFIG_KALLSYMS */
 extern char *kdb_getstr(char *, size_t, char *);
 
 /* Defines for kdb_symbol_print */
index 45344d5c53dd3b3daf3397f0a26eb34d7584625c..6b2485dcb0504ef8af79ca79a3de1e9d1f556023 100644 (file)
@@ -82,8 +82,8 @@ static char *kdb_name_table[100];     /* arbitrary size */
 int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab)
 {
        int ret = 0;
-       unsigned long symbolsize;
-       unsigned long offset;
+       unsigned long symbolsize = 0;
+       unsigned long offset = 0;
 #define knt1_size 128          /* must be >= kallsyms table size */
        char *knt1 = NULL;
 
index 671ed56e0a490a56ed4e8dc15aa6624d60ebaadf..03120229db2802929065a210930e41c7fa701ba0 100644 (file)
@@ -1386,8 +1386,7 @@ static int wait_task_stopped(struct wait_opts *wo,
        if (!unlikely(wo->wo_flags & WNOWAIT))
                *p_code = 0;
 
-       /* don't need the RCU readlock here as we're holding a spinlock */
-       uid = __task_cred(p)->uid;
+       uid = task_uid(p);
 unlock_sig:
        spin_unlock_irq(&p->sighand->siglock);
        if (!exit_code)
@@ -1460,7 +1459,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
        }
        if (!unlikely(wo->wo_flags & WNOWAIT))
                p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
-       uid = __task_cred(p)->uid;
+       uid = task_uid(p);
        spin_unlock_irq(&p->sighand->siglock);
 
        pid = task_pid_vnr(p);
index 6e9b19667a8d2fdff6ac3c0bf76d32d8c1fc4d87..9cd0591c96a21acf825861c7672533c0273ae25e 100644 (file)
@@ -153,7 +153,9 @@ static int ____call_usermodehelper(void *data)
                        goto fail;
        }
 
-       retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp);
+       retval = kernel_execve(sub_info->path,
+                              (const char *const *)sub_info->argv,
+                              (const char *const *)sub_info->envp);
 
        /* Exec failed? */
 fail:
index dfaa0f4e9789f5e8f395ac1dee7975c1abffdc1d..080b09a57a8fab1a4565757d13bb7a4fdb74b74a 100644 (file)
@@ -2325,7 +2325,10 @@ static int shmem_show_options(struct seq_file *seq, struct vfsmount *vfs)
 
 static void shmem_put_super(struct super_block *sb)
 {
-       kfree(sb->s_fs_info);
+       struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
+
+       percpu_counter_destroy(&sbinfo->used_blocks);
+       kfree(sbinfo);
        sb->s_fs_info = NULL;
 }
 
@@ -2367,7 +2370,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
 #endif
 
        spin_lock_init(&sbinfo->stat_lock);
-       percpu_counter_init(&sbinfo->used_blocks, 0);
+       if (percpu_counter_init(&sbinfo->used_blocks, 0))
+               goto failed;
        sbinfo->free_inodes = sbinfo->max_inodes;
 
        sb->s_maxbytes = SHMEM_MAX_BYTES;
index 1ae654391442049083fae7040d5d1e5568f2b424..3721fbb9a83c3c7761c05ae39d8acab21b6f6b66 100644 (file)
@@ -3143,7 +3143,7 @@ pull:
                        put_page(skb_shinfo(skb)->frags[0].page);
                        memmove(skb_shinfo(skb)->frags,
                                skb_shinfo(skb)->frags + 1,
-                               --skb_shinfo(skb)->nr_frags);
+                               --skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
                }
        }
 
index 6bccba31d13208d03f042002f5808c3396c1f37f..51d6c31679757f58e62368a42edba16d9bfc4d09 100644 (file)
@@ -735,6 +735,7 @@ static void get_counters(const struct xt_table_info *t,
                if (cpu == curcpu)
                        continue;
                i = 0;
+               local_bh_disable();
                xt_info_wrlock(cpu);
                xt_entry_foreach(iter, t->entries[cpu], t->size) {
                        ADD_COUNTER(counters[i], iter->counters.bcnt,
@@ -742,6 +743,7 @@ static void get_counters(const struct xt_table_info *t,
                        ++i;
                }
                xt_info_wrunlock(cpu);
+               local_bh_enable();
        }
        put_cpu();
 }
index c439721b165a6369acd1bd2ea1d64d4b0580b1bb..97b64b22c41214858d6ddb1fb9cf8e292468e23d 100644 (file)
@@ -909,6 +909,7 @@ get_counters(const struct xt_table_info *t,
                if (cpu == curcpu)
                        continue;
                i = 0;
+               local_bh_disable();
                xt_info_wrlock(cpu);
                xt_entry_foreach(iter, t->entries[cpu], t->size) {
                        ADD_COUNTER(counters[i], iter->counters.bcnt,
@@ -916,6 +917,7 @@ get_counters(const struct xt_table_info *t,
                        ++i; /* macro does multi eval of i */
                }
                xt_info_wrunlock(cpu);
+               local_bh_enable();
        }
        put_cpu();
 }
index 5359ef4daac5230e4c691c2100d8016dcb69e102..29a7bca29e3fddec24a55ea2e6ca228bc7a452ba 100644 (file)
@@ -922,6 +922,7 @@ get_counters(const struct xt_table_info *t,
                if (cpu == curcpu)
                        continue;
                i = 0;
+               local_bh_disable();
                xt_info_wrlock(cpu);
                xt_entry_foreach(iter, t->entries[cpu], t->size) {
                        ADD_COUNTER(counters[i], iter->counters.bcnt,
@@ -929,6 +930,7 @@ get_counters(const struct xt_table_info *t,
                        ++i;
                }
                xt_info_wrunlock(cpu);
+               local_bh_enable();
        }
        put_cpu();
 }
index 8f2d0400cf8ae616ad4283a6d846d8fa4b684d40..d126365ac0463bc075d62446562a8d9f07d548a2 100644 (file)
@@ -2580,7 +2580,7 @@ ctl_table ipv6_route_table_template[] = {
                .data           =       &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
                .maxlen         =       sizeof(int),
                .mode           =       0644,
-               .proc_handler   =       proc_dointvec_jiffies,
+               .proc_handler   =       proc_dointvec,
        },
        {
                .procname       =       "mtu_expires",
@@ -2594,7 +2594,7 @@ ctl_table ipv6_route_table_template[] = {
                .data           =       &init_net.ipv6.sysctl.ip6_rt_min_advmss,
                .maxlen         =       sizeof(int),
                .mode           =       0644,
-               .proc_handler   =       proc_dointvec_jiffies,
+               .proc_handler   =       proc_dointvec,
        },
        {
                .procname       =       "gc_min_interval_ms",
index 2cbf380377d5e009fa972d85af18ded9971a5248..8648a9922aabace0231de8eec18b88e30239fd5f 100644 (file)
@@ -1406,7 +1406,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
        struct netlink_sock *nlk = nlk_sk(sk);
        int noblock = flags&MSG_DONTWAIT;
        size_t copied;
-       struct sk_buff *skb;
+       struct sk_buff *skb, *frag __maybe_unused = NULL;
        int err;
 
        if (flags&MSG_OOB)
@@ -1441,21 +1441,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
                        kfree_skb(skb);
                        skb = compskb;
                } else {
-                       /*
-                        * Before setting frag_list to NULL, we must get a
-                        * private copy of skb if shared (because of MSG_PEEK)
-                        */
-                       if (skb_shared(skb)) {
-                               struct sk_buff *nskb;
-
-                               nskb = pskb_copy(skb, GFP_KERNEL);
-                               kfree_skb(skb);
-                               skb = nskb;
-                               err = -ENOMEM;
-                               if (!skb)
-                                       goto out;
-                       }
-                       kfree_skb(skb_shinfo(skb)->frag_list);
+                       frag = skb_shinfo(skb)->frag_list;
                        skb_shinfo(skb)->frag_list = NULL;
                }
        }
@@ -1492,6 +1478,10 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
        if (flags & MSG_TRUNC)
                copied = skb->len;
 
+#ifdef CONFIG_COMPAT_NETLINK_MESSAGES
+       skb_shinfo(skb)->frag_list = frag;
+#endif
+
        skb_free_datagram(sk, skb);
 
        if (nlk->cb && atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf / 2)
index 8406c66549909c763a6b2ae3d7594ea5aeceb361..c2ed90a4c0b428a984c7329e1af0f8d3957a0ae4 100644 (file)
@@ -152,21 +152,24 @@ static int tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result
 static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
 {
        unsigned char *b = skb_tail_pointer(skb);
-       struct tc_gact opt;
        struct tcf_gact *gact = a->priv;
+       struct tc_gact opt = {
+               .index   = gact->tcf_index,
+               .refcnt  = gact->tcf_refcnt - ref,
+               .bindcnt = gact->tcf_bindcnt - bind,
+               .action  = gact->tcf_action,
+       };
        struct tcf_t t;
 
-       opt.index = gact->tcf_index;
-       opt.refcnt = gact->tcf_refcnt - ref;
-       opt.bindcnt = gact->tcf_bindcnt - bind;
-       opt.action = gact->tcf_action;
        NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt);
 #ifdef CONFIG_GACT_PROB
        if (gact->tcfg_ptype) {
-               struct tc_gact_p p_opt;
-               p_opt.paction = gact->tcfg_paction;
-               p_opt.pval = gact->tcfg_pval;
-               p_opt.ptype = gact->tcfg_ptype;
+               struct tc_gact_p p_opt = {
+                       .paction = gact->tcfg_paction,
+                       .pval    = gact->tcfg_pval,
+                       .ptype   = gact->tcfg_ptype,
+               };
+
                NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt);
        }
 #endif
index 11f195af2da0732aaf362380928e298f7f35a199..0c311be9282798ea6b27d1109f482bfdb20c7dac 100644 (file)
@@ -219,15 +219,16 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i
 {
        unsigned char *b = skb_tail_pointer(skb);
        struct tcf_mirred *m = a->priv;
-       struct tc_mirred opt;
+       struct tc_mirred opt = {
+               .index   = m->tcf_index,
+               .action  = m->tcf_action,
+               .refcnt  = m->tcf_refcnt - ref,
+               .bindcnt = m->tcf_bindcnt - bind,
+               .eaction = m->tcfm_eaction,
+               .ifindex = m->tcfm_ifindex,
+       };
        struct tcf_t t;
 
-       opt.index = m->tcf_index;
-       opt.action = m->tcf_action;
-       opt.refcnt = m->tcf_refcnt - ref;
-       opt.bindcnt = m->tcf_bindcnt - bind;
-       opt.eaction = m->tcfm_eaction;
-       opt.ifindex = m->tcfm_ifindex;
        NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt);
        t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install);
        t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse);
index 509a2d53a99d483980d33ab4b71460d209cac0dc..186eb837e600da750dd3347f96f033478d131b76 100644 (file)
@@ -272,19 +272,19 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a,
 {
        unsigned char *b = skb_tail_pointer(skb);
        struct tcf_nat *p = a->priv;
-       struct tc_nat opt;
+       struct tc_nat opt = {
+               .old_addr = p->old_addr,
+               .new_addr = p->new_addr,
+               .mask     = p->mask,
+               .flags    = p->flags,
+
+               .index    = p->tcf_index,
+               .action   = p->tcf_action,
+               .refcnt   = p->tcf_refcnt - ref,
+               .bindcnt  = p->tcf_bindcnt - bind,
+       };
        struct tcf_t t;
 
-       opt.old_addr = p->old_addr;
-       opt.new_addr = p->new_addr;
-       opt.mask = p->mask;
-       opt.flags = p->flags;
-
-       opt.index = p->tcf_index;
-       opt.action = p->tcf_action;
-       opt.refcnt = p->tcf_refcnt - ref;
-       opt.bindcnt = p->tcf_bindcnt - bind;
-
        NLA_PUT(skb, TCA_NAT_PARMS, sizeof(opt), &opt);
        t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
        t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse);
index 4a1d640b0cf16d842a26e3de807df2d937752cc8..97e84f3ee77563fb14aa7b8e0faf2db476a81501 100644 (file)
@@ -164,13 +164,14 @@ static inline int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
 {
        unsigned char *b = skb_tail_pointer(skb);
        struct tcf_defact *d = a->priv;
-       struct tc_defact opt;
+       struct tc_defact opt = {
+               .index   = d->tcf_index,
+               .refcnt  = d->tcf_refcnt - ref,
+               .bindcnt = d->tcf_bindcnt - bind,
+               .action  = d->tcf_action,
+       };
        struct tcf_t t;
 
-       opt.index = d->tcf_index;
-       opt.refcnt = d->tcf_refcnt - ref;
-       opt.bindcnt = d->tcf_bindcnt - bind;
-       opt.action = d->tcf_action;
        NLA_PUT(skb, TCA_DEF_PARMS, sizeof(opt), &opt);
        NLA_PUT_STRING(skb, TCA_DEF_DATA, d->tcfd_defdata);
        t.install = jiffies_to_clock_t(jiffies - d->tcf_tm.install);
index e9607fe55b58006af76880c8e5364a16c3cebdbd..66cbf4eb8855452477ec0f459d69cd6db2559ce7 100644 (file)
@@ -159,13 +159,14 @@ static inline int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
 {
        unsigned char *b = skb_tail_pointer(skb);
        struct tcf_skbedit *d = a->priv;
-       struct tc_skbedit opt;
+       struct tc_skbedit opt = {
+               .index   = d->tcf_index,
+               .refcnt  = d->tcf_refcnt - ref,
+               .bindcnt = d->tcf_bindcnt - bind,
+               .action  = d->tcf_action,
+       };
        struct tcf_t t;
 
-       opt.index = d->tcf_index;
-       opt.refcnt = d->tcf_refcnt - ref;
-       opt.bindcnt = d->tcf_bindcnt - bind;
-       opt.action = d->tcf_action;
        NLA_PUT(skb, TCA_SKBEDIT_PARMS, sizeof(opt), &opt);
        if (d->flags & SKBEDIT_F_PRIORITY)
                NLA_PUT(skb, TCA_SKBEDIT_PRIORITY, sizeof(d->priority),
index ba59983aaffee6e3d7f7a0afb241f92d787b152d..b14ed4b1f27c3bd70f5837c2f032baf11a88e9a1 100644 (file)
@@ -2504,7 +2504,7 @@ static struct xfrm_policy *xfrm_compile_policy(struct sock *sk, int opt,
        if (p->dir > XFRM_POLICY_OUT)
                return NULL;
 
-       xp = xfrm_policy_alloc(net, GFP_KERNEL);
+       xp = xfrm_policy_alloc(net, GFP_ATOMIC);
        if (xp == NULL) {
                *dir = -ENOBUFS;
                return NULL;
index d5666d3cc21b5a4e240e20924c63cd610236bef7..f73e2c2042185fff2d079dbdb3f4b8b828371e72 100644 (file)
@@ -607,8 +607,8 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
        return error;
 }
 
-static int apparmor_task_setrlimit(unsigned int resource,
-                                  struct rlimit *new_rlim)
+static int apparmor_task_setrlimit(struct task_struct *task,
+               unsigned int resource, struct rlimit *new_rlim)
 {
        struct aa_profile *profile = aa_current_profile();
        int error = 0;
index 4e015996dd4d6d316cbbef4c9fafb2c2e48c9e34..9d172e6e330c9fd7906a8a2e5754713f80dfb433 100644 (file)
@@ -40,7 +40,7 @@
  *
  * Warn if that happens, once per boot.
  */
-static void warn_setuid_and_fcaps_mixed(char *fname)
+static void warn_setuid_and_fcaps_mixed(const char *fname)
 {
        static int warned;
        if (!warned) {