diff options
117 files changed, 700 insertions, 599 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 707163365a93..b36270986501 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1968,7 +1968,9 @@ S: Maintained | |||
| 1968 | F: drivers/net/ethernet/ti/cpmac.c | 1968 | F: drivers/net/ethernet/ti/cpmac.c |
| 1969 | 1969 | ||
| 1970 | CPU FREQUENCY DRIVERS | 1970 | CPU FREQUENCY DRIVERS |
| 1971 | M: Rafael J. Wysocki <rjw@sisk.pl> | ||
| 1971 | L: cpufreq@vger.kernel.org | 1972 | L: cpufreq@vger.kernel.org |
| 1973 | L: linux-pm@vger.kernel.org | ||
| 1972 | S: Maintained | 1974 | S: Maintained |
| 1973 | F: drivers/cpufreq/ | 1975 | F: drivers/cpufreq/ |
| 1974 | F: include/linux/cpufreq.h | 1976 | F: include/linux/cpufreq.h |
| @@ -4034,6 +4036,7 @@ F: Documentation/scsi/53c700.txt | |||
| 4034 | F: drivers/scsi/53c700* | 4036 | F: drivers/scsi/53c700* |
| 4035 | 4037 | ||
| 4036 | LED SUBSYSTEM | 4038 | LED SUBSYSTEM |
| 4039 | M: Bryan Wu <bryan.wu@canonical.com> | ||
| 4037 | M: Richard Purdie <rpurdie@rpsys.net> | 4040 | M: Richard Purdie <rpurdie@rpsys.net> |
| 4038 | S: Maintained | 4041 | S: Maintained |
| 4039 | F: drivers/leds/ | 4042 | F: drivers/leds/ |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 80abafb9bf33..9650c143afc1 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
| @@ -906,27 +906,14 @@ long arch_ptrace(struct task_struct *child, long request, | |||
| 906 | return ret; | 906 | return ret; |
| 907 | } | 907 | } |
| 908 | 908 | ||
| 909 | #ifdef __ARMEB__ | ||
| 910 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB | ||
| 911 | #else | ||
| 912 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARM | ||
| 913 | #endif | ||
| 914 | |||
| 915 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | 909 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) |
| 916 | { | 910 | { |
| 917 | unsigned long ip; | 911 | unsigned long ip; |
| 918 | 912 | ||
| 919 | /* | 913 | if (why) |
| 920 | * Save IP. IP is used to denote syscall entry/exit: | ||
| 921 | * IP = 0 -> entry, = 1 -> exit | ||
| 922 | */ | ||
| 923 | ip = regs->ARM_ip; | ||
| 924 | regs->ARM_ip = why; | ||
| 925 | |||
| 926 | if (!ip) | ||
| 927 | audit_syscall_exit(regs); | 914 | audit_syscall_exit(regs); |
| 928 | else | 915 | else |
| 929 | audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, | 916 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, |
| 930 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | 917 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); |
| 931 | 918 | ||
| 932 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 919 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
| @@ -936,6 +923,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
| 936 | 923 | ||
| 937 | current_thread_info()->syscall = scno; | 924 | current_thread_info()->syscall = scno; |
| 938 | 925 | ||
| 926 | /* | ||
| 927 | * IP is used to denote syscall entry/exit: | ||
| 928 | * IP = 0 -> entry, =1 -> exit | ||
| 929 | */ | ||
| 930 | ip = regs->ARM_ip; | ||
| 931 | regs->ARM_ip = why; | ||
| 932 | |||
| 939 | /* the 0x80 provides a way for the tracing parent to distinguish | 933 | /* the 0x80 provides a way for the tracing parent to distinguish |
| 940 | between a syscall stop and SIGTRAP delivery */ | 934 | between a syscall stop and SIGTRAP delivery */ |
| 941 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 935 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index f6a4d32b0421..8f4644659777 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
| @@ -251,8 +251,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
| 251 | struct mm_struct *mm = &init_mm; | 251 | struct mm_struct *mm = &init_mm; |
| 252 | unsigned int cpu = smp_processor_id(); | 252 | unsigned int cpu = smp_processor_id(); |
| 253 | 253 | ||
| 254 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
| 255 | |||
| 256 | /* | 254 | /* |
| 257 | * All kernel threads share the same mm context; grab a | 255 | * All kernel threads share the same mm context; grab a |
| 258 | * reference and switch to it. | 256 | * reference and switch to it. |
| @@ -264,6 +262,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
| 264 | enter_lazy_tlb(mm, current); | 262 | enter_lazy_tlb(mm, current); |
| 265 | local_flush_tlb_all(); | 263 | local_flush_tlb_all(); |
| 266 | 264 | ||
| 265 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
| 266 | |||
| 267 | cpu_init(); | 267 | cpu_init(); |
| 268 | preempt_disable(); | 268 | preempt_disable(); |
| 269 | trace_hardirqs_off(); | 269 | trace_hardirqs_off(); |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index d2b177905cdb..76cbb055dd05 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
| @@ -115,7 +115,7 @@ int kernel_execve(const char *filename, | |||
| 115 | "Ir" (THREAD_START_SP - sizeof(regs)), | 115 | "Ir" (THREAD_START_SP - sizeof(regs)), |
| 116 | "r" (®s), | 116 | "r" (®s), |
| 117 | "Ir" (sizeof(regs)) | 117 | "Ir" (sizeof(regs)) |
| 118 | : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); | 118 | : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); |
| 119 | 119 | ||
| 120 | out: | 120 | out: |
| 121 | return ret; | 121 | return ret; |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 1c672d9e6656..f7fe1b9f3170 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
| 17 | #include <linux/kexec.h> | ||
| 17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
| 18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
| 19 | #include <mach/bridge-regs.h> | 20 | #include <mach/bridge-regs.h> |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index fcce7ff37630..cfd98b186fcc 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
| @@ -48,7 +48,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) | |||
| 48 | struct irq_chip *irq_chip = NULL; | 48 | struct irq_chip *irq_chip = NULL; |
| 49 | int gpio, irq_num, fiq_count; | 49 | int gpio, irq_num, fiq_count; |
| 50 | 50 | ||
| 51 | irq_desc = irq_to_desc(IH_GPIO_BASE); | 51 | irq_desc = irq_to_desc(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); |
| 52 | if (irq_desc) | 52 | if (irq_desc) |
| 53 | irq_chip = irq_desc->irq_data.chip; | 53 | irq_chip = irq_desc->irq_data.chip; |
| 54 | 54 | ||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 930c0d380435..740cee9369ba 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
| @@ -641,7 +641,7 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
| 641 | 641 | ||
| 642 | static void __init igep_init(void) | 642 | static void __init igep_init(void) |
| 643 | { | 643 | { |
| 644 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 644 | regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| 645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 646 | 646 | ||
| 647 | /* Get IGEP2 hardware revision */ | 647 | /* Get IGEP2 hardware revision */ |
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h index 1e2d3322f33e..c88420de1151 100644 --- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | |||
| @@ -941,10 +941,10 @@ | |||
| 941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) | 941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) |
| 942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 | 942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 |
| 943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) | 943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) |
| 944 | #define OMAP4_DSI2_PIPD_SHIFT 19 | 944 | #define OMAP4_DSI1_PIPD_SHIFT 19 |
| 945 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 19) | 945 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 19) |
| 946 | #define OMAP4_DSI1_PIPD_SHIFT 14 | 946 | #define OMAP4_DSI2_PIPD_SHIFT 14 |
| 947 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 14) | 947 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 14) |
| 948 | 948 | ||
| 949 | /* CONTROL_MCBSPLP */ | 949 | /* CONTROL_MCBSPLP */ |
| 950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 | 950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 |
diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h index eac68978a2c2..db70e79a1198 100644 --- a/arch/arm/mach-orion5x/mpp.h +++ b/arch/arm/mach-orion5x/mpp.h | |||
| @@ -65,8 +65,8 @@ | |||
| 65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) | 65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) |
| 66 | 66 | ||
| 67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) | 67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) |
| 68 | #define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) | 68 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) |
| 69 | #define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) | 69 | #define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1) |
| 70 | 70 | ||
| 71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) | 71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) |
| 72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) | 72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) |
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index f5104b7c52cd..463fb3bbe11e 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
| @@ -1174,7 +1174,7 @@ out: | |||
| 1174 | 1174 | ||
| 1175 | bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu) | 1175 | bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu) |
| 1176 | { | 1176 | { |
| 1177 | return irqchip_in_kernel(vcpu->kcm) == (vcpu->arch.apic != NULL); | 1177 | return irqchip_in_kernel(vcpu->kvm) == (vcpu->arch.apic != NULL); |
| 1178 | } | 1178 | } |
| 1179 | 1179 | ||
| 1180 | int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) | 1180 | int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) |
diff --git a/arch/m68k/platform/520x/config.c b/arch/m68k/platform/520x/config.c index 235947844f27..09df4b89e8be 100644 --- a/arch/m68k/platform/520x/config.c +++ b/arch/m68k/platform/520x/config.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | /***************************************************************************/ | 23 | /***************************************************************************/ |
| 24 | 24 | ||
| 25 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 25 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 26 | 26 | ||
| 27 | static void __init m520x_qspi_init(void) | 27 | static void __init m520x_qspi_init(void) |
| 28 | { | 28 | { |
| @@ -35,7 +35,7 @@ static void __init m520x_qspi_init(void) | |||
| 35 | writew(par, MCF_GPIO_PAR_UART); | 35 | writew(par, MCF_GPIO_PAR_UART); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 38 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 39 | 39 | ||
| 40 | /***************************************************************************/ | 40 | /***************************************************************************/ |
| 41 | 41 | ||
| @@ -79,7 +79,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 79 | mach_sched_init = hw_timer_init; | 79 | mach_sched_init = hw_timer_init; |
| 80 | m520x_uarts_init(); | 80 | m520x_uarts_init(); |
| 81 | m520x_fec_init(); | 81 | m520x_fec_init(); |
| 82 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 82 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 83 | m520x_qspi_init(); | 83 | m520x_qspi_init(); |
| 84 | #endif | 84 | #endif |
| 85 | } | 85 | } |
diff --git a/arch/m68k/platform/523x/config.c b/arch/m68k/platform/523x/config.c index c8b405d5a961..d47dfd8f50a2 100644 --- a/arch/m68k/platform/523x/config.c +++ b/arch/m68k/platform/523x/config.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | /***************************************************************************/ | 23 | /***************************************************************************/ |
| 24 | 24 | ||
| 25 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 25 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 26 | 26 | ||
| 27 | static void __init m523x_qspi_init(void) | 27 | static void __init m523x_qspi_init(void) |
| 28 | { | 28 | { |
| @@ -36,7 +36,7 @@ static void __init m523x_qspi_init(void) | |||
| 36 | writew(par, MCFGPIO_PAR_TIMER); | 36 | writew(par, MCFGPIO_PAR_TIMER); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 39 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 40 | 40 | ||
| 41 | /***************************************************************************/ | 41 | /***************************************************************************/ |
| 42 | 42 | ||
| @@ -58,7 +58,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 58 | { | 58 | { |
| 59 | mach_sched_init = hw_timer_init; | 59 | mach_sched_init = hw_timer_init; |
| 60 | m523x_fec_init(); | 60 | m523x_fec_init(); |
| 61 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 61 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 62 | m523x_qspi_init(); | 62 | m523x_qspi_init(); |
| 63 | #endif | 63 | #endif |
| 64 | } | 64 | } |
diff --git a/arch/m68k/platform/5249/config.c b/arch/m68k/platform/5249/config.c index bbf05135bb98..300e729a58d0 100644 --- a/arch/m68k/platform/5249/config.c +++ b/arch/m68k/platform/5249/config.c | |||
| @@ -51,7 +51,7 @@ static struct platform_device *m5249_devices[] __initdata = { | |||
| 51 | 51 | ||
| 52 | /***************************************************************************/ | 52 | /***************************************************************************/ |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 54 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 55 | 55 | ||
| 56 | static void __init m5249_qspi_init(void) | 56 | static void __init m5249_qspi_init(void) |
| 57 | { | 57 | { |
| @@ -61,7 +61,7 @@ static void __init m5249_qspi_init(void) | |||
| 61 | mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); | 61 | mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 64 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 65 | 65 | ||
| 66 | /***************************************************************************/ | 66 | /***************************************************************************/ |
| 67 | 67 | ||
| @@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 90 | #ifdef CONFIG_M5249C3 | 90 | #ifdef CONFIG_M5249C3 |
| 91 | m5249_smc91x_init(); | 91 | m5249_smc91x_init(); |
| 92 | #endif | 92 | #endif |
| 93 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 93 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 94 | m5249_qspi_init(); | 94 | m5249_qspi_init(); |
| 95 | #endif | 95 | #endif |
| 96 | } | 96 | } |
diff --git a/arch/m68k/platform/527x/config.c b/arch/m68k/platform/527x/config.c index f91a53294c35..b3cb378c5e94 100644 --- a/arch/m68k/platform/527x/config.c +++ b/arch/m68k/platform/527x/config.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | /***************************************************************************/ | 24 | /***************************************************************************/ |
| 25 | 25 | ||
| 26 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 26 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 27 | 27 | ||
| 28 | static void __init m527x_qspi_init(void) | 28 | static void __init m527x_qspi_init(void) |
| 29 | { | 29 | { |
| @@ -42,7 +42,7 @@ static void __init m527x_qspi_init(void) | |||
| 42 | #endif | 42 | #endif |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 45 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 46 | 46 | ||
| 47 | /***************************************************************************/ | 47 | /***************************************************************************/ |
| 48 | 48 | ||
| @@ -90,7 +90,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 90 | mach_sched_init = hw_timer_init; | 90 | mach_sched_init = hw_timer_init; |
| 91 | m527x_uarts_init(); | 91 | m527x_uarts_init(); |
| 92 | m527x_fec_init(); | 92 | m527x_fec_init(); |
| 93 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 93 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 94 | m527x_qspi_init(); | 94 | m527x_qspi_init(); |
| 95 | #endif | 95 | #endif |
| 96 | } | 96 | } |
diff --git a/arch/m68k/platform/528x/config.c b/arch/m68k/platform/528x/config.c index d4492926614c..c5f11ba49be5 100644 --- a/arch/m68k/platform/528x/config.c +++ b/arch/m68k/platform/528x/config.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | /***************************************************************************/ | 25 | /***************************************************************************/ |
| 26 | 26 | ||
| 27 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 27 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 28 | 28 | ||
| 29 | static void __init m528x_qspi_init(void) | 29 | static void __init m528x_qspi_init(void) |
| 30 | { | 30 | { |
| @@ -32,7 +32,7 @@ static void __init m528x_qspi_init(void) | |||
| 32 | __raw_writeb(0x07, MCFGPIO_PQSPAR); | 32 | __raw_writeb(0x07, MCFGPIO_PQSPAR); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 35 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 36 | 36 | ||
| 37 | /***************************************************************************/ | 37 | /***************************************************************************/ |
| 38 | 38 | ||
| @@ -98,7 +98,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 98 | mach_sched_init = hw_timer_init; | 98 | mach_sched_init = hw_timer_init; |
| 99 | m528x_uarts_init(); | 99 | m528x_uarts_init(); |
| 100 | m528x_fec_init(); | 100 | m528x_fec_init(); |
| 101 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 101 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 102 | m528x_qspi_init(); | 102 | m528x_qspi_init(); |
| 103 | #endif | 103 | #endif |
| 104 | } | 104 | } |
diff --git a/arch/m68k/platform/532x/config.c b/arch/m68k/platform/532x/config.c index 2bec3477b739..37082d02f2bd 100644 --- a/arch/m68k/platform/532x/config.c +++ b/arch/m68k/platform/532x/config.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | /***************************************************************************/ | 31 | /***************************************************************************/ |
| 32 | 32 | ||
| 33 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 33 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 34 | 34 | ||
| 35 | static void __init m532x_qspi_init(void) | 35 | static void __init m532x_qspi_init(void) |
| 36 | { | 36 | { |
| @@ -38,7 +38,7 @@ static void __init m532x_qspi_init(void) | |||
| 38 | writew(0x01f0, MCF_GPIO_PAR_QSPI); | 38 | writew(0x01f0, MCF_GPIO_PAR_QSPI); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 41 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 42 | 42 | ||
| 43 | /***************************************************************************/ | 43 | /***************************************************************************/ |
| 44 | 44 | ||
| @@ -77,7 +77,7 @@ void __init config_BSP(char *commandp, int size) | |||
| 77 | mach_sched_init = hw_timer_init; | 77 | mach_sched_init = hw_timer_init; |
| 78 | m532x_uarts_init(); | 78 | m532x_uarts_init(); |
| 79 | m532x_fec_init(); | 79 | m532x_fec_init(); |
| 80 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 80 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 81 | m532x_qspi_init(); | 81 | m532x_qspi_init(); |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
diff --git a/arch/m68k/platform/coldfire/device.c b/arch/m68k/platform/coldfire/device.c index 7af97362b95c..3aa77ddea89d 100644 --- a/arch/m68k/platform/coldfire/device.c +++ b/arch/m68k/platform/coldfire/device.c | |||
| @@ -121,7 +121,7 @@ static struct platform_device mcf_fec1 = { | |||
| 121 | #endif /* MCFFEC_BASE1 */ | 121 | #endif /* MCFFEC_BASE1 */ |
| 122 | #endif /* CONFIG_FEC */ | 122 | #endif /* CONFIG_FEC */ |
| 123 | 123 | ||
| 124 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 124 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 125 | /* | 125 | /* |
| 126 | * The ColdFire QSPI module is an SPI protocol hardware block used | 126 | * The ColdFire QSPI module is an SPI protocol hardware block used |
| 127 | * on a number of different ColdFire CPUs. | 127 | * on a number of different ColdFire CPUs. |
| @@ -274,7 +274,7 @@ static struct platform_device mcf_qspi = { | |||
| 274 | .resource = mcf_qspi_resources, | 274 | .resource = mcf_qspi_resources, |
| 275 | .dev.platform_data = &mcf_qspi_data, | 275 | .dev.platform_data = &mcf_qspi_data, |
| 276 | }; | 276 | }; |
| 277 | #endif /* CONFIG_SPI_COLDFIRE_QSPI */ | 277 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
| 278 | 278 | ||
| 279 | static struct platform_device *mcf_devices[] __initdata = { | 279 | static struct platform_device *mcf_devices[] __initdata = { |
| 280 | &mcf_uart, | 280 | &mcf_uart, |
| @@ -284,7 +284,7 @@ static struct platform_device *mcf_devices[] __initdata = { | |||
| 284 | &mcf_fec1, | 284 | &mcf_fec1, |
| 285 | #endif | 285 | #endif |
| 286 | #endif | 286 | #endif |
| 287 | #ifdef CONFIG_SPI_COLDFIRE_QSPI | 287 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) |
| 288 | &mcf_qspi, | 288 | &mcf_qspi, |
| 289 | #endif | 289 | #endif |
| 290 | }; | 290 | }; |
diff --git a/arch/parisc/include/asm/hardware.h b/arch/parisc/include/asm/hardware.h index 4e9626836bab..d1d864b81bae 100644 --- a/arch/parisc/include/asm/hardware.h +++ b/arch/parisc/include/asm/hardware.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define _PARISC_HARDWARE_H | 2 | #define _PARISC_HARDWARE_H |
| 3 | 3 | ||
| 4 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
| 5 | #include <asm/pdc.h> | ||
| 6 | 5 | ||
| 7 | #define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID | 6 | #define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID |
| 8 | #define HVERSION_ANY_ID PA_HVERSION_ANY_ID | 7 | #define HVERSION_ANY_ID PA_HVERSION_ANY_ID |
| @@ -95,12 +94,14 @@ struct bc_module { | |||
| 95 | #define HPHW_MC 15 | 94 | #define HPHW_MC 15 |
| 96 | #define HPHW_FAULTY 31 | 95 | #define HPHW_FAULTY 31 |
| 97 | 96 | ||
| 97 | struct parisc_device_id; | ||
| 98 | 98 | ||
| 99 | /* hardware.c: */ | 99 | /* hardware.c: */ |
| 100 | extern const char *parisc_hardware_description(struct parisc_device_id *id); | 100 | extern const char *parisc_hardware_description(struct parisc_device_id *id); |
| 101 | extern enum cpu_type parisc_get_cpu_type(unsigned long hversion); | 101 | extern enum cpu_type parisc_get_cpu_type(unsigned long hversion); |
| 102 | 102 | ||
| 103 | struct pci_dev; | 103 | struct pci_dev; |
| 104 | struct hardware_path; | ||
| 104 | 105 | ||
| 105 | /* drivers.c: */ | 106 | /* drivers.c: */ |
| 106 | extern struct parisc_device *alloc_pa_dev(unsigned long hpa, | 107 | extern struct parisc_device *alloc_pa_dev(unsigned long hpa, |
diff --git a/arch/parisc/include/asm/page.h b/arch/parisc/include/asm/page.h index a84cc1f925f6..4e0e7dbf0f3f 100644 --- a/arch/parisc/include/asm/page.h +++ b/arch/parisc/include/asm/page.h | |||
| @@ -160,5 +160,11 @@ extern int npmem_ranges; | |||
| 160 | 160 | ||
| 161 | #include <asm-generic/memory_model.h> | 161 | #include <asm-generic/memory_model.h> |
| 162 | #include <asm-generic/getorder.h> | 162 | #include <asm-generic/getorder.h> |
| 163 | #include <asm/pdc.h> | ||
| 164 | |||
| 165 | #define PAGE0 ((struct zeropage *)__PAGE_OFFSET) | ||
| 166 | |||
| 167 | /* DEFINITION OF THE ZERO-PAGE (PAG0) */ | ||
| 168 | /* based on work by Jason Eckhardt (jason@equator.com) */ | ||
| 163 | 169 | ||
| 164 | #endif /* _PARISC_PAGE_H */ | 170 | #endif /* _PARISC_PAGE_H */ |
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h index 4ca510b3c6f8..7f0f2d23059d 100644 --- a/arch/parisc/include/asm/pdc.h +++ b/arch/parisc/include/asm/pdc.h | |||
| @@ -343,8 +343,6 @@ | |||
| 343 | 343 | ||
| 344 | #ifdef __KERNEL__ | 344 | #ifdef __KERNEL__ |
| 345 | 345 | ||
| 346 | #include <asm/page.h> /* for __PAGE_OFFSET */ | ||
| 347 | |||
| 348 | extern int pdc_type; | 346 | extern int pdc_type; |
| 349 | 347 | ||
| 350 | /* Values for pdc_type */ | 348 | /* Values for pdc_type */ |
| @@ -677,11 +675,6 @@ static inline char * os_id_to_string(u16 os_id) { | |||
| 677 | 675 | ||
| 678 | #endif /* __KERNEL__ */ | 676 | #endif /* __KERNEL__ */ |
| 679 | 677 | ||
| 680 | #define PAGE0 ((struct zeropage *)__PAGE_OFFSET) | ||
| 681 | |||
| 682 | /* DEFINITION OF THE ZERO-PAGE (PAG0) */ | ||
| 683 | /* based on work by Jason Eckhardt (jason@equator.com) */ | ||
| 684 | |||
| 685 | /* flags of the device_path */ | 678 | /* flags of the device_path */ |
| 686 | #define PF_AUTOBOOT 0x80 | 679 | #define PF_AUTOBOOT 0x80 |
| 687 | #define PF_AUTOSEARCH 0x40 | 680 | #define PF_AUTOSEARCH 0x40 |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 22dadeb58695..ee99f2339356 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
| @@ -44,6 +44,8 @@ struct vm_area_struct; | |||
| 44 | 44 | ||
| 45 | #endif /* !__ASSEMBLY__ */ | 45 | #endif /* !__ASSEMBLY__ */ |
| 46 | 46 | ||
| 47 | #include <asm/page.h> | ||
| 48 | |||
| 47 | #define pte_ERROR(e) \ | 49 | #define pte_ERROR(e) \ |
| 48 | printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) | 50 | printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) |
| 49 | #define pmd_ERROR(e) \ | 51 | #define pmd_ERROR(e) \ |
diff --git a/arch/parisc/include/asm/spinlock.h b/arch/parisc/include/asm/spinlock.h index 804aa28ab1d6..3516e0b27044 100644 --- a/arch/parisc/include/asm/spinlock.h +++ b/arch/parisc/include/asm/spinlock.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __ASM_SPINLOCK_H | 1 | #ifndef __ASM_SPINLOCK_H |
| 2 | #define __ASM_SPINLOCK_H | 2 | #define __ASM_SPINLOCK_H |
| 3 | 3 | ||
| 4 | #include <asm/barrier.h> | ||
| 5 | #include <asm/ldcw.h> | ||
| 4 | #include <asm/processor.h> | 6 | #include <asm/processor.h> |
| 5 | #include <asm/spinlock_types.h> | 7 | #include <asm/spinlock_types.h> |
| 6 | 8 | ||
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 0b3393381a81..47341aa208f2 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
| 51 | #include <linux/major.h> | 51 | #include <linux/major.h> |
| 52 | #include <linux/tty.h> | 52 | #include <linux/tty.h> |
| 53 | #include <asm/page.h> /* for PAGE0 */ | ||
| 53 | #include <asm/pdc.h> /* for iodc_call() proto and friends */ | 54 | #include <asm/pdc.h> /* for iodc_call() proto and friends */ |
| 54 | 55 | ||
| 55 | static DEFINE_SPINLOCK(pdc_console_lock); | 56 | static DEFINE_SPINLOCK(pdc_console_lock); |
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 7c0774397b89..70e105d62423 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
| 30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
| 31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
| 32 | #include <asm/page.h> | ||
| 32 | #include <asm/param.h> | 33 | #include <asm/param.h> |
| 33 | #include <asm/pdc.h> | 34 | #include <asm/pdc.h> |
| 34 | #include <asm/led.h> | 35 | #include <asm/led.h> |
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 548da3aa0a30..d58fc4e4149c 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
| @@ -288,13 +288,6 @@ label##_hv: \ | |||
| 288 | /* Exception addition: Hard disable interrupts */ | 288 | /* Exception addition: Hard disable interrupts */ |
| 289 | #define DISABLE_INTS SOFT_DISABLE_INTS(r10,r11) | 289 | #define DISABLE_INTS SOFT_DISABLE_INTS(r10,r11) |
| 290 | 290 | ||
| 291 | /* Exception addition: Keep interrupt state */ | ||
| 292 | #define ENABLE_INTS \ | ||
| 293 | ld r11,PACAKMSR(r13); \ | ||
| 294 | ld r12,_MSR(r1); \ | ||
| 295 | rlwimi r11,r12,0,MSR_EE; \ | ||
| 296 | mtmsrd r11,1 | ||
| 297 | |||
| 298 | #define ADD_NVGPRS \ | 291 | #define ADD_NVGPRS \ |
| 299 | bl .save_nvgprs | 292 | bl .save_nvgprs |
| 300 | 293 | ||
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index f8a7a1a1a9f4..ef2074c3e906 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
| @@ -588,23 +588,19 @@ _GLOBAL(ret_from_except_lite) | |||
| 588 | fast_exc_return_irq: | 588 | fast_exc_return_irq: |
| 589 | restore: | 589 | restore: |
| 590 | /* | 590 | /* |
| 591 | * This is the main kernel exit path, we first check if we | 591 | * This is the main kernel exit path. First we check if we |
| 592 | * have to change our interrupt state. | 592 | * are about to re-enable interrupts |
| 593 | */ | 593 | */ |
| 594 | ld r5,SOFTE(r1) | 594 | ld r5,SOFTE(r1) |
| 595 | lbz r6,PACASOFTIRQEN(r13) | 595 | lbz r6,PACASOFTIRQEN(r13) |
| 596 | cmpwi cr1,r5,0 | 596 | cmpwi cr0,r5,0 |
| 597 | cmpw cr0,r5,r6 | 597 | beq restore_irq_off |
| 598 | beq cr0,4f | ||
| 599 | 598 | ||
| 600 | /* We do, handle disable first, which is easy */ | 599 | /* We are enabling, were we already enabled ? Yes, just return */ |
| 601 | bne cr1,3f; | 600 | cmpwi cr0,r6,1 |
| 602 | li r0,0 | 601 | beq cr0,do_restore |
| 603 | stb r0,PACASOFTIRQEN(r13); | ||
| 604 | TRACE_DISABLE_INTS | ||
| 605 | b 4f | ||
| 606 | 602 | ||
| 607 | 3: /* | 603 | /* |
| 608 | * We are about to soft-enable interrupts (we are hard disabled | 604 | * We are about to soft-enable interrupts (we are hard disabled |
| 609 | * at this point). We check if there's anything that needs to | 605 | * at this point). We check if there's anything that needs to |
| 610 | * be replayed first. | 606 | * be replayed first. |
| @@ -626,7 +622,7 @@ restore_no_replay: | |||
| 626 | /* | 622 | /* |
| 627 | * Final return path. BookE is handled in a different file | 623 | * Final return path. BookE is handled in a different file |
| 628 | */ | 624 | */ |
| 629 | 4: | 625 | do_restore: |
| 630 | #ifdef CONFIG_PPC_BOOK3E | 626 | #ifdef CONFIG_PPC_BOOK3E |
| 631 | b .exception_return_book3e | 627 | b .exception_return_book3e |
| 632 | #else | 628 | #else |
| @@ -700,6 +696,25 @@ fast_exception_return: | |||
| 700 | #endif /* CONFIG_PPC_BOOK3E */ | 696 | #endif /* CONFIG_PPC_BOOK3E */ |
| 701 | 697 | ||
| 702 | /* | 698 | /* |
| 699 | * We are returning to a context with interrupts soft disabled. | ||
| 700 | * | ||
| 701 | * However, we may also about to hard enable, so we need to | ||
| 702 | * make sure that in this case, we also clear PACA_IRQ_HARD_DIS | ||
| 703 | * or that bit can get out of sync and bad things will happen | ||
| 704 | */ | ||
| 705 | restore_irq_off: | ||
| 706 | ld r3,_MSR(r1) | ||
| 707 | lbz r7,PACAIRQHAPPENED(r13) | ||
| 708 | andi. r0,r3,MSR_EE | ||
| 709 | beq 1f | ||
| 710 | rlwinm r7,r7,0,~PACA_IRQ_HARD_DIS | ||
| 711 | stb r7,PACAIRQHAPPENED(r13) | ||
| 712 | 1: li r0,0 | ||
| 713 | stb r0,PACASOFTIRQEN(r13); | ||
| 714 | TRACE_DISABLE_INTS | ||
| 715 | b do_restore | ||
| 716 | |||
| 717 | /* | ||
| 703 | * Something did happen, check if a re-emit is needed | 718 | * Something did happen, check if a re-emit is needed |
| 704 | * (this also clears paca->irq_happened) | 719 | * (this also clears paca->irq_happened) |
| 705 | */ | 720 | */ |
| @@ -748,6 +763,9 @@ restore_check_irq_replay: | |||
| 748 | #endif /* CONFIG_PPC_BOOK3E */ | 763 | #endif /* CONFIG_PPC_BOOK3E */ |
| 749 | 1: b .ret_from_except /* What else to do here ? */ | 764 | 1: b .ret_from_except /* What else to do here ? */ |
| 750 | 765 | ||
| 766 | |||
| 767 | |||
| 768 | 3: | ||
| 751 | do_work: | 769 | do_work: |
| 752 | #ifdef CONFIG_PREEMPT | 770 | #ifdef CONFIG_PREEMPT |
| 753 | andi. r0,r3,MSR_PR /* Returning to user mode? */ | 771 | andi. r0,r3,MSR_PR /* Returning to user mode? */ |
| @@ -767,16 +785,6 @@ do_work: | |||
| 767 | SOFT_DISABLE_INTS(r3,r4) | 785 | SOFT_DISABLE_INTS(r3,r4) |
| 768 | 1: bl .preempt_schedule_irq | 786 | 1: bl .preempt_schedule_irq |
| 769 | 787 | ||
| 770 | /* Hard-disable interrupts again (and update PACA) */ | ||
| 771 | #ifdef CONFIG_PPC_BOOK3E | ||
| 772 | wrteei 0 | ||
| 773 | #else | ||
| 774 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
| 775 | mtmsrd r10,1 | ||
| 776 | #endif /* CONFIG_PPC_BOOK3E */ | ||
| 777 | li r0,PACA_IRQ_HARD_DIS | ||
| 778 | stb r0,PACAIRQHAPPENED(r13) | ||
| 779 | |||
| 780 | /* Re-test flags and eventually loop */ | 788 | /* Re-test flags and eventually loop */ |
| 781 | clrrdi r9,r1,THREAD_SHIFT | 789 | clrrdi r9,r1,THREAD_SHIFT |
| 782 | ld r4,TI_FLAGS(r9) | 790 | ld r4,TI_FLAGS(r9) |
| @@ -787,14 +795,6 @@ do_work: | |||
| 787 | user_work: | 795 | user_work: |
| 788 | #endif /* CONFIG_PREEMPT */ | 796 | #endif /* CONFIG_PREEMPT */ |
| 789 | 797 | ||
| 790 | /* Enable interrupts */ | ||
| 791 | #ifdef CONFIG_PPC_BOOK3E | ||
| 792 | wrteei 1 | ||
| 793 | #else | ||
| 794 | ori r10,r10,MSR_EE | ||
| 795 | mtmsrd r10,1 | ||
| 796 | #endif /* CONFIG_PPC_BOOK3E */ | ||
| 797 | |||
| 798 | andi. r0,r4,_TIF_NEED_RESCHED | 798 | andi. r0,r4,_TIF_NEED_RESCHED |
| 799 | beq 1f | 799 | beq 1f |
| 800 | bl .restore_interrupts | 800 | bl .restore_interrupts |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index cb705fdbb458..8f880bc77c56 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
| @@ -768,8 +768,8 @@ alignment_common: | |||
| 768 | std r3,_DAR(r1) | 768 | std r3,_DAR(r1) |
| 769 | std r4,_DSISR(r1) | 769 | std r4,_DSISR(r1) |
| 770 | bl .save_nvgprs | 770 | bl .save_nvgprs |
| 771 | DISABLE_INTS | ||
| 771 | addi r3,r1,STACK_FRAME_OVERHEAD | 772 | addi r3,r1,STACK_FRAME_OVERHEAD |
| 772 | ENABLE_INTS | ||
| 773 | bl .alignment_exception | 773 | bl .alignment_exception |
| 774 | b .ret_from_except | 774 | b .ret_from_except |
| 775 | 775 | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 43eb74fcedde..641da9e868ce 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
| @@ -229,6 +229,19 @@ notrace void arch_local_irq_restore(unsigned long en) | |||
| 229 | */ | 229 | */ |
| 230 | if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) | 230 | if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) |
| 231 | __hard_irq_disable(); | 231 | __hard_irq_disable(); |
| 232 | #ifdef CONFIG_TRACE_IRQFLAG | ||
| 233 | else { | ||
| 234 | /* | ||
| 235 | * We should already be hard disabled here. We had bugs | ||
| 236 | * where that wasn't the case so let's dbl check it and | ||
| 237 | * warn if we are wrong. Only do that when IRQ tracing | ||
| 238 | * is enabled as mfmsr() can be costly. | ||
| 239 | */ | ||
| 240 | if (WARN_ON(mfmsr() & MSR_EE)) | ||
| 241 | __hard_irq_disable(); | ||
| 242 | } | ||
| 243 | #endif /* CONFIG_TRACE_IRQFLAG */ | ||
| 244 | |||
| 232 | set_soft_enabled(0); | 245 | set_soft_enabled(0); |
| 233 | 246 | ||
| 234 | /* | 247 | /* |
| @@ -260,11 +273,17 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
| 260 | * if they are currently disabled. This is typically called before | 273 | * if they are currently disabled. This is typically called before |
| 261 | * schedule() or do_signal() when returning to userspace. We do it | 274 | * schedule() or do_signal() when returning to userspace. We do it |
| 262 | * in C to avoid the burden of dealing with lockdep etc... | 275 | * in C to avoid the burden of dealing with lockdep etc... |
| 276 | * | ||
| 277 | * NOTE: This is called with interrupts hard disabled but not marked | ||
| 278 | * as such in paca->irq_happened, so we need to resync this. | ||
| 263 | */ | 279 | */ |
| 264 | void restore_interrupts(void) | 280 | void restore_interrupts(void) |
| 265 | { | 281 | { |
| 266 | if (irqs_disabled()) | 282 | if (irqs_disabled()) { |
| 283 | local_paca->irq_happened |= PACA_IRQ_HARD_DIS; | ||
| 267 | local_irq_enable(); | 284 | local_irq_enable(); |
| 285 | } else | ||
| 286 | __hard_irq_enable(); | ||
| 268 | } | 287 | } |
| 269 | 288 | ||
| 270 | #endif /* CONFIG_PPC64 */ | 289 | #endif /* CONFIG_PPC64 */ |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6aa0c663e247..158972341a2d 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
| @@ -248,7 +248,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
| 248 | addr, regs->nip, regs->link, code); | 248 | addr, regs->nip, regs->link, code); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | if (!arch_irq_disabled_regs(regs)) | 251 | if (arch_irqs_disabled() && !arch_irq_disabled_regs(regs)) |
| 252 | local_irq_enable(); | 252 | local_irq_enable(); |
| 253 | 253 | ||
| 254 | memset(&info, 0, sizeof(info)); | 254 | memset(&info, 0, sizeof(info)); |
| @@ -1019,7 +1019,9 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
| 1019 | return; | 1019 | return; |
| 1020 | } | 1020 | } |
| 1021 | 1021 | ||
| 1022 | local_irq_enable(); | 1022 | /* We restore the interrupt state now */ |
| 1023 | if (!arch_irq_disabled_regs(regs)) | ||
| 1024 | local_irq_enable(); | ||
| 1023 | 1025 | ||
| 1024 | #ifdef CONFIG_MATH_EMULATION | 1026 | #ifdef CONFIG_MATH_EMULATION |
| 1025 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, | 1027 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, |
| @@ -1069,6 +1071,10 @@ void alignment_exception(struct pt_regs *regs) | |||
| 1069 | { | 1071 | { |
| 1070 | int sig, code, fixed = 0; | 1072 | int sig, code, fixed = 0; |
| 1071 | 1073 | ||
| 1074 | /* We restore the interrupt state now */ | ||
| 1075 | if (!arch_irq_disabled_regs(regs)) | ||
| 1076 | local_irq_enable(); | ||
| 1077 | |||
| 1072 | /* we don't implement logging of alignment exceptions */ | 1078 | /* we don't implement logging of alignment exceptions */ |
| 1073 | if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) | 1079 | if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) |
| 1074 | fixed = fix_alignment(regs); | 1080 | fixed = fix_alignment(regs); |
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index ddc485a529f2..c3beaeef3f60 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c | |||
| @@ -258,6 +258,8 @@ static long kvmppc_get_guest_page(struct kvm *kvm, unsigned long gfn, | |||
| 258 | !(memslot->userspace_addr & (s - 1))) { | 258 | !(memslot->userspace_addr & (s - 1))) { |
| 259 | start &= ~(s - 1); | 259 | start &= ~(s - 1); |
| 260 | pgsize = s; | 260 | pgsize = s; |
| 261 | get_page(hpage); | ||
| 262 | put_page(page); | ||
| 261 | page = hpage; | 263 | page = hpage; |
| 262 | } | 264 | } |
| 263 | } | 265 | } |
| @@ -281,11 +283,8 @@ static long kvmppc_get_guest_page(struct kvm *kvm, unsigned long gfn, | |||
| 281 | err = 0; | 283 | err = 0; |
| 282 | 284 | ||
| 283 | out: | 285 | out: |
| 284 | if (got) { | 286 | if (got) |
| 285 | if (PageHuge(page)) | ||
| 286 | page = compound_head(page); | ||
| 287 | put_page(page); | 287 | put_page(page); |
| 288 | } | ||
| 289 | return err; | 288 | return err; |
| 290 | 289 | ||
| 291 | up_err: | 290 | up_err: |
| @@ -678,8 +677,15 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
| 678 | SetPageDirty(page); | 677 | SetPageDirty(page); |
| 679 | 678 | ||
| 680 | out_put: | 679 | out_put: |
| 681 | if (page) | 680 | if (page) { |
| 682 | put_page(page); | 681 | /* |
| 682 | * We drop pages[0] here, not page because page might | ||
| 683 | * have been set to the head page of a compound, but | ||
| 684 | * we have to drop the reference on the correct tail | ||
| 685 | * page to match the get inside gup() | ||
| 686 | */ | ||
| 687 | put_page(pages[0]); | ||
| 688 | } | ||
| 683 | return ret; | 689 | return ret; |
| 684 | 690 | ||
| 685 | out_unlock: | 691 | out_unlock: |
| @@ -979,6 +985,7 @@ void *kvmppc_pin_guest_page(struct kvm *kvm, unsigned long gpa, | |||
| 979 | pa = *physp; | 985 | pa = *physp; |
| 980 | } | 986 | } |
| 981 | page = pfn_to_page(pa >> PAGE_SHIFT); | 987 | page = pfn_to_page(pa >> PAGE_SHIFT); |
| 988 | get_page(page); | ||
| 982 | } else { | 989 | } else { |
| 983 | hva = gfn_to_hva_memslot(memslot, gfn); | 990 | hva = gfn_to_hva_memslot(memslot, gfn); |
| 984 | npages = get_user_pages_fast(hva, 1, 1, pages); | 991 | npages = get_user_pages_fast(hva, 1, 1, pages); |
| @@ -991,8 +998,6 @@ void *kvmppc_pin_guest_page(struct kvm *kvm, unsigned long gpa, | |||
| 991 | page = compound_head(page); | 998 | page = compound_head(page); |
| 992 | psize <<= compound_order(page); | 999 | psize <<= compound_order(page); |
| 993 | } | 1000 | } |
| 994 | if (!kvm->arch.using_mmu_notifiers) | ||
| 995 | get_page(page); | ||
| 996 | offset = gpa & (psize - 1); | 1001 | offset = gpa & (psize - 1); |
| 997 | if (nb_ret) | 1002 | if (nb_ret) |
| 998 | *nb_ret = psize - offset; | 1003 | *nb_ret = psize - offset; |
| @@ -1003,7 +1008,6 @@ void kvmppc_unpin_guest_page(struct kvm *kvm, void *va) | |||
| 1003 | { | 1008 | { |
| 1004 | struct page *page = virt_to_page(va); | 1009 | struct page *page = virt_to_page(va); |
| 1005 | 1010 | ||
| 1006 | page = compound_head(page); | ||
| 1007 | put_page(page); | 1011 | put_page(page); |
| 1008 | } | 1012 | } |
| 1009 | 1013 | ||
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 01294a5099dd..108d1f580177 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
| @@ -1192,8 +1192,6 @@ static void unpin_slot(struct kvm *kvm, int slot_id) | |||
| 1192 | continue; | 1192 | continue; |
| 1193 | pfn = physp[j] >> PAGE_SHIFT; | 1193 | pfn = physp[j] >> PAGE_SHIFT; |
| 1194 | page = pfn_to_page(pfn); | 1194 | page = pfn_to_page(pfn); |
| 1195 | if (PageHuge(page)) | ||
| 1196 | page = compound_head(page); | ||
| 1197 | SetPageDirty(page); | 1195 | SetPageDirty(page); |
| 1198 | put_page(page); | 1196 | put_page(page); |
| 1199 | } | 1197 | } |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 38d48a59879c..9708851a8b9f 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
| @@ -269,4 +269,4 @@ static int __init sunfire_init(void) | |||
| 269 | return 0; | 269 | return 0; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | subsys_initcall(sunfire_init); | 272 | fs_initcall(sunfire_init); |
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S index b57a5942ba64..874162a11ceb 100644 --- a/arch/sparc/mm/ultra.S +++ b/arch/sparc/mm/ultra.S | |||
| @@ -495,11 +495,11 @@ xcall_fetch_glob_regs: | |||
| 495 | stx %o7, [%g1 + GR_SNAP_O7] | 495 | stx %o7, [%g1 + GR_SNAP_O7] |
| 496 | stx %i7, [%g1 + GR_SNAP_I7] | 496 | stx %i7, [%g1 + GR_SNAP_I7] |
| 497 | /* Don't try this at home kids... */ | 497 | /* Don't try this at home kids... */ |
| 498 | rdpr %cwp, %g2 | 498 | rdpr %cwp, %g3 |
| 499 | sub %g2, 1, %g7 | 499 | sub %g3, 1, %g7 |
| 500 | wrpr %g7, %cwp | 500 | wrpr %g7, %cwp |
| 501 | mov %i7, %g7 | 501 | mov %i7, %g7 |
| 502 | wrpr %g2, %cwp | 502 | wrpr %g3, %cwp |
| 503 | stx %g7, [%g1 + GR_SNAP_RPC] | 503 | stx %g7, [%g1 + GR_SNAP_RPC] |
| 504 | sethi %hi(trap_block), %g7 | 504 | sethi %hi(trap_block), %g7 |
| 505 | or %g7, %lo(trap_block), %g7 | 505 | or %g7, %lo(trap_block), %g7 |
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index b8ba6e4a27e4..e554e5ad2fe8 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
| @@ -79,7 +79,6 @@ struct kvm_task_sleep_node { | |||
| 79 | u32 token; | 79 | u32 token; |
| 80 | int cpu; | 80 | int cpu; |
| 81 | bool halted; | 81 | bool halted; |
| 82 | struct mm_struct *mm; | ||
| 83 | }; | 82 | }; |
| 84 | 83 | ||
| 85 | static struct kvm_task_sleep_head { | 84 | static struct kvm_task_sleep_head { |
| @@ -126,9 +125,7 @@ void kvm_async_pf_task_wait(u32 token) | |||
| 126 | 125 | ||
| 127 | n.token = token; | 126 | n.token = token; |
| 128 | n.cpu = smp_processor_id(); | 127 | n.cpu = smp_processor_id(); |
| 129 | n.mm = current->active_mm; | ||
| 130 | n.halted = idle || preempt_count() > 1; | 128 | n.halted = idle || preempt_count() > 1; |
| 131 | atomic_inc(&n.mm->mm_count); | ||
| 132 | init_waitqueue_head(&n.wq); | 129 | init_waitqueue_head(&n.wq); |
| 133 | hlist_add_head(&n.link, &b->list); | 130 | hlist_add_head(&n.link, &b->list); |
| 134 | spin_unlock(&b->lock); | 131 | spin_unlock(&b->lock); |
| @@ -161,9 +158,6 @@ EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait); | |||
| 161 | static void apf_task_wake_one(struct kvm_task_sleep_node *n) | 158 | static void apf_task_wake_one(struct kvm_task_sleep_node *n) |
| 162 | { | 159 | { |
| 163 | hlist_del_init(&n->link); | 160 | hlist_del_init(&n->link); |
| 164 | if (!n->mm) | ||
| 165 | return; | ||
| 166 | mmdrop(n->mm); | ||
| 167 | if (n->halted) | 161 | if (n->halted) |
| 168 | smp_send_reschedule(n->cpu); | 162 | smp_send_reschedule(n->cpu); |
| 169 | else if (waitqueue_active(&n->wq)) | 163 | else if (waitqueue_active(&n->wq)) |
| @@ -207,7 +201,7 @@ again: | |||
| 207 | * async PF was not yet handled. | 201 | * async PF was not yet handled. |
| 208 | * Add dummy entry for the token. | 202 | * Add dummy entry for the token. |
| 209 | */ | 203 | */ |
| 210 | n = kmalloc(sizeof(*n), GFP_ATOMIC); | 204 | n = kzalloc(sizeof(*n), GFP_ATOMIC); |
| 211 | if (!n) { | 205 | if (!n) { |
| 212 | /* | 206 | /* |
| 213 | * Allocation failed! Busy wait while other cpu | 207 | * Allocation failed! Busy wait while other cpu |
| @@ -219,7 +213,6 @@ again: | |||
| 219 | } | 213 | } |
| 220 | n->token = token; | 214 | n->token = token; |
| 221 | n->cpu = smp_processor_id(); | 215 | n->cpu = smp_processor_id(); |
| 222 | n->mm = NULL; | ||
| 223 | init_waitqueue_head(&n->wq); | 216 | init_waitqueue_head(&n->wq); |
| 224 | hlist_add_head(&n->link, &b->list); | 217 | hlist_add_head(&n->link, &b->list); |
| 225 | } else | 218 | } else |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 733ca39f367e..43d8b48b23e6 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -423,6 +423,7 @@ void set_personality_ia32(bool x32) | |||
| 423 | current_thread_info()->status |= TS_COMPAT; | 423 | current_thread_info()->status |= TS_COMPAT; |
| 424 | } | 424 | } |
| 425 | } | 425 | } |
| 426 | EXPORT_SYMBOL_GPL(set_personality_ia32); | ||
| 426 | 427 | ||
| 427 | unsigned long get_wchan(struct task_struct *p) | 428 | unsigned long get_wchan(struct task_struct *p) |
| 428 | { | 429 | { |
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 71f4727da373..5a98aa272184 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
| @@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void) | |||
| 185 | #endif | 185 | #endif |
| 186 | rc = -EINVAL; | 186 | rc = -EINVAL; |
| 187 | if (pcpu_chosen_fc != PCPU_FC_PAGE) { | 187 | if (pcpu_chosen_fc != PCPU_FC_PAGE) { |
| 188 | const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE; | ||
| 189 | const size_t dyn_size = PERCPU_MODULE_RESERVE + | 188 | const size_t dyn_size = PERCPU_MODULE_RESERVE + |
| 190 | PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; | 189 | PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; |
| 190 | size_t atom_size; | ||
| 191 | 191 | ||
| 192 | /* | ||
| 193 | * On 64bit, use PMD_SIZE for atom_size so that embedded | ||
| 194 | * percpu areas are aligned to PMD. This, in the future, | ||
| 195 | * can also allow using PMD mappings in vmalloc area. Use | ||
| 196 | * PAGE_SIZE on 32bit as vmalloc space is highly contended | ||
| 197 | * and large vmalloc area allocs can easily fail. | ||
| 198 | */ | ||
| 199 | #ifdef CONFIG_X86_64 | ||
| 200 | atom_size = PMD_SIZE; | ||
| 201 | #else | ||
| 202 | atom_size = PAGE_SIZE; | ||
| 203 | #endif | ||
| 192 | rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, | 204 | rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, |
| 193 | dyn_size, atom_size, | 205 | dyn_size, atom_size, |
| 194 | pcpu_cpu_distance, | 206 | pcpu_cpu_distance, |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 91a5e989abcf..185a2b823a2d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -6581,6 +6581,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu, | |||
| 6581 | kvm_inject_page_fault(vcpu, &fault); | 6581 | kvm_inject_page_fault(vcpu, &fault); |
| 6582 | } | 6582 | } |
| 6583 | vcpu->arch.apf.halted = false; | 6583 | vcpu->arch.apf.halted = false; |
| 6584 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; | ||
| 6584 | } | 6585 | } |
| 6585 | 6586 | ||
| 6586 | bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu) | 6587 | bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index a8f8844b8d32..95dccce8e979 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | #include <asm/stackprotector.h> | 63 | #include <asm/stackprotector.h> |
| 64 | #include <asm/hypervisor.h> | 64 | #include <asm/hypervisor.h> |
| 65 | #include <asm/mwait.h> | 65 | #include <asm/mwait.h> |
| 66 | #include <asm/pci_x86.h> | ||
| 66 | 67 | ||
| 67 | #ifdef CONFIG_ACPI | 68 | #ifdef CONFIG_ACPI |
| 68 | #include <linux/acpi.h> | 69 | #include <linux/acpi.h> |
| @@ -809,9 +810,40 @@ static void xen_io_delay(void) | |||
| 809 | } | 810 | } |
| 810 | 811 | ||
| 811 | #ifdef CONFIG_X86_LOCAL_APIC | 812 | #ifdef CONFIG_X86_LOCAL_APIC |
| 813 | static unsigned long xen_set_apic_id(unsigned int x) | ||
| 814 | { | ||
| 815 | WARN_ON(1); | ||
| 816 | return x; | ||
| 817 | } | ||
| 818 | static unsigned int xen_get_apic_id(unsigned long x) | ||
| 819 | { | ||
| 820 | return ((x)>>24) & 0xFFu; | ||
| 821 | } | ||
| 812 | static u32 xen_apic_read(u32 reg) | 822 | static u32 xen_apic_read(u32 reg) |
| 813 | { | 823 | { |
| 814 | return 0; | 824 | struct xen_platform_op op = { |
| 825 | .cmd = XENPF_get_cpuinfo, | ||
| 826 | .interface_version = XENPF_INTERFACE_VERSION, | ||
| 827 | .u.pcpu_info.xen_cpuid = 0, | ||
| 828 | }; | ||
| 829 | int ret = 0; | ||
| 830 | |||
| 831 | /* Shouldn't need this as APIC is turned off for PV, and we only | ||
| 832 | * get called on the bootup processor. But just in case. */ | ||
| 833 | if (!xen_initial_domain() || smp_processor_id()) | ||
| 834 | return 0; | ||
| 835 | |||
| 836 | if (reg == APIC_LVR) | ||
| 837 | return 0x10; | ||
| 838 | |||
| 839 | if (reg != APIC_ID) | ||
| 840 | return 0; | ||
| 841 | |||
| 842 | ret = HYPERVISOR_dom0_op(&op); | ||
| 843 | if (ret) | ||
| 844 | return 0; | ||
| 845 | |||
| 846 | return op.u.pcpu_info.apic_id << 24; | ||
| 815 | } | 847 | } |
| 816 | 848 | ||
| 817 | static void xen_apic_write(u32 reg, u32 val) | 849 | static void xen_apic_write(u32 reg, u32 val) |
| @@ -849,6 +881,8 @@ static void set_xen_basic_apic_ops(void) | |||
| 849 | apic->icr_write = xen_apic_icr_write; | 881 | apic->icr_write = xen_apic_icr_write; |
| 850 | apic->wait_icr_idle = xen_apic_wait_icr_idle; | 882 | apic->wait_icr_idle = xen_apic_wait_icr_idle; |
| 851 | apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle; | 883 | apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle; |
| 884 | apic->set_apic_id = xen_set_apic_id; | ||
| 885 | apic->get_apic_id = xen_get_apic_id; | ||
| 852 | } | 886 | } |
| 853 | 887 | ||
| 854 | #endif | 888 | #endif |
| @@ -1365,8 +1399,10 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 1365 | /* Make sure ACS will be enabled */ | 1399 | /* Make sure ACS will be enabled */ |
| 1366 | pci_request_acs(); | 1400 | pci_request_acs(); |
| 1367 | } | 1401 | } |
| 1368 | 1402 | #ifdef CONFIG_PCI | |
| 1369 | 1403 | /* PCI BIOS service won't work from a PV guest. */ | |
| 1404 | pci_probe &= ~PCI_PROBE_BIOS; | ||
| 1405 | #endif | ||
| 1370 | xen_raw_console_write("about to get started...\n"); | 1406 | xen_raw_console_write("about to get started...\n"); |
| 1371 | 1407 | ||
| 1372 | xen_setup_runstate_info(0); | 1408 | xen_setup_runstate_info(0); |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index b8e279479a6b..69f5857660ac 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
| @@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) | |||
| 353 | { | 353 | { |
| 354 | if (val & _PAGE_PRESENT) { | 354 | if (val & _PAGE_PRESENT) { |
| 355 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; | 355 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
| 356 | unsigned long pfn = mfn_to_pfn(mfn); | ||
| 357 | |||
| 356 | pteval_t flags = val & PTE_FLAGS_MASK; | 358 | pteval_t flags = val & PTE_FLAGS_MASK; |
| 357 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; | 359 | if (unlikely(pfn == ~0)) |
| 360 | val = flags & ~_PAGE_PRESENT; | ||
| 361 | else | ||
| 362 | val = ((pteval_t)pfn << PAGE_SHIFT) | flags; | ||
| 358 | } | 363 | } |
| 359 | 364 | ||
| 360 | return val; | 365 | return val; |
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 7a3f535e481c..bb80853ff27a 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
| @@ -775,9 +775,11 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, | |||
| 775 | map->format.parse_val(val + i); | 775 | map->format.parse_val(val + i); |
| 776 | } else { | 776 | } else { |
| 777 | for (i = 0; i < val_count; i++) { | 777 | for (i = 0; i < val_count; i++) { |
| 778 | ret = regmap_read(map, reg + i, val + (i * val_bytes)); | 778 | unsigned int ival; |
| 779 | ret = regmap_read(map, reg + i, &ival); | ||
| 779 | if (ret != 0) | 780 | if (ret != 0) |
| 780 | return ret; | 781 | return ret; |
| 782 | memcpy(val + (i * val_bytes), &ival, val_bytes); | ||
| 781 | } | 783 | } |
| 782 | } | 784 | } |
| 783 | 785 | ||
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index abfaacaaf346..946166e13953 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
| @@ -2297,7 +2297,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms | |||
| 2297 | return; | 2297 | return; |
| 2298 | } | 2298 | } |
| 2299 | 2299 | ||
| 2300 | if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) { | 2300 | if (!capable(CAP_SYS_ADMIN)) { |
| 2301 | retcode = ERR_PERM; | 2301 | retcode = ERR_PERM; |
| 2302 | goto fail; | 2302 | goto fail; |
| 2303 | } | 2303 | } |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 80fce51e2f43..62892a826ede 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
| @@ -398,10 +398,8 @@ static int init_render_ring(struct intel_ring_buffer *ring) | |||
| 398 | return ret; | 398 | return ret; |
| 399 | } | 399 | } |
| 400 | 400 | ||
| 401 | if (INTEL_INFO(dev)->gen >= 6) { | ||
| 402 | I915_WRITE(INSTPM, | ||
| 403 | INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); | ||
| 404 | 401 | ||
| 402 | if (IS_GEN6(dev)) { | ||
| 405 | /* From the Sandybridge PRM, volume 1 part 3, page 24: | 403 | /* From the Sandybridge PRM, volume 1 part 3, page 24: |
| 406 | * "If this bit is set, STCunit will have LRA as replacement | 404 | * "If this bit is set, STCunit will have LRA as replacement |
| 407 | * policy. [...] This bit must be reset. LRA replacement | 405 | * policy. [...] This bit must be reset. LRA replacement |
| @@ -411,6 +409,11 @@ static int init_render_ring(struct intel_ring_buffer *ring) | |||
| 411 | CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); | 409 | CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); |
| 412 | } | 410 | } |
| 413 | 411 | ||
| 412 | if (INTEL_INFO(dev)->gen >= 6) { | ||
| 413 | I915_WRITE(INSTPM, | ||
| 414 | INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); | ||
| 415 | } | ||
| 416 | |||
| 414 | return ret; | 417 | return ret; |
| 415 | } | 418 | } |
| 416 | 419 | ||
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 232d77d07d8b..ae5e748f39bb 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
| @@ -1220,8 +1220,14 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in | |||
| 1220 | 1220 | ||
| 1221 | static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo) | 1221 | static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo) |
| 1222 | { | 1222 | { |
| 1223 | struct drm_device *dev = intel_sdvo->base.base.dev; | ||
| 1223 | u8 response[2]; | 1224 | u8 response[2]; |
| 1224 | 1225 | ||
| 1226 | /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise | ||
| 1227 | * on the line. */ | ||
| 1228 | if (IS_I945G(dev) || IS_I945GM(dev)) | ||
| 1229 | return false; | ||
| 1230 | |||
| 1225 | return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, | 1231 | return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, |
| 1226 | &response, 2) && response[0]; | 1232 | &response, 2) && response[0]; |
| 1227 | } | 1233 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index e2be95af2e52..77e564667b5c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c | |||
| @@ -29,10 +29,6 @@ | |||
| 29 | #include "nouveau_i2c.h" | 29 | #include "nouveau_i2c.h" |
| 30 | #include "nouveau_hw.h" | 30 | #include "nouveau_hw.h" |
| 31 | 31 | ||
| 32 | #define T_TIMEOUT 2200000 | ||
| 33 | #define T_RISEFALL 1000 | ||
| 34 | #define T_HOLD 5000 | ||
| 35 | |||
| 36 | static void | 32 | static void |
| 37 | i2c_drive_scl(void *data, int state) | 33 | i2c_drive_scl(void *data, int state) |
| 38 | { | 34 | { |
| @@ -113,175 +109,6 @@ i2c_sense_sda(void *data) | |||
| 113 | return 0; | 109 | return 0; |
| 114 | } | 110 | } |
| 115 | 111 | ||
| 116 | static void | ||
| 117 | i2c_delay(struct nouveau_i2c_chan *port, u32 nsec) | ||
| 118 | { | ||
| 119 | udelay((nsec + 500) / 1000); | ||
| 120 | } | ||
| 121 | |||
| 122 | static bool | ||
| 123 | i2c_raise_scl(struct nouveau_i2c_chan *port) | ||
| 124 | { | ||
| 125 | u32 timeout = T_TIMEOUT / T_RISEFALL; | ||
| 126 | |||
| 127 | i2c_drive_scl(port, 1); | ||
| 128 | do { | ||
| 129 | i2c_delay(port, T_RISEFALL); | ||
| 130 | } while (!i2c_sense_scl(port) && --timeout); | ||
| 131 | |||
| 132 | return timeout != 0; | ||
| 133 | } | ||
| 134 | |||
| 135 | static int | ||
| 136 | i2c_start(struct nouveau_i2c_chan *port) | ||
| 137 | { | ||
| 138 | int ret = 0; | ||
| 139 | |||
| 140 | port->state = i2c_sense_scl(port); | ||
| 141 | port->state |= i2c_sense_sda(port) << 1; | ||
| 142 | if (port->state != 3) { | ||
| 143 | i2c_drive_scl(port, 0); | ||
| 144 | i2c_drive_sda(port, 1); | ||
| 145 | if (!i2c_raise_scl(port)) | ||
| 146 | ret = -EBUSY; | ||
| 147 | } | ||
| 148 | |||
| 149 | i2c_drive_sda(port, 0); | ||
| 150 | i2c_delay(port, T_HOLD); | ||
| 151 | i2c_drive_scl(port, 0); | ||
| 152 | i2c_delay(port, T_HOLD); | ||
| 153 | return ret; | ||
| 154 | } | ||
| 155 | |||
| 156 | static void | ||
| 157 | i2c_stop(struct nouveau_i2c_chan *port) | ||
| 158 | { | ||
| 159 | i2c_drive_scl(port, 0); | ||
| 160 | i2c_drive_sda(port, 0); | ||
| 161 | i2c_delay(port, T_RISEFALL); | ||
| 162 | |||
| 163 | i2c_drive_scl(port, 1); | ||
| 164 | i2c_delay(port, T_HOLD); | ||
| 165 | i2c_drive_sda(port, 1); | ||
| 166 | i2c_delay(port, T_HOLD); | ||
| 167 | } | ||
| 168 | |||
| 169 | static int | ||
| 170 | i2c_bitw(struct nouveau_i2c_chan *port, int sda) | ||
| 171 | { | ||
| 172 | i2c_drive_sda(port, sda); | ||
| 173 | i2c_delay(port, T_RISEFALL); | ||
| 174 | |||
| 175 | if (!i2c_raise_scl(port)) | ||
| 176 | return -ETIMEDOUT; | ||
| 177 | i2c_delay(port, T_HOLD); | ||
| 178 | |||
| 179 | i2c_drive_scl(port, 0); | ||
| 180 | i2c_delay(port, T_HOLD); | ||
| 181 | return 0; | ||
| 182 | } | ||
| 183 | |||
| 184 | static int | ||
| 185 | i2c_bitr(struct nouveau_i2c_chan *port) | ||
| 186 | { | ||
| 187 | int sda; | ||
| 188 | |||
| 189 | i2c_drive_sda(port, 1); | ||
| 190 | i2c_delay(port, T_RISEFALL); | ||
| 191 | |||
| 192 | if (!i2c_raise_scl(port)) | ||
| 193 | return -ETIMEDOUT; | ||
| 194 | i2c_delay(port, T_HOLD); | ||
| 195 | |||
| 196 | sda = i2c_sense_sda(port); | ||
| 197 | |||
| 198 | i2c_drive_scl(port, 0); | ||
| 199 | i2c_delay(port, T_HOLD); | ||
| 200 | return sda; | ||
| 201 | } | ||
| 202 | |||
| 203 | static int | ||
| 204 | i2c_get_byte(struct nouveau_i2c_chan *port, u8 *byte, bool last) | ||
| 205 | { | ||
| 206 | int i, bit; | ||
| 207 | |||
| 208 | *byte = 0; | ||
| 209 | for (i = 7; i >= 0; i--) { | ||
| 210 | bit = i2c_bitr(port); | ||
| 211 | if (bit < 0) | ||
| 212 | return bit; | ||
| 213 | *byte |= bit << i; | ||
| 214 | } | ||
| 215 | |||
| 216 | return i2c_bitw(port, last ? 1 : 0); | ||
| 217 | } | ||
| 218 | |||
| 219 | static int | ||
| 220 | i2c_put_byte(struct nouveau_i2c_chan *port, u8 byte) | ||
| 221 | { | ||
| 222 | int i, ret; | ||
| 223 | for (i = 7; i >= 0; i--) { | ||
| 224 | ret = i2c_bitw(port, !!(byte & (1 << i))); | ||
| 225 | if (ret < 0) | ||
| 226 | return ret; | ||
| 227 | } | ||
| 228 | |||
| 229 | ret = i2c_bitr(port); | ||
| 230 | if (ret == 1) /* nack */ | ||
| 231 | ret = -EIO; | ||
| 232 | return ret; | ||
| 233 | } | ||
| 234 | |||
| 235 | static int | ||
| 236 | i2c_addr(struct nouveau_i2c_chan *port, struct i2c_msg *msg) | ||
| 237 | { | ||
| 238 | u32 addr = msg->addr << 1; | ||
| 239 | if (msg->flags & I2C_M_RD) | ||
| 240 | addr |= 1; | ||
| 241 | return i2c_put_byte(port, addr); | ||
| 242 | } | ||
| 243 | |||
| 244 | static int | ||
| 245 | i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) | ||
| 246 | { | ||
| 247 | struct nouveau_i2c_chan *port = (struct nouveau_i2c_chan *)adap; | ||
| 248 | struct i2c_msg *msg = msgs; | ||
| 249 | int ret = 0, mcnt = num; | ||
| 250 | |||
| 251 | while (!ret && mcnt--) { | ||
| 252 | u8 remaining = msg->len; | ||
| 253 | u8 *ptr = msg->buf; | ||
| 254 | |||
| 255 | ret = i2c_start(port); | ||
| 256 | if (ret == 0) | ||
| 257 | ret = i2c_addr(port, msg); | ||
| 258 | |||
| 259 | if (msg->flags & I2C_M_RD) { | ||
| 260 | while (!ret && remaining--) | ||
| 261 | ret = i2c_get_byte(port, ptr++, !remaining); | ||
| 262 | } else { | ||
| 263 | while (!ret && remaining--) | ||
| 264 | ret = i2c_put_byte(port, *ptr++); | ||
| 265 | } | ||
| 266 | |||
| 267 | msg++; | ||
| 268 | } | ||
| 269 | |||
| 270 | i2c_stop(port); | ||
| 271 | return (ret < 0) ? ret : num; | ||
| 272 | } | ||
| 273 | |||
| 274 | static u32 | ||
| 275 | i2c_bit_func(struct i2c_adapter *adap) | ||
| 276 | { | ||
| 277 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | ||
| 278 | } | ||
| 279 | |||
| 280 | const struct i2c_algorithm nouveau_i2c_bit_algo = { | ||
| 281 | .master_xfer = i2c_bit_xfer, | ||
| 282 | .functionality = i2c_bit_func | ||
| 283 | }; | ||
| 284 | |||
| 285 | static const uint32_t nv50_i2c_port[] = { | 112 | static const uint32_t nv50_i2c_port[] = { |
| 286 | 0x00e138, 0x00e150, 0x00e168, 0x00e180, | 113 | 0x00e138, 0x00e150, 0x00e168, 0x00e180, |
| 287 | 0x00e254, 0x00e274, 0x00e764, 0x00e780, | 114 | 0x00e254, 0x00e274, 0x00e764, 0x00e780, |
| @@ -384,12 +211,10 @@ nouveau_i2c_init(struct drm_device *dev) | |||
| 384 | case 0: /* NV04:NV50 */ | 211 | case 0: /* NV04:NV50 */ |
| 385 | port->drive = entry[0]; | 212 | port->drive = entry[0]; |
| 386 | port->sense = entry[1]; | 213 | port->sense = entry[1]; |
| 387 | port->adapter.algo = &nouveau_i2c_bit_algo; | ||
| 388 | break; | 214 | break; |
| 389 | case 4: /* NV4E */ | 215 | case 4: /* NV4E */ |
| 390 | port->drive = 0x600800 + entry[1]; | 216 | port->drive = 0x600800 + entry[1]; |
| 391 | port->sense = port->drive; | 217 | port->sense = port->drive; |
| 392 | port->adapter.algo = &nouveau_i2c_bit_algo; | ||
| 393 | break; | 218 | break; |
| 394 | case 5: /* NV50- */ | 219 | case 5: /* NV50- */ |
| 395 | port->drive = entry[0] & 0x0f; | 220 | port->drive = entry[0] & 0x0f; |
| @@ -402,7 +227,6 @@ nouveau_i2c_init(struct drm_device *dev) | |||
| 402 | port->drive = 0x00d014 + (port->drive * 0x20); | 227 | port->drive = 0x00d014 + (port->drive * 0x20); |
| 403 | port->sense = port->drive; | 228 | port->sense = port->drive; |
| 404 | } | 229 | } |
| 405 | port->adapter.algo = &nouveau_i2c_bit_algo; | ||
| 406 | break; | 230 | break; |
| 407 | case 6: /* NV50- DP AUX */ | 231 | case 6: /* NV50- DP AUX */ |
| 408 | port->drive = entry[0]; | 232 | port->drive = entry[0]; |
| @@ -413,7 +237,7 @@ nouveau_i2c_init(struct drm_device *dev) | |||
| 413 | break; | 237 | break; |
| 414 | } | 238 | } |
| 415 | 239 | ||
| 416 | if (!port->adapter.algo) { | 240 | if (!port->adapter.algo && !port->drive) { |
| 417 | NV_ERROR(dev, "I2C%d: type %d index %x/%x unknown\n", | 241 | NV_ERROR(dev, "I2C%d: type %d index %x/%x unknown\n", |
| 418 | i, port->type, port->drive, port->sense); | 242 | i, port->type, port->drive, port->sense); |
| 419 | kfree(port); | 243 | kfree(port); |
| @@ -429,7 +253,26 @@ nouveau_i2c_init(struct drm_device *dev) | |||
| 429 | port->dcb = ROM32(entry[0]); | 253 | port->dcb = ROM32(entry[0]); |
| 430 | i2c_set_adapdata(&port->adapter, i2c); | 254 | i2c_set_adapdata(&port->adapter, i2c); |
| 431 | 255 | ||
| 432 | ret = i2c_add_adapter(&port->adapter); | 256 | if (port->adapter.algo != &nouveau_dp_i2c_algo) { |
| 257 | port->adapter.algo_data = &port->bit; | ||
| 258 | port->bit.udelay = 10; | ||
| 259 | port->bit.timeout = usecs_to_jiffies(2200); | ||
| 260 | port->bit.data = port; | ||
| 261 | port->bit.setsda = i2c_drive_sda; | ||
| 262 | port->bit.setscl = i2c_drive_scl; | ||
| 263 | port->bit.getsda = i2c_sense_sda; | ||
| 264 | port->bit.getscl = i2c_sense_scl; | ||
| 265 | |||
| 266 | i2c_drive_scl(port, 0); | ||
| 267 | i2c_drive_sda(port, 1); | ||
| 268 | i2c_drive_scl(port, 1); | ||
| 269 | |||
| 270 | ret = i2c_bit_add_bus(&port->adapter); | ||
| 271 | } else { | ||
| 272 | port->adapter.algo = &nouveau_dp_i2c_algo; | ||
| 273 | ret = i2c_add_adapter(&port->adapter); | ||
| 274 | } | ||
| 275 | |||
| 433 | if (ret) { | 276 | if (ret) { |
| 434 | NV_ERROR(dev, "I2C%d: failed register: %d\n", i, ret); | 277 | NV_ERROR(dev, "I2C%d: failed register: %d\n", i, ret); |
| 435 | kfree(port); | 278 | kfree(port); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.h b/drivers/gpu/drm/nouveau/nouveau_i2c.h index 4d2e4e9031be..1d083893a4d7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.h +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | struct nouveau_i2c_chan { | 34 | struct nouveau_i2c_chan { |
| 35 | struct i2c_adapter adapter; | 35 | struct i2c_adapter adapter; |
| 36 | struct drm_device *dev; | 36 | struct drm_device *dev; |
| 37 | struct i2c_algo_bit_data bit; | ||
| 37 | struct list_head head; | 38 | struct list_head head; |
| 38 | u8 index; | 39 | u8 index; |
| 39 | u8 type; | 40 | u8 type; |
diff --git a/drivers/leds/leds-netxbig.c b/drivers/leds/leds-netxbig.c index d8433f2d53bc..73973fdbd8be 100644 --- a/drivers/leds/leds-netxbig.c +++ b/drivers/leds/leds-netxbig.c | |||
| @@ -112,7 +112,7 @@ err_free_addr: | |||
| 112 | return err; | 112 | return err; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static void __devexit gpio_ext_free(struct netxbig_gpio_ext *gpio_ext) | 115 | static void gpio_ext_free(struct netxbig_gpio_ext *gpio_ext) |
| 116 | { | 116 | { |
| 117 | int i; | 117 | int i; |
| 118 | 118 | ||
| @@ -294,7 +294,7 @@ static ssize_t netxbig_led_sata_show(struct device *dev, | |||
| 294 | 294 | ||
| 295 | static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store); | 295 | static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store); |
| 296 | 296 | ||
| 297 | static void __devexit delete_netxbig_led(struct netxbig_led_data *led_dat) | 297 | static void delete_netxbig_led(struct netxbig_led_data *led_dat) |
| 298 | { | 298 | { |
| 299 | if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE) | 299 | if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE) |
| 300 | device_remove_file(led_dat->cdev.dev, &dev_attr_sata); | 300 | device_remove_file(led_dat->cdev.dev, &dev_attr_sata); |
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index 2f0a14421a73..01cf89ec6944 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c | |||
| @@ -255,7 +255,7 @@ err_free_cmd: | |||
| 255 | return ret; | 255 | return ret; |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static void __devexit delete_ns2_led(struct ns2_led_data *led_dat) | 258 | static void delete_ns2_led(struct ns2_led_data *led_dat) |
| 259 | { | 259 | { |
| 260 | device_remove_file(led_dat->cdev.dev, &dev_attr_sata); | 260 | device_remove_file(led_dat->cdev.dev, &dev_attr_sata); |
| 261 | led_classdev_unregister(&led_dat->cdev); | 261 | led_classdev_unregister(&led_dat->cdev); |
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index 1f23e048f077..08d9a207259a 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c | |||
| @@ -134,7 +134,7 @@ static void cn_ulog_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp) | |||
| 134 | { | 134 | { |
| 135 | struct dm_ulog_request *tfr = (struct dm_ulog_request *)(msg + 1); | 135 | struct dm_ulog_request *tfr = (struct dm_ulog_request *)(msg + 1); |
| 136 | 136 | ||
| 137 | if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) | 137 | if (!capable(CAP_SYS_ADMIN)) |
| 138 | return; | 138 | return; |
| 139 | 139 | ||
| 140 | spin_lock(&receiving_list_lock); | 140 | spin_lock(&receiving_list_lock); |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 922a3385eead..754f38f8a692 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
| @@ -718,8 +718,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m) | |||
| 718 | return 0; | 718 | return 0; |
| 719 | 719 | ||
| 720 | m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); | 720 | m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); |
| 721 | request_module("scsi_dh_%s", m->hw_handler_name); | 721 | if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name), |
| 722 | if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { | 722 | "scsi_dh_%s", m->hw_handler_name)) { |
| 723 | ti->error = "unknown hardware handler type"; | 723 | ti->error = "unknown hardware handler type"; |
| 724 | ret = -EINVAL; | 724 | ret = -EINVAL; |
| 725 | goto fail; | 725 | goto fail; |
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 213ae32a0fc4..2fd87b544a93 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
| @@ -279,8 +279,10 @@ static void __cell_release(struct cell *cell, struct bio_list *inmates) | |||
| 279 | 279 | ||
| 280 | hlist_del(&cell->list); | 280 | hlist_del(&cell->list); |
| 281 | 281 | ||
| 282 | bio_list_add(inmates, cell->holder); | 282 | if (inmates) { |
| 283 | bio_list_merge(inmates, &cell->bios); | 283 | bio_list_add(inmates, cell->holder); |
| 284 | bio_list_merge(inmates, &cell->bios); | ||
| 285 | } | ||
| 284 | 286 | ||
| 285 | mempool_free(cell, prison->cell_pool); | 287 | mempool_free(cell, prison->cell_pool); |
| 286 | } | 288 | } |
| @@ -303,9 +305,10 @@ static void cell_release(struct cell *cell, struct bio_list *bios) | |||
| 303 | */ | 305 | */ |
| 304 | static void __cell_release_singleton(struct cell *cell, struct bio *bio) | 306 | static void __cell_release_singleton(struct cell *cell, struct bio *bio) |
| 305 | { | 307 | { |
| 306 | hlist_del(&cell->list); | ||
| 307 | BUG_ON(cell->holder != bio); | 308 | BUG_ON(cell->holder != bio); |
| 308 | BUG_ON(!bio_list_empty(&cell->bios)); | 309 | BUG_ON(!bio_list_empty(&cell->bios)); |
| 310 | |||
| 311 | __cell_release(cell, NULL); | ||
| 309 | } | 312 | } |
| 310 | 313 | ||
| 311 | static void cell_release_singleton(struct cell *cell, struct bio *bio) | 314 | static void cell_release_singleton(struct cell *cell, struct bio *bio) |
| @@ -1177,6 +1180,7 @@ static void no_space(struct cell *cell) | |||
| 1177 | static void process_discard(struct thin_c *tc, struct bio *bio) | 1180 | static void process_discard(struct thin_c *tc, struct bio *bio) |
| 1178 | { | 1181 | { |
| 1179 | int r; | 1182 | int r; |
| 1183 | unsigned long flags; | ||
| 1180 | struct pool *pool = tc->pool; | 1184 | struct pool *pool = tc->pool; |
| 1181 | struct cell *cell, *cell2; | 1185 | struct cell *cell, *cell2; |
| 1182 | struct cell_key key, key2; | 1186 | struct cell_key key, key2; |
| @@ -1218,7 +1222,9 @@ static void process_discard(struct thin_c *tc, struct bio *bio) | |||
| 1218 | m->bio = bio; | 1222 | m->bio = bio; |
| 1219 | 1223 | ||
| 1220 | if (!ds_add_work(&pool->all_io_ds, &m->list)) { | 1224 | if (!ds_add_work(&pool->all_io_ds, &m->list)) { |
| 1225 | spin_lock_irqsave(&pool->lock, flags); | ||
| 1221 | list_add(&m->list, &pool->prepared_discards); | 1226 | list_add(&m->list, &pool->prepared_discards); |
| 1227 | spin_unlock_irqrestore(&pool->lock, flags); | ||
| 1222 | wake_worker(pool); | 1228 | wake_worker(pool); |
| 1223 | } | 1229 | } |
| 1224 | } else { | 1230 | } else { |
| @@ -2626,8 +2632,10 @@ static int thin_endio(struct dm_target *ti, | |||
| 2626 | if (h->all_io_entry) { | 2632 | if (h->all_io_entry) { |
| 2627 | INIT_LIST_HEAD(&work); | 2633 | INIT_LIST_HEAD(&work); |
| 2628 | ds_dec(h->all_io_entry, &work); | 2634 | ds_dec(h->all_io_entry, &work); |
| 2635 | spin_lock_irqsave(&pool->lock, flags); | ||
| 2629 | list_for_each_entry_safe(m, tmp, &work, list) | 2636 | list_for_each_entry_safe(m, tmp, &work, list) |
| 2630 | list_add(&m->list, &pool->prepared_discards); | 2637 | list_add(&m->list, &pool->prepared_discards); |
| 2638 | spin_unlock_irqrestore(&pool->lock, flags); | ||
| 2631 | } | 2639 | } |
| 2632 | 2640 | ||
| 2633 | mempool_free(h, pool->endio_hook_pool); | 2641 | mempool_free(h, pool->endio_hook_pool); |
| @@ -2759,6 +2767,6 @@ static void dm_thin_exit(void) | |||
| 2759 | module_init(dm_thin_init); | 2767 | module_init(dm_thin_init); |
| 2760 | module_exit(dm_thin_exit); | 2768 | module_exit(dm_thin_exit); |
| 2761 | 2769 | ||
| 2762 | MODULE_DESCRIPTION(DM_NAME "device-mapper thin provisioning target"); | 2770 | MODULE_DESCRIPTION(DM_NAME " thin provisioning target"); |
| 2763 | MODULE_AUTHOR("Joe Thornber <dm-devel@redhat.com>"); | 2771 | MODULE_AUTHOR("Joe Thornber <dm-devel@redhat.com>"); |
| 2764 | MODULE_LICENSE("GPL"); | 2772 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 793b00138275..3463b469e657 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
| @@ -2173,9 +2173,10 @@ re_arm: | |||
| 2173 | * received frames (loopback). Since only the payload is given to this | 2173 | * received frames (loopback). Since only the payload is given to this |
| 2174 | * function, it check for loopback. | 2174 | * function, it check for loopback. |
| 2175 | */ | 2175 | */ |
| 2176 | static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u16 length) | 2176 | static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u16 length) |
| 2177 | { | 2177 | { |
| 2178 | struct port *port; | 2178 | struct port *port; |
| 2179 | int ret = RX_HANDLER_ANOTHER; | ||
| 2179 | 2180 | ||
| 2180 | if (length >= sizeof(struct lacpdu)) { | 2181 | if (length >= sizeof(struct lacpdu)) { |
| 2181 | 2182 | ||
| @@ -2184,11 +2185,12 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u | |||
| 2184 | if (!port->slave) { | 2185 | if (!port->slave) { |
| 2185 | pr_warning("%s: Warning: port of slave %s is uninitialized\n", | 2186 | pr_warning("%s: Warning: port of slave %s is uninitialized\n", |
| 2186 | slave->dev->name, slave->dev->master->name); | 2187 | slave->dev->name, slave->dev->master->name); |
| 2187 | return; | 2188 | return ret; |
| 2188 | } | 2189 | } |
| 2189 | 2190 | ||
| 2190 | switch (lacpdu->subtype) { | 2191 | switch (lacpdu->subtype) { |
| 2191 | case AD_TYPE_LACPDU: | 2192 | case AD_TYPE_LACPDU: |
| 2193 | ret = RX_HANDLER_CONSUMED; | ||
| 2192 | pr_debug("Received LACPDU on port %d\n", | 2194 | pr_debug("Received LACPDU on port %d\n", |
| 2193 | port->actor_port_number); | 2195 | port->actor_port_number); |
| 2194 | /* Protect against concurrent state machines */ | 2196 | /* Protect against concurrent state machines */ |
| @@ -2198,6 +2200,7 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u | |||
| 2198 | break; | 2200 | break; |
| 2199 | 2201 | ||
| 2200 | case AD_TYPE_MARKER: | 2202 | case AD_TYPE_MARKER: |
| 2203 | ret = RX_HANDLER_CONSUMED; | ||
| 2201 | // No need to convert fields to Little Endian since we don't use the marker's fields. | 2204 | // No need to convert fields to Little Endian since we don't use the marker's fields. |
| 2202 | 2205 | ||
| 2203 | switch (((struct bond_marker *)lacpdu)->tlv_type) { | 2206 | switch (((struct bond_marker *)lacpdu)->tlv_type) { |
| @@ -2219,6 +2222,7 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u | |||
| 2219 | } | 2222 | } |
| 2220 | } | 2223 | } |
| 2221 | } | 2224 | } |
| 2225 | return ret; | ||
| 2222 | } | 2226 | } |
| 2223 | 2227 | ||
| 2224 | /** | 2228 | /** |
| @@ -2456,18 +2460,20 @@ out: | |||
| 2456 | return NETDEV_TX_OK; | 2460 | return NETDEV_TX_OK; |
| 2457 | } | 2461 | } |
| 2458 | 2462 | ||
| 2459 | void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond, | 2463 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond, |
| 2460 | struct slave *slave) | 2464 | struct slave *slave) |
| 2461 | { | 2465 | { |
| 2466 | int ret = RX_HANDLER_ANOTHER; | ||
| 2462 | if (skb->protocol != PKT_TYPE_LACPDU) | 2467 | if (skb->protocol != PKT_TYPE_LACPDU) |
| 2463 | return; | 2468 | return ret; |
| 2464 | 2469 | ||
| 2465 | if (!pskb_may_pull(skb, sizeof(struct lacpdu))) | 2470 | if (!pskb_may_pull(skb, sizeof(struct lacpdu))) |
| 2466 | return; | 2471 | return ret; |
| 2467 | 2472 | ||
| 2468 | read_lock(&bond->lock); | 2473 | read_lock(&bond->lock); |
| 2469 | bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); | 2474 | ret = bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); |
| 2470 | read_unlock(&bond->lock); | 2475 | read_unlock(&bond->lock); |
| 2476 | return ret; | ||
| 2471 | } | 2477 | } |
| 2472 | 2478 | ||
| 2473 | /* | 2479 | /* |
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index 235b2cc58b28..5ee7e3c45db7 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
| @@ -274,7 +274,7 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave); | |||
| 274 | void bond_3ad_handle_link_change(struct slave *slave, char link); | 274 | void bond_3ad_handle_link_change(struct slave *slave, char link); |
| 275 | int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); | 275 | int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); |
| 276 | int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); | 276 | int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); |
| 277 | void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond, | 277 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond, |
| 278 | struct slave *slave); | 278 | struct slave *slave); |
| 279 | int bond_3ad_set_carrier(struct bonding *bond); | 279 | int bond_3ad_set_carrier(struct bonding *bond); |
| 280 | void bond_3ad_update_lacp_rate(struct bonding *bond); | 280 | void bond_3ad_update_lacp_rate(struct bonding *bond); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 62d2409bb293..bc13b3d77432 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
| @@ -1444,8 +1444,9 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
| 1444 | struct sk_buff *skb = *pskb; | 1444 | struct sk_buff *skb = *pskb; |
| 1445 | struct slave *slave; | 1445 | struct slave *slave; |
| 1446 | struct bonding *bond; | 1446 | struct bonding *bond; |
| 1447 | void (*recv_probe)(struct sk_buff *, struct bonding *, | 1447 | int (*recv_probe)(struct sk_buff *, struct bonding *, |
| 1448 | struct slave *); | 1448 | struct slave *); |
| 1449 | int ret = RX_HANDLER_ANOTHER; | ||
| 1449 | 1450 | ||
| 1450 | skb = skb_share_check(skb, GFP_ATOMIC); | 1451 | skb = skb_share_check(skb, GFP_ATOMIC); |
| 1451 | if (unlikely(!skb)) | 1452 | if (unlikely(!skb)) |
| @@ -1464,8 +1465,12 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
| 1464 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); | 1465 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); |
| 1465 | 1466 | ||
| 1466 | if (likely(nskb)) { | 1467 | if (likely(nskb)) { |
| 1467 | recv_probe(nskb, bond, slave); | 1468 | ret = recv_probe(nskb, bond, slave); |
| 1468 | dev_kfree_skb(nskb); | 1469 | dev_kfree_skb(nskb); |
| 1470 | if (ret == RX_HANDLER_CONSUMED) { | ||
| 1471 | consume_skb(skb); | ||
| 1472 | return ret; | ||
| 1473 | } | ||
| 1469 | } | 1474 | } |
| 1470 | } | 1475 | } |
| 1471 | 1476 | ||
| @@ -1487,7 +1492,7 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
| 1487 | memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN); | 1492 | memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN); |
| 1488 | } | 1493 | } |
| 1489 | 1494 | ||
| 1490 | return RX_HANDLER_ANOTHER; | 1495 | return ret; |
| 1491 | } | 1496 | } |
| 1492 | 1497 | ||
| 1493 | /* enslave device <slave> to bond device <master> */ | 1498 | /* enslave device <slave> to bond device <master> */ |
| @@ -2723,7 +2728,7 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 | |||
| 2723 | } | 2728 | } |
| 2724 | } | 2729 | } |
| 2725 | 2730 | ||
| 2726 | static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | 2731 | static int bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, |
| 2727 | struct slave *slave) | 2732 | struct slave *slave) |
| 2728 | { | 2733 | { |
| 2729 | struct arphdr *arp; | 2734 | struct arphdr *arp; |
| @@ -2731,7 +2736,7 @@ static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | |||
| 2731 | __be32 sip, tip; | 2736 | __be32 sip, tip; |
| 2732 | 2737 | ||
| 2733 | if (skb->protocol != __cpu_to_be16(ETH_P_ARP)) | 2738 | if (skb->protocol != __cpu_to_be16(ETH_P_ARP)) |
| 2734 | return; | 2739 | return RX_HANDLER_ANOTHER; |
| 2735 | 2740 | ||
| 2736 | read_lock(&bond->lock); | 2741 | read_lock(&bond->lock); |
| 2737 | 2742 | ||
| @@ -2776,6 +2781,7 @@ static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | |||
| 2776 | 2781 | ||
| 2777 | out_unlock: | 2782 | out_unlock: |
| 2778 | read_unlock(&bond->lock); | 2783 | read_unlock(&bond->lock); |
| 2784 | return RX_HANDLER_ANOTHER; | ||
| 2779 | } | 2785 | } |
| 2780 | 2786 | ||
| 2781 | /* | 2787 | /* |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index e077d2508727..6af310195bae 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
| @@ -9122,13 +9122,34 @@ static int __devinit bnx2x_prev_unload_common(struct bnx2x *bp) | |||
| 9122 | return bnx2x_prev_mcp_done(bp); | 9122 | return bnx2x_prev_mcp_done(bp); |
| 9123 | } | 9123 | } |
| 9124 | 9124 | ||
| 9125 | /* previous driver DMAE transaction may have occurred when pre-boot stage ended | ||
| 9126 | * and boot began, or when kdump kernel was loaded. Either case would invalidate | ||
| 9127 | * the addresses of the transaction, resulting in was-error bit set in the pci | ||
| 9128 | * causing all hw-to-host pcie transactions to timeout. If this happened we want | ||
| 9129 | * to clear the interrupt which detected this from the pglueb and the was done | ||
| 9130 | * bit | ||
| 9131 | */ | ||
| 9132 | static void __devinit bnx2x_prev_interrupted_dmae(struct bnx2x *bp) | ||
| 9133 | { | ||
| 9134 | u32 val = REG_RD(bp, PGLUE_B_REG_PGLUE_B_INT_STS); | ||
| 9135 | if (val & PGLUE_B_PGLUE_B_INT_STS_REG_WAS_ERROR_ATTN) { | ||
| 9136 | BNX2X_ERR("was error bit was found to be set in pglueb upon startup. Clearing"); | ||
| 9137 | REG_WR(bp, PGLUE_B_REG_WAS_ERROR_PF_7_0_CLR, 1 << BP_FUNC(bp)); | ||
| 9138 | } | ||
| 9139 | } | ||
| 9140 | |||
| 9125 | static int __devinit bnx2x_prev_unload(struct bnx2x *bp) | 9141 | static int __devinit bnx2x_prev_unload(struct bnx2x *bp) |
| 9126 | { | 9142 | { |
| 9127 | int time_counter = 10; | 9143 | int time_counter = 10; |
| 9128 | u32 rc, fw, hw_lock_reg, hw_lock_val; | 9144 | u32 rc, fw, hw_lock_reg, hw_lock_val; |
| 9129 | BNX2X_DEV_INFO("Entering Previous Unload Flow\n"); | 9145 | BNX2X_DEV_INFO("Entering Previous Unload Flow\n"); |
| 9130 | 9146 | ||
| 9131 | /* Release previously held locks */ | 9147 | /* clear hw from errors which may have resulted from an interrupted |
| 9148 | * dmae transaction. | ||
| 9149 | */ | ||
| 9150 | bnx2x_prev_interrupted_dmae(bp); | ||
| 9151 | |||
| 9152 | /* Release previously held locks */ | ||
| 9132 | hw_lock_reg = (BP_FUNC(bp) <= 5) ? | 9153 | hw_lock_reg = (BP_FUNC(bp) <= 5) ? |
| 9133 | (MISC_REG_DRIVER_CONTROL_1 + BP_FUNC(bp) * 8) : | 9154 | (MISC_REG_DRIVER_CONTROL_1 + BP_FUNC(bp) * 8) : |
| 9134 | (MISC_REG_DRIVER_CONTROL_7 + (BP_FUNC(bp) - 6) * 8); | 9155 | (MISC_REG_DRIVER_CONTROL_7 + (BP_FUNC(bp) - 6) * 8); |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index c9069a28832b..f4d2da0db1b1 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
| @@ -3335,6 +3335,8 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev, | |||
| 3335 | goto out_shutdown_ports; | 3335 | goto out_shutdown_ports; |
| 3336 | } | 3336 | } |
| 3337 | 3337 | ||
| 3338 | /* Handle any events that might be pending. */ | ||
| 3339 | tasklet_hi_schedule(&adapter->neq_tasklet); | ||
| 3338 | 3340 | ||
| 3339 | ret = 0; | 3341 | ret = 0; |
| 3340 | goto out; | 3342 | goto out; |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 4348b6fd44fa..37caa8885c2a 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
| @@ -3380,7 +3380,7 @@ static void e1000_dump(struct e1000_adapter *adapter) | |||
| 3380 | for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { | 3380 | for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { |
| 3381 | struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); | 3381 | struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); |
| 3382 | struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; | 3382 | struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; |
| 3383 | struct my_u { u64 a; u64 b; }; | 3383 | struct my_u { __le64 a; __le64 b; }; |
| 3384 | struct my_u *u = (struct my_u *)tx_desc; | 3384 | struct my_u *u = (struct my_u *)tx_desc; |
| 3385 | const char *type; | 3385 | const char *type; |
| 3386 | 3386 | ||
| @@ -3424,7 +3424,7 @@ rx_ring_summary: | |||
| 3424 | for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { | 3424 | for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { |
| 3425 | struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); | 3425 | struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); |
| 3426 | struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; | 3426 | struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; |
| 3427 | struct my_u { u64 a; u64 b; }; | 3427 | struct my_u { __le64 a; __le64 b; }; |
| 3428 | struct my_u *u = (struct my_u *)rx_desc; | 3428 | struct my_u *u = (struct my_u *)rx_desc; |
| 3429 | const char *type; | 3429 | const char *type; |
| 3430 | 3430 | ||
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 5ec31598ee47..8683ca4748c8 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
| @@ -1111,9 +1111,12 @@ msi_only: | |||
| 1111 | adapter->flags |= IGB_FLAG_HAS_MSI; | 1111 | adapter->flags |= IGB_FLAG_HAS_MSI; |
| 1112 | out: | 1112 | out: |
| 1113 | /* Notify the stack of the (possibly) reduced queue counts. */ | 1113 | /* Notify the stack of the (possibly) reduced queue counts. */ |
| 1114 | rtnl_lock(); | ||
| 1114 | netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); | 1115 | netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); |
| 1115 | return netif_set_real_num_rx_queues(adapter->netdev, | 1116 | err = netif_set_real_num_rx_queues(adapter->netdev, |
| 1116 | adapter->num_rx_queues); | 1117 | adapter->num_rx_queues); |
| 1118 | rtnl_unlock(); | ||
| 1119 | return err; | ||
| 1117 | } | 1120 | } |
| 1118 | 1121 | ||
| 1119 | /** | 1122 | /** |
| @@ -2771,8 +2774,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter, | |||
| 2771 | 2774 | ||
| 2772 | txdctl |= E1000_TXDCTL_QUEUE_ENABLE; | 2775 | txdctl |= E1000_TXDCTL_QUEUE_ENABLE; |
| 2773 | wr32(E1000_TXDCTL(reg_idx), txdctl); | 2776 | wr32(E1000_TXDCTL(reg_idx), txdctl); |
| 2774 | |||
| 2775 | netdev_tx_reset_queue(txring_txq(ring)); | ||
| 2776 | } | 2777 | } |
| 2777 | 2778 | ||
| 2778 | /** | 2779 | /** |
| @@ -3282,6 +3283,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring) | |||
| 3282 | igb_unmap_and_free_tx_resource(tx_ring, buffer_info); | 3283 | igb_unmap_and_free_tx_resource(tx_ring, buffer_info); |
| 3283 | } | 3284 | } |
| 3284 | 3285 | ||
| 3286 | netdev_tx_reset_queue(txring_txq(tx_ring)); | ||
| 3287 | |||
| 3285 | size = sizeof(struct igb_tx_buffer) * tx_ring->count; | 3288 | size = sizeof(struct igb_tx_buffer) * tx_ring->count; |
| 3286 | memset(tx_ring->tx_buffer_info, 0, size); | 3289 | memset(tx_ring->tx_buffer_info, 0, size); |
| 3287 | 3290 | ||
| @@ -6796,18 +6799,7 @@ static int igb_resume(struct device *dev) | |||
| 6796 | pci_enable_wake(pdev, PCI_D3hot, 0); | 6799 | pci_enable_wake(pdev, PCI_D3hot, 0); |
| 6797 | pci_enable_wake(pdev, PCI_D3cold, 0); | 6800 | pci_enable_wake(pdev, PCI_D3cold, 0); |
| 6798 | 6801 | ||
| 6799 | if (!rtnl_is_locked()) { | 6802 | if (igb_init_interrupt_scheme(adapter)) { |
| 6800 | /* | ||
| 6801 | * shut up ASSERT_RTNL() warning in | ||
| 6802 | * netif_set_real_num_tx/rx_queues. | ||
| 6803 | */ | ||
| 6804 | rtnl_lock(); | ||
| 6805 | err = igb_init_interrupt_scheme(adapter); | ||
| 6806 | rtnl_unlock(); | ||
| 6807 | } else { | ||
| 6808 | err = igb_init_interrupt_scheme(adapter); | ||
| 6809 | } | ||
| 6810 | if (err) { | ||
| 6811 | dev_err(&pdev->dev, "Unable to allocate memory for queues\n"); | 6803 | dev_err(&pdev->dev, "Unable to allocate memory for queues\n"); |
| 6812 | return -ENOMEM; | 6804 | return -ENOMEM; |
| 6813 | } | 6805 | } |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 74e192107f9a..81b155589532 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h | |||
| @@ -574,9 +574,6 @@ extern struct ixgbe_info ixgbe_82599_info; | |||
| 574 | extern struct ixgbe_info ixgbe_X540_info; | 574 | extern struct ixgbe_info ixgbe_X540_info; |
| 575 | #ifdef CONFIG_IXGBE_DCB | 575 | #ifdef CONFIG_IXGBE_DCB |
| 576 | extern const struct dcbnl_rtnl_ops dcbnl_ops; | 576 | extern const struct dcbnl_rtnl_ops dcbnl_ops; |
| 577 | extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, | ||
| 578 | struct ixgbe_dcb_config *dst_dcb_cfg, | ||
| 579 | int tc_max); | ||
| 580 | #endif | 577 | #endif |
| 581 | 578 | ||
| 582 | extern char ixgbe_driver_name[]; | 579 | extern char ixgbe_driver_name[]; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index 652e4b09546d..32e5c02ff6d0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | |||
| @@ -44,18 +44,26 @@ | |||
| 44 | #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ | 44 | #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ |
| 45 | #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ | 45 | #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ |
| 46 | 46 | ||
| 47 | int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *scfg, | 47 | static int ixgbe_copy_dcb_cfg(struct ixgbe_adapter *adapter, int tc_max) |
| 48 | struct ixgbe_dcb_config *dcfg, int tc_max) | ||
| 49 | { | 48 | { |
| 49 | struct ixgbe_dcb_config *scfg = &adapter->temp_dcb_cfg; | ||
| 50 | struct ixgbe_dcb_config *dcfg = &adapter->dcb_cfg; | ||
| 50 | struct tc_configuration *src = NULL; | 51 | struct tc_configuration *src = NULL; |
| 51 | struct tc_configuration *dst = NULL; | 52 | struct tc_configuration *dst = NULL; |
| 52 | int i, j; | 53 | int i, j; |
| 53 | int tx = DCB_TX_CONFIG; | 54 | int tx = DCB_TX_CONFIG; |
| 54 | int rx = DCB_RX_CONFIG; | 55 | int rx = DCB_RX_CONFIG; |
| 55 | int changes = 0; | 56 | int changes = 0; |
| 57 | #ifdef IXGBE_FCOE | ||
| 58 | struct dcb_app app = { | ||
| 59 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
| 60 | .protocol = ETH_P_FCOE, | ||
| 61 | }; | ||
| 62 | u8 up = dcb_getapp(adapter->netdev, &app); | ||
| 56 | 63 | ||
| 57 | if (!scfg || !dcfg) | 64 | if (up && !(up & (1 << adapter->fcoe.up))) |
| 58 | return changes; | 65 | changes |= BIT_APP_UPCHG; |
| 66 | #endif | ||
| 59 | 67 | ||
| 60 | for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { | 68 | for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { |
| 61 | src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; | 69 | src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; |
| @@ -332,28 +340,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
| 332 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 340 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
| 333 | int ret = DCB_NO_HW_CHG; | 341 | int ret = DCB_NO_HW_CHG; |
| 334 | int i; | 342 | int i; |
| 335 | #ifdef IXGBE_FCOE | ||
| 336 | struct dcb_app app = { | ||
| 337 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
| 338 | .protocol = ETH_P_FCOE, | ||
| 339 | }; | ||
| 340 | u8 up; | ||
| 341 | |||
| 342 | /* In IEEE mode, use the IEEE Ethertype selector value */ | ||
| 343 | if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) { | ||
| 344 | app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE; | ||
| 345 | up = dcb_ieee_getapp_mask(netdev, &app); | ||
| 346 | } else { | ||
| 347 | up = dcb_getapp(netdev, &app); | ||
| 348 | } | ||
| 349 | #endif | ||
| 350 | 343 | ||
| 351 | /* Fail command if not in CEE mode */ | 344 | /* Fail command if not in CEE mode */ |
| 352 | if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) | 345 | if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) |
| 353 | return ret; | 346 | return ret; |
| 354 | 347 | ||
| 355 | adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, | 348 | adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(adapter, |
| 356 | &adapter->dcb_cfg, | ||
| 357 | MAX_TRAFFIC_CLASS); | 349 | MAX_TRAFFIC_CLASS); |
| 358 | if (!adapter->dcb_set_bitmap) | 350 | if (!adapter->dcb_set_bitmap) |
| 359 | return ret; | 351 | return ret; |
| @@ -440,8 +432,13 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
| 440 | * FCoE is using changes. This happens if the APP info | 432 | * FCoE is using changes. This happens if the APP info |
| 441 | * changes or the up2tc mapping is updated. | 433 | * changes or the up2tc mapping is updated. |
| 442 | */ | 434 | */ |
| 443 | if ((up && !(up & (1 << adapter->fcoe.up))) || | 435 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { |
| 444 | (adapter->dcb_set_bitmap & BIT_APP_UPCHG)) { | 436 | struct dcb_app app = { |
| 437 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
| 438 | .protocol = ETH_P_FCOE, | ||
| 439 | }; | ||
| 440 | u8 up = dcb_getapp(netdev, &app); | ||
| 441 | |||
| 445 | adapter->fcoe.up = ffs(up) - 1; | 442 | adapter->fcoe.up = ffs(up) - 1; |
| 446 | ixgbe_dcbnl_devreset(netdev); | 443 | ixgbe_dcbnl_devreset(netdev); |
| 447 | ret = DCB_HW_CHG_RST; | 444 | ret = DCB_HW_CHG_RST; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 31a2bf76a346..cfe7d269590c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
| @@ -1780,6 +1780,8 @@ static u16 ixgbe_clean_test_rings(struct ixgbe_ring *rx_ring, | |||
| 1780 | rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); | 1780 | rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); |
| 1781 | } | 1781 | } |
| 1782 | 1782 | ||
| 1783 | netdev_tx_reset_queue(txring_txq(tx_ring)); | ||
| 1784 | |||
| 1783 | /* re-map buffers to ring, store next to clean values */ | 1785 | /* re-map buffers to ring, store next to clean values */ |
| 1784 | ixgbe_alloc_rx_buffers(rx_ring, count); | 1786 | ixgbe_alloc_rx_buffers(rx_ring, count); |
| 1785 | rx_ring->next_to_clean = rx_ntc; | 1787 | rx_ring->next_to_clean = rx_ntc; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 88f6b2e9b72d..467948e9ecd9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
| @@ -2671,8 +2671,6 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter, | |||
| 2671 | /* enable queue */ | 2671 | /* enable queue */ |
| 2672 | IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(reg_idx), txdctl); | 2672 | IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(reg_idx), txdctl); |
| 2673 | 2673 | ||
| 2674 | netdev_tx_reset_queue(txring_txq(ring)); | ||
| 2675 | |||
| 2676 | /* TXDCTL.EN will return 0 on 82598 if link is down, so skip it */ | 2674 | /* TXDCTL.EN will return 0 on 82598 if link is down, so skip it */ |
| 2677 | if (hw->mac.type == ixgbe_mac_82598EB && | 2675 | if (hw->mac.type == ixgbe_mac_82598EB && |
| 2678 | !(IXGBE_READ_REG(hw, IXGBE_LINKS) & IXGBE_LINKS_UP)) | 2676 | !(IXGBE_READ_REG(hw, IXGBE_LINKS) & IXGBE_LINKS_UP)) |
| @@ -4167,6 +4165,8 @@ static void ixgbe_clean_tx_ring(struct ixgbe_ring *tx_ring) | |||
| 4167 | ixgbe_unmap_and_free_tx_resource(tx_ring, tx_buffer_info); | 4165 | ixgbe_unmap_and_free_tx_resource(tx_ring, tx_buffer_info); |
| 4168 | } | 4166 | } |
| 4169 | 4167 | ||
| 4168 | netdev_tx_reset_queue(txring_txq(tx_ring)); | ||
| 4169 | |||
| 4170 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; | 4170 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; |
| 4171 | memset(tx_ring->tx_buffer_info, 0, size); | 4171 | memset(tx_ring->tx_buffer_info, 0, size); |
| 4172 | 4172 | ||
| @@ -4418,8 +4418,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
| 4418 | adapter->dcb_cfg.pfc_mode_enable = false; | 4418 | adapter->dcb_cfg.pfc_mode_enable = false; |
| 4419 | adapter->dcb_set_bitmap = 0x00; | 4419 | adapter->dcb_set_bitmap = 0x00; |
| 4420 | adapter->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; | 4420 | adapter->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; |
| 4421 | ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg, | 4421 | memcpy(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, |
| 4422 | MAX_TRAFFIC_CLASS); | 4422 | sizeof(adapter->temp_dcb_cfg)); |
| 4423 | 4423 | ||
| 4424 | #endif | 4424 | #endif |
| 4425 | 4425 | ||
| @@ -4866,10 +4866,12 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
| 4866 | netif_device_detach(netdev); | 4866 | netif_device_detach(netdev); |
| 4867 | 4867 | ||
| 4868 | if (netif_running(netdev)) { | 4868 | if (netif_running(netdev)) { |
| 4869 | rtnl_lock(); | ||
| 4869 | ixgbe_down(adapter); | 4870 | ixgbe_down(adapter); |
| 4870 | ixgbe_free_irq(adapter); | 4871 | ixgbe_free_irq(adapter); |
| 4871 | ixgbe_free_all_tx_resources(adapter); | 4872 | ixgbe_free_all_tx_resources(adapter); |
| 4872 | ixgbe_free_all_rx_resources(adapter); | 4873 | ixgbe_free_all_rx_resources(adapter); |
| 4874 | rtnl_unlock(); | ||
| 4873 | } | 4875 | } |
| 4874 | 4876 | ||
| 4875 | ixgbe_clear_interrupt_scheme(adapter); | 4877 | ixgbe_clear_interrupt_scheme(adapter); |
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index f8dda009d3c0..5e313e9a252f 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
| @@ -618,10 +618,8 @@ static void ks8851_irq_work(struct work_struct *work) | |||
| 618 | netif_dbg(ks, intr, ks->netdev, | 618 | netif_dbg(ks, intr, ks->netdev, |
| 619 | "%s: status 0x%04x\n", __func__, status); | 619 | "%s: status 0x%04x\n", __func__, status); |
| 620 | 620 | ||
| 621 | if (status & IRQ_LCI) { | 621 | if (status & IRQ_LCI) |
| 622 | /* should do something about checking link status */ | ||
| 623 | handled |= IRQ_LCI; | 622 | handled |= IRQ_LCI; |
| 624 | } | ||
| 625 | 623 | ||
| 626 | if (status & IRQ_LDI) { | 624 | if (status & IRQ_LDI) { |
| 627 | u16 pmecr = ks8851_rdreg16(ks, KS_PMECR); | 625 | u16 pmecr = ks8851_rdreg16(ks, KS_PMECR); |
| @@ -684,6 +682,9 @@ static void ks8851_irq_work(struct work_struct *work) | |||
| 684 | 682 | ||
| 685 | mutex_unlock(&ks->lock); | 683 | mutex_unlock(&ks->lock); |
| 686 | 684 | ||
| 685 | if (status & IRQ_LCI) | ||
| 686 | mii_check_link(&ks->mii); | ||
| 687 | |||
| 687 | if (status & IRQ_TXI) | 688 | if (status & IRQ_TXI) |
| 688 | netif_wake_queue(ks->netdev); | 689 | netif_wake_queue(ks->netdev); |
| 689 | 690 | ||
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index f54509377efa..ce6b44d1f252 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
| @@ -61,8 +61,12 @@ | |||
| 61 | #define R8169_MSG_DEFAULT \ | 61 | #define R8169_MSG_DEFAULT \ |
| 62 | (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN) | 62 | (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN) |
| 63 | 63 | ||
| 64 | #define TX_BUFFS_AVAIL(tp) \ | 64 | #define TX_SLOTS_AVAIL(tp) \ |
| 65 | (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx - 1) | 65 | (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx) |
| 66 | |||
| 67 | /* A skbuff with nr_frags needs nr_frags+1 entries in the tx queue */ | ||
| 68 | #define TX_FRAGS_READY_FOR(tp,nr_frags) \ | ||
| 69 | (TX_SLOTS_AVAIL(tp) >= (nr_frags + 1)) | ||
| 66 | 70 | ||
| 67 | /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). | 71 | /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). |
| 68 | The RTL chips use a 64 element hash table based on the Ethernet CRC. */ | 72 | The RTL chips use a 64 element hash table based on the Ethernet CRC. */ |
| @@ -5115,7 +5119,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, | |||
| 5115 | u32 opts[2]; | 5119 | u32 opts[2]; |
| 5116 | int frags; | 5120 | int frags; |
| 5117 | 5121 | ||
| 5118 | if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) { | 5122 | if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) { |
| 5119 | netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n"); | 5123 | netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n"); |
| 5120 | goto err_stop_0; | 5124 | goto err_stop_0; |
| 5121 | } | 5125 | } |
| @@ -5169,7 +5173,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, | |||
| 5169 | 5173 | ||
| 5170 | mmiowb(); | 5174 | mmiowb(); |
| 5171 | 5175 | ||
| 5172 | if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) { | 5176 | if (!TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) { |
| 5173 | /* Avoid wrongly optimistic queue wake-up: rtl_tx thread must | 5177 | /* Avoid wrongly optimistic queue wake-up: rtl_tx thread must |
| 5174 | * not miss a ring update when it notices a stopped queue. | 5178 | * not miss a ring update when it notices a stopped queue. |
| 5175 | */ | 5179 | */ |
| @@ -5183,7 +5187,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, | |||
| 5183 | * can't. | 5187 | * can't. |
| 5184 | */ | 5188 | */ |
| 5185 | smp_mb(); | 5189 | smp_mb(); |
| 5186 | if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS) | 5190 | if (TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) |
| 5187 | netif_wake_queue(dev); | 5191 | netif_wake_queue(dev); |
| 5188 | } | 5192 | } |
| 5189 | 5193 | ||
| @@ -5306,7 +5310,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) | |||
| 5306 | */ | 5310 | */ |
| 5307 | smp_mb(); | 5311 | smp_mb(); |
| 5308 | if (netif_queue_stopped(dev) && | 5312 | if (netif_queue_stopped(dev) && |
| 5309 | (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { | 5313 | TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) { |
| 5310 | netif_wake_queue(dev); | 5314 | netif_wake_queue(dev); |
| 5311 | } | 5315 | } |
| 5312 | /* | 5316 | /* |
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 3cbfbffe3f00..4a0005342e65 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c | |||
| @@ -1349,7 +1349,7 @@ static int efx_probe_interrupts(struct efx_nic *efx) | |||
| 1349 | } | 1349 | } |
| 1350 | 1350 | ||
| 1351 | /* RSS might be usable on VFs even if it is disabled on the PF */ | 1351 | /* RSS might be usable on VFs even if it is disabled on the PF */ |
| 1352 | efx->rss_spread = (efx->n_rx_channels > 1 ? | 1352 | efx->rss_spread = ((efx->n_rx_channels > 1 || !efx_sriov_wanted(efx)) ? |
| 1353 | efx->n_rx_channels : efx_vf_size(efx)); | 1353 | efx->n_rx_channels : efx_vf_size(efx)); |
| 1354 | 1354 | ||
| 1355 | return 0; | 1355 | return 0; |
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index f975afdc315c..025367a94add 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
| @@ -259,7 +259,7 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 259 | 259 | ||
| 260 | xmit_world: | 260 | xmit_world: |
| 261 | skb->ip_summed = ip_summed; | 261 | skb->ip_summed = ip_summed; |
| 262 | skb_set_dev(skb, vlan->lowerdev); | 262 | skb->dev = vlan->lowerdev; |
| 263 | return dev_queue_xmit(skb); | 263 | return dev_queue_xmit(skb); |
| 264 | } | 264 | } |
| 265 | 265 | ||
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 0427c6561c84..cb8fd5069dbe 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include <linux/etherdevice.h> | 1 | #include <linux/etherdevice.h> |
| 2 | #include <linux/if_macvlan.h> | 2 | #include <linux/if_macvlan.h> |
| 3 | #include <linux/if_vlan.h> | ||
| 3 | #include <linux/interrupt.h> | 4 | #include <linux/interrupt.h> |
| 4 | #include <linux/nsproxy.h> | 5 | #include <linux/nsproxy.h> |
| 5 | #include <linux/compat.h> | 6 | #include <linux/compat.h> |
| @@ -759,6 +760,8 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q, | |||
| 759 | struct macvlan_dev *vlan; | 760 | struct macvlan_dev *vlan; |
| 760 | int ret; | 761 | int ret; |
| 761 | int vnet_hdr_len = 0; | 762 | int vnet_hdr_len = 0; |
| 763 | int vlan_offset = 0; | ||
| 764 | int copied; | ||
| 762 | 765 | ||
| 763 | if (q->flags & IFF_VNET_HDR) { | 766 | if (q->flags & IFF_VNET_HDR) { |
| 764 | struct virtio_net_hdr vnet_hdr; | 767 | struct virtio_net_hdr vnet_hdr; |
| @@ -773,18 +776,48 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q, | |||
| 773 | if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr))) | 776 | if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr))) |
| 774 | return -EFAULT; | 777 | return -EFAULT; |
| 775 | } | 778 | } |
| 779 | copied = vnet_hdr_len; | ||
| 780 | |||
| 781 | if (!vlan_tx_tag_present(skb)) | ||
| 782 | len = min_t(int, skb->len, len); | ||
| 783 | else { | ||
| 784 | int copy; | ||
| 785 | struct { | ||
| 786 | __be16 h_vlan_proto; | ||
| 787 | __be16 h_vlan_TCI; | ||
| 788 | } veth; | ||
| 789 | veth.h_vlan_proto = htons(ETH_P_8021Q); | ||
| 790 | veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb)); | ||
| 791 | |||
| 792 | vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto); | ||
| 793 | len = min_t(int, skb->len + VLAN_HLEN, len); | ||
| 794 | |||
| 795 | copy = min_t(int, vlan_offset, len); | ||
| 796 | ret = skb_copy_datagram_const_iovec(skb, 0, iv, copied, copy); | ||
| 797 | len -= copy; | ||
| 798 | copied += copy; | ||
| 799 | if (ret || !len) | ||
| 800 | goto done; | ||
| 801 | |||
| 802 | copy = min_t(int, sizeof(veth), len); | ||
| 803 | ret = memcpy_toiovecend(iv, (void *)&veth, copied, copy); | ||
| 804 | len -= copy; | ||
| 805 | copied += copy; | ||
| 806 | if (ret || !len) | ||
| 807 | goto done; | ||
| 808 | } | ||
| 776 | 809 | ||
| 777 | len = min_t(int, skb->len, len); | 810 | ret = skb_copy_datagram_const_iovec(skb, vlan_offset, iv, copied, len); |
| 778 | 811 | copied += len; | |
| 779 | ret = skb_copy_datagram_const_iovec(skb, 0, iv, vnet_hdr_len, len); | ||
| 780 | 812 | ||
| 813 | done: | ||
| 781 | rcu_read_lock_bh(); | 814 | rcu_read_lock_bh(); |
| 782 | vlan = rcu_dereference_bh(q->vlan); | 815 | vlan = rcu_dereference_bh(q->vlan); |
| 783 | if (vlan) | 816 | if (vlan) |
| 784 | macvlan_count_rx(vlan, len, ret == 0, 0); | 817 | macvlan_count_rx(vlan, copied - vnet_hdr_len, ret == 0, 0); |
| 785 | rcu_read_unlock_bh(); | 818 | rcu_read_unlock_bh(); |
| 786 | 819 | ||
| 787 | return ret ? ret : (len + vnet_hdr_len); | 820 | return ret ? ret : copied; |
| 788 | } | 821 | } |
| 789 | 822 | ||
| 790 | static ssize_t macvtap_do_read(struct macvtap_queue *q, struct kiocb *iocb, | 823 | static ssize_t macvtap_do_read(struct macvtap_queue *q, struct kiocb *iocb, |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 90a30026a931..00880edba048 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -83,6 +83,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 83 | struct cdc_state *info = (void *) &dev->data; | 83 | struct cdc_state *info = (void *) &dev->data; |
| 84 | int status; | 84 | int status; |
| 85 | int rndis; | 85 | int rndis; |
| 86 | bool android_rndis_quirk = false; | ||
| 86 | struct usb_driver *driver = driver_of(intf); | 87 | struct usb_driver *driver = driver_of(intf); |
| 87 | struct usb_cdc_mdlm_desc *desc = NULL; | 88 | struct usb_cdc_mdlm_desc *desc = NULL; |
| 88 | struct usb_cdc_mdlm_detail_desc *detail = NULL; | 89 | struct usb_cdc_mdlm_detail_desc *detail = NULL; |
| @@ -195,6 +196,11 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 195 | info->control, | 196 | info->control, |
| 196 | info->u->bSlaveInterface0, | 197 | info->u->bSlaveInterface0, |
| 197 | info->data); | 198 | info->data); |
| 199 | /* fall back to hard-wiring for RNDIS */ | ||
| 200 | if (rndis) { | ||
| 201 | android_rndis_quirk = true; | ||
| 202 | goto next_desc; | ||
| 203 | } | ||
| 198 | goto bad_desc; | 204 | goto bad_desc; |
| 199 | } | 205 | } |
| 200 | if (info->control != intf) { | 206 | if (info->control != intf) { |
| @@ -271,11 +277,15 @@ next_desc: | |||
| 271 | /* Microsoft ActiveSync based and some regular RNDIS devices lack the | 277 | /* Microsoft ActiveSync based and some regular RNDIS devices lack the |
| 272 | * CDC descriptors, so we'll hard-wire the interfaces and not check | 278 | * CDC descriptors, so we'll hard-wire the interfaces and not check |
| 273 | * for descriptors. | 279 | * for descriptors. |
| 280 | * | ||
| 281 | * Some Android RNDIS devices have a CDC Union descriptor pointing | ||
| 282 | * to non-existing interfaces. Ignore that and attempt the same | ||
| 283 | * hard-wired 0 and 1 interfaces. | ||
| 274 | */ | 284 | */ |
| 275 | if (rndis && !info->u) { | 285 | if (rndis && (!info->u || android_rndis_quirk)) { |
| 276 | info->control = usb_ifnum_to_if(dev->udev, 0); | 286 | info->control = usb_ifnum_to_if(dev->udev, 0); |
| 277 | info->data = usb_ifnum_to_if(dev->udev, 1); | 287 | info->data = usb_ifnum_to_if(dev->udev, 1); |
| 278 | if (!info->control || !info->data) { | 288 | if (!info->control || !info->data || info->control != intf) { |
| 279 | dev_dbg(&intf->dev, | 289 | dev_dbg(&intf->dev, |
| 280 | "rndis: master #0/%p slave #1/%p\n", | 290 | "rndis: master #0/%p slave #1/%p\n", |
| 281 | info->control, | 291 | info->control, |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index deb6cfb2959a..600aca9fe6b1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
| @@ -373,7 +373,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
| 373 | else | 373 | else |
| 374 | spur_subchannel_sd = 0; | 374 | spur_subchannel_sd = 0; |
| 375 | 375 | ||
| 376 | spur_freq_sd = (freq_offset << 9) / 11; | 376 | spur_freq_sd = ((freq_offset + 10) << 9) / 11; |
| 377 | 377 | ||
| 378 | } else { | 378 | } else { |
| 379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, | 379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, |
| @@ -382,7 +382,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
| 382 | else | 382 | else |
| 383 | spur_subchannel_sd = 1; | 383 | spur_subchannel_sd = 1; |
| 384 | 384 | ||
| 385 | spur_freq_sd = (freq_offset << 9) / 11; | 385 | spur_freq_sd = ((freq_offset - 10) << 9) / 11; |
| 386 | 386 | ||
| 387 | } | 387 | } |
| 388 | 388 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index eb3829b03cd3..e2b34e1563f4 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
| @@ -2637,6 +2637,7 @@ static int brcmf_sdbrcm_dpc_thread(void *data) | |||
| 2637 | /* after stopping the bus, exit thread */ | 2637 | /* after stopping the bus, exit thread */ |
| 2638 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); | 2638 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); |
| 2639 | bus->dpc_tsk = NULL; | 2639 | bus->dpc_tsk = NULL; |
| 2640 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); | ||
| 2640 | break; | 2641 | break; |
| 2641 | } | 2642 | } |
| 2642 | 2643 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index f4b84d1596e3..22474608a70b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
| @@ -773,8 +773,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
| 773 | struct sk_buff *skb; | 773 | struct sk_buff *skb; |
| 774 | __le16 fc = hdr->frame_control; | 774 | __le16 fc = hdr->frame_control; |
| 775 | struct iwl_rxon_context *ctx; | 775 | struct iwl_rxon_context *ctx; |
| 776 | struct page *p; | 776 | unsigned int hdrlen, fraglen; |
| 777 | int offset; | ||
| 778 | 777 | ||
| 779 | /* We only process data packets if the interface is open */ | 778 | /* We only process data packets if the interface is open */ |
| 780 | if (unlikely(!priv->is_open)) { | 779 | if (unlikely(!priv->is_open)) { |
| @@ -788,16 +787,24 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
| 788 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) | 787 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) |
| 789 | return; | 788 | return; |
| 790 | 789 | ||
| 791 | skb = dev_alloc_skb(128); | 790 | /* Dont use dev_alloc_skb(), we'll have enough headroom once |
| 791 | * ieee80211_hdr pulled. | ||
| 792 | */ | ||
| 793 | skb = alloc_skb(128, GFP_ATOMIC); | ||
| 792 | if (!skb) { | 794 | if (!skb) { |
| 793 | IWL_ERR(priv, "dev_alloc_skb failed\n"); | 795 | IWL_ERR(priv, "alloc_skb failed\n"); |
| 794 | return; | 796 | return; |
| 795 | } | 797 | } |
| 798 | hdrlen = min_t(unsigned int, len, skb_tailroom(skb)); | ||
| 799 | memcpy(skb_put(skb, hdrlen), hdr, hdrlen); | ||
| 800 | fraglen = len - hdrlen; | ||
| 796 | 801 | ||
| 797 | offset = (void *)hdr - rxb_addr(rxb); | 802 | if (fraglen) { |
| 798 | p = rxb_steal_page(rxb); | 803 | int offset = (void *)hdr + hdrlen - rxb_addr(rxb); |
| 799 | skb_add_rx_frag(skb, 0, p, offset, len, len); | ||
| 800 | 804 | ||
| 805 | skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset, | ||
| 806 | fraglen, rxb->truesize); | ||
| 807 | } | ||
| 801 | iwl_update_stats(priv, false, fc, len); | 808 | iwl_update_stats(priv, false, fc, len); |
| 802 | 809 | ||
| 803 | /* | 810 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c index 8b1a7988e176..aa7aea168138 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | |||
| @@ -374,8 +374,9 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
| 374 | if (WARN_ON(!rxb)) | 374 | if (WARN_ON(!rxb)) |
| 375 | return; | 375 | return; |
| 376 | 376 | ||
| 377 | rxcb.truesize = PAGE_SIZE << hw_params(trans).rx_page_order; | ||
| 377 | dma_unmap_page(trans->dev, rxb->page_dma, | 378 | dma_unmap_page(trans->dev, rxb->page_dma, |
| 378 | PAGE_SIZE << hw_params(trans).rx_page_order, | 379 | rxcb.truesize, |
| 379 | DMA_FROM_DEVICE); | 380 | DMA_FROM_DEVICE); |
| 380 | 381 | ||
| 381 | rxcb._page = rxb->page; | 382 | rxcb._page = rxb->page; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 0c81cbaa8088..fdf97886a5e4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
| @@ -260,6 +260,7 @@ static inline void iwl_free_resp(struct iwl_host_cmd *cmd) | |||
| 260 | 260 | ||
| 261 | struct iwl_rx_cmd_buffer { | 261 | struct iwl_rx_cmd_buffer { |
| 262 | struct page *_page; | 262 | struct page *_page; |
| 263 | unsigned int truesize; | ||
| 263 | }; | 264 | }; |
| 264 | 265 | ||
| 265 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) | 266 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 8644d5372e7f..42cfcd9eb9aa 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #include <asm/ropes.h> | 44 | #include <asm/ropes.h> |
| 45 | #include <asm/mckinley.h> /* for proc_mckinley_root */ | 45 | #include <asm/mckinley.h> /* for proc_mckinley_root */ |
| 46 | #include <asm/runway.h> /* for proc_runway_root */ | 46 | #include <asm/runway.h> /* for proc_runway_root */ |
| 47 | #include <asm/page.h> /* for PAGE0 */ | ||
| 47 | #include <asm/pdc.h> /* for PDC_MODEL_* */ | 48 | #include <asm/pdc.h> /* for PDC_MODEL_* */ |
| 48 | #include <asm/pdcpat.h> /* for is_pdc_pat() */ | 49 | #include <asm/pdcpat.h> /* for is_pdc_pat() */ |
| 49 | #include <asm/parisc-device.h> | 50 | #include <asm/parisc-device.h> |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e70dd382a009..046fb1bd8619 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -1431,7 +1431,10 @@ void devm_regulator_put(struct regulator *regulator) | |||
| 1431 | 1431 | ||
| 1432 | rc = devres_destroy(regulator->dev, devm_regulator_release, | 1432 | rc = devres_destroy(regulator->dev, devm_regulator_release, |
| 1433 | devm_regulator_match, regulator); | 1433 | devm_regulator_match, regulator); |
| 1434 | WARN_ON(rc); | 1434 | if (rc == 0) |
| 1435 | regulator_put(regulator); | ||
| 1436 | else | ||
| 1437 | WARN_ON(rc); | ||
| 1435 | } | 1438 | } |
| 1436 | EXPORT_SYMBOL_GPL(devm_regulator_put); | 1439 | EXPORT_SYMBOL_GPL(devm_regulator_put); |
| 1437 | 1440 | ||
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 96579296f04d..17a58c56eebf 100644 --- a/drivers/regulator/max8997.c +++ b/drivers/regulator/max8997.c | |||
| @@ -684,7 +684,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, | |||
| 684 | } | 684 | } |
| 685 | 685 | ||
| 686 | new_val++; | 686 | new_val++; |
| 687 | } while (desc->min + desc->step + new_val <= desc->max); | 687 | } while (desc->min + desc->step * new_val <= desc->max); |
| 688 | 688 | ||
| 689 | new_idx = tmp_idx; | 689 | new_idx = tmp_idx; |
| 690 | new_val = tmp_val; | 690 | new_val = tmp_val; |
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 351dc0b86fab..a3a056a9db67 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
| @@ -218,6 +218,9 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev, | |||
| 218 | 218 | ||
| 219 | if (!shost->shost_gendev.parent) | 219 | if (!shost->shost_gendev.parent) |
| 220 | shost->shost_gendev.parent = dev ? dev : &platform_bus; | 220 | shost->shost_gendev.parent = dev ? dev : &platform_bus; |
| 221 | if (!dma_dev) | ||
| 222 | dma_dev = shost->shost_gendev.parent; | ||
| 223 | |||
| 221 | shost->dma_dev = dma_dev; | 224 | shost->dma_dev = dma_dev; |
| 222 | 225 | ||
| 223 | error = device_add(&shost->shost_gendev); | 226 | error = device_add(&shost->shost_gendev); |
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index f74cc0602f3b..bc3cc6d91117 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
| @@ -1367,6 +1367,9 @@ qla2x00_read_optrom(struct fc_bsg_job *bsg_job) | |||
| 1367 | struct qla_hw_data *ha = vha->hw; | 1367 | struct qla_hw_data *ha = vha->hw; |
| 1368 | int rval = 0; | 1368 | int rval = 0; |
| 1369 | 1369 | ||
| 1370 | if (ha->flags.isp82xx_reset_hdlr_active) | ||
| 1371 | return -EBUSY; | ||
| 1372 | |||
| 1370 | rval = qla2x00_optrom_setup(bsg_job, vha, 0); | 1373 | rval = qla2x00_optrom_setup(bsg_job, vha, 0); |
| 1371 | if (rval) | 1374 | if (rval) |
| 1372 | return rval; | 1375 | return rval; |
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 897731b93df2..62324a1d5573 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * | Mailbox commands | 0x113e | 0x112c-0x112e | | 15 | * | Mailbox commands | 0x113e | 0x112c-0x112e | |
| 16 | * | | | 0x113a | | 16 | * | | | 0x113a | |
| 17 | * | Device Discovery | 0x2086 | 0x2020-0x2022 | | 17 | * | Device Discovery | 0x2086 | 0x2020-0x2022 | |
| 18 | * | Queue Command and IO tracing | 0x302f | 0x3006,0x3008 | | 18 | * | Queue Command and IO tracing | 0x3030 | 0x3006,0x3008 | |
| 19 | * | | | 0x302d-0x302e | | 19 | * | | | 0x302d-0x302e | |
| 20 | * | DPC Thread | 0x401c | | | 20 | * | DPC Thread | 0x401c | | |
| 21 | * | Async Events | 0x505d | 0x502b-0x502f | | 21 | * | Async Events | 0x505d | 0x502b-0x502f | |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index f79844ce7122..ce42288049b5 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
| @@ -1715,13 +1715,24 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) | |||
| 1715 | res = DID_ERROR << 16; | 1715 | res = DID_ERROR << 16; |
| 1716 | break; | 1716 | break; |
| 1717 | } | 1717 | } |
| 1718 | } else { | 1718 | } else if (lscsi_status != SAM_STAT_TASK_SET_FULL && |
| 1719 | lscsi_status != SAM_STAT_BUSY) { | ||
| 1720 | /* | ||
| 1721 | * scsi status of task set and busy are considered to be | ||
| 1722 | * task not completed. | ||
| 1723 | */ | ||
| 1724 | |||
| 1719 | ql_dbg(ql_dbg_io, fcport->vha, 0x301f, | 1725 | ql_dbg(ql_dbg_io, fcport->vha, 0x301f, |
| 1720 | "Dropped frame(s) detected (0x%x " | 1726 | "Dropped frame(s) detected (0x%x " |
| 1721 | "of 0x%x bytes).\n", resid, scsi_bufflen(cp)); | 1727 | "of 0x%x bytes).\n", resid, |
| 1728 | scsi_bufflen(cp)); | ||
| 1722 | 1729 | ||
| 1723 | res = DID_ERROR << 16 | lscsi_status; | 1730 | res = DID_ERROR << 16 | lscsi_status; |
| 1724 | goto check_scsi_status; | 1731 | goto check_scsi_status; |
| 1732 | } else { | ||
| 1733 | ql_dbg(ql_dbg_io, fcport->vha, 0x3030, | ||
| 1734 | "scsi_status: 0x%x, lscsi_status: 0x%x\n", | ||
| 1735 | scsi_status, lscsi_status); | ||
| 1725 | } | 1736 | } |
| 1726 | 1737 | ||
| 1727 | res = DID_OK << 16 | lscsi_status; | 1738 | res = DID_OK << 16 | lscsi_status; |
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index f0528539bbbc..de722a933438 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
| @@ -3125,6 +3125,7 @@ qla82xx_need_reset_handler(scsi_qla_host_t *vha) | |||
| 3125 | ql_log(ql_log_info, vha, 0x00b7, | 3125 | ql_log(ql_log_info, vha, 0x00b7, |
| 3126 | "HW State: COLD/RE-INIT.\n"); | 3126 | "HW State: COLD/RE-INIT.\n"); |
| 3127 | qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA82XX_DEV_COLD); | 3127 | qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA82XX_DEV_COLD); |
| 3128 | qla82xx_set_rst_ready(ha); | ||
| 3128 | if (ql2xmdenable) { | 3129 | if (ql2xmdenable) { |
| 3129 | if (qla82xx_md_collect(vha)) | 3130 | if (qla82xx_md_collect(vha)) |
| 3130 | ql_log(ql_log_warn, vha, 0xb02c, | 3131 | ql_log(ql_log_warn, vha, 0xb02c, |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index a2f999273a5f..7db803377c64 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
| @@ -3577,9 +3577,25 @@ void qla2x00_relogin(struct scsi_qla_host *vha) | |||
| 3577 | continue; | 3577 | continue; |
| 3578 | /* Attempt a retry. */ | 3578 | /* Attempt a retry. */ |
| 3579 | status = 1; | 3579 | status = 1; |
| 3580 | } else | 3580 | } else { |
| 3581 | status = qla2x00_fabric_login(vha, | 3581 | status = qla2x00_fabric_login(vha, |
| 3582 | fcport, &next_loopid); | 3582 | fcport, &next_loopid); |
| 3583 | if (status == QLA_SUCCESS) { | ||
| 3584 | int status2; | ||
| 3585 | uint8_t opts; | ||
| 3586 | |||
| 3587 | opts = 0; | ||
| 3588 | if (fcport->flags & | ||
| 3589 | FCF_FCP2_DEVICE) | ||
| 3590 | opts |= BIT_1; | ||
| 3591 | status2 = | ||
| 3592 | qla2x00_get_port_database( | ||
| 3593 | vha, fcport, | ||
| 3594 | opts); | ||
| 3595 | if (status2 != QLA_SUCCESS) | ||
| 3596 | status = 1; | ||
| 3597 | } | ||
| 3598 | } | ||
| 3583 | } else | 3599 | } else |
| 3584 | status = qla2x00_local_device_login(vha, | 3600 | status = qla2x00_local_device_login(vha, |
| 3585 | fcport); | 3601 | fcport); |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 3c13c0a6be63..a683e766d1ae 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
| @@ -1017,6 +1017,9 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) | |||
| 1017 | !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) | 1017 | !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) |
| 1018 | return; | 1018 | return; |
| 1019 | 1019 | ||
| 1020 | if (ha->flags.isp82xx_reset_hdlr_active) | ||
| 1021 | return; | ||
| 1022 | |||
| 1020 | ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr, | 1023 | ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr, |
| 1021 | ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header)); | 1024 | ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header)); |
| 1022 | if (hdr.version == __constant_cpu_to_le16(0xffff)) | 1025 | if (hdr.version == __constant_cpu_to_le16(0xffff)) |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 29d780c38040..f5fdb16bec9b 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | /* | 7 | /* |
| 8 | * Driver version | 8 | * Driver version |
| 9 | */ | 9 | */ |
| 10 | #define QLA2XXX_VERSION "8.03.07.13-k" | 10 | #define QLA2XXX_VERSION "8.04.00.03-k" |
| 11 | 11 | ||
| 12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
| 13 | #define QLA_DRIVER_MINOR_VER 3 | 13 | #define QLA_DRIVER_MINOR_VER 4 |
| 14 | #define QLA_DRIVER_PATCH_VER 7 | 14 | #define QLA_DRIVER_PATCH_VER 0 |
| 15 | #define QLA_DRIVER_BETA_VER 3 | 15 | #define QLA_DRIVER_BETA_VER 3 |
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index efccd72c4a3e..1b3843117268 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
| @@ -175,7 +175,8 @@ static void virtscsi_complete_free(void *buf) | |||
| 175 | 175 | ||
| 176 | if (cmd->comp) | 176 | if (cmd->comp) |
| 177 | complete_all(cmd->comp); | 177 | complete_all(cmd->comp); |
| 178 | mempool_free(cmd, virtscsi_cmd_pool); | 178 | else |
| 179 | mempool_free(cmd, virtscsi_cmd_pool); | ||
| 179 | } | 180 | } |
| 180 | 181 | ||
| 181 | static void virtscsi_ctrl_done(struct virtqueue *vq) | 182 | static void virtscsi_ctrl_done(struct virtqueue *vq) |
| @@ -311,21 +312,22 @@ out: | |||
| 311 | static int virtscsi_tmf(struct virtio_scsi *vscsi, struct virtio_scsi_cmd *cmd) | 312 | static int virtscsi_tmf(struct virtio_scsi *vscsi, struct virtio_scsi_cmd *cmd) |
| 312 | { | 313 | { |
| 313 | DECLARE_COMPLETION_ONSTACK(comp); | 314 | DECLARE_COMPLETION_ONSTACK(comp); |
| 314 | int ret; | 315 | int ret = FAILED; |
| 315 | 316 | ||
| 316 | cmd->comp = ∁ | 317 | cmd->comp = ∁ |
| 317 | ret = virtscsi_kick_cmd(vscsi, vscsi->ctrl_vq, cmd, | 318 | if (virtscsi_kick_cmd(vscsi, vscsi->ctrl_vq, cmd, |
| 318 | sizeof cmd->req.tmf, sizeof cmd->resp.tmf, | 319 | sizeof cmd->req.tmf, sizeof cmd->resp.tmf, |
| 319 | GFP_NOIO); | 320 | GFP_NOIO) < 0) |
| 320 | if (ret < 0) | 321 | goto out; |
| 321 | return FAILED; | ||
| 322 | 322 | ||
| 323 | wait_for_completion(&comp); | 323 | wait_for_completion(&comp); |
| 324 | if (cmd->resp.tmf.response != VIRTIO_SCSI_S_OK && | 324 | if (cmd->resp.tmf.response == VIRTIO_SCSI_S_OK || |
| 325 | cmd->resp.tmf.response != VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) | 325 | cmd->resp.tmf.response == VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) |
| 326 | return FAILED; | 326 | ret = SUCCESS; |
| 327 | 327 | ||
| 328 | return SUCCESS; | 328 | out: |
| 329 | mempool_free(cmd, virtscsi_cmd_pool); | ||
| 330 | return ret; | ||
| 329 | } | 331 | } |
| 330 | 332 | ||
| 331 | static int virtscsi_device_reset(struct scsi_cmnd *sc) | 333 | static int virtscsi_device_reset(struct scsi_cmnd *sc) |
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 70c3ffb981e7..e320ec24aa1b 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c | |||
| @@ -60,7 +60,6 @@ static void core_clear_initiator_node_from_tpg( | |||
| 60 | int i; | 60 | int i; |
| 61 | struct se_dev_entry *deve; | 61 | struct se_dev_entry *deve; |
| 62 | struct se_lun *lun; | 62 | struct se_lun *lun; |
| 63 | struct se_lun_acl *acl, *acl_tmp; | ||
| 64 | 63 | ||
| 65 | spin_lock_irq(&nacl->device_list_lock); | 64 | spin_lock_irq(&nacl->device_list_lock); |
| 66 | for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { | 65 | for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { |
| @@ -81,28 +80,7 @@ static void core_clear_initiator_node_from_tpg( | |||
| 81 | core_update_device_list_for_node(lun, NULL, deve->mapped_lun, | 80 | core_update_device_list_for_node(lun, NULL, deve->mapped_lun, |
| 82 | TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); | 81 | TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); |
| 83 | 82 | ||
| 84 | spin_lock(&lun->lun_acl_lock); | ||
| 85 | list_for_each_entry_safe(acl, acl_tmp, | ||
| 86 | &lun->lun_acl_list, lacl_list) { | ||
| 87 | if (!strcmp(acl->initiatorname, nacl->initiatorname) && | ||
| 88 | (acl->mapped_lun == deve->mapped_lun)) | ||
| 89 | break; | ||
| 90 | } | ||
| 91 | |||
| 92 | if (!acl) { | ||
| 93 | pr_err("Unable to locate struct se_lun_acl for %s," | ||
| 94 | " mapped_lun: %u\n", nacl->initiatorname, | ||
| 95 | deve->mapped_lun); | ||
| 96 | spin_unlock(&lun->lun_acl_lock); | ||
| 97 | spin_lock_irq(&nacl->device_list_lock); | ||
| 98 | continue; | ||
| 99 | } | ||
| 100 | |||
| 101 | list_del(&acl->lacl_list); | ||
| 102 | spin_unlock(&lun->lun_acl_lock); | ||
| 103 | |||
| 104 | spin_lock_irq(&nacl->device_list_lock); | 83 | spin_lock_irq(&nacl->device_list_lock); |
| 105 | kfree(acl); | ||
| 106 | } | 84 | } |
| 107 | spin_unlock_irq(&nacl->device_list_lock); | 85 | spin_unlock_irq(&nacl->device_list_lock); |
| 108 | } | 86 | } |
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 1f21d2a1e528..5c170100de9c 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/if_arp.h> | 24 | #include <linux/if_arp.h> |
| 25 | #include <linux/if_tun.h> | 25 | #include <linux/if_tun.h> |
| 26 | #include <linux/if_macvlan.h> | 26 | #include <linux/if_macvlan.h> |
| 27 | #include <linux/if_vlan.h> | ||
| 27 | 28 | ||
| 28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
| 29 | 30 | ||
| @@ -283,8 +284,12 @@ static int peek_head_len(struct sock *sk) | |||
| 283 | 284 | ||
| 284 | spin_lock_irqsave(&sk->sk_receive_queue.lock, flags); | 285 | spin_lock_irqsave(&sk->sk_receive_queue.lock, flags); |
| 285 | head = skb_peek(&sk->sk_receive_queue); | 286 | head = skb_peek(&sk->sk_receive_queue); |
| 286 | if (likely(head)) | 287 | if (likely(head)) { |
| 287 | len = head->len; | 288 | len = head->len; |
| 289 | if (vlan_tx_tag_present(head)) | ||
| 290 | len += VLAN_HLEN; | ||
| 291 | } | ||
| 292 | |||
| 288 | spin_unlock_irqrestore(&sk->sk_receive_queue.lock, flags); | 293 | spin_unlock_irqrestore(&sk->sk_receive_queue.lock, flags); |
| 289 | return len; | 294 | return len; |
| 290 | } | 295 | } |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 6468a297e341..39571f9e0162 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
| @@ -22,7 +22,9 @@ | |||
| 22 | #include <linux/font.h> | 22 | #include <linux/font.h> |
| 23 | 23 | ||
| 24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
| 25 | #include <asm/page.h> | ||
| 25 | #include <asm/parisc-device.h> | 26 | #include <asm/parisc-device.h> |
| 27 | #include <asm/pdc.h> | ||
| 26 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
| 27 | #include <asm/grfioctl.h> | 29 | #include <asm/grfioctl.h> |
| 28 | 30 | ||
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 26e83d7fdd6f..b0e2a4261afe 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
| @@ -73,7 +73,7 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns | |||
| 73 | struct uvesafb_task *utask; | 73 | struct uvesafb_task *utask; |
| 74 | struct uvesafb_ktask *task; | 74 | struct uvesafb_ktask *task; |
| 75 | 75 | ||
| 76 | if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) | 76 | if (!capable(CAP_SYS_ADMIN)) |
| 77 | return; | 77 | return; |
| 78 | 78 | ||
| 79 | if (msg->seq >= UVESAFB_TASKS_MAX) | 79 | if (msg->seq >= UVESAFB_TASKS_MAX) |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index cb4529c40d74..b7f5173ff9e9 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
| @@ -365,7 +365,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, | |||
| 365 | struct fb_info *fb_info; | 365 | struct fb_info *fb_info; |
| 366 | int fb_size; | 366 | int fb_size; |
| 367 | int val; | 367 | int val; |
| 368 | int ret; | 368 | int ret = 0; |
| 369 | 369 | ||
| 370 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 370 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
| 371 | if (info == NULL) { | 371 | if (info == NULL) { |
| @@ -458,26 +458,31 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, | |||
| 458 | xenfb_init_shared_page(info, fb_info); | 458 | xenfb_init_shared_page(info, fb_info); |
| 459 | 459 | ||
| 460 | ret = xenfb_connect_backend(dev, info); | 460 | ret = xenfb_connect_backend(dev, info); |
| 461 | if (ret < 0) | 461 | if (ret < 0) { |
| 462 | goto error; | 462 | xenbus_dev_fatal(dev, ret, "xenfb_connect_backend"); |
| 463 | goto error_fb; | ||
| 464 | } | ||
| 463 | 465 | ||
| 464 | ret = register_framebuffer(fb_info); | 466 | ret = register_framebuffer(fb_info); |
| 465 | if (ret) { | 467 | if (ret) { |
| 466 | fb_deferred_io_cleanup(fb_info); | ||
| 467 | fb_dealloc_cmap(&fb_info->cmap); | ||
| 468 | framebuffer_release(fb_info); | ||
| 469 | xenbus_dev_fatal(dev, ret, "register_framebuffer"); | 468 | xenbus_dev_fatal(dev, ret, "register_framebuffer"); |
| 470 | goto error; | 469 | goto error_fb; |
| 471 | } | 470 | } |
| 472 | info->fb_info = fb_info; | 471 | info->fb_info = fb_info; |
| 473 | 472 | ||
| 474 | xenfb_make_preferred_console(); | 473 | xenfb_make_preferred_console(); |
| 475 | return 0; | 474 | return 0; |
| 476 | 475 | ||
| 477 | error_nomem: | 476 | error_fb: |
| 478 | ret = -ENOMEM; | 477 | fb_deferred_io_cleanup(fb_info); |
| 479 | xenbus_dev_fatal(dev, ret, "allocating device memory"); | 478 | fb_dealloc_cmap(&fb_info->cmap); |
| 480 | error: | 479 | framebuffer_release(fb_info); |
| 480 | error_nomem: | ||
| 481 | if (!ret) { | ||
| 482 | ret = -ENOMEM; | ||
| 483 | xenbus_dev_fatal(dev, ret, "allocating device memory"); | ||
| 484 | } | ||
| 485 | error: | ||
| 481 | xenfb_remove(dev); | 486 | xenfb_remove(dev); |
| 482 | return ret; | 487 | return ret; |
| 483 | } | 488 | } |
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 94243136f6bf..ea20c51d24c7 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig | |||
| @@ -183,15 +183,17 @@ config XEN_ACPI_PROCESSOR | |||
| 183 | depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ | 183 | depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ |
| 184 | default m | 184 | default m |
| 185 | help | 185 | help |
| 186 | This ACPI processor uploads Power Management information to the Xen hypervisor. | 186 | This ACPI processor uploads Power Management information to the Xen |
| 187 | 187 | hypervisor. | |
| 188 | To do that the driver parses the Power Management data and uploads said | 188 | |
| 189 | information to the Xen hypervisor. Then the Xen hypervisor can select the | 189 | To do that the driver parses the Power Management data and uploads |
| 190 | proper Cx and Pxx states. It also registers itslef as the SMM so that | 190 | said information to the Xen hypervisor. Then the Xen hypervisor can |
| 191 | other drivers (such as ACPI cpufreq scaling driver) will not load. | 191 | select the proper Cx and Pxx states. It also registers itslef as the |
| 192 | 192 | SMM so that other drivers (such as ACPI cpufreq scaling driver) will | |
| 193 | To compile this driver as a module, choose M here: the | 193 | not load. |
| 194 | module will be called xen_acpi_processor If you do not know what to choose, | 194 | |
| 195 | select M here. If the CPUFREQ drivers are built in, select Y here. | 195 | To compile this driver as a module, choose M here: the module will be |
| 196 | called xen_acpi_processor If you do not know what to choose, select | ||
| 197 | M here. If the CPUFREQ drivers are built in, select Y here. | ||
| 196 | 198 | ||
| 197 | endmenu | 199 | endmenu |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index ca6a3796a33b..541ef81f6ae8 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -699,7 +699,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) | |||
| 699 | * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate | 699 | * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate |
| 700 | * the cached file length | 700 | * the cached file length |
| 701 | */ | 701 | */ |
| 702 | if (origin != SEEK_SET || origin != SEEK_CUR) { | 702 | if (origin != SEEK_SET && origin != SEEK_CUR) { |
| 703 | int rc; | 703 | int rc; |
| 704 | struct inode *inode = file->f_path.dentry->d_inode; | 704 | struct inode *inode = file->f_path.dentry->d_inode; |
| 705 | 705 | ||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 2d60492d6df8..1030a716d155 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
| @@ -747,6 +747,8 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, pte_t pte) | |||
| 747 | else if (pte_present(pte)) | 747 | else if (pte_present(pte)) |
| 748 | *pme = make_pme(PM_PFRAME(pte_pfn(pte)) | 748 | *pme = make_pme(PM_PFRAME(pte_pfn(pte)) |
| 749 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); | 749 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); |
| 750 | else | ||
| 751 | *pme = make_pme(PM_NOT_PRESENT); | ||
| 750 | } | 752 | } |
| 751 | 753 | ||
| 752 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 754 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| @@ -761,6 +763,8 @@ static void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme, | |||
| 761 | if (pmd_present(pmd)) | 763 | if (pmd_present(pmd)) |
| 762 | *pme = make_pme(PM_PFRAME(pmd_pfn(pmd) + offset) | 764 | *pme = make_pme(PM_PFRAME(pmd_pfn(pmd) + offset) |
| 763 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); | 765 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); |
| 766 | else | ||
| 767 | *pme = make_pme(PM_NOT_PRESENT); | ||
| 764 | } | 768 | } |
| 765 | #else | 769 | #else |
| 766 | static inline void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme, | 770 | 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, | |||
| 801 | 805 | ||
| 802 | /* check to see if we've left 'vma' behind | 806 | /* check to see if we've left 'vma' behind |
| 803 | * and need a new, higher one */ | 807 | * and need a new, higher one */ |
| 804 | if (vma && (addr >= vma->vm_end)) | 808 | if (vma && (addr >= vma->vm_end)) { |
| 805 | vma = find_vma(walk->mm, addr); | 809 | vma = find_vma(walk->mm, addr); |
| 810 | pme = make_pme(PM_NOT_PRESENT); | ||
| 811 | } | ||
| 806 | 812 | ||
| 807 | /* check that 'vma' actually covers this address, | 813 | /* check that 'vma' actually covers this address, |
| 808 | * and that it isn't a huge page vma */ | 814 | * and that it isn't a huge page vma */ |
| @@ -830,6 +836,8 @@ static void huge_pte_to_pagemap_entry(pagemap_entry_t *pme, | |||
| 830 | if (pte_present(pte)) | 836 | if (pte_present(pte)) |
| 831 | *pme = make_pme(PM_PFRAME(pte_pfn(pte) + offset) | 837 | *pme = make_pme(PM_PFRAME(pte_pfn(pte) + offset) |
| 832 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); | 838 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT); |
| 839 | else | ||
| 840 | *pme = make_pme(PM_NOT_PRESENT); | ||
| 833 | } | 841 | } |
| 834 | 842 | ||
| 835 | /* This function walks within one hugetlb entry in the single call */ | 843 | /* 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, | |||
| 839 | { | 847 | { |
| 840 | struct pagemapread *pm = walk->private; | 848 | struct pagemapread *pm = walk->private; |
| 841 | int err = 0; | 849 | int err = 0; |
| 842 | pagemap_entry_t pme = make_pme(PM_NOT_PRESENT); | 850 | pagemap_entry_t pme; |
| 843 | 851 | ||
| 844 | for (; addr != end; addr += PAGE_SIZE) { | 852 | for (; addr != end; addr += PAGE_SIZE) { |
| 845 | int offset = (addr & ~hmask) >> PAGE_SHIFT; | 853 | int offset = (addr & ~hmask) >> PAGE_SHIFT; |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 8a1835855faa..fe5136d81454 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -159,7 +159,8 @@ static inline void eth_hw_addr_random(struct net_device *dev) | |||
| 159 | * @addr1: Pointer to a six-byte array containing the Ethernet address | 159 | * @addr1: Pointer to a six-byte array containing the Ethernet address |
| 160 | * @addr2: Pointer other six-byte array containing the Ethernet address | 160 | * @addr2: Pointer other six-byte array containing the Ethernet address |
| 161 | * | 161 | * |
| 162 | * Compare two ethernet addresses, returns 0 if equal | 162 | * Compare two ethernet addresses, returns 0 if equal, non-zero otherwise. |
| 163 | * Unlike memcmp(), it doesn't return a value suitable for sorting. | ||
| 163 | */ | 164 | */ |
| 164 | static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2) | 165 | static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2) |
| 165 | { | 166 | { |
| @@ -184,10 +185,10 @@ static inline unsigned long zap_last_2bytes(unsigned long value) | |||
| 184 | * @addr1: Pointer to an array of 8 bytes | 185 | * @addr1: Pointer to an array of 8 bytes |
| 185 | * @addr2: Pointer to an other array of 8 bytes | 186 | * @addr2: Pointer to an other array of 8 bytes |
| 186 | * | 187 | * |
| 187 | * Compare two ethernet addresses, returns 0 if equal. | 188 | * Compare two ethernet addresses, returns 0 if equal, non-zero otherwise. |
| 188 | * Same result than "memcmp(addr1, addr2, ETH_ALEN)" but without conditional | 189 | * Unlike memcmp(), it doesn't return a value suitable for sorting. |
| 189 | * branches, and possibly long word memory accesses on CPU allowing cheap | 190 | * The function doesn't need any conditional branches and possibly uses |
| 190 | * unaligned memory reads. | 191 | * word memory accesses on CPU allowing cheap unaligned memory reads. |
| 191 | * arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2} | 192 | * arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2} |
| 192 | * | 193 | * |
| 193 | * Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits. | 194 | * Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits. |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5cbaa20f1659..33900a53c990 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1403,15 +1403,6 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev) | |||
| 1403 | return 0; | 1403 | return 0; |
| 1404 | } | 1404 | } |
| 1405 | 1405 | ||
| 1406 | #ifndef CONFIG_NET_NS | ||
| 1407 | static inline void skb_set_dev(struct sk_buff *skb, struct net_device *dev) | ||
| 1408 | { | ||
| 1409 | skb->dev = dev; | ||
| 1410 | } | ||
| 1411 | #else /* CONFIG_NET_NS */ | ||
| 1412 | void skb_set_dev(struct sk_buff *skb, struct net_device *dev); | ||
| 1413 | #endif | ||
| 1414 | |||
| 1415 | static inline bool netdev_uses_trailer_tags(struct net_device *dev) | 1406 | static inline bool netdev_uses_trailer_tags(struct net_device *dev) |
| 1416 | { | 1407 | { |
| 1417 | #ifdef CONFIG_NET_DSA_TAG_TRAILER | 1408 | #ifdef CONFIG_NET_DSA_TAG_TRAILER |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 6ee44b24864a..a2ef81466b00 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -704,4 +704,17 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr) | |||
| 704 | addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff); | 704 | addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff); |
| 705 | } | 705 | } |
| 706 | 706 | ||
| 707 | /* The cookie is always 0 since this is how it's used in the | ||
| 708 | * pmtu code. | ||
| 709 | */ | ||
| 710 | static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | ||
| 711 | { | ||
| 712 | if (t->dst && !dst_check(t->dst, 0)) { | ||
| 713 | dst_release(t->dst); | ||
| 714 | t->dst = NULL; | ||
| 715 | } | ||
| 716 | |||
| 717 | return t->dst; | ||
| 718 | } | ||
| 719 | |||
| 707 | #endif /* __net_sctp_h__ */ | 720 | #endif /* __net_sctp_h__ */ |
diff --git a/kernel/compat.c b/kernel/compat.c index 74ff8498809a..d2c67aa49ae6 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
| @@ -372,25 +372,54 @@ asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set) | |||
| 372 | 372 | ||
| 373 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK | 373 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK |
| 374 | 374 | ||
| 375 | asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set, | 375 | /* |
| 376 | compat_old_sigset_t __user *oset) | 376 | * sys_sigprocmask SIG_SETMASK sets the first (compat) word of the |
| 377 | * blocked set of signals to the supplied signal set | ||
| 378 | */ | ||
| 379 | static inline void compat_sig_setmask(sigset_t *blocked, compat_sigset_word set) | ||
| 377 | { | 380 | { |
| 378 | old_sigset_t s; | 381 | memcpy(blocked->sig, &set, sizeof(set)); |
| 379 | long ret; | 382 | } |
| 380 | mm_segment_t old_fs; | ||
| 381 | 383 | ||
| 382 | if (set && get_user(s, set)) | 384 | asmlinkage long compat_sys_sigprocmask(int how, |
| 383 | return -EFAULT; | 385 | compat_old_sigset_t __user *nset, |
| 384 | old_fs = get_fs(); | 386 | compat_old_sigset_t __user *oset) |
| 385 | set_fs(KERNEL_DS); | 387 | { |
| 386 | ret = sys_sigprocmask(how, | 388 | old_sigset_t old_set, new_set; |
| 387 | set ? (old_sigset_t __user *) &s : NULL, | 389 | sigset_t new_blocked; |
| 388 | oset ? (old_sigset_t __user *) &s : NULL); | 390 | |
| 389 | set_fs(old_fs); | 391 | old_set = current->blocked.sig[0]; |
| 390 | if (ret == 0) | 392 | |
| 391 | if (oset) | 393 | if (nset) { |
| 392 | ret = put_user(s, oset); | 394 | if (get_user(new_set, nset)) |
| 393 | return ret; | 395 | return -EFAULT; |
| 396 | new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
| 397 | |||
| 398 | new_blocked = current->blocked; | ||
| 399 | |||
| 400 | switch (how) { | ||
| 401 | case SIG_BLOCK: | ||
| 402 | sigaddsetmask(&new_blocked, new_set); | ||
| 403 | break; | ||
| 404 | case SIG_UNBLOCK: | ||
| 405 | sigdelsetmask(&new_blocked, new_set); | ||
| 406 | break; | ||
| 407 | case SIG_SETMASK: | ||
| 408 | compat_sig_setmask(&new_blocked, new_set); | ||
| 409 | break; | ||
| 410 | default: | ||
| 411 | return -EINVAL; | ||
| 412 | } | ||
| 413 | |||
| 414 | set_current_blocked(&new_blocked); | ||
| 415 | } | ||
| 416 | |||
| 417 | if (oset) { | ||
| 418 | if (put_user(old_set, oset)) | ||
| 419 | return -EFAULT; | ||
| 420 | } | ||
| 421 | |||
| 422 | return 0; | ||
| 394 | } | 423 | } |
| 395 | 424 | ||
| 396 | #endif | 425 | #endif |
diff --git a/kernel/fork.c b/kernel/fork.c index b9372a0bff18..687a15d56243 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <linux/audit.h> | 47 | #include <linux/audit.h> |
| 48 | #include <linux/memcontrol.h> | 48 | #include <linux/memcontrol.h> |
| 49 | #include <linux/ftrace.h> | 49 | #include <linux/ftrace.h> |
| 50 | #include <linux/proc_fs.h> | ||
| 50 | #include <linux/profile.h> | 51 | #include <linux/profile.h> |
| 51 | #include <linux/rmap.h> | 52 | #include <linux/rmap.h> |
| 52 | #include <linux/ksm.h> | 53 | #include <linux/ksm.h> |
| @@ -1464,6 +1465,8 @@ bad_fork_cleanup_io: | |||
| 1464 | if (p->io_context) | 1465 | if (p->io_context) |
| 1465 | exit_io_context(p); | 1466 | exit_io_context(p); |
| 1466 | bad_fork_cleanup_namespaces: | 1467 | bad_fork_cleanup_namespaces: |
| 1468 | if (unlikely(clone_flags & CLONE_NEWPID)) | ||
| 1469 | pid_ns_release_proc(p->nsproxy->pid_ns); | ||
| 1467 | exit_task_namespaces(p); | 1470 | exit_task_namespaces(p); |
| 1468 | bad_fork_cleanup_mm: | 1471 | bad_fork_cleanup_mm: |
| 1469 | if (p->mm) | 1472 | if (p->mm) |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 5a16423a512c..ae8f708e3d75 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
| @@ -2498,7 +2498,6 @@ retry_avoidcopy: | |||
| 2498 | if (outside_reserve) { | 2498 | if (outside_reserve) { |
| 2499 | BUG_ON(huge_pte_none(pte)); | 2499 | BUG_ON(huge_pte_none(pte)); |
| 2500 | if (unmap_ref_private(mm, vma, old_page, address)) { | 2500 | if (unmap_ref_private(mm, vma, old_page, address)) { |
| 2501 | BUG_ON(page_count(old_page) != 1); | ||
| 2502 | BUG_ON(huge_pte_none(pte)); | 2501 | BUG_ON(huge_pte_none(pte)); |
| 2503 | spin_lock(&mm->page_table_lock); | 2502 | spin_lock(&mm->page_table_lock); |
| 2504 | ptep = huge_pte_offset(mm, address & huge_page_mask(h)); | 2503 | ptep = huge_pte_offset(mm, address & huge_page_mask(h)); |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 31ab9c3f0178..b659260c56ad 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -4507,6 +4507,12 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp, | |||
| 4507 | swap_buffers: | 4507 | swap_buffers: |
| 4508 | /* Swap primary and spare array */ | 4508 | /* Swap primary and spare array */ |
| 4509 | thresholds->spare = thresholds->primary; | 4509 | thresholds->spare = thresholds->primary; |
| 4510 | /* If all events are unregistered, free the spare array */ | ||
| 4511 | if (!new) { | ||
| 4512 | kfree(thresholds->spare); | ||
| 4513 | thresholds->spare = NULL; | ||
| 4514 | } | ||
| 4515 | |||
| 4510 | rcu_assign_pointer(thresholds->primary, new); | 4516 | rcu_assign_pointer(thresholds->primary, new); |
| 4511 | 4517 | ||
| 4512 | /* To be sure that nobody uses thresholds */ | 4518 | /* To be sure that nobody uses thresholds */ |
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index e53bb8a256b1..1983fb1c7026 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
| @@ -82,8 +82,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) | |||
| 82 | 82 | ||
| 83 | static void __init __free_pages_memory(unsigned long start, unsigned long end) | 83 | static void __init __free_pages_memory(unsigned long start, unsigned long end) |
| 84 | { | 84 | { |
| 85 | int i; | 85 | unsigned long i, start_aligned, end_aligned; |
| 86 | unsigned long start_aligned, end_aligned; | ||
| 87 | int order = ilog2(BITS_PER_LONG); | 86 | int order = ilog2(BITS_PER_LONG); |
| 88 | 87 | ||
| 89 | start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); | 88 | start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a712fb9e04ce..918330f71dba 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -5203,7 +5203,7 @@ int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write, | |||
| 5203 | int ret; | 5203 | int ret; |
| 5204 | 5204 | ||
| 5205 | ret = proc_dointvec_minmax(table, write, buffer, length, ppos); | 5205 | ret = proc_dointvec_minmax(table, write, buffer, length, ppos); |
| 5206 | if (!write || (ret == -EINVAL)) | 5206 | if (!write || (ret < 0)) |
| 5207 | return ret; | 5207 | return ret; |
| 5208 | for_each_populated_zone(zone) { | 5208 | for_each_populated_zone(zone) { |
| 5209 | for_each_possible_cpu(cpu) { | 5209 | for_each_possible_cpu(cpu) { |
diff --git a/mm/percpu.c b/mm/percpu.c index f47af9123af7..bb4be7435ce3 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
| @@ -1132,20 +1132,20 @@ static void pcpu_dump_alloc_info(const char *lvl, | |||
| 1132 | for (alloc_end += gi->nr_units / upa; | 1132 | for (alloc_end += gi->nr_units / upa; |
| 1133 | alloc < alloc_end; alloc++) { | 1133 | alloc < alloc_end; alloc++) { |
| 1134 | if (!(alloc % apl)) { | 1134 | if (!(alloc % apl)) { |
| 1135 | printk("\n"); | 1135 | printk(KERN_CONT "\n"); |
| 1136 | printk("%spcpu-alloc: ", lvl); | 1136 | printk("%spcpu-alloc: ", lvl); |
| 1137 | } | 1137 | } |
| 1138 | printk("[%0*d] ", group_width, group); | 1138 | printk(KERN_CONT "[%0*d] ", group_width, group); |
| 1139 | 1139 | ||
| 1140 | for (unit_end += upa; unit < unit_end; unit++) | 1140 | for (unit_end += upa; unit < unit_end; unit++) |
| 1141 | if (gi->cpu_map[unit] != NR_CPUS) | 1141 | if (gi->cpu_map[unit] != NR_CPUS) |
| 1142 | printk("%0*d ", cpu_width, | 1142 | printk(KERN_CONT "%0*d ", cpu_width, |
| 1143 | gi->cpu_map[unit]); | 1143 | gi->cpu_map[unit]); |
| 1144 | else | 1144 | else |
| 1145 | printk("%s ", empty_str); | 1145 | printk(KERN_CONT "%s ", empty_str); |
| 1146 | } | 1146 | } |
| 1147 | } | 1147 | } |
| 1148 | printk("\n"); | 1148 | printk(KERN_CONT "\n"); |
| 1149 | } | 1149 | } |
| 1150 | 1150 | ||
| 1151 | /** | 1151 | /** |
| @@ -1650,6 +1650,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, | |||
| 1650 | areas[group] = ptr; | 1650 | areas[group] = ptr; |
| 1651 | 1651 | ||
| 1652 | base = min(ptr, base); | 1652 | base = min(ptr, base); |
| 1653 | } | ||
| 1654 | |||
| 1655 | /* | ||
| 1656 | * Copy data and free unused parts. This should happen after all | ||
| 1657 | * allocations are complete; otherwise, we may end up with | ||
| 1658 | * overlapping groups. | ||
| 1659 | */ | ||
| 1660 | for (group = 0; group < ai->nr_groups; group++) { | ||
| 1661 | struct pcpu_group_info *gi = &ai->groups[group]; | ||
| 1662 | void *ptr = areas[group]; | ||
| 1653 | 1663 | ||
| 1654 | for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { | 1664 | for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { |
| 1655 | if (gi->cpu_map[i] == NR_CPUS) { | 1665 | if (gi->cpu_map[i] == NR_CPUS) { |
| @@ -1885,6 +1895,8 @@ void __init setup_per_cpu_areas(void) | |||
| 1885 | fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | 1895 | fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); |
| 1886 | if (!ai || !fc) | 1896 | if (!ai || !fc) |
| 1887 | panic("Failed to allocate memory for percpu areas."); | 1897 | panic("Failed to allocate memory for percpu areas."); |
| 1898 | /* kmemleak tracks the percpu allocations separately */ | ||
| 1899 | kmemleak_free(fc); | ||
| 1888 | 1900 | ||
| 1889 | ai->dyn_size = unit_size; | 1901 | ai->dyn_size = unit_size; |
| 1890 | ai->unit_size = unit_size; | 1902 | ai->unit_size = unit_size; |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 9988d4abb372..9757c193c86b 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
| @@ -157,7 +157,7 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb, | |||
| 157 | skb = __vlan_hwaccel_put_tag(skb, vlan_tci); | 157 | skb = __vlan_hwaccel_put_tag(skb, vlan_tci); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | skb_set_dev(skb, vlan_dev_priv(dev)->real_dev); | 160 | skb->dev = vlan_dev_priv(dev)->real_dev; |
| 161 | len = skb->len; | 161 | len = skb->len; |
| 162 | if (netpoll_tx_running(dev)) | 162 | if (netpoll_tx_running(dev)) |
| 163 | return skb->dev->netdev_ops->ndo_start_xmit(skb, skb->dev); | 163 | return skb->dev->netdev_ops->ndo_start_xmit(skb, skb->dev); |
diff --git a/net/core/dev.c b/net/core/dev.c index 9bb8f87c4cda..99e1d759f41e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -1617,10 +1617,14 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
| 1617 | return NET_RX_DROP; | 1617 | return NET_RX_DROP; |
| 1618 | } | 1618 | } |
| 1619 | skb->skb_iif = 0; | 1619 | skb->skb_iif = 0; |
| 1620 | skb_set_dev(skb, dev); | 1620 | skb->dev = dev; |
| 1621 | skb_dst_drop(skb); | ||
| 1621 | skb->tstamp.tv64 = 0; | 1622 | skb->tstamp.tv64 = 0; |
| 1622 | skb->pkt_type = PACKET_HOST; | 1623 | skb->pkt_type = PACKET_HOST; |
| 1623 | skb->protocol = eth_type_trans(skb, dev); | 1624 | skb->protocol = eth_type_trans(skb, dev); |
| 1625 | skb->mark = 0; | ||
| 1626 | secpath_reset(skb); | ||
| 1627 | nf_reset(skb); | ||
| 1624 | return netif_rx(skb); | 1628 | return netif_rx(skb); |
| 1625 | } | 1629 | } |
| 1626 | EXPORT_SYMBOL_GPL(dev_forward_skb); | 1630 | EXPORT_SYMBOL_GPL(dev_forward_skb); |
| @@ -1869,36 +1873,6 @@ void netif_device_attach(struct net_device *dev) | |||
| 1869 | } | 1873 | } |
| 1870 | EXPORT_SYMBOL(netif_device_attach); | 1874 | EXPORT_SYMBOL(netif_device_attach); |
| 1871 | 1875 | ||
| 1872 | /** | ||
| 1873 | * skb_dev_set -- assign a new device to a buffer | ||
| 1874 | * @skb: buffer for the new device | ||
| 1875 | * @dev: network device | ||
| 1876 | * | ||
| 1877 | * If an skb is owned by a device already, we have to reset | ||
| 1878 | * all data private to the namespace a device belongs to | ||
| 1879 | * before assigning it a new device. | ||
| 1880 | */ | ||
| 1881 | #ifdef CONFIG_NET_NS | ||
| 1882 | void skb_set_dev(struct sk_buff *skb, struct net_device *dev) | ||
| 1883 | { | ||
| 1884 | skb_dst_drop(skb); | ||
| 1885 | if (skb->dev && !net_eq(dev_net(skb->dev), dev_net(dev))) { | ||
| 1886 | secpath_reset(skb); | ||
| 1887 | nf_reset(skb); | ||
| 1888 | skb_init_secmark(skb); | ||
| 1889 | skb->mark = 0; | ||
| 1890 | skb->priority = 0; | ||
| 1891 | skb->nf_trace = 0; | ||
| 1892 | skb->ipvs_property = 0; | ||
| 1893 | #ifdef CONFIG_NET_SCHED | ||
| 1894 | skb->tc_index = 0; | ||
| 1895 | #endif | ||
| 1896 | } | ||
| 1897 | skb->dev = dev; | ||
| 1898 | } | ||
| 1899 | EXPORT_SYMBOL(skb_set_dev); | ||
| 1900 | #endif /* CONFIG_NET_NS */ | ||
| 1901 | |||
| 1902 | static void skb_warn_bad_offload(const struct sk_buff *skb) | 1876 | static void skb_warn_bad_offload(const struct sk_buff *skb) |
| 1903 | { | 1877 | { |
| 1904 | static const netdev_features_t null_features = 0; | 1878 | static const netdev_features_t null_features = 0; |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 4d8ce93cd503..77a59980b579 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
| @@ -1931,7 +1931,7 @@ static int pktgen_device_event(struct notifier_block *unused, | |||
| 1931 | { | 1931 | { |
| 1932 | struct net_device *dev = ptr; | 1932 | struct net_device *dev = ptr; |
| 1933 | 1933 | ||
| 1934 | if (!net_eq(dev_net(dev), &init_net)) | 1934 | if (!net_eq(dev_net(dev), &init_net) || pktgen_exiting) |
| 1935 | return NOTIFY_DONE; | 1935 | return NOTIFY_DONE; |
| 1936 | 1936 | ||
| 1937 | /* It is OK that we do not hold the group lock right now, | 1937 | /* It is OK that we do not hold the group lock right now, |
| @@ -3755,12 +3755,18 @@ static void __exit pg_cleanup(void) | |||
| 3755 | { | 3755 | { |
| 3756 | struct pktgen_thread *t; | 3756 | struct pktgen_thread *t; |
| 3757 | struct list_head *q, *n; | 3757 | struct list_head *q, *n; |
| 3758 | struct list_head list; | ||
| 3758 | 3759 | ||
| 3759 | /* Stop all interfaces & threads */ | 3760 | /* Stop all interfaces & threads */ |
| 3760 | pktgen_exiting = true; | 3761 | pktgen_exiting = true; |
| 3761 | 3762 | ||
| 3762 | list_for_each_safe(q, n, &pktgen_threads) { | 3763 | mutex_lock(&pktgen_thread_lock); |
| 3764 | list_splice(&list, &pktgen_threads); | ||
| 3765 | mutex_unlock(&pktgen_thread_lock); | ||
| 3766 | |||
| 3767 | list_for_each_safe(q, n, &list) { | ||
| 3763 | t = list_entry(q, struct pktgen_thread, th_list); | 3768 | t = list_entry(q, struct pktgen_thread, th_list); |
| 3769 | list_del(&t->th_list); | ||
| 3764 | kthread_stop(t->tsk); | 3770 | kthread_stop(t->tsk); |
| 3765 | kfree(t); | 3771 | kfree(t); |
| 3766 | } | 3772 | } |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index bce36f1a37b4..30b88d7b4bd6 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
| @@ -1370,6 +1370,8 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l, | |||
| 1370 | 1370 | ||
| 1371 | if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos) | 1371 | if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos) |
| 1372 | continue; | 1372 | continue; |
| 1373 | if (fi->fib_dead) | ||
| 1374 | continue; | ||
| 1373 | if (fa->fa_info->fib_scope < flp->flowi4_scope) | 1375 | if (fa->fa_info->fib_scope < flp->flowi4_scope) |
| 1374 | continue; | 1376 | continue; |
| 1375 | fib_alias_accessed(fa); | 1377 | fib_alias_accessed(fa); |
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index e44e631ea952..777716bc80f7 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
| @@ -421,6 +421,19 @@ static int validate_sample(const struct nlattr *attr, | |||
| 421 | return validate_actions(actions, key, depth + 1); | 421 | return validate_actions(actions, key, depth + 1); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | static int validate_tp_port(const struct sw_flow_key *flow_key) | ||
| 425 | { | ||
| 426 | if (flow_key->eth.type == htons(ETH_P_IP)) { | ||
| 427 | if (flow_key->ipv4.tp.src && flow_key->ipv4.tp.dst) | ||
| 428 | return 0; | ||
| 429 | } else if (flow_key->eth.type == htons(ETH_P_IPV6)) { | ||
| 430 | if (flow_key->ipv6.tp.src && flow_key->ipv6.tp.dst) | ||
| 431 | return 0; | ||
| 432 | } | ||
| 433 | |||
| 434 | return -EINVAL; | ||
| 435 | } | ||
| 436 | |||
| 424 | static int validate_set(const struct nlattr *a, | 437 | static int validate_set(const struct nlattr *a, |
| 425 | const struct sw_flow_key *flow_key) | 438 | const struct sw_flow_key *flow_key) |
| 426 | { | 439 | { |
| @@ -462,18 +475,13 @@ static int validate_set(const struct nlattr *a, | |||
| 462 | if (flow_key->ip.proto != IPPROTO_TCP) | 475 | if (flow_key->ip.proto != IPPROTO_TCP) |
| 463 | return -EINVAL; | 476 | return -EINVAL; |
| 464 | 477 | ||
| 465 | if (!flow_key->ipv4.tp.src || !flow_key->ipv4.tp.dst) | 478 | return validate_tp_port(flow_key); |
| 466 | return -EINVAL; | ||
| 467 | |||
| 468 | break; | ||
| 469 | 479 | ||
| 470 | case OVS_KEY_ATTR_UDP: | 480 | case OVS_KEY_ATTR_UDP: |
| 471 | if (flow_key->ip.proto != IPPROTO_UDP) | 481 | if (flow_key->ip.proto != IPPROTO_UDP) |
| 472 | return -EINVAL; | 482 | return -EINVAL; |
| 473 | 483 | ||
| 474 | if (!flow_key->ipv4.tp.src || !flow_key->ipv4.tp.dst) | 484 | return validate_tp_port(flow_key); |
| 475 | return -EINVAL; | ||
| 476 | break; | ||
| 477 | 485 | ||
| 478 | default: | 486 | default: |
| 479 | return -EINVAL; | 487 | return -EINVAL; |
| @@ -1641,10 +1649,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info) | |||
| 1641 | reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq, | 1649 | reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq, |
| 1642 | OVS_VPORT_CMD_NEW); | 1650 | OVS_VPORT_CMD_NEW); |
| 1643 | if (IS_ERR(reply)) { | 1651 | if (IS_ERR(reply)) { |
| 1644 | err = PTR_ERR(reply); | ||
| 1645 | netlink_set_err(init_net.genl_sock, 0, | 1652 | netlink_set_err(init_net.genl_sock, 0, |
| 1646 | ovs_dp_vport_multicast_group.id, err); | 1653 | ovs_dp_vport_multicast_group.id, PTR_ERR(reply)); |
| 1647 | return 0; | 1654 | goto exit_unlock; |
| 1648 | } | 1655 | } |
| 1649 | 1656 | ||
| 1650 | genl_notify(reply, genl_info_net(info), info->snd_pid, | 1657 | genl_notify(reply, genl_info_net(info), info->snd_pid, |
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 1252c3081ef1..2a11ec2383ee 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c | |||
| @@ -183,7 +183,8 @@ void ovs_flow_used(struct sw_flow *flow, struct sk_buff *skb) | |||
| 183 | u8 tcp_flags = 0; | 183 | u8 tcp_flags = 0; |
| 184 | 184 | ||
| 185 | if (flow->key.eth.type == htons(ETH_P_IP) && | 185 | if (flow->key.eth.type == htons(ETH_P_IP) && |
| 186 | flow->key.ip.proto == IPPROTO_TCP) { | 186 | flow->key.ip.proto == IPPROTO_TCP && |
| 187 | likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) { | ||
| 187 | u8 *tcp = (u8 *)tcp_hdr(skb); | 188 | u8 *tcp = (u8 *)tcp_hdr(skb); |
| 188 | tcp_flags = *(tcp + TCP_FLAGS_OFFSET) & TCP_FLAG_MASK; | 189 | tcp_flags = *(tcp + TCP_FLAGS_OFFSET) & TCP_FLAG_MASK; |
| 189 | } | 190 | } |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 817174eb5f41..8fc4dcd294ab 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
| @@ -377,9 +377,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
| 377 | */ | 377 | */ |
| 378 | skb_set_owner_w(nskb, sk); | 378 | skb_set_owner_w(nskb, sk); |
| 379 | 379 | ||
| 380 | /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ | 380 | if (!sctp_transport_dst_check(tp)) { |
| 381 | if (!dst || (dst->obsolete > 1)) { | ||
| 382 | dst_release(dst); | ||
| 383 | sctp_transport_route(tp, NULL, sctp_sk(sk)); | 381 | sctp_transport_route(tp, NULL, sctp_sk(sk)); |
| 384 | if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { | 382 | if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { |
| 385 | sctp_assoc_sync_pmtu(asoc); | 383 | sctp_assoc_sync_pmtu(asoc); |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3889330b7b04..b026ba0c6992 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
| @@ -226,23 +226,6 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) | |||
| 226 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 226 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | /* this is a complete rip-off from __sk_dst_check | ||
| 230 | * the cookie is always 0 since this is how it's used in the | ||
| 231 | * pmtu code | ||
| 232 | */ | ||
| 233 | static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | ||
| 234 | { | ||
| 235 | struct dst_entry *dst = t->dst; | ||
| 236 | |||
| 237 | if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { | ||
| 238 | dst_release(t->dst); | ||
| 239 | t->dst = NULL; | ||
| 240 | return NULL; | ||
| 241 | } | ||
| 242 | |||
| 243 | return dst; | ||
| 244 | } | ||
| 245 | |||
| 246 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | 229 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) |
| 247 | { | 230 | { |
| 248 | struct dst_entry *dst; | 231 | struct dst_entry *dst; |
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index ca8cad8251c7..782bfe1b6465 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
| @@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor); | |||
| 242 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr) | 242 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr) |
| 243 | { | 243 | { |
| 244 | struct gss_api_mech *pos = NULL; | 244 | struct gss_api_mech *pos = NULL; |
| 245 | int i = 0; | 245 | int j, i = 0; |
| 246 | 246 | ||
| 247 | spin_lock(®istered_mechs_lock); | 247 | spin_lock(®istered_mechs_lock); |
| 248 | list_for_each_entry(pos, ®istered_mechs, gm_list) { | 248 | list_for_each_entry(pos, ®istered_mechs, gm_list) { |
| 249 | array_ptr[i] = pos->gm_pfs->pseudoflavor; | 249 | for (j=0; j < pos->gm_pf_num; j++) { |
| 250 | i++; | 250 | array_ptr[i++] = pos->gm_pfs[j].pseudoflavor; |
| 251 | } | ||
| 251 | } | 252 | } |
| 252 | spin_unlock(®istered_mechs_lock); | 253 | spin_unlock(®istered_mechs_lock); |
| 253 | return i; | 254 | return i; |
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c index 64417a733220..d8c670c9d62c 100644 --- a/sound/pci/echoaudio/echoaudio_dsp.c +++ b/sound/pci/echoaudio/echoaudio_dsp.c | |||
| @@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip) | |||
| 475 | const struct firmware *fw; | 475 | const struct firmware *fw; |
| 476 | int box_type, err; | 476 | int box_type, err; |
| 477 | 477 | ||
| 478 | if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page)) | 478 | if (snd_BUG_ON(!chip->comm_page)) |
| 479 | return -EPERM; | 479 | return -EPERM; |
| 480 | 480 | ||
| 481 | /* See if the ASIC is present and working - only if the DSP is already loaded */ | 481 | /* See if the ASIC is present and working - only if the DSP is already loaded */ |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7a8fcc4c15f8..841475cc13b6 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -5444,10 +5444,6 @@ int snd_hda_suspend(struct hda_bus *bus) | |||
| 5444 | list_for_each_entry(codec, &bus->codec_list, list) { | 5444 | list_for_each_entry(codec, &bus->codec_list, list) { |
| 5445 | if (hda_codec_is_power_on(codec)) | 5445 | if (hda_codec_is_power_on(codec)) |
| 5446 | hda_call_codec_suspend(codec); | 5446 | hda_call_codec_suspend(codec); |
| 5447 | else /* forcibly change the power to D3 even if not used */ | ||
| 5448 | hda_set_power_state(codec, | ||
| 5449 | codec->afg ? codec->afg : codec->mfg, | ||
| 5450 | AC_PWRST_D3); | ||
| 5451 | if (codec->patch_ops.post_suspend) | 5447 | if (codec->patch_ops.post_suspend) |
| 5452 | codec->patch_ops.post_suspend(codec); | 5448 | codec->patch_ops.post_suspend(codec); |
| 5453 | } | 5449 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c19e71a94e1b..1f350522bed4 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -783,11 +783,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
| 783 | { | 783 | { |
| 784 | struct azx *chip = bus->private_data; | 784 | struct azx *chip = bus->private_data; |
| 785 | unsigned long timeout; | 785 | unsigned long timeout; |
| 786 | unsigned long loopcounter; | ||
| 786 | int do_poll = 0; | 787 | int do_poll = 0; |
| 787 | 788 | ||
| 788 | again: | 789 | again: |
| 789 | timeout = jiffies + msecs_to_jiffies(1000); | 790 | timeout = jiffies + msecs_to_jiffies(1000); |
| 790 | for (;;) { | 791 | |
| 792 | for (loopcounter = 0;; loopcounter++) { | ||
| 791 | if (chip->polling_mode || do_poll) { | 793 | if (chip->polling_mode || do_poll) { |
| 792 | spin_lock_irq(&chip->reg_lock); | 794 | spin_lock_irq(&chip->reg_lock); |
| 793 | azx_update_rirb(chip); | 795 | azx_update_rirb(chip); |
| @@ -803,7 +805,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
| 803 | } | 805 | } |
| 804 | if (time_after(jiffies, timeout)) | 806 | if (time_after(jiffies, timeout)) |
| 805 | break; | 807 | break; |
| 806 | if (bus->needs_damn_long_delay) | 808 | if (bus->needs_damn_long_delay || loopcounter > 3000) |
| 807 | msleep(2); /* temporary workaround */ | 809 | msleep(2); /* temporary workaround */ |
| 808 | else { | 810 | else { |
| 809 | udelay(10); | 811 | udelay(10); |
| @@ -2351,6 +2353,17 @@ static void azx_power_notify(struct hda_bus *bus) | |||
| 2351 | * power management | 2353 | * power management |
| 2352 | */ | 2354 | */ |
| 2353 | 2355 | ||
| 2356 | static int snd_hda_codecs_inuse(struct hda_bus *bus) | ||
| 2357 | { | ||
| 2358 | struct hda_codec *codec; | ||
| 2359 | |||
| 2360 | list_for_each_entry(codec, &bus->codec_list, list) { | ||
| 2361 | if (snd_hda_codec_needs_resume(codec)) | ||
| 2362 | return 1; | ||
| 2363 | } | ||
| 2364 | return 0; | ||
| 2365 | } | ||
| 2366 | |||
| 2354 | static int azx_suspend(struct pci_dev *pci, pm_message_t state) | 2367 | static int azx_suspend(struct pci_dev *pci, pm_message_t state) |
| 2355 | { | 2368 | { |
| 2356 | struct snd_card *card = pci_get_drvdata(pci); | 2369 | struct snd_card *card = pci_get_drvdata(pci); |
| @@ -2397,7 +2410,8 @@ static int azx_resume(struct pci_dev *pci) | |||
| 2397 | return -EIO; | 2410 | return -EIO; |
| 2398 | azx_init_pci(chip); | 2411 | azx_init_pci(chip); |
| 2399 | 2412 | ||
| 2400 | azx_init_chip(chip, 1); | 2413 | if (snd_hda_codecs_inuse(chip->bus)) |
| 2414 | azx_init_chip(chip, 1); | ||
| 2401 | 2415 | ||
| 2402 | snd_hda_resume(chip->bus); | 2416 | snd_hda_resume(chip->bus); |
| 2403 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 2417 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 818f90bc7d57..7810913d07a0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -5405,6 +5405,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
| 5405 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", | 5405 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", |
| 5406 | ALC882_FIXUP_ACER_ASPIRE_4930G), | 5406 | ALC882_FIXUP_ACER_ASPIRE_4930G), |
| 5407 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), | 5407 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), |
| 5408 | SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G", | ||
| 5409 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
| 5408 | SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), | 5410 | SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), |
| 5409 | SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G), | 5411 | SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G), |
| 5410 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), | 5412 | 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[] = { | |||
| 5438 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), | 5440 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), |
| 5439 | 5441 | ||
| 5440 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), | 5442 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), |
| 5443 | SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), | ||
| 5441 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), | 5444 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), |
| 5442 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD), | 5445 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD), |
| 5443 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), | 5446 | 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) | |||
| 5638 | snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80); | 5641 | snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80); |
| 5639 | } | 5642 | } |
| 5640 | #endif | 5643 | #endif |
| 5641 | alc_auto_parse_customize_define(codec); | ||
| 5642 | |||
| 5643 | alc_fix_pll_init(codec, 0x20, 0x0a, 10); | 5644 | alc_fix_pll_init(codec, 0x20, 0x0a, 10); |
| 5644 | 5645 | ||
| 5645 | alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups); | 5646 | alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups); |
| 5646 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 5647 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
| 5647 | 5648 | ||
| 5649 | alc_auto_parse_customize_define(codec); | ||
| 5650 | |||
| 5648 | /* automatic parse from the BIOS config */ | 5651 | /* automatic parse from the BIOS config */ |
| 5649 | err = alc262_parse_auto_config(codec); | 5652 | err = alc262_parse_auto_config(codec); |
| 5650 | if (err < 0) | 5653 | if (err < 0) |
| @@ -6249,8 +6252,6 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 6249 | 6252 | ||
| 6250 | spec->mixer_nid = 0x0b; | 6253 | spec->mixer_nid = 0x0b; |
| 6251 | 6254 | ||
| 6252 | alc_auto_parse_customize_define(codec); | ||
| 6253 | |||
| 6254 | err = alc_codec_rename_from_preset(codec); | 6255 | err = alc_codec_rename_from_preset(codec); |
| 6255 | if (err < 0) | 6256 | if (err < 0) |
| 6256 | goto error; | 6257 | goto error; |
| @@ -6283,6 +6284,8 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 6283 | alc269_fixup_tbl, alc269_fixups); | 6284 | alc269_fixup_tbl, alc269_fixups); |
| 6284 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 6285 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
| 6285 | 6286 | ||
| 6287 | alc_auto_parse_customize_define(codec); | ||
| 6288 | |||
| 6286 | /* automatic parse from the BIOS config */ | 6289 | /* automatic parse from the BIOS config */ |
| 6287 | err = alc269_parse_auto_config(codec); | 6290 | err = alc269_parse_auto_config(codec); |
| 6288 | if (err < 0) | 6291 | if (err < 0) |
| @@ -6859,8 +6862,6 @@ static int patch_alc662(struct hda_codec *codec) | |||
| 6859 | /* handle multiple HPs as is */ | 6862 | /* handle multiple HPs as is */ |
| 6860 | spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; | 6863 | spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; |
| 6861 | 6864 | ||
| 6862 | alc_auto_parse_customize_define(codec); | ||
| 6863 | |||
| 6864 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 6865 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
| 6865 | 6866 | ||
| 6866 | err = alc_codec_rename_from_preset(codec); | 6867 | err = alc_codec_rename_from_preset(codec); |
| @@ -6877,6 +6878,9 @@ static int patch_alc662(struct hda_codec *codec) | |||
| 6877 | alc_pick_fixup(codec, alc662_fixup_models, | 6878 | alc_pick_fixup(codec, alc662_fixup_models, |
| 6878 | alc662_fixup_tbl, alc662_fixups); | 6879 | alc662_fixup_tbl, alc662_fixups); |
| 6879 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 6880 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
| 6881 | |||
| 6882 | alc_auto_parse_customize_define(codec); | ||
| 6883 | |||
| 6880 | /* automatic parse from the BIOS config */ | 6884 | /* automatic parse from the BIOS config */ |
| 6881 | err = alc662_parse_auto_config(codec); | 6885 | err = alc662_parse_auto_config(codec); |
| 6882 | if (err < 0) | 6886 | if (err < 0) |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index b68cdec03b9e..0b2aea2ce172 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
| @@ -5170,6 +5170,7 @@ static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp) | |||
| 5170 | strcpy(hw->name, "HDSP hwdep interface"); | 5170 | strcpy(hw->name, "HDSP hwdep interface"); |
| 5171 | 5171 | ||
| 5172 | hw->ops.ioctl = snd_hdsp_hwdep_ioctl; | 5172 | hw->ops.ioctl = snd_hdsp_hwdep_ioctl; |
| 5173 | hw->ops.ioctl_compat = snd_hdsp_hwdep_ioctl; | ||
| 5173 | 5174 | ||
| 5174 | return 0; | 5175 | return 0; |
| 5175 | } | 5176 | } |
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c index 9d9ad8d61c0a..8526e1edaf45 100644 --- a/sound/soc/sh/migor.c +++ b/sound/soc/sh/migor.c | |||
| @@ -35,7 +35,7 @@ static unsigned long siumckb_recalc(struct clk *clk) | |||
| 35 | return codec_freq; | 35 | return codec_freq; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | static struct clk_ops siumckb_clk_ops = { | 38 | static struct sh_clk_ops siumckb_clk_ops = { |
| 39 | .recalc = siumckb_recalc, | 39 | .recalc = siumckb_recalc, |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
