diff options
-rw-r--r-- | 0000_README | 2 | ||||
-rw-r--r-- | 5015_kdbus-7-22-2015.patch (renamed from 5015_kdbus-7-17-15.patch) | 2609 |
2 files changed, 2 insertions, 2609 deletions
diff --git a/0000_README b/0000_README index 8e9fdc7a..eab69c97 100644 --- a/0000_README +++ b/0000_README @@ -107,6 +107,6 @@ Patch: 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch From: https://github.com/graysky2/kernel_gcc_patch/ Desc: Kernel patch enables gcc >= v4.9 optimizations for additional CPUs. -Patch: 5015_kdbus-7-17-15.patch +Patch: 5015_kdbus-7-22-15.patch From: https://lkml.org Desc: Kernel-level IPC implementation diff --git a/5015_kdbus-7-17-15.patch b/5015_kdbus-7-22-2015.patch index 61102dd3..b110b5cf 100644 --- a/5015_kdbus-7-17-15.patch +++ b/5015_kdbus-7-22-2015.patch @@ -8,19 +8,6 @@ index bc05482..e2127a7 100644 + filesystems filesystems ia64 kdbus laptops mic misc-devices \ networking pcmcia prctl ptp spi timers vDSO video4linux \ watchdog -diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt -index f5a8ca2..750d577 100644 ---- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt -+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt -@@ -1,7 +1,7 @@ - * Marvell Armada 370 / Armada XP Ethernet Controller (NETA) - - Required properties: --- compatible: "marvell,armada-370-neta" or "marvell,armada-xp-neta". -+- compatible: should be "marvell,armada-370-neta". - - reg: address and length of the register set for the device. - - interrupts: interrupt for the device - - phy: See ethernet.txt file in the same directory. diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 51f4221..ec7c81b 100644 --- a/Documentation/ioctl/ioctl-number.txt @@ -7470,20 +7457,9 @@ index d8afd29..02f7668 100644 M: Vivek Goyal <vgoyal@redhat.com> M: Haren Myneni <hbabu@us.ibm.com> diff --git a/Makefile b/Makefile -index cef84c0..a1c8d57 100644 +index f5c8983..a1c8d57 100644 --- a/Makefile +++ b/Makefile -@@ -1,8 +1,8 @@ - VERSION = 4 - PATCHLEVEL = 1 --SUBLEVEL = 2 -+SUBLEVEL = 0 - EXTRAVERSION = --NAME = Series 4800 -+NAME = Hurr durr I'ma sheep - - # *DOCUMENTATION* - # To see a list of typical targets execute "make help" @@ -1343,6 +1343,7 @@ $(help-board-dirs): help-%: %docs: scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts build_docproc @@ -7492,2075 +7468,6 @@ index cef84c0..a1c8d57 100644 else # KBUILD_EXTMOD -diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi -index 06a2f2a..ec96f0b 100644 ---- a/arch/arm/boot/dts/armada-370-xp.dtsi -+++ b/arch/arm/boot/dts/armada-370-xp.dtsi -@@ -270,6 +270,7 @@ - }; - - eth0: ethernet@70000 { -+ compatible = "marvell,armada-370-neta"; - reg = <0x70000 0x4000>; - interrupts = <8>; - clocks = <&gateclk 4>; -@@ -285,6 +286,7 @@ - }; - - eth1: ethernet@74000 { -+ compatible = "marvell,armada-370-neta"; - reg = <0x74000 0x4000>; - interrupts = <10>; - clocks = <&gateclk 3>; -diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi -index ca4257b..00b50db5 100644 ---- a/arch/arm/boot/dts/armada-370.dtsi -+++ b/arch/arm/boot/dts/armada-370.dtsi -@@ -307,14 +307,6 @@ - dmacap,memset; - }; - }; -- -- ethernet@70000 { -- compatible = "marvell,armada-370-neta"; -- }; -- -- ethernet@74000 { -- compatible = "marvell,armada-370-neta"; -- }; - }; - }; - }; -diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi -index c5fdc99..8479fdc 100644 ---- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi -+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi -@@ -318,7 +318,7 @@ - }; - - eth3: ethernet@34000 { -- compatible = "marvell,armada-xp-neta"; -+ compatible = "marvell,armada-370-neta"; - reg = <0x34000 0x4000>; - interrupts = <14>; - clocks = <&gateclk 1>; -diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi -index 0e24f1a..661d54c 100644 ---- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi -+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi -@@ -356,7 +356,7 @@ - }; - - eth3: ethernet@34000 { -- compatible = "marvell,armada-xp-neta"; -+ compatible = "marvell,armada-370-neta"; - reg = <0x34000 0x4000>; - interrupts = <14>; - clocks = <&gateclk 1>; -diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi -index 8fdd6d7..013d63f 100644 ---- a/arch/arm/boot/dts/armada-xp.dtsi -+++ b/arch/arm/boot/dts/armada-xp.dtsi -@@ -177,7 +177,7 @@ - }; - - eth2: ethernet@30000 { -- compatible = "marvell,armada-xp-neta"; -+ compatible = "marvell,armada-370-neta"; - reg = <0x30000 0x4000>; - interrupts = <12>; - clocks = <&gateclk 2>; -@@ -220,14 +220,6 @@ - }; - }; - -- ethernet@70000 { -- compatible = "marvell,armada-xp-neta"; -- }; -- -- ethernet@74000 { -- compatible = "marvell,armada-xp-neta"; -- }; -- - xor@f0900 { - compatible = "marvell,orion-xor"; - reg = <0xF0900 0x100 -diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi -index 3794ca1..2fd8988 100644 ---- a/arch/arm/boot/dts/sun5i-a10s.dtsi -+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi -@@ -573,7 +573,7 @@ - }; - - rtp: rtp@01c25000 { -- compatible = "allwinner,sun5i-a13-ts"; -+ compatible = "allwinner,sun4i-a10-ts"; - reg = <0x01c25000 0x100>; - interrupts = <29>; - #thermal-sensor-cells = <0>; -diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi -index 5098185..883cb48 100644 ---- a/arch/arm/boot/dts/sun5i-a13.dtsi -+++ b/arch/arm/boot/dts/sun5i-a13.dtsi -@@ -555,7 +555,7 @@ - }; - - rtp: rtp@01c25000 { -- compatible = "allwinner,sun5i-a13-ts"; -+ compatible = "allwinner,sun4i-a10-ts"; - reg = <0x01c25000 0x100>; - interrupts = <29>; - #thermal-sensor-cells = <0>; -diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi -index 2b4847c..fdd1817 100644 ---- a/arch/arm/boot/dts/sun7i-a20.dtsi -+++ b/arch/arm/boot/dts/sun7i-a20.dtsi -@@ -1042,7 +1042,7 @@ - }; - - rtp: rtp@01c25000 { -- compatible = "allwinner,sun5i-a13-ts"; -+ compatible = "allwinner,sun4i-a10-ts"; - reg = <0x01c25000 0x100>; - interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; - #thermal-sensor-cells = <0>; -diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S -index f7db3a5..79caf79 100644 ---- a/arch/arm/kvm/interrupts.S -+++ b/arch/arm/kvm/interrupts.S -@@ -170,9 +170,13 @@ __kvm_vcpu_return: - @ Don't trap coprocessor accesses for host kernel - set_hstr vmexit - set_hdcr vmexit -- set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)), after_vfp_restore -+ set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)) - - #ifdef CONFIG_VFPv3 -+ @ Save floating point registers we if let guest use them. -+ tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11)) -+ bne after_vfp_restore -+ - @ Switch VFP/NEON hardware state to the host's - add r7, vcpu, #VCPU_VFP_GUEST - store_vfp_state r7 -@@ -184,8 +188,6 @@ after_vfp_restore: - @ Restore FPEXC_EN which we clobbered on entry - pop {r2} - VFPFMXR FPEXC, r2 --#else --after_vfp_restore: - #endif - - @ Reset Hyp-role -@@ -481,7 +483,7 @@ switch_to_guest_vfp: - push {r3-r7} - - @ NEON/VFP used. Turn on VFP access. -- set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11)) -+ set_hcptr vmexit, (HCPTR_TCP(10) | HCPTR_TCP(11)) - - @ Switch VFP/NEON hardware state to the guest's - add r7, r0, #VCPU_VFP_HOST -diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S -index 48efe2e..35e4a3a 100644 ---- a/arch/arm/kvm/interrupts_head.S -+++ b/arch/arm/kvm/interrupts_head.S -@@ -591,13 +591,8 @@ ARM_BE8(rev r6, r6 ) - .endm - - /* Configures the HCPTR (Hyp Coprocessor Trap Register) on entry/return -- * (hardware reset value is 0). Keep previous value in r2. -- * An ISB is emited on vmexit/vmtrap, but executed on vmexit only if -- * VFP wasn't already enabled (always executed on vmtrap). -- * If a label is specified with vmexit, it is branched to if VFP wasn't -- * enabled. -- */ --.macro set_hcptr operation, mask, label = none -+ * (hardware reset value is 0). Keep previous value in r2. */ -+.macro set_hcptr operation, mask - mrc p15, 4, r2, c1, c1, 2 - ldr r3, =\mask - .if \operation == vmentry -@@ -606,17 +601,6 @@ ARM_BE8(rev r6, r6 ) - bic r3, r2, r3 @ Don't trap defined coproc-accesses - .endif - mcr p15, 4, r3, c1, c1, 2 -- .if \operation != vmentry -- .if \operation == vmexit -- tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11)) -- beq 1f -- .endif -- isb -- .if \label != none -- b \label -- .endif --1: -- .endif - .endm - - /* Configures the HDCR (Hyp Debug Configuration Register) on entry/return -diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c -index 531e922..02fa8ef 100644 ---- a/arch/arm/kvm/psci.c -+++ b/arch/arm/kvm/psci.c -@@ -230,6 +230,10 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) - case PSCI_0_2_FN64_AFFINITY_INFO: - val = kvm_psci_vcpu_affinity_info(vcpu); - break; -+ case PSCI_0_2_FN_MIGRATE: -+ case PSCI_0_2_FN64_MIGRATE: -+ val = PSCI_RET_NOT_SUPPORTED; -+ break; - case PSCI_0_2_FN_MIGRATE_INFO_TYPE: - /* - * Trusted OS is MP hence does not require migration -@@ -238,6 +242,10 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) - */ - val = PSCI_0_2_TOS_MP; - break; -+ case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU: -+ case PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU: -+ val = PSCI_RET_NOT_SUPPORTED; -+ break; - case PSCI_0_2_FN_SYSTEM_OFF: - kvm_psci_system_off(vcpu); - /* -@@ -263,8 +271,7 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) - ret = 0; - break; - default: -- val = PSCI_RET_NOT_SUPPORTED; -- break; -+ return -EINVAL; - } - - *vcpu_reg(vcpu, 0) = val; -@@ -284,9 +291,12 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) - case KVM_PSCI_FN_CPU_ON: - val = kvm_psci_vcpu_on(vcpu); - break; -- default: -+ case KVM_PSCI_FN_CPU_SUSPEND: -+ case KVM_PSCI_FN_MIGRATE: - val = PSCI_RET_NOT_SUPPORTED; - break; -+ default: -+ return -EINVAL; - } - - *vcpu_reg(vcpu, 0) = val; -diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c -index a2e8ef3..469a150 100644 ---- a/arch/arm/mach-imx/clk-imx6q.c -+++ b/arch/arm/mach-imx/clk-imx6q.c -@@ -443,7 +443,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) - clk[IMX6QDL_CLK_GPMI_IO] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); - clk[IMX6QDL_CLK_GPMI_APB] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); - clk[IMX6QDL_CLK_ROM] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); -- clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ahb", base + 0x7c, 4); -+ clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); - clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); - clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); - clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); -diff --git a/arch/arm/mach-mvebu/pm-board.c b/arch/arm/mach-mvebu/pm-board.c -index 301ab38..6dfd4ab 100644 ---- a/arch/arm/mach-mvebu/pm-board.c -+++ b/arch/arm/mach-mvebu/pm-board.c -@@ -43,9 +43,6 @@ static void mvebu_armada_xp_gp_pm_enter(void __iomem *sdram_reg, u32 srcmd) - for (i = 0; i < ARMADA_XP_GP_PIC_NR_GPIOS; i++) - ackcmd |= BIT(pic_raw_gpios[i]); - -- srcmd = cpu_to_le32(srcmd); -- ackcmd = cpu_to_le32(ackcmd); -- - /* - * Wait a while, the PIC needs quite a bit of time between the - * two GPIO commands. -diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c -index 7469347..88de2dc 100644 ---- a/arch/arm/mach-tegra/cpuidle-tegra20.c -+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c -@@ -34,7 +34,6 @@ - #include "iomap.h" - #include "irq.h" - #include "pm.h" --#include "reset.h" - #include "sleep.h" - - #ifdef CONFIG_PM_SLEEP -@@ -71,13 +70,15 @@ static struct cpuidle_driver tegra_idle_driver = { - - #ifdef CONFIG_PM_SLEEP - #ifdef CONFIG_SMP -+static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); -+ - static int tegra20_reset_sleeping_cpu_1(void) - { - int ret = 0; - - tegra_pen_lock(); - -- if (readb(tegra20_cpu1_resettable_status) == CPU_RESETTABLE) -+ if (readl(pmc + PMC_SCRATCH41) == CPU_RESETTABLE) - tegra20_cpu_shutdown(1); - else - ret = -EINVAL; -diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S -index e3070fd..71be4af 100644 ---- a/arch/arm/mach-tegra/reset-handler.S -+++ b/arch/arm/mach-tegra/reset-handler.S -@@ -169,10 +169,10 @@ after_errata: - cmp r6, #TEGRA20 - bne 1f - /* If not CPU0, don't let CPU0 reset CPU1 now that CPU1 is coming up. */ -- mov32 r5, TEGRA_IRAM_BASE + TEGRA_IRAM_RESET_HANDLER_OFFSET -- mov r0, #CPU_NOT_RESETTABLE -+ mov32 r5, TEGRA_PMC_BASE -+ mov r0, #0 - cmp r10, #0 -- strneb r0, [r5, #__tegra20_cpu1_resettable_status_offset] -+ strne r0, [r5, #PMC_SCRATCH41] - 1: - #endif - -@@ -281,10 +281,6 @@ __tegra_cpu_reset_handler_data: - .rept TEGRA_RESET_DATA_SIZE - .long 0 - .endr -- .globl __tegra20_cpu1_resettable_status_offset -- .equ __tegra20_cpu1_resettable_status_offset, \ -- . - __tegra_cpu_reset_handler_start -- .byte 0 - .align L1_CACHE_SHIFT - - ENTRY(__tegra_cpu_reset_handler_end) -diff --git a/arch/arm/mach-tegra/reset.h b/arch/arm/mach-tegra/reset.h -index 29c3dec..76a9343 100644 ---- a/arch/arm/mach-tegra/reset.h -+++ b/arch/arm/mach-tegra/reset.h -@@ -35,7 +35,6 @@ extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; - - void __tegra_cpu_reset_handler_start(void); - void __tegra_cpu_reset_handler(void); --void __tegra20_cpu1_resettable_status_offset(void); - void __tegra_cpu_reset_handler_end(void); - void tegra_secondary_startup(void); - -@@ -48,9 +47,6 @@ void tegra_secondary_startup(void); - (IO_ADDRESS(TEGRA_IRAM_BASE + TEGRA_IRAM_RESET_HANDLER_OFFSET + \ - ((u32)&__tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_LP2] - \ - (u32)__tegra_cpu_reset_handler_start))) --#define tegra20_cpu1_resettable_status \ -- (IO_ADDRESS(TEGRA_IRAM_BASE + TEGRA_IRAM_RESET_HANDLER_OFFSET + \ -- (u32)__tegra20_cpu1_resettable_status_offset)) - #endif - - #define tegra_cpu_reset_handler_offset \ -diff --git a/arch/arm/mach-tegra/sleep-tegra20.S b/arch/arm/mach-tegra/sleep-tegra20.S -index e6b684e..be4bc5f 100644 ---- a/arch/arm/mach-tegra/sleep-tegra20.S -+++ b/arch/arm/mach-tegra/sleep-tegra20.S -@@ -97,10 +97,9 @@ ENDPROC(tegra20_hotplug_shutdown) - ENTRY(tegra20_cpu_shutdown) - cmp r0, #0 - reteq lr @ must not be called for CPU 0 -- mov32 r1, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r2, =__tegra20_cpu1_resettable_status_offset -+ mov32 r1, TEGRA_PMC_VIRT + PMC_SCRATCH41 - mov r12, #CPU_RESETTABLE -- strb r12, [r1, r2] -+ str r12, [r1] - - cpu_to_halt_reg r1, r0 - ldr r3, =TEGRA_FLOW_CTRL_VIRT -@@ -183,41 +182,38 @@ ENDPROC(tegra_pen_unlock) - /* - * tegra20_cpu_clear_resettable(void) - * -- * Called to clear the "resettable soon" flag in IRAM variable when -+ * Called to clear the "resettable soon" flag in PMC_SCRATCH41 when - * it is expected that the secondary CPU will be idle soon. - */ - ENTRY(tegra20_cpu_clear_resettable) -- mov32 r1, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r2, =__tegra20_cpu1_resettable_status_offset -+ mov32 r1, TEGRA_PMC_VIRT + PMC_SCRATCH41 - mov r12, #CPU_NOT_RESETTABLE -- strb r12, [r1, r2] -+ str r12, [r1] - ret lr - ENDPROC(tegra20_cpu_clear_resettable) - - /* - * tegra20_cpu_set_resettable_soon(void) - * -- * Called to set the "resettable soon" flag in IRAM variable when -+ * Called to set the "resettable soon" flag in PMC_SCRATCH41 when - * it is expected that the secondary CPU will be idle soon. - */ - ENTRY(tegra20_cpu_set_resettable_soon) -- mov32 r1, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r2, =__tegra20_cpu1_resettable_status_offset -+ mov32 r1, TEGRA_PMC_VIRT + PMC_SCRATCH41 - mov r12, #CPU_RESETTABLE_SOON -- strb r12, [r1, r2] -+ str r12, [r1] - ret lr - ENDPROC(tegra20_cpu_set_resettable_soon) - - /* - * tegra20_cpu_is_resettable_soon(void) - * -- * Returns true if the "resettable soon" flag in IRAM variable has been -+ * Returns true if the "resettable soon" flag in PMC_SCRATCH41 has been - * set because it is expected that the secondary CPU will be idle soon. - */ - ENTRY(tegra20_cpu_is_resettable_soon) -- mov32 r1, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r2, =__tegra20_cpu1_resettable_status_offset -- ldrb r12, [r1, r2] -+ mov32 r1, TEGRA_PMC_VIRT + PMC_SCRATCH41 -+ ldr r12, [r1] - cmp r12, #CPU_RESETTABLE_SOON - moveq r0, #1 - movne r0, #0 -@@ -260,10 +256,9 @@ ENTRY(tegra20_sleep_cpu_secondary_finish) - mov r0, #TEGRA_FLUSH_CACHE_LOUIS - bl tegra_disable_clean_inv_dcache - -- mov32 r0, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r4, =__tegra20_cpu1_resettable_status_offset -+ mov32 r0, TEGRA_PMC_VIRT + PMC_SCRATCH41 - mov r3, #CPU_RESETTABLE -- strb r3, [r0, r4] -+ str r3, [r0] - - bl tegra_cpu_do_idle - -@@ -279,10 +274,10 @@ ENTRY(tegra20_sleep_cpu_secondary_finish) - - bl tegra_pen_lock - -- mov32 r0, TEGRA_IRAM_RESET_BASE_VIRT -- ldr r4, =__tegra20_cpu1_resettable_status_offset -+ mov32 r3, TEGRA_PMC_VIRT -+ add r0, r3, #PMC_SCRATCH41 - mov r3, #CPU_NOT_RESETTABLE -- strb r3, [r0, r4] -+ str r3, [r0] - - bl tegra_pen_unlock - -diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h -index 0d59360..92d46ec 100644 ---- a/arch/arm/mach-tegra/sleep.h -+++ b/arch/arm/mach-tegra/sleep.h -@@ -18,7 +18,6 @@ - #define __MACH_TEGRA_SLEEP_H - - #include "iomap.h" --#include "irammap.h" - - #define TEGRA_ARM_PERIF_VIRT (TEGRA_ARM_PERIF_BASE - IO_CPU_PHYS \ - + IO_CPU_VIRT) -@@ -30,9 +29,6 @@ - + IO_APB_VIRT) - #define TEGRA_PMC_VIRT (TEGRA_PMC_BASE - IO_APB_PHYS + IO_APB_VIRT) - --#define TEGRA_IRAM_RESET_BASE_VIRT (IO_IRAM_VIRT + \ -- TEGRA_IRAM_RESET_HANDLER_OFFSET) -- - /* PMC_SCRATCH37-39 and 41 are used for tegra_pen_lock and idle */ - #define PMC_SCRATCH37 0x130 - #define PMC_SCRATCH38 0x134 -diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h -index afc96ec..9488fa5 100644 ---- a/arch/mips/include/asm/mach-generic/spaces.h -+++ b/arch/mips/include/asm/mach-generic/spaces.h -@@ -94,11 +94,7 @@ - #endif - - #ifndef FIXADDR_TOP --#ifdef CONFIG_KVM_GUEST --#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000) --#else - #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) - #endif --#endif - - #endif /* __ASM_MACH_GENERIC_SPACES_H */ -diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c -index 52f205a..bb68e8d 100644 ---- a/arch/mips/kvm/mips.c -+++ b/arch/mips/kvm/mips.c -@@ -982,7 +982,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) - - /* If nothing is dirty, don't bother messing with page tables. */ - if (is_dirty) { -- memslot = id_to_memslot(kvm->memslots, log->slot); -+ memslot = &kvm->memslots->memslots[log->slot]; - - ga = memslot->base_gfn << PAGE_SHIFT; - ga_end = ga + (memslot->npages << PAGE_SHIFT); -diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c -index d90893b..12b6384 100644 ---- a/arch/powerpc/perf/core-book3s.c -+++ b/arch/powerpc/perf/core-book3s.c -@@ -131,16 +131,7 @@ static void pmao_restore_workaround(bool ebb) { } - - static bool regs_use_siar(struct pt_regs *regs) - { -- /* -- * When we take a performance monitor exception the regs are setup -- * using perf_read_regs() which overloads some fields, in particular -- * regs->result to tell us whether to use SIAR. -- * -- * However if the regs are from another exception, eg. a syscall, then -- * they have not been setup using perf_read_regs() and so regs->result -- * is something random. -- */ -- return ((TRAP(regs) == 0xf00) && regs->result); -+ return !!regs->result; - } - - /* -diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c -index 49b7445..9f73c80 100644 ---- a/arch/s390/kernel/crash_dump.c -+++ b/arch/s390/kernel/crash_dump.c -@@ -415,7 +415,7 @@ static void *nt_s390_vx_low(void *ptr, __vector128 *vx_regs) - ptr += len; - /* Copy lower halves of SIMD registers 0-15 */ - for (i = 0; i < 16; i++) { -- memcpy(ptr, &vx_regs[i].u[2], 8); -+ memcpy(ptr, &vx_regs[i], 8); - ptr += 8; - } - return ptr; -diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c -index b745a10..9de4726 100644 ---- a/arch/s390/kvm/interrupt.c -+++ b/arch/s390/kvm/interrupt.c -@@ -1061,7 +1061,7 @@ static int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq) - if (sclp_has_sigpif()) - return __inject_extcall_sigpif(vcpu, src_id); - -- if (test_and_set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs)) -+ if (!test_and_set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs)) - return -EBUSY; - *extcall = irq->u.extcall; - atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags); -@@ -1606,9 +1606,6 @@ void kvm_s390_clear_float_irqs(struct kvm *kvm) - int i; - - spin_lock(&fi->lock); -- fi->pending_irqs = 0; -- memset(&fi->srv_signal, 0, sizeof(fi->srv_signal)); -- memset(&fi->mchk, 0, sizeof(fi->mchk)); - for (i = 0; i < FIRQ_LIST_COUNT; i++) - clear_irq_list(&fi->lists[i]); - for (i = 0; i < FIRQ_MAX_COUNT; i++) -diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c -index 9afb9d6..55423d8 100644 ---- a/arch/s390/net/bpf_jit_comp.c -+++ b/arch/s390/net/bpf_jit_comp.c -@@ -227,7 +227,7 @@ static inline void reg_set_seen(struct bpf_jit *jit, u32 b1) - ({ \ - /* Branch instruction needs 6 bytes */ \ - int rel = (addrs[i + off + 1] - (addrs[i + 1] - 6)) / 2;\ -- _EMIT6(op1 | reg(b1, b2) << 16 | (rel & 0xffff), op2 | mask); \ -+ _EMIT6(op1 | reg(b1, b2) << 16 | rel, op2 | mask); \ - REG_SET_SEEN(b1); \ - REG_SET_SEEN(b2); \ - }) -diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h -index 41b06fc..f4a555b 100644 ---- a/arch/x86/include/asm/kvm_host.h -+++ b/arch/x86/include/asm/kvm_host.h -@@ -591,7 +591,7 @@ struct kvm_arch { - struct kvm_pic *vpic; - struct kvm_ioapic *vioapic; - struct kvm_pit *vpit; -- atomic_t vapics_in_nmi_mode; -+ int vapics_in_nmi_mode; - struct mutex apic_map_lock; - struct kvm_apic_map *apic_map; - -diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c -index aa4e3a7..4f7001f 100644 ---- a/arch/x86/kernel/cpu/perf_event.c -+++ b/arch/x86/kernel/cpu/perf_event.c -@@ -270,7 +270,11 @@ msr_fail: - - static void hw_perf_event_destroy(struct perf_event *event) - { -- x86_release_hardware(); -+ if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) { -+ release_pmc_hardware(); -+ release_ds_buffers(); -+ mutex_unlock(&pmc_reserve_mutex); -+ } - } - - void hw_perf_lbr_event_destroy(struct perf_event *event) -@@ -320,35 +324,6 @@ set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event *event) - return x86_pmu_extra_regs(val, event); - } - --int x86_reserve_hardware(void) --{ -- int err = 0; -- -- if (!atomic_inc_not_zero(&active_events)) { -- mutex_lock(&pmc_reserve_mutex); -- if (atomic_read(&active_events) == 0) { -- if (!reserve_pmc_hardware()) -- err = -EBUSY; -- else -- reserve_ds_buffers(); -- } -- if (!err) -- atomic_inc(&active_events); -- mutex_unlock(&pmc_reserve_mutex); -- } -- -- return err; --} -- --void x86_release_hardware(void) --{ -- if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) { -- release_pmc_hardware(); -- release_ds_buffers(); -- mutex_unlock(&pmc_reserve_mutex); -- } --} -- - /* - * Check if we can create event of a certain type (that no conflicting events - * are present). -@@ -361,10 +336,9 @@ int x86_add_exclusive(unsigned int what) - return 0; - - mutex_lock(&pmc_reserve_mutex); -- for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) { -+ for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) - if (i != what && atomic_read(&x86_pmu.lbr_exclusive[i])) - goto out; -- } - - atomic_inc(&x86_pmu.lbr_exclusive[what]); - ret = 0; -@@ -553,7 +527,19 @@ static int __x86_pmu_event_init(struct perf_event *event) - if (!x86_pmu_initialized()) - return -ENODEV; - -- err = x86_reserve_hardware(); -+ err = 0; -+ if (!atomic_inc_not_zero(&active_events)) { -+ mutex_lock(&pmc_reserve_mutex); -+ if (atomic_read(&active_events) == 0) { -+ if (!reserve_pmc_hardware()) -+ err = -EBUSY; -+ else -+ reserve_ds_buffers(); -+ } -+ if (!err) -+ atomic_inc(&active_events); -+ mutex_unlock(&pmc_reserve_mutex); -+ } - if (err) - return err; - -diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h -index f068695..ef78516 100644 ---- a/arch/x86/kernel/cpu/perf_event.h -+++ b/arch/x86/kernel/cpu/perf_event.h -@@ -703,10 +703,6 @@ int x86_add_exclusive(unsigned int what); - - void x86_del_exclusive(unsigned int what); - --int x86_reserve_hardware(void); -- --void x86_release_hardware(void); -- - void hw_perf_lbr_event_destroy(struct perf_event *event); - - int x86_setup_perfctr(struct perf_event *event); -diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c -index 2813ea0..a1e35c9 100644 ---- a/arch/x86/kernel/cpu/perf_event_intel.c -+++ b/arch/x86/kernel/cpu/perf_event_intel.c -@@ -3253,8 +3253,6 @@ __init int intel_pmu_init(void) - - case 61: /* 14nm Broadwell Core-M */ - case 86: /* 14nm Broadwell Xeon D */ -- case 71: /* 14nm Broadwell + GT3e (Intel Iris Pro graphics) */ -- case 79: /* 14nm Broadwell Server */ - x86_pmu.late_ack = true; - memcpy(hw_cache_event_ids, hsw_hw_cache_event_ids, sizeof(hw_cache_event_ids)); - memcpy(hw_cache_extra_regs, hsw_hw_cache_extra_regs, sizeof(hw_cache_extra_regs)); -@@ -3324,13 +3322,13 @@ __init int intel_pmu_init(void) - * counter, so do not extend mask to generic counters - */ - for_each_event_constraint(c, x86_pmu.event_constraints) { -- if (c->cmask == FIXED_EVENT_FLAGS -- && c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) { -- c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1; -+ if (c->cmask != FIXED_EVENT_FLAGS -+ || c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) { -+ continue; - } -- c->idxmsk64 &= -- ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed)); -- c->weight = hweight64(c->idxmsk64); -+ -+ c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1; -+ c->weight += x86_pmu.num_counters; - } - } - -diff --git a/arch/x86/kernel/cpu/perf_event_intel_bts.c b/arch/x86/kernel/cpu/perf_event_intel_bts.c -index 7795f3f..ac1f0c5 100644 ---- a/arch/x86/kernel/cpu/perf_event_intel_bts.c -+++ b/arch/x86/kernel/cpu/perf_event_intel_bts.c -@@ -483,26 +483,17 @@ static int bts_event_add(struct perf_event *event, int mode) - - static void bts_event_destroy(struct perf_event *event) - { -- x86_release_hardware(); - x86_del_exclusive(x86_lbr_exclusive_bts); - } - - static int bts_event_init(struct perf_event *event) - { -- int ret; -- - if (event->attr.type != bts_pmu.type) - return -ENOENT; - - if (x86_add_exclusive(x86_lbr_exclusive_bts)) - return -EBUSY; - -- ret = x86_reserve_hardware(); -- if (ret) { -- x86_del_exclusive(x86_lbr_exclusive_bts); -- return ret; -- } -- - event->destroy = bts_event_destroy; - - return 0; -diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S -index 7e429c9..53eeb22 100644 ---- a/arch/x86/kernel/head_32.S -+++ b/arch/x86/kernel/head_32.S -@@ -62,16 +62,9 @@ - #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD) - #endif - --/* -- * Number of possible pages in the lowmem region. -- * -- * We shift 2 by 31 instead of 1 by 32 to the left in order to avoid a -- * gas warning about overflowing shift count when gas has been compiled -- * with only a host target support using a 32-bit type for internal -- * representation. -- */ --LOWMEM_PAGES = (((2<<31) - __PAGE_OFFSET) >> PAGE_SHIFT) -- -+/* Number of possible pages in the lowmem region */ -+LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) -+ - /* Enough space to fit pagetables for the low memory linear map */ - MAPPING_BEYOND_END = PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT - -diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c -index f90952f..4dce6f8 100644 ---- a/arch/x86/kvm/i8254.c -+++ b/arch/x86/kvm/i8254.c -@@ -305,7 +305,7 @@ static void pit_do_work(struct kthread_work *work) - * LVT0 to NMI delivery. Other PIC interrupts are just sent to - * VCPU0, and only if its LVT0 is in EXTINT mode. - */ -- if (atomic_read(&kvm->arch.vapics_in_nmi_mode) > 0) -+ if (kvm->arch.vapics_in_nmi_mode > 0) - kvm_for_each_vcpu(i, vcpu, kvm) - kvm_apic_nmi_wd_deliver(vcpu); - } -diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c -index 67d07e0..4c7deb4 100644 ---- a/arch/x86/kvm/lapic.c -+++ b/arch/x86/kvm/lapic.c -@@ -1250,10 +1250,10 @@ static void apic_manage_nmi_watchdog(struct kvm_lapic *apic, u32 lvt0_val) - if (!nmi_wd_enabled) { - apic_debug("Receive NMI setting on APIC_LVT0 " - "for cpu %d\n", apic->vcpu->vcpu_id); -- atomic_inc(&apic->vcpu->kvm->arch.vapics_in_nmi_mode); -+ apic->vcpu->kvm->arch.vapics_in_nmi_mode++; - } - } else if (nmi_wd_enabled) -- atomic_dec(&apic->vcpu->kvm->arch.vapics_in_nmi_mode); -+ apic->vcpu->kvm->arch.vapics_in_nmi_mode--; - } - - static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) -@@ -1808,7 +1808,6 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu, - apic_update_ppr(apic); - hrtimer_cancel(&apic->lapic_timer.timer); - apic_update_lvtt(apic); -- apic_manage_nmi_watchdog(apic, kvm_apic_get_reg(apic, APIC_LVT0)); - update_divide_count(apic); - start_apic_timer(apic); - apic->irr_pending = true; -diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c -index 4911bf1..9afa233 100644 ---- a/arch/x86/kvm/svm.c -+++ b/arch/x86/kvm/svm.c -@@ -511,10 +511,8 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) - { - struct vcpu_svm *svm = to_svm(vcpu); - -- if (svm->vmcb->control.next_rip != 0) { -- WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS)); -+ if (svm->vmcb->control.next_rip != 0) - svm->next_rip = svm->vmcb->control.next_rip; -- } - - if (!svm->next_rip) { - if (emulate_instruction(vcpu, EMULTYPE_SKIP) != -@@ -4319,9 +4317,7 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu, - break; - } - -- /* TODO: Advertise NRIPS to guest hypervisor unconditionally */ -- if (static_cpu_has(X86_FEATURE_NRIPS)) -- vmcb->control.next_rip = info->next_rip; -+ vmcb->control.next_rip = info->next_rip; - vmcb->control.exit_code = icpt_info.exit_code; - vmexit = nested_svm_exit_handled(svm); - -diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c -index ff99117..14a63ed 100644 ---- a/arch/x86/pci/acpi.c -+++ b/arch/x86/pci/acpi.c -@@ -81,17 +81,6 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = { - DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), - }, - }, -- /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368 */ -- /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299 */ -- { -- .callback = set_use_crs, -- .ident = "Foxconn K8M890-8237A", -- .matches = { -- DMI_MATCH(DMI_BOARD_VENDOR, "Foxconn"), -- DMI_MATCH(DMI_BOARD_NAME, "K8M890-8237A"), -- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), -- }, -- }, - - /* Now for the blacklist.. */ - -@@ -132,10 +121,8 @@ void __init pci_acpi_crs_quirks(void) - { - int year; - -- if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) { -- if (iomem_resource.end <= 0xffffffff) -- pci_use_crs = false; -- } -+ if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) -+ pci_use_crs = false; - - dmi_check_system(pci_crs_quirks); - -diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c -index e527a3e..8c81af6 100644 ---- a/drivers/bluetooth/ath3k.c -+++ b/drivers/bluetooth/ath3k.c -@@ -80,7 +80,6 @@ static const struct usb_device_id ath3k_table[] = { - { USB_DEVICE(0x0489, 0xe057) }, - { USB_DEVICE(0x0489, 0xe056) }, - { USB_DEVICE(0x0489, 0xe05f) }, -- { USB_DEVICE(0x0489, 0xe076) }, - { USB_DEVICE(0x0489, 0xe078) }, - { USB_DEVICE(0x04c5, 0x1330) }, - { USB_DEVICE(0x04CA, 0x3004) }, -@@ -89,7 +88,6 @@ static const struct usb_device_id ath3k_table[] = { - { USB_DEVICE(0x04CA, 0x3007) }, - { USB_DEVICE(0x04CA, 0x3008) }, - { USB_DEVICE(0x04CA, 0x300b) }, -- { USB_DEVICE(0x04CA, 0x300d) }, - { USB_DEVICE(0x04CA, 0x300f) }, - { USB_DEVICE(0x04CA, 0x3010) }, - { USB_DEVICE(0x0930, 0x0219) }, -@@ -115,7 +113,6 @@ static const struct usb_device_id ath3k_table[] = { - { USB_DEVICE(0x13d3, 0x3408) }, - { USB_DEVICE(0x13d3, 0x3423) }, - { USB_DEVICE(0x13d3, 0x3432) }, -- { USB_DEVICE(0x13d3, 0x3474) }, - - /* Atheros AR5BBU12 with sflash firmware */ - { USB_DEVICE(0x0489, 0xE02C) }, -@@ -140,7 +137,6 @@ static const struct usb_device_id ath3k_blist_tbl[] = { - { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, -@@ -149,7 +145,6 @@ static const struct usb_device_id ath3k_blist_tbl[] = { - { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, -@@ -175,7 +170,6 @@ static const struct usb_device_id ath3k_blist_tbl[] = { - { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 }, - - /* Atheros AR5BBU22 with sflash firmware */ - { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 }, -diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c -index 420cc9f..3c10d4d 100644 ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -178,7 +178,6 @@ static const struct usb_device_id blacklist_table[] = { - { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, -@@ -187,7 +186,6 @@ static const struct usb_device_id blacklist_table[] = { - { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, -@@ -213,7 +211,6 @@ static const struct usb_device_id blacklist_table[] = { - { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, -- { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 }, - - /* Atheros AR5BBU12 with sflash firmware */ - { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index c45d274..6414661 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -535,7 +535,7 @@ static void byt_set_pstate(struct cpudata *cpudata, int pstate) - - val |= vid; - -- wrmsrl_on_cpu(cpudata->cpu, MSR_IA32_PERF_CTL, val); -+ wrmsrl(MSR_IA32_PERF_CTL, val); - } - - #define BYT_BCLK_FREQS 5 -diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c -index 3442764..5937207 100644 ---- a/drivers/cpuidle/cpuidle-powernv.c -+++ b/drivers/cpuidle/cpuidle-powernv.c -@@ -60,8 +60,6 @@ static int nap_loop(struct cpuidle_device *dev, - return index; - } - --/* Register for fastsleep only in oneshot mode of broadcast */ --#ifdef CONFIG_TICK_ONESHOT - static int fastsleep_loop(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) -@@ -85,7 +83,7 @@ static int fastsleep_loop(struct cpuidle_device *dev, - - return index; - } --#endif -+ - /* - * States for dedicated partition case. - */ -@@ -211,14 +209,7 @@ static int powernv_add_idle_states(void) - powernv_states[nr_idle_states].flags = 0; - powernv_states[nr_idle_states].target_residency = 100; - powernv_states[nr_idle_states].enter = &nap_loop; -- } -- -- /* -- * All cpuidle states with CPUIDLE_FLAG_TIMER_STOP set must come -- * within this config dependency check. -- */ --#ifdef CONFIG_TICK_ONESHOT -- if (flags[i] & OPAL_PM_SLEEP_ENABLED || -+ } else if (flags[i] & OPAL_PM_SLEEP_ENABLED || - flags[i] & OPAL_PM_SLEEP_ENABLED_ER1) { - /* Add FASTSLEEP state */ - strcpy(powernv_states[nr_idle_states].name, "FastSleep"); -@@ -227,7 +218,7 @@ static int powernv_add_idle_states(void) - powernv_states[nr_idle_states].target_residency = 300000; - powernv_states[nr_idle_states].enter = &fastsleep_loop; - } --#endif -+ - powernv_states[nr_idle_states].exit_latency = - ((unsigned int)latency_ns[i]) / 1000; - -diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c -index f062158..857414a 100644 ---- a/drivers/crypto/talitos.c -+++ b/drivers/crypto/talitos.c -@@ -925,8 +925,7 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count, - sg_count--; - link_tbl_ptr--; - } -- link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len) -- + cryptlen); -+ be16_add_cpu(&link_tbl_ptr->len, cryptlen); - - /* tag end of link table */ - link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN; -@@ -2562,7 +2561,6 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, - break; - default: - dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); -- kfree(t_alg); - return ERR_PTR(-EINVAL); - } - -diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c -index ca9f4ed..e1c7e9e 100644 ---- a/drivers/iommu/amd_iommu.c -+++ b/drivers/iommu/amd_iommu.c -@@ -1869,15 +1869,9 @@ static void free_pt_##LVL (unsigned long __pt) \ - pt = (u64 *)__pt; \ - \ - for (i = 0; i < 512; ++i) { \ -- /* PTE present? */ \ - if (!IOMMU_PTE_PRESENT(pt[i])) \ - continue; \ - \ -- /* Large PTE? */ \ -- if (PM_PTE_LEVEL(pt[i]) == 0 || \ -- PM_PTE_LEVEL(pt[i]) == 7) \ -- continue; \ -- \ - p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \ - FN(p); \ - } \ -diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c -index 65075ef..66a803b 100644 ---- a/drivers/iommu/arm-smmu.c -+++ b/drivers/iommu/arm-smmu.c -@@ -1567,7 +1567,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) - return -ENODEV; - } - -- if ((id & ID0_S1TS) && ((smmu->version == 1) || !(id & ID0_ATOSNS))) { -+ if ((id & ID0_S1TS) && ((smmu->version == 1) || (id & ID0_ATOSNS))) { - smmu->features |= ARM_SMMU_FEAT_TRANS_OPS; - dev_notice(smmu->dev, "\taddress translation ops\n"); - } -diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 9231cdf..c80287a 100644 ---- a/drivers/mmc/host/sdhci.c -+++ b/drivers/mmc/host/sdhci.c -@@ -848,7 +848,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) - int sg_cnt; - - sg_cnt = sdhci_pre_dma_transfer(host, data, NULL); -- if (sg_cnt <= 0) { -+ if (sg_cnt == 0) { - /* - * This only happens when someone fed - * us an invalid request. -diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c -index e9b1810..b0f6924 100644 ---- a/drivers/net/can/dev.c -+++ b/drivers/net/can/dev.c -@@ -440,9 +440,6 @@ unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx) - struct can_frame *cf = (struct can_frame *)skb->data; - u8 dlc = cf->can_dlc; - -- if (!(skb->tstamp.tv64)) -- __net_timestamp(skb); -- - netif_rx(priv->echo_skb[idx]); - priv->echo_skb[idx] = NULL; - -@@ -578,7 +575,6 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf) - if (unlikely(!skb)) - return NULL; - -- __net_timestamp(skb); - skb->protocol = htons(ETH_P_CAN); - skb->pkt_type = PACKET_BROADCAST; - skb->ip_summed = CHECKSUM_UNNECESSARY; -@@ -607,7 +603,6 @@ struct sk_buff *alloc_canfd_skb(struct net_device *dev, - if (unlikely(!skb)) - return NULL; - -- __net_timestamp(skb); - skb->protocol = htons(ETH_P_CANFD); - skb->pkt_type = PACKET_BROADCAST; - skb->ip_summed = CHECKSUM_UNNECESSARY; -diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c -index f64f529..c837eb9 100644 ---- a/drivers/net/can/slcan.c -+++ b/drivers/net/can/slcan.c -@@ -207,7 +207,6 @@ static void slc_bump(struct slcan *sl) - if (!skb) - return; - -- __net_timestamp(skb); - skb->dev = sl->dev; - skb->protocol = htons(ETH_P_CAN); - skb->pkt_type = PACKET_BROADCAST; -diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c -index 0ce868d..674f367 100644 ---- a/drivers/net/can/vcan.c -+++ b/drivers/net/can/vcan.c -@@ -78,9 +78,6 @@ static void vcan_rx(struct sk_buff *skb, struct net_device *dev) - skb->dev = dev; - skb->ip_summed = CHECKSUM_UNNECESSARY; - -- if (!(skb->tstamp.tv64)) -- __net_timestamp(skb); -- - netif_rx_ni(skb); - } - -diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c -index 5c92fb7..d81fc6b 100644 ---- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c -+++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c -@@ -263,7 +263,7 @@ static int xgbe_alloc_pages(struct xgbe_prv_data *pdata, - int ret; - - /* Try to obtain pages, decreasing order if necessary */ -- gfp |= __GFP_COLD | __GFP_COMP | __GFP_NOWARN; -+ gfp |= __GFP_COLD | __GFP_COMP; - while (order >= 0) { - pages = alloc_pages(gfp, order); - if (pages) -diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c -index 8a97d28..33501bc 100644 ---- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c -+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c -@@ -9323,8 +9323,7 @@ unload_error: - * function stop ramrod is sent, since as part of this ramrod FW access - * PTP registers. - */ -- if (bp->flags & PTP_SUPPORTED) -- bnx2x_stop_ptp(bp); -+ bnx2x_stop_ptp(bp); - - /* Disable HW interrupts, NAPI */ - bnx2x_netif_stop(bp, 1); -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index 74d0389..ce5f7f9 100644 ---- a/drivers/net/ethernet/marvell/mvneta.c -+++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -310,7 +310,6 @@ struct mvneta_port { - unsigned int link; - unsigned int duplex; - unsigned int speed; -- unsigned int tx_csum_limit; - int use_inband_status:1; - }; - -@@ -1014,12 +1013,6 @@ static void mvneta_defaults_set(struct mvneta_port *pp) - val = mvreg_read(pp, MVNETA_GMAC_CLOCK_DIVIDER); - val |= MVNETA_GMAC_1MS_CLOCK_ENABLE; - mvreg_write(pp, MVNETA_GMAC_CLOCK_DIVIDER, val); -- } else { -- val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); -- val &= ~(MVNETA_GMAC_INBAND_AN_ENABLE | -- MVNETA_GMAC_AN_SPEED_EN | -- MVNETA_GMAC_AN_DUPLEX_EN); -- mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); - } - - mvneta_set_ucast_table(pp, -1); -@@ -2509,10 +2502,8 @@ static int mvneta_change_mtu(struct net_device *dev, int mtu) - - dev->mtu = mtu; - -- if (!netif_running(dev)) { -- netdev_update_features(dev); -+ if (!netif_running(dev)) - return 0; -- } - - /* The interface is running, so we have to force a - * reallocation of the queues -@@ -2541,26 +2532,9 @@ static int mvneta_change_mtu(struct net_device *dev, int mtu) - mvneta_start_dev(pp); - mvneta_port_up(pp); - -- netdev_update_features(dev); -- - return 0; - } - --static netdev_features_t mvneta_fix_features(struct net_device *dev, -- netdev_features_t features) --{ -- struct mvneta_port *pp = netdev_priv(dev); -- -- if (pp->tx_csum_limit && dev->mtu > pp->tx_csum_limit) { -- features &= ~(NETIF_F_IP_CSUM | NETIF_F_TSO); -- netdev_info(dev, -- "Disable IP checksum for MTU greater than %dB\n", -- pp->tx_csum_limit); -- } -- -- return features; --} -- - /* Get mac address */ - static void mvneta_get_mac_addr(struct mvneta_port *pp, unsigned char *addr) - { -@@ -2882,7 +2856,6 @@ static const struct net_device_ops mvneta_netdev_ops = { - .ndo_set_rx_mode = mvneta_set_rx_mode, - .ndo_set_mac_address = mvneta_set_mac_addr, - .ndo_change_mtu = mvneta_change_mtu, -- .ndo_fix_features = mvneta_fix_features, - .ndo_get_stats64 = mvneta_get_stats64, - .ndo_do_ioctl = mvneta_ioctl, - }; -@@ -3128,9 +3101,6 @@ static int mvneta_probe(struct platform_device *pdev) - } - } - -- if (of_device_is_compatible(dn, "marvell,armada-370-neta")) -- pp->tx_csum_limit = 1600; -- - pp->tx_ring_size = MVNETA_MAX_TXD; - pp->rx_ring_size = MVNETA_MAX_RXD; - -@@ -3209,7 +3179,6 @@ static int mvneta_remove(struct platform_device *pdev) - - static const struct of_device_id mvneta_match[] = { - { .compatible = "marvell,armada-370-neta" }, -- { .compatible = "marvell,armada-xp-neta" }, - { } - }; - MODULE_DEVICE_TABLE(of, mvneta_match); -diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c -index a5a0b84..cf467a9 100644 ---- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c -+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c -@@ -1973,6 +1973,10 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv) - mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); - } - -+ if (priv->base_tx_qpn) { -+ mlx4_qp_release_range(priv->mdev->dev, priv->base_tx_qpn, priv->tx_ring_num); -+ priv->base_tx_qpn = 0; -+ } - } - - int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) -diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c -index eab4e08..2a77a6b 100644 ---- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c -+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c -@@ -723,7 +723,7 @@ static int get_fixed_ipv6_csum(__wsum hw_checksum, struct sk_buff *skb, - } - #endif - static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va, -- netdev_features_t dev_features) -+ int hwtstamp_rx_filter) - { - __wsum hw_checksum = 0; - -@@ -731,8 +731,14 @@ static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va, - - hw_checksum = csum_unfold((__force __sum16)cqe->checksum); - -- if (cqe->vlan_my_qpn & cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK) && -- !(dev_features & NETIF_F_HW_VLAN_CTAG_RX)) { -+ if (((struct ethhdr *)va)->h_proto == htons(ETH_P_8021Q) && -+ hwtstamp_rx_filter != HWTSTAMP_FILTER_NONE) { -+ /* next protocol non IPv4 or IPv6 */ -+ if (((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto -+ != htons(ETH_P_IP) && -+ ((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto -+ != htons(ETH_P_IPV6)) -+ return -1; - hw_checksum = get_fixed_vlan_csum(hw_checksum, hdr); - hdr += sizeof(struct vlan_hdr); - } -@@ -895,8 +901,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud - - if (ip_summed == CHECKSUM_COMPLETE) { - void *va = skb_frag_address(skb_shinfo(gro_skb)->frags); -- if (check_csum(cqe, gro_skb, va, -- dev->features)) { -+ if (check_csum(cqe, gro_skb, va, ring->hwtstamp_rx_filter)) { - ip_summed = CHECKSUM_NONE; - ring->csum_none++; - ring->csum_complete--; -@@ -951,7 +956,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud - } - - if (ip_summed == CHECKSUM_COMPLETE) { -- if (check_csum(cqe, skb, skb->data, dev->features)) { -+ if (check_csum(cqe, skb, skb->data, ring->hwtstamp_rx_filter)) { - ip_summed = CHECKSUM_NONE; - ring->csum_complete--; - ring->csum_none++; -diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c -index c10d98f..7bed3a8 100644 ---- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c -+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c -@@ -66,7 +66,6 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, - ring->size = size; - ring->size_mask = size - 1; - ring->stride = stride; -- ring->full_size = ring->size - HEADROOM - MAX_DESC_TXBBS; - - tmp = size * sizeof(struct mlx4_en_tx_info); - ring->tx_info = kmalloc_node(tmp, GFP_KERNEL | __GFP_NOWARN, node); -@@ -181,7 +180,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv, - mlx4_bf_free(mdev->dev, &ring->bf); - mlx4_qp_remove(mdev->dev, &ring->qp); - mlx4_qp_free(mdev->dev, &ring->qp); -- mlx4_qp_release_range(priv->mdev->dev, ring->qpn, 1); - mlx4_en_unmap_buffer(&ring->wqres.buf); - mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); - kfree(ring->bounce_buf); -@@ -233,11 +231,6 @@ void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv, - MLX4_QP_STATE_RST, NULL, 0, 0, &ring->qp); - } - --static inline bool mlx4_en_is_tx_ring_full(struct mlx4_en_tx_ring *ring) --{ -- return ring->prod - ring->cons > ring->full_size; --} -- - static void mlx4_en_stamp_wqe(struct mlx4_en_priv *priv, - struct mlx4_en_tx_ring *ring, int index, - u8 owner) -@@ -480,10 +473,11 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev, - - netdev_tx_completed_queue(ring->tx_queue, packets, bytes); - -- /* Wakeup Tx queue if this stopped, and ring is not full. -+ /* -+ * Wakeup Tx queue if this stopped, and at least 1 packet -+ * was completed - */ -- if (netif_tx_queue_stopped(ring->tx_queue) && -- !mlx4_en_is_tx_ring_full(ring)) { -+ if (netif_tx_queue_stopped(ring->tx_queue) && txbbs_skipped > 0) { - netif_tx_wake_queue(ring->tx_queue); - ring->wake_queue++; - } -@@ -927,7 +921,8 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) - skb_tx_timestamp(skb); - - /* Check available TXBBs And 2K spare for prefetch */ -- stop_queue = mlx4_en_is_tx_ring_full(ring); -+ stop_queue = (int)(ring->prod - ring_cons) > -+ ring->size - HEADROOM - MAX_DESC_TXBBS; - if (unlikely(stop_queue)) { - netif_tx_stop_queue(ring->tx_queue); - ring->queue_stopped++; -@@ -996,7 +991,8 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) - smp_rmb(); - - ring_cons = ACCESS_ONCE(ring->cons); -- if (unlikely(!mlx4_en_is_tx_ring_full(ring))) { -+ if (unlikely(((int)(ring->prod - ring_cons)) <= -+ ring->size - HEADROOM - MAX_DESC_TXBBS)) { - netif_tx_wake_queue(ring->tx_queue); - ring->wake_queue++; - } -diff --git a/drivers/net/ethernet/mellanox/mlx4/intf.c b/drivers/net/ethernet/mellanox/mlx4/intf.c -index 0d80aed..6fce587 100644 ---- a/drivers/net/ethernet/mellanox/mlx4/intf.c -+++ b/drivers/net/ethernet/mellanox/mlx4/intf.c -@@ -93,14 +93,8 @@ int mlx4_register_interface(struct mlx4_interface *intf) - mutex_lock(&intf_mutex); - - list_add_tail(&intf->list, &intf_list); -- list_for_each_entry(priv, &dev_list, dev_list) { -- if (mlx4_is_mfunc(&priv->dev) && (intf->flags & MLX4_INTFF_BONDING)) { -- mlx4_dbg(&priv->dev, -- "SRIOV, disabling HA mode for intf proto %d\n", intf->protocol); -- intf->flags &= ~MLX4_INTFF_BONDING; -- } -+ list_for_each_entry(priv, &dev_list, dev_list) - mlx4_add_device(intf, priv); -- } - - mutex_unlock(&intf_mutex); - -diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h -index 909fcf8..d021f07 100644 ---- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h -+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h -@@ -279,7 +279,6 @@ struct mlx4_en_tx_ring { - u32 size; /* number of TXBBs */ - u32 size_mask; - u16 stride; -- u32 full_size; - u16 cqn; /* index of port CQ associated with this ring */ - u32 buf_size; - __be32 doorbell_qpn; -@@ -580,6 +579,7 @@ struct mlx4_en_priv { - int vids[128]; - bool wol; - struct device *ddev; -+ int base_tx_qpn; - struct hlist_head mac_hash[MLX4_EN_MAC_HASH_SIZE]; - struct hwtstamp_config hwtstamp_config; - -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index d551df6..bdfe51f 100644 ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -796,11 +796,10 @@ static int genphy_config_advert(struct phy_device *phydev) - if (phydev->supported & (SUPPORTED_1000baseT_Half | - SUPPORTED_1000baseT_Full)) { - adv |= ethtool_adv_to_mii_ctrl1000_t(advertise); -+ if (adv != oldadv) -+ changed = 1; - } - -- if (adv != oldadv) -- changed = 1; -- - err = phy_write(phydev, MII_CTRL1000, adv); - if (err < 0) - return err; -diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c -index 4cdac78..b2f9521 100644 ---- a/drivers/net/wireless/b43/main.c -+++ b/drivers/net/wireless/b43/main.c -@@ -5365,10 +5365,6 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy, - *have_5ghz_phy = true; - return; - case 0x4321: /* BCM4306 */ -- /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */ -- if (dev->phy.type != B43_PHYTYPE_G) -- break; -- /* fall through */ - case 0x4313: /* BCM4311 */ - case 0x431a: /* BCM4318 */ - case 0x432a: /* BCM4321 */ -diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c -index ec383b0..968787a 100644 ---- a/drivers/net/xen-netback/xenbus.c -+++ b/drivers/net/xen-netback/xenbus.c -@@ -681,9 +681,6 @@ static int xen_register_watchers(struct xenbus_device *dev, struct xenvif *vif) - char *node; - unsigned maxlen = strlen(dev->nodename) + sizeof("/rate"); - -- if (vif->credit_watch.node) -- return -EADDRINUSE; -- - node = kmalloc(maxlen, GFP_KERNEL); - if (!node) - return -ENOMEM; -@@ -773,7 +770,6 @@ static void connect(struct backend_info *be) - } - - xen_net_read_rate(dev, &credit_bytes, &credit_usec); -- xen_unregister_watchers(be->vif); - xen_register_watchers(dev, be->vif); - read_xenbus_vif_flags(be); - -diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c -index f8d8fdb..6f1fa17 100644 ---- a/drivers/s390/kvm/virtio_ccw.c -+++ b/drivers/s390/kvm/virtio_ccw.c -@@ -65,7 +65,6 @@ struct virtio_ccw_device { - bool is_thinint; - bool going_away; - bool device_lost; -- unsigned int config_ready; - void *airq_info; - }; - -@@ -834,11 +833,8 @@ static void virtio_ccw_get_config(struct virtio_device *vdev, - if (ret) - goto out_free; - -- memcpy(vcdev->config, config_area, offset + len); -- if (buf) -- memcpy(buf, &vcdev->config[offset], len); -- if (vcdev->config_ready < offset + len) -- vcdev->config_ready = offset + len; -+ memcpy(vcdev->config, config_area, sizeof(vcdev->config)); -+ memcpy(buf, &vcdev->config[offset], len); - - out_free: - kfree(config_area); -@@ -861,9 +857,6 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, - if (!config_area) - goto out_free; - -- /* Make sure we don't overwrite fields. */ -- if (vcdev->config_ready < offset) -- virtio_ccw_get_config(vdev, 0, NULL, offset); - memcpy(&vcdev->config[offset], buf, len); - /* Write the config area to the host. */ - memcpy(config_area, vcdev->config, sizeof(vcdev->config)); -diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c -index a086e1d..5c8f581 100644 ---- a/drivers/usb/class/cdc-acm.c -+++ b/drivers/usb/class/cdc-acm.c -@@ -1477,11 +1477,6 @@ skip_countries: - goto alloc_fail8; - } - -- if (quirks & CLEAR_HALT_CONDITIONS) { -- usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress)); -- usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress)); -- } -- - return 0; - alloc_fail8: - if (acm->country_codes) { -@@ -1761,10 +1756,6 @@ static const struct usb_device_id acm_ids[] = { - .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ - }, - -- { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */ -- .driver_info = CLEAR_HALT_CONDITIONS, -- }, -- - /* Nokia S60 phones expose two ACM channels. The first is - * a modem and is picked up by the standard AT-command - * information below. The second is 'vendor-specific' but -diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h -index b3b6c9d..ffeb3c8 100644 ---- a/drivers/usb/class/cdc-acm.h -+++ b/drivers/usb/class/cdc-acm.h -@@ -133,4 +133,3 @@ struct acm { - #define NO_DATA_INTERFACE BIT(4) - #define IGNORE_DEVICE BIT(5) - #define QUIRK_CONTROL_LINE_STATE BIT(6) --#define CLEAR_HALT_CONDITIONS BIT(7) -diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c -index 45b8c8b..3507f88 100644 ---- a/drivers/usb/gadget/function/f_fs.c -+++ b/drivers/usb/gadget/function/f_fs.c -@@ -3435,7 +3435,6 @@ done: - static void ffs_closed(struct ffs_data *ffs) - { - struct ffs_dev *ffs_obj; -- struct f_fs_opts *opts; - - ENTER(); - ffs_dev_lock(); -@@ -3450,13 +3449,8 @@ static void ffs_closed(struct ffs_data *ffs) - ffs_obj->ffs_closed_callback) - ffs_obj->ffs_closed_callback(ffs); - -- if (ffs_obj->opts) -- opts = ffs_obj->opts; -- else -- goto done; -- -- if (opts->no_configfs || !opts->func_inst.group.cg_item.ci_parent -- || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount)) -+ if (!ffs_obj->opts || ffs_obj->opts->no_configfs -+ || !ffs_obj->opts->func_inst.group.cg_item.ci_parent) - goto done; - - unregister_gadget_item(ffs_obj->opts-> -diff --git a/fs/dcache.c b/fs/dcache.c -index 50bb3c2..37b5afd 100644 ---- a/fs/dcache.c -+++ b/fs/dcache.c -@@ -2927,6 +2927,17 @@ restart: - vfsmnt = &mnt->mnt; - continue; - } -+ /* -+ * Filesystems needing to implement special "root names" -+ * should do so with ->d_dname() -+ */ -+ if (IS_ROOT(dentry) && -+ (dentry->d_name.len != 1 || -+ dentry->d_name.name[0] != '/')) { -+ WARN(1, "Root dentry has weird name <%.*s>\n", -+ (int) dentry->d_name.len, -+ dentry->d_name.name); -+ } - if (!error) - error = is_mounted(vfsmnt) ? 1 : 2; - break; -diff --git a/fs/inode.c b/fs/inode.c -index 6e342ca..ea37cd1 100644 ---- a/fs/inode.c -+++ b/fs/inode.c -@@ -1693,8 +1693,8 @@ int file_remove_suid(struct file *file) - error = security_inode_killpriv(dentry); - if (!error && killsuid) - error = __remove_suid(dentry, killsuid); -- if (!error) -- inode_has_no_xattr(inode); -+ if (!error && (inode->i_sb->s_flags & MS_NOSEC)) -+ inode->i_flags |= S_NOSEC; - - return error; - } -diff --git a/fs/namespace.c b/fs/namespace.c -index 1d4a97c..1b9e111 100644 ---- a/fs/namespace.c -+++ b/fs/namespace.c -@@ -3185,15 +3185,11 @@ bool fs_fully_visible(struct file_system_type *type) - if (mnt->mnt.mnt_root != mnt->mnt.mnt_sb->s_root) - continue; - -- /* This mount is not fully visible if there are any -- * locked child mounts that cover anything except for -- * empty directories. -+ /* This mount is not fully visible if there are any child mounts -+ * that cover anything except for empty directories. - */ - list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) { - struct inode *inode = child->mnt_mountpoint->d_inode; -- /* Only worry about locked mounts */ -- if (!(mnt->mnt.mnt_flags & MNT_LOCKED)) -- continue; - if (!S_ISDIR(inode->i_mode)) - goto next; - if (inode->i_nlink > 2) -diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c -index a7106ed..2c10360 100644 ---- a/fs/ufs/balloc.c -+++ b/fs/ufs/balloc.c -@@ -51,8 +51,8 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) - - if (ufs_fragnum(fragment) + count > uspi->s_fpg) - ufs_error (sb, "ufs_free_fragments", "internal error"); -- -- mutex_lock(&UFS_SB(sb)->s_lock); -+ -+ lock_ufs(sb); - - cgno = ufs_dtog(uspi, fragment); - bit = ufs_dtogd(uspi, fragment); -@@ -115,13 +115,13 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) - if (sb->s_flags & MS_SYNCHRONOUS) - ubh_sync_block(UCPI_UBH(ucpi)); - ufs_mark_sb_dirty(sb); -- -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ -+ unlock_ufs(sb); - UFSD("EXIT\n"); - return; - - failed: -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT (FAILED)\n"); - return; - } -@@ -151,7 +151,7 @@ void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) - goto failed; - } - -- mutex_lock(&UFS_SB(sb)->s_lock); -+ lock_ufs(sb); - - do_more: - overflow = 0; -@@ -211,12 +211,12 @@ do_more: - } - - ufs_mark_sb_dirty(sb); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT\n"); - return; - - failed_unlock: -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - failed: - UFSD("EXIT (FAILED)\n"); - return; -@@ -357,7 +357,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - usb1 = ubh_get_usb_first(uspi); - *err = -ENOSPC; - -- mutex_lock(&UFS_SB(sb)->s_lock); -+ lock_ufs(sb); - tmp = ufs_data_ptr_to_cpu(sb, p); - - if (count + ufs_fragnum(fragment) > uspi->s_fpb) { -@@ -378,19 +378,19 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - "fragment %llu, tmp %llu\n", - (unsigned long long)fragment, - (unsigned long long)tmp); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - return INVBLOCK; - } - if (fragment < UFS_I(inode)->i_lastfrag) { - UFSD("EXIT (ALREADY ALLOCATED)\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - return 0; - } - } - else { - if (tmp) { - UFSD("EXIT (ALREADY ALLOCATED)\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - return 0; - } - } -@@ -399,7 +399,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - * There is not enough space for user on the device - */ - if (!capable(CAP_SYS_RESOURCE) && ufs_freespace(uspi, UFS_MINFREE) <= 0) { -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT (FAILED)\n"); - return 0; - } -@@ -424,7 +424,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - ufs_clear_frags(inode, result + oldcount, - newcount - oldcount, locked_page != NULL); - } -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT, result %llu\n", (unsigned long long)result); - return result; - } -@@ -439,7 +439,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - fragment + count); - ufs_clear_frags(inode, result + oldcount, newcount - oldcount, - locked_page != NULL); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT, result %llu\n", (unsigned long long)result); - return result; - } -@@ -477,7 +477,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - *err = 0; - UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag, - fragment + count); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - if (newcount < request) - ufs_free_fragments (inode, result + newcount, request - newcount); - ufs_free_fragments (inode, tmp, oldcount); -@@ -485,7 +485,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, - return result; - } - -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT (FAILED)\n"); - return 0; - } -diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c -index fd0203c..7caa016 100644 ---- a/fs/ufs/ialloc.c -+++ b/fs/ufs/ialloc.c -@@ -69,11 +69,11 @@ void ufs_free_inode (struct inode * inode) - - ino = inode->i_ino; - -- mutex_lock(&UFS_SB(sb)->s_lock); -+ lock_ufs(sb); - - if (!((ino > 1) && (ino < (uspi->s_ncg * uspi->s_ipg )))) { - ufs_warning(sb, "ufs_free_inode", "reserved inode or nonexistent inode %u\n", ino); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - return; - } - -@@ -81,7 +81,7 @@ void ufs_free_inode (struct inode * inode) - bit = ufs_inotocgoff (ino); - ucpi = ufs_load_cylinder (sb, cg); - if (!ucpi) { -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - return; - } - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); -@@ -115,7 +115,7 @@ void ufs_free_inode (struct inode * inode) - ubh_sync_block(UCPI_UBH(ucpi)); - - ufs_mark_sb_dirty(sb); -- mutex_unlock(&UFS_SB(sb)->s_lock); -+ unlock_ufs(sb); - UFSD("EXIT\n"); - } - -@@ -193,7 +193,7 @@ struct inode *ufs_new_inode(struct inode *dir, umode_t mode) - sbi = UFS_SB(sb); - uspi = sbi->s_uspi; - -- mutex_lock(&sbi->s_lock); -+ lock_ufs(sb); - - /* - * Try to place the inode in its parent directory -@@ -331,21 +331,21 @@ cg_found: - sync_dirty_buffer(bh); - brelse(bh); - } -- mutex_unlock(&sbi->s_lock); -+ unlock_ufs(sb); - - UFSD("allocating inode %lu\n", inode->i_ino); - UFSD("EXIT\n"); - return inode; - - fail_remove_inode: -- mutex_unlock(&sbi->s_lock); -+ unlock_ufs(sb); - clear_nlink(inode); - unlock_new_inode(inode); - iput(inode); - UFSD("EXIT (FAILED): err %d\n", err); - return ERR_PTR(err); - failed: -- mutex_unlock(&sbi->s_lock); -+ unlock_ufs(sb); - make_bad_inode(inode); - iput (inode); - UFSD("EXIT (FAILED): err %d\n", err); -diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c -index 2d93ab0..be7d42c 100644 ---- a/fs/ufs/inode.c -+++ b/fs/ufs/inode.c -@@ -902,9 +902,6 @@ void ufs_evict_inode(struct inode * inode) - invalidate_inode_buffers(inode); - clear_inode(inode); - -- if (want_delete) { -- lock_ufs(inode->i_sb); -+ if (want_delete) - ufs_free_inode(inode); -- unlock_ufs(inode->i_sb); -- } - } -diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c -index 60ee322..e491a93 100644 ---- a/fs/ufs/namei.c -+++ b/fs/ufs/namei.c -@@ -128,12 +128,12 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, - if (l > sb->s_blocksize) - goto out_notlocked; - -- lock_ufs(dir->i_sb); - inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); - err = PTR_ERR(inode); - if (IS_ERR(inode)) -- goto out; -+ goto out_notlocked; - -+ lock_ufs(dir->i_sb); - if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) { - /* slow symlink */ - inode->i_op = &ufs_symlink_inode_operations; -@@ -174,12 +174,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir, - inode_inc_link_count(inode); - ihold(inode); - -- error = ufs_add_link(dentry, inode); -- if (error) { -- inode_dec_link_count(inode); -- iput(inode); -- } else -- d_instantiate(dentry, inode); -+ error = ufs_add_nondir(dentry, inode); - unlock_ufs(dir->i_sb); - return error; - } -@@ -189,13 +184,9 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) - struct inode * inode; - int err; - -- lock_ufs(dir->i_sb); -- inode_inc_link_count(dir); -- - inode = ufs_new_inode(dir, S_IFDIR|mode); -- err = PTR_ERR(inode); - if (IS_ERR(inode)) -- goto out_dir; -+ return PTR_ERR(inode); - - inode->i_op = &ufs_dir_inode_operations; - inode->i_fop = &ufs_dir_operations; -@@ -203,6 +194,9 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) - - inode_inc_link_count(inode); - -+ lock_ufs(dir->i_sb); -+ inode_inc_link_count(dir); -+ - err = ufs_make_empty(inode, dir); - if (err) - goto out_fail; -@@ -212,7 +206,6 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) - goto out_fail; - unlock_ufs(dir->i_sb); - -- unlock_new_inode(inode); - d_instantiate(dentry, inode); - out: - return err; -@@ -222,7 +215,6 @@ out_fail: - inode_dec_link_count(inode); - unlock_new_inode(inode); - iput (inode); --out_dir: - inode_dec_link_count(dir); - unlock_ufs(dir->i_sb); - goto out; -diff --git a/fs/ufs/super.c b/fs/ufs/super.c -index dc33f94..b3bc3e7 100644 ---- a/fs/ufs/super.c -+++ b/fs/ufs/super.c -@@ -694,7 +694,6 @@ static int ufs_sync_fs(struct super_block *sb, int wait) - unsigned flags; - - lock_ufs(sb); -- mutex_lock(&UFS_SB(sb)->s_lock); - - UFSD("ENTER\n"); - -@@ -712,7 +711,6 @@ static int ufs_sync_fs(struct super_block *sb, int wait) - ufs_put_cstotal(sb); - - UFSD("EXIT\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - - return 0; -@@ -801,7 +799,6 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) - UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY)); - - mutex_init(&sbi->mutex); -- mutex_init(&sbi->s_lock); - spin_lock_init(&sbi->work_lock); - INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); - /* -@@ -1280,7 +1277,6 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - - sync_filesystem(sb); - lock_ufs(sb); -- mutex_lock(&UFS_SB(sb)->s_lock); - uspi = UFS_SB(sb)->s_uspi; - flags = UFS_SB(sb)->s_flags; - usb1 = ubh_get_usb_first(uspi); -@@ -1294,7 +1290,6 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - new_mount_opt = 0; - ufs_set_opt (new_mount_opt, ONERROR_LOCK); - if (!ufs_parse_options (data, &new_mount_opt)) { -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return -EINVAL; - } -@@ -1302,14 +1297,12 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - new_mount_opt |= ufstype; - } else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) { - pr_err("ufstype can't be changed during remount\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return -EINVAL; - } - - if ((*mount_flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { - UFS_SB(sb)->s_mount_opt = new_mount_opt; -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return 0; - } -@@ -1333,7 +1326,6 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - */ - #ifndef CONFIG_UFS_FS_WRITE - pr_err("ufs was compiled with read-only support, can't be mounted as read-write\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return -EINVAL; - #else -@@ -1343,13 +1335,11 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - ufstype != UFS_MOUNT_UFSTYPE_SUNx86 && - ufstype != UFS_MOUNT_UFSTYPE_UFS2) { - pr_err("this ufstype is read-only supported\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return -EINVAL; - } - if (!ufs_read_cylinder_structures(sb)) { - pr_err("failed during remounting\n"); -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return -EPERM; - } -@@ -1357,7 +1347,6 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) - #endif - } - UFS_SB(sb)->s_mount_opt = new_mount_opt; -- mutex_unlock(&UFS_SB(sb)->s_lock); - unlock_ufs(sb); - return 0; - } -diff --git a/fs/ufs/ufs.h b/fs/ufs/ufs.h -index cf6368d..2a07396 100644 ---- a/fs/ufs/ufs.h -+++ b/fs/ufs/ufs.h -@@ -30,7 +30,6 @@ struct ufs_sb_info { - int work_queued; /* non-zero if the delayed work is queued */ - struct delayed_work sync_work; /* FS sync delayed work */ - spinlock_t work_lock; /* protects sync_work and work_queued */ -- struct mutex s_lock; - }; - - struct ufs_inode_info { -diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h -index 8ba379f..3573a81 100644 ---- a/include/net/netns/sctp.h -+++ b/include/net/netns/sctp.h -@@ -31,7 +31,6 @@ struct netns_sctp { - struct list_head addr_waitq; - struct timer_list addr_wq_timer; - struct list_head auto_asconf_splist; -- /* Lock that protects both addr_waitq and auto_asconf_splist */ - spinlock_t addr_wq_lock; - - /* Lock that protects the local_addr_list writers */ -diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h -index 495c87e..2bb2fcf 100644 ---- a/include/net/sctp/structs.h -+++ b/include/net/sctp/structs.h -@@ -223,10 +223,6 @@ struct sctp_sock { - atomic_t pd_mode; - /* Receive to here while partial delivery is in effect. */ - struct sk_buff_head pd_lobby; -- -- /* These must be the last fields, as they will skipped on copies, -- * like on accept and peeloff operations -- */ - struct list_head auto_asconf_list; - int do_auto_asconf; - }; diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 1a0006a..4842a98 100644 --- a/include/uapi/linux/Kbuild @@ -24084,463 +21991,6 @@ index 0000000..5297166 +size_t kdbus_kvec_pad(struct kvec *kvec, u64 *len); + +#endif -diff --git a/kernel/events/core.c b/kernel/events/core.c -index 0ceb386..eddf1ed 100644 ---- a/kernel/events/core.c -+++ b/kernel/events/core.c -@@ -4331,20 +4331,20 @@ static void ring_buffer_attach(struct perf_event *event, - WARN_ON_ONCE(event->rcu_pending); - - old_rb = event->rb; -+ event->rcu_batches = get_state_synchronize_rcu(); -+ event->rcu_pending = 1; -+ - spin_lock_irqsave(&old_rb->event_lock, flags); - list_del_rcu(&event->rb_entry); - spin_unlock_irqrestore(&old_rb->event_lock, flags); -+ } - -- event->rcu_batches = get_state_synchronize_rcu(); -- event->rcu_pending = 1; -+ if (event->rcu_pending && rb) { -+ cond_synchronize_rcu(event->rcu_batches); -+ event->rcu_pending = 0; - } - - if (rb) { -- if (event->rcu_pending) { -- cond_synchronize_rcu(event->rcu_batches); -- event->rcu_pending = 0; -- } -- - spin_lock_irqsave(&rb->event_lock, flags); - list_add_rcu(&event->rb_entry, &rb->event_list); - spin_unlock_irqrestore(&rb->event_lock, flags); -diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c -index 8d423bc..a9a4a1b 100644 ---- a/net/bridge/br_ioctl.c -+++ b/net/bridge/br_ioctl.c -@@ -247,7 +247,9 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) - if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) - return -EPERM; - -+ spin_lock_bh(&br->lock); - br_stp_set_bridge_priority(br, args[1]); -+ spin_unlock_bh(&br->lock); - return 0; - - case BRCTL_SET_PORT_PRIORITY: -diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c -index 7832d07..4114687 100644 ---- a/net/bridge/br_stp_if.c -+++ b/net/bridge/br_stp_if.c -@@ -243,13 +243,12 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br) - return true; - } - --/* Acquires and releases bridge lock */ -+/* called under bridge lock */ - void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio) - { - struct net_bridge_port *p; - int wasroot; - -- spin_lock_bh(&br->lock); - wasroot = br_is_root_bridge(br); - - list_for_each_entry(p, &br->port_list, list) { -@@ -267,7 +266,6 @@ void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio) - br_port_state_selection(br); - if (br_is_root_bridge(br) && !wasroot) - br_become_root_bridge(br); -- spin_unlock_bh(&br->lock); - } - - /* called under bridge lock */ -diff --git a/net/can/af_can.c b/net/can/af_can.c -index 689c818..32d710e 100644 ---- a/net/can/af_can.c -+++ b/net/can/af_can.c -@@ -310,12 +310,8 @@ int can_send(struct sk_buff *skb, int loop) - return err; - } - -- if (newskb) { -- if (!(newskb->tstamp.tv64)) -- __net_timestamp(newskb); -- -+ if (newskb) - netif_rx_ni(newskb); -- } - - /* update statistics */ - can_stats.tx_frames++; -diff --git a/net/core/neighbour.c b/net/core/neighbour.c -index 2237c1b..3de6542 100644 ---- a/net/core/neighbour.c -+++ b/net/core/neighbour.c -@@ -957,8 +957,6 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) - rc = 0; - if (neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)) - goto out_unlock_bh; -- if (neigh->dead) -- goto out_dead; - - if (!(neigh->nud_state & (NUD_STALE | NUD_INCOMPLETE))) { - if (NEIGH_VAR(neigh->parms, MCAST_PROBES) + -@@ -1015,13 +1013,6 @@ out_unlock_bh: - write_unlock(&neigh->lock); - local_bh_enable(); - return rc; -- --out_dead: -- if (neigh->nud_state & NUD_STALE) -- goto out_unlock_bh; -- write_unlock_bh(&neigh->lock); -- kfree_skb(skb); -- return 1; - } - EXPORT_SYMBOL(__neigh_event_send); - -@@ -1085,8 +1076,6 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, - if (!(flags & NEIGH_UPDATE_F_ADMIN) && - (old & (NUD_NOARP | NUD_PERMANENT))) - goto out; -- if (neigh->dead) -- goto out; - - if (!(new & NUD_VALID)) { - neigh_del_timer(neigh); -@@ -1236,8 +1225,6 @@ EXPORT_SYMBOL(neigh_update); - */ - void __neigh_set_probe_once(struct neighbour *neigh) - { -- if (neigh->dead) -- return; - neigh->updated = jiffies; - if (!(neigh->nud_state & NUD_FAILED)) - return; -diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c -index a5aa54e..8b47a4d 100644 ---- a/net/ipv4/af_inet.c -+++ b/net/ipv4/af_inet.c -@@ -228,8 +228,6 @@ int inet_listen(struct socket *sock, int backlog) - err = 0; - if (err) - goto out; -- -- tcp_fastopen_init_key_once(true); - } - err = inet_csk_listen_start(sk, backlog); - if (err) -diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c -index 6ddde89..7cfb089 100644 ---- a/net/ipv4/ip_sockglue.c -+++ b/net/ipv4/ip_sockglue.c -@@ -432,15 +432,6 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 inf - kfree_skb(skb); - } - --/* For some errors we have valid addr_offset even with zero payload and -- * zero port. Also, addr_offset should be supported if port is set. -- */ --static inline bool ipv4_datagram_support_addr(struct sock_exterr_skb *serr) --{ -- return serr->ee.ee_origin == SO_EE_ORIGIN_ICMP || -- serr->ee.ee_origin == SO_EE_ORIGIN_LOCAL || serr->port; --} -- - /* IPv4 supports cmsg on all imcp errors and some timestamps - * - * Timestamp code paths do not initialize the fields expected by cmsg: -@@ -507,7 +498,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) - - serr = SKB_EXT_ERR(skb); - -- if (sin && ipv4_datagram_support_addr(serr)) { -+ if (sin && serr->port) { - sin->sin_family = AF_INET; - sin->sin_addr.s_addr = *(__be32 *)(skb_network_header(skb) + - serr->addr_offset); -diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c -index bb2ce74..f1377f2 100644 ---- a/net/ipv4/tcp.c -+++ b/net/ipv4/tcp.c -@@ -2545,13 +2545,10 @@ static int do_tcp_setsockopt(struct sock *sk, int level, - - case TCP_FASTOPEN: - if (val >= 0 && ((1 << sk->sk_state) & (TCPF_CLOSE | -- TCPF_LISTEN))) { -- tcp_fastopen_init_key_once(true); -- -+ TCPF_LISTEN))) - err = fastopen_init_queue(sk, val); -- } else { -+ else - err = -EINVAL; -- } - break; - case TCP_TIMESTAMP: - if (!tp->repair) -diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c -index f9c0fb8..46b087a 100644 ---- a/net/ipv4/tcp_fastopen.c -+++ b/net/ipv4/tcp_fastopen.c -@@ -78,6 +78,8 @@ static bool __tcp_fastopen_cookie_gen(const void *path, - struct tcp_fastopen_context *ctx; - bool ok = false; - -+ tcp_fastopen_init_key_once(true); -+ - rcu_read_lock(); - ctx = rcu_dereference(tcp_fastopen_ctx); - if (ctx) { -diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c -index 62d908e..762a58c 100644 ---- a/net/ipv6/datagram.c -+++ b/net/ipv6/datagram.c -@@ -325,16 +325,6 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu) - kfree_skb(skb); - } - --/* For some errors we have valid addr_offset even with zero payload and -- * zero port. Also, addr_offset should be supported if port is set. -- */ --static inline bool ipv6_datagram_support_addr(struct sock_exterr_skb *serr) --{ -- return serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6 || -- serr->ee.ee_origin == SO_EE_ORIGIN_ICMP || -- serr->ee.ee_origin == SO_EE_ORIGIN_LOCAL || serr->port; --} -- - /* IPv6 supports cmsg on all origins aside from SO_EE_ORIGIN_LOCAL. - * - * At one point, excluding local errors was a quick test to identify icmp/icmp6 -@@ -399,7 +389,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) - - serr = SKB_EXT_ERR(skb); - -- if (sin && ipv6_datagram_support_addr(serr)) { -+ if (sin && serr->port) { - const unsigned char *nh = skb_network_header(skb); - sin->sin6_family = AF_INET6; - sin->sin6_flowinfo = 0; -diff --git a/net/mac80211/key.c b/net/mac80211/key.c -index 81e9785..a907f2d 100644 ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -66,15 +66,12 @@ update_vlan_tailroom_need_count(struct ieee80211_sub_if_data *sdata, int delta) - if (sdata->vif.type != NL80211_IFTYPE_AP) - return; - -- /* crypto_tx_tailroom_needed_cnt is protected by this */ -- assert_key_lock(sdata->local); -- -- rcu_read_lock(); -+ mutex_lock(&sdata->local->mtx); - -- list_for_each_entry_rcu(vlan, &sdata->u.ap.vlans, u.vlan.list) -+ list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) - vlan->crypto_tx_tailroom_needed_cnt += delta; - -- rcu_read_unlock(); -+ mutex_unlock(&sdata->local->mtx); - } - - static void increment_tailroom_need_count(struct ieee80211_sub_if_data *sdata) -@@ -98,8 +95,6 @@ static void increment_tailroom_need_count(struct ieee80211_sub_if_data *sdata) - * http://mid.gmane.org/1308590980.4322.19.camel@jlt3.sipsolutions.net - */ - -- assert_key_lock(sdata->local); -- - update_vlan_tailroom_need_count(sdata, 1); - - if (!sdata->crypto_tx_tailroom_needed_cnt++) { -@@ -114,8 +109,6 @@ static void increment_tailroom_need_count(struct ieee80211_sub_if_data *sdata) - static void decrease_tailroom_need_count(struct ieee80211_sub_if_data *sdata, - int delta) - { -- assert_key_lock(sdata->local); -- - WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt < delta); - - update_vlan_tailroom_need_count(sdata, -delta); -diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c -index fe1610d..b5989c6 100644 ---- a/net/packet/af_packet.c -+++ b/net/packet/af_packet.c -@@ -1272,6 +1272,16 @@ static void packet_sock_destruct(struct sock *sk) - sk_refcnt_debug_dec(sk); - } - -+static int fanout_rr_next(struct packet_fanout *f, unsigned int num) -+{ -+ int x = atomic_read(&f->rr_cur) + 1; -+ -+ if (x >= num) -+ x = 0; -+ -+ return x; -+} -+ - static unsigned int fanout_demux_hash(struct packet_fanout *f, - struct sk_buff *skb, - unsigned int num) -@@ -1283,9 +1293,13 @@ static unsigned int fanout_demux_lb(struct packet_fanout *f, - struct sk_buff *skb, - unsigned int num) - { -- unsigned int val = atomic_inc_return(&f->rr_cur); -+ int cur, old; - -- return val % num; -+ cur = atomic_read(&f->rr_cur); -+ while ((old = atomic_cmpxchg(&f->rr_cur, cur, -+ fanout_rr_next(f, num))) != cur) -+ cur = old; -+ return cur; - } - - static unsigned int fanout_demux_cpu(struct packet_fanout *f, -@@ -1339,7 +1353,7 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev, - struct packet_type *pt, struct net_device *orig_dev) - { - struct packet_fanout *f = pt->af_packet_priv; -- unsigned int num = READ_ONCE(f->num_members); -+ unsigned int num = f->num_members; - struct packet_sock *po; - unsigned int idx; - -diff --git a/net/sctp/output.c b/net/sctp/output.c -index abe7c2d..fc5e45b 100644 ---- a/net/sctp/output.c -+++ b/net/sctp/output.c -@@ -599,9 +599,7 @@ out: - return err; - no_route: - kfree_skb(nskb); -- -- if (asoc) -- IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES); -+ IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES); - - /* FIXME: Returning the 'err' will effect all the associations - * associated with a socket, although only one of the paths of the -diff --git a/net/sctp/socket.c b/net/sctp/socket.c -index 5f6c4e6..f09de7f 100644 ---- a/net/sctp/socket.c -+++ b/net/sctp/socket.c -@@ -1528,10 +1528,8 @@ static void sctp_close(struct sock *sk, long timeout) - - /* Supposedly, no process has access to the socket, but - * the net layers still may. -- * Also, sctp_destroy_sock() needs to be called with addr_wq_lock -- * held and that should be grabbed before socket lock. - */ -- spin_lock_bh(&net->sctp.addr_wq_lock); -+ local_bh_disable(); - bh_lock_sock(sk); - - /* Hold the sock, since sk_common_release() will put sock_put() -@@ -1541,7 +1539,7 @@ static void sctp_close(struct sock *sk, long timeout) - sk_common_release(sk); - - bh_unlock_sock(sk); -- spin_unlock_bh(&net->sctp.addr_wq_lock); -+ local_bh_enable(); - - sock_put(sk); - -@@ -3582,7 +3580,6 @@ static int sctp_setsockopt_auto_asconf(struct sock *sk, char __user *optval, - if ((val && sp->do_auto_asconf) || (!val && !sp->do_auto_asconf)) - return 0; - -- spin_lock_bh(&sock_net(sk)->sctp.addr_wq_lock); - if (val == 0 && sp->do_auto_asconf) { - list_del(&sp->auto_asconf_list); - sp->do_auto_asconf = 0; -@@ -3591,7 +3588,6 @@ static int sctp_setsockopt_auto_asconf(struct sock *sk, char __user *optval, - &sock_net(sk)->sctp.auto_asconf_splist); - sp->do_auto_asconf = 1; - } -- spin_unlock_bh(&sock_net(sk)->sctp.addr_wq_lock); - return 0; - } - -@@ -4125,28 +4121,18 @@ static int sctp_init_sock(struct sock *sk) - local_bh_disable(); - percpu_counter_inc(&sctp_sockets_allocated); - sock_prot_inuse_add(net, sk->sk_prot, 1); -- -- /* Nothing can fail after this block, otherwise -- * sctp_destroy_sock() will be called without addr_wq_lock held -- */ - if (net->sctp.default_auto_asconf) { -- spin_lock(&sock_net(sk)->sctp.addr_wq_lock); - list_add_tail(&sp->auto_asconf_list, - &net->sctp.auto_asconf_splist); - sp->do_auto_asconf = 1; -- spin_unlock(&sock_net(sk)->sctp.addr_wq_lock); -- } else { -+ } else - sp->do_auto_asconf = 0; -- } -- - local_bh_enable(); - - return 0; - } - --/* Cleanup any SCTP per socket resources. Must be called with -- * sock_net(sk)->sctp.addr_wq_lock held if sp->do_auto_asconf is true -- */ -+/* Cleanup any SCTP per socket resources. */ - static void sctp_destroy_sock(struct sock *sk) - { - struct sctp_sock *sp; -@@ -7209,19 +7195,6 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk, - newinet->mc_list = NULL; - } - --static inline void sctp_copy_descendant(struct sock *sk_to, -- const struct sock *sk_from) --{ -- int ancestor_size = sizeof(struct inet_sock) + -- sizeof(struct sctp_sock) - -- offsetof(struct sctp_sock, auto_asconf_list); -- -- if (sk_from->sk_family == PF_INET6) -- ancestor_size += sizeof(struct ipv6_pinfo); -- -- __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size); --} -- - /* Populate the fields of the newsk from the oldsk and migrate the assoc - * and its messages to the newsk. - */ -@@ -7236,6 +7209,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, - struct sk_buff *skb, *tmp; - struct sctp_ulpevent *event; - struct sctp_bind_hashbucket *head; -+ struct list_head tmplist; - - /* Migrate socket buffer sizes and all the socket level options to the - * new socket. -@@ -7243,7 +7217,12 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, - newsk->sk_sndbuf = oldsk->sk_sndbuf; - newsk->sk_rcvbuf = oldsk->sk_rcvbuf; - /* Brute force copy old sctp opt. */ -- sctp_copy_descendant(newsk, oldsk); -+ if (oldsp->do_auto_asconf) { -+ memcpy(&tmplist, &newsp->auto_asconf_list, sizeof(tmplist)); -+ inet_sk_copy_descendant(newsk, oldsk); -+ memcpy(&newsp->auto_asconf_list, &tmplist, sizeof(tmplist)); -+ } else -+ inet_sk_copy_descendant(newsk, oldsk); - - /* Restore the ep value that was overwritten with the above structure - * copy. diff --git a/samples/Kconfig b/samples/Kconfig index 224ebb4..a4c6b2f 100644 --- a/samples/Kconfig @@ -26063,39 +23513,6 @@ index 0000000..c3ba958 +} + +#endif /* libc sanity check */ -diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index 212070e..7dade28 100644 ---- a/security/selinux/hooks.c -+++ b/security/selinux/hooks.c -@@ -403,7 +403,6 @@ static int selinux_is_sblabel_mnt(struct super_block *sb) - return sbsec->behavior == SECURITY_FS_USE_XATTR || - sbsec->behavior == SECURITY_FS_USE_TRANS || - sbsec->behavior == SECURITY_FS_USE_TASK || -- sbsec->behavior == SECURITY_FS_USE_NATIVE || - /* Special handling. Genfs but also in-core setxattr handler */ - !strcmp(sb->s_type->name, "sysfs") || - !strcmp(sb->s_type->name, "pstore") || -diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build -index 98cfc38..10df572 100644 ---- a/tools/build/Makefile.build -+++ b/tools/build/Makefile.build -@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y)) - subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y)) - - # '$(OUTPUT)/dir' prefix to all objects --objprefix := $(subst ./,,$(OUTPUT)$(dir)/) --obj-y := $(addprefix $(objprefix),$(obj-y)) --subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y)) -+prefix := $(subst ./,,$(OUTPUT)$(dir)/) -+obj-y := $(addprefix $(prefix),$(obj-y)) -+subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y)) - - # Final '$(obj)-in.o' object --in-target := $(objprefix)$(obj)-in.o -+in-target := $(prefix)$(obj)-in.o - - PHONY += $(subdir-y) - diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 95abddc..b57100c 100644 --- a/tools/testing/selftests/Makefile @@ -36683,27 +34100,3 @@ index 0000000..cfd1930 + + return TEST_OK; +} -diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c -index 950064a..78fb820 100644 ---- a/virt/kvm/arm/vgic.c -+++ b/virt/kvm/arm/vgic.c -@@ -1561,7 +1561,7 @@ int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num, - goto out; - } - -- if (irq_num >= min(kvm->arch.vgic.nr_irqs, 1020)) -+ if (irq_num >= kvm->arch.vgic.nr_irqs) - return -EINVAL; - - vcpu_id = vgic_update_irq_pending(kvm, cpuid, irq_num, level); -@@ -2161,7 +2161,10 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, - - BUG_ON(!vgic_initialized(kvm)); - -+ if (spi > kvm->arch.vgic.nr_irqs) -+ return -EINVAL; - return kvm_vgic_inject_irq(kvm, 0, spi, level); -+ - } - - /* MSI not implemented yet */ |