Linux 3.18.7
Greg KH
maintainerI'm announcing the release of the 3.18.7 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/exynos4.dtsi | 4 - arch/arm/mm/context.c | 26 +++----- arch/arm64/kernel/setup.c | 96 ++++++++++++++++++++++-------- arch/mips/cavium-octeon/smp.c | 2 arch/mips/include/asm/mipsregs.h | 15 ++++ arch/mips/kernel/irq_cpu.c | 4 + arch/mips/kernel/smp.c | 2 arch/mips/kernel/traps.c | 3 arch/mips/mm/tlb-r4k.c | 2 arch/x86/kernel/cpu/microcode/core.c | 2 arch/x86/mm/fault.c | 8 -- arch/x86/pci/common.c | 16 +++++ drivers/gpio/gpio-mcp23s08.c | 17 +++-- drivers/gpio/gpiolib-sysfs.c | 3 drivers/gpu/drm/radeon/radeon_benchmark.c | 13 ++-- drivers/gpu/drm/radeon/radeon_display.c | 3 drivers/gpu/drm/radeon/radeon_gem.c | 6 + drivers/gpu/drm/radeon/radeon_kms.c | 16 ++--- drivers/gpu/drm/radeon/radeon_test.c | 8 +- drivers/gpu/drm/radeon/radeon_vm.c | 6 + drivers/md/raid5.c | 5 + drivers/pci/host/pcie-designware.c | 3 drivers/pci/quirks.c | 40 +++++++++++- drivers/scsi/sd.c | 6 + drivers/spi/spi-fsl-dspi.c | 14 +++- drivers/spi/spi-imx.c | 4 + fs/cifs/file.c | 6 + fs/nilfs2/nilfs.h | 2 fs/nilfs2/segment.c | 44 ++++++++++++- fs/nilfs2/segment.h | 5 + include/linux/tracepoint.h | 2 include/sound/ak4113.h | 2 include/sound/ak4114.h | 2 include/trace/events/tlb.h | 4 - kernel/smpboot.c | 2 kernel/time/hrtimer.c | 2 lib/checksum.c | 12 +++ mm/memcontrol.c | 2 mm/pagewalk.c | 5 + mm/shmem.c | 2 scripts/kconfig/menu.c | 4 - sound/i2c/other/ak4113.c | 17 ++--- sound/i2c/other/ak4114.c | 18 ++--- sound/soc/atmel/atmel_ssc_dai.c | 18 +---- sound/soc/codecs/sgtl5000.c | 3 46 files changed, 335 insertions(+), 143 deletions(-)
Aaro Koskinen (1):
MIPS: OCTEON: fix kernel crash when offlining a CPU
Alex Deucher (2):
drm/radeon: don't init gpuvm if accel is disabled (v3) drm/radeon: properly set vm fragment size for TN/RL
Bhuvanchandra DV (1):
spi: spi-fsl-dspi: Remove usage of devm_kzalloc
Bo Shen (1):
ASoC: atmel_ssc_dai: fix start event for I2S mode
Boris Ostrovsky (1):
x86, microcode: Return error from driver init code when loader is disabled
Brian King (1):
sd: Fix max transfer length for 4k disks
Charlotte Richardson (1):
PCI: Add NEC variants to Stratus ftServer PCIe DMI check
Christian König (1):
drm/radeon: fix PLLs on RS880 and older v2
David Daney (1):
MIPS: Fix C0_Pagegrain[IEC] support.
Eric Nelson (1):
ASoC: sgtl5000: add delay before first I2C access
Felix Fietkau (1):
MIPS: IRQ: Fix disable_irq on CPU IRQs
Greg Kroah-Hartman (1):
Linux 3.18.7
Hemmo Nieminen (1):
MIPS: Fix kernel lockup or crash after CPU offline/online
Ilija Hadzic (2):
drm/radeon: fix the crash in benchmark functions drm/radeon: fix the crash in test functions
James Hogan (2):
MIPS: mipsregs.h: Add write_32bit_cp1_register()
MIPS: traps: Fix inline asm ctc1 missing .set hardfloat
Johan Hovold (2):
gpio: sysfs: fix memory leak in gpiod_export_link
gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low
John Stultz (1):
hrtimer: Fix incorrect tai offset calculation for non high-res timer systems
Lai Jiangshan (1):
smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread()
Linus Torvalds (1):
x86: mm: move mmap_sem unlock from mm_fault_error() to caller
Lucas Stach (1):
PCI: designware: Reject MSI-X IRQs
Mark Rutland (1):
arm64: Fix up /proc/cpuinfo
Michal Hocko (1):
memcg, shmem: fix shmem migration to use lrucare
Myron Stowe (1):
PCI: Handle read-only BARs on AMD CS553x devices
NeilBrown (1):
md/raid5: fix another livelock caused by non-aligned writes.
Peter Kümmel (1):
kconfig: Fix warning "‘jump’ may be used uninitialized"
Robin Gong (1):
spi: imx: use pio mode for i.mx6dl
Ryusuke Konishi (1):
nilfs2: fix deadlock of segment constructor over I_SYNC flag
Sachin Prabhu (1):
Complete oplock break jobs before closing file handle
Shiraz Hashim (1):
mm: pagewalk: call pte_hole() for VM_PFNMAP during walk_page_range
Sonic Zhang (1):
gpio: mcp23s08: handle default gpio base
Steven Rostedt (Red Hat) (2):
tracing: Add condition check to RCU lockdep checks x86/tlb/trace: Do not trace on CPU that is offline
Sylwester Nawrocki (1):
ARM: dts: Fix I2S1, I2S2 compatible for exynos4 SoCs
Takashi Iwai (1):
ALSA: ak411x: Fix stall in work callback
Will Deacon (1):
ARM: 8299/1: mm: ensure local active ASID is marked as allocated on rollover
karl beldan (2):
lib/checksum.c: fix carry in csum_tcpudp_nofold lib/checksum.c: fix build for generic csum_tcpudp_nofold
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Diseased Newt
arch/arm/boot/dts/exynos4.dtsi +2 -2
@@ -368,7 +368,7 @@ }; i2s1: i2s@13960000 { - compatible = "samsung,s5pv210-i2s"; + compatible = "samsung,s3c6410-i2s"; reg = <0x13960000 0x100>; clocks = <&clock CLK_I2S1>; clock-names = "iis";
@@ -378,7 +378,7 @@ }; i2s2: i2s@13970000 { - compatible = "samsung,s5pv210-i2s"; + compatible = "samsung,s3c6410-i2s"; reg = <0x13970000 0x100>; clocks = <&clock CLK_I2S2>; clock-names = "iis";
arch/arm/mm/context.c +11 -15
@@ -144,21 +144,17 @@ static void flush_context(unsigned int cpu)/* Update the list of reserved ASIDs and the ASID bitmap. */ bitmap_clear (asid_map,0 ,NUM_USER_ASIDS );for_each_possible_cpu (i) { -if (i == cpu) { - asid =0 ; - }else { - asid =atomic64_xchg (&per_cpu (active_asids, i),0 ); -/* -* If this CPU has already been through a -* rollover, but hasn't run another task in -* the meantime, we must preserve its reserved -* ASID, as this is the only trace we have of -* the process it is still running. -*/ -if (asid ==0 ) - asid =per_cpu (reserved_asids, i); -__set_bit (asid & ~ASID_MASK , asid_map); - } + asid =atomic64_xchg (&per_cpu (active_asids, i),0 ); +/* +* If this CPU has already been through a +* rollover, but hasn't run another task in +* the meantime, we must preserve its reserved +* ASID, as this is the only trace we have of +* the process it is still running. +*/ +if (asid ==0 ) + asid =per_cpu (reserved_asids, i); +__set_bit (asid & ~ASID_MASK , asid_map);per_cpu (reserved_asids, i) = asid; }
arch/arm64/kernel/setup.c +72 -24
131 lines not on this page · raw message
arch/mips/cavium-octeon/smp.c +0 -2
@@ -240,9 +240,7 @@ static int octeon_cpu_disable(void)set_cpu_online (cpu, false);cpu_clear (cpu, cpu_callin_map); -local_irq_disable ();octeon_fixup_irqs (); -local_irq_enable ();flush_cache_all ();local_flush_tlb_all ();
arch/mips/include/asm/mipsregs.h +15 -0
@@ -1343,12 +1343,27 @@ do { \ __res; \ }) +#define _write_32bit_cp1_register (dest, val, gas_hardfloat) \ +do { \ + __asm__ __volatile__( \ + " .set push \n" \ + " .set reorder \n" \ + " "STR(gas_hardfloat)" \n" \ + " ctc1 %0,"STR(dest)" \n" \ + " .set pop \n" \ + : : "r" (val)); \ +} while (0) +#ifdef GAS_HAS_SET_HARDFLOAT #define read_32bit_cp1_register (source) \ _read_32bit_cp1_register(source, .set hardfloat) +#define write_32bit_cp1_register (dest, val) \ + _write_32bit_cp1_register(dest, val, .set hardfloat)#else #define read_32bit_cp1_register (source) \ _read_32bit_cp1_register(source, ) +#define write_32bit_cp1_register (dest, val) \ + _write_32bit_cp1_register(dest, val, )#endif #ifdef HAVE_AS_DSP
arch/mips/kernel/irq_cpu.c +4 -0
@@ -56,6 +56,8 @@ static struct irq_chip mips_cpu_irq_controller = { .irq_mask_ack = mask_mips_irq, .irq_unmask = unmask_mips_irq, .irq_eoi = unmask_mips_irq, + .irq_disable = mask_mips_irq, + .irq_enable = unmask_mips_irq, };/*
@@ -92,6 +94,8 @@ static struct irq_chip mips_mt_cpu_irq_controller = { .irq_mask_ack = mips_mt_cpu_irq_ack, .irq_unmask = unmask_mips_irq, .irq_eoi = unmask_mips_irq, + .irq_disable = mask_mips_irq, + .irq_enable = unmask_mips_irq, };void __init mips_cpu_irq_init (void )
arch/mips/kernel/smp.c +1 -1
@@ -123,10 +123,10 @@ asmlinkage void start_secondary(void)unsigned int cpu;cpu_probe (); -cpu_report ();per_cpu_trap_init (false);mips_clockevent_init (); mp_ops->init_secondary (); +cpu_report ();/* * XXX parity protection should be folded in here when it's converted
arch/mips/kernel/traps.c +2 -1
@@ -1184,7 +1184,8 @@ static int enable_restore_fp_context(int msa)/* Restore the scalar FP control & status register */ if (!was_fpu_owner) - asmvolatile ("ctc1 %0, $31" : :"r" (current->thread.fpu.fcr31)); +write_32bit_cp1_register (CP1_STATUS , + current->thread.fpu.fcr31); } out:
arch/mips/mm/tlb-r4k.c +2 -0
@@ -489,6 +489,8 @@ static void r4k_tlb_configure(void)#ifdef CONFIG_64BIT pg |=PG_ELPA ;#endif +if (cpu_has_rixiex) + pg |=PG_IEC ;write_c0_pagegrain (pg); }
arch/x86/kernel/cpu/microcode/core.c +1 -1
@@ -552,7 +552,7 @@ static int __init microcode_init(void)int error;if (paravirt_enabled () || dis_ucode_ldr) -return 0 ; +return -EINVAL ;if (c->x86_vendor ==X86_VENDOR_INTEL ) microcode_ops =init_intel_microcode ();
arch/x86/mm/fault.c +1 -7
@@ -844,11 +844,8 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, unsigned int fault) {struct task_struct *tsk = current; -struct mm_struct *mm = tsk->mm;int code =BUS_ADRERR ; -up_read (&mm->mmap_sem); -/* Kernel mode? Handle exceptions or die: */ if (!(error_code &PF_USER )) {no_context (regs, error_code, address,SIGBUS ,BUS_ADRERR );
@@ -879,7 +876,6 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code, unsigned long address, unsigned int fault) { if (fatal_signal_pending(current) && !(error_code & PF_USER)) { - up_read(¤t->mm->mmap_sem); no_context(regs, error_code, address, 0, 0);return ; }
@@ -887,14 +883,11 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,if (fault &VM_FAULT_OOM ) {/* Kernel mode? Handle exceptions or die: */ if (!(error_code &PF_USER )) { -up_read (¤t->mm->mmap_sem);no_context (regs, error_code, address,SIGSEGV ,SEGV_MAPERR );return ; } -up_read (¤t->mm->mmap_sem); -/* * We ran out of memory, call the OOM killer, and return the * userspace (which will retry the fault, or kill us if we got
@@ -1249,6 +1242,7 @@ good_area:return ;if (unlikely (fault &VM_FAULT_ERROR )) { +up_read (&mm->mmap_sem);mm_fault_error (regs, error_code, address, fault);return ; }
arch/x86/pci/common.c +16 -0
@@ -448,6 +448,22 @@ static const struct dmi_system_id pciprobe_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"), }, }, + { + .callback = set_scan_all, + .ident = "Stratus/NEC ftServer", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "NEC"), + DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R32"), + }, + }, + { + .callback = set_scan_all, + .ident = "Stratus/NEC ftServer", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "NEC"), + DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R31"), + }, + }, {} };
drivers/gpio/gpio-mcp23s08.c +10 -7
@@ -785,9 +785,11 @@ static int mcp230xx_probe(struct i2c_client *client, client->irq =irq_of_parse_and_map (client->dev.of_node,0 ); }else { pdata =dev_get_platdata (&client->dev); -if (!pdata || !gpio_is_valid (pdata->base)) { -dev_dbg (&client->dev,"invalid platform data\n" ); -return -EINVAL ; +if (!pdata) { + pdata =devm_kzalloc (&client->dev, +sizeof (struct mcp23s08_platform_data ), +GFP_KERNEL ); + pdata->base =-1 ; } }
@@ -908,10 +910,11 @@ static int mcp23s08_probe(struct spi_device *spi) }else { type =spi_get_device_id (spi)->driver_data; pdata =dev_get_platdata (&spi->dev); -if (!pdata || !gpio_is_valid (pdata->base)) { -dev_dbg (&spi->dev, -"invalid or missing platform data\n" ); -return -EINVAL ; +if (!pdata) { + pdata =devm_kzalloc (&spi->dev, +sizeof (struct mcp23s08_platform_data ), +GFP_KERNEL ); + pdata->base =-1 ; }for (addr =0 ; addr <ARRAY_SIZE (pdata->chip); addr++) {
drivers/gpio/gpiolib-sysfs.c +2 -1
@@ -630,6 +630,7 @@ int gpiod_export_link(struct device *dev, const char *name,if (tdev !=NULL ) { status =sysfs_create_link (&dev->kobj, &tdev->kobj, name); +put_device (tdev); }else { status = -ENODEV ; }
@@ -677,7 +678,7 @@ int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value) } status =sysfs_set_active_low (desc, dev, value); - +put_device (dev); unlock:mutex_unlock (&sysfs_lock);
drivers/gpu/drm/radeon/radeon_benchmark.c +8 -5
@@ -34,7 +34,8 @@static int radeon_benchmark_do_move (struct radeon_device *rdev,unsigned size,uint64_t saddr,uint64_t daddr, -int flag,int n) +int flag,int n, +struct reservation_object *resv) {unsigned long start_jiffies;unsigned long end_jiffies;
@@ -47,12 +48,12 @@ static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size,case RADEON_BENCHMARK_COPY_DMA : fence =radeon_copy_dma (rdev, saddr, daddr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + resv);break ;case RADEON_BENCHMARK_COPY_BLIT : fence =radeon_copy_blit (rdev, saddr, daddr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + resv);break ;default :DRM_ERROR ("Unknown copy method\n" );
@@ -120,7 +121,8 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size,if (rdev->asic->copy.dma) { time =radeon_benchmark_do_move (rdev, size, saddr, daddr, -RADEON_BENCHMARK_COPY_DMA , n); +RADEON_BENCHMARK_COPY_DMA , n, + dobj->tbo.resv);if (time <0 ) goto out_cleanup;if (time >0 )
@@ -130,7 +132,8 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size,if (rdev->asic->copy.blit) { time =radeon_benchmark_do_move (rdev, size, saddr, daddr, -RADEON_BENCHMARK_COPY_BLIT , n); +RADEON_BENCHMARK_COPY_BLIT , n, + dobj->tbo.resv);if (time <0 ) goto out_cleanup;if (time >0 )
drivers/gpu/drm/radeon/radeon_display.c +3 -0
@@ -959,6 +959,9 @@ void radeon_compute_pll_avivo(struct radeon_pll *pll,if (pll->flags &RADEON_PLL_USE_FRAC_FB_DIV && pll->flags &RADEON_PLL_USE_REF_DIV ) ref_div_max = pll->reference_div; +else if (pll->flags &RADEON_PLL_PREFER_MINM_OVER_MAXP ) +/* fix for problems on RS880 */ + ref_div_max =min (pll->max_ref_div,7u );else ref_div_max = pll->max_ref_div;
drivers/gpu/drm/radeon/radeon_gem.c +4 -2
@@ -146,7 +146,8 @@ int radeon_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_pristruct radeon_bo_va *bo_va;int r; -if (rdev->family <CHIP_CAYMAN ) { +if ((rdev->family <CHIP_CAYMAN ) || + (!rdev->accel_working)) {return 0 ; }
@@ -176,7 +177,8 @@ void radeon_gem_object_close(struct drm_gem_object *obj,struct radeon_bo_va *bo_va;int r; -if (rdev->family <CHIP_CAYMAN ) { +if ((rdev->family <CHIP_CAYMAN ) || + (!rdev->accel_working)) {return ; }
drivers/gpu/drm/radeon/radeon_kms.c +8 -8
@@ -598,14 +598,14 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)return -ENOMEM ; } - vm = &fpriv->vm; - r =radeon_vm_init (rdev, vm); -if (r) { -kfree (fpriv); -return r; - } -if (rdev->accel_working) { + vm = &fpriv->vm; + r =radeon_vm_init (rdev, vm); +if (r) { +kfree (fpriv); +return r; + } + r =radeon_bo_reserve (rdev->ring_tmp_bo.bo, false);if (r) {radeon_vm_fini (rdev, vm);
@@ -663,9 +663,9 @@ void radeon_driver_postclose_kms(struct drm_device *dev,radeon_vm_bo_rmv (rdev, vm->ib_bo_va);radeon_bo_unreserve (rdev->ring_tmp_bo.bo); } +radeon_vm_fini (rdev, vm); } -radeon_vm_fini (rdev, vm);kfree (fpriv); file_priv->driver_priv =NULL ; }
drivers/gpu/drm/radeon/radeon_test.c +4 -4
@@ -119,11 +119,11 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag)if (ring ==R600_RING_TYPE_DMA_INDEX ) fence =radeon_copy_dma (rdev, gtt_addr, vram_addr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + vram_obj->tbo.resv);else fence =radeon_copy_blit (rdev, gtt_addr, vram_addr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + vram_obj->tbo.resv);if (IS_ERR (fence)) {DRM_ERROR ("Failed GTT->VRAM copy %d\n" , i); r =PTR_ERR (fence);
@@ -170,11 +170,11 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag)if (ring ==R600_RING_TYPE_DMA_INDEX ) fence =radeon_copy_dma (rdev, vram_addr, gtt_addr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + vram_obj->tbo.resv);else fence =radeon_copy_blit (rdev, vram_addr, gtt_addr, size /RADEON_GPU_PAGE_SIZE , -NULL ); + vram_obj->tbo.resv);if (IS_ERR (fence)) {DRM_ERROR ("Failed VRAM->GTT copy %d\n" , i); r =PTR_ERR (fence);
drivers/gpu/drm/radeon/radeon_vm.c +4 -2
@@ -753,9 +753,11 @@ static void radeon_vm_frag_ptes(struct radeon_device *rdev,*/ /* NI is optimized for 256KB fragments, SI and newer for 64KB */ -uint64_t frag_flags = rdev->family ==CHIP_CAYMAN ? +uint64_t frag_flags = ((rdev->family ==CHIP_CAYMAN ) || + (rdev->family ==CHIP_ARUBA )) ?R600_PTE_FRAG_256KB :R600_PTE_FRAG_64KB ; -uint64_t frag_align = rdev->family ==CHIP_CAYMAN ?0x200 :0x80 ; +uint64_t frag_align = ((rdev->family ==CHIP_CAYMAN ) || + (rdev->family ==CHIP_ARUBA )) ?0x200 :0x80 ;uint64_t frag_start =ALIGN (pe_start, frag_align);uint64_t frag_end = pe_end & ~(frag_align -1 );
drivers/md/raid5.c +5 -0
@@ -3195,6 +3195,11 @@ static void handle_stripe_dirtying(struct r5conf *conf, (unsigned long long )sh->sector, rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); } + +if (rcw > disks && rmw > disks && + !test_bit (STRIPE_PREREAD_ACTIVE , &sh->state)) +set_bit (STRIPE_DELAYED , &sh->state); +/* now if nothing is locked, and if we have enough data, * we can start a write request */
drivers/pci/host/pcie-designware.c +3 -0
@@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,struct msi_msg msg;struct pcie_port *pp =sys_to_pcie (pdev->bus->sysdata); +if (desc->msi_attrib.is_msix) +return -EINVAL ; + irq =assign_irq (1 , desc, &pos);if (irq <0 )return irq;
drivers/pci/quirks.c +37 -3
@@ -324,18 +324,52 @@ static void quirk_s3_64M(struct pci_dev *dev)DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_S3 ,PCI_DEVICE_ID_S3_868 , quirk_s3_64M);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_S3 ,PCI_DEVICE_ID_S3_968 , quirk_s3_64M); +static void quirk_io (struct pci_dev *dev,int pos,unsigned size, +const char *name) +{ +u32 region; +struct pci_bus_region bus_region; +struct resource *res = dev->resource + pos; + +pci_read_config_dword (dev,PCI_BASE_ADDRESS_0 + (pos <<2 ), ®ion); + +if (!region) +return ; + + res->name =pci_name (dev); + res->flags = region & ~PCI_BASE_ADDRESS_IO_MASK ; + res->flags |= + (IORESOURCE_IO |IORESOURCE_PCI_FIXED |IORESOURCE_SIZEALIGN ); + region &= ~(size -1 ); + +/* Convert from PCI bus to resource space */ + bus_region.start = region; + bus_region.end = region + size -1 ; +pcibios_bus_to_resource (dev->bus, res, &bus_region); + +dev_info (&dev->dev,FW_BUG "%s quirk: reg 0x%x: %pR\n" , + name,PCI_BASE_ADDRESS_0 + (pos <<2 ), res); +} +/* * Some CS5536 BIOSes (for example, the Soekris NET5501 board w/ comBIOS * ver. 1.33 20070103) don't set the correct ISA PCI region header info. * BAR0 should be 8 bytes; instead, it may be set to something like 8k * (which conflicts w/ BAR1's memory range). +* +* CS553x's ISA PCI BARs may also be read-only (ref: +* https://bugzilla.kernel.org/show_bug.cgi?id=85991 - Comment #4 forward). */ static void quirk_cs5536_vsa (struct pci_dev *dev) { +static char *name ="CS5536 ISA bridge" ; +if (pci_resource_len (dev,0 ) !=8 ) { -struct resource *res = &dev->resource[0 ]; - res->end = res->start +8 -1 ; -dev_info (&dev->dev,"CS5536 ISA bridge bug detected (incorrect header); workaround applied\n" ); +quirk_io (dev,0 ,8 , name);/* SMB */ +quirk_io (dev,1 ,256 , name);/* GPIO */ +quirk_io (dev,2 ,64 , name);/* MFGPT */ +dev_info (&dev->dev,"%s bug detected (incorrect header); workaround applied\n" , + name); } }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_CS5536_ISA , quirk_cs5536_vsa);
drivers/scsi/sd.c +4 -2
@@ -2818,9 +2818,11 @@ static int sd_revalidate_disk(struct gendisk *disk)*/ sd_set_flush_flag (sdkp); - max_xfer =min_not_zero (queue_max_hw_sectors (sdkp->disk->queue), - sdkp->max_xfer_blocks); + max_xfer = sdkp->max_xfer_blocks; max_xfer <<=ilog2 (sdp->sector_size) -9 ; + + max_xfer =min_not_zero (queue_max_hw_sectors (sdkp->disk->queue), + max_xfer);blk_queue_max_hw_sectors (sdkp->disk->queue, max_xfer);set_capacity (disk, sdkp->capacity);sd_config_write_same (sdkp);
drivers/spi/spi-fsl-dspi.c +12 -2
@@ -342,8 +342,7 @@ static int dspi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)/* Only alloc on first setup */ chip =spi_get_ctldata (spi);if (chip ==NULL ) { - chip =devm_kzalloc (&spi->dev,sizeof (struct chip_data ), -GFP_KERNEL ); + chip =kzalloc (sizeof (struct chip_data ),GFP_KERNEL );if (!chip)return -ENOMEM ; }
@@ -382,6 +381,16 @@ static int dspi_setup(struct spi_device *spi)return dspi_setup_transfer (spi,NULL ); } +static void dspi_cleanup (struct spi_device *spi) +{ +struct chip_data *chip =spi_get_ctldata ((struct spi_device *)spi); + +dev_dbg (&spi->dev,"spi_device %u.%u cleanup\n" , + spi->master->bus_num, spi->chip_select); + +kfree (chip); +} +static irqreturn_t dspi_interrupt (int irq,void *dev_id) {struct fsl_dspi *dspi = (struct fsl_dspi *)dev_id;
@@ -467,6 +476,7 @@ static int dspi_probe(struct platform_device *pdev) dspi->bitbang.master->setup = dspi_setup; dspi->bitbang.master->dev.of_node = pdev->dev.of_node; + master->cleanup = dspi_cleanup; master->mode_bits =SPI_CPOL |SPI_CPHA ; master->bits_per_word_mask =SPI_BPW_MASK (4 ) |SPI_BPW_MASK (8 ) |SPI_BPW_MASK (16 );
drivers/spi/spi-imx.c +4 -0
@@ -823,6 +823,10 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,struct dma_slave_config slave_config = {};int ret; +/* use pio mode for i.mx6dl chip TKT238285 */ +if (of_machine_is_compatible ("fsl,imx6dl" )) +return 0 ; +/* Prepare for TX DMA: */ master->dma_tx =dma_request_slave_channel (dev,"tx" );if (!master->dma_tx) {
fs/cifs/file.c +5 -1
@@ -366,6 +366,7 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)struct cifsLockInfo *li, *tmp;struct cifs_fid fid;struct cifs_pending_open open; +bool oplock_break_cancelled;spin_lock (&cifs_file_list_lock);if (--cifs_file->count >0 ) {
@@ -397,7 +398,7 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file) }spin_unlock (&cifs_file_list_lock); -cancel_work_sync (&cifs_file->oplock_break); + oplock_break_cancelled =cancel_work_sync (&cifs_file->oplock_break);if (!tcon->need_reconnect && !cifs_file->invalidHandle) {struct TCP_Server_Info *server = tcon->ses->server;
@@ -409,6 +410,9 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)_free_xid (xid); } +if (oplock_break_cancelled) +cifs_done_oplock_break (cifsi); +cifs_del_pending_open (&open);/*
fs/nilfs2/nilfs.h +0 -2
@@ -141,7 +141,6 @@ enum {* @ti_save: Backup of journal_info field of task_struct * @ti_flags: Flags * @ti_count: Nest level -* @ti_garbage: List of inode to be put when releasing semaphore */ struct nilfs_transaction_info {u32 ti_magic;
@@ -150,7 +149,6 @@ struct nilfs_transaction_info {one of other filesystems has a bug. */ unsigned short ti_flags;unsigned short ti_count; -struct list_head ti_garbage; };/* ti_magic */
fs/nilfs2/segment.c +39 -5
101 lines not on this page · raw message
fs/nilfs2/segment.h +5 -0
@@ -26,6 +26,7 @@#include <linux/types.h> #include <linux/fs.h> #include <linux/buffer_head.h> +#include <linux/workqueue.h> #include <linux/nilfs2_fs.h> #include "nilfs.h"
@@ -92,6 +93,8 @@ struct nilfs_segsum_pointer {* @sc_nblk_inc: Block count of current generation * @sc_dirty_files: List of files to be written * @sc_gc_inodes: List of GC inodes having blocks to be written +* @sc_iput_queue: list of inodes for which iput should be done +* @sc_iput_work: work struct to defer iput call * @sc_freesegs: array of segment numbers to be freed * @sc_nfreesegs: number of segments on @sc_freesegs * @sc_dsync_inode: inode whose data pages are written for a sync operation
@@ -135,6 +138,8 @@ struct nilfs_sc_info {struct list_head sc_dirty_files;struct list_head sc_gc_inodes; +struct list_head sc_iput_queue; +struct work_struct sc_iput_work;__u64 *sc_freesegs;size_t sc_nfreesegs;
include/linux/tracepoint.h +1 -1
@@ -173,7 +173,7 @@ extern void syscall_unregfunc(void);TP_PROTO (data_proto), \TP_ARGS (data_args), \ TP_CONDITION(cond),,); \ -if (IS_ENABLED (CONFIG_LOCKDEP )) { \ +if (IS_ENABLED (CONFIG_LOCKDEP ) && (cond)) { \rcu_read_lock_sched_notrace (); \ rcu_dereference_sched(__tracepoint_##name.funcs);\rcu_read_unlock_sched_notrace (); \
include/sound/ak4113.h +1 -1
@@ -286,7 +286,7 @@ struct ak4113 {ak4113_write_t *write;ak4113_read_t *read;void *private_data; - unsigned int init:1; +atomic_t wq_processing;spinlock_t lock;unsigned char regmap[AK4113_WRITABLE_REGS ];struct snd_kcontrol *kctls[AK4113_CONTROLS ];
include/sound/ak4114.h +1 -1
@@ -168,7 +168,7 @@ struct ak4114 {ak4114_write_t * write;ak4114_read_t * read;void * private_data; - unsigned int init: 1; +atomic_t wq_processing;spinlock_t lock;unsigned char regmap[6 ];unsigned char txcsb[5 ];
include/trace/events/tlb.h +3 -1
@@ -13,11 +13,13 @@ { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \ { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" } -TRACE_EVENT(tlb_flush, +TRACE_EVENT_CONDITION(tlb_flush, TP_PROTO(int reason, unsigned long pages), TP_ARGS(reason, pages), + TP_CONDITION(cpu_online(smp_processor_id())), + TP_STRUCT__entry( __field( int, reason) __field(unsigned long, pages)
kernel/smpboot.c +2 -0
@@ -279,6 +279,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)unsigned int cpu;int ret =0 ; +get_online_cpus ();mutex_lock (&smpboot_threads_lock);for_each_online_cpu (cpu) { ret =__smpboot_create_thread (plug_thread, cpu);
@@ -291,6 +292,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)list_add (&plug_thread->list, &hotplug_threads); out:mutex_unlock (&smpboot_threads_lock); +put_online_cpus ();return ret; }EXPORT_SYMBOL_GPL (smpboot_register_percpu_thread);
kernel/time/hrtimer.c +1 -1
@@ -122,7 +122,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base) mono =ktime_get_update_offsets_tick (&off_real, &off_boot, &off_tai); boot =ktime_add (mono, off_boot); xtim =ktime_add (mono, off_real); - tai =ktime_add (xtim, off_tai); + tai =ktime_add (mono, off_tai); base->clock_base[HRTIMER_BASE_REALTIME ].softirq_time = xtim; base->clock_base[HRTIMER_BASE_MONOTONIC ].softirq_time = mono;
lib/checksum.c +10 -2
@@ -181,6 +181,15 @@ csum_partial_copy(const void *src, void *dst, int len, __wsum sum)EXPORT_SYMBOL (csum_partial_copy);#ifndef csum_tcpudp_nofold +static inline u32 from64to32 (u64 x) +{ +/* add up 32-bit and 32-bit for 32+c bit */ + x = (x &0xffffffff ) + (x >>32 ); +/* add up carry.. */ + x = (x &0xffffffff ) + (x >>32 ); +return (u32 )x; +} + __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto,
@@ -195,8 +204,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,#else s += (proto + len) <<8 ;#endif - s += (s >>32 ); - return (__force __wsum)s; + return (__force __wsum)from64to32(s); }EXPORT_SYMBOL (csum_tcpudp_nofold);#endif
mm/memcontrol.c +1 -1
@@ -6589,7 +6589,7 @@ void mem_cgroup_uncharge_list(struct list_head *page_list)* mem_cgroup_migrate - migrate a charge to another page * @oldpage: currently charged page * @newpage: page to transfer the charge to -* @lrucare: both pages might be on the LRU already +* @lrucare: either or both pages might be on the LRU already * * Migrate the charge from @oldpage to @newpage. *
mm/pagewalk.c +4 -1
@@ -199,7 +199,10 @@ int walk_page_range(unsigned long addr, unsigned long end,*/ if ((vma->vm_start <= addr) && (vma->vm_flags &VM_PFNMAP )) { - next = vma->vm_end; +if (walk->pte_hole) + err = walk->pte_hole (addr, next, walk); +if (err) +break ; pgd =pgd_offset (walk->mm, next);continue ; }
mm/shmem.c +1 -1
@@ -1013,7 +1013,7 @@ static int shmem_replace_page(struct page **pagep, gfp_t gfp,*/ oldpage = newpage; }else { -mem_cgroup_migrate (oldpage, newpage, false); +mem_cgroup_migrate (oldpage, newpage, true);lru_cache_add_anon (newpage); *pagep = newpage; }
scripts/kconfig/menu.c +2 -2
@@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, {int i, j;struct menu *submenu[8 ], *menu, *location =NULL ; -struct jump_key *jump; +struct jump_key *jump =NULL ;str_printf (r,_ ("Prompt: %s\n" ),_ (prop->text)); menu = prop->menu->parent;
@@ -586,7 +586,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,str_printf (r,_ (" Location:\n" ));for (j =4 ; --i >=0 ; j +=2 ) { menu = submenu[i]; -if (head && location && menu == location) +if (jump && menu == location) jump->offset =strlen (r->s);str_printf (r,"%*c-> %s" , j,' ' ,_ (menu_get_prompt (menu)));
sound/i2c/other/ak4113.c +8 -9
@@ -56,8 +56,7 @@ static inline unsigned char reg_read(struct ak4113 *ak4113, unsigned char reg)static void snd_ak4113_free (struct ak4113 *chip) { - chip->init =1 ;/* don't schedule new work */ -mb (); +atomic_inc (&chip->wq_processing);/* don't schedule new work */ cancel_delayed_work_sync (&chip->work);kfree (chip); }
@@ -89,6 +88,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, chip->write = write; chip->private_data = private_data;INIT_DELAYED_WORK (&chip->work, ak4113_stats); +atomic_set (&chip->wq_processing,0 );for (reg =0 ; reg <AK4113_WRITABLE_REGS ; reg++) chip->regmap[reg] = pgm[reg];
@@ -139,13 +139,11 @@ static void ak4113_init_regs(struct ak4113 *chip)void snd_ak4113_reinit (struct ak4113 *chip) { - chip->init =1 ; -mb (); -flush_delayed_work (&chip->work); +if (atomic_inc_return (&chip->wq_processing) ==1 ) +cancel_delayed_work_sync (&chip->work);ak4113_init_regs (chip);/* bring up statistics / event queing */ - chip->init =0 ; -if (chip->kctls[0 ]) +if (atomic_dec_and_test (&chip->wq_processing))schedule_delayed_work (&chip->work,HZ /10 ); }EXPORT_SYMBOL_GPL (snd_ak4113_reinit);
@@ -632,8 +630,9 @@ static void ak4113_stats(struct work_struct *work) { struct ak4113 *chip = container_of(work, struct ak4113, work.work); -if (!chip->init) +if (atomic_inc_return (&chip->wq_processing) ==1 )snd_ak4113_check_rate_and_errors (chip, chip->check_flags); -schedule_delayed_work (&chip->work,HZ /10 ); +if (atomic_dec_and_test (&chip->wq_processing)) +schedule_delayed_work (&chip->work,HZ /10 ); }
sound/i2c/other/ak4114.c +8 -10
@@ -66,8 +66,7 @@ static void reg_dump(struct ak4114 *ak4114)static void snd_ak4114_free (struct ak4114 *chip) { - chip->init =1 ;/* don't schedule new work */ -mb (); +atomic_inc (&chip->wq_processing);/* don't schedule new work */ cancel_delayed_work_sync (&chip->work);kfree (chip); }
@@ -100,6 +99,7 @@ int snd_ak4114_create(struct snd_card *card, chip->write = write; chip->private_data = private_data;INIT_DELAYED_WORK (&chip->work, ak4114_stats); +atomic_set (&chip->wq_processing,0 );for (reg =0 ; reg <6 ; reg++) chip->regmap[reg] = pgm[reg];
@@ -152,13 +152,11 @@ static void ak4114_init_regs(struct ak4114 *chip)void snd_ak4114_reinit (struct ak4114 *chip) { - chip->init =1 ; -mb (); -flush_delayed_work (&chip->work); +if (atomic_inc_return (&chip->wq_processing) ==1 ) +cancel_delayed_work_sync (&chip->work);ak4114_init_regs (chip);/* bring up statistics / event queing */ - chip->init =0 ; -if (chip->kctls[0 ]) +if (atomic_dec_and_test (&chip->wq_processing))schedule_delayed_work (&chip->work,HZ /10 ); }
@@ -612,10 +610,10 @@ static void ak4114_stats(struct work_struct *work) { struct ak4114 *chip = container_of(work, struct ak4114, work.work); -if (!chip->init) +if (atomic_inc_return (&chip->wq_processing) ==1 )snd_ak4114_check_rate_and_errors (chip, chip->check_flags); - -schedule_delayed_work (&chip->work,HZ /10 ); +if (atomic_dec_and_test (&chip->wq_processing)) +schedule_delayed_work (&chip->work,HZ /10 ); }EXPORT_SYMBOL (snd_ak4114_create);
sound/soc/atmel/atmel_ssc_dai.c +4 -14
@@ -345,7 +345,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,struct atmel_pcm_dma_params *dma_params;int dir, channels, bits;u32 tfmr, rfmr, tcmr, rcmr; -int start_event;int ret;int fslen, fslen_ext;
@@ -454,19 +453,10 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,* The SSC transmit clock is obtained from the BCLK signal on * on the TK line, and the SSC receive clock is * generated from the transmit clock. -* -* For single channel data, one sample is transferred -* on the falling edge of the LRC clock. -* For two channel data, one sample is -* transferred on both edges of the LRC clock. */ - start_event = ((channels ==1 ) - ?SSC_START_FALLING_RF - :SSC_START_EDGE_RF ); - rcmr =SSC_BF (RCMR_PERIOD ,0 ) |SSC_BF (RCMR_STTDLY ,START_DELAY ) - |SSC_BF (RCMR_START , start_event) + |SSC_BF (RCMR_START ,SSC_START_FALLING_RF ) |SSC_BF (RCMR_CKI ,SSC_CKI_RISING ) |SSC_BF (RCMR_CKO ,SSC_CKO_NONE ) | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ?
@@ -475,14 +465,14 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, rfmr =SSC_BF (RFMR_FSEDGE ,SSC_FSEDGE_POSITIVE ) |SSC_BF (RFMR_FSOS ,SSC_FSOS_NONE ) |SSC_BF (RFMR_FSLEN ,0 ) - |SSC_BF (RFMR_DATNB ,0 ) + |SSC_BF (RFMR_DATNB , (channels -1 )) |SSC_BIT (RFMR_MSBF ) |SSC_BF (RFMR_LOOP ,0 ) |SSC_BF (RFMR_DATLEN , (bits -1 )); tcmr =SSC_BF (TCMR_PERIOD ,0 ) |SSC_BF (TCMR_STTDLY ,START_DELAY ) - |SSC_BF (TCMR_START , start_event) + |SSC_BF (TCMR_START ,SSC_START_FALLING_RF ) |SSC_BF (TCMR_CKI ,SSC_CKI_FALLING ) |SSC_BF (TCMR_CKO ,SSC_CKO_NONE ) | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ?
@@ -492,7 +482,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | SSC_BF(TFMR_FSDEN, 0) |SSC_BF (TFMR_FSOS ,SSC_FSOS_NONE ) |SSC_BF (TFMR_FSLEN ,0 ) - |SSC_BF (TFMR_DATNB ,0 ) + |SSC_BF (TFMR_DATNB , (channels -1 )) |SSC_BIT (TFMR_MSBF ) |SSC_BF (TFMR_DATDEF ,0 ) |SSC_BF (TFMR_DATLEN , (bits -1 ));
sound/soc/codecs/sgtl5000.c +3 -0
@@ -1452,6 +1452,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,if (ret)return ret; +/* Need 8 clocks before I2C accesses */ +udelay (1 ); +/* read chip information */ ret =regmap_read (sgtl5000->regmap,SGTL5000_CHIP_ID , ®);if (ret)