aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-01-28 18:38:32 -0500
committerDave Airlie <airlied@redhat.com>2014-01-28 18:38:32 -0500
commita5bd4f8ab0443ea62be34b112eb78cafb6b3042d (patch)
treedf3357914d967c2cf4619dbd14f4609daf406a15
parentdee13f12f6ab0c0927adf9168dfc84da93fc9f13 (diff)
parentbed86f15bdc23436fb30d09e2faa3dfb7d3834e1 (diff)
Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next
Just one-liner which corrects a select statement for DRM_KMS_FB_HELPER which looks like it was missed in the initial merge. Based on 3.13. * 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox: (55 commits) DRM: armada: fix missing DRM_KMS_FB_HELPER select
-rw-r--r--MAINTAINERS3
-rw-r--r--Makefile2
-rw-r--r--arch/arm/kernel/devtree.c2
-rw-r--r--arch/arm/kernel/perf_event_cpu.c2
-rw-r--r--arch/arm/kernel/traps.c5
-rw-r--r--arch/arm/mach-highbank/highbank.c1
-rw-r--r--arch/arm/mach-omap2/omap4-common.c1
-rw-r--r--arch/arm/mm/init.c2
-rw-r--r--arch/arm/net/bpf_jit_32.c6
-rw-r--r--arch/arm64/include/asm/io.h2
-rw-r--r--arch/mips/include/asm/cacheops.h2
-rw-r--r--arch/mips/include/asm/r4kcache.h51
-rw-r--r--arch/mips/mm/c-r4k.c11
-rw-r--r--arch/parisc/include/uapi/asm/socket.h2
-rw-r--r--arch/powerpc/net/bpf_jit_comp.c7
-rw-r--r--arch/s390/net/bpf_jit_comp.c29
-rw-r--r--arch/sparc/net/bpf_jit_comp.c17
-rw-r--r--arch/x86/kernel/cpu/perf_event_amd_ibs.c53
-rw-r--r--arch/x86/kvm/lapic.c2
-rw-r--r--arch/x86/mm/fault.c18
-rw-r--r--arch/x86/net/bpf_jit_comp.c14
-rw-r--r--arch/x86/vdso/vclock_gettime.c8
-rw-r--r--drivers/acpi/acpi_lpss.c1
-rw-r--r--drivers/clocksource/cadence_ttc_timer.c21
-rw-r--r--drivers/gpu/drm/armada/Kconfig1
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c4
-rw-r--r--drivers/hwmon/coretemp.c2
-rw-r--r--drivers/md/md.c18
-rw-r--r--drivers/md/md.h3
-rw-r--r--drivers/md/raid1.c3
-rw-r--r--drivers/md/raid10.c12
-rw-r--r--drivers/md/raid5.c7
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c29
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/l2t.c2
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c11
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c8
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c2
-rw-r--r--drivers/net/ethernet/via/via-rhine.c1
-rw-r--r--drivers/net/usb/dm9601.c12
-rw-r--r--drivers/net/usb/usbnet.c2
-rw-r--r--drivers/pinctrl/pinctrl-baytrail.c1
-rw-r--r--fs/dcache.c7
-rw-r--r--fs/fs-writeback.c15
-rw-r--r--fs/namespace.c2
-rw-r--r--fs/nilfs2/segment.c10
-rw-r--r--include/linux/crash_dump.h2
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/seqlock.h27
-rw-r--r--include/net/if_inet6.h1
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/sched/fair.c2
-rw-r--r--kernel/time/sched_clock.c6
-rw-r--r--lib/percpu_counter.c4
-rw-r--r--mm/util.c5
-rw-r--r--net/batman-adv/main.c2
-rw-r--r--net/core/filter.c30
-rw-r--r--net/ieee802154/nl-phy.c6
-rw-r--r--net/ipv4/inet_diag.c5
-rw-r--r--net/ipv4/ipmr.c7
-rw-r--r--net/ipv4/tcp_metrics.c51
-rw-r--r--net/ipv6/addrconf.c38
-rw-r--r--net/ipv6/ip6mr.c7
-rw-r--r--net/rds/ib_recv.c7
63 files changed, 384 insertions, 234 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 31a046213274..6a6e4ac72287 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9231,6 +9231,7 @@ F: include/media/videobuf2-*
9231 9231
9232VIRTIO CONSOLE DRIVER 9232VIRTIO CONSOLE DRIVER
9233M: Amit Shah <amit.shah@redhat.com> 9233M: Amit Shah <amit.shah@redhat.com>
9234L: virtio-dev@lists.oasis-open.org
9234L: virtualization@lists.linux-foundation.org 9235L: virtualization@lists.linux-foundation.org
9235S: Maintained 9236S: Maintained
9236F: drivers/char/virtio_console.c 9237F: drivers/char/virtio_console.c
@@ -9240,6 +9241,7 @@ F: include/uapi/linux/virtio_console.h
9240VIRTIO CORE, NET AND BLOCK DRIVERS 9241VIRTIO CORE, NET AND BLOCK DRIVERS
9241M: Rusty Russell <rusty@rustcorp.com.au> 9242M: Rusty Russell <rusty@rustcorp.com.au>
9242M: "Michael S. Tsirkin" <mst@redhat.com> 9243M: "Michael S. Tsirkin" <mst@redhat.com>
9244L: virtio-dev@lists.oasis-open.org
9243L: virtualization@lists.linux-foundation.org 9245L: virtualization@lists.linux-foundation.org
9244S: Maintained 9246S: Maintained
9245F: drivers/virtio/ 9247F: drivers/virtio/
@@ -9252,6 +9254,7 @@ F: include/uapi/linux/virtio_*.h
9252VIRTIO HOST (VHOST) 9254VIRTIO HOST (VHOST)
9253M: "Michael S. Tsirkin" <mst@redhat.com> 9255M: "Michael S. Tsirkin" <mst@redhat.com>
9254L: kvm@vger.kernel.org 9256L: kvm@vger.kernel.org
9257L: virtio-dev@lists.oasis-open.org
9255L: virtualization@lists.linux-foundation.org 9258L: virtualization@lists.linux-foundation.org
9256L: netdev@vger.kernel.org 9259L: netdev@vger.kernel.org
9257S: Maintained 9260S: Maintained
diff --git a/Makefile b/Makefile
index eeec740776f3..b8b7f74696b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 13 2PATCHLEVEL = 13
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc8 4EXTRAVERSION =
5NAME = One Giant Leap for Frogkind 5NAME = One Giant Leap for Frogkind
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 739c3dfc1da2..34d5fd585bbb 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -171,7 +171,7 @@ void __init arm_dt_init_cpu_maps(void)
171 171
172bool arch_match_cpu_phys_id(int cpu, u64 phys_id) 172bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
173{ 173{
174 return (phys_id & MPIDR_HWID_BITMASK) == cpu_logical_map(cpu); 174 return phys_id == cpu_logical_map(cpu);
175} 175}
176 176
177static const void * __init arch_get_next_mach(const char *const **match) 177static const void * __init arch_get_next_mach(const char *const **match)
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index d85055cd24ba..20d553c9f5e2 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -254,7 +254,7 @@ static int probe_current_pmu(struct arm_pmu *pmu)
254static int cpu_pmu_device_probe(struct platform_device *pdev) 254static int cpu_pmu_device_probe(struct platform_device *pdev)
255{ 255{
256 const struct of_device_id *of_id; 256 const struct of_device_id *of_id;
257 int (*init_fn)(struct arm_pmu *); 257 const int (*init_fn)(struct arm_pmu *);
258 struct device_node *node = pdev->dev.of_node; 258 struct device_node *node = pdev->dev.of_node;
259 struct arm_pmu *pmu; 259 struct arm_pmu *pmu;
260 int ret = -ENODEV; 260 int ret = -ENODEV;
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 6eda3bf85c52..4636d56af2db 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -431,9 +431,10 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
431 instr2 = __mem_to_opcode_thumb16(instr2); 431 instr2 = __mem_to_opcode_thumb16(instr2);
432 instr = __opcode_thumb32_compose(instr, instr2); 432 instr = __opcode_thumb32_compose(instr, instr2);
433 } 433 }
434 } else if (get_user(instr, (u32 __user *)pc)) { 434 } else {
435 if (get_user(instr, (u32 __user *)pc))
436 goto die_sig;
435 instr = __mem_to_opcode_arm(instr); 437 instr = __mem_to_opcode_arm(instr);
436 goto die_sig;
437 } 438 }
438 439
439 if (call_undef_hook(regs, instr) == 0) 440 if (call_undef_hook(regs, instr) == 0)
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index bd3bf66ce344..c7de89b263dd 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -53,6 +53,7 @@ static void __init highbank_scu_map_io(void)
53 53
54static void highbank_l2x0_disable(void) 54static void highbank_l2x0_disable(void)
55{ 55{
56 outer_flush_all();
56 /* Disable PL310 L2 Cache controller */ 57 /* Disable PL310 L2 Cache controller */
57 highbank_smc1(0x102, 0x0); 58 highbank_smc1(0x102, 0x0);
58} 59}
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index b39efd46abf9..c0ab9b26be3d 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -162,6 +162,7 @@ void __iomem *omap4_get_l2cache_base(void)
162 162
163static void omap4_l2x0_disable(void) 163static void omap4_l2x0_disable(void)
164{ 164{
165 outer_flush_all();
165 /* Disable PL310 L2 Cache controller */ 166 /* Disable PL310 L2 Cache controller */
166 omap_smc1(0x102, 0x0); 167 omap_smc1(0x102, 0x0);
167} 168}
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 1f7b19a47060..3e8f106ee5fe 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -229,7 +229,7 @@ void __init setup_dma_zone(const struct machine_desc *mdesc)
229#ifdef CONFIG_ZONE_DMA 229#ifdef CONFIG_ZONE_DMA
230 if (mdesc->dma_zone_size) { 230 if (mdesc->dma_zone_size) {
231 arm_dma_zone_size = mdesc->dma_zone_size; 231 arm_dma_zone_size = mdesc->dma_zone_size;
232 arm_dma_limit = __pv_phys_offset + arm_dma_zone_size - 1; 232 arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
233 } else 233 } else
234 arm_dma_limit = 0xffffffff; 234 arm_dma_limit = 0xffffffff;
235 arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT; 235 arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 9ed155ad0f97..271b5e971568 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -641,10 +641,10 @@ load_ind:
641 emit(ARM_MUL(r_A, r_A, r_X), ctx); 641 emit(ARM_MUL(r_A, r_A, r_X), ctx);
642 break; 642 break;
643 case BPF_S_ALU_DIV_K: 643 case BPF_S_ALU_DIV_K:
644 /* current k == reciprocal_value(userspace k) */ 644 if (k == 1)
645 break;
645 emit_mov_i(r_scratch, k, ctx); 646 emit_mov_i(r_scratch, k, ctx);
646 /* A = top 32 bits of the product */ 647 emit_udiv(r_A, r_A, r_scratch, ctx);
647 emit(ARM_UMULL(r_scratch, r_A, r_A, r_scratch), ctx);
648 break; 648 break;
649 case BPF_S_ALU_DIV_X: 649 case BPF_S_ALU_DIV_X:
650 update_on_xread(ctx); 650 update_on_xread(ctx);
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
index 572769727227..4cc813eddacb 100644
--- a/arch/arm64/include/asm/io.h
+++ b/arch/arm64/include/asm/io.h
@@ -229,7 +229,7 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t prot
229extern void __iounmap(volatile void __iomem *addr); 229extern void __iounmap(volatile void __iomem *addr);
230extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); 230extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
231 231
232#define PROT_DEFAULT (pgprot_default | PTE_DIRTY) 232#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY)
233#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) 233#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
234#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) 234#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC))
235#define PROT_NORMAL (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL)) 235#define PROT_NORMAL (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h
index c75025f27c20..06b9bc7ea14b 100644
--- a/arch/mips/include/asm/cacheops.h
+++ b/arch/mips/include/asm/cacheops.h
@@ -83,6 +83,6 @@
83/* 83/*
84 * Loongson2-specific cacheops 84 * Loongson2-specific cacheops
85 */ 85 */
86#define Hit_Invalidate_I_Loongson23 0x00 86#define Hit_Invalidate_I_Loongson2 0x00
87 87
88#endif /* __ASM_CACHEOPS_H */ 88#endif /* __ASM_CACHEOPS_H */
diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h
index 34d1a1917125..c84caddb8bde 100644
--- a/arch/mips/include/asm/r4kcache.h
+++ b/arch/mips/include/asm/r4kcache.h
@@ -165,7 +165,7 @@ static inline void flush_icache_line(unsigned long addr)
165 __iflush_prologue 165 __iflush_prologue
166 switch (boot_cpu_type()) { 166 switch (boot_cpu_type()) {
167 case CPU_LOONGSON2: 167 case CPU_LOONGSON2:
168 cache_op(Hit_Invalidate_I_Loongson23, addr); 168 cache_op(Hit_Invalidate_I_Loongson2, addr);
169 break; 169 break;
170 170
171 default: 171 default:
@@ -219,7 +219,7 @@ static inline void protected_flush_icache_line(unsigned long addr)
219{ 219{
220 switch (boot_cpu_type()) { 220 switch (boot_cpu_type()) {
221 case CPU_LOONGSON2: 221 case CPU_LOONGSON2:
222 protected_cache_op(Hit_Invalidate_I_Loongson23, addr); 222 protected_cache_op(Hit_Invalidate_I_Loongson2, addr);
223 break; 223 break;
224 224
225 default: 225 default:
@@ -357,8 +357,8 @@ static inline void invalidate_tcache_page(unsigned long addr)
357 "i" (op)); 357 "i" (op));
358 358
359/* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */ 359/* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */
360#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize) \ 360#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, extra) \
361static inline void blast_##pfx##cache##lsize(void) \ 361static inline void extra##blast_##pfx##cache##lsize(void) \
362{ \ 362{ \
363 unsigned long start = INDEX_BASE; \ 363 unsigned long start = INDEX_BASE; \
364 unsigned long end = start + current_cpu_data.desc.waysize; \ 364 unsigned long end = start + current_cpu_data.desc.waysize; \
@@ -376,7 +376,7 @@ static inline void blast_##pfx##cache##lsize(void) \
376 __##pfx##flush_epilogue \ 376 __##pfx##flush_epilogue \
377} \ 377} \
378 \ 378 \
379static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ 379static inline void extra##blast_##pfx##cache##lsize##_page(unsigned long page) \
380{ \ 380{ \
381 unsigned long start = page; \ 381 unsigned long start = page; \
382 unsigned long end = page + PAGE_SIZE; \ 382 unsigned long end = page + PAGE_SIZE; \
@@ -391,7 +391,7 @@ static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \
391 __##pfx##flush_epilogue \ 391 __##pfx##flush_epilogue \
392} \ 392} \
393 \ 393 \
394static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \ 394static inline void extra##blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \
395{ \ 395{ \
396 unsigned long indexmask = current_cpu_data.desc.waysize - 1; \ 396 unsigned long indexmask = current_cpu_data.desc.waysize - 1; \
397 unsigned long start = INDEX_BASE + (page & indexmask); \ 397 unsigned long start = INDEX_BASE + (page & indexmask); \
@@ -410,23 +410,24 @@ static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page)
410 __##pfx##flush_epilogue \ 410 __##pfx##flush_epilogue \
411} 411}
412 412
413__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16) 413__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, )
414__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16) 414__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, )
415__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16) 415__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, )
416__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32) 416__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, )
417__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32) 417__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, )
418__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32) 418__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I_Loongson2, 32, loongson2_)
419__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64) 419__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, )
420__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64) 420__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, )
421__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) 421__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, )
422__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) 422__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, )
423 423__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, )
424__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16) 424
425__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32) 425__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, )
426__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16) 426__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, )
427__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32) 427__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, )
428__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64) 428__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, )
429__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128) 429__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, )
430__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, )
430 431
431/* build blast_xxx_range, protected_blast_xxx_range */ 432/* build blast_xxx_range, protected_blast_xxx_range */
432#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra) \ 433#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra) \
@@ -452,8 +453,8 @@ static inline void prot##extra##blast_##pfx##cache##_range(unsigned long start,
452__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, ) 453__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, )
453__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, ) 454__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, )
454__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, ) 455__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, )
455__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I_Loongson23, \ 456__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I_Loongson2, \
456 protected_, loongson23_) 457 protected_, loongson2_)
457__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , ) 458__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , )
458__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , ) 459__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , )
459/* blast_inv_dcache_range */ 460/* blast_inv_dcache_range */
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 62ffd20ea869..49e572d879e1 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -237,6 +237,8 @@ static void r4k_blast_icache_page_setup(void)
237 r4k_blast_icache_page = (void *)cache_noop; 237 r4k_blast_icache_page = (void *)cache_noop;
238 else if (ic_lsize == 16) 238 else if (ic_lsize == 16)
239 r4k_blast_icache_page = blast_icache16_page; 239 r4k_blast_icache_page = blast_icache16_page;
240 else if (ic_lsize == 32 && current_cpu_type() == CPU_LOONGSON2)
241 r4k_blast_icache_page = loongson2_blast_icache32_page;
240 else if (ic_lsize == 32) 242 else if (ic_lsize == 32)
241 r4k_blast_icache_page = blast_icache32_page; 243 r4k_blast_icache_page = blast_icache32_page;
242 else if (ic_lsize == 64) 244 else if (ic_lsize == 64)
@@ -261,6 +263,9 @@ static void r4k_blast_icache_page_indexed_setup(void)
261 else if (TX49XX_ICACHE_INDEX_INV_WAR) 263 else if (TX49XX_ICACHE_INDEX_INV_WAR)
262 r4k_blast_icache_page_indexed = 264 r4k_blast_icache_page_indexed =
263 tx49_blast_icache32_page_indexed; 265 tx49_blast_icache32_page_indexed;
266 else if (current_cpu_type() == CPU_LOONGSON2)
267 r4k_blast_icache_page_indexed =
268 loongson2_blast_icache32_page_indexed;
264 else 269 else
265 r4k_blast_icache_page_indexed = 270 r4k_blast_icache_page_indexed =
266 blast_icache32_page_indexed; 271 blast_icache32_page_indexed;
@@ -284,6 +289,8 @@ static void r4k_blast_icache_setup(void)
284 r4k_blast_icache = blast_r4600_v1_icache32; 289 r4k_blast_icache = blast_r4600_v1_icache32;
285 else if (TX49XX_ICACHE_INDEX_INV_WAR) 290 else if (TX49XX_ICACHE_INDEX_INV_WAR)
286 r4k_blast_icache = tx49_blast_icache32; 291 r4k_blast_icache = tx49_blast_icache32;
292 else if (current_cpu_type() == CPU_LOONGSON2)
293 r4k_blast_icache = loongson2_blast_icache32;
287 else 294 else
288 r4k_blast_icache = blast_icache32; 295 r4k_blast_icache = blast_icache32;
289 } else if (ic_lsize == 64) 296 } else if (ic_lsize == 64)
@@ -580,11 +587,11 @@ static inline void local_r4k_flush_icache_range(unsigned long start, unsigned lo
580 else { 587 else {
581 switch (boot_cpu_type()) { 588 switch (boot_cpu_type()) {
582 case CPU_LOONGSON2: 589 case CPU_LOONGSON2:
583 protected_blast_icache_range(start, end); 590 protected_loongson2_blast_icache_range(start, end);
584 break; 591 break;
585 592
586 default: 593 default:
587 protected_loongson23_blast_icache_range(start, end); 594 protected_blast_icache_range(start, end);
588 break; 595 break;
589 } 596 }
590 } 597 }
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index f33113a6141e..70b3674dac4e 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -75,6 +75,6 @@
75 75
76#define SO_BUSY_POLL 0x4027 76#define SO_BUSY_POLL 0x4027
77 77
78#define SO_MAX_PACING_RATE 0x4048 78#define SO_MAX_PACING_RATE 0x4028
79 79
80#endif /* _UAPI_ASM_SOCKET_H */ 80#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index ac3c2a10dafd..555034f8505e 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -223,10 +223,11 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
223 } 223 }
224 PPC_DIVWU(r_A, r_A, r_X); 224 PPC_DIVWU(r_A, r_A, r_X);
225 break; 225 break;
226 case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */ 226 case BPF_S_ALU_DIV_K: /* A /= K */
227 if (K == 1)
228 break;
227 PPC_LI32(r_scratch1, K); 229 PPC_LI32(r_scratch1, K);
228 /* Top 32 bits of 64bit result -> A */ 230 PPC_DIVWU(r_A, r_A, r_scratch1);
229 PPC_MULHWU(r_A, r_A, r_scratch1);
230 break; 231 break;
231 case BPF_S_ALU_AND_X: 232 case BPF_S_ALU_AND_X:
232 ctx->seen |= SEEN_XREG; 233 ctx->seen |= SEEN_XREG;
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 16871da37371..708d60e40066 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -368,14 +368,16 @@ static int bpf_jit_insn(struct bpf_jit *jit, struct sock_filter *filter,
368 EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg)); 368 EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg));
369 /* lhi %r4,0 */ 369 /* lhi %r4,0 */
370 EMIT4(0xa7480000); 370 EMIT4(0xa7480000);
371 /* dr %r4,%r12 */ 371 /* dlr %r4,%r12 */
372 EMIT2(0x1d4c); 372 EMIT4(0xb997004c);
373 break; 373 break;
374 case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K) */ 374 case BPF_S_ALU_DIV_K: /* A /= K */
375 /* m %r4,<d(K)>(%r13) */ 375 if (K == 1)
376 EMIT4_DISP(0x5c40d000, EMIT_CONST(K)); 376 break;
377 /* lr %r5,%r4 */ 377 /* lhi %r4,0 */
378 EMIT2(0x1854); 378 EMIT4(0xa7480000);
379 /* dl %r4,<d(K)>(%r13) */
380 EMIT6_DISP(0xe340d000, 0x0097, EMIT_CONST(K));
379 break; 381 break;
380 case BPF_S_ALU_MOD_X: /* A %= X */ 382 case BPF_S_ALU_MOD_X: /* A %= X */
381 jit->seen |= SEEN_XREG | SEEN_RET0; 383 jit->seen |= SEEN_XREG | SEEN_RET0;
@@ -385,16 +387,21 @@ static int bpf_jit_insn(struct bpf_jit *jit, struct sock_filter *filter,
385 EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg)); 387 EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg));
386 /* lhi %r4,0 */ 388 /* lhi %r4,0 */
387 EMIT4(0xa7480000); 389 EMIT4(0xa7480000);
388 /* dr %r4,%r12 */ 390 /* dlr %r4,%r12 */
389 EMIT2(0x1d4c); 391 EMIT4(0xb997004c);
390 /* lr %r5,%r4 */ 392 /* lr %r5,%r4 */
391 EMIT2(0x1854); 393 EMIT2(0x1854);
392 break; 394 break;
393 case BPF_S_ALU_MOD_K: /* A %= K */ 395 case BPF_S_ALU_MOD_K: /* A %= K */
396 if (K == 1) {
397 /* lhi %r5,0 */
398 EMIT4(0xa7580000);
399 break;
400 }
394 /* lhi %r4,0 */ 401 /* lhi %r4,0 */
395 EMIT4(0xa7480000); 402 EMIT4(0xa7480000);
396 /* d %r4,<d(K)>(%r13) */ 403 /* dl %r4,<d(K)>(%r13) */
397 EMIT4_DISP(0x5d40d000, EMIT_CONST(K)); 404 EMIT6_DISP(0xe340d000, 0x0097, EMIT_CONST(K));
398 /* lr %r5,%r4 */ 405 /* lr %r5,%r4 */
399 EMIT2(0x1854); 406 EMIT2(0x1854);
400 break; 407 break;
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index 218b6b23c378..01fe9946d388 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -497,9 +497,20 @@ void bpf_jit_compile(struct sk_filter *fp)
497 case BPF_S_ALU_MUL_K: /* A *= K */ 497 case BPF_S_ALU_MUL_K: /* A *= K */
498 emit_alu_K(MUL, K); 498 emit_alu_K(MUL, K);
499 break; 499 break;
500 case BPF_S_ALU_DIV_K: /* A /= K */ 500 case BPF_S_ALU_DIV_K: /* A /= K with K != 0*/
501 emit_alu_K(MUL, K); 501 if (K == 1)
502 emit_read_y(r_A); 502 break;
503 emit_write_y(G0);
504#ifdef CONFIG_SPARC32
505 /* The Sparc v8 architecture requires
506 * three instructions between a %y
507 * register write and the first use.
508 */
509 emit_nop();
510 emit_nop();
511 emit_nop();
512#endif
513 emit_alu_K(DIV, K);
503 break; 514 break;
504 case BPF_S_ALU_DIV_X: /* A /= X; */ 515 case BPF_S_ALU_DIV_X: /* A /= X; */
505 emit_cmpi(r_X, 0); 516 emit_cmpi(r_X, 0);
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
index e09f0bfb7b8f..4b8e4d3cd6ea 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
@@ -10,6 +10,7 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/ptrace.h> 12#include <linux/ptrace.h>
13#include <linux/syscore_ops.h>
13 14
14#include <asm/apic.h> 15#include <asm/apic.h>
15 16
@@ -816,6 +817,18 @@ out:
816 return ret; 817 return ret;
817} 818}
818 819
820static void ibs_eilvt_setup(void)
821{
822 /*
823 * Force LVT offset assignment for family 10h: The offsets are
824 * not assigned by the BIOS for this family, so the OS is
825 * responsible for doing it. If the OS assignment fails, fall
826 * back to BIOS settings and try to setup this.
827 */
828 if (boot_cpu_data.x86 == 0x10)
829 force_ibs_eilvt_setup();
830}
831
819static inline int get_ibs_lvt_offset(void) 832static inline int get_ibs_lvt_offset(void)
820{ 833{
821 u64 val; 834 u64 val;
@@ -851,6 +864,36 @@ static void clear_APIC_ibs(void *dummy)
851 setup_APIC_eilvt(offset, 0, APIC_EILVT_MSG_FIX, 1); 864 setup_APIC_eilvt(offset, 0, APIC_EILVT_MSG_FIX, 1);
852} 865}
853 866
867#ifdef CONFIG_PM
868
869static int perf_ibs_suspend(void)
870{
871 clear_APIC_ibs(NULL);
872 return 0;
873}
874
875static void perf_ibs_resume(void)
876{
877 ibs_eilvt_setup();
878 setup_APIC_ibs(NULL);
879}
880
881static struct syscore_ops perf_ibs_syscore_ops = {
882 .resume = perf_ibs_resume,
883 .suspend = perf_ibs_suspend,
884};
885
886static void perf_ibs_pm_init(void)
887{
888 register_syscore_ops(&perf_ibs_syscore_ops);
889}
890
891#else
892
893static inline void perf_ibs_pm_init(void) { }
894
895#endif
896
854static int 897static int
855perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) 898perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *hcpu)
856{ 899{
@@ -877,18 +920,12 @@ static __init int amd_ibs_init(void)
877 if (!caps) 920 if (!caps)
878 return -ENODEV; /* ibs not supported by the cpu */ 921 return -ENODEV; /* ibs not supported by the cpu */
879 922
880 /* 923 ibs_eilvt_setup();
881 * Force LVT offset assignment for family 10h: The offsets are
882 * not assigned by the BIOS for this family, so the OS is
883 * responsible for doing it. If the OS assignment fails, fall
884 * back to BIOS settings and try to setup this.
885 */
886 if (boot_cpu_data.x86 == 0x10)
887 force_ibs_eilvt_setup();
888 924
889 if (!ibs_eilvt_valid()) 925 if (!ibs_eilvt_valid())
890 goto out; 926 goto out;
891 927
928 perf_ibs_pm_init();
892 get_online_cpus(); 929 get_online_cpus();
893 ibs_caps = caps; 930 ibs_caps = caps;
894 /* make ibs_caps visible to other cpus: */ 931 /* make ibs_caps visible to other cpus: */
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 1673940cf9c3..775702f649ca 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1355,7 +1355,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
1355 vcpu->arch.apic_base = value; 1355 vcpu->arch.apic_base = value;
1356 1356
1357 /* update jump label if enable bit changes */ 1357 /* update jump label if enable bit changes */
1358 if ((vcpu->arch.apic_base ^ value) & MSR_IA32_APICBASE_ENABLE) { 1358 if ((old_value ^ value) & MSR_IA32_APICBASE_ENABLE) {
1359 if (value & MSR_IA32_APICBASE_ENABLE) 1359 if (value & MSR_IA32_APICBASE_ENABLE)
1360 static_key_slow_dec_deferred(&apic_hw_disabled); 1360 static_key_slow_dec_deferred(&apic_hw_disabled);
1361 else 1361 else
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 9ff85bb8dd69..9d591c895803 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -641,6 +641,20 @@ no_context(struct pt_regs *regs, unsigned long error_code,
641 641
642 /* Are we prepared to handle this kernel fault? */ 642 /* Are we prepared to handle this kernel fault? */
643 if (fixup_exception(regs)) { 643 if (fixup_exception(regs)) {
644 /*
645 * Any interrupt that takes a fault gets the fixup. This makes
646 * the below recursive fault logic only apply to a faults from
647 * task context.
648 */
649 if (in_interrupt())
650 return;
651
652 /*
653 * Per the above we're !in_interrupt(), aka. task context.
654 *
655 * In this case we need to make sure we're not recursively
656 * faulting through the emulate_vsyscall() logic.
657 */
644 if (current_thread_info()->sig_on_uaccess_error && signal) { 658 if (current_thread_info()->sig_on_uaccess_error && signal) {
645 tsk->thread.trap_nr = X86_TRAP_PF; 659 tsk->thread.trap_nr = X86_TRAP_PF;
646 tsk->thread.error_code = error_code | PF_USER; 660 tsk->thread.error_code = error_code | PF_USER;
@@ -649,6 +663,10 @@ no_context(struct pt_regs *regs, unsigned long error_code,
649 /* XXX: hwpoison faults will set the wrong code. */ 663 /* XXX: hwpoison faults will set the wrong code. */
650 force_sig_info_fault(signal, si_code, address, tsk, 0); 664 force_sig_info_fault(signal, si_code, address, tsk, 0);
651 } 665 }
666
667 /*
668 * Barring that, we can do the fixup and be happy.
669 */
652 return; 670 return;
653 } 671 }
654 672
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 26328e800869..4ed75dd81d05 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -359,15 +359,21 @@ void bpf_jit_compile(struct sk_filter *fp)
359 EMIT2(0x89, 0xd0); /* mov %edx,%eax */ 359 EMIT2(0x89, 0xd0); /* mov %edx,%eax */
360 break; 360 break;
361 case BPF_S_ALU_MOD_K: /* A %= K; */ 361 case BPF_S_ALU_MOD_K: /* A %= K; */
362 if (K == 1) {
363 CLEAR_A();
364 break;
365 }
362 EMIT2(0x31, 0xd2); /* xor %edx,%edx */ 366 EMIT2(0x31, 0xd2); /* xor %edx,%edx */
363 EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ 367 EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */
364 EMIT2(0xf7, 0xf1); /* div %ecx */ 368 EMIT2(0xf7, 0xf1); /* div %ecx */
365 EMIT2(0x89, 0xd0); /* mov %edx,%eax */ 369 EMIT2(0x89, 0xd0); /* mov %edx,%eax */
366 break; 370 break;
367 case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */ 371 case BPF_S_ALU_DIV_K: /* A /= K */
368 EMIT3(0x48, 0x69, 0xc0); /* imul imm32,%rax,%rax */ 372 if (K == 1)
369 EMIT(K, 4); 373 break;
370 EMIT4(0x48, 0xc1, 0xe8, 0x20); /* shr $0x20,%rax */ 374 EMIT2(0x31, 0xd2); /* xor %edx,%edx */
375 EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */
376 EMIT2(0xf7, 0xf1); /* div %ecx */
371 break; 377 break;
372 case BPF_S_ALU_AND_X: 378 case BPF_S_ALU_AND_X:
373 seen |= SEEN_XREG; 379 seen |= SEEN_XREG;
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 2ada505067cc..eb5d7a56f8d4 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -178,7 +178,7 @@ notrace static int __always_inline do_realtime(struct timespec *ts)
178 178
179 ts->tv_nsec = 0; 179 ts->tv_nsec = 0;
180 do { 180 do {
181 seq = read_seqcount_begin_no_lockdep(&gtod->seq); 181 seq = raw_read_seqcount_begin(&gtod->seq);
182 mode = gtod->clock.vclock_mode; 182 mode = gtod->clock.vclock_mode;
183 ts->tv_sec = gtod->wall_time_sec; 183 ts->tv_sec = gtod->wall_time_sec;
184 ns = gtod->wall_time_snsec; 184 ns = gtod->wall_time_snsec;
@@ -198,7 +198,7 @@ notrace static int do_monotonic(struct timespec *ts)
198 198
199 ts->tv_nsec = 0; 199 ts->tv_nsec = 0;
200 do { 200 do {
201 seq = read_seqcount_begin_no_lockdep(&gtod->seq); 201 seq = raw_read_seqcount_begin(&gtod->seq);
202 mode = gtod->clock.vclock_mode; 202 mode = gtod->clock.vclock_mode;
203 ts->tv_sec = gtod->monotonic_time_sec; 203 ts->tv_sec = gtod->monotonic_time_sec;
204 ns = gtod->monotonic_time_snsec; 204 ns = gtod->monotonic_time_snsec;
@@ -214,7 +214,7 @@ notrace static int do_realtime_coarse(struct timespec *ts)
214{ 214{
215 unsigned long seq; 215 unsigned long seq;
216 do { 216 do {
217 seq = read_seqcount_begin_no_lockdep(&gtod->seq); 217 seq = raw_read_seqcount_begin(&gtod->seq);
218 ts->tv_sec = gtod->wall_time_coarse.tv_sec; 218 ts->tv_sec = gtod->wall_time_coarse.tv_sec;
219 ts->tv_nsec = gtod->wall_time_coarse.tv_nsec; 219 ts->tv_nsec = gtod->wall_time_coarse.tv_nsec;
220 } while (unlikely(read_seqcount_retry(&gtod->seq, seq))); 220 } while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
@@ -225,7 +225,7 @@ notrace static int do_monotonic_coarse(struct timespec *ts)
225{ 225{
226 unsigned long seq; 226 unsigned long seq;
227 do { 227 do {
228 seq = read_seqcount_begin_no_lockdep(&gtod->seq); 228 seq = raw_read_seqcount_begin(&gtod->seq);
229 ts->tv_sec = gtod->monotonic_time_coarse.tv_sec; 229 ts->tv_sec = gtod->monotonic_time_coarse.tv_sec;
230 ts->tv_nsec = gtod->monotonic_time_coarse.tv_nsec; 230 ts->tv_nsec = gtod->monotonic_time_coarse.tv_nsec;
231 } while (unlikely(read_seqcount_retry(&gtod->seq, seq))); 231 } while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index e60390597372..6745fe137b9e 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -162,7 +162,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
162 { "80860F14", (unsigned long)&byt_sdio_dev_desc }, 162 { "80860F14", (unsigned long)&byt_sdio_dev_desc },
163 { "80860F41", (unsigned long)&byt_i2c_dev_desc }, 163 { "80860F41", (unsigned long)&byt_i2c_dev_desc },
164 { "INT33B2", }, 164 { "INT33B2", },
165 { "INT33FC", },
166 165
167 { "INT3430", (unsigned long)&lpt_dev_desc }, 166 { "INT3430", (unsigned long)&lpt_dev_desc },
168 { "INT3431", (unsigned long)&lpt_dev_desc }, 167 { "INT3431", (unsigned long)&lpt_dev_desc },
diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
index b2bb3a4bc205..a92350b55d32 100644
--- a/drivers/clocksource/cadence_ttc_timer.c
+++ b/drivers/clocksource/cadence_ttc_timer.c
@@ -67,11 +67,13 @@
67 * struct ttc_timer - This definition defines local timer structure 67 * struct ttc_timer - This definition defines local timer structure
68 * 68 *
69 * @base_addr: Base address of timer 69 * @base_addr: Base address of timer
70 * @freq: Timer input clock frequency
70 * @clk: Associated clock source 71 * @clk: Associated clock source
71 * @clk_rate_change_nb Notifier block for clock rate changes 72 * @clk_rate_change_nb Notifier block for clock rate changes
72 */ 73 */
73struct ttc_timer { 74struct ttc_timer {
74 void __iomem *base_addr; 75 void __iomem *base_addr;
76 unsigned long freq;
75 struct clk *clk; 77 struct clk *clk;
76 struct notifier_block clk_rate_change_nb; 78 struct notifier_block clk_rate_change_nb;
77}; 79};
@@ -196,9 +198,8 @@ static void ttc_set_mode(enum clock_event_mode mode,
196 198
197 switch (mode) { 199 switch (mode) {
198 case CLOCK_EVT_MODE_PERIODIC: 200 case CLOCK_EVT_MODE_PERIODIC:
199 ttc_set_interval(timer, 201 ttc_set_interval(timer, DIV_ROUND_CLOSEST(ttce->ttc.freq,
200 DIV_ROUND_CLOSEST(clk_get_rate(ttce->ttc.clk), 202 PRESCALE * HZ));
201 PRESCALE * HZ));
202 break; 203 break;
203 case CLOCK_EVT_MODE_ONESHOT: 204 case CLOCK_EVT_MODE_ONESHOT:
204 case CLOCK_EVT_MODE_UNUSED: 205 case CLOCK_EVT_MODE_UNUSED:
@@ -273,6 +274,8 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base)
273 return; 274 return;
274 } 275 }
275 276
277 ttccs->ttc.freq = clk_get_rate(ttccs->ttc.clk);
278
276 ttccs->ttc.clk_rate_change_nb.notifier_call = 279 ttccs->ttc.clk_rate_change_nb.notifier_call =
277 ttc_rate_change_clocksource_cb; 280 ttc_rate_change_clocksource_cb;
278 ttccs->ttc.clk_rate_change_nb.next = NULL; 281 ttccs->ttc.clk_rate_change_nb.next = NULL;
@@ -298,16 +301,14 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base)
298 __raw_writel(CNT_CNTRL_RESET, 301 __raw_writel(CNT_CNTRL_RESET,
299 ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); 302 ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET);
300 303
301 err = clocksource_register_hz(&ttccs->cs, 304 err = clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE);
302 clk_get_rate(ttccs->ttc.clk) / PRESCALE);
303 if (WARN_ON(err)) { 305 if (WARN_ON(err)) {
304 kfree(ttccs); 306 kfree(ttccs);
305 return; 307 return;
306 } 308 }
307 309
308 ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET; 310 ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET;
309 setup_sched_clock(ttc_sched_clock_read, 16, 311 setup_sched_clock(ttc_sched_clock_read, 16, ttccs->ttc.freq / PRESCALE);
310 clk_get_rate(ttccs->ttc.clk) / PRESCALE);
311} 312}
312 313
313static int ttc_rate_change_clockevent_cb(struct notifier_block *nb, 314static int ttc_rate_change_clockevent_cb(struct notifier_block *nb,
@@ -334,6 +335,9 @@ static int ttc_rate_change_clockevent_cb(struct notifier_block *nb,
334 ndata->new_rate / PRESCALE); 335 ndata->new_rate / PRESCALE);
335 local_irq_restore(flags); 336 local_irq_restore(flags);
336 337
338 /* update cached frequency */
339 ttc->freq = ndata->new_rate;
340
337 /* fall through */ 341 /* fall through */
338 } 342 }
339 case PRE_RATE_CHANGE: 343 case PRE_RATE_CHANGE:
@@ -367,6 +371,7 @@ static void __init ttc_setup_clockevent(struct clk *clk,
367 if (clk_notifier_register(ttcce->ttc.clk, 371 if (clk_notifier_register(ttcce->ttc.clk,
368 &ttcce->ttc.clk_rate_change_nb)) 372 &ttcce->ttc.clk_rate_change_nb))
369 pr_warn("Unable to register clock notifier.\n"); 373 pr_warn("Unable to register clock notifier.\n");
374 ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk);
370 375
371 ttcce->ttc.base_addr = base; 376 ttcce->ttc.base_addr = base;
372 ttcce->ce.name = "ttc_clockevent"; 377 ttcce->ce.name = "ttc_clockevent";
@@ -396,7 +401,7 @@ static void __init ttc_setup_clockevent(struct clk *clk,
396 } 401 }
397 402
398 clockevents_config_and_register(&ttcce->ce, 403 clockevents_config_and_register(&ttcce->ce,
399 clk_get_rate(ttcce->ttc.clk) / PRESCALE, 1, 0xfffe); 404 ttcce->ttc.freq / PRESCALE, 1, 0xfffe);
400} 405}
401 406
402/** 407/**
diff --git a/drivers/gpu/drm/armada/Kconfig b/drivers/gpu/drm/armada/Kconfig
index 40d371521fe1..50ae88ad4d76 100644
--- a/drivers/gpu/drm/armada/Kconfig
+++ b/drivers/gpu/drm/armada/Kconfig
@@ -5,6 +5,7 @@ config DRM_ARMADA
5 select FB_CFB_COPYAREA 5 select FB_CFB_COPYAREA
6 select FB_CFB_IMAGEBLIT 6 select FB_CFB_IMAGEBLIT
7 select DRM_KMS_HELPER 7 select DRM_KMS_HELPER
8 select DRM_KMS_FB_HELPER
8 help 9 help
9 Support the "LCD" controllers found on the Marvell Armada 510 10 Support the "LCD" controllers found on the Marvell Armada 510
10 devices. There are two controllers on the device, each controller 11 devices. There are two controllers on the device, each controller
diff --git a/drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
index af129c2e8113..64f8b4702bf7 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
@@ -100,7 +100,7 @@ mxm_match_dcb(struct nouveau_mxm *mxm, u8 *data, void *info)
100static int 100static int
101mxm_dcb_sanitise_entry(struct nouveau_bios *bios, void *data, int idx, u16 pdcb) 101mxm_dcb_sanitise_entry(struct nouveau_bios *bios, void *data, int idx, u16 pdcb)
102{ 102{
103 struct nouveau_mxm *mxm = nouveau_mxm(bios); 103 struct nouveau_mxm *mxm = data;
104 struct context ctx = { .outp = (u32 *)(bios->data + pdcb) }; 104 struct context ctx = { .outp = (u32 *)(bios->data + pdcb) };
105 u8 type, i2cidx, link, ver, len; 105 u8 type, i2cidx, link, ver, len;
106 u8 *conn; 106 u8 *conn;
@@ -199,7 +199,7 @@ mxm_dcb_sanitise(struct nouveau_mxm *mxm)
199 return; 199 return;
200 } 200 }
201 201
202 dcb_outp_foreach(bios, NULL, mxm_dcb_sanitise_entry); 202 dcb_outp_foreach(bios, mxm, mxm_dcb_sanitise_entry);
203 mxms_foreach(mxm, 0x01, mxm_show_unmatched, NULL); 203 mxms_foreach(mxm, 0x01, mxm_show_unmatched, NULL);
204} 204}
205 205
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 78be66176840..942509892895 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -52,7 +52,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
52 52
53#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */ 53#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
54#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */ 54#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */
55#define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */ 55#define CORETEMP_NAME_LENGTH 19 /* String Length of attrs */
56#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */ 56#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
57#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1) 57#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
58#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO) 58#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 21f4d7ff0da2..369d919bdafe 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1077,6 +1077,7 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *rdev)
1077 rdev->raid_disk = -1; 1077 rdev->raid_disk = -1;
1078 clear_bit(Faulty, &rdev->flags); 1078 clear_bit(Faulty, &rdev->flags);
1079 clear_bit(In_sync, &rdev->flags); 1079 clear_bit(In_sync, &rdev->flags);
1080 clear_bit(Bitmap_sync, &rdev->flags);
1080 clear_bit(WriteMostly, &rdev->flags); 1081 clear_bit(WriteMostly, &rdev->flags);
1081 1082
1082 if (mddev->raid_disks == 0) { 1083 if (mddev->raid_disks == 0) {
@@ -1155,6 +1156,8 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *rdev)
1155 */ 1156 */
1156 if (ev1 < mddev->bitmap->events_cleared) 1157 if (ev1 < mddev->bitmap->events_cleared)
1157 return 0; 1158 return 0;
1159 if (ev1 < mddev->events)
1160 set_bit(Bitmap_sync, &rdev->flags);
1158 } else { 1161 } else {
1159 if (ev1 < mddev->events) 1162 if (ev1 < mddev->events)
1160 /* just a hot-add of a new device, leave raid_disk at -1 */ 1163 /* just a hot-add of a new device, leave raid_disk at -1 */
@@ -1563,6 +1566,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *rdev)
1563 rdev->raid_disk = -1; 1566 rdev->raid_disk = -1;
1564 clear_bit(Faulty, &rdev->flags); 1567 clear_bit(Faulty, &rdev->flags);
1565 clear_bit(In_sync, &rdev->flags); 1568 clear_bit(In_sync, &rdev->flags);
1569 clear_bit(Bitmap_sync, &rdev->flags);
1566 clear_bit(WriteMostly, &rdev->flags); 1570 clear_bit(WriteMostly, &rdev->flags);
1567 1571
1568 if (mddev->raid_disks == 0) { 1572 if (mddev->raid_disks == 0) {
@@ -1645,6 +1649,8 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *rdev)
1645 */ 1649 */
1646 if (ev1 < mddev->bitmap->events_cleared) 1650 if (ev1 < mddev->bitmap->events_cleared)
1647 return 0; 1651 return 0;
1652 if (ev1 < mddev->events)
1653 set_bit(Bitmap_sync, &rdev->flags);
1648 } else { 1654 } else {
1649 if (ev1 < mddev->events) 1655 if (ev1 < mddev->events)
1650 /* just a hot-add of a new device, leave raid_disk at -1 */ 1656 /* just a hot-add of a new device, leave raid_disk at -1 */
@@ -2788,6 +2794,7 @@ slot_store(struct md_rdev *rdev, const char *buf, size_t len)
2788 else 2794 else
2789 rdev->saved_raid_disk = -1; 2795 rdev->saved_raid_disk = -1;
2790 clear_bit(In_sync, &rdev->flags); 2796 clear_bit(In_sync, &rdev->flags);
2797 clear_bit(Bitmap_sync, &rdev->flags);
2791 err = rdev->mddev->pers-> 2798 err = rdev->mddev->pers->
2792 hot_add_disk(rdev->mddev, rdev); 2799 hot_add_disk(rdev->mddev, rdev);
2793 if (err) { 2800 if (err) {
@@ -5760,6 +5767,7 @@ static int add_new_disk(struct mddev * mddev, mdu_disk_info_t *info)
5760 info->raid_disk < mddev->raid_disks) { 5767 info->raid_disk < mddev->raid_disks) {
5761 rdev->raid_disk = info->raid_disk; 5768 rdev->raid_disk = info->raid_disk;
5762 set_bit(In_sync, &rdev->flags); 5769 set_bit(In_sync, &rdev->flags);
5770 clear_bit(Bitmap_sync, &rdev->flags);
5763 } else 5771 } else
5764 rdev->raid_disk = -1; 5772 rdev->raid_disk = -1;
5765 } else 5773 } else
@@ -7706,7 +7714,8 @@ static int remove_and_add_spares(struct mddev *mddev,
7706 if (test_bit(Faulty, &rdev->flags)) 7714 if (test_bit(Faulty, &rdev->flags))
7707 continue; 7715 continue;
7708 if (mddev->ro && 7716 if (mddev->ro &&
7709 rdev->saved_raid_disk < 0) 7717 ! (rdev->saved_raid_disk >= 0 &&
7718 !test_bit(Bitmap_sync, &rdev->flags)))
7710 continue; 7719 continue;
7711 7720
7712 rdev->recovery_offset = 0; 7721 rdev->recovery_offset = 0;
@@ -7787,9 +7796,12 @@ void md_check_recovery(struct mddev *mddev)
7787 * As we only add devices that are already in-sync, 7796 * As we only add devices that are already in-sync,
7788 * we can activate the spares immediately. 7797 * we can activate the spares immediately.
7789 */ 7798 */
7790 clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
7791 remove_and_add_spares(mddev, NULL); 7799 remove_and_add_spares(mddev, NULL);
7792 mddev->pers->spare_active(mddev); 7800 /* There is no thread, but we need to call
7801 * ->spare_active and clear saved_raid_disk
7802 */
7803 md_reap_sync_thread(mddev);
7804 clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
7793 goto unlock; 7805 goto unlock;
7794 } 7806 }
7795 7807
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 2f5cc8a7ef3e..0095ec84ffc7 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -129,6 +129,9 @@ struct md_rdev {
129enum flag_bits { 129enum flag_bits {
130 Faulty, /* device is known to have a fault */ 130 Faulty, /* device is known to have a fault */
131 In_sync, /* device is in_sync with rest of array */ 131 In_sync, /* device is in_sync with rest of array */
132 Bitmap_sync, /* ..actually, not quite In_sync. Need a
133 * bitmap-based recovery to get fully in sync
134 */
132 Unmerged, /* device is being added to array and should 135 Unmerged, /* device is being added to array and should
133 * be considerred for bvec_merge_fn but not 136 * be considerred for bvec_merge_fn but not
134 * yet for actual IO 137 * yet for actual IO
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 1e5a540995e9..a49cfcc7a343 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -924,9 +924,8 @@ static sector_t wait_barrier(struct r1conf *conf, struct bio *bio)
924 conf->next_window_requests++; 924 conf->next_window_requests++;
925 else 925 else
926 conf->current_window_requests++; 926 conf->current_window_requests++;
927 }
928 if (bio->bi_sector >= conf->start_next_window)
929 sector = conf->start_next_window; 927 sector = conf->start_next_window;
928 }
930 } 929 }
931 930
932 conf->nr_pending++; 931 conf->nr_pending++;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index c504e8389e69..06eeb99ea6fc 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1319,7 +1319,7 @@ read_again:
1319 /* Could not read all from this device, so we will 1319 /* Could not read all from this device, so we will
1320 * need another r10_bio. 1320 * need another r10_bio.
1321 */ 1321 */
1322 sectors_handled = (r10_bio->sectors + max_sectors 1322 sectors_handled = (r10_bio->sector + max_sectors
1323 - bio->bi_sector); 1323 - bio->bi_sector);
1324 r10_bio->sectors = max_sectors; 1324 r10_bio->sectors = max_sectors;
1325 spin_lock_irq(&conf->device_lock); 1325 spin_lock_irq(&conf->device_lock);
@@ -1327,7 +1327,7 @@ read_again:
1327 bio->bi_phys_segments = 2; 1327 bio->bi_phys_segments = 2;
1328 else 1328 else
1329 bio->bi_phys_segments++; 1329 bio->bi_phys_segments++;
1330 spin_unlock(&conf->device_lock); 1330 spin_unlock_irq(&conf->device_lock);
1331 /* Cannot call generic_make_request directly 1331 /* Cannot call generic_make_request directly
1332 * as that will be queued in __generic_make_request 1332 * as that will be queued in __generic_make_request
1333 * and subsequent mempool_alloc might block 1333 * and subsequent mempool_alloc might block
@@ -3218,10 +3218,6 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
3218 if (j == conf->copies) { 3218 if (j == conf->copies) {
3219 /* Cannot recover, so abort the recovery or 3219 /* Cannot recover, so abort the recovery or
3220 * record a bad block */ 3220 * record a bad block */
3221 put_buf(r10_bio);
3222 if (rb2)
3223 atomic_dec(&rb2->remaining);
3224 r10_bio = rb2;
3225 if (any_working) { 3221 if (any_working) {
3226 /* problem is that there are bad blocks 3222 /* problem is that there are bad blocks
3227 * on other device(s) 3223 * on other device(s)
@@ -3253,6 +3249,10 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
3253 mirror->recovery_disabled 3249 mirror->recovery_disabled
3254 = mddev->recovery_disabled; 3250 = mddev->recovery_disabled;
3255 } 3251 }
3252 put_buf(r10_bio);
3253 if (rb2)
3254 atomic_dec(&rb2->remaining);
3255 r10_bio = rb2;
3256 break; 3256 break;
3257 } 3257 }
3258 } 3258 }
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index cc055da02e2a..cbb15716a5db 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -687,7 +687,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
687 } else { 687 } else {
688 if (!test_bit(STRIPE_HANDLE, &sh->state)) 688 if (!test_bit(STRIPE_HANDLE, &sh->state))
689 atomic_inc(&conf->active_stripes); 689 atomic_inc(&conf->active_stripes);
690 BUG_ON(list_empty(&sh->lru)); 690 BUG_ON(list_empty(&sh->lru) &&
691 !test_bit(STRIPE_EXPANDING, &sh->state));
691 list_del_init(&sh->lru); 692 list_del_init(&sh->lru);
692 if (sh->group) { 693 if (sh->group) {
693 sh->group->stripes_cnt--; 694 sh->group->stripes_cnt--;
@@ -3608,7 +3609,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
3608 */ 3609 */
3609 set_bit(R5_Insync, &dev->flags); 3610 set_bit(R5_Insync, &dev->flags);
3610 3611
3611 if (rdev && test_bit(R5_WriteError, &dev->flags)) { 3612 if (test_bit(R5_WriteError, &dev->flags)) {
3612 /* This flag does not apply to '.replacement' 3613 /* This flag does not apply to '.replacement'
3613 * only to .rdev, so make sure to check that*/ 3614 * only to .rdev, so make sure to check that*/
3614 struct md_rdev *rdev2 = rcu_dereference( 3615 struct md_rdev *rdev2 = rcu_dereference(
@@ -3621,7 +3622,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
3621 } else 3622 } else
3622 clear_bit(R5_WriteError, &dev->flags); 3623 clear_bit(R5_WriteError, &dev->flags);
3623 } 3624 }
3624 if (rdev && test_bit(R5_MadeGood, &dev->flags)) { 3625 if (test_bit(R5_MadeGood, &dev->flags)) {
3625 /* This flag does not apply to '.replacement' 3626 /* This flag does not apply to '.replacement'
3626 * only to .rdev, so make sure to check that*/ 3627 * only to .rdev, so make sure to check that*/
3627 struct md_rdev *rdev2 = rcu_dereference( 3628 struct md_rdev *rdev2 = rcu_dereference(
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 8b3107b2fcc1..0067b975873f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12942,25 +12942,26 @@ static void __bnx2x_remove(struct pci_dev *pdev,
12942 pci_set_power_state(pdev, PCI_D3hot); 12942 pci_set_power_state(pdev, PCI_D3hot);
12943 } 12943 }
12944 12944
12945 if (bp->regview) 12945 if (remove_netdev) {
12946 iounmap(bp->regview); 12946 if (bp->regview)
12947 iounmap(bp->regview);
12947 12948
12948 /* for vf doorbells are part of the regview and were unmapped along with 12949 /* For vfs, doorbells are part of the regview and were unmapped
12949 * it. FW is only loaded by PF. 12950 * along with it. FW is only loaded by PF.
12950 */ 12951 */
12951 if (IS_PF(bp)) { 12952 if (IS_PF(bp)) {
12952 if (bp->doorbells) 12953 if (bp->doorbells)
12953 iounmap(bp->doorbells); 12954 iounmap(bp->doorbells);
12954 12955
12955 bnx2x_release_firmware(bp); 12956 bnx2x_release_firmware(bp);
12956 } 12957 }
12957 bnx2x_free_mem_bp(bp); 12958 bnx2x_free_mem_bp(bp);
12958 12959
12959 if (remove_netdev)
12960 free_netdev(dev); 12960 free_netdev(dev);
12961 12961
12962 if (atomic_read(&pdev->enable_cnt) == 1) 12962 if (atomic_read(&pdev->enable_cnt) == 1)
12963 pci_release_regions(pdev); 12963 pci_release_regions(pdev);
12964 }
12964 12965
12965 pci_disable_device(pdev); 12966 pci_disable_device(pdev);
12966} 12967}
diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
index cb05be905def..81e8402a74b4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
@@ -423,7 +423,7 @@ u64 cxgb4_select_ntuple(struct net_device *dev,
423 * in the Compressed Filter Tuple. 423 * in the Compressed Filter Tuple.
424 */ 424 */
425 if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE) 425 if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE)
426 ntuple |= (F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift; 426 ntuple |= (u64)(F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift;
427 427
428 if (tp->port_shift >= 0) 428 if (tp->port_shift >= 0)
429 ntuple |= (u64)l2t->lport << tp->port_shift; 429 ntuple |= (u64)l2t->lport << tp->port_shift;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index bf40fdaecfa3..a37039d353c5 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1776,6 +1776,7 @@ static void be_post_rx_frags(struct be_rx_obj *rxo, gfp_t gfp)
1776 struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL; 1776 struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL;
1777 struct be_queue_info *rxq = &rxo->q; 1777 struct be_queue_info *rxq = &rxo->q;
1778 struct page *pagep = NULL; 1778 struct page *pagep = NULL;
1779 struct device *dev = &adapter->pdev->dev;
1779 struct be_eth_rx_d *rxd; 1780 struct be_eth_rx_d *rxd;
1780 u64 page_dmaaddr = 0, frag_dmaaddr; 1781 u64 page_dmaaddr = 0, frag_dmaaddr;
1781 u32 posted, page_offset = 0; 1782 u32 posted, page_offset = 0;
@@ -1788,9 +1789,15 @@ static void be_post_rx_frags(struct be_rx_obj *rxo, gfp_t gfp)
1788 rx_stats(rxo)->rx_post_fail++; 1789 rx_stats(rxo)->rx_post_fail++;
1789 break; 1790 break;
1790 } 1791 }
1791 page_dmaaddr = dma_map_page(&adapter->pdev->dev, pagep, 1792 page_dmaaddr = dma_map_page(dev, pagep, 0,
1792 0, adapter->big_page_size, 1793 adapter->big_page_size,
1793 DMA_FROM_DEVICE); 1794 DMA_FROM_DEVICE);
1795 if (dma_mapping_error(dev, page_dmaaddr)) {
1796 put_page(pagep);
1797 pagep = NULL;
1798 rx_stats(rxo)->rx_post_fail++;
1799 break;
1800 }
1794 page_info->page_offset = 0; 1801 page_info->page_offset = 0;
1795 } else { 1802 } else {
1796 get_page(pagep); 1803 get_page(pagep);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index c30d41d6e426..6d14eea17918 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev)
6174 return 0; 6174 return 0;
6175} 6175}
6176 6176
6177#ifdef CONFIG_PM 6177#ifdef CONFIG_PM_SLEEP
6178static int e1000_suspend(struct device *dev) 6178static int e1000_suspend(struct device *dev)
6179{ 6179{
6180 struct pci_dev *pdev = to_pci_dev(dev); 6180 struct pci_dev *pdev = to_pci_dev(dev);
@@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev)
6193 6193
6194 return __e1000_resume(pdev); 6194 return __e1000_resume(pdev);
6195} 6195}
6196#endif /* CONFIG_PM */ 6196#endif /* CONFIG_PM_SLEEP */
6197 6197
6198#ifdef CONFIG_PM_RUNTIME 6198#ifdef CONFIG_PM_RUNTIME
6199static int e1000_runtime_suspend(struct device *dev) 6199static int e1000_runtime_suspend(struct device *dev)
@@ -7015,13 +7015,11 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = {
7015}; 7015};
7016MODULE_DEVICE_TABLE(pci, e1000_pci_tbl); 7016MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
7017 7017
7018#ifdef CONFIG_PM
7019static const struct dev_pm_ops e1000_pm_ops = { 7018static const struct dev_pm_ops e1000_pm_ops = {
7020 SET_SYSTEM_SLEEP_PM_OPS(e1000_suspend, e1000_resume) 7019 SET_SYSTEM_SLEEP_PM_OPS(e1000_suspend, e1000_resume)
7021 SET_RUNTIME_PM_OPS(e1000_runtime_suspend, e1000_runtime_resume, 7020 SET_RUNTIME_PM_OPS(e1000_runtime_suspend, e1000_runtime_resume,
7022 e1000_idle) 7021 e1000_idle)
7023}; 7022};
7024#endif
7025 7023
7026/* PCI Device API Driver */ 7024/* PCI Device API Driver */
7027static struct pci_driver e1000_driver = { 7025static struct pci_driver e1000_driver = {
@@ -7029,11 +7027,9 @@ static struct pci_driver e1000_driver = {
7029 .id_table = e1000_pci_tbl, 7027 .id_table = e1000_pci_tbl,
7030 .probe = e1000_probe, 7028 .probe = e1000_probe,
7031 .remove = e1000_remove, 7029 .remove = e1000_remove,
7032#ifdef CONFIG_PM
7033 .driver = { 7030 .driver = {
7034 .pm = &e1000_pm_ops, 7031 .pm = &e1000_pm_ops,
7035 }, 7032 },
7036#endif
7037 .shutdown = e1000_shutdown, 7033 .shutdown = e1000_shutdown,
7038 .err_handler = &e1000_err_handler 7034 .err_handler = &e1000_err_handler
7039}; 7035};
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 449f506d2e8f..f705aeeba767 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4765,6 +4765,8 @@ static int qlge_probe(struct pci_dev *pdev,
4765 NETIF_F_RXCSUM; 4765 NETIF_F_RXCSUM;
4766 ndev->features = ndev->hw_features; 4766 ndev->features = ndev->hw_features;
4767 ndev->vlan_features = ndev->hw_features; 4767 ndev->vlan_features = ndev->hw_features;
4768 /* vlan gets same features (except vlan filter) */
4769 ndev->vlan_features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
4768 4770
4769 if (test_bit(QL_DMA64, &qdev->flags)) 4771 if (test_bit(QL_DMA64, &qdev->flags))
4770 ndev->features |= NETIF_F_HIGHDMA; 4772 ndev->features |= NETIF_F_HIGHDMA;
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index cce6c4bc556a..ef312bc6b865 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1618,6 +1618,7 @@ static void rhine_reset_task(struct work_struct *work)
1618 goto out_unlock; 1618 goto out_unlock;
1619 1619
1620 napi_disable(&rp->napi); 1620 napi_disable(&rp->napi);
1621 netif_tx_disable(dev);
1621 spin_lock_bh(&rp->lock); 1622 spin_lock_bh(&rp->lock);
1622 1623
1623 /* clear all descriptors */ 1624 /* clear all descriptors */
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 14aa48fa8d7e..e80219877730 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -614,6 +614,18 @@ static const struct usb_device_id products[] = {
614 USB_DEVICE(0x0a46, 0x9621), /* DM9621A USB to Fast Ethernet Adapter */ 614 USB_DEVICE(0x0a46, 0x9621), /* DM9621A USB to Fast Ethernet Adapter */
615 .driver_info = (unsigned long)&dm9601_info, 615 .driver_info = (unsigned long)&dm9601_info,
616 }, 616 },
617 {
618 USB_DEVICE(0x0a46, 0x9622), /* DM9622 USB to Fast Ethernet Adapter */
619 .driver_info = (unsigned long)&dm9601_info,
620 },
621 {
622 USB_DEVICE(0x0a46, 0x0269), /* DM962OA USB to Fast Ethernet Adapter */
623 .driver_info = (unsigned long)&dm9601_info,
624 },
625 {
626 USB_DEVICE(0x0a46, 0x1269), /* DM9621A USB to Fast Ethernet Adapter */
627 .driver_info = (unsigned long)&dm9601_info,
628 },
617 {}, // END 629 {}, // END
618}; 630};
619 631
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 8494bb53ebdc..aba04f561760 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1245,7 +1245,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
1245 return -ENOMEM; 1245 return -ENOMEM;
1246 1246
1247 urb->num_sgs = num_sgs; 1247 urb->num_sgs = num_sgs;
1248 sg_init_table(urb->sg, urb->num_sgs); 1248 sg_init_table(urb->sg, urb->num_sgs + 1);
1249 1249
1250 sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb)); 1250 sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb));
1251 total_len += skb_headlen(skb); 1251 total_len += skb_headlen(skb);
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 114f5ef4b73a..2832576d8b12 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -512,7 +512,6 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {
512 512
513static const struct acpi_device_id byt_gpio_acpi_match[] = { 513static const struct acpi_device_id byt_gpio_acpi_match[] = {
514 { "INT33B2", 0 }, 514 { "INT33B2", 0 },
515 { "INT33FC", 0 },
516 { } 515 { }
517}; 516};
518MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match); 517MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match);
diff --git a/fs/dcache.c b/fs/dcache.c
index 6055d61811d3..cb4a10690868 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -3061,8 +3061,13 @@ char *d_path(const struct path *path, char *buf, int buflen)
3061 * thus don't need to be hashed. They also don't need a name until a 3061 * thus don't need to be hashed. They also don't need a name until a
3062 * user wants to identify the object in /proc/pid/fd/. The little hack 3062 * user wants to identify the object in /proc/pid/fd/. The little hack
3063 * below allows us to generate a name for these objects on demand: 3063 * below allows us to generate a name for these objects on demand:
3064 *
3065 * Some pseudo inodes are mountable. When they are mounted
3066 * path->dentry == path->mnt->mnt_root. In that case don't call d_dname
3067 * and instead have d_path return the mounted path.
3064 */ 3068 */
3065 if (path->dentry->d_op && path->dentry->d_op->d_dname) 3069 if (path->dentry->d_op && path->dentry->d_op->d_dname &&
3070 (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root))
3066 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); 3071 return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
3067 3072
3068 rcu_read_lock(); 3073 rcu_read_lock();
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 1f4a10ece2f1..e0259a163f98 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -516,13 +516,16 @@ writeback_single_inode(struct inode *inode, struct bdi_writeback *wb,
516 } 516 }
517 WARN_ON(inode->i_state & I_SYNC); 517 WARN_ON(inode->i_state & I_SYNC);
518 /* 518 /*
519 * Skip inode if it is clean. We don't want to mess with writeback 519 * Skip inode if it is clean and we have no outstanding writeback in
520 * lists in this function since flusher thread may be doing for example 520 * WB_SYNC_ALL mode. We don't want to mess with writeback lists in this
521 * sync in parallel and if we move the inode, it could get skipped. So 521 * function since flusher thread may be doing for example sync in
522 * here we make sure inode is on some writeback list and leave it there 522 * parallel and if we move the inode, it could get skipped. So here we
523 * unless we have completely cleaned the inode. 523 * make sure inode is on some writeback list and leave it there unless
524 * we have completely cleaned the inode.
524 */ 525 */
525 if (!(inode->i_state & I_DIRTY)) 526 if (!(inode->i_state & I_DIRTY) &&
527 (wbc->sync_mode != WB_SYNC_ALL ||
528 !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK)))
526 goto out; 529 goto out;
527 inode->i_state |= I_SYNC; 530 inode->i_state |= I_SYNC;
528 spin_unlock(&inode->i_lock); 531 spin_unlock(&inode->i_lock);
diff --git a/fs/namespace.c b/fs/namespace.c
index ac2ce8a766e1..be32ebccdeb1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2886,7 +2886,7 @@ bool fs_fully_visible(struct file_system_type *type)
2886 struct inode *inode = child->mnt_mountpoint->d_inode; 2886 struct inode *inode = child->mnt_mountpoint->d_inode;
2887 if (!S_ISDIR(inode->i_mode)) 2887 if (!S_ISDIR(inode->i_mode))
2888 goto next; 2888 goto next;
2889 if (inode->i_nlink != 2) 2889 if (inode->i_nlink > 2)
2890 goto next; 2890 goto next;
2891 } 2891 }
2892 visible = true; 2892 visible = true;
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 9f6b486b6c01..a1a191634abc 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1440,17 +1440,19 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci,
1440 1440
1441 nilfs_clear_logs(&sci->sc_segbufs); 1441 nilfs_clear_logs(&sci->sc_segbufs);
1442 1442
1443 err = nilfs_segctor_extend_segments(sci, nilfs, nadd);
1444 if (unlikely(err))
1445 return err;
1446
1447 if (sci->sc_stage.flags & NILFS_CF_SUFREED) { 1443 if (sci->sc_stage.flags & NILFS_CF_SUFREED) {
1448 err = nilfs_sufile_cancel_freev(nilfs->ns_sufile, 1444 err = nilfs_sufile_cancel_freev(nilfs->ns_sufile,
1449 sci->sc_freesegs, 1445 sci->sc_freesegs,
1450 sci->sc_nfreesegs, 1446 sci->sc_nfreesegs,
1451 NULL); 1447 NULL);
1452 WARN_ON(err); /* do not happen */ 1448 WARN_ON(err); /* do not happen */
1449 sci->sc_stage.flags &= ~NILFS_CF_SUFREED;
1453 } 1450 }
1451
1452 err = nilfs_segctor_extend_segments(sci, nilfs, nadd);
1453 if (unlikely(err))
1454 return err;
1455
1454 nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA); 1456 nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA);
1455 sci->sc_stage = prev_stage; 1457 sci->sc_stage = prev_stage;
1456 } 1458 }
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index fe68a5a98583..7032518f8542 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -6,6 +6,8 @@
6#include <linux/proc_fs.h> 6#include <linux/proc_fs.h>
7#include <linux/elf.h> 7#include <linux/elf.h>
8 8
9#include <asm/pgtable.h> /* for pgprot_t */
10
9#define ELFCORE_ADDR_MAX (-1ULL) 11#define ELFCORE_ADDR_MAX (-1ULL)
10#define ELFCORE_ADDR_ERR (-2ULL) 12#define ELFCORE_ADDR_ERR (-2ULL)
11 13
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index eff50e062be8..d9c8dbd3373f 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -445,7 +445,7 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
445static inline struct i2c_adapter * 445static inline struct i2c_adapter *
446i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter) 446i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter)
447{ 447{
448#if IS_ENABLED(I2C_MUX) 448#if IS_ENABLED(CONFIG_I2C_MUX)
449 struct device *parent = adapter->dev.parent; 449 struct device *parent = adapter->dev.parent;
450 450
451 if (parent != NULL && parent->type == &i2c_adapter_type) 451 if (parent != NULL && parent->type == &i2c_adapter_type)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index cf87a24c0f92..535f158977b9 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -117,15 +117,15 @@ repeat:
117} 117}
118 118
119/** 119/**
120 * read_seqcount_begin_no_lockdep - start seq-read critical section w/o lockdep 120 * raw_read_seqcount_begin - start seq-read critical section w/o lockdep
121 * @s: pointer to seqcount_t 121 * @s: pointer to seqcount_t
122 * Returns: count to be passed to read_seqcount_retry 122 * Returns: count to be passed to read_seqcount_retry
123 * 123 *
124 * read_seqcount_begin_no_lockdep opens a read critical section of the given 124 * raw_read_seqcount_begin opens a read critical section of the given
125 * seqcount, but without any lockdep checking. Validity of the critical 125 * seqcount, but without any lockdep checking. Validity of the critical
126 * section is tested by checking read_seqcount_retry function. 126 * section is tested by checking read_seqcount_retry function.
127 */ 127 */
128static inline unsigned read_seqcount_begin_no_lockdep(const seqcount_t *s) 128static inline unsigned raw_read_seqcount_begin(const seqcount_t *s)
129{ 129{
130 unsigned ret = __read_seqcount_begin(s); 130 unsigned ret = __read_seqcount_begin(s);
131 smp_rmb(); 131 smp_rmb();
@@ -144,7 +144,7 @@ static inline unsigned read_seqcount_begin_no_lockdep(const seqcount_t *s)
144static inline unsigned read_seqcount_begin(const seqcount_t *s) 144static inline unsigned read_seqcount_begin(const seqcount_t *s)
145{ 145{
146 seqcount_lockdep_reader_access(s); 146 seqcount_lockdep_reader_access(s);
147 return read_seqcount_begin_no_lockdep(s); 147 return raw_read_seqcount_begin(s);
148} 148}
149 149
150/** 150/**
@@ -206,14 +206,26 @@ static inline int read_seqcount_retry(const seqcount_t *s, unsigned start)
206} 206}
207 207
208 208
209
210static inline void raw_write_seqcount_begin(seqcount_t *s)
211{
212 s->sequence++;
213 smp_wmb();
214}
215
216static inline void raw_write_seqcount_end(seqcount_t *s)
217{
218 smp_wmb();
219 s->sequence++;
220}
221
209/* 222/*
210 * Sequence counter only version assumes that callers are using their 223 * Sequence counter only version assumes that callers are using their
211 * own mutexing. 224 * own mutexing.
212 */ 225 */
213static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass) 226static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass)
214{ 227{
215 s->sequence++; 228 raw_write_seqcount_begin(s);
216 smp_wmb();
217 seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_); 229 seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
218} 230}
219 231
@@ -225,8 +237,7 @@ static inline void write_seqcount_begin(seqcount_t *s)
225static inline void write_seqcount_end(seqcount_t *s) 237static inline void write_seqcount_end(seqcount_t *s)
226{ 238{
227 seqcount_release(&s->dep_map, 1, _RET_IP_); 239 seqcount_release(&s->dep_map, 1, _RET_IP_);
228 smp_wmb(); 240 raw_write_seqcount_end(s);
229 s->sequence++;
230} 241}
231 242
232/** 243/**
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 76d54270f2e2..65bb13035598 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -165,7 +165,6 @@ struct inet6_dev {
165 struct net_device *dev; 165 struct net_device *dev;
166 166
167 struct list_head addr_list; 167 struct list_head addr_list;
168 int valid_ll_addr_cnt;
169 168
170 struct ifmcaddr6 *mc_list; 169 struct ifmcaddr6 *mc_list;
171 struct ifmcaddr6 *mc_tomb; 170 struct ifmcaddr6 *mc_tomb;
diff --git a/kernel/fork.c b/kernel/fork.c
index 5721f0e3f2da..dfa736c98d17 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1172,7 +1172,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1172 * do not allow it to share a thread group or signal handlers or 1172 * do not allow it to share a thread group or signal handlers or
1173 * parent with the forking task. 1173 * parent with the forking task.
1174 */ 1174 */
1175 if (clone_flags & (CLONE_SIGHAND | CLONE_PARENT)) { 1175 if (clone_flags & CLONE_SIGHAND) {
1176 if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) || 1176 if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) ||
1177 (task_active_pid_ns(current) != 1177 (task_active_pid_ns(current) !=
1178 current->nsproxy->pid_ns_for_children)) 1178 current->nsproxy->pid_ns_for_children))
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c7395d97e4cb..e64b0794060e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3923,7 +3923,7 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg)
3923{ 3923{
3924 struct sched_entity *se = tg->se[cpu]; 3924 struct sched_entity *se = tg->se[cpu];
3925 3925
3926 if (!tg->parent || !wl) /* the trivial, non-cgroup case */ 3926 if (!tg->parent) /* the trivial, non-cgroup case */
3927 return wl; 3927 return wl;
3928 3928
3929 for_each_sched_entity(se) { 3929 for_each_sched_entity(se) {
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index 68b799375981..0abb36464281 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -74,7 +74,7 @@ unsigned long long notrace sched_clock(void)
74 return cd.epoch_ns; 74 return cd.epoch_ns;
75 75
76 do { 76 do {
77 seq = read_seqcount_begin(&cd.seq); 77 seq = raw_read_seqcount_begin(&cd.seq);
78 epoch_cyc = cd.epoch_cyc; 78 epoch_cyc = cd.epoch_cyc;
79 epoch_ns = cd.epoch_ns; 79 epoch_ns = cd.epoch_ns;
80 } while (read_seqcount_retry(&cd.seq, seq)); 80 } while (read_seqcount_retry(&cd.seq, seq));
@@ -99,10 +99,10 @@ static void notrace update_sched_clock(void)
99 cd.mult, cd.shift); 99 cd.mult, cd.shift);
100 100
101 raw_local_irq_save(flags); 101 raw_local_irq_save(flags);
102 write_seqcount_begin(&cd.seq); 102 raw_write_seqcount_begin(&cd.seq);
103 cd.epoch_ns = ns; 103 cd.epoch_ns = ns;
104 cd.epoch_cyc = cyc; 104 cd.epoch_cyc = cyc;
105 write_seqcount_end(&cd.seq); 105 raw_write_seqcount_end(&cd.seq);
106 raw_local_irq_restore(flags); 106 raw_local_irq_restore(flags);
107} 107}
108 108
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index 7473ee3b4ee7..8280a5dd1727 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -82,10 +82,10 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
82 unsigned long flags; 82 unsigned long flags;
83 raw_spin_lock_irqsave(&fbc->lock, flags); 83 raw_spin_lock_irqsave(&fbc->lock, flags);
84 fbc->count += count; 84 fbc->count += count;
85 __this_cpu_sub(*fbc->counters, count - amount);
85 raw_spin_unlock_irqrestore(&fbc->lock, flags); 86 raw_spin_unlock_irqrestore(&fbc->lock, flags);
86 __this_cpu_write(*fbc->counters, 0);
87 } else { 87 } else {
88 __this_cpu_write(*fbc->counters, count); 88 this_cpu_add(*fbc->counters, amount);
89 } 89 }
90 preempt_enable(); 90 preempt_enable();
91} 91}
diff --git a/mm/util.c b/mm/util.c
index f7bc2096071c..808f375648e7 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -390,7 +390,10 @@ struct address_space *page_mapping(struct page *page)
390{ 390{
391 struct address_space *mapping = page->mapping; 391 struct address_space *mapping = page->mapping;
392 392
393 VM_BUG_ON(PageSlab(page)); 393 /* This happens if someone calls flush_dcache_page on slab page */
394 if (unlikely(PageSlab(page)))
395 return NULL;
396
394 if (unlikely(PageSwapCache(page))) { 397 if (unlikely(PageSwapCache(page))) {
395 swp_entry_t entry; 398 swp_entry_t entry;
396 399
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 1511f64a6cea..faba0f61ad53 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -277,7 +277,7 @@ int batadv_max_header_len(void)
277 sizeof(struct batadv_coded_packet)); 277 sizeof(struct batadv_coded_packet));
278#endif 278#endif
279 279
280 return header_len; 280 return header_len + ETH_HLEN;
281} 281}
282 282
283/** 283/**
diff --git a/net/core/filter.c b/net/core/filter.c
index 01b780856db2..ad30d626a5bd 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -36,7 +36,6 @@
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/unaligned.h> 37#include <asm/unaligned.h>
38#include <linux/filter.h> 38#include <linux/filter.h>
39#include <linux/reciprocal_div.h>
40#include <linux/ratelimit.h> 39#include <linux/ratelimit.h>
41#include <linux/seccomp.h> 40#include <linux/seccomp.h>
42#include <linux/if_vlan.h> 41#include <linux/if_vlan.h>
@@ -166,7 +165,7 @@ unsigned int sk_run_filter(const struct sk_buff *skb,
166 A /= X; 165 A /= X;
167 continue; 166 continue;
168 case BPF_S_ALU_DIV_K: 167 case BPF_S_ALU_DIV_K:
169 A = reciprocal_divide(A, K); 168 A /= K;
170 continue; 169 continue;
171 case BPF_S_ALU_MOD_X: 170 case BPF_S_ALU_MOD_X:
172 if (X == 0) 171 if (X == 0)
@@ -553,11 +552,6 @@ int sk_chk_filter(struct sock_filter *filter, unsigned int flen)
553 /* Some instructions need special checks */ 552 /* Some instructions need special checks */
554 switch (code) { 553 switch (code) {
555 case BPF_S_ALU_DIV_K: 554 case BPF_S_ALU_DIV_K:
556 /* check for division by zero */
557 if (ftest->k == 0)
558 return -EINVAL;
559 ftest->k = reciprocal_value(ftest->k);
560 break;
561 case BPF_S_ALU_MOD_K: 555 case BPF_S_ALU_MOD_K:
562 /* check for division by zero */ 556 /* check for division by zero */
563 if (ftest->k == 0) 557 if (ftest->k == 0)
@@ -853,27 +847,7 @@ void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to)
853 to->code = decodes[code]; 847 to->code = decodes[code];
854 to->jt = filt->jt; 848 to->jt = filt->jt;
855 to->jf = filt->jf; 849 to->jf = filt->jf;
856 850 to->k = filt->k;
857 if (code == BPF_S_ALU_DIV_K) {
858 /*
859 * When loaded this rule user gave us X, which was
860 * translated into R = r(X). Now we calculate the
861 * RR = r(R) and report it back. If next time this
862 * value is loaded and RRR = r(RR) is calculated
863 * then the R == RRR will be true.
864 *
865 * One exception. X == 1 translates into R == 0 and
866 * we can't calculate RR out of it with r().
867 */
868
869 if (filt->k == 0)
870 to->k = 1;
871 else
872 to->k = reciprocal_value(filt->k);
873
874 BUG_ON(reciprocal_value(to->k) != filt->k);
875 } else
876 to->k = filt->k;
877} 851}
878 852
879int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, unsigned int len) 853int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, unsigned int len)
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
index d08c7a43dcd1..89b265aea151 100644
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -221,8 +221,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
221 221
222 if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) { 222 if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) {
223 type = nla_get_u8(info->attrs[IEEE802154_ATTR_DEV_TYPE]); 223 type = nla_get_u8(info->attrs[IEEE802154_ATTR_DEV_TYPE]);
224 if (type >= __IEEE802154_DEV_MAX) 224 if (type >= __IEEE802154_DEV_MAX) {
225 return -EINVAL; 225 rc = -EINVAL;
226 goto nla_put_failure;
227 }
226 } 228 }
227 229
228 dev = phy->add_iface(phy, devname, type); 230 dev = phy->add_iface(phy, devname, type);
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index a0f52dac8940..e34dccbc4d70 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -930,12 +930,15 @@ skip_listen_ht:
930 spin_lock_bh(lock); 930 spin_lock_bh(lock);
931 sk_nulls_for_each(sk, node, &head->chain) { 931 sk_nulls_for_each(sk, node, &head->chain) {
932 int res; 932 int res;
933 int state;
933 934
934 if (!net_eq(sock_net(sk), net)) 935 if (!net_eq(sock_net(sk), net))
935 continue; 936 continue;
936 if (num < s_num) 937 if (num < s_num)
937 goto next_normal; 938 goto next_normal;
938 if (!(r->idiag_states & (1 << sk->sk_state))) 939 state = (sk->sk_state == TCP_TIME_WAIT) ?
940 inet_twsk(sk)->tw_substate : sk->sk_state;
941 if (!(r->idiag_states & (1 << state)))
939 goto next_normal; 942 goto next_normal;
940 if (r->sdiag_family != AF_UNSPEC && 943 if (r->sdiag_family != AF_UNSPEC &&
941 sk->sk_family != r->sdiag_family) 944 sk->sk_family != r->sdiag_family)
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 62212c772a4b..1672409f5ba5 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -157,9 +157,12 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id)
157static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4, 157static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4,
158 struct mr_table **mrt) 158 struct mr_table **mrt)
159{ 159{
160 struct ipmr_result res;
161 struct fib_lookup_arg arg = { .result = &res, };
162 int err; 160 int err;
161 struct ipmr_result res;
162 struct fib_lookup_arg arg = {
163 .result = &res,
164 .flags = FIB_LOOKUP_NOREF,
165 };
163 166
164 err = fib_rules_lookup(net->ipv4.mr_rules_ops, 167 err = fib_rules_lookup(net->ipv4.mr_rules_ops,
165 flowi4_to_flowi(flp4), 0, &arg); 168 flowi4_to_flowi(flp4), 0, &arg);
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 06493736fbc8..098b3a29f6f3 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -22,6 +22,9 @@
22 22
23int sysctl_tcp_nometrics_save __read_mostly; 23int sysctl_tcp_nometrics_save __read_mostly;
24 24
25static struct tcp_metrics_block *__tcp_get_metrics(const struct inetpeer_addr *addr,
26 struct net *net, unsigned int hash);
27
25struct tcp_fastopen_metrics { 28struct tcp_fastopen_metrics {
26 u16 mss; 29 u16 mss;
27 u16 syn_loss:10; /* Recurring Fast Open SYN losses */ 30 u16 syn_loss:10; /* Recurring Fast Open SYN losses */
@@ -130,16 +133,41 @@ static void tcpm_suck_dst(struct tcp_metrics_block *tm, struct dst_entry *dst,
130 } 133 }
131} 134}
132 135
136#define TCP_METRICS_TIMEOUT (60 * 60 * HZ)
137
138static void tcpm_check_stamp(struct tcp_metrics_block *tm, struct dst_entry *dst)
139{
140 if (tm && unlikely(time_after(jiffies, tm->tcpm_stamp + TCP_METRICS_TIMEOUT)))
141 tcpm_suck_dst(tm, dst, false);
142}
143
144#define TCP_METRICS_RECLAIM_DEPTH 5
145#define TCP_METRICS_RECLAIM_PTR (struct tcp_metrics_block *) 0x1UL
146
133static struct tcp_metrics_block *tcpm_new(struct dst_entry *dst, 147static struct tcp_metrics_block *tcpm_new(struct dst_entry *dst,
134 struct inetpeer_addr *addr, 148 struct inetpeer_addr *addr,
135 unsigned int hash, 149 unsigned int hash)
136 bool reclaim)
137{ 150{
138 struct tcp_metrics_block *tm; 151 struct tcp_metrics_block *tm;
139 struct net *net; 152 struct net *net;
153 bool reclaim = false;
140 154
141 spin_lock_bh(&tcp_metrics_lock); 155 spin_lock_bh(&tcp_metrics_lock);
142 net = dev_net(dst->dev); 156 net = dev_net(dst->dev);
157
158 /* While waiting for the spin-lock the cache might have been populated
159 * with this entry and so we have to check again.
160 */
161 tm = __tcp_get_metrics(addr, net, hash);
162 if (tm == TCP_METRICS_RECLAIM_PTR) {
163 reclaim = true;
164 tm = NULL;
165 }
166 if (tm) {
167 tcpm_check_stamp(tm, dst);
168 goto out_unlock;
169 }
170
143 if (unlikely(reclaim)) { 171 if (unlikely(reclaim)) {
144 struct tcp_metrics_block *oldest; 172 struct tcp_metrics_block *oldest;
145 173
@@ -169,17 +197,6 @@ out_unlock:
169 return tm; 197 return tm;
170} 198}
171 199
172#define TCP_METRICS_TIMEOUT (60 * 60 * HZ)
173
174static void tcpm_check_stamp(struct tcp_metrics_block *tm, struct dst_entry *dst)
175{
176 if (tm && unlikely(time_after(jiffies, tm->tcpm_stamp + TCP_METRICS_TIMEOUT)))
177 tcpm_suck_dst(tm, dst, false);
178}
179
180#define TCP_METRICS_RECLAIM_DEPTH 5
181#define TCP_METRICS_RECLAIM_PTR (struct tcp_metrics_block *) 0x1UL
182
183static struct tcp_metrics_block *tcp_get_encode(struct tcp_metrics_block *tm, int depth) 200static struct tcp_metrics_block *tcp_get_encode(struct tcp_metrics_block *tm, int depth)
184{ 201{
185 if (tm) 202 if (tm)
@@ -282,7 +299,6 @@ static struct tcp_metrics_block *tcp_get_metrics(struct sock *sk,
282 struct inetpeer_addr addr; 299 struct inetpeer_addr addr;
283 unsigned int hash; 300 unsigned int hash;
284 struct net *net; 301 struct net *net;
285 bool reclaim;
286 302
287 addr.family = sk->sk_family; 303 addr.family = sk->sk_family;
288 switch (addr.family) { 304 switch (addr.family) {
@@ -304,13 +320,10 @@ static struct tcp_metrics_block *tcp_get_metrics(struct sock *sk,
304 hash = hash_32(hash, net->ipv4.tcp_metrics_hash_log); 320 hash = hash_32(hash, net->ipv4.tcp_metrics_hash_log);
305 321
306 tm = __tcp_get_metrics(&addr, net, hash); 322 tm = __tcp_get_metrics(&addr, net, hash);
307 reclaim = false; 323 if (tm == TCP_METRICS_RECLAIM_PTR)
308 if (tm == TCP_METRICS_RECLAIM_PTR) {
309 reclaim = true;
310 tm = NULL; 324 tm = NULL;
311 }
312 if (!tm && create) 325 if (!tm && create)
313 tm = tcpm_new(dst, &addr, hash, reclaim); 326 tm = tcpm_new(dst, &addr, hash);
314 else 327 else
315 tcpm_check_stamp(tm, dst); 328 tcpm_check_stamp(tm, dst);
316 329
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index abe46a4228ce..4b6b720971b9 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3189,6 +3189,22 @@ out:
3189 in6_ifa_put(ifp); 3189 in6_ifa_put(ifp);
3190} 3190}
3191 3191
3192/* ifp->idev must be at least read locked */
3193static bool ipv6_lonely_lladdr(struct inet6_ifaddr *ifp)
3194{
3195 struct inet6_ifaddr *ifpiter;
3196 struct inet6_dev *idev = ifp->idev;
3197
3198 list_for_each_entry(ifpiter, &idev->addr_list, if_list) {
3199 if (ifp != ifpiter && ifpiter->scope == IFA_LINK &&
3200 (ifpiter->flags & (IFA_F_PERMANENT|IFA_F_TENTATIVE|
3201 IFA_F_OPTIMISTIC|IFA_F_DADFAILED)) ==
3202 IFA_F_PERMANENT)
3203 return false;
3204 }
3205 return true;
3206}
3207
3192static void addrconf_dad_completed(struct inet6_ifaddr *ifp) 3208static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
3193{ 3209{
3194 struct net_device *dev = ifp->idev->dev; 3210 struct net_device *dev = ifp->idev->dev;
@@ -3208,14 +3224,11 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
3208 */ 3224 */
3209 3225
3210 read_lock_bh(&ifp->idev->lock); 3226 read_lock_bh(&ifp->idev->lock);
3211 spin_lock(&ifp->lock); 3227 send_mld = ifp->scope == IFA_LINK && ipv6_lonely_lladdr(ifp);
3212 send_mld = ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL &&
3213 ifp->idev->valid_ll_addr_cnt == 1;
3214 send_rs = send_mld && 3228 send_rs = send_mld &&
3215 ipv6_accept_ra(ifp->idev) && 3229 ipv6_accept_ra(ifp->idev) &&
3216 ifp->idev->cnf.rtr_solicits > 0 && 3230 ifp->idev->cnf.rtr_solicits > 0 &&
3217 (dev->flags&IFF_LOOPBACK) == 0; 3231 (dev->flags&IFF_LOOPBACK) == 0;
3218 spin_unlock(&ifp->lock);
3219 read_unlock_bh(&ifp->idev->lock); 3232 read_unlock_bh(&ifp->idev->lock);
3220 3233
3221 /* While dad is in progress mld report's source address is in6_addrany. 3234 /* While dad is in progress mld report's source address is in6_addrany.
@@ -4512,19 +4525,6 @@ errout:
4512 rtnl_set_sk_err(net, RTNLGRP_IPV6_PREFIX, err); 4525 rtnl_set_sk_err(net, RTNLGRP_IPV6_PREFIX, err);
4513} 4526}
4514 4527
4515static void update_valid_ll_addr_cnt(struct inet6_ifaddr *ifp, int count)
4516{
4517 write_lock_bh(&ifp->idev->lock);
4518 spin_lock(&ifp->lock);
4519 if (((ifp->flags & (IFA_F_PERMANENT|IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|
4520 IFA_F_DADFAILED)) == IFA_F_PERMANENT) &&
4521 (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL))
4522 ifp->idev->valid_ll_addr_cnt += count;
4523 WARN_ON(ifp->idev->valid_ll_addr_cnt < 0);
4524 spin_unlock(&ifp->lock);
4525 write_unlock_bh(&ifp->idev->lock);
4526}
4527
4528static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) 4528static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
4529{ 4529{
4530 struct net *net = dev_net(ifp->idev->dev); 4530 struct net *net = dev_net(ifp->idev->dev);
@@ -4533,8 +4533,6 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
4533 4533
4534 switch (event) { 4534 switch (event) {
4535 case RTM_NEWADDR: 4535 case RTM_NEWADDR:
4536 update_valid_ll_addr_cnt(ifp, 1);
4537
4538 /* 4536 /*
4539 * If the address was optimistic 4537 * If the address was optimistic
4540 * we inserted the route at the start of 4538 * we inserted the route at the start of
@@ -4550,8 +4548,6 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
4550 ifp->idev->dev, 0, 0); 4548 ifp->idev->dev, 0, 0);
4551 break; 4549 break;
4552 case RTM_DELADDR: 4550 case RTM_DELADDR:
4553 update_valid_ll_addr_cnt(ifp, -1);
4554
4555 if (ifp->idev->cnf.forwarding) 4551 if (ifp->idev->cnf.forwarding)
4556 addrconf_leave_anycast(ifp); 4552 addrconf_leave_anycast(ifp);
4557 addrconf_leave_solict(ifp->idev, &ifp->addr); 4553 addrconf_leave_solict(ifp->idev, &ifp->addr);
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index f365310bfcca..0eb4038a4d63 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -141,9 +141,12 @@ static struct mr6_table *ip6mr_get_table(struct net *net, u32 id)
141static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6, 141static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6,
142 struct mr6_table **mrt) 142 struct mr6_table **mrt)
143{ 143{
144 struct ip6mr_result res;
145 struct fib_lookup_arg arg = { .result = &res, };
146 int err; 144 int err;
145 struct ip6mr_result res;
146 struct fib_lookup_arg arg = {
147 .result = &res,
148 .flags = FIB_LOOKUP_NOREF,
149 };
147 150
148 err = fib_rules_lookup(net->ipv6.mr6_rules_ops, 151 err = fib_rules_lookup(net->ipv6.mr6_rules_ops,
149 flowi6_to_flowi(flp6), 0, &arg); 152 flowi6_to_flowi(flp6), 0, &arg);
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 8eb9501e3d60..b7ebe23cdedf 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -421,8 +421,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
421 struct rds_ib_refill_cache *cache) 421 struct rds_ib_refill_cache *cache)
422{ 422{
423 unsigned long flags; 423 unsigned long flags;
424 struct list_head *old; 424 struct list_head *old, *chpfirst;
425 struct list_head __percpu *chpfirst;
426 425
427 local_irq_save(flags); 426 local_irq_save(flags);
428 427
@@ -432,7 +431,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
432 else /* put on front */ 431 else /* put on front */
433 list_add_tail(new_item, chpfirst); 432 list_add_tail(new_item, chpfirst);
434 433
435 __this_cpu_write(chpfirst, new_item); 434 __this_cpu_write(cache->percpu->first, new_item);
436 __this_cpu_inc(cache->percpu->count); 435 __this_cpu_inc(cache->percpu->count);
437 436
438 if (__this_cpu_read(cache->percpu->count) < RDS_IB_RECYCLE_BATCH_COUNT) 437 if (__this_cpu_read(cache->percpu->count) < RDS_IB_RECYCLE_BATCH_COUNT)
@@ -452,7 +451,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
452 } while (old); 451 } while (old);
453 452
454 453
455 __this_cpu_write(chpfirst, NULL); 454 __this_cpu_write(cache->percpu->first, NULL);
456 __this_cpu_write(cache->percpu->count, 0); 455 __this_cpu_write(cache->percpu->count, 0);
457end: 456end:
458 local_irq_restore(flags); 457 local_irq_restore(flags);