Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 May 2012 23:59:07 +0000 (16:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 May 2012 23:59:07 +0000 (16:59 -0700)
Pull GPIO omap bug fix from Grant Likely.

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  gpio/omap: fix incorrect initialization of omap_gpio_mod_init

69 files changed:
MAINTAINERS
arch/arm/kernel/ptrace.c
arch/arm/kernel/smp.c
arch/arm/kernel/sys_arm.c
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-omap1/ams-delta-fiq.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h
arch/arm/mach-orion5x/mpp.h
arch/ia64/kvm/kvm-ia64.c
arch/m68k/platform/520x/config.c
arch/m68k/platform/523x/config.c
arch/m68k/platform/5249/config.c
arch/m68k/platform/527x/config.c
arch/m68k/platform/528x/config.c
arch/m68k/platform/532x/config.c
arch/m68k/platform/coldfire/device.c
arch/parisc/include/asm/hardware.h
arch/parisc/include/asm/page.h
arch/parisc/include/asm/pdc.h
arch/parisc/include/asm/pgtable.h
arch/parisc/include/asm/spinlock.h
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/time.c
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/traps.c
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/sparc/kernel/central.c
arch/sparc/mm/ultra.S
arch/x86/kernel/kvm.c
arch/x86/kernel/process_64.c
arch/x86/kernel/setup_percpu.c
arch/x86/kvm/x86.c
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
drivers/base/regmap/regmap.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/nouveau/nouveau_i2c.c
drivers/gpu/drm/nouveau/nouveau_i2c.h
drivers/leds/leds-netxbig.c
drivers/leds/leds-ns2.c
drivers/parisc/sba_iommu.c
drivers/regulator/core.c
drivers/regulator/max8997.c
drivers/target/target_core_tpg.c
drivers/video/console/sticore.c
drivers/video/xen-fbfront.c
drivers/xen/Kconfig
fs/cifs/cifsfs.c
fs/proc/task_mmu.c
kernel/compat.c
kernel/fork.c
mm/hugetlb.c
mm/memcontrol.c
mm/nobootmem.c
mm/page_alloc.c
mm/percpu.c
net/sunrpc/auth_gss/gss_mech_switch.c
sound/pci/echoaudio/echoaudio_dsp.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/pci/rme9652/hdsp.c
sound/soc/sh/migor.c

index 7071633..de4e280 100644 (file)
@@ -4034,6 +4034,7 @@ F:        Documentation/scsi/53c700.txt
 F:     drivers/scsi/53c700*
 
 LED SUBSYSTEM
+M:     Bryan Wu <bryan.wu@canonical.com>
 M:     Richard Purdie <rpurdie@rpsys.net>
 S:     Maintained
 F:     drivers/leds/
index 80abafb..9650c14 100644 (file)
@@ -906,27 +906,14 @@ long arch_ptrace(struct task_struct *child, long request,
        return ret;
 }
 
-#ifdef __ARMEB__
-#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB
-#else
-#define AUDIT_ARCH_NR AUDIT_ARCH_ARM
-#endif
-
 asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
 {
        unsigned long ip;
 
-       /*
-        * Save IP.  IP is used to denote syscall entry/exit:
-        *  IP = 0 -> entry, = 1 -> exit
-        */
-       ip = regs->ARM_ip;
-       regs->ARM_ip = why;
-
-       if (!ip)
+       if (why)
                audit_syscall_exit(regs);
        else
-               audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
+               audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
                                    regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
 
        if (!test_thread_flag(TIF_SYSCALL_TRACE))
@@ -936,6 +923,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
 
        current_thread_info()->syscall = scno;
 
+       /*
+        * IP is used to denote syscall entry/exit:
+        * IP = 0 -> entry, =1 -> exit
+        */
+       ip = regs->ARM_ip;
+       regs->ARM_ip = why;
+
        /* the 0x80 provides a way for the tracing parent to distinguish
           between a syscall stop and SIGTRAP delivery */
        ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
index f6a4d32..8f46446 100644 (file)
@@ -251,8 +251,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
        struct mm_struct *mm = &init_mm;
        unsigned int cpu = smp_processor_id();
 
-       printk("CPU%u: Booted secondary processor\n", cpu);
-
        /*
         * All kernel threads share the same mm context; grab a
         * reference and switch to it.
@@ -264,6 +262,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
        enter_lazy_tlb(mm, current);
        local_flush_tlb_all();
 
+       printk("CPU%u: Booted secondary processor\n", cpu);
+
        cpu_init();
        preempt_disable();
        trace_hardirqs_off();
index d2b1779..76cbb05 100644 (file)
@@ -115,7 +115,7 @@ int kernel_execve(const char *filename,
                  "Ir" (THREAD_START_SP - sizeof(regs)),
                  "r" (&regs),
                  "Ir" (sizeof(regs))
-               : "r0", "r1", "r2", "r3", "ip", "lr", "memory");
+               : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory");
 
  out:
        return ret;
index 1c672d9..f7fe1b9 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/kexec.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <mach/bridge-regs.h>
index fcce7ff..cfd98b1 100644 (file)
@@ -48,7 +48,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id)
        struct irq_chip *irq_chip = NULL;
        int gpio, irq_num, fiq_count;
 
-       irq_desc = irq_to_desc(IH_GPIO_BASE);
+       irq_desc = irq_to_desc(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK));
        if (irq_desc)
                irq_chip = irq_desc->irq_data.chip;
 
index 930c0d3..740cee9 100644 (file)
@@ -641,7 +641,7 @@ static struct regulator_consumer_supply dummy_supplies[] = {
 
 static void __init igep_init(void)
 {
-       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+       regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
        /* Get IGEP2 hardware revision */
index 1e2d332..c88420d 100644 (file)
 #define OMAP4_DSI2_LANEENABLE_MASK                             (0x7 << 29)
 #define OMAP4_DSI1_LANEENABLE_SHIFT                            24
 #define OMAP4_DSI1_LANEENABLE_MASK                             (0x1f << 24)
-#define OMAP4_DSI2_PIPD_SHIFT                                  19
-#define OMAP4_DSI2_PIPD_MASK                                   (0x1f << 19)
-#define OMAP4_DSI1_PIPD_SHIFT                                  14
-#define OMAP4_DSI1_PIPD_MASK                                   (0x1f << 14)
+#define OMAP4_DSI1_PIPD_SHIFT                                  19
+#define OMAP4_DSI1_PIPD_MASK                                   (0x1f << 19)
+#define OMAP4_DSI2_PIPD_SHIFT                                  14
+#define OMAP4_DSI2_PIPD_MASK                                   (0x1f << 14)
 
 /* CONTROL_MCBSPLP */
 #define OMAP4_ALBCTRLRX_FSX_SHIFT                              31
index eac6897..db70e79 100644 (file)
@@ -65,8 +65,8 @@
 #define MPP8_GIGE               MPP(8,  0x1, 0, 0, 1,   1,   1)
 
 #define MPP9_UNUSED            MPP(9,  0x0, 0, 0, 1,   1,   1)
-#define MPP9_GPIO              MPP(9,  0x0, 0, 0, 1,   1,   1)
-#define MPP9_GIGE               MPP(9,  0x1, 1, 1, 1,   1,   1)
+#define MPP9_GPIO              MPP(9,  0x0, 1, 1, 1,   1,   1)
+#define MPP9_GIGE               MPP(9,  0x1, 0, 0, 1,   1,   1)
 
 #define MPP10_UNUSED           MPP(10, 0x0, 0, 0, 1,   1,   1)
 #define MPP10_GPIO             MPP(10, 0x0, 1, 1, 1,   1,   1)
index f5104b7..463fb3b 100644 (file)
@@ -1174,7 +1174,7 @@ out:
 
 bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
 {
-       return irqchip_in_kernel(vcpu->kcm) == (vcpu->arch.apic != NULL);
+       return irqchip_in_kernel(vcpu->kvm) == (vcpu->arch.apic != NULL);
 }
 
 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
index 2359478..09df4b8 100644 (file)
@@ -22,7 +22,7 @@
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m520x_qspi_init(void)
 {
@@ -35,7 +35,7 @@ static void __init m520x_qspi_init(void)
        writew(par, MCF_GPIO_PAR_UART);
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -79,7 +79,7 @@ void __init config_BSP(char *commandp, int size)
        mach_sched_init = hw_timer_init;
        m520x_uarts_init();
        m520x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m520x_qspi_init();
 #endif
 }
index c8b405d..d47dfd8 100644 (file)
@@ -22,7 +22,7 @@
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m523x_qspi_init(void)
 {
@@ -36,7 +36,7 @@ static void __init m523x_qspi_init(void)
        writew(par, MCFGPIO_PAR_TIMER);
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -58,7 +58,7 @@ void __init config_BSP(char *commandp, int size)
 {
        mach_sched_init = hw_timer_init;
        m523x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m523x_qspi_init();
 #endif
 }
index bbf0513..300e729 100644 (file)
@@ -51,7 +51,7 @@ static struct platform_device *m5249_devices[] __initdata = {
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m5249_qspi_init(void)
 {
@@ -61,7 +61,7 @@ static void __init m5249_qspi_init(void)
        mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI);
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size)
 #ifdef CONFIG_M5249C3
        m5249_smc91x_init();
 #endif
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m5249_qspi_init();
 #endif
 }
index f91a532..b3cb378 100644 (file)
@@ -23,7 +23,7 @@
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m527x_qspi_init(void)
 {
@@ -42,7 +42,7 @@ static void __init m527x_qspi_init(void)
 #endif
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size)
        mach_sched_init = hw_timer_init;
        m527x_uarts_init();
        m527x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m527x_qspi_init();
 #endif
 }
index d449292..c5f11ba 100644 (file)
@@ -24,7 +24,7 @@
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m528x_qspi_init(void)
 {
@@ -32,7 +32,7 @@ static void __init m528x_qspi_init(void)
        __raw_writeb(0x07, MCFGPIO_PQSPAR);
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -98,7 +98,7 @@ void __init config_BSP(char *commandp, int size)
        mach_sched_init = hw_timer_init;
        m528x_uarts_init();
        m528x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m528x_qspi_init();
 #endif
 }
index 2bec347..37082d0 100644 (file)
@@ -30,7 +30,7 @@
 
 /***************************************************************************/
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 
 static void __init m532x_qspi_init(void)
 {
@@ -38,7 +38,7 @@ static void __init m532x_qspi_init(void)
        writew(0x01f0, MCF_GPIO_PAR_QSPI);
 }
 
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 /***************************************************************************/
 
@@ -77,7 +77,7 @@ void __init config_BSP(char *commandp, int size)
        mach_sched_init = hw_timer_init;
        m532x_uarts_init();
        m532x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        m532x_qspi_init();
 #endif
 
index 7af9736..3aa77dd 100644 (file)
@@ -121,7 +121,7 @@ static struct platform_device mcf_fec1 = {
 #endif /* MCFFEC_BASE1 */
 #endif /* CONFIG_FEC */
 
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
 /*
  *     The ColdFire QSPI module is an SPI protocol hardware block used
  *     on a number of different ColdFire CPUs.
@@ -274,7 +274,7 @@ static struct platform_device mcf_qspi = {
        .resource               = mcf_qspi_resources,
        .dev.platform_data      = &mcf_qspi_data,
 };
-#endif /* CONFIG_SPI_COLDFIRE_QSPI */
+#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
 
 static struct platform_device *mcf_devices[] __initdata = {
        &mcf_uart,
@@ -284,7 +284,7 @@ static struct platform_device *mcf_devices[] __initdata = {
        &mcf_fec1,
 #endif
 #endif
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
        &mcf_qspi,
 #endif
 };
index 4e96268..d1d864b 100644 (file)
@@ -2,7 +2,6 @@
 #define _PARISC_HARDWARE_H
 
 #include <linux/mod_devicetable.h>
-#include <asm/pdc.h>
 
 #define HWTYPE_ANY_ID          PA_HWTYPE_ANY_ID
 #define HVERSION_ANY_ID                PA_HVERSION_ANY_ID
@@ -95,12 +94,14 @@ struct bc_module {
 #define HPHW_MC               15
 #define HPHW_FAULTY    31
 
+struct parisc_device_id;
 
 /* hardware.c: */
 extern const char *parisc_hardware_description(struct parisc_device_id *id);
 extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
 
 struct pci_dev;
+struct hardware_path;
 
 /* drivers.c: */
 extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
index a84cc1f..4e0e7db 100644 (file)
@@ -160,5 +160,11 @@ extern int npmem_ranges;
 
 #include <asm-generic/memory_model.h>
 #include <asm-generic/getorder.h>
+#include <asm/pdc.h>
+
+#define PAGE0   ((struct zeropage *)__PAGE_OFFSET)
+
+/* DEFINITION OF THE ZERO-PAGE (PAG0) */
+/* based on work by Jason Eckhardt (jason@equator.com) */
 
 #endif /* _PARISC_PAGE_H */
index 4ca510b..7f0f2d2 100644 (file)
 
 #ifdef __KERNEL__
 
-#include <asm/page.h> /* for __PAGE_OFFSET */
-
 extern int pdc_type;
 
 /* Values for pdc_type */
@@ -677,11 +675,6 @@ static inline char * os_id_to_string(u16 os_id) {
 
 #endif /* __KERNEL__ */
 
-#define PAGE0   ((struct zeropage *)__PAGE_OFFSET)
-
-/* DEFINITION OF THE ZERO-PAGE (PAG0) */
-/* based on work by Jason Eckhardt (jason@equator.com) */
-
 /* flags of the device_path */
 #define        PF_AUTOBOOT     0x80
 #define        PF_AUTOSEARCH   0x40
index 22dadeb..ee99f23 100644 (file)
@@ -44,6 +44,8 @@ struct vm_area_struct;
 
 #endif /* !__ASSEMBLY__ */
 
+#include <asm/page.h>
+
 #define pte_ERROR(e) \
        printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
 #define pmd_ERROR(e) \
index 804aa28..3516e0b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ASM_SPINLOCK_H
 #define __ASM_SPINLOCK_H
 
+#include <asm/barrier.h>
+#include <asm/ldcw.h>
 #include <asm/processor.h>
 #include <asm/spinlock_types.h>
 
index 0b33933..47341aa 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/init.h>
 #include <linux/major.h>
 #include <linux/tty.h>
+#include <asm/page.h>          /* for PAGE0 */
 #include <asm/pdc.h>           /* for iodc_call() proto and friends */
 
 static DEFINE_SPINLOCK(pdc_console_lock);
index 7c07743..70e105d 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/page.h>
 #include <asm/param.h>
 #include <asm/pdc.h>
 #include <asm/led.h>
index 548da3a..d58fc4e 100644 (file)
@@ -288,13 +288,6 @@ label##_hv:                                                                \
 /* Exception addition: Hard disable interrupts */
 #define DISABLE_INTS   SOFT_DISABLE_INTS(r10,r11)
 
-/* Exception addition: Keep interrupt state */
-#define ENABLE_INTS                            \
-       ld      r11,PACAKMSR(r13);              \
-       ld      r12,_MSR(r1);                   \
-       rlwimi  r11,r12,0,MSR_EE;               \
-       mtmsrd  r11,1
-
 #define ADD_NVGPRS                             \
        bl      .save_nvgprs
 
index f8a7a1a..ef2074c 100644 (file)
@@ -588,23 +588,19 @@ _GLOBAL(ret_from_except_lite)
 fast_exc_return_irq:
 restore:
        /*
-        * This is the main kernel exit path, we first check if we
-        * have to change our interrupt state.
+        * This is the main kernel exit path. First we check if we
+        * are about to re-enable interrupts
         */
        ld      r5,SOFTE(r1)
        lbz     r6,PACASOFTIRQEN(r13)
-       cmpwi   cr1,r5,0
-       cmpw    cr0,r5,r6
-       beq     cr0,4f
+       cmpwi   cr0,r5,0
+       beq     restore_irq_off
 
-       /* We do, handle disable first, which is easy */
-       bne     cr1,3f;
-       li      r0,0
-       stb     r0,PACASOFTIRQEN(r13);
-       TRACE_DISABLE_INTS
-       b       4f
+       /* We are enabling, were we already enabled ? Yes, just return */
+       cmpwi   cr0,r6,1
+       beq     cr0,do_restore
 
-3:     /*
+       /*
         * We are about to soft-enable interrupts (we are hard disabled
         * at this point). We check if there's anything that needs to
         * be replayed first.
@@ -626,7 +622,7 @@ restore_no_replay:
        /*
         * Final return path. BookE is handled in a different file
         */
-4:
+do_restore:
 #ifdef CONFIG_PPC_BOOK3E
        b       .exception_return_book3e
 #else
@@ -700,6 +696,25 @@ fast_exception_return:
 #endif /* CONFIG_PPC_BOOK3E */
 
        /*
+        * We are returning to a context with interrupts soft disabled.
+        *
+        * However, we may also about to hard enable, so we need to
+        * make sure that in this case, we also clear PACA_IRQ_HARD_DIS
+        * or that bit can get out of sync and bad things will happen
+        */
+restore_irq_off:
+       ld      r3,_MSR(r1)
+       lbz     r7,PACAIRQHAPPENED(r13)
+       andi.   r0,r3,MSR_EE
+       beq     1f
+       rlwinm  r7,r7,0,~PACA_IRQ_HARD_DIS
+       stb     r7,PACAIRQHAPPENED(r13)
+1:     li      r0,0
+       stb     r0,PACASOFTIRQEN(r13);
+       TRACE_DISABLE_INTS
+       b       do_restore
+
+       /*
         * Something did happen, check if a re-emit is needed
         * (this also clears paca->irq_happened)
         */
@@ -748,6 +763,9 @@ restore_check_irq_replay:
 #endif /* CONFIG_PPC_BOOK3E */
 1:     b       .ret_from_except /* What else to do here ? */
  
+
+
+3:
 do_work:
 #ifdef CONFIG_PREEMPT
        andi.   r0,r3,MSR_PR    /* Returning to user mode? */
@@ -767,16 +785,6 @@ do_work:
        SOFT_DISABLE_INTS(r3,r4)
 1:     bl      .preempt_schedule_irq
 
-       /* Hard-disable interrupts again (and update PACA) */
-#ifdef CONFIG_PPC_BOOK3E
-       wrteei  0
-#else
-       ld      r10,PACAKMSR(r13) /* Get kernel MSR without EE */
-       mtmsrd  r10,1
-#endif /* CONFIG_PPC_BOOK3E */
-       li      r0,PACA_IRQ_HARD_DIS
-       stb     r0,PACAIRQHAPPENED(r13)
-
        /* Re-test flags and eventually loop */
        clrrdi  r9,r1,THREAD_SHIFT
        ld      r4,TI_FLAGS(r9)
@@ -787,14 +795,6 @@ do_work:
 user_work:
 #endif /* CONFIG_PREEMPT */
 
-       /* Enable interrupts */
-#ifdef CONFIG_PPC_BOOK3E
-       wrteei  1
-#else
-       ori     r10,r10,MSR_EE
-       mtmsrd  r10,1
-#endif /* CONFIG_PPC_BOOK3E */
-
        andi.   r0,r4,_TIF_NEED_RESCHED
        beq     1f
        bl      .restore_interrupts
index cb705fd..8f880bc 100644 (file)
@@ -768,8 +768,8 @@ alignment_common:
        std     r3,_DAR(r1)
        std     r4,_DSISR(r1)
        bl      .save_nvgprs
+       DISABLE_INTS
        addi    r3,r1,STACK_FRAME_OVERHEAD
-       ENABLE_INTS
        bl      .alignment_exception
        b       .ret_from_except
 
index 43eb74f..641da9e 100644 (file)
@@ -229,6 +229,19 @@ notrace void arch_local_irq_restore(unsigned long en)
         */
        if (unlikely(irq_happened != PACA_IRQ_HARD_DIS))
                __hard_irq_disable();
+#ifdef CONFIG_TRACE_IRQFLAG
+       else {
+               /*
+                * We should already be hard disabled here. We had bugs
+                * where that wasn't the case so let's dbl check it and
+                * warn if we are wrong. Only do that when IRQ tracing
+                * is enabled as mfmsr() can be costly.
+                */
+               if (WARN_ON(mfmsr() & MSR_EE))
+                       __hard_irq_disable();
+       }
+#endif /* CONFIG_TRACE_IRQFLAG */
+
        set_soft_enabled(0);
 
        /*
@@ -260,11 +273,17 @@ EXPORT_SYMBOL(arch_local_irq_restore);
  * if they are currently disabled. This is typically called before
  * schedule() or do_signal() when returning to userspace. We do it
  * in C to avoid the burden of dealing with lockdep etc...
+ *
+ * NOTE: This is called with interrupts hard disabled but not marked
+ * as such in paca->irq_happened, so we need to resync this.
  */
 void restore_interrupts(void)
 {
-       if (irqs_disabled())
+       if (irqs_disabled()) {
+               local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
                local_irq_enable();
+       } else
+               __hard_irq_enable();
 }
 
 #endif /* CONFIG_PPC64 */
index 6aa0c66..1589723 100644 (file)
@@ -248,7 +248,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
                                   addr, regs->nip, regs->link, code);
        }
 
-       if (!arch_irq_disabled_regs(regs))
+       if (arch_irqs_disabled() && !arch_irq_disabled_regs(regs))
                local_irq_enable();
 
        memset(&info, 0, sizeof(info));
@@ -1019,7 +1019,9 @@ void __kprobes program_check_exception(struct pt_regs *regs)
                return;
        }
 
-       local_irq_enable();
+       /* We restore the interrupt state now */
+       if (!arch_irq_disabled_regs(regs))
+               local_irq_enable();
 
 #ifdef CONFIG_MATH_EMULATION
        /* (reason & REASON_ILLEGAL) would be the obvious thing here,
@@ -1069,6 +1071,10 @@ void alignment_exception(struct pt_regs *regs)
 {
        int sig, code, fixed = 0;
 
+       /* We restore the interrupt state now */
+       if (!arch_irq_disabled_regs(regs))
+               local_irq_enable();
+
        /* we don't implement logging of alignment exceptions */
        if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))
                fixed = fix_alignment(regs);
index ddc485a..c3beaee 100644 (file)
@@ -258,6 +258,8 @@ static long kvmppc_get_guest_page(struct kvm *kvm, unsigned long gfn,
                            !(memslot->userspace_addr & (s - 1))) {
                                start &= ~(s - 1);
                                pgsize = s;
+                               get_page(hpage);
+                               put_page(page);
                                page = hpage;
                        }
                }
@@ -281,11 +283,8 @@ static long kvmppc_get_guest_page(struct kvm *kvm, unsigned long gfn,
        err = 0;
 
  out:
-       if (got) {
-               if (PageHuge(page))
-                       page = compound_head(page);
+       if (got)
                put_page(page);
-       }
        return err;
 
  up_err:
@@ -678,8 +677,15 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
                SetPageDirty(page);
 
  out_put:
-       if (page)
-               put_page(page);
+       if (page) {
+               /*
+                * We drop pages[0] here, not page because page might
+                * have been set to the head page of a compound, but
+                * we have to drop the reference on the correct tail
+                * page to match the get inside gup()
+                */
+               put_page(pages[0]);
+       }
        return ret;
 
  out_unlock:
@@ -979,6 +985,7 @@ void *kvmppc_pin_guest_page(struct kvm *kvm, unsigned long gpa,
                        pa = *physp;
                }
                page = pfn_to_page(pa >> PAGE_SHIFT);
+               get_page(page);
        } else {
                hva = gfn_to_hva_memslot(memslot, gfn);
                npages = get_user_pages_fast(hva, 1, 1, pages);
@@ -991,8 +998,6 @@ void *kvmppc_pin_guest_page(struct kvm *kvm, unsigned long gpa,
                page = compound_head(page);
                psize <<= compound_order(page);
        }
-       if (!kvm->arch.using_mmu_notifiers)
-               get_page(page);
        offset = gpa & (psize - 1);
        if (nb_ret)
                *nb_ret = psize - offset;
@@ -1003,7 +1008,6 @@ void kvmppc_unpin_guest_page(struct kvm *kvm, void *va)
 {
        struct page *page = virt_to_page(va);
 
-       page = compound_head(page);
        put_page(page);
 }
 
index 01294a5..108d1f5 100644 (file)
@@ -1192,8 +1192,6 @@ static void unpin_slot(struct kvm *kvm, int slot_id)
                                continue;
                        pfn = physp[j] >> PAGE_SHIFT;
                        page = pfn_to_page(pfn);
-                       if (PageHuge(page))
-                               page = compound_head(page);
                        SetPageDirty(page);
                        put_page(page);
                }
index 38d48a5..9708851 100644 (file)
@@ -269,4 +269,4 @@ static int __init sunfire_init(void)
        return 0;
 }
 
-subsys_initcall(sunfire_init);
+fs_initcall(sunfire_init);
index b57a594..874162a 100644 (file)
@@ -495,11 +495,11 @@ xcall_fetch_glob_regs:
        stx             %o7, [%g1 + GR_SNAP_O7]
        stx             %i7, [%g1 + GR_SNAP_I7]
        /* Don't try this at home kids... */
-       rdpr            %cwp, %g2
-       sub             %g2, 1, %g7
+       rdpr            %cwp, %g3
+       sub             %g3, 1, %g7
        wrpr            %g7, %cwp
        mov             %i7, %g7
-       wrpr            %g2, %cwp
+       wrpr            %g3, %cwp
        stx             %g7, [%g1 + GR_SNAP_RPC]
        sethi           %hi(trap_block), %g7
        or              %g7, %lo(trap_block), %g7
index b8ba6e4..e554e5a 100644 (file)
@@ -79,7 +79,6 @@ struct kvm_task_sleep_node {
        u32 token;
        int cpu;
        bool halted;
-       struct mm_struct *mm;
 };
 
 static struct kvm_task_sleep_head {
@@ -126,9 +125,7 @@ void kvm_async_pf_task_wait(u32 token)
 
        n.token = token;
        n.cpu = smp_processor_id();
-       n.mm = current->active_mm;
        n.halted = idle || preempt_count() > 1;
-       atomic_inc(&n.mm->mm_count);
        init_waitqueue_head(&n.wq);
        hlist_add_head(&n.link, &b->list);
        spin_unlock(&b->lock);
@@ -161,9 +158,6 @@ EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait);
 static void apf_task_wake_one(struct kvm_task_sleep_node *n)
 {
        hlist_del_init(&n->link);
-       if (!n->mm)
-               return;
-       mmdrop(n->mm);
        if (n->halted)
                smp_send_reschedule(n->cpu);
        else if (waitqueue_active(&n->wq))
@@ -207,7 +201,7 @@ again:
                 * async PF was not yet handled.
                 * Add dummy entry for the token.
                 */
-               n = kmalloc(sizeof(*n), GFP_ATOMIC);
+               n = kzalloc(sizeof(*n), GFP_ATOMIC);
                if (!n) {
                        /*
                         * Allocation failed! Busy wait while other cpu
@@ -219,7 +213,6 @@ again:
                }
                n->token = token;
                n->cpu = smp_processor_id();
-               n->mm = NULL;
                init_waitqueue_head(&n->wq);
                hlist_add_head(&n->link, &b->list);
        } else
index 733ca39..43d8b48 100644 (file)
@@ -423,6 +423,7 @@ void set_personality_ia32(bool x32)
                current_thread_info()->status |= TS_COMPAT;
        }
 }
+EXPORT_SYMBOL_GPL(set_personality_ia32);
 
 unsigned long get_wchan(struct task_struct *p)
 {
index 71f4727..5a98aa2 100644 (file)
@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void)
 #endif
        rc = -EINVAL;
        if (pcpu_chosen_fc != PCPU_FC_PAGE) {
-               const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE;
                const size_t dyn_size = PERCPU_MODULE_RESERVE +
                        PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE;
+               size_t atom_size;
 
+               /*
+                * On 64bit, use PMD_SIZE for atom_size so that embedded
+                * percpu areas are aligned to PMD.  This, in the future,
+                * can also allow using PMD mappings in vmalloc area.  Use
+                * PAGE_SIZE on 32bit as vmalloc space is highly contended
+                * and large vmalloc area allocs can easily fail.
+                */
+#ifdef CONFIG_X86_64
+               atom_size = PMD_SIZE;
+#else
+               atom_size = PAGE_SIZE;
+#endif
                rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE,
                                            dyn_size, atom_size,
                                            pcpu_cpu_distance,
index 91a5e98..185a2b8 100644 (file)
@@ -6581,6 +6581,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu,
                kvm_inject_page_fault(vcpu, &fault);
        }
        vcpu->arch.apf.halted = false;
+       vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
 }
 
 bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu)
index a8f8844..95dccce 100644 (file)
@@ -63,6 +63,7 @@
 #include <asm/stackprotector.h>
 #include <asm/hypervisor.h>
 #include <asm/mwait.h>
+#include <asm/pci_x86.h>
 
 #ifdef CONFIG_ACPI
 #include <linux/acpi.h>
@@ -809,9 +810,40 @@ static void xen_io_delay(void)
 }
 
 #ifdef CONFIG_X86_LOCAL_APIC
+static unsigned long xen_set_apic_id(unsigned int x)
+{
+       WARN_ON(1);
+       return x;
+}
+static unsigned int xen_get_apic_id(unsigned long x)
+{
+       return ((x)>>24) & 0xFFu;
+}
 static u32 xen_apic_read(u32 reg)
 {
-       return 0;
+       struct xen_platform_op op = {
+               .cmd = XENPF_get_cpuinfo,
+               .interface_version = XENPF_INTERFACE_VERSION,
+               .u.pcpu_info.xen_cpuid = 0,
+       };
+       int ret = 0;
+
+       /* Shouldn't need this as APIC is turned off for PV, and we only
+        * get called on the bootup processor. But just in case. */
+       if (!xen_initial_domain() || smp_processor_id())
+               return 0;
+
+       if (reg == APIC_LVR)
+               return 0x10;
+
+       if (reg != APIC_ID)
+               return 0;
+
+       ret = HYPERVISOR_dom0_op(&op);
+       if (ret)
+               return 0;
+
+       return op.u.pcpu_info.apic_id << 24;
 }
 
 static void xen_apic_write(u32 reg, u32 val)
@@ -849,6 +881,8 @@ static void set_xen_basic_apic_ops(void)
        apic->icr_write = xen_apic_icr_write;
        apic->wait_icr_idle = xen_apic_wait_icr_idle;
        apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle;
+       apic->set_apic_id = xen_set_apic_id;
+       apic->get_apic_id = xen_get_apic_id;
 }
 
 #endif
@@ -1365,8 +1399,10 @@ asmlinkage void __init xen_start_kernel(void)
                /* Make sure ACS will be enabled */
                pci_request_acs();
        }
-               
-
+#ifdef CONFIG_PCI
+       /* PCI BIOS service won't work from a PV guest. */
+       pci_probe &= ~PCI_PROBE_BIOS;
+#endif
        xen_raw_console_write("about to get started...\n");
 
        xen_setup_runstate_info(0);
index b8e2794..69f5857 100644 (file)
@@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
 {
        if (val & _PAGE_PRESENT) {
                unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
+               unsigned long pfn = mfn_to_pfn(mfn);
+
                pteval_t flags = val & PTE_FLAGS_MASK;
-               val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
+               if (unlikely(pfn == ~0))
+                       val = flags & ~_PAGE_PRESENT;
+               else
+                       val = ((pteval_t)pfn << PAGE_SHIFT) | flags;
        }
 
        return val;
index 7a3f535..bb80853 100644 (file)
@@ -775,9 +775,11 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
                        map->format.parse_val(val + i);
        } else {
                for (i = 0; i < val_count; i++) {
-                       ret = regmap_read(map, reg + i, val + (i * val_bytes));
+                       unsigned int ival;
+                       ret = regmap_read(map, reg + i, &ival);
                        if (ret != 0)
                                return ret;
+                       memcpy(val + (i * val_bytes), &ival, val_bytes);
                }
        }
 
index 80fce51..62892a8 100644 (file)
@@ -398,10 +398,8 @@ static int init_render_ring(struct intel_ring_buffer *ring)
                        return ret;
        }
 
-       if (INTEL_INFO(dev)->gen >= 6) {
-               I915_WRITE(INSTPM,
-                          INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
 
+       if (IS_GEN6(dev)) {
                /* From the Sandybridge PRM, volume 1 part 3, page 24:
                 * "If this bit is set, STCunit will have LRA as replacement
                 *  policy. [...] This bit must be reset.  LRA replacement
@@ -411,6 +409,11 @@ static int init_render_ring(struct intel_ring_buffer *ring)
                           CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT);
        }
 
+       if (INTEL_INFO(dev)->gen >= 6) {
+               I915_WRITE(INSTPM,
+                          INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
+       }
+
        return ret;
 }
 
index 232d77d..ae5e748 100644 (file)
@@ -1220,8 +1220,14 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in
 
 static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo)
 {
+       struct drm_device *dev = intel_sdvo->base.base.dev;
        u8 response[2];
 
+       /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise
+        * on the line. */
+       if (IS_I945G(dev) || IS_I945GM(dev))
+               return false;
+
        return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT,
                                    &response, 2) && response[0];
 }
index e2be95a..77e5646 100644 (file)
 #include "nouveau_i2c.h"
 #include "nouveau_hw.h"
 
-#define T_TIMEOUT  2200000
-#define T_RISEFALL 1000
-#define T_HOLD     5000
-
 static void
 i2c_drive_scl(void *data, int state)
 {
@@ -113,175 +109,6 @@ i2c_sense_sda(void *data)
        return 0;
 }
 
-static void
-i2c_delay(struct nouveau_i2c_chan *port, u32 nsec)
-{
-       udelay((nsec + 500) / 1000);
-}
-
-static bool
-i2c_raise_scl(struct nouveau_i2c_chan *port)
-{
-       u32 timeout = T_TIMEOUT / T_RISEFALL;
-
-       i2c_drive_scl(port, 1);
-       do {
-               i2c_delay(port, T_RISEFALL);
-       } while (!i2c_sense_scl(port) && --timeout);
-
-       return timeout != 0;
-}
-
-static int
-i2c_start(struct nouveau_i2c_chan *port)
-{
-       int ret = 0;
-
-       port->state  = i2c_sense_scl(port);
-       port->state |= i2c_sense_sda(port) << 1;
-       if (port->state != 3) {
-               i2c_drive_scl(port, 0);
-               i2c_drive_sda(port, 1);
-               if (!i2c_raise_scl(port))
-                       ret = -EBUSY;
-       }
-
-       i2c_drive_sda(port, 0);
-       i2c_delay(port, T_HOLD);
-       i2c_drive_scl(port, 0);
-       i2c_delay(port, T_HOLD);
-       return ret;
-}
-
-static void
-i2c_stop(struct nouveau_i2c_chan *port)
-{
-       i2c_drive_scl(port, 0);
-       i2c_drive_sda(port, 0);
-       i2c_delay(port, T_RISEFALL);
-
-       i2c_drive_scl(port, 1);
-       i2c_delay(port, T_HOLD);
-       i2c_drive_sda(port, 1);
-       i2c_delay(port, T_HOLD);
-}
-
-static int
-i2c_bitw(struct nouveau_i2c_chan *port, int sda)
-{
-       i2c_drive_sda(port, sda);
-       i2c_delay(port, T_RISEFALL);
-
-       if (!i2c_raise_scl(port))
-               return -ETIMEDOUT;
-       i2c_delay(port, T_HOLD);
-
-       i2c_drive_scl(port, 0);
-       i2c_delay(port, T_HOLD);
-       return 0;
-}
-
-static int
-i2c_bitr(struct nouveau_i2c_chan *port)
-{
-       int sda;
-
-       i2c_drive_sda(port, 1);
-       i2c_delay(port, T_RISEFALL);
-
-       if (!i2c_raise_scl(port))
-               return -ETIMEDOUT;
-       i2c_delay(port, T_HOLD);
-
-       sda = i2c_sense_sda(port);
-
-       i2c_drive_scl(port, 0);
-       i2c_delay(port, T_HOLD);
-       return sda;
-}
-
-static int
-i2c_get_byte(struct nouveau_i2c_chan *port, u8 *byte, bool last)
-{
-       int i, bit;
-
-       *byte = 0;
-       for (i = 7; i >= 0; i--) {
-               bit = i2c_bitr(port);
-               if (bit < 0)
-                       return bit;
-               *byte |= bit << i;
-       }
-
-       return i2c_bitw(port, last ? 1 : 0);
-}
-
-static int
-i2c_put_byte(struct nouveau_i2c_chan *port, u8 byte)
-{
-       int i, ret;
-       for (i = 7; i >= 0; i--) {
-               ret = i2c_bitw(port, !!(byte & (1 << i)));
-               if (ret < 0)
-                       return ret;
-       }
-
-       ret = i2c_bitr(port);
-       if (ret == 1) /* nack */
-               ret = -EIO;
-       return ret;
-}
-
-static int
-i2c_addr(struct nouveau_i2c_chan *port, struct i2c_msg *msg)
-{
-       u32 addr = msg->addr << 1;
-       if (msg->flags & I2C_M_RD)
-               addr |= 1;
-       return i2c_put_byte(port, addr);
-}
-
-static int
-i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
-{
-       struct nouveau_i2c_chan *port = (struct nouveau_i2c_chan *)adap;
-       struct i2c_msg *msg = msgs;
-       int ret = 0, mcnt = num;
-
-       while (!ret && mcnt--) {
-               u8 remaining = msg->len;
-               u8 *ptr = msg->buf;
-
-               ret = i2c_start(port);
-               if (ret == 0)
-                       ret = i2c_addr(port, msg);
-
-               if (msg->flags & I2C_M_RD) {
-                       while (!ret && remaining--)
-                               ret = i2c_get_byte(port, ptr++, !remaining);
-               } else {
-                       while (!ret && remaining--)
-                               ret = i2c_put_byte(port, *ptr++);
-               }
-
-               msg++;
-       }
-
-       i2c_stop(port);
-       return (ret < 0) ? ret : num;
-}
-
-static u32
-i2c_bit_func(struct i2c_adapter *adap)
-{
-       return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
-}
-
-const struct i2c_algorithm nouveau_i2c_bit_algo = {
-       .master_xfer = i2c_bit_xfer,
-       .functionality = i2c_bit_func
-};
-
 static const uint32_t nv50_i2c_port[] = {
        0x00e138, 0x00e150, 0x00e168, 0x00e180,
        0x00e254, 0x00e274, 0x00e764, 0x00e780,
@@ -384,12 +211,10 @@ nouveau_i2c_init(struct drm_device *dev)
                case 0: /* NV04:NV50 */
                        port->drive = entry[0];
                        port->sense = entry[1];
-                       port->adapter.algo = &nouveau_i2c_bit_algo;
                        break;
                case 4: /* NV4E */
                        port->drive = 0x600800 + entry[1];
                        port->sense = port->drive;
-                       port->adapter.algo = &nouveau_i2c_bit_algo;
                        break;
                case 5: /* NV50- */
                        port->drive = entry[0] & 0x0f;
@@ -402,7 +227,6 @@ nouveau_i2c_init(struct drm_device *dev)
                                port->drive = 0x00d014 + (port->drive * 0x20);
                                port->sense = port->drive;
                        }
-                       port->adapter.algo = &nouveau_i2c_bit_algo;
                        break;
                case 6: /* NV50- DP AUX */
                        port->drive = entry[0];
@@ -413,7 +237,7 @@ nouveau_i2c_init(struct drm_device *dev)
                        break;
                }
 
-               if (!port->adapter.algo) {
+               if (!port->adapter.algo && !port->drive) {
                        NV_ERROR(dev, "I2C%d: type %d index %x/%x unknown\n",
                                 i, port->type, port->drive, port->sense);
                        kfree(port);
@@ -429,7 +253,26 @@ nouveau_i2c_init(struct drm_device *dev)
                port->dcb = ROM32(entry[0]);
                i2c_set_adapdata(&port->adapter, i2c);
 
-               ret = i2c_add_adapter(&port->adapter);
+               if (port->adapter.algo != &nouveau_dp_i2c_algo) {
+                       port->adapter.algo_data = &port->bit;
+                       port->bit.udelay = 10;
+                       port->bit.timeout = usecs_to_jiffies(2200);
+                       port->bit.data = port;
+                       port->bit.setsda = i2c_drive_sda;
+                       port->bit.setscl = i2c_drive_scl;
+                       port->bit.getsda = i2c_sense_sda;
+                       port->bit.getscl = i2c_sense_scl;
+
+                       i2c_drive_scl(port, 0);
+                       i2c_drive_sda(port, 1);
+                       i2c_drive_scl(port, 1);
+
+                       ret = i2c_bit_add_bus(&port->adapter);
+               } else {
+                       port->adapter.algo = &nouveau_dp_i2c_algo;
+                       ret = i2c_add_adapter(&port->adapter);
+               }
+
                if (ret) {
                        NV_ERROR(dev, "I2C%d: failed register: %d\n", i, ret);
                        kfree(port);
index 4d2e4e9..1d08389 100644 (file)
@@ -34,6 +34,7 @@
 struct nouveau_i2c_chan {
        struct i2c_adapter adapter;
        struct drm_device *dev;
+       struct i2c_algo_bit_data bit;
        struct list_head head;
        u8  index;
        u8  type;
index d8433f2..73973fd 100644 (file)
@@ -112,7 +112,7 @@ err_free_addr:
        return err;
 }
 
-static void __devexit gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
+static void gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
 {
        int i;
 
@@ -294,7 +294,7 @@ static ssize_t netxbig_led_sata_show(struct device *dev,
 
 static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store);
 
-static void __devexit delete_netxbig_led(struct netxbig_led_data *led_dat)
+static void delete_netxbig_led(struct netxbig_led_data *led_dat)
 {
        if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE)
                device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
index 2f0a144..01cf89e 100644 (file)
@@ -255,7 +255,7 @@ err_free_cmd:
        return ret;
 }
 
-static void __devexit delete_ns2_led(struct ns2_led_data *led_dat)
+static void delete_ns2_led(struct ns2_led_data *led_dat)
 {
        device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
        led_classdev_unregister(&led_dat->cdev);
index 8644d53..42cfcd9 100644 (file)
@@ -44,6 +44,7 @@
 #include <asm/ropes.h>
 #include <asm/mckinley.h>      /* for proc_mckinley_root */
 #include <asm/runway.h>                /* for proc_runway_root */
+#include <asm/page.h>          /* for PAGE0 */
 #include <asm/pdc.h>           /* for PDC_MODEL_* */
 #include <asm/pdcpat.h>                /* for is_pdc_pat() */
 #include <asm/parisc-device.h>
index e70dd38..046fb1b 100644 (file)
@@ -1431,7 +1431,10 @@ void devm_regulator_put(struct regulator *regulator)
 
        rc = devres_destroy(regulator->dev, devm_regulator_release,
                            devm_regulator_match, regulator);
-       WARN_ON(rc);
+       if (rc == 0)
+               regulator_put(regulator);
+       else
+               WARN_ON(rc);
 }
 EXPORT_SYMBOL_GPL(devm_regulator_put);
 
index 9657929..17a58c5 100644 (file)
@@ -684,7 +684,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev,
                }
 
                new_val++;
-       } while (desc->min + desc->step + new_val <= desc->max);
+       } while (desc->min + desc->step * new_val <= desc->max);
 
        new_idx = tmp_idx;
        new_val = tmp_val;
index 70c3ffb..e320ec2 100644 (file)
@@ -60,7 +60,6 @@ static void core_clear_initiator_node_from_tpg(
        int i;
        struct se_dev_entry *deve;
        struct se_lun *lun;
-       struct se_lun_acl *acl, *acl_tmp;
 
        spin_lock_irq(&nacl->device_list_lock);
        for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) {
@@ -81,28 +80,7 @@ static void core_clear_initiator_node_from_tpg(
                core_update_device_list_for_node(lun, NULL, deve->mapped_lun,
                        TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0);
 
-               spin_lock(&lun->lun_acl_lock);
-               list_for_each_entry_safe(acl, acl_tmp,
-                                       &lun->lun_acl_list, lacl_list) {
-                       if (!strcmp(acl->initiatorname, nacl->initiatorname) &&
-                           (acl->mapped_lun == deve->mapped_lun))
-                               break;
-               }
-
-               if (!acl) {
-                       pr_err("Unable to locate struct se_lun_acl for %s,"
-                               " mapped_lun: %u\n", nacl->initiatorname,
-                               deve->mapped_lun);
-                       spin_unlock(&lun->lun_acl_lock);
-                       spin_lock_irq(&nacl->device_list_lock);
-                       continue;
-               }
-
-               list_del(&acl->lacl_list);
-               spin_unlock(&lun->lun_acl_lock);
-
                spin_lock_irq(&nacl->device_list_lock);
-               kfree(acl);
        }
        spin_unlock_irq(&nacl->device_list_lock);
 }
index 6468a29..39571f9 100644 (file)
@@ -22,7 +22,9 @@
 #include <linux/font.h>
 
 #include <asm/hardware.h>
+#include <asm/page.h>
 #include <asm/parisc-device.h>
+#include <asm/pdc.h>
 #include <asm/cacheflush.h>
 #include <asm/grfioctl.h>
 
index cb4529c..b7f5173 100644 (file)
@@ -365,7 +365,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
        struct fb_info *fb_info;
        int fb_size;
        int val;
-       int ret;
+       int ret = 0;
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
@@ -458,26 +458,31 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
        xenfb_init_shared_page(info, fb_info);
 
        ret = xenfb_connect_backend(dev, info);
-       if (ret < 0)
-               goto error;
+       if (ret < 0) {
+               xenbus_dev_fatal(dev, ret, "xenfb_connect_backend");
+               goto error_fb;
+       }
 
        ret = register_framebuffer(fb_info);
        if (ret) {
-               fb_deferred_io_cleanup(fb_info);
-               fb_dealloc_cmap(&fb_info->cmap);
-               framebuffer_release(fb_info);
                xenbus_dev_fatal(dev, ret, "register_framebuffer");
-               goto error;
+               goto error_fb;
        }
        info->fb_info = fb_info;
 
        xenfb_make_preferred_console();
        return 0;
 
- error_nomem:
-       ret = -ENOMEM;
-       xenbus_dev_fatal(dev, ret, "allocating device memory");
- error:
+error_fb:
+       fb_deferred_io_cleanup(fb_info);
+       fb_dealloc_cmap(&fb_info->cmap);
+       framebuffer_release(fb_info);
+error_nomem:
+       if (!ret) {
+               ret = -ENOMEM;
+               xenbus_dev_fatal(dev, ret, "allocating device memory");
+       }
+error:
        xenfb_remove(dev);
        return ret;
 }
index 9424313..ea20c51 100644 (file)
@@ -183,15 +183,17 @@ config XEN_ACPI_PROCESSOR
        depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ
        default m
        help
-          This ACPI processor uploads Power Management information to the Xen hypervisor.
-
-         To do that the driver parses the Power Management data and uploads said
-         information to the Xen hypervisor. Then the Xen hypervisor can select the
-          proper Cx and Pxx states. It also registers itslef as the SMM so that
-          other drivers (such as ACPI cpufreq scaling driver) will not load.
-
-          To compile this driver as a module, choose M here: the
-          module will be called xen_acpi_processor  If you do not know what to choose,
-          select M here. If the CPUFREQ drivers are built in, select Y here.
+          This ACPI processor uploads Power Management information to the Xen
+         hypervisor.
+
+         To do that the driver parses the Power Management data and uploads
+         said information to the Xen hypervisor. Then the Xen hypervisor can
+         select the proper Cx and Pxx states. It also registers itslef as the
+         SMM so that other drivers (such as ACPI cpufreq scaling driver) will
+         not load.
+
+          To compile this driver as a module, choose M here: the module will be
+         called xen_acpi_processor  If you do not know what to choose, select
+         M here. If the CPUFREQ drivers are built in, select Y here.
 
 endmenu
index ca6a379..541ef81 100644 (file)
@@ -699,7 +699,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
         * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
         * the cached file length
         */
-       if (origin != SEEK_SET || origin != SEEK_CUR) {
+       if (origin != SEEK_SET && origin != SEEK_CUR) {
                int rc;
                struct inode *inode = file->f_path.dentry->d_inode;
 
index 2d60492..1030a71 100644 (file)
@@ -747,6 +747,8 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, pte_t pte)
        else if (pte_present(pte))
                *pme = make_pme(PM_PFRAME(pte_pfn(pte))
                                | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
+       else
+               *pme = make_pme(PM_NOT_PRESENT);
 }
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
@@ -761,6 +763,8 @@ static void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme,
        if (pmd_present(pmd))
                *pme = make_pme(PM_PFRAME(pmd_pfn(pmd) + offset)
                                | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
+       else
+               *pme = make_pme(PM_NOT_PRESENT);
 }
 #else
 static inline void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme,
@@ -801,8 +805,10 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 
                /* check to see if we've left 'vma' behind
                 * and need a new, higher one */
-               if (vma && (addr >= vma->vm_end))
+               if (vma && (addr >= vma->vm_end)) {
                        vma = find_vma(walk->mm, addr);
+                       pme = make_pme(PM_NOT_PRESENT);
+               }
 
                /* check that 'vma' actually covers this address,
                 * and that it isn't a huge page vma */
@@ -830,6 +836,8 @@ static void huge_pte_to_pagemap_entry(pagemap_entry_t *pme,
        if (pte_present(pte))
                *pme = make_pme(PM_PFRAME(pte_pfn(pte) + offset)
                                | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
+       else
+               *pme = make_pme(PM_NOT_PRESENT);
 }
 
 /* This function walks within one hugetlb entry in the single call */
@@ -839,7 +847,7 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask,
 {
        struct pagemapread *pm = walk->private;
        int err = 0;
-       pagemap_entry_t pme = make_pme(PM_NOT_PRESENT);
+       pagemap_entry_t pme;
 
        for (; addr != end; addr += PAGE_SIZE) {
                int offset = (addr & ~hmask) >> PAGE_SHIFT;
index 74ff849..d2c67aa 100644 (file)
@@ -372,25 +372,54 @@ asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set)
 
 #ifdef __ARCH_WANT_SYS_SIGPROCMASK
 
-asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set,
-               compat_old_sigset_t __user *oset)
+/*
+ * sys_sigprocmask SIG_SETMASK sets the first (compat) word of the
+ * blocked set of signals to the supplied signal set
+ */
+static inline void compat_sig_setmask(sigset_t *blocked, compat_sigset_word set)
 {
-       old_sigset_t s;
-       long ret;
-       mm_segment_t old_fs;
+       memcpy(blocked->sig, &set, sizeof(set));
+}
 
-       if (set && get_user(s, set))
-               return -EFAULT;
-       old_fs = get_fs();
-       set_fs(KERNEL_DS);
-       ret = sys_sigprocmask(how,
-                             set ? (old_sigset_t __user *) &s : NULL,
-                             oset ? (old_sigset_t __user *) &s : NULL);
-       set_fs(old_fs);
-       if (ret == 0)
-               if (oset)
-                       ret = put_user(s, oset);
-       return ret;
+asmlinkage long compat_sys_sigprocmask(int how,
+                                      compat_old_sigset_t __user *nset,
+                                      compat_old_sigset_t __user *oset)
+{
+       old_sigset_t old_set, new_set;
+       sigset_t new_blocked;
+
+       old_set = current->blocked.sig[0];
+
+       if (nset) {
+               if (get_user(new_set, nset))
+                       return -EFAULT;
+               new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP));
+
+               new_blocked = current->blocked;
+
+               switch (how) {
+               case SIG_BLOCK:
+                       sigaddsetmask(&new_blocked, new_set);
+                       break;
+               case SIG_UNBLOCK:
+                       sigdelsetmask(&new_blocked, new_set);
+                       break;
+               case SIG_SETMASK:
+                       compat_sig_setmask(&new_blocked, new_set);
+                       break;
+               default:
+                       return -EINVAL;
+               }
+
+               set_current_blocked(&new_blocked);
+       }
+
+       if (oset) {
+               if (put_user(old_set, oset))
+                       return -EFAULT;
+       }
+
+       return 0;
 }
 
 #endif
index b9372a0..687a15d 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/audit.h>
 #include <linux/memcontrol.h>
 #include <linux/ftrace.h>
+#include <linux/proc_fs.h>
 #include <linux/profile.h>
 #include <linux/rmap.h>
 #include <linux/ksm.h>
@@ -1464,6 +1465,8 @@ bad_fork_cleanup_io:
        if (p->io_context)
                exit_io_context(p);
 bad_fork_cleanup_namespaces:
+       if (unlikely(clone_flags & CLONE_NEWPID))
+               pid_ns_release_proc(p->nsproxy->pid_ns);
        exit_task_namespaces(p);
 bad_fork_cleanup_mm:
        if (p->mm)
index 5a16423..ae8f708 100644 (file)
@@ -2498,7 +2498,6 @@ retry_avoidcopy:
                if (outside_reserve) {
                        BUG_ON(huge_pte_none(pte));
                        if (unmap_ref_private(mm, vma, old_page, address)) {
-                               BUG_ON(page_count(old_page) != 1);
                                BUG_ON(huge_pte_none(pte));
                                spin_lock(&mm->page_table_lock);
                                ptep = huge_pte_offset(mm, address & huge_page_mask(h));
index 31ab9c3..b659260 100644 (file)
@@ -4507,6 +4507,12 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp,
 swap_buffers:
        /* Swap primary and spare array */
        thresholds->spare = thresholds->primary;
+       /* If all events are unregistered, free the spare array */
+       if (!new) {
+               kfree(thresholds->spare);
+               thresholds->spare = NULL;
+       }
+
        rcu_assign_pointer(thresholds->primary, new);
 
        /* To be sure that nobody uses thresholds */
index e53bb8a..1983fb1 100644 (file)
@@ -82,8 +82,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size)
 
 static void __init __free_pages_memory(unsigned long start, unsigned long end)
 {
-       int i;
-       unsigned long start_aligned, end_aligned;
+       unsigned long i, start_aligned, end_aligned;
        int order = ilog2(BITS_PER_LONG);
 
        start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1);
index a712fb9..918330f 100644 (file)
@@ -5203,7 +5203,7 @@ int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
        int ret;
 
        ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
-       if (!write || (ret == -EINVAL))
+       if (!write || (ret < 0))
                return ret;
        for_each_populated_zone(zone) {
                for_each_possible_cpu(cpu) {
index f47af91..bb4be74 100644 (file)
@@ -1132,20 +1132,20 @@ static void pcpu_dump_alloc_info(const char *lvl,
                for (alloc_end += gi->nr_units / upa;
                     alloc < alloc_end; alloc++) {
                        if (!(alloc % apl)) {
-                               printk("\n");
+                               printk(KERN_CONT "\n");
                                printk("%spcpu-alloc: ", lvl);
                        }
-                       printk("[%0*d] ", group_width, group);
+                       printk(KERN_CONT "[%0*d] ", group_width, group);
 
                        for (unit_end += upa; unit < unit_end; unit++)
                                if (gi->cpu_map[unit] != NR_CPUS)
-                                       printk("%0*d ", cpu_width,
+                                       printk(KERN_CONT "%0*d ", cpu_width,
                                               gi->cpu_map[unit]);
                                else
-                                       printk("%s ", empty_str);
+                                       printk(KERN_CONT "%s ", empty_str);
                }
        }
-       printk("\n");
+       printk(KERN_CONT "\n");
 }
 
 /**
@@ -1650,6 +1650,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
                areas[group] = ptr;
 
                base = min(ptr, base);
+       }
+
+       /*
+        * Copy data and free unused parts.  This should happen after all
+        * allocations are complete; otherwise, we may end up with
+        * overlapping groups.
+        */
+       for (group = 0; group < ai->nr_groups; group++) {
+               struct pcpu_group_info *gi = &ai->groups[group];
+               void *ptr = areas[group];
 
                for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) {
                        if (gi->cpu_map[i] == NR_CPUS) {
@@ -1885,6 +1895,8 @@ void __init setup_per_cpu_areas(void)
        fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
        if (!ai || !fc)
                panic("Failed to allocate memory for percpu areas.");
+       /* kmemleak tracks the percpu allocations separately */
+       kmemleak_free(fc);
 
        ai->dyn_size = unit_size;
        ai->unit_size = unit_size;
index ca8cad8..782bfe1 100644 (file)
@@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor);
 int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr)
 {
        struct gss_api_mech *pos = NULL;
-       int i = 0;
+       int j, i = 0;
 
        spin_lock(&registered_mechs_lock);
        list_for_each_entry(pos, &registered_mechs, gm_list) {
-               array_ptr[i] = pos->gm_pfs->pseudoflavor;
-               i++;
+               for (j=0; j < pos->gm_pf_num; j++) {
+                       array_ptr[i++] = pos->gm_pfs[j].pseudoflavor;
+               }
        }
        spin_unlock(&registered_mechs_lock);
        return i;
index 64417a7..d8c670c 100644 (file)
@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip)
        const struct firmware *fw;
        int box_type, err;
 
-       if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page))
+       if (snd_BUG_ON(!chip->comm_page))
                return -EPERM;
 
        /* See if the ASIC is present and working - only if the DSP is already loaded */
index 7a8fcc4..841475c 100644 (file)
@@ -5444,10 +5444,6 @@ int snd_hda_suspend(struct hda_bus *bus)
        list_for_each_entry(codec, &bus->codec_list, list) {
                if (hda_codec_is_power_on(codec))
                        hda_call_codec_suspend(codec);
-               else /* forcibly change the power to D3 even if not used */
-                       hda_set_power_state(codec,
-                                           codec->afg ? codec->afg : codec->mfg,
-                                           AC_PWRST_D3);
                if (codec->patch_ops.post_suspend)
                        codec->patch_ops.post_suspend(codec);
        }
index c19e71a..1f35052 100644 (file)
@@ -783,11 +783,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
 {
        struct azx *chip = bus->private_data;
        unsigned long timeout;
+       unsigned long loopcounter;
        int do_poll = 0;
 
  again:
        timeout = jiffies + msecs_to_jiffies(1000);
-       for (;;) {
+
+       for (loopcounter = 0;; loopcounter++) {
                if (chip->polling_mode || do_poll) {
                        spin_lock_irq(&chip->reg_lock);
                        azx_update_rirb(chip);
@@ -803,7 +805,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
                }
                if (time_after(jiffies, timeout))
                        break;
-               if (bus->needs_damn_long_delay)
+               if (bus->needs_damn_long_delay || loopcounter > 3000)
                        msleep(2); /* temporary workaround */
                else {
                        udelay(10);
@@ -2351,6 +2353,17 @@ static void azx_power_notify(struct hda_bus *bus)
  * power management
  */
 
+static int snd_hda_codecs_inuse(struct hda_bus *bus)
+{
+       struct hda_codec *codec;
+
+       list_for_each_entry(codec, &bus->codec_list, list) {
+               if (snd_hda_codec_needs_resume(codec))
+                       return 1;
+       }
+       return 0;
+}
+
 static int azx_suspend(struct pci_dev *pci, pm_message_t state)
 {
        struct snd_card *card = pci_get_drvdata(pci);
@@ -2397,7 +2410,8 @@ static int azx_resume(struct pci_dev *pci)
                return -EIO;
        azx_init_pci(chip);
 
-       azx_init_chip(chip, 1);
+       if (snd_hda_codecs_inuse(chip->bus))
+               azx_init_chip(chip, 1);
 
        snd_hda_resume(chip->bus);
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
index 818f90b..7810913 100644 (file)
@@ -5405,6 +5405,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
                      ALC882_FIXUP_ACER_ASPIRE_4930G),
        SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
+       SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
+                     ALC882_FIXUP_ACER_ASPIRE_4930G),
        SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
        SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
        SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
@@ -5438,6 +5440,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
        SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
 
        SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
+       SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
        SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
        SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
        SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
@@ -5638,13 +5641,13 @@ static int patch_alc262(struct hda_codec *codec)
        snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80);
        }
 #endif
-       alc_auto_parse_customize_define(codec);
-
        alc_fix_pll_init(codec, 0x20, 0x0a, 10);
 
        alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups);
        alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
 
+       alc_auto_parse_customize_define(codec);
+
        /* automatic parse from the BIOS config */
        err = alc262_parse_auto_config(codec);
        if (err < 0)
@@ -6249,8 +6252,6 @@ static int patch_alc269(struct hda_codec *codec)
 
        spec->mixer_nid = 0x0b;
 
-       alc_auto_parse_customize_define(codec);
-
        err = alc_codec_rename_from_preset(codec);
        if (err < 0)
                goto error;
@@ -6283,6 +6284,8 @@ static int patch_alc269(struct hda_codec *codec)
                       alc269_fixup_tbl, alc269_fixups);
        alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
 
+       alc_auto_parse_customize_define(codec);
+
        /* automatic parse from the BIOS config */
        err = alc269_parse_auto_config(codec);
        if (err < 0)
@@ -6859,8 +6862,6 @@ static int patch_alc662(struct hda_codec *codec)
        /* handle multiple HPs as is */
        spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
 
-       alc_auto_parse_customize_define(codec);
-
        alc_fix_pll_init(codec, 0x20, 0x04, 15);
 
        err = alc_codec_rename_from_preset(codec);
@@ -6877,6 +6878,9 @@ static int patch_alc662(struct hda_codec *codec)
        alc_pick_fixup(codec, alc662_fixup_models,
                       alc662_fixup_tbl, alc662_fixups);
        alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
+
+       alc_auto_parse_customize_define(codec);
+
        /* automatic parse from the BIOS config */
        err = alc662_parse_auto_config(codec);
        if (err < 0)
index b68cdec..0b2aea2 100644 (file)
@@ -5170,6 +5170,7 @@ static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp)
        strcpy(hw->name, "HDSP hwdep interface");
 
        hw->ops.ioctl = snd_hdsp_hwdep_ioctl;
+       hw->ops.ioctl_compat = snd_hdsp_hwdep_ioctl;
 
        return 0;
 }
index 9d9ad8d..8526e1e 100644 (file)
@@ -35,7 +35,7 @@ static unsigned long siumckb_recalc(struct clk *clk)
        return codec_freq;
 }
 
-static struct clk_ops siumckb_clk_ops = {
+static struct sh_clk_ops siumckb_clk_ops = {
        .recalc = siumckb_recalc,
 };