Linux 4.19.113
Greg KH
maintainerI'm announcing the release of the 4.19.113 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/dra7.dtsi | 2 arch/arm64/kernel/smp.c | 25 ++- arch/powerpc/kernel/vmlinux.lds.S | 6 arch/riscv/kernel/module.c | 16 ++ arch/x86/mm/fault.c | 26 +++ block/bfq-cgroup.c | 9 - drivers/acpi/apei/ghes.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 46 +++-- drivers/gpu/drm/drm_lease.c | 3 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 - drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 +- drivers/hwtracing/intel_th/msu.c | 6 drivers/hwtracing/intel_th/pci.c | 5 drivers/iio/accel/st_accel_i2c.c | 2 drivers/iio/adc/at91-sama5d2_adc.c | 15 + drivers/iio/light/vcnl4000.c | 7 drivers/iio/magnetometer/ak8974.c | 2 drivers/iio/trigger/stm32-timer-trigger.c | 11 + drivers/md/dm-bio-record.h | 15 + drivers/md/dm-integrity.c | 32 +--- drivers/misc/altera-stapl/altera.c | 12 - drivers/misc/cardreader/rts5227.c | 2 drivers/misc/cardreader/rts5249.c | 2 drivers/misc/cardreader/rts5260.c | 2 drivers/mmc/host/rtsx_pci_sdmmc.c | 13 + drivers/mmc/host/sdhci-of-at91.c | 8 - drivers/net/vrf.c | 19 +- drivers/perf/arm_pmu_acpi.c | 7 drivers/rtc/Kconfig | 1 drivers/spi/spi-pxa2xx.c | 23 ++ drivers/spi/spi-qup.c | 11 - drivers/spi/spi-zynqmp-gqspi.c | 3 drivers/staging/greybus/tools/loopback_test.c | 21 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 drivers/staging/speakup/main.c | 2 drivers/usb/class/cdc-acm.c | 34 ++-- drivers/usb/core/quirks.c | 6 drivers/usb/host/xhci-pci.c | 3 drivers/usb/host/xhci-plat.c | 1 drivers/usb/host/xhci-trace.h | 23 -- drivers/usb/serial/option.c | 2 drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 1 drivers/xen/xenbus/xenbus_comms.c | 4 drivers/xen/xenbus/xenbus_xs.c | 9 - fs/btrfs/inode.c | 4 fs/inode.c | 1 include/linux/fs.h | 1 include/linux/futex.h | 17 +- include/linux/page-flags.h | 2 include/linux/vmalloc.h | 5 kernel/futex.c | 93 +++++++----- kernel/notifier.c | 2 mm/memcontrol.c | 10 + mm/nommu.c | 10 - mm/slub.c | 32 ++-- mm/vmalloc.c | 11 - net/ipv6/tcp_ipv6.c | 3 scripts/Makefile.extrawarn | 1 sound/core/oss/pcm_plugin.c | 12 + sound/core/seq/oss/seq_oss_midi.c | 1 sound/core/seq/seq_virmidi.c | 1 sound/pci/hda/patch_realtek.c | 2 sound/usb/line6/driver.c | 2 sound/usb/line6/midibuf.c | 2 69 files changed, 457 insertions(+), 239 deletions(-)
Alberto Mattea (1):
usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c
Alexander Shishkin (2):
intel_th: Fix user-visible error codes
intel_th: pci: Add Elkhart Lake CPU support
Anthony Mallet (2):
USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
USB: cdc-acm: fix rounding error in TIOCSSERIAL
Bhawanpreet Lakha (1):
drm/amd/display: Clear link settings on MST disable connector
Carlo Nonato (1):
block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group()
Chunguang Xu (1):
memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
Corentin Labbe (1):
rtc: max8907: add missing select REGMAP_IRQ
Cristian Marussi (2):
arm64: smp: fix smp_send_stop() behaviour
arm64: smp: fix crash_smp_send_stop() behaviour
Daniel Axtens (1):
altera-stapl: altera_get_note: prevent write beyond end of 'key'
Daniele Palmas (1):
USB: serial: option: add ME910G1 ECM composition 0x110b
Dongli Zhang (2):
xenbus: req->body should be updated before req->state
xenbus: req->err should be updated before req->stateEugen Hristev (1):
iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode
Evan Benn (1):
drm/mediatek: Find the cursor plane instead of hard coding it
Evan Green (1):
spi: pxa2xx: Add CS control clock quirk
Fabrice Gasnier (1):
iio: trigger: stm32-timer: disable master mode when stopping
Filipe Manana (1):
btrfs: fix log context list corruption after rename whiteout error
Greg Kroah-Hartman (1):
Linux 4.19.113
Hans de Goede (1):
usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
Jernej Skrabec (1):
drm/bridge: dw-hdmi: fix AVI frame colorimetry
Joerg Roedel (1):
x86/mm: split vmalloc_sync_all()
Johan Hovold (3):
staging: greybus: loopback_test: fix poll-mask build breakage
staging: greybus: loopback_test: fix potential path truncation
staging: greybus: loopback_test: fix potential path truncations
Jonathan Neuschäfer (1):
parse-maintainers: Mark as executable
Josip Pavic (1):
drm/amd/display: fix dcc swath size calculations on dcn1
Kai-Heng Feng (2):
USB: Disable LPM on WD19's Realtek Hub
ALSA: hda/realtek: Fix pop noise on ALC225
Kishon Vijay Abraham I (1):
ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
Linus Torvalds (1):
mm: slub: be more careful about the double cmpxchg of freelist
Marek Szyprowski (2):
drm/exynos: dsi: propagate error value and silence meaningless warning drm/exynos: dsi: fix workaround for the legacy clock name
Michael Straube (1):
staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
Michał Mirosław (1):
mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
Mike Snitzer (2):
dm bio record: save/restore bi_end_io and bi_integrity dm integrity: use dm_bio_record and dm_bio_restore
Nathan Chancellor (1):
kbuild: Disable -Wpointer-to-enum-cast
Naveen N. Rao (1):
powerpc: Include .BTF section
Peter Zijlstra (1):
futex: Fix inode life-time issue
Qian Cai (1):
page-flags: fix a crash at SetPageError(THP_SWAP)
Qiujun Huang (1):
drm/lease: fix WARNING in idr_destroy
Ran Wang (1):
usb: host: xhci-plat: add a shutdown
Ricky Wu (1):
mmc: rtsx_pci: Fix support for speed-modes that relies on tuning
Samuel Thibault (1):
staging/speakup: fix get_word non-space look-ahead
Sasha Levin (2):
Revert "vrf: mark skb for multicast or link-local as enslaved to VRF" Revert "ipv6: Fix handling of LLA with VRF and sockets bound to VRF"
Scott Chen (1):
USB: serial: pl2303: add device-id for HP LD381
Stephan Gerhold (1):
iio: magnetometer: ak8974: Fix negative raw values in sysfs
Steven Rostedt (VMware) (1):
xhci: Do not open code __print_symbolic() in xhci trace events
Takashi Iwai (5):
ALSA: line6: Fix endless MIDI read loop
ALSA: seq: virmidi: Fix running status after receiving sysex
ALSA: seq: oss: Fix running status after receiving sysex
ALSA: pcm: oss: Avoid plugin buffer overflow
ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
Thomas Gleixner (1):
futex: Unbreak futex hashing
Thommy Jakobsson (1):
spi/zynqmp: remove entry that causes a cs glitch
Tom St Denis (1):
drm/amd/amdgpu: Fix GPR read from debugfs (v2)
Tomas Novotny (1):
iio: light: vcnl4000: update sampling periods for vcnl4200
Vincent Chen (1):
riscv: avoid the PIC offset of static percpu data in module beyond 2G limits
Vlastimil Babka (1):
mm, slub: prevent kmalloc_node crashes and memory leaks
Wen-chien Jesse Sung (1):
iio: st_sensors: remap SMO8840 to LIS2DH12
Yuji Sasaki (1):
spi: qup: call spi_qup_pm_resume_runtime before suspending
luanshi (1):
drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 112 +SUBLEVEL = 113 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/dra7.dtsi +2 -0
@@ -324,6 +324,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x20013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
@@ -376,6 +377,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x30013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
arch/arm64/kernel/smp.c +20 -5
@@ -936,11 +936,22 @@ void tick_broadcast(const struct cpumask *mask) }#endif +/* +* The number of CPUs online, not counting this CPU (which may not be +* fully online and so not counted in num_online_cpus()). +*/ +static inline unsigned int num_other_online_cpus (void ) +{ +unsigned int this_cpu_online =cpu_online (smp_processor_id ()); + +return num_online_cpus () - this_cpu_online; +} +void smp_send_stop (void ) {unsigned long timeout; -if (num_online_cpus () >1 ) { +if (num_other_online_cpus ()) {cpumask_t mask;cpumask_copy (&mask, cpu_online_mask);
@@ -953,10 +964,10 @@ void smp_send_stop(void)/* Wait up to one second for other CPUs to stop */ timeout =USEC_PER_SEC ; -while (num_online_cpus () >1 && timeout--) +while (num_other_online_cpus () && timeout--)udelay (1 ); -if (num_online_cpus () >1 ) +if (num_other_online_cpus ())pr_warning ("SMP: failed to stop secondary CPUs %*pbl\n" ,cpumask_pr_args (cpu_online_mask));
@@ -979,7 +990,11 @@ void crash_smp_send_stop(void) cpus_stopped =1 ; -if (num_online_cpus () ==1 ) { +/* +* If this cpu is the only one alive at this point in time, online or +* not, there are no stop messages to be sent around, so just back out. +*/ +if (num_other_online_cpus () ==0 ) {sdei_mask_local_cpu ();return ; }
@@ -987,7 +1002,7 @@ void crash_smp_send_stop(void)cpumask_copy (&mask, cpu_online_mask);cpumask_clear_cpu (smp_processor_id (), &mask); -atomic_set (&waiting_for_crash_ipi,num_online_cpus () -1 ); +atomic_set (&waiting_for_crash_ipi,num_other_online_cpus ());pr_crit ("SMP: stopping secondary CPUs\n" );smp_cross_call (&mask,IPI_CPU_CRASH_STOP );
arch/powerpc/kernel/vmlinux.lds.S +6 -0
@@ -322,6 +322,12 @@ SECTIONS *(.branch_lt) } +#ifdef CONFIG_DEBUG_INFO_BTF + .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) { + *(.BTF) + } +#endif + .opd : AT(ADDR(.opd) - LOAD_OFFSET) { __start_opd = .; KEEP(*(.opd))
arch/riscv/kernel/module.c +16 -0
@@ -16,6 +16,10 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/moduleloader.h> +#include <linux/vmalloc.h> +#include <linux/sizes.h> +#include <asm/pgtable.h> +#include <asm/sections.h> static int apply_r_riscv_32_rela (struct module *me,u32 *location,Elf_Addr v) {
@@ -394,3 +398,15 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,return 0 ; } + +#if defined(CONFIG_MMU ) && defined(CONFIG_64BIT ) +#define VMALLOC_MODULE_START \ + max(PFN_ALIGN((unsigned long)&_end - SZ_2G), VMALLOC_START) +void *module_alloc (unsigned long size) +{ +return __vmalloc_node_range (size,1 ,VMALLOC_MODULE_START , +VMALLOC_END ,GFP_KERNEL , +PAGE_KERNEL_EXEC ,0 ,NUMA_NO_NODE , +__builtin_return_address (0 )); +} +#endif
arch/x86/mm/fault.c +24 -2
@@ -273,7 +273,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)return pmd_k; } -void vmalloc_sync_all (void ) +static void vmalloc_sync (void ) {unsigned long address;
@@ -300,6 +300,16 @@ void vmalloc_sync_all(void) } } +void vmalloc_sync_mappings (void ) +{ +vmalloc_sync (); +} + +void vmalloc_sync_unmappings (void ) +{ +vmalloc_sync (); +} +/* * 32-bit: *
@@ -402,11 +412,23 @@ static void dump_pagetable(unsigned long address)#else /* CONFIG_X86_64: */ -void vmalloc_sync_all (void ) +void vmalloc_sync_mappings (void ) { +/* +* 64-bit mappings might allocate new p4d/pud pages +* that need to be propagated to all tasks' PGDs. +*/ sync_global_pgds (VMALLOC_START &PGDIR_MASK ,VMALLOC_END ); } +void vmalloc_sync_unmappings (void ) +{ +/* +* Unmappings never allocate or free p4d/pud pages. +* No work is required here. +*/ +} +/* * 64-bit: *
block/bfq-cgroup.c +5 -4
@@ -525,12 +525,13 @@ struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd,*/ entity = &bfqg->entity;for_each_entity (entity) { - bfqg = container_of(entity, struct bfq_group, entity); -if (bfqg != bfqd->root_group) { - parent =bfqg_parent (bfqg); +struct bfq_group *curr_bfqg =container_of (entity, + struct bfq_group, entity); +if (curr_bfqg != bfqd->root_group) { + parent =bfqg_parent (curr_bfqg);if (!parent) parent = bfqd->root_group; -bfq_group_set_parent (bfqg, parent); +bfq_group_set_parent (curr_bfqg, parent); } }
drivers/acpi/apei/ghes.c +1 -1
@@ -201,7 +201,7 @@ static int ghes_estatus_pool_expand(unsigned long len)* New allocation must be visible in all pgd before it can be found by * an NMI allocating from the pool. */ -vmalloc_sync_all (); +vmalloc_sync_mappings ();return gen_pool_add (ghes_estatus_pool, addr,PAGE_ALIGN (len),-1 ); }
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +3 -3
@@ -694,11 +694,11 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,ssize_t result =0 ;uint32_t offset, se, sh, cu, wave, simd, thread, bank, *data; -if (size &3 || *pos &3 ) +if (size >4096 || size &3 || *pos &3 )return -EINVAL ;/* decode offset */ - offset = *pos &GENMASK_ULL (11 ,0 ); + offset = (*pos &GENMASK_ULL (11 ,0 )) >>2 ; se = (*pos &GENMASK_ULL (19 ,12 )) >>12 ; sh = (*pos &GENMASK_ULL (27 ,20 )) >>20 ; cu = (*pos &GENMASK_ULL (35 ,28 )) >>28 ;
@@ -729,7 +729,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,while (size) {uint32_t value; - value = data[offset++]; + value = data[result >>2 ]; r =put_user (value, (uint32_t *)buf);if (r) { result = r;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -0
@@ -419,6 +419,7 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,dc_link_remove_remote_sink (aconnector->dc_link, aconnector->dc_sink);dc_sink_release (aconnector->dc_sink); aconnector->dc_sink =NULL ; + aconnector->dc_link->cur_link_settings.lane_count =0 ; }drm_connector_unregister (connector);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c +2 -2
@@ -684,8 +684,8 @@ static void hubbub1_det_request_size(hubbub1_get_blk256_size (&blk256_width, &blk256_height, bpe); - swath_bytes_horz_wc = height * blk256_height * bpe; - swath_bytes_vert_wc = width * blk256_width * bpe; + swath_bytes_horz_wc = width * blk256_height * bpe; + swath_bytes_vert_wc = height * blk256_width * bpe; *req128_horz_wc = (2 * swath_bytes_horz_wc <= detile_buf_size) ? false : /* full 256B request */
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +26 -20
54 lines not on this page · raw message
drivers/gpu/drm/drm_lease.c +2 -1
@@ -545,10 +545,12 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, }DRM_DEBUG_LEASE ("Creating lease\n" ); +/* lessee will take the ownership of leases */ lessee =drm_lease_create (lessor, &leases);if (IS_ERR (lessee)) { ret =PTR_ERR (lessee); +idr_destroy (&leases); goto out_leases; }
@@ -583,7 +585,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, out_leases:put_unused_fd (fd); -idr_destroy (&leases);DRM_DEBUG_LEASE ("drm_mode_create_lease_ioctl failed: %d\n" , ret);return ret;
drivers/gpu/drm/exynos/exynos_drm_dsi.c +7 -5
@@ -1722,8 +1722,9 @@ static int exynos_dsi_probe(struct platform_device *pdev) ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (dsi->supplies), dsi->supplies);if (ret) { -dev_info (dev,"failed to get regulators: %d\n" , ret); -return -EPROBE_DEFER ; +if (ret != -EPROBE_DEFER ) +dev_info (dev,"failed to get regulators: %d\n" , ret); +return ret; } dsi->clks = devm_kcalloc(dev,
@@ -1736,9 +1737,10 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->clks[i] =devm_clk_get (dev, clk_names[i]);if (IS_ERR (dsi->clks[i])) {if (strcmp (clk_names[i],"sclk_mipi" ) ==0 ) { -strcpy (clk_names[i],OLD_SCLK_MIPI_CLK_NAME ); - i--; -continue ; + dsi->clks[i] =devm_clk_get (dev, +OLD_SCLK_MIPI_CLK_NAME ); +if (!IS_ERR (dsi->clks[i])) +continue ; } dev_info(dev, "failed to get the clock: %s\n",
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +12 -6
@@ -506,10 +506,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {static int mtk_drm_crtc_init (struct drm_device *drm,struct mtk_drm_crtc *mtk_crtc, -struct drm_plane *primary, -struct drm_plane *cursor,unsigned int pipe) +unsigned int pipe) { -int ret; +struct drm_plane *primary =NULL ; +struct drm_plane *cursor =NULL ; +int i, ret; + +for (i =0 ; i < mtk_crtc->layer_nr; i++) { +if (mtk_crtc->planes[i].type ==DRM_PLANE_TYPE_PRIMARY ) + primary = &mtk_crtc->planes[i]; +else if (mtk_crtc->planes[i].type ==DRM_PLANE_TYPE_CURSOR ) + cursor = &mtk_crtc->planes[i]; + } ret =drm_crtc_init_with_planes (drm, &mtk_crtc->base, primary, cursor, &mtk_crtc_funcs,NULL );
@@ -622,9 +630,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, goto unprepare; } - ret =mtk_drm_crtc_init (drm_dev, mtk_crtc, &mtk_crtc->planes[0 ], - mtk_crtc->layer_nr >1 ? &mtk_crtc->planes[1 ] : -NULL , pipe); + ret =mtk_drm_crtc_init (drm_dev, mtk_crtc, pipe);if (ret <0 ) goto unprepare;drm_mode_crtc_set_gamma_size (&mtk_crtc->base,MTK_LUT_SIZE );
drivers/hwtracing/intel_th/msu.c +3 -3
@@ -491,7 +491,7 @@ static int msc_configure(struct msc *msc)lockdep_assert_held (&msc->buf_mutex);if (msc->mode >MSC_MODE_MULTI ) -return -ENOTSUPP ; +return -EINVAL ;if (msc->mode ==MSC_MODE_MULTI )msc_buffer_clear_hw_header (msc);
@@ -942,7 +942,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages, }else if (msc->mode ==MSC_MODE_MULTI ) { ret =msc_buffer_multi_alloc (msc, nr_pages, nr_wins); }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; }if (!ret) {
@@ -1165,7 +1165,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,if (ret >=0 ) *ppos = iter->offset; }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; } put_count:
drivers/hwtracing/intel_th/pci.c +5 -0
@@ -210,6 +210,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Elkhart Lake CPU */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x4529 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Elkhart Lake */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
drivers/iio/accel/st_accel_i2c.c +1 -1
@@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);#ifdef CONFIG_ACPI static const struct acpi_device_id st_accel_acpi_match[] = { - {"SMO8840" , (kernel_ulong_t )LNG2DM_ACCEL_DEV_NAME }, + {"SMO8840" , (kernel_ulong_t )LIS2DH12_ACCEL_DEV_NAME }, {"SMO8A90" , (kernel_ulong_t )LNG2DM_ACCEL_DEV_NAME }, { }, };
drivers/iio/adc/at91-sama5d2_adc.c +15 -0
@@ -731,6 +731,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)for_each_set_bit (bit, indio->active_scan_mask, indio->num_channels) {struct iio_chan_spec const *chan =at91_adc_chan_get (indio, bit); +u32 cor;if (!chan)continue ;
@@ -739,6 +740,20 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state) chan->type == IIO_PRESSURE)continue ; +if (state) { + cor =at91_adc_readl (st,AT91_SAMA5D2_COR ); + +if (chan->differential) + cor |= (BIT (chan->channel) | +BIT (chan->channel2)) << +AT91_SAMA5D2_COR_DIFF_OFFSET ; +else + cor &= ~(BIT (chan->channel) << +AT91_SAMA5D2_COR_DIFF_OFFSET ); + +at91_adc_writel (st,AT91_SAMA5D2_COR , cor); + } +if (state) {at91_adc_writel (st,AT91_SAMA5D2_CHER ,BIT (chan->channel));
drivers/iio/light/vcnl4000.c +4 -3
@@ -150,9 +150,10 @@ static int vcnl4200_init(struct vcnl4000_data *data) data->al_scale =24000 ; data->vcnl4200_al.reg =VCNL4200_AL_DATA ; data->vcnl4200_ps.reg =VCNL4200_PS_DATA ; -/* Integration time is 50ms, but the experiments show 54ms in total. */ - data->vcnl4200_al.sampling_rate =ktime_set (0 ,54000 *1000 ); - data->vcnl4200_ps.sampling_rate =ktime_set (0 ,4200 *1000 ); +/* Default wait time is 50ms, add 20% tolerance. */ + data->vcnl4200_al.sampling_rate =ktime_set (0 ,60000 *1000 ); +/* Default wait time is 4.8ms, add 20% tolerance. */ + data->vcnl4200_ps.sampling_rate =ktime_set (0 ,5760 *1000 ); data->vcnl4200_al.last_measurement =ktime_set (0 ,0 ); data->vcnl4200_ps.last_measurement =ktime_set (0 ,0 );mutex_init (&data->vcnl4200_al.lock);
drivers/iio/magnetometer/ak8974.c +1 -1
@@ -563,7 +563,7 @@ static int ak8974_read_raw(struct iio_dev *indio_dev,* We read all axes and discard all but one, for optimized * reading, use the triggered buffer. */ - *val =le16_to_cpu (hw_values[chan->address]); + *val = (s16 )le16_to_cpu (hw_values[chan->address]); ret =IIO_VAL_INT ; }
drivers/iio/trigger/stm32-timer-trigger.c +9 -2
@@ -161,7 +161,8 @@ static int stm32_timer_start(struct stm32_timer_trigger *priv,return 0 ; } -static void stm32_timer_stop (struct stm32_timer_trigger *priv) +static void stm32_timer_stop (struct stm32_timer_trigger *priv, +struct iio_trigger *trig) {u32 ccer, cr1;
@@ -179,6 +180,12 @@ static void stm32_timer_stop(struct stm32_timer_trigger *priv)regmap_write (priv->regmap,TIM_PSC ,0 );regmap_write (priv->regmap,TIM_ARR ,0 ); +/* Force disable master mode */ +if (stm32_timer_is_trgo2_name (trig->name)) +regmap_update_bits (priv->regmap,TIM_CR2 ,TIM_CR2_MMS2 ,0 ); +else +regmap_update_bits (priv->regmap,TIM_CR2 ,TIM_CR2_MMS ,0 ); +/* Make sure that registers are updated */ regmap_update_bits (priv->regmap,TIM_EGR ,TIM_EGR_UG ,TIM_EGR_UG ); }
@@ -197,7 +204,7 @@ static ssize_t stm32_tt_store_frequency(struct device *dev,return ret;if (freq ==0 ) { -stm32_timer_stop (priv); +stm32_timer_stop (priv, trig); }else { ret =stm32_timer_start (priv, trig, freq);if (ret)
drivers/md/dm-bio-record.h +15 -0
@@ -20,8 +20,13 @@struct dm_bio_details {struct gendisk *bi_disk;u8 bi_partno; +int __bi_remaining;unsigned long bi_flags;struct bvec_iter bi_iter; +bio_end_io_t *bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) +struct bio_integrity_payload *bi_integrity; +#endif };static inline void dm_bio_record (struct dm_bio_details *bd,struct bio *bio)
@@ -30,6 +35,11 @@ static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) bd->bi_partno = bio->bi_partno; bd->bi_flags = bio->bi_flags; bd->bi_iter = bio->bi_iter; + bd->__bi_remaining =atomic_read (&bio->__bi_remaining); + bd->bi_end_io = bio->bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) + bd->bi_integrity =bio_integrity (bio); +#endif }static inline void dm_bio_restore (struct dm_bio_details *bd,struct bio *bio)
@@ -38,6 +48,11 @@ static inline void dm_bio_restore(struct dm_bio_details *bd, struct bio *bio) bio->bi_partno = bd->bi_partno; bio->bi_flags = bd->bi_flags; bio->bi_iter = bd->bi_iter; +atomic_set (&bio->__bi_remaining, bd->__bi_remaining); + bio->bi_end_io = bd->bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) + bio->bi_integrity = bd->bi_integrity; +#endif }#endif
drivers/md/dm-integrity.c +9 -23
@@ -6,6 +6,8 @@* This file is released under the GPL. */ +#include "dm-bio-record.h" +#include <linux/compiler.h> #include <linux/module.h> #include <linux/device-mapper.h>
@@ -276,11 +278,7 @@ struct dm_integrity_io {struct completion *completion; -struct gendisk *orig_bi_disk; -u8 orig_bi_partno; -bio_end_io_t *orig_bi_end_io; -struct bio_integrity_payload *orig_bi_integrity; -struct bvec_iter orig_bi_iter; +struct dm_bio_details bio_details; };struct journal_completion {
@@ -1249,14 +1247,9 @@ static void integrity_end_io(struct bio *bio) {struct dm_integrity_io *dio =dm_per_bio_data (bio,sizeof (struct dm_integrity_io )); - bio->bi_iter = dio->orig_bi_iter; - bio->bi_disk = dio->orig_bi_disk; - bio->bi_partno = dio->orig_bi_partno; -if (dio->orig_bi_integrity) { - bio->bi_integrity = dio->orig_bi_integrity; +dm_bio_restore (&dio->bio_details, bio); +if (bio->bi_integrity) bio->bi_opf |=REQ_INTEGRITY ; - } - bio->bi_end_io = dio->orig_bi_end_io;if (dio->completion)complete (dio->completion);
@@ -1336,7 +1329,7 @@ static void integrity_metadata(struct work_struct *w)if (!checksums) checksums = checksums_onstack; -__bio_for_each_segment (bv, bio, iter, dio->orig_bi_iter) { +__bio_for_each_segment (bv, bio, iter, dio->bio_details.bi_iter) {unsigned pos;char *mem, *checksums_ptr;
@@ -1380,7 +1373,7 @@ static void integrity_metadata(struct work_struct *w)if (likely (checksums != checksums_onstack))kfree (checksums); }else { -struct bio_integrity_payload *bip = dio->orig_bi_integrity; +struct bio_integrity_payload *bip = dio->bio_details.bi_integrity;if (bip) {struct bio_vec biv;
@@ -1784,20 +1777,13 @@ static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map }else dio->completion =NULL ; - dio->orig_bi_iter = bio->bi_iter; - - dio->orig_bi_disk = bio->bi_disk; - dio->orig_bi_partno = bio->bi_partno; +dm_bio_record (&dio->bio_details, bio);bio_set_dev (bio, ic->dev->bdev); - - dio->orig_bi_integrity =bio_integrity (bio); bio->bi_integrity =NULL ; bio->bi_opf &= ~REQ_INTEGRITY ; - - dio->orig_bi_end_io = bio->bi_end_io; bio->bi_end_io = integrity_end_io; - bio->bi_iter.bi_size = dio->range.n_sectors <<SECTOR_SHIFT ; +generic_make_request (bio);if (need_sync_io) {
drivers/misc/altera-stapl/altera.c +6 -6
@@ -2126,8 +2126,8 @@ static int altera_execute(struct altera_state *astate,return status; } -static int altera_get_note (u8 *p,s32 program_size, -s32 *offset,char *key,char *value,int length) +static int altera_get_note (u8 *p,s32 program_size,s32 *offset, +char *key,char *value,int keylen,int vallen)/* * Gets key and value of NOTE fields in the JBC file. * Can be called in two modes: if offset pointer is NULL,
@@ -2184,7 +2184,7 @@ static int altera_get_note(u8 *p, s32 program_size, &p[note_table + (8 * i) + 4])];if (value !=NULL ) -strlcpy (value, value_ptr, length); +strlcpy (value, value_ptr, vallen); } }
@@ -2203,13 +2203,13 @@ static int altera_get_note(u8 *p, s32 program_size,strlcpy (key, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i)])], - length); + keylen);if (value !=NULL )strlcpy (value, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i) +4 ])], - length); + vallen); *offset = i +1 ; }
@@ -2463,7 +2463,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw) __func__, (format_version ==2 ) ?"Jam STAPL" : "pre-standardized Jam 1.1");while (altera_get_note ((u8 *)fw->data, fw->size, - &offset, key, value,256 ) ==0 ) + &offset, key, value,32 ,256 ) ==0 )printk (KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n" , __func__, key, value); }
drivers/misc/cardreader/rts5227.c +1 -1
@@ -369,6 +369,6 @@ static const struct pcr_ops rts522a_pcr_ops = {void rts522a_init_params (struct rtsx_pcr *pcr) {rts5227_init_params (pcr); - + pcr->tx_initial_phase =SET_CLOCK_PHASE (20 ,20 ,11 ); pcr->reg_pm_ctrl3 =RTS522A_PM_CTRL3 ; }
drivers/misc/cardreader/rts5249.c +2 -0
@@ -623,6 +623,7 @@ static const struct pcr_ops rts524a_pcr_ops = {void rts524a_init_params (struct rtsx_pcr *pcr) {rts5249_init_params (pcr); + pcr->tx_initial_phase =SET_CLOCK_PHASE (27 ,29 ,11 ); pcr->option.ltr_l1off_sspwrgate =LTR_L1OFF_SSPWRGATE_5250_DEF ; pcr->option.ltr_l1off_snooze_sspwrgate =LTR_L1OFF_SNOOZE_SSPWRGATE_5250_DEF ;
@@ -731,6 +732,7 @@ static const struct pcr_ops rts525a_pcr_ops = {void rts525a_init_params (struct rtsx_pcr *pcr) {rts5249_init_params (pcr); + pcr->tx_initial_phase =SET_CLOCK_PHASE (25 ,29 ,11 ); pcr->option.ltr_l1off_sspwrgate =LTR_L1OFF_SSPWRGATE_5250_DEF ; pcr->option.ltr_l1off_snooze_sspwrgate =LTR_L1OFF_SNOOZE_SSPWRGATE_5250_DEF ;
drivers/misc/cardreader/rts5260.c +1 -1
@@ -712,7 +712,7 @@ void rts5260_init_params(struct rtsx_pcr *pcr) pcr->sd30_drive_sel_1v8 =CFG_DRIVER_TYPE_B ; pcr->sd30_drive_sel_3v3 =CFG_DRIVER_TYPE_B ; pcr->aspm_en =ASPM_L1_EN ; - pcr->tx_initial_phase =SET_CLOCK_PHASE (1 ,29 ,16 ); + pcr->tx_initial_phase =SET_CLOCK_PHASE (27 ,29 ,11 ); pcr->rx_initial_phase =SET_CLOCK_PHASE (24 ,6 ,5 ); pcr->ic_version =rts5260_get_ic_version (pcr);
drivers/mmc/host/rtsx_pci_sdmmc.c +8 -5
@@ -618,19 +618,22 @@ static int sd_change_phase(struct realtek_pci_sdmmc *host, u8 sample_point, bool rx) {struct rtsx_pcr *pcr = host->pcr; - +u16 SD_VP_CTL =0 ;dev_dbg (sdmmc_dev (host),"%s(%s): sample_point = %d\n" , __func__, rx ?"RX" :"TX" , sample_point);rtsx_pci_write_register (pcr,CLK_CTL ,CHANGE_CLK ,CHANGE_CLK ); -if (rx) +if (rx) { +SD_VP_CTL =SD_VPRX_CTL ;rtsx_pci_write_register (pcr,SD_VPRX_CTL ,PHASE_SELECT_MASK , sample_point); -else + }else { +SD_VP_CTL =SD_VPTX_CTL ;rtsx_pci_write_register (pcr,SD_VPTX_CTL ,PHASE_SELECT_MASK , sample_point); -rtsx_pci_write_register (pcr,SD_VPCLK0_CTL ,PHASE_NOT_RESET ,0 ); -rtsx_pci_write_register (pcr,SD_VPCLK0_CTL ,PHASE_NOT_RESET , + } +rtsx_pci_write_register (pcr,SD_VP_CTL ,PHASE_NOT_RESET ,0 ); +rtsx_pci_write_register (pcr,SD_VP_CTL ,PHASE_NOT_RESET ,PHASE_NOT_RESET );rtsx_pci_write_register (pcr,CLK_CTL ,CHANGE_CLK ,0 );rtsx_pci_write_register (pcr,SD_CFG1 ,SD_ASYNC_FIFO_NOT_RST ,0 );
drivers/mmc/host/sdhci-of-at91.c +6 -2
@@ -126,7 +126,8 @@ static void sdhci_at91_reset(struct sdhci_host *host, u8 mask) {sdhci_reset (host, mask); -if (host->mmc->caps &MMC_CAP_NONREMOVABLE ) +if ((host->mmc->caps &MMC_CAP_NONREMOVABLE ) + ||mmc_gpio_get_cd (host->mmc) >=0 )sdhci_at91_set_force_card_detect (host); }
@@ -405,8 +406,11 @@ static int sdhci_at91_probe(struct platform_device *pdev)* detection procedure using the SDMCC_CD signal is bypassed. * This bit is reset when a software reset for all command is performed * so we need to implement our own reset function to set back this bit. +* +* WA: SAMA5D2 doesn't drive CMD if using CD GPIO line. */ -if (host->mmc->caps &MMC_CAP_NONREMOVABLE ) +if ((host->mmc->caps &MMC_CAP_NONREMOVABLE ) + ||mmc_gpio_get_cd (host->mmc) >=0 )sdhci_at91_set_force_card_detect (host);pm_runtime_put_autosuspend (&pdev->dev);
drivers/net/vrf.c +10 -9
@@ -993,23 +993,24 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, struct sk_buff *skb) {int orig_iif = skb->skb_iif; -bool need_strict =rt6_need_strict (&ipv6_hdr (skb)->daddr); -bool is_ndisc =ipv6_ndisc_frame (skb); +bool need_strict; -/* loopback, multicast & non-ND link-local traffic; do not push through -* packet taps again. Reset pkt_type for upper layers to process skb +/* loopback traffic; do not push through packet taps again. +* Reset pkt_type for upper layers to process skb */ -if (skb->pkt_type ==PACKET_LOOPBACK || (need_strict && !is_ndisc)) { +if (skb->pkt_type ==PACKET_LOOPBACK ) { skb->dev = vrf_dev; skb->skb_iif = vrf_dev->ifindex;IP6CB (skb)->flags |=IP6SKB_L3SLAVE ; -if (skb->pkt_type ==PACKET_LOOPBACK ) - skb->pkt_type =PACKET_HOST ; + skb->pkt_type =PACKET_HOST ; goto out; } -/* if packet is NDISC then keep the ingress interface */ -if (!is_ndisc) { +/* if packet is NDISC or addressed to multicast or link-local +* then keep the ingress interface +*/ + need_strict =rt6_need_strict (&ipv6_hdr (skb)->daddr); +if (!ipv6_ndisc_frame (skb) && !need_strict) {vrf_rx_stats (vrf_dev, skb->len); skb->dev = vrf_dev; skb->skb_iif = vrf_dev->ifindex;
drivers/perf/arm_pmu_acpi.c +2 -5
@@ -27,8 +27,6 @@ static int arm_pmu_acpi_register_irq(int cpu)int gsi, trigger; gicc =acpi_cpu_get_madt_gicc (cpu); -if (WARN_ON (!gicc)) -return -EINVAL ; gsi = gicc->performance_interrupt;
@@ -67,11 +65,10 @@ static void arm_pmu_acpi_unregister_irq(int cpu)int gsi; gicc =acpi_cpu_get_madt_gicc (cpu); -if (!gicc) -return ; gsi = gicc->performance_interrupt; -acpi_unregister_gsi (gsi); +if (gsi) +acpi_unregister_gsi (gsi); }static int arm_pmu_acpi_parse_irqs (void )
drivers/rtc/Kconfig +1 -0
@@ -314,6 +314,7 @@ config RTC_DRV_MAX6900 config RTC_DRV_MAX8907 tristate "Maxim MAX8907" depends on MFD_MAX8907 || COMPILE_TEST + select REGMAP_IRQ help If you say yes here you will get support for the RTC of Maxim MAX8907 PMIC.
drivers/spi/spi-pxa2xx.c +23 -0
@@ -76,6 +76,10 @@ MODULE_ALIAS("platform:pxa2xx-spi");#define LPSS_CAPS_CS_EN_SHIFT 9#define LPSS_CAPS_CS_EN_MASK (0xf << LPSS_CAPS_CS_EN_SHIFT) +#define LPSS_PRIV_CLOCK_GATE 0x38 +#define LPSS_PRIV_CLOCK_GATE_CLK_CTL_MASK 0x3 +#define LPSS_PRIV_CLOCK_GATE_CLK_CTL_FORCE_ON 0x3 +struct lpss_config {/* LPSS offset from drv_data->ioaddr */ unsigned offset;
@@ -92,6 +96,8 @@ struct lpss_config {unsigned cs_sel_shift;unsigned cs_sel_mask;unsigned cs_num; +/* Quirks */ + unsigned cs_clk_stays_gated : 1; };/* Keep these sorted with enum pxa_ssp_type */
@@ -162,6 +168,7 @@ static const struct lpss_config lpss_platforms[] = { .tx_threshold_hi = 56, .cs_sel_shift = 8, .cs_sel_mask = 3 << 8, + .cs_clk_stays_gated = true, }, };
@@ -389,6 +396,22 @@ static void lpss_ssp_cs_control(struct spi_device *spi, bool enable)else value |=LPSS_CS_CONTROL_CS_HIGH ;__lpss_ssp_write_priv (drv_data, config->reg_cs_ctrl, value); +if (config->cs_clk_stays_gated) { +u32 clkgate; + +/* +* Changing CS alone when dynamic clock gating is on won't +* actually flip CS at that time. This ruins SPI transfers +* that specify delays, or have no data. Toggle the clock mode +* to force on briefly to poke the CS pin to move. +*/ + clkgate =__lpss_ssp_read_priv (drv_data,LPSS_PRIV_CLOCK_GATE ); + value = (clkgate & ~LPSS_PRIV_CLOCK_GATE_CLK_CTL_MASK ) | +LPSS_PRIV_CLOCK_GATE_CLK_CTL_FORCE_ON ; + +__lpss_ssp_write_priv (drv_data,LPSS_PRIV_CLOCK_GATE , value); +__lpss_ssp_write_priv (drv_data,LPSS_PRIV_CLOCK_GATE , clkgate); + } }static void cs_assert (struct spi_device *spi)
drivers/spi/spi-qup.c +7 -4
@@ -1190,6 +1190,11 @@ static int spi_qup_suspend(struct device *device)struct spi_qup *controller =spi_master_get_devdata (master);int ret; +if (pm_runtime_suspended (device)) { + ret =spi_qup_pm_resume_runtime (device); +if (ret) +return ret; + } ret =spi_master_suspend (master);if (ret)return ret;
@@ -1198,10 +1203,8 @@ static int spi_qup_suspend(struct device *device)if (ret)return ret; -if (!pm_runtime_suspended (device)) { -clk_disable_unprepare (controller->cclk); -clk_disable_unprepare (controller->iclk); - } +clk_disable_unprepare (controller->cclk); +clk_disable_unprepare (controller->iclk);return 0 ; }
drivers/spi/spi-zynqmp-gqspi.c +0 -3
@@ -403,9 +403,6 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high)zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST , genfifoentry); -/* Dummy generic FIFO entry */ -zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST ,0x0 ); -/* Manually start the generic FIFO command */ zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST, zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
drivers/staging/greybus/tools/loopback_test.c +11 -10
@@ -21,6 +21,7 @@#include <signal.h> #define MAX_NUM_DEVICES 10 +#define MAX_SYSFS_PREFIX 0x80#define MAX_SYSFS_PATH 0x200#define CSV_MAX_LINE 0x1000#define SYSFS_MAX_INT 0x20
@@ -69,7 +70,7 @@ struct loopback_results { };struct loopback_device { -char name[MAX_SYSFS_PATH ]; +char name[MAX_STR_LEN ];char sysfs_entry[MAX_SYSFS_PATH ];char debugfs_entry[MAX_SYSFS_PATH ];struct loopback_results results;
@@ -95,8 +96,8 @@ struct loopback_test {int stop_all;int poll_count;char test_name[MAX_STR_LEN ]; -char sysfs_prefix[MAX_SYSFS_PATH ]; -char debugfs_prefix[MAX_SYSFS_PATH ]; +char sysfs_prefix[MAX_SYSFS_PREFIX ]; +char debugfs_prefix[MAX_SYSFS_PREFIX ];struct timespec poll_timeout;struct loopback_device devices[MAX_NUM_DEVICES ];struct loopback_results aggregate_results;
@@ -645,7 +646,7 @@ int find_loopback_devices(struct loopback_test *t)static int open_poll_files (struct loopback_test *t) {struct loopback_device *dev; -char buf[MAX_STR_LEN ]; +char buf[MAX_SYSFS_PATH +MAX_STR_LEN ];char dummy;int fds_idx =0 ;int i;
@@ -663,7 +664,7 @@ static int open_poll_files(struct loopback_test *t) goto err; }read (t->fds[fds_idx].fd, &dummy,1 ); - t->fds[fds_idx].events =EPOLLERR |EPOLLPRI ; + t->fds[fds_idx].events =POLLERR |POLLPRI ; t->fds[fds_idx].revents =0 ; fds_idx++; }
@@ -756,7 +757,7 @@ static int wait_for_complete(struct loopback_test *t) }for (i =0 ; i < t->poll_count; i++) { -if (t->fds[i].revents &EPOLLPRI ) { +if (t->fds[i].revents &POLLPRI ) {/* Dummy read to clear the event */ read (t->fds[i].fd, &dummy,1 ); number_of_events++;
@@ -915,10 +916,10 @@ int main(int argc, char *argv[]) t.iteration_max =atoi (optarg);break ;case 'S' : -snprintf (t.sysfs_prefix,MAX_SYSFS_PATH ,"%s" , optarg); +snprintf (t.sysfs_prefix,MAX_SYSFS_PREFIX ,"%s" , optarg);break ;case 'D' : -snprintf (t.debugfs_prefix,MAX_SYSFS_PATH ,"%s" , optarg); +snprintf (t.debugfs_prefix,MAX_SYSFS_PREFIX ,"%s" , optarg);break ;case 'm' : t.mask =atol (optarg);
@@ -969,10 +970,10 @@ int main(int argc, char *argv[]) }if (!strcmp (t.sysfs_prefix,"" )) -snprintf (t.sysfs_prefix,MAX_SYSFS_PATH ,"%s" , sysfs_prefix); +snprintf (t.sysfs_prefix,MAX_SYSFS_PREFIX ,"%s" , sysfs_prefix);if (!strcmp (t.debugfs_prefix,"" )) -snprintf (t.debugfs_prefix,MAX_SYSFS_PATH ,"%s" , debugfs_prefix); +snprintf (t.debugfs_prefix,MAX_SYSFS_PREFIX ,"%s" , debugfs_prefix); ret =find_loopback_devices (&t);if (ret)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -0
@@ -38,6 +38,7 @@ static const struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ {USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */ + {USB_DEVICE(0x2C4E, 0x0102)}, /* MERCUSYS MW150US v2 */ {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ {} /* Terminating entry */
drivers/staging/speakup/main.c +1 -1
@@ -561,7 +561,7 @@ static u_long get_word(struct vc_data *vc)return 0 ; }else if (tmpx < vc->vc_cols -2 && (ch ==SPACE || ch ==0 || (ch <0x100 &&IS_WDLM (ch))) && -get_char (vc, (u_short *)&tmp_pos +1 , &temp) >SPACE ) { +get_char (vc, (u_short *)tmp_pos +1 , &temp) >SPACE ) { tmp_pos +=2 ; tmpx++; }else {
drivers/usb/class/cdc-acm.c +21 -13
@@ -914,10 +914,10 @@ static int get_serial_info(struct acm *acm, struct serial_struct __user *info)memset (&tmp,0 ,sizeof (tmp)); tmp.xmit_fifo_size = acm->writesize; tmp.baud_base =le32_to_cpu (acm->line.dwDTERate); - tmp.close_delay = acm->port.close_delay /10 ; + tmp.close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; tmp.closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ?ASYNC_CLOSING_WAIT_NONE : - acm->port.closing_wait /10 ; +jiffies_to_msecs (acm->port.closing_wait) /10 ;if (copy_to_user (info, &tmp,sizeof (tmp)))return -EFAULT ;
@@ -930,27 +930,35 @@ static int set_serial_info(struct acm *acm, {struct serial_struct new_serial;unsigned int closing_wait, close_delay; +unsigned int old_closing_wait, old_close_delay;int retval =0 ;if (copy_from_user (&new_serial, newinfo,sizeof (new_serial)))return -EFAULT ; - close_delay = new_serial.close_delay *10 ; + close_delay =msecs_to_jiffies (new_serial.close_delay *10 ); closing_wait = new_serial.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : new_serial.closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (new_serial.closing_wait *10 ); + +/* we must redo the rounding here, so that the values match */ + old_close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; + old_closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? +ASYNC_CLOSING_WAIT_NONE : +jiffies_to_msecs (acm->port.closing_wait) /10 ;mutex_lock (&acm->port.mutex); -if (!capable (CAP_SYS_ADMIN )) { -if ((close_delay != acm->port.close_delay) || - (closing_wait != acm->port.closing_wait)) +if ((new_serial.close_delay != old_close_delay) || + (new_serial.closing_wait != old_closing_wait)) { +if (!capable (CAP_SYS_ADMIN )) retval = -EPERM ; -else - retval = -EOPNOTSUPP ; - }else { - acm->port.close_delay = close_delay; - acm->port.closing_wait = closing_wait; - } +else { + acm->port.close_delay = close_delay; + acm->port.closing_wait = closing_wait; + } + }else + retval = -EOPNOTSUPP ;mutex_unlock (&acm->port.mutex);return retval;
drivers/usb/core/quirks.c +6 -0
@@ -378,6 +378,12 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0b05, 0x17e0), .driver_info = USB_QUIRK_IGNORE_REMOTE_WAKEUP }, + /* Realtek hub in Dell WD19 (Type-C) */ + { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, + + /* Generic RTL8153 based ethernet adapters */ + { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM }, + /* Action Semiconductor flash disk */ { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255 },
drivers/usb/host/xhci-pci.c +2 -1
@@ -128,7 +128,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |=XHCI_AMD_PLL_FIX ;if (pdev->vendor ==PCI_VENDOR_ID_AMD && - (pdev->device ==0x15e0 || + (pdev->device ==0x145c || + pdev->device ==0x15e0 || pdev->device ==0x15e1 || pdev->device ==0x43bb )) xhci->quirks |=XHCI_SUSPEND_DELAY ;
drivers/usb/host/xhci-plat.c +1 -0
@@ -443,6 +443,7 @@ MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, + .shutdown = usb_hcd_platform_shutdown, .driver = { .name ="xhci-hcd" , .pm = &xhci_plat_pm_ops,
drivers/usb/host/xhci-trace.h +6 -17
@@ -289,23 +289,12 @@ DECLARE_EVENT_CLASS(xhci_log_urb, ),TP_printk ("ep%d%s-%s: urb %p pipe %u slot %d length %d/%d sgs %d/%d stream %d flags %08x" , __entry->epnum, __entry->dir_in ?"in" :"out" , - ({char *s; -switch (__entry->type) { -case USB_ENDPOINT_XFER_INT : - s ="intr" ; -break ; -case USB_ENDPOINT_XFER_CONTROL : - s ="control" ; -break ; -case USB_ENDPOINT_XFER_BULK : - s ="bulk" ; -break ; -case USB_ENDPOINT_XFER_ISOC : - s ="isoc" ; -break ; -default : - s ="UNKNOWN" ; - } s; }), __entry->urb, __entry->pipe, __entry->slot_id, +__print_symbolic (__entry->type, + { USB_ENDPOINT_XFER_INT, "intr" }, + { USB_ENDPOINT_XFER_CONTROL, "control" }, + { USB_ENDPOINT_XFER_BULK, "bulk" }, + { USB_ENDPOINT_XFER_ISOC, "isoc" }), + __entry->urb, __entry->pipe, __entry->slot_id, __entry->actual, __entry->length, __entry->num_mapped_sgs, __entry->num_sgs, __entry->stream, __entry->flags )
drivers/usb/serial/option.c +2 -0
@@ -1183,6 +1183,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110a, 0xff), /* Telit ME910G1 */ .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110b, 0xff), /* Telit ME910G1 (ECM) */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
drivers/usb/serial/pl2303.c +1 -0
@@ -93,6 +93,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +1 -0
@@ -124,6 +124,7 @@#define HP_LM920_PRODUCT_ID 0x026b#define HP_TD620_PRODUCT_ID 0x0956#define HP_LD960_PRODUCT_ID 0x0b39 +#define HP_LD381_PRODUCT_ID 0x0f7f#define HP_LCM220_PRODUCT_ID 0x3139#define HP_LCM960_PRODUCT_ID 0x3239#define HP_LD220_PRODUCT_ID 0x3524
drivers/xen/xenbus/xenbus_comms.c +4 -0
@@ -313,6 +313,8 @@ static int process_msg(void) req->msg.type = state.msg.type; req->msg.len = state.msg.len; req->body = state.body; +/* write body, then update state */ +virt_wmb (); req->state = xb_req_state_got_reply; req->cb (req); }else
@@ -395,6 +397,8 @@ static int process_writes(void)if (state.req->state == xb_req_state_aborted)kfree (state.req);else { +/* write err, then update state */ +virt_wmb (); state.req->state = xb_req_state_got_reply;wake_up (&state.req->wq); }
drivers/xen/xenbus/xenbus_xs.c +6 -3
@@ -191,8 +191,11 @@ static bool xenbus_ok(void)static bool test_reply (struct xb_req_data *req) { -if (req->state == xb_req_state_got_reply || !xenbus_ok ()) +if (req->state == xb_req_state_got_reply || !xenbus_ok ()) { +/* read req->state before all other fields */ +virt_rmb ();return true; + }/* Make sure to reread req->state each time. */ barrier ();
@@ -202,7 +205,7 @@ static bool test_reply(struct xb_req_data *req)static void *read_reply (struct xb_req_data *req) { -while (req->state != xb_req_state_got_reply) { + do { wait_event(req->wq, test_reply(req)); if (!xenbus_ok())
@@ -216,7 +219,7 @@ static void *read_reply(struct xb_req_data *req)if (req->err)return ERR_PTR (req->err); - } + }while (req->state != xb_req_state_got_reply);return req->body; }
fs/btrfs/inode.c +4 -0
@@ -10015,6 +10015,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ret =btrfs_sync_log (trans,BTRFS_I (old_inode)->root, &ctx);if (ret) commit_transaction = true; + }else if (sync_log) { +mutex_lock (&root->log_mutex); +list_del (&ctx.list); +mutex_unlock (&root->log_mutex); }if (commit_transaction) { ret =btrfs_commit_transaction (trans);
fs/inode.c +1 -0
@@ -136,6 +136,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_sb = sb; inode->i_blkbits = sb->s_blocksize_bits; inode->i_flags =0 ; +atomic64_set (&inode->i_sequence,0 );atomic_set (&inode->i_count,1 ); inode->i_op = &empty_iops; inode->i_fop = &no_open_fops;
include/linux/fs.h +1 -0
@@ -663,6 +663,7 @@ struct inode {struct rcu_head i_rcu; };atomic64_t i_version; +atomic64_t i_sequence;/* see futex */ atomic_t i_count;atomic_t i_dio_count;atomic_t i_writecount;
include/linux/futex.h +10 -7
@@ -29,23 +29,26 @@ struct task_struct;union futex_key {struct { +u64 i_seq;unsigned long pgoff; -struct inode *inode; -int offset; +unsigned int offset; } shared;struct { +union { +struct mm_struct *mm; +u64 __tmp; + };unsigned long address; -struct mm_struct *mm; -int offset; +unsigned int offset; } private;struct { +u64 ptr;unsigned long word; -void *ptr; -int offset; +unsigned int offset; } both; }; -#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } } +#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = 0ULL } }#ifdef CONFIG_FUTEX extern void exit_robust_list (struct task_struct *curr);
include/linux/page-flags.h +1 -1
@@ -271,7 +271,7 @@ static inline int TestClearPage##uname(struct page *page) { return 0; } __PAGEFLAG(Locked, locked, PF_NO_TAIL) PAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) __CLEARPAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) -PAGEFLAG(Error, error, PF_NO_COMPOUND) TESTCLEARFLAG(Error, error, PF_NO_COMPOUND) +PAGEFLAG(Error, error, PF_NO_TAIL) TESTCLEARFLAG(Error, error, PF_NO_TAIL) PAGEFLAG(Referenced, referenced, PF_HEAD) TESTCLEARFLAG(Referenced, referenced, PF_HEAD)__SETPAGEFLAG (Referenced, referenced,PF_HEAD )
include/linux/vmalloc.h +3 -2
@@ -107,8 +107,9 @@ extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,extern int remap_vmalloc_range (struct vm_area_struct *vma,void *addr,unsigned long pgoff); -void vmalloc_sync_all (void ); - +void vmalloc_sync_mappings (void ); +void vmalloc_sync_unmappings (void ); +/* * Lowlevel-APIs (not for driver use!) */
kernel/futex.c +55 -38
141 lines not on this page · raw message
kernel/notifier.c +1 -1
@@ -552,7 +552,7 @@ NOKPROBE_SYMBOL(notify_die);int register_die_notifier (struct notifier_block *nb) { -vmalloc_sync_all (); +vmalloc_sync_mappings ();return atomic_notifier_chain_register (&die_chain, nb); }EXPORT_SYMBOL_GPL (register_die_notifier);
mm/memcontrol.c +8 -2
@@ -3759,7 +3759,7 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,struct mem_cgroup_thresholds *thresholds;struct mem_cgroup_threshold_ary *new;unsigned long usage; -int i, j, size; +int i, j, size, entries;mutex_lock (&memcg->thresholds_lock);
@@ -3779,14 +3779,20 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,__mem_cgroup_threshold (memcg, type == _MEMSWAP);/* Calculate new number of threshold */ - size =0 ; + size = entries =0 ;for (i =0 ; i < thresholds->primary->size; i++) {if (thresholds->primary->entries[i].eventfd != eventfd) size++; +else + entries++; } new = thresholds->spare; +/* If no items related to eventfd have been cleared, nothing to do */ +if (!entries) + goto unlock; +/* Set thresholds array to NULL if we don't have thresholds */ if (!size) {kfree (new);
mm/nommu.c +7 -3
@@ -446,10 +446,14 @@ void vm_unmap_aliases(void)EXPORT_SYMBOL_GPL (vm_unmap_aliases);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement a stub for vmalloc_sync_[un]mapping() if the architecture +* chose not to have one. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) +{ +} + +void __weak vmalloc_sync_unmappings (void ) { }
mm/slub.c +21 -11
@@ -1906,8 +1906,6 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node,if (node ==NUMA_NO_NODE ) searchnode =numa_mem_id (); -else if (!node_present_pages (node)) - searchnode =node_to_mem_node (node); object =get_partial_node (s,get_node (s, searchnode), c, flags);if (object || node !=NUMA_NO_NODE )
@@ -2504,17 +2502,27 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,struct page *page; page = c->page; -if (!page) +if (!page) { +/* +* if the node is not online or has no normal memory, just +* ignore the node constraint +*/ +if (unlikely (node !=NUMA_NO_NODE && + !node_state (node,N_NORMAL_MEMORY ))) + node =NUMA_NO_NODE ; goto new_slab; + } redo:if (unlikely (!node_match (page, node))) { -int searchnode = node; - -if (node !=NUMA_NO_NODE && !node_present_pages (node)) - searchnode =node_to_mem_node (node); - -if (unlikely (!node_match (page, searchnode))) { +/* +* same as above but node_match() being false already +* implies node != NUMA_NO_NODE +*/ +if (!node_state (node,N_NORMAL_MEMORY )) { + node =NUMA_NO_NODE ; + goto redo; + }else {stat (s,ALLOC_NODE_MISMATCH );deactivate_slab (s, page, c->freelist, c); goto new_slab;
@@ -2926,11 +2934,13 @@ static __always_inline void do_slab_free(struct kmem_cache *s,barrier ();if (likely (page == c->page)) { -set_freepointer (s, tail_obj, c->freelist); +void **freelist =READ_ONCE (c->freelist); + +set_freepointer (s, tail_obj, freelist);if (unlikely (!this_cpu_cmpxchg_double ( s->cpu_slab->freelist, s->cpu_slab->tid, - c->freelist, tid, + freelist, tid, head,next_tid (tid)))) {note_cmpxchg_failure ("slab_free" , s, tid);
mm/vmalloc.c +7 -4
@@ -1755,7 +1755,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,* First make sure the mappings are removed from all page-tables * before they are freed. */ -vmalloc_sync_all (); +vmalloc_sync_unmappings ();/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED
@@ -2300,16 +2300,19 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,EXPORT_SYMBOL (remap_vmalloc_range);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement stubs for vmalloc_sync_[un]mappings () if the architecture chose +* not to have one. * * The purpose of this function is to make sure the vmalloc area * mappings are identical in all page-tables in the system. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) { } +void __weak vmalloc_sync_unmappings (void ) +{ +}static int f (pte_t *pte,pgtable_t table,unsigned long addr,void *data) {
net/ipv6/tcp_ipv6.c +1 -2
@@ -734,7 +734,6 @@ static void tcp_v6_init_req(struct request_sock *req,const struct sock *sk_listener, struct sk_buff *skb) { - bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); struct inet_request_sock *ireq = inet_rsk(req);const struct ipv6_pinfo *np =inet6_sk (sk_listener);
@@ -742,7 +741,7 @@ static void tcp_v6_init_req(struct request_sock *req, ireq->ir_v6_loc_addr =ipv6_hdr (skb)->daddr;/* So that link locals have meaning */ -if ((!sk_listener->sk_bound_dev_if || l3_slave) && +if (!sk_listener->sk_bound_dev_if &&ipv6_addr_type (&ireq->ir_v6_rmt_addr) &IPV6_ADDR_LINKLOCAL ) ireq->ir_iif =tcp_v6_iif (skb);
scripts/Makefile.extrawarn +1 -0
@@ -72,5 +72,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) endif endif
scripts/parse-maintainers.pl +0 -0
sound/core/oss/pcm_plugin.c +10 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -209,6 +209,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pif (stream ==SNDRV_PCM_STREAM_PLAYBACK ) { plugin =snd_pcm_plug_last (plug);while (plugin && drv_frames >0 ) { +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) drv_frames = plugin->src_frames (plugin, drv_frames);
@@ -220,6 +222,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_p plugin_next = plugin->next;if (plugin->dst_frames) drv_frames = plugin->dst_frames (plugin, drv_frames); +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin = plugin_next; } }else
@@ -248,11 +252,15 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pcif (frames <0 )return frames; } +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin = plugin_next; } }else if (stream ==SNDRV_PCM_STREAM_CAPTURE ) { plugin =snd_pcm_plug_last (plug);while (plugin) { +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) { frames = plugin->src_frames (plugin, frames);
sound/core/seq/oss/seq_oss_midi.c +1 -0
@@ -615,6 +615,7 @@ send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq len =snd_seq_oss_timer_start (dp->timer);if (ev->type ==SNDRV_SEQ_EVENT_SYSEX ) {snd_seq_oss_readq_sysex (dp->readq, mdev->seq_device, ev); +snd_midi_event_reset_decode (mdev->coder); }else { len =snd_midi_event_decode (mdev->coder, msg,sizeof (msg), ev);if (len >0 )
sound/core/seq/seq_virmidi.c +1 -0
@@ -95,6 +95,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,if ((ev->flags &SNDRV_SEQ_EVENT_LENGTH_MASK ) !=SNDRV_SEQ_EVENT_LENGTH_VARIABLE )continue ;snd_seq_dump_var_event (ev, (snd_seq_dump_func_t )snd_rawmidi_receive, vmidi->substream); +snd_midi_event_reset_decode (vmidi->parser); }else { len =snd_midi_event_decode (vmidi->parser, msg,sizeof (msg), ev);if (len >0 )
sound/pci/hda/patch_realtek.c +2 -0
@@ -7828,6 +7828,8 @@ static int patch_alc269(struct hda_codec *codec) spec->gen.mixer_nid =0 ;break ;case 0x10ec0225 : + codec->power_save_node =1 ; +/* fall through */ case 0x10ec0295 :case 0x10ec0299 : spec->codec_variant =ALC269_TYPE_ALC225 ;
sound/usb/line6/driver.c +1 -1
@@ -320,7 +320,7 @@ static void line6_data_received(struct urb *urb)line6_midibuf_read (mb, line6->buffer_message,LINE6_MIDI_MESSAGE_MAXLEN ); -if (done ==0 ) +if (done <=0 )break ; line6->message_length = done;
sound/usb/line6/midibuf.c +1 -1
@@ -163,7 +163,7 @@ int line6_midibuf_read(struct midi_buffer *this, unsigned char *data,int midi_length_prev =midibuf_message_length (this->command_prev); -if (midi_length_prev >0 ) { +if (midi_length_prev >1 ) { midi_length = midi_length_prev -1 ; repeat =1 ; }else
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 112 +SUBLEVEL = 113 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/dra7.dtsi +2 -0
@@ -324,6 +324,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x20013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
@@ -376,6 +377,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x30013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
arch/arm64/kernel/smp.c +20 -5
@@ -936,11 +936,22 @@ void tick_broadcast(const struct cpumask *mask) }#endif +/* +* The number of CPUs online, not counting this CPU (which may not be +* fully online and so not counted in num_online_cpus()). +*/ +static inline unsigned int num_other_online_cpus (void ) +{ +unsigned int this_cpu_online =cpu_online (smp_processor_id ()); + +return num_online_cpus () - this_cpu_online; +} +void smp_send_stop (void ) {unsigned long timeout; -if (num_online_cpus () >1 ) { +if (num_other_online_cpus ()) {cpumask_t mask;cpumask_copy (&mask, cpu_online_mask);
@@ -953,10 +964,10 @@ void smp_send_stop(void)/* Wait up to one second for other CPUs to stop */ timeout =USEC_PER_SEC ; -while (num_online_cpus () >1 && timeout--) +while (num_other_online_cpus () && timeout--)udelay (1 ); -if (num_online_cpus () >1 ) +if (num_other_online_cpus ())pr_warning ("SMP: failed to stop secondary CPUs %*pbl\n" ,cpumask_pr_args (cpu_online_mask));
@@ -979,7 +990,11 @@ void crash_smp_send_stop(void) cpus_stopped =1 ; -if (num_online_cpus () ==1 ) { +/* +* If this cpu is the only one alive at this point in time, online or +* not, there are no stop messages to be sent around, so just back out. +*/ +if (num_other_online_cpus () ==0 ) {sdei_mask_local_cpu ();return ; }
@@ -987,7 +1002,7 @@ void crash_smp_send_stop(void)cpumask_copy (&mask, cpu_online_mask);cpumask_clear_cpu (smp_processor_id (), &mask); -atomic_set (&waiting_for_crash_ipi,num_online_cpus () -1 ); +atomic_set (&waiting_for_crash_ipi,num_other_online_cpus ());pr_crit ("SMP: stopping secondary CPUs\n" );smp_cross_call (&mask,IPI_CPU_CRASH_STOP );
arch/powerpc/kernel/vmlinux.lds.S +6 -0
@@ -322,6 +322,12 @@ SECTIONS *(.branch_lt) } +#ifdef CONFIG_DEBUG_INFO_BTF + .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) { + *(.BTF) + } +#endif + .opd : AT(ADDR(.opd) - LOAD_OFFSET) { __start_opd = .; KEEP(*(.opd))
arch/riscv/kernel/module.c +16 -0
@@ -16,6 +16,10 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/moduleloader.h> +#include <linux/vmalloc.h> +#include <linux/sizes.h> +#include <asm/pgtable.h> +#include <asm/sections.h> static int apply_r_riscv_32_rela (struct module *me,u32 *location,Elf_Addr v) {
@@ -394,3 +398,15 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,return 0 ; } + +#if defined(CONFIG_MMU ) && defined(CONFIG_64BIT ) +#define VMALLOC_MODULE_START \ + max(PFN_ALIGN((unsigned long)&_end - SZ_2G), VMALLOC_START) +void *module_alloc (unsigned long size) +{ +return __vmalloc_node_range (size,1 ,VMALLOC_MODULE_START , +VMALLOC_END ,GFP_KERNEL , +PAGE_KERNEL_EXEC ,0 ,NUMA_NO_NODE , +__builtin_return_address (0 )); +} +#endif
arch/x86/mm/fault.c +24 -2
@@ -273,7 +273,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)return pmd_k; } -void vmalloc_sync_all (void ) +static void vmalloc_sync (void ) {unsigned long address;
@@ -300,6 +300,16 @@ void vmalloc_sync_all(void) } } +void vmalloc_sync_mappings (void ) +{ +vmalloc_sync (); +} + +void vmalloc_sync_unmappings (void ) +{ +vmalloc_sync (); +} +/* * 32-bit: *
@@ -402,11 +412,23 @@ static void dump_pagetable(unsigned long address)#else /* CONFIG_X86_64: */ -void vmalloc_sync_all (void ) +void vmalloc_sync_mappings (void ) { +/* +* 64-bit mappings might allocate new p4d/pud pages +* that need to be propagated to all tasks' PGDs. +*/ sync_global_pgds (VMALLOC_START &PGDIR_MASK ,VMALLOC_END ); } +void vmalloc_sync_unmappings (void ) +{ +/* +* Unmappings never allocate or free p4d/pud pages. +* No work is required here. +*/ +} +/* * 64-bit: *
block/bfq-cgroup.c +5 -4
@@ -525,12 +525,13 @@ struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd,*/ entity = &bfqg->entity;for_each_entity (entity) { - bfqg = container_of(entity, struct bfq_group, entity); -if (bfqg != bfqd->root_group) { - parent =bfqg_parent (bfqg); +struct bfq_group *curr_bfqg =container_of (entity, + struct bfq_group, entity); +if (curr_bfqg != bfqd->root_group) { + parent =bfqg_parent (curr_bfqg);if (!parent) parent = bfqd->root_group; -bfq_group_set_parent (bfqg, parent); +bfq_group_set_parent (curr_bfqg, parent); } }
drivers/acpi/apei/ghes.c +1 -1
@@ -201,7 +201,7 @@ static int ghes_estatus_pool_expand(unsigned long len)* New allocation must be visible in all pgd before it can be found by * an NMI allocating from the pool. */ -vmalloc_sync_all (); +vmalloc_sync_mappings ();return gen_pool_add (ghes_estatus_pool, addr,PAGE_ALIGN (len),-1 ); }
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +3 -3
@@ -694,11 +694,11 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,ssize_t result =0 ;uint32_t offset, se, sh, cu, wave, simd, thread, bank, *data; -if (size &3 || *pos &3 ) +if (size >4096 || size &3 || *pos &3 )return -EINVAL ;/* decode offset */ - offset = *pos &GENMASK_ULL (11 ,0 ); + offset = (*pos &GENMASK_ULL (11 ,0 )) >>2 ; se = (*pos &GENMASK_ULL (19 ,12 )) >>12 ; sh = (*pos &GENMASK_ULL (27 ,20 )) >>20 ; cu = (*pos &GENMASK_ULL (35 ,28 )) >>28 ;
@@ -729,7 +729,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,while (size) {uint32_t value; - value = data[offset++]; + value = data[result >>2 ]; r =put_user (value, (uint32_t *)buf);if (r) { result = r;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -0
@@ -419,6 +419,7 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,dc_link_remove_remote_sink (aconnector->dc_link, aconnector->dc_sink);dc_sink_release (aconnector->dc_sink); aconnector->dc_sink =NULL ; + aconnector->dc_link->cur_link_settings.lane_count =0 ; }drm_connector_unregister (connector);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c +2 -2
@@ -684,8 +684,8 @@ static void hubbub1_det_request_size(hubbub1_get_blk256_size (&blk256_width, &blk256_height, bpe); - swath_bytes_horz_wc = height * blk256_height * bpe; - swath_bytes_vert_wc = width * blk256_width * bpe; + swath_bytes_horz_wc = width * blk256_height * bpe; + swath_bytes_vert_wc = height * blk256_width * bpe; *req128_horz_wc = (2 * swath_bytes_horz_wc <= detile_buf_size) ? false : /* full 256B request */
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +26 -20
54 lines not on this page · raw message
drivers/gpu/drm/drm_lease.c +2 -1
@@ -545,10 +545,12 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, }DRM_DEBUG_LEASE ("Creating lease\n" ); +/* lessee will take the ownership of leases */ lessee =drm_lease_create (lessor, &leases);if (IS_ERR (lessee)) { ret =PTR_ERR (lessee); +idr_destroy (&leases); goto out_leases; }
@@ -583,7 +585,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, out_leases:put_unused_fd (fd); -idr_destroy (&leases);DRM_DEBUG_LEASE ("drm_mode_create_lease_ioctl failed: %d\n" , ret);return ret;
drivers/gpu/drm/exynos/exynos_drm_dsi.c +7 -5
@@ -1722,8 +1722,9 @@ static int exynos_dsi_probe(struct platform_device *pdev) ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (dsi->supplies), dsi->supplies);if (ret) { -dev_info (dev,"failed to get regulators: %d\n" , ret); -return -EPROBE_DEFER ; +if (ret != -EPROBE_DEFER ) +dev_info (dev,"failed to get regulators: %d\n" , ret); +return ret; } dsi->clks = devm_kcalloc(dev,
@@ -1736,9 +1737,10 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->clks[i] =devm_clk_get (dev, clk_names[i]);if (IS_ERR (dsi->clks[i])) {if (strcmp (clk_names[i],"sclk_mipi" ) ==0 ) { -strcpy (clk_names[i],OLD_SCLK_MIPI_CLK_NAME ); - i--; -continue ; + dsi->clks[i] =devm_clk_get (dev, +OLD_SCLK_MIPI_CLK_NAME ); +if (!IS_ERR (dsi->clks[i])) +continue ; } dev_info(dev, "failed to get the clock: %s\n",
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +12 -6
@@ -506,10 +506,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {static int mtk_drm_crtc_init (struct drm_device *drm,struct mtk_drm_crtc *mtk_crtc, -struct drm_plane *primary, -struct drm_plane *cursor,unsigned int pipe) +unsigned int pipe) { -int ret; +struct drm_plane *primary =NULL ; +struct drm_plane *cursor =NULL ; +int i, ret; + +for (i =0 ; i < mtk_crtc->layer_nr; i++) { +if (mtk_crtc->planes[i].type ==DRM_PLANE_TYPE_PRIMARY ) + primary = &mtk_crtc->planes[i]; +else if (mtk_crtc->planes[i].type ==DRM_PLANE_TYPE_CURSOR ) + cursor = &mtk_crtc->planes[i]; + } ret =drm_crtc_init_with_planes (drm, &mtk_crtc->base, primary, cursor, &mtk_crtc_funcs,NULL );
@@ -622,9 +630,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, goto unprepare; } - ret =mtk_drm_crtc_init (drm_dev, mtk_crtc, &mtk_crtc->planes[0 ], - mtk_crtc->layer_nr >1 ? &mtk_crtc->planes[1 ] : -NULL , pipe); + ret =mtk_drm_crtc_init (drm_dev, mtk_crtc, pipe);if (ret <0 ) goto unprepare;drm_mode_crtc_set_gamma_size (&mtk_crtc->base,MTK_LUT_SIZE );
drivers/hwtracing/intel_th/msu.c +3 -3
@@ -491,7 +491,7 @@ static int msc_configure(struct msc *msc)lockdep_assert_held (&msc->buf_mutex);if (msc->mode >MSC_MODE_MULTI ) -return -ENOTSUPP ; +return -EINVAL ;if (msc->mode ==MSC_MODE_MULTI )msc_buffer_clear_hw_header (msc);
@@ -942,7 +942,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages, }else if (msc->mode ==MSC_MODE_MULTI ) { ret =msc_buffer_multi_alloc (msc, nr_pages, nr_wins); }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; }if (!ret) {
@@ -1165,7 +1165,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,if (ret >=0 ) *ppos = iter->offset; }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; } put_count:
drivers/hwtracing/intel_th/pci.c +5 -0
@@ -210,6 +210,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Elkhart Lake CPU */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x4529 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Elkhart Lake */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
drivers/iio/accel/st_accel_i2c.c +1 -1
@@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);#ifdef CONFIG_ACPI static const struct acpi_device_id st_accel_acpi_match[] = { - {"SMO8840" , (kernel_ulong_t )LNG2DM_ACCEL_DEV_NAME }, + {"SMO8840" , (kernel_ulong_t )LIS2DH12_ACCEL_DEV_NAME }, {"SMO8A90" , (kernel_ulong_t )LNG2DM_ACCEL_DEV_NAME }, { }, };
drivers/iio/adc/at91-sama5d2_adc.c +15 -0
@@ -731,6 +731,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)for_each_set_bit (bit, indio->active_scan_mask, indio->num_channels) {struct iio_chan_spec const *chan =at91_adc_chan_get (indio, bit); +u32 cor;if (!chan)continue ;
@@ -739,6 +740,20 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state) chan->type == IIO_PRESSURE)continue ; +if (state) { + cor =at91_adc_readl (st,AT91_SAMA5D2_COR ); + +if (chan->differential) + cor |= (BIT (chan->channel) | +BIT (chan->channel2)) << +AT91_SAMA5D2_COR_DIFF_OFFSET ; +else + cor &= ~(BIT (chan->channel) << +AT91_SAMA5D2_COR_DIFF_OFFSET ); + +at91_adc_writel (st,AT91_SAMA5D2_COR , cor); + } +if (state) {at91_adc_writel (st,AT91_SAMA5D2_CHER ,BIT (chan->channel));
drivers/iio/light/vcnl4000.c +4 -3
@@ -150,9 +150,10 @@ static int vcnl4200_init(struct vcnl4000_data *data) data->al_scale =24000 ; data->vcnl4200_al.reg =VCNL4200_AL_DATA ; data->vcnl4200_ps.reg =VCNL4200_PS_DATA ; -/* Integration time is 50ms, but the experiments show 54ms in total. */ - data->vcnl4200_al.sampling_rate =ktime_set (0 ,54000 *1000 ); - data->vcnl4200_ps.sampling_rate =ktime_set (0 ,4200 *1000 ); +/* Default wait time is 50ms, add 20% tolerance. */ + data->vcnl4200_al.sampling_rate =ktime_set (0 ,60000 *1000 ); +/* Default wait time is 4.8ms, add 20% tolerance. */ + data->vcnl4200_ps.sampling_rate =ktime_set (0 ,5760 *1000 ); data->vcnl4200_al.last_measurement =ktime_set (0 ,0 ); data->vcnl4200_ps.last_measurement =ktime_set (0 ,0 );mutex_init (&data->vcnl4200_al.lock);
drivers/iio/magnetometer/ak8974.c +1 -1
@@ -563,7 +563,7 @@ static int ak8974_read_raw(struct iio_dev *indio_dev,* We read all axes and discard all but one, for optimized * reading, use the triggered buffer. */ - *val =le16_to_cpu (hw_values[chan->address]); + *val = (s16 )le16_to_cpu (hw_values[chan->address]); ret =IIO_VAL_INT ; }
drivers/iio/trigger/stm32-timer-trigger.c +9 -2
@@ -161,7 +161,8 @@ static int stm32_timer_start(struct stm32_timer_trigger *priv,return 0 ; } -static void stm32_timer_stop (struct stm32_timer_trigger *priv) +static void stm32_timer_stop (struct stm32_timer_trigger *priv, +struct iio_trigger *trig) {u32 ccer, cr1;
@@ -179,6 +180,12 @@ static void stm32_timer_stop(struct stm32_timer_trigger *priv)regmap_write (priv->regmap,TIM_PSC ,0 );regmap_write (priv->regmap,TIM_ARR ,0 ); +/* Force disable master mode */ +if (stm32_timer_is_trgo2_name (trig->name)) +regmap_update_bits (priv->regmap,TIM_CR2 ,TIM_CR2_MMS2 ,0 ); +else +regmap_update_bits (priv->regmap,TIM_CR2 ,TIM_CR2_MMS ,0 ); +/* Make sure that registers are updated */ regmap_update_bits (priv->regmap,TIM_EGR ,TIM_EGR_UG ,TIM_EGR_UG ); }
@@ -197,7 +204,7 @@ static ssize_t stm32_tt_store_frequency(struct device *dev,return ret;if (freq ==0 ) { -stm32_timer_stop (priv); +stm32_timer_stop (priv, trig); }else { ret =stm32_timer_start (priv, trig, freq);if (ret)
drivers/md/dm-bio-record.h +15 -0
@@ -20,8 +20,13 @@struct dm_bio_details {struct gendisk *bi_disk;u8 bi_partno; +int __bi_remaining;unsigned long bi_flags;struct bvec_iter bi_iter; +bio_end_io_t *bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) +struct bio_integrity_payload *bi_integrity; +#endif };static inline void dm_bio_record (struct dm_bio_details *bd,struct bio *bio)
@@ -30,6 +35,11 @@ static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) bd->bi_partno = bio->bi_partno; bd->bi_flags = bio->bi_flags; bd->bi_iter = bio->bi_iter; + bd->__bi_remaining =atomic_read (&bio->__bi_remaining); + bd->bi_end_io = bio->bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) + bd->bi_integrity =bio_integrity (bio); +#endif }static inline void dm_bio_restore (struct dm_bio_details *bd,struct bio *bio)
@@ -38,6 +48,11 @@ static inline void dm_bio_restore(struct dm_bio_details *bd, struct bio *bio) bio->bi_partno = bd->bi_partno; bio->bi_flags = bd->bi_flags; bio->bi_iter = bd->bi_iter; +atomic_set (&bio->__bi_remaining, bd->__bi_remaining); + bio->bi_end_io = bd->bi_end_io; +#if defined(CONFIG_BLK_DEV_INTEGRITY ) + bio->bi_integrity = bd->bi_integrity; +#endif }#endif
drivers/md/dm-integrity.c +9 -23
@@ -6,6 +6,8 @@* This file is released under the GPL. */ +#include "dm-bio-record.h" +#include <linux/compiler.h> #include <linux/module.h> #include <linux/device-mapper.h>
@@ -276,11 +278,7 @@ struct dm_integrity_io {struct completion *completion; -struct gendisk *orig_bi_disk; -u8 orig_bi_partno; -bio_end_io_t *orig_bi_end_io; -struct bio_integrity_payload *orig_bi_integrity; -struct bvec_iter orig_bi_iter; +struct dm_bio_details bio_details; };struct journal_completion {
@@ -1249,14 +1247,9 @@ static void integrity_end_io(struct bio *bio) {struct dm_integrity_io *dio =dm_per_bio_data (bio,sizeof (struct dm_integrity_io )); - bio->bi_iter = dio->orig_bi_iter; - bio->bi_disk = dio->orig_bi_disk; - bio->bi_partno = dio->orig_bi_partno; -if (dio->orig_bi_integrity) { - bio->bi_integrity = dio->orig_bi_integrity; +dm_bio_restore (&dio->bio_details, bio); +if (bio->bi_integrity) bio->bi_opf |=REQ_INTEGRITY ; - } - bio->bi_end_io = dio->orig_bi_end_io;if (dio->completion)complete (dio->completion);
@@ -1336,7 +1329,7 @@ static void integrity_metadata(struct work_struct *w)if (!checksums) checksums = checksums_onstack; -__bio_for_each_segment (bv, bio, iter, dio->orig_bi_iter) { +__bio_for_each_segment (bv, bio, iter, dio->bio_details.bi_iter) {unsigned pos;char *mem, *checksums_ptr;
@@ -1380,7 +1373,7 @@ static void integrity_metadata(struct work_struct *w)if (likely (checksums != checksums_onstack))kfree (checksums); }else { -struct bio_integrity_payload *bip = dio->orig_bi_integrity; +struct bio_integrity_payload *bip = dio->bio_details.bi_integrity;if (bip) {struct bio_vec biv;
@@ -1784,20 +1777,13 @@ static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map }else dio->completion =NULL ; - dio->orig_bi_iter = bio->bi_iter; - - dio->orig_bi_disk = bio->bi_disk; - dio->orig_bi_partno = bio->bi_partno; +dm_bio_record (&dio->bio_details, bio);bio_set_dev (bio, ic->dev->bdev); - - dio->orig_bi_integrity =bio_integrity (bio); bio->bi_integrity =NULL ; bio->bi_opf &= ~REQ_INTEGRITY ; - - dio->orig_bi_end_io = bio->bi_end_io; bio->bi_end_io = integrity_end_io; - bio->bi_iter.bi_size = dio->range.n_sectors <<SECTOR_SHIFT ; +generic_make_request (bio);if (need_sync_io) {
drivers/misc/altera-stapl/altera.c +6 -6
@@ -2126,8 +2126,8 @@ static int altera_execute(struct altera_state *astate,return status; } -static int altera_get_note (u8 *p,s32 program_size, -s32 *offset,char *key,char *value,int length) +static int altera_get_note (u8 *p,s32 program_size,s32 *offset, +char *key,char *value,int keylen,int vallen)/* * Gets key and value of NOTE fields in the JBC file. * Can be called in two modes: if offset pointer is NULL,
@@ -2184,7 +2184,7 @@ static int altera_get_note(u8 *p, s32 program_size, &p[note_table + (8 * i) + 4])];if (value !=NULL ) -strlcpy (value, value_ptr, length); +strlcpy (value, value_ptr, vallen); } }
@@ -2203,13 +2203,13 @@ static int altera_get_note(u8 *p, s32 program_size,strlcpy (key, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i)])], - length); + keylen);if (value !=NULL )strlcpy (value, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i) +4 ])], - length); + vallen); *offset = i +1 ; }
@@ -2463,7 +2463,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw) __func__, (format_version ==2 ) ?"Jam STAPL" : "pre-standardized Jam 1.1");while (altera_get_note ((u8 *)fw->data, fw->size, - &offset, key, value,256 ) ==0 ) + &offset, key, value,32 ,256 ) ==0 )printk (KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n" , __func__, key, value); }
drivers/misc/cardreader/rts5227.c +1 -1
@@ -369,6 +369,6 @@ static const struct pcr_ops rts522a_pcr_ops = {void rts522a_init_params (struct rtsx_pcr *pcr) {rts5227_init_params (pcr); - + pcr->tx_initial_phase =SET_CLOCK_PHASE (20 ,20 ,11 ); pcr->reg_pm_ctrl3 =RTS522A_PM_CTRL3 ; }
drivers/misc/cardreader/rts5249.c +2 -0
@@ -623,6 +623,7 @@ static const struct pcr_ops rts524a_pcr_ops = {void rts524a_init_params (struct rtsx_pcr *pcr) {rts5249_init_params (pcr); + pcr->tx_initial_phase =SET_CLOCK_PHASE (27 ,29 ,11 ); pcr->option.ltr_l1off_sspwrgate =LTR_L1OFF_SSPWRGATE_5250_DEF ; pcr->option.ltr_l1off_snooze_sspwrgate =LTR_L1OFF_SNOOZE_SSPWRGATE_5250_DEF ;
@@ -731,6 +732,7 @@ static const struct pcr_ops rts525a_pcr_ops = {void rts525a_init_params (struct rtsx_pcr *pcr) {rts5249_init_params (pcr); + pcr->tx_initial_phase =SET_CLOCK_PHASE (25 ,29 ,11 ); pcr->option.ltr_l1off_sspwrgate =LTR_L1OFF_SSPWRGATE_5250_DEF ; pcr->option.ltr_l1off_snooze_sspwrgate =LTR_L1OFF_SNOOZE_SSPWRGATE_5250_DEF ;
drivers/misc/cardreader/rts5260.c +1 -1
@@ -712,7 +712,7 @@ void rts5260_init_params(struct rtsx_pcr *pcr) pcr->sd30_drive_sel_1v8 =CFG_DRIVER_TYPE_B ; pcr->sd30_drive_sel_3v3 =CFG_DRIVER_TYPE_B ; pcr->aspm_en =ASPM_L1_EN ; - pcr->tx_initial_phase =SET_CLOCK_PHASE (1 ,29 ,16 ); + pcr->tx_initial_phase =SET_CLOCK_PHASE (27 ,29 ,11 ); pcr->rx_initial_phase =SET_CLOCK_PHASE (24 ,6 ,5 ); pcr->ic_version =rts5260_get_ic_version (pcr);
drivers/mmc/host/rtsx_pci_sdmmc.c +8 -5
@@ -618,19 +618,22 @@ static int sd_change_phase(struct realtek_pci_sdmmc *host, u8 sample_point, bool rx) {struct rtsx_pcr *pcr = host->pcr; - +u16 SD_VP_CTL =0 ;dev_dbg (sdmmc_dev (host),"%s(%s): sample_point = %d\n" , __func__, rx ?"RX" :"TX" , sample_point);rtsx_pci_write_register (pcr,CLK_CTL ,CHANGE_CLK ,CHANGE_CLK ); -if (rx) +if (rx) { +SD_VP_CTL =SD_VPRX_CTL ;rtsx_pci_write_register (pcr,SD_VPRX_CTL ,PHASE_SELECT_MASK , sample_point); -else + }else { +SD_VP_CTL =SD_VPTX_CTL ;rtsx_pci_write_register (pcr,SD_VPTX_CTL ,PHASE_SELECT_MASK , sample_point); -rtsx_pci_write_register (pcr,SD_VPCLK0_CTL ,PHASE_NOT_RESET ,0 ); -rtsx_pci_write_register (pcr,SD_VPCLK0_CTL ,PHASE_NOT_RESET , + } +rtsx_pci_write_register (pcr,SD_VP_CTL ,PHASE_NOT_RESET ,0 ); +rtsx_pci_write_register (pcr,SD_VP_CTL ,PHASE_NOT_RESET ,PHASE_NOT_RESET );rtsx_pci_write_register (pcr,CLK_CTL ,CHANGE_CLK ,0 );rtsx_pci_write_register (pcr,SD_CFG1 ,SD_ASYNC_FIFO_NOT_RST ,0 );
drivers/mmc/host/sdhci-of-at91.c +6 -2
@@ -126,7 +126,8 @@ static void sdhci_at91_reset(struct sdhci_host *host, u8 mask) {sdhci_reset (host, mask); -if (host->mmc->caps &MMC_CAP_NONREMOVABLE ) +if ((host->mmc->caps &MMC_CAP_NONREMOVABLE ) + ||mmc_gpio_get_cd (host->mmc) >=0 )sdhci_at91_set_force_card_detect (host); }
@@ -405,8 +406,11 @@ static int sdhci_at91_probe(struct platform_device *pdev)* detection procedure using the SDMCC_CD signal is bypassed. * This bit is reset when a software reset for all command is performed * so we need to implement our own reset function to set back this bit. +* +* WA: SAMA5D2 doesn't drive CMD if using CD GPIO line. */ -if (host->mmc->caps &MMC_CAP_NONREMOVABLE ) +if ((host->mmc->caps &MMC_CAP_NONREMOVABLE ) + ||mmc_gpio_get_cd (host->mmc) >=0 )sdhci_at91_set_force_card_detect (host);pm_runtime_put_autosuspend (&pdev->dev);
drivers/net/vrf.c +10 -9
@@ -993,23 +993,24 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, struct sk_buff *skb) {int orig_iif = skb->skb_iif; -bool need_strict =rt6_need_strict (&ipv6_hdr (skb)->daddr); -bool is_ndisc =ipv6_ndisc_frame (skb); +bool need_strict; -/* loopback, multicast & non-ND link-local traffic; do not push through -* packet taps again. Reset pkt_type for upper layers to process skb +/* loopback traffic; do not push through packet taps again. +* Reset pkt_type for upper layers to process skb */ -if (skb->pkt_type ==PACKET_LOOPBACK || (need_strict && !is_ndisc)) { +if (skb->pkt_type ==PACKET_LOOPBACK ) { skb->dev = vrf_dev; skb->skb_iif = vrf_dev->ifindex;IP6CB (skb)->flags |=IP6SKB_L3SLAVE ; -if (skb->pkt_type ==PACKET_LOOPBACK ) - skb->pkt_type =PACKET_HOST ; + skb->pkt_type =PACKET_HOST ; goto out; } -/* if packet is NDISC then keep the ingress interface */ -if (!is_ndisc) { +/* if packet is NDISC or addressed to multicast or link-local +* then keep the ingress interface +*/ + need_strict =rt6_need_strict (&ipv6_hdr (skb)->daddr); +if (!ipv6_ndisc_frame (skb) && !need_strict) {vrf_rx_stats (vrf_dev, skb->len); skb->dev = vrf_dev; skb->skb_iif = vrf_dev->ifindex;
drivers/perf/arm_pmu_acpi.c +2 -5
@@ -27,8 +27,6 @@ static int arm_pmu_acpi_register_irq(int cpu)int gsi, trigger; gicc =acpi_cpu_get_madt_gicc (cpu); -if (WARN_ON (!gicc)) -return -EINVAL ; gsi = gicc->performance_interrupt;
@@ -67,11 +65,10 @@ static void arm_pmu_acpi_unregister_irq(int cpu)int gsi; gicc =acpi_cpu_get_madt_gicc (cpu); -if (!gicc) -return ; gsi = gicc->performance_interrupt; -acpi_unregister_gsi (gsi); +if (gsi) +acpi_unregister_gsi (gsi); }static int arm_pmu_acpi_parse_irqs (void )
drivers/rtc/Kconfig +1 -0
@@ -314,6 +314,7 @@ config RTC_DRV_MAX6900 config RTC_DRV_MAX8907 tristate "Maxim MAX8907" depends on MFD_MAX8907 || COMPILE_TEST + select REGMAP_IRQ help If you say yes here you will get support for the RTC of Maxim MAX8907 PMIC.
drivers/spi/spi-pxa2xx.c +23 -0
@@ -76,6 +76,10 @@ MODULE_ALIAS("platform:pxa2xx-spi");#define LPSS_CAPS_CS_EN_SHIFT 9#define LPSS_CAPS_CS_EN_MASK (0xf << LPSS_CAPS_CS_EN_SHIFT) +#define LPSS_PRIV_CLOCK_GATE 0x38 +#define LPSS_PRIV_CLOCK_GATE_CLK_CTL_MASK 0x3 +#define LPSS_PRIV_CLOCK_GATE_CLK_CTL_FORCE_ON 0x3 +struct lpss_config {/* LPSS offset from drv_data->ioaddr */ unsigned offset;
@@ -92,6 +96,8 @@ struct lpss_config {unsigned cs_sel_shift;unsigned cs_sel_mask;unsigned cs_num; +/* Quirks */ + unsigned cs_clk_stays_gated : 1; };/* Keep these sorted with enum pxa_ssp_type */
@@ -162,6 +168,7 @@ static const struct lpss_config lpss_platforms[] = { .tx_threshold_hi = 56, .cs_sel_shift = 8, .cs_sel_mask = 3 << 8, + .cs_clk_stays_gated = true, }, };
@@ -389,6 +396,22 @@ static void lpss_ssp_cs_control(struct spi_device *spi, bool enable)else value |=LPSS_CS_CONTROL_CS_HIGH ;__lpss_ssp_write_priv (drv_data, config->reg_cs_ctrl, value); +if (config->cs_clk_stays_gated) { +u32 clkgate; + +/* +* Changing CS alone when dynamic clock gating is on won't +* actually flip CS at that time. This ruins SPI transfers +* that specify delays, or have no data. Toggle the clock mode +* to force on briefly to poke the CS pin to move. +*/ + clkgate =__lpss_ssp_read_priv (drv_data,LPSS_PRIV_CLOCK_GATE ); + value = (clkgate & ~LPSS_PRIV_CLOCK_GATE_CLK_CTL_MASK ) | +LPSS_PRIV_CLOCK_GATE_CLK_CTL_FORCE_ON ; + +__lpss_ssp_write_priv (drv_data,LPSS_PRIV_CLOCK_GATE , value); +__lpss_ssp_write_priv (drv_data,LPSS_PRIV_CLOCK_GATE , clkgate); + } }static void cs_assert (struct spi_device *spi)
drivers/spi/spi-qup.c +7 -4
@@ -1190,6 +1190,11 @@ static int spi_qup_suspend(struct device *device)struct spi_qup *controller =spi_master_get_devdata (master);int ret; +if (pm_runtime_suspended (device)) { + ret =spi_qup_pm_resume_runtime (device); +if (ret) +return ret; + } ret =spi_master_suspend (master);if (ret)return ret;
@@ -1198,10 +1203,8 @@ static int spi_qup_suspend(struct device *device)if (ret)return ret; -if (!pm_runtime_suspended (device)) { -clk_disable_unprepare (controller->cclk); -clk_disable_unprepare (controller->iclk); - } +clk_disable_unprepare (controller->cclk); +clk_disable_unprepare (controller->iclk);return 0 ; }
drivers/spi/spi-zynqmp-gqspi.c +0 -3
@@ -403,9 +403,6 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high)zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST , genfifoentry); -/* Dummy generic FIFO entry */ -zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST ,0x0 ); -/* Manually start the generic FIFO command */ zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST, zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
drivers/staging/greybus/tools/loopback_test.c +11 -10
@@ -21,6 +21,7 @@#include <signal.h> #define MAX_NUM_DEVICES 10 +#define MAX_SYSFS_PREFIX 0x80#define MAX_SYSFS_PATH 0x200#define CSV_MAX_LINE 0x1000#define SYSFS_MAX_INT 0x20
@@ -69,7 +70,7 @@ struct loopback_results { };struct loopback_device { -char name[MAX_SYSFS_PATH ]; +char name[MAX_STR_LEN ];char sysfs_entry[MAX_SYSFS_PATH ];char debugfs_entry[MAX_SYSFS_PATH ];struct loopback_results results;
@@ -95,8 +96,8 @@ struct loopback_test {int stop_all;int poll_count;char test_name[MAX_STR_LEN ]; -char sysfs_prefix[MAX_SYSFS_PATH ]; -char debugfs_prefix[MAX_SYSFS_PATH ]; +char sysfs_prefix[MAX_SYSFS_PREFIX ]; +char debugfs_prefix[MAX_SYSFS_PREFIX ];struct timespec poll_timeout;struct loopback_device devices[MAX_NUM_DEVICES ];struct loopback_results aggregate_results;
@@ -645,7 +646,7 @@ int find_loopback_devices(struct loopback_test *t)static int open_poll_files (struct loopback_test *t) {struct loopback_device *dev; -char buf[MAX_STR_LEN ]; +char buf[MAX_SYSFS_PATH +MAX_STR_LEN ];char dummy;int fds_idx =0 ;int i;
@@ -663,7 +664,7 @@ static int open_poll_files(struct loopback_test *t) goto err; }read (t->fds[fds_idx].fd, &dummy,1 ); - t->fds[fds_idx].events =EPOLLERR |EPOLLPRI ; + t->fds[fds_idx].events =POLLERR |POLLPRI ; t->fds[fds_idx].revents =0 ; fds_idx++; }
@@ -756,7 +757,7 @@ static int wait_for_complete(struct loopback_test *t) }for (i =0 ; i < t->poll_count; i++) { -if (t->fds[i].revents &EPOLLPRI ) { +if (t->fds[i].revents &POLLPRI ) {/* Dummy read to clear the event */ read (t->fds[i].fd, &dummy,1 ); number_of_events++;
@@ -915,10 +916,10 @@ int main(int argc, char *argv[]) t.iteration_max =atoi (optarg);break ;case 'S' : -snprintf (t.sysfs_prefix,MAX_SYSFS_PATH ,"%s" , optarg); +snprintf (t.sysfs_prefix,MAX_SYSFS_PREFIX ,"%s" , optarg);break ;case 'D' : -snprintf (t.debugfs_prefix,MAX_SYSFS_PATH ,"%s" , optarg); +snprintf (t.debugfs_prefix,MAX_SYSFS_PREFIX ,"%s" , optarg);break ;case 'm' : t.mask =atol (optarg);
@@ -969,10 +970,10 @@ int main(int argc, char *argv[]) }if (!strcmp (t.sysfs_prefix,"" )) -snprintf (t.sysfs_prefix,MAX_SYSFS_PATH ,"%s" , sysfs_prefix); +snprintf (t.sysfs_prefix,MAX_SYSFS_PREFIX ,"%s" , sysfs_prefix);if (!strcmp (t.debugfs_prefix,"" )) -snprintf (t.debugfs_prefix,MAX_SYSFS_PATH ,"%s" , debugfs_prefix); +snprintf (t.debugfs_prefix,MAX_SYSFS_PREFIX ,"%s" , debugfs_prefix); ret =find_loopback_devices (&t);if (ret)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -0
@@ -38,6 +38,7 @@ static const struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ {USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */ + {USB_DEVICE(0x2C4E, 0x0102)}, /* MERCUSYS MW150US v2 */ {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ {} /* Terminating entry */
drivers/staging/speakup/main.c +1 -1
@@ -561,7 +561,7 @@ static u_long get_word(struct vc_data *vc)return 0 ; }else if (tmpx < vc->vc_cols -2 && (ch ==SPACE || ch ==0 || (ch <0x100 &&IS_WDLM (ch))) && -get_char (vc, (u_short *)&tmp_pos +1 , &temp) >SPACE ) { +get_char (vc, (u_short *)tmp_pos +1 , &temp) >SPACE ) { tmp_pos +=2 ; tmpx++; }else {
drivers/usb/class/cdc-acm.c +21 -13
@@ -914,10 +914,10 @@ static int get_serial_info(struct acm *acm, struct serial_struct __user *info)memset (&tmp,0 ,sizeof (tmp)); tmp.xmit_fifo_size = acm->writesize; tmp.baud_base =le32_to_cpu (acm->line.dwDTERate); - tmp.close_delay = acm->port.close_delay /10 ; + tmp.close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; tmp.closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ?ASYNC_CLOSING_WAIT_NONE : - acm->port.closing_wait /10 ; +jiffies_to_msecs (acm->port.closing_wait) /10 ;if (copy_to_user (info, &tmp,sizeof (tmp)))return -EFAULT ;
@@ -930,27 +930,35 @@ static int set_serial_info(struct acm *acm, {struct serial_struct new_serial;unsigned int closing_wait, close_delay; +unsigned int old_closing_wait, old_close_delay;int retval =0 ;if (copy_from_user (&new_serial, newinfo,sizeof (new_serial)))return -EFAULT ; - close_delay = new_serial.close_delay *10 ; + close_delay =msecs_to_jiffies (new_serial.close_delay *10 ); closing_wait = new_serial.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : new_serial.closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (new_serial.closing_wait *10 ); + +/* we must redo the rounding here, so that the values match */ + old_close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; + old_closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? +ASYNC_CLOSING_WAIT_NONE : +jiffies_to_msecs (acm->port.closing_wait) /10 ;mutex_lock (&acm->port.mutex); -if (!capable (CAP_SYS_ADMIN )) { -if ((close_delay != acm->port.close_delay) || - (closing_wait != acm->port.closing_wait)) +if ((new_serial.close_delay != old_close_delay) || + (new_serial.closing_wait != old_closing_wait)) { +if (!capable (CAP_SYS_ADMIN )) retval = -EPERM ; -else - retval = -EOPNOTSUPP ; - }else { - acm->port.close_delay = close_delay; - acm->port.closing_wait = closing_wait; - } +else { + acm->port.close_delay = close_delay; + acm->port.closing_wait = closing_wait; + } + }else + retval = -EOPNOTSUPP ;mutex_unlock (&acm->port.mutex);return retval;
drivers/usb/core/quirks.c +6 -0
@@ -378,6 +378,12 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0b05, 0x17e0), .driver_info = USB_QUIRK_IGNORE_REMOTE_WAKEUP }, + /* Realtek hub in Dell WD19 (Type-C) */ + { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, + + /* Generic RTL8153 based ethernet adapters */ + { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM }, + /* Action Semiconductor flash disk */ { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255 },
drivers/usb/host/xhci-pci.c +2 -1
@@ -128,7 +128,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |=XHCI_AMD_PLL_FIX ;if (pdev->vendor ==PCI_VENDOR_ID_AMD && - (pdev->device ==0x15e0 || + (pdev->device ==0x145c || + pdev->device ==0x15e0 || pdev->device ==0x15e1 || pdev->device ==0x43bb )) xhci->quirks |=XHCI_SUSPEND_DELAY ;
drivers/usb/host/xhci-plat.c +1 -0
@@ -443,6 +443,7 @@ MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, + .shutdown = usb_hcd_platform_shutdown, .driver = { .name ="xhci-hcd" , .pm = &xhci_plat_pm_ops,
drivers/usb/host/xhci-trace.h +6 -17
@@ -289,23 +289,12 @@ DECLARE_EVENT_CLASS(xhci_log_urb, ),TP_printk ("ep%d%s-%s: urb %p pipe %u slot %d length %d/%d sgs %d/%d stream %d flags %08x" , __entry->epnum, __entry->dir_in ?"in" :"out" , - ({char *s; -switch (__entry->type) { -case USB_ENDPOINT_XFER_INT : - s ="intr" ; -break ; -case USB_ENDPOINT_XFER_CONTROL : - s ="control" ; -break ; -case USB_ENDPOINT_XFER_BULK : - s ="bulk" ; -break ; -case USB_ENDPOINT_XFER_ISOC : - s ="isoc" ; -break ; -default : - s ="UNKNOWN" ; - } s; }), __entry->urb, __entry->pipe, __entry->slot_id, +__print_symbolic (__entry->type, + { USB_ENDPOINT_XFER_INT, "intr" }, + { USB_ENDPOINT_XFER_CONTROL, "control" }, + { USB_ENDPOINT_XFER_BULK, "bulk" }, + { USB_ENDPOINT_XFER_ISOC, "isoc" }), + __entry->urb, __entry->pipe, __entry->slot_id, __entry->actual, __entry->length, __entry->num_mapped_sgs, __entry->num_sgs, __entry->stream, __entry->flags )
drivers/usb/serial/option.c +2 -0
@@ -1183,6 +1183,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110a, 0xff), /* Telit ME910G1 */ .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110b, 0xff), /* Telit ME910G1 (ECM) */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
drivers/usb/serial/pl2303.c +1 -0
@@ -93,6 +93,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +1 -0
@@ -124,6 +124,7 @@#define HP_LM920_PRODUCT_ID 0x026b#define HP_TD620_PRODUCT_ID 0x0956#define HP_LD960_PRODUCT_ID 0x0b39 +#define HP_LD381_PRODUCT_ID 0x0f7f#define HP_LCM220_PRODUCT_ID 0x3139#define HP_LCM960_PRODUCT_ID 0x3239#define HP_LD220_PRODUCT_ID 0x3524
drivers/xen/xenbus/xenbus_comms.c +4 -0
@@ -313,6 +313,8 @@ static int process_msg(void) req->msg.type = state.msg.type; req->msg.len = state.msg.len; req->body = state.body; +/* write body, then update state */ +virt_wmb (); req->state = xb_req_state_got_reply; req->cb (req); }else
@@ -395,6 +397,8 @@ static int process_writes(void)if (state.req->state == xb_req_state_aborted)kfree (state.req);else { +/* write err, then update state */ +virt_wmb (); state.req->state = xb_req_state_got_reply;wake_up (&state.req->wq); }
drivers/xen/xenbus/xenbus_xs.c +6 -3
@@ -191,8 +191,11 @@ static bool xenbus_ok(void)static bool test_reply (struct xb_req_data *req) { -if (req->state == xb_req_state_got_reply || !xenbus_ok ()) +if (req->state == xb_req_state_got_reply || !xenbus_ok ()) { +/* read req->state before all other fields */ +virt_rmb ();return true; + }/* Make sure to reread req->state each time. */ barrier ();
@@ -202,7 +205,7 @@ static bool test_reply(struct xb_req_data *req)static void *read_reply (struct xb_req_data *req) { -while (req->state != xb_req_state_got_reply) { + do { wait_event(req->wq, test_reply(req)); if (!xenbus_ok())
@@ -216,7 +219,7 @@ static void *read_reply(struct xb_req_data *req)if (req->err)return ERR_PTR (req->err); - } + }while (req->state != xb_req_state_got_reply);return req->body; }
fs/btrfs/inode.c +4 -0
@@ -10015,6 +10015,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, ret =btrfs_sync_log (trans,BTRFS_I (old_inode)->root, &ctx);if (ret) commit_transaction = true; + }else if (sync_log) { +mutex_lock (&root->log_mutex); +list_del (&ctx.list); +mutex_unlock (&root->log_mutex); }if (commit_transaction) { ret =btrfs_commit_transaction (trans);
fs/inode.c +1 -0
@@ -136,6 +136,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_sb = sb; inode->i_blkbits = sb->s_blocksize_bits; inode->i_flags =0 ; +atomic64_set (&inode->i_sequence,0 );atomic_set (&inode->i_count,1 ); inode->i_op = &empty_iops; inode->i_fop = &no_open_fops;
include/linux/fs.h +1 -0
@@ -663,6 +663,7 @@ struct inode {struct rcu_head i_rcu; };atomic64_t i_version; +atomic64_t i_sequence;/* see futex */ atomic_t i_count;atomic_t i_dio_count;atomic_t i_writecount;
include/linux/futex.h +10 -7
@@ -29,23 +29,26 @@ struct task_struct;union futex_key {struct { +u64 i_seq;unsigned long pgoff; -struct inode *inode; -int offset; +unsigned int offset; } shared;struct { +union { +struct mm_struct *mm; +u64 __tmp; + };unsigned long address; -struct mm_struct *mm; -int offset; +unsigned int offset; } private;struct { +u64 ptr;unsigned long word; -void *ptr; -int offset; +unsigned int offset; } both; }; -#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } } +#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = 0ULL } }#ifdef CONFIG_FUTEX extern void exit_robust_list (struct task_struct *curr);
include/linux/page-flags.h +1 -1
@@ -271,7 +271,7 @@ static inline int TestClearPage##uname(struct page *page) { return 0; } __PAGEFLAG(Locked, locked, PF_NO_TAIL) PAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) __CLEARPAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) -PAGEFLAG(Error, error, PF_NO_COMPOUND) TESTCLEARFLAG(Error, error, PF_NO_COMPOUND) +PAGEFLAG(Error, error, PF_NO_TAIL) TESTCLEARFLAG(Error, error, PF_NO_TAIL) PAGEFLAG(Referenced, referenced, PF_HEAD) TESTCLEARFLAG(Referenced, referenced, PF_HEAD)__SETPAGEFLAG (Referenced, referenced,PF_HEAD )
include/linux/vmalloc.h +3 -2
@@ -107,8 +107,9 @@ extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,extern int remap_vmalloc_range (struct vm_area_struct *vma,void *addr,unsigned long pgoff); -void vmalloc_sync_all (void ); - +void vmalloc_sync_mappings (void ); +void vmalloc_sync_unmappings (void ); +/* * Lowlevel-APIs (not for driver use!) */
kernel/futex.c +55 -38
141 lines not on this page · raw message
kernel/notifier.c +1 -1
@@ -552,7 +552,7 @@ NOKPROBE_SYMBOL(notify_die);int register_die_notifier (struct notifier_block *nb) { -vmalloc_sync_all (); +vmalloc_sync_mappings ();return atomic_notifier_chain_register (&die_chain, nb); }EXPORT_SYMBOL_GPL (register_die_notifier);
mm/memcontrol.c +8 -2
@@ -3759,7 +3759,7 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,struct mem_cgroup_thresholds *thresholds;struct mem_cgroup_threshold_ary *new;unsigned long usage; -int i, j, size; +int i, j, size, entries;mutex_lock (&memcg->thresholds_lock);
@@ -3779,14 +3779,20 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,__mem_cgroup_threshold (memcg, type == _MEMSWAP);/* Calculate new number of threshold */ - size =0 ; + size = entries =0 ;for (i =0 ; i < thresholds->primary->size; i++) {if (thresholds->primary->entries[i].eventfd != eventfd) size++; +else + entries++; } new = thresholds->spare; +/* If no items related to eventfd have been cleared, nothing to do */ +if (!entries) + goto unlock; +/* Set thresholds array to NULL if we don't have thresholds */ if (!size) {kfree (new);
mm/nommu.c +7 -3
@@ -446,10 +446,14 @@ void vm_unmap_aliases(void)EXPORT_SYMBOL_GPL (vm_unmap_aliases);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement a stub for vmalloc_sync_[un]mapping() if the architecture +* chose not to have one. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) +{ +} + +void __weak vmalloc_sync_unmappings (void ) { }
mm/slub.c +21 -11
@@ -1906,8 +1906,6 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node,if (node ==NUMA_NO_NODE ) searchnode =numa_mem_id (); -else if (!node_present_pages (node)) - searchnode =node_to_mem_node (node); object =get_partial_node (s,get_node (s, searchnode), c, flags);if (object || node !=NUMA_NO_NODE )
@@ -2504,17 +2502,27 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,struct page *page; page = c->page; -if (!page) +if (!page) { +/* +* if the node is not online or has no normal memory, just +* ignore the node constraint +*/ +if (unlikely (node !=NUMA_NO_NODE && + !node_state (node,N_NORMAL_MEMORY ))) + node =NUMA_NO_NODE ; goto new_slab; + } redo:if (unlikely (!node_match (page, node))) { -int searchnode = node; - -if (node !=NUMA_NO_NODE && !node_present_pages (node)) - searchnode =node_to_mem_node (node); - -if (unlikely (!node_match (page, searchnode))) { +/* +* same as above but node_match() being false already +* implies node != NUMA_NO_NODE +*/ +if (!node_state (node,N_NORMAL_MEMORY )) { + node =NUMA_NO_NODE ; + goto redo; + }else {stat (s,ALLOC_NODE_MISMATCH );deactivate_slab (s, page, c->freelist, c); goto new_slab;
@@ -2926,11 +2934,13 @@ static __always_inline void do_slab_free(struct kmem_cache *s,barrier ();if (likely (page == c->page)) { -set_freepointer (s, tail_obj, c->freelist); +void **freelist =READ_ONCE (c->freelist); + +set_freepointer (s, tail_obj, freelist);if (unlikely (!this_cpu_cmpxchg_double ( s->cpu_slab->freelist, s->cpu_slab->tid, - c->freelist, tid, + freelist, tid, head,next_tid (tid)))) {note_cmpxchg_failure ("slab_free" , s, tid);
mm/vmalloc.c +7 -4
@@ -1755,7 +1755,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,* First make sure the mappings are removed from all page-tables * before they are freed. */ -vmalloc_sync_all (); +vmalloc_sync_unmappings ();/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED
@@ -2300,16 +2300,19 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,EXPORT_SYMBOL (remap_vmalloc_range);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement stubs for vmalloc_sync_[un]mappings () if the architecture chose +* not to have one. * * The purpose of this function is to make sure the vmalloc area * mappings are identical in all page-tables in the system. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) { } +void __weak vmalloc_sync_unmappings (void ) +{ +}static int f (pte_t *pte,pgtable_t table,unsigned long addr,void *data) {
net/ipv6/tcp_ipv6.c +1 -2
@@ -734,7 +734,6 @@ static void tcp_v6_init_req(struct request_sock *req,const struct sock *sk_listener, struct sk_buff *skb) { - bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); struct inet_request_sock *ireq = inet_rsk(req);const struct ipv6_pinfo *np =inet6_sk (sk_listener);
@@ -742,7 +741,7 @@ static void tcp_v6_init_req(struct request_sock *req, ireq->ir_v6_loc_addr =ipv6_hdr (skb)->daddr;/* So that link locals have meaning */ -if ((!sk_listener->sk_bound_dev_if || l3_slave) && +if (!sk_listener->sk_bound_dev_if &&ipv6_addr_type (&ireq->ir_v6_rmt_addr) &IPV6_ADDR_LINKLOCAL ) ireq->ir_iif =tcp_v6_iif (skb);
scripts/Makefile.extrawarn +1 -0
@@ -72,5 +72,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) endif endif
scripts/parse-maintainers.pl +0 -0
sound/core/oss/pcm_plugin.c +10 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -209,6 +209,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pif (stream ==SNDRV_PCM_STREAM_PLAYBACK ) { plugin =snd_pcm_plug_last (plug);while (plugin && drv_frames >0 ) { +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) drv_frames = plugin->src_frames (plugin, drv_frames);
@@ -220,6 +222,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_p plugin_next = plugin->next;if (plugin->dst_frames) drv_frames = plugin->dst_frames (plugin, drv_frames); +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin = plugin_next; } }else
@@ -248,11 +252,15 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pcif (frames <0 )return frames; } +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin = plugin_next; } }else if (stream ==SNDRV_PCM_STREAM_CAPTURE ) { plugin =snd_pcm_plug_last (plug);while (plugin) { +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) { frames = plugin->src_frames (plugin, frames);
sound/core/seq/oss/seq_oss_midi.c +1 -0
@@ -615,6 +615,7 @@ send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq len =snd_seq_oss_timer_start (dp->timer);if (ev->type ==SNDRV_SEQ_EVENT_SYSEX ) {snd_seq_oss_readq_sysex (dp->readq, mdev->seq_device, ev); +snd_midi_event_reset_decode (mdev->coder); }else { len =snd_midi_event_decode (mdev->coder, msg,sizeof (msg), ev);if (len >0 )
sound/core/seq/seq_virmidi.c +1 -0
@@ -95,6 +95,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,if ((ev->flags &SNDRV_SEQ_EVENT_LENGTH_MASK ) !=SNDRV_SEQ_EVENT_LENGTH_VARIABLE )continue ;snd_seq_dump_var_event (ev, (snd_seq_dump_func_t )snd_rawmidi_receive, vmidi->substream); +snd_midi_event_reset_decode (vmidi->parser); }else { len =snd_midi_event_decode (vmidi->parser, msg,sizeof (msg), ev);if (len >0 )
sound/pci/hda/patch_realtek.c +2 -0
@@ -7828,6 +7828,8 @@ static int patch_alc269(struct hda_codec *codec) spec->gen.mixer_nid =0 ;break ;case 0x10ec0225 : + codec->power_save_node =1 ; +/* fall through */ case 0x10ec0295 :case 0x10ec0299 : spec->codec_variant =ALC269_TYPE_ALC225 ;
sound/usb/line6/driver.c +1 -1
@@ -320,7 +320,7 @@ static void line6_data_received(struct urb *urb)line6_midibuf_read (mb, line6->buffer_message,LINE6_MIDI_MESSAGE_MAXLEN ); -if (done ==0 ) +if (done <=0 )break ; line6->message_length = done;
sound/usb/line6/midibuf.c +1 -1
@@ -163,7 +163,7 @@ int line6_midibuf_read(struct midi_buffer *this, unsigned char *data,int midi_length_prev =midibuf_message_length (this->command_prev); -if (midi_length_prev >0 ) { +if (midi_length_prev >1 ) { midi_length = midi_length_prev -1 ; repeat =1 ; }else