Linux 4.9.22
Greg KH
maintainerI'm announcing the release of the 4.9.22 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/arm/arch_timer.txt | 5 Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 8 Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 Documentation/devicetree/bindings/watchdog/samsung-wdt.txt | 9 Documentation/kernel-parameters.txt | 10 Documentation/stable_kernel_rules.txt | 2 Makefile | 4 arch/arm/boot/dts/stih407-family.dtsi | 1 arch/arm/kernel/armksyms.c | 4 arch/arm/kernel/smccc-call.S | 14 arch/arm/kvm/mmu.c | 23 arch/arm/mach-davinci/da8xx-dt.c | 1 arch/arm64/boot/dts/hisilicon/hip06.dtsi | 2 arch/arm64/kernel/arm64ksyms.c | 4 arch/arm64/kernel/asm-offsets.c | 7 arch/arm64/kernel/pci.c | 28 arch/arm64/kernel/smccc-call.S | 23 arch/arm64/mm/fault.c | 42 - arch/metag/include/asm/uaccess.h | 15 arch/metag/lib/usercopy.c | 312 +++------- arch/mips/Kconfig | 2 arch/mips/include/asm/spinlock.h | 8 arch/mips/kernel/cpu-probe.c | 2 arch/mips/kernel/genex.S | 4 arch/mips/kernel/traps.c | 17 arch/mips/lantiq/xway/sysctrl.c | 2 arch/mips/mm/c-r4k.c | 2 arch/mips/mm/tlbex.c | 25 arch/mips/ralink/rt3883.c | 4 arch/nios2/kernel/prom.c | 7 arch/nios2/kernel/setup.c | 3 arch/powerpc/crypto/crc32c-vpmsum_glue.c | 3 arch/powerpc/kernel/align.c | 27 arch/powerpc/kernel/misc_64.S | 4 arch/powerpc/kernel/setup_64.c | 9 arch/powerpc/mm/hash_native_64.c | 7 arch/s390/boot/compressed/misc.c | 35 - arch/s390/include/asm/uaccess.h | 2 arch/x86/kernel/reboot.c | 16 arch/xtensa/include/asm/page.h | 13 drivers/acpi/button.c | 2 drivers/acpi/internal.h | 1 drivers/acpi/scan.c | 1 drivers/acpi/sleep.c | 19 drivers/acpi/sysfs.c | 56 + drivers/ata/ahci_da850.c | 33 + drivers/char/ppdev.c | 33 - drivers/char/random.c | 84 +- drivers/clk/nxp/clk-lpc32xx.c | 32 - drivers/clocksource/arm_arch_timer.c | 9 drivers/firmware/qcom_scm-64.c | 13 drivers/gpio/gpiolib-acpi.c | 4 drivers/gpu/drm/drm_edid.c | 6 drivers/gpu/drm/i915/i915_pci.c | 1 drivers/gpu/drm/mga/mga_dma.c | 20 drivers/gpu/drm/mga/mga_drv.c | 37 - drivers/gpu/drm/msm/adreno/adreno_device.c | 3 drivers/gpu/drm/msm/adreno/adreno_gpu.h | 3 drivers/gpu/drm/sun4i/sun4i_backend.c | 1 drivers/gpu/drm/sun4i/sun4i_drv.c | 5 drivers/gpu/drm/sun4i/sun4i_tcon.c | 43 - drivers/gpu/drm/sun4i/sun4i_tcon.h | 11 drivers/gpu/drm/ttm/ttm_object.c | 10 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 79 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 31 drivers/hid/hid-core.c | 2 drivers/hid/hid-ids.h | 15 drivers/hid/hid-microsoft.c | 2 drivers/hid/hid-multitouch.c | 80 +- drivers/hid/hid-sensor-hub.c | 6 drivers/hid/i2c-hid/i2c-hid.c | 57 + drivers/hid/usbhid/hid-quirks.c | 5 drivers/hid/wacom_wac.c | 3 drivers/idle/intel_idle.c | 49 + drivers/iio/gyro/bmg160_core.c | 12 drivers/input/keyboard/gpio_keys.c | 37 - drivers/md/dm-raid.c | 2 drivers/md/dm-verity-fec.c | 18 drivers/md/dm-verity-fec.h | 4 drivers/mmc/host/sdhci-msm.c | 4 drivers/mmc/host/sdhci-of-esdhc.c | 18 drivers/net/ethernet/mellanox/mlx4/main.c | 84 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 8 drivers/nvme/host/core.c | 17 drivers/nvme/host/nvme.h | 1 drivers/pci/host/pci-thunder-pem.c | 50 - drivers/pci/quirks.c | 101 ++- drivers/platform/x86/acer-wmi.c | 56 + drivers/platform/x86/asus-nb-wmi.c | 13 drivers/platform/x86/asus-wmi.c | 52 + drivers/platform/x86/asus-wmi.h | 1 drivers/scsi/ufs/ufs-qcom.c | 30 drivers/scsi/ufs/ufs-qcom.h | 1 drivers/scsi/ufs/ufs_quirks.h | 35 - drivers/scsi/ufs/ufshcd.c | 154 ++++ drivers/scsi/ufs/ufshcd.h | 15 drivers/scsi/ufs/unipro.h | 4 drivers/staging/android/ashmem.c | 1 drivers/tty/serial/8250/8250_omap.c | 9 drivers/usb/chipidea/ci_hdrc_msm.c | 4 drivers/usb/dwc3/gadget.c | 21 drivers/usb/dwc3/host.c | 21 drivers/usb/host/xhci-hub.c | 6 drivers/usb/host/xhci-plat.c | 3 drivers/usb/host/xhci.h | 3 drivers/usb/storage/unusual_devs.h | 14 drivers/watchdog/s3c2410_wdt.c | 21 fs/cifs/smb2pdu.c | 4 fs/orangefs/super.c | 9 fs/sysfs/file.c | 6 fs/xfs/xfs_bmap_util.c | 10 include/drm/i915_pciids.h | 11 include/drm/ttm/ttm_object.h | 5 include/linux/arm-smccc.h | 52 + include/linux/pci_ids.h | 2 include/linux/random.h | 1 init/main.c | 1 kernel/ptrace.c | 14 kernel/trace/ring_buffer.c | 8 mm/mempolicy.c | 20 mm/page_alloc.c | 2 net/mac80211/iface.c | 3 net/sunrpc/auth_gss/svcauth_gss.c | 2 net/sunrpc/svc.c | 14 net/wireless/sysfs.c | 10 sound/soc/codecs/rt5670.c | 2 sound/soc/intel/atom/sst/sst_acpi.c | 37 + sound/soc/intel/boards/bytcr_rt5640.c | 21 sound/soc/intel/boards/cht_bsw_rt5645.c | 98 ++- sound/soc/sunxi/sun4i-i2s.c | 57 + sound/usb/pcm.c | 10 sound/usb/quirks.c | 38 + 134 files changed, 1944 insertions(+), 784 deletions(-)
Alberto Aguirre (1):
ALSA: usb-audio: add implicit fb quirk for Axe-Fx II
Alex Williamson (1):
PCI: Add ACS quirk for Intel Union Point
Alex Wood (1):
HID: usbhid: Add quirk for the Futaba TOSD-5711BB VFD
Alexander Polakov (1):
mm/page_alloc.c: fix print order in show_free_areas()
Andy Gross (2):
arm: kernel: Add SMC structure parameter
firmware: qcom: scm: Fix interrupted SCM calls
Andy Shevchenko (2):
x86/intel_idle: Add CPU model 0x4a (Atom Z34xx series)
PCI: Sort the list of devices with D3 delay quirk by ID
Arend Van Spriel (2):
cfg80211: check rdev resume callback only for registered wiphy
brcmfmac: use local iftype avoiding use-after-free of virtual interface
Arnd Bergmann (1):
Kbuild: use cc-disable-warning consistently for maybe-uninitialized
Baoyou Xie (1):
drm/msm/adreno: move function declarations to header file
Bartosz Golaszewski (1):
sata: ahci-da850: implement a workaround for the softreset quirk
Benjamin Herrenschmidt (1):
powerpc: Disable HFSCR[TM] if TM is not supported
Benjamin Tissoires (4):
HID: sensor-hub add quirk for Microsoft Surface 3
HID: sensor-hub: add quirk for Microchip MM7150
HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
HID: multitouch: do not retrieve all reports for all devices
Bjorn Helgaas (4):
net/mlx4_core: Use device ID defines
arm64: PCI: Add local struct device pointers
PCI: thunder-pem: Factor out resource lookup
PCI: Expand "VPD access disabled" quirk message
Brian Norris (1):
clocksource/drivers/arm_arch_timer: Don't assume clock runs in suspend
Calvin Owens (1):
xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files
Chen-Yu Tsai (3):
drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure drm/sun4i: Add compatible strings for A31/A31s display pipelines drm/sun4i: Add compatible string for A31/A31s TCON (timing controller)
Chris Salls (1):
mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
Chuck Lever (1):
svcauth_gss: Close connection when dropping an incoming message
Daniel Vetter (1):
drm/mga: remove device_is_agp callback
Dmitry Bilunov (1):
dm raid: fix NULL pointer dereference for raid1 without bitmap
Dmitry Torokhov (1):
ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
Dongdong Liu (1):
PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports
Felipe Balbi (3):
usb: xhci: add quirk flag for broken PED bits
usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested
usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions
Frederic Barrat (1):
powerpc/mm: Add missing global TLB invalidate if cxl is active
Geert Uytterhoeven (1):
Input: gpio_keys - add support for GPIO descriptors
Greg Kroah-Hartman (1):
Linux 4.9.22
Hauke Mehrtens (1):
MIPS: Lantiq: fix missing xbar kernel panic
Heiko Carstens (1):
s390/uaccess: get_user() should zero on failure (again)
Huacai Chen (4):
MIPS: Check TLB before handle_ri_rdhwr() for Loongson-3
MIPS: Add MIPS_CPU_FTLB for Loongson-3A R2
MIPS: Flush wrong invalid FTLB entry for huge page
MIPS: c-r4k: Fix Loongson-3's vcache/scache waysize calculation
HungNien Chen (1):
HID: i2c-hid: add a simple quirk to fix device defects
James Hogan (8):
metag/usercopy: Drop unused macros metag/usercopy: Fix alignment error checking metag/usercopy: Add early abort to copy_to_user metag/usercopy: Zero rest of buffer from copy_from_user metag/usercopy: Set flags before ADDZ metag/usercopy: Fix src fixup in from user rapf loops metag/usercopy: Add missing fixups
MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels
Jan-Marek Glogowski (1):
Reset TreeId to zero on SMB2 TREE_CONNECT
Jani Nikula (1):
drm/edid: constify edid quirk list
Janusz Dziedzic (1):
usb: dwc3: gadget: delay unmap of bounced requests
Jason A. Donenfeld (1):
random: use chacha20 for get_random_int/long
Johan Hovold (1):
Documentation: stable-kernel-rules: fix stable-tag format
Johannes Berg (1):
mac80211: unconditionally start new netdev queues with iTXQ support
John Crispin (1):
MIPS: ralink: Fix typos in rt3883 pinctrl
John Garry (1):
arm64: dts: hisi: fix hip06 sas am-max-trans quirk
Jon Mason (1):
PCI: Add Broadcom Northstar2 PAXC quirk for device class and MPSS
João Paulo Rechi Vita (1):
platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT
Kai-Chuan Hsieh (1):
platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB
Keith Busch (1):
nvme: simplify stripe quirk
Kevin Hilman (1):
ARM: davinci: PM: support da8xx DT platforms
Kiwoong Kim (1):
scsi: ufs: introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk
Krzysztof Kozlowski (1):
watchdog: s3c2410: Fix infinite interrupt in soft mode
Lee, Chun-Yi (1):
platform/x86: acer-wmi: Only supports AMW0_GUID1 on acer family
Li Qiang (1):
drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
Lv Zheng (2):
ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding ACPI / button: Change default behavior to lid_init_state=open
Marc Zyngier (2):
arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region
Marcel Hasler (2):
HID: usbhid: Add quirks for Mayflash/Dragonrise GameCube and PS3 adapters
HID: usbhid: Add quirk for Mayflash/Dragonrise DolphinBar.
Marcelo Henrique Cerri (1):
s390/decompressor: fix initrd corruption caused by bss clear
Martin Brandenburg (1):
orangefs: move features validation to fix filesystem hang
Matjaz Hegedic (3):
x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk x86/reboot/quirks: Fix typo in ASUS EeeBook X205TA reboot quirk
Max Filippov (1):
xtensa: make __pa work with uncached KSEG addresses
Michael Ellerman (1):
powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable()
Murray McAllister (2):
drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl()
Mylène Josserand (1):
ASoC: sun4i-i2s: Add quirks to handle a31 compatible
NeilBrown (1):
sysfs: be careful of error returns from ops->show()
Nobutaka Okabe (1):
ALSA: usb-audio: Add native DSD support for TEAC 501/503 DAC
Oliver O'Halloran (1):
powerpc/64: Fix flush_(d|i)cache_range() called from modules
Patrice Chotard (1):
ARM: dts: STiH407-family: set snps,dis_u3_susphy_quirk
Paul Burton (1):
MIPS: End spinlocks with .insn
Paul Mackerras (1):
powerpc: Don't try to fix up misaligned load-with-reservation instructions
Paulo Zanoni (3):
drm/i915: fix INTEL_BDW_IDS definition drm/i915: more .is_mobile cleanups for BDW drm/i915: actually drive the BDW reserved IDs
Pierre-Louis Bossart (5):
ASoC: Intel: bytct_rt5640: change default capture settings
ASoC: codecs: rt5670: add quirk for Lenovo Thinkpad 10
ASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10
ASoC: Intel: cht_bsw_rt5645: harden ACPI device detection
ASoC: Intel: cht_bsw_rt5645: add Baytrail MCLK support
Ping Cheng (1):
HID: wacom: don't apply generic settings to old devices
Quentin Schulz (1):
iio: bmg160: reset chip when probing
Ritesh Harjani (1):
mmc: sdhci-msm: Enable few quirks
Sami Tolvanen (2):
dm verity fec: limit error correction recursion dm verity fec: fix bufio leaks
Shuxiao Zhang (1):
staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
Sinan Kaya (1):
PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432
Stephen Boyd (1):
usb: chipidea: msm: Rely on core to override AHBBURST
Subhash Jadavani (2):
scsi: ufs: ensure that host pa_tactivate is higher than device
scsi: ufs: add quirk to increase host PA_SaveConfigTime
Sudip Mukherjee (2):
ppdev: check before attaching port
ppdev: fix registering same device name
Suzuki K Poulose (1):
kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd
Takashi Iwai (1):
ASoC: rt5670: Add missing 10EC5072 ACPI ID
Thomas Hellstrom (3):
drm/vmwgfx: Type-check lookups of fence objects
drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces drm/vmwgfx: Remove getparam error message
Tobias Jakobi (1):
usb-storage: Add ignore-residue quirk for Initio INIC-3619
Tobias Klauser (1):
nios2: reserve boot memory for device tree
Tomasz Nowicki (1):
arm64: PCI: Manage controller-specific data on per-controller basis
Victor Kamensky (1):
arm64: mm: unaligned access by user-land should be received as SIGBUS
Vignesh R (1):
serial: 8250_omap: Add OMAP_DMA_TX_KICK quirk for AM437x
Vladimir Zapolskiy (1):
clk: lpc32xx: add a quirk for PWM and MS clock dividers
Wei Yongjun (1):
ring-buffer: Fix return value check in test_ringbuffer()
Will Deacon (1):
ARM: smccc: Update HVC comment to describe new quirk parameter
Zang Leigang (1):
scsi: ufs: introduce a new ufshcd_statea UFSHCD_STATE_EH_SCHEDULED
Zhang Rui (1):
ACPI: save NVS memory for Lenovo G50-45
[email protected] (1):
ptrace: fix PTRACE_LISTEN race corrupting task->state
[email protected] (1):
scsi: ufs: issue link starup 2 times if device isn't active
yangbo lu (1):
mmc: sdhci-of-esdhc: remove default broken-cd for ARM
youling257 (1):
ASoC: Intel: bytcr_rt5640: quirks for Insyde devices
Greg KH
maintainerDocumentation/devicetree/bindings/arm/arch_timer.txt +5 -0
@@ -38,6 +38,11 @@ to deliver its interrupts via SPIs. architecturally-defined reset values. Only supported for 32-bit systems which follow the ARMv7 architected reset values. +- arm,no-tick-in-suspend : The main counter does not tick when the system is in + low-power system suspend on some SoCs. This behavior does not match the + Architecture Reference Manual's specification that the system counter "must + be implemented in an always-on power domain." + Example:
Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt +7 -1
@@ -28,6 +28,8 @@ The TCON acts as a timing controller for RGB, LVDS and TV interfaces. Required properties: - compatible: value must be either: * allwinner,sun5i-a13-tcon + * allwinner,sun6i-a31-tcon + * allwinner,sun6i-a31s-tcon * allwinner,sun8i-a33-tcon - reg: base address and size of memory-mapped region - interrupts: interrupt associated to this IP
@@ -50,7 +52,7 @@ Required properties: second the block connected to the TCON channel 1 (usually the TV encoder) -On the A13, there is one more clock required: +On SoCs other than the A33, there is one more clock required: - 'tcon-ch1': The clock driving the TCON channel 1 DRC
@@ -87,6 +89,7 @@ system. Required properties: - compatible: value must be one of: * allwinner,sun5i-a13-display-backend + * allwinner,sun6i-a31-display-backend * allwinner,sun8i-a33-display-backend - reg: base address and size of the memory-mapped region. - clocks: phandles to the clocks feeding the frontend and backend
@@ -117,6 +120,7 @@ deinterlacing and color space conversion. Required properties: - compatible: value must be one of: * allwinner,sun5i-a13-display-frontend + * allwinner,sun6i-a31-display-frontend * allwinner,sun8i-a33-display-frontend - reg: base address and size of the memory-mapped region. - interrupts: interrupt associated to this IP
@@ -142,6 +146,8 @@ extra node. Required properties: - compatible: value must be one of: * allwinner,sun5i-a13-display-engine + * allwinner,sun6i-a31-display-engine + * allwinner,sun6i-a31s-display-engine * allwinner,sun8i-a33-display-engine - allwinner,pipelines: list of phandle to the display engine
Documentation/devicetree/bindings/usb/usb-xhci.txt +1 -0
@@ -26,6 +26,7 @@ Required properties: Optional properties: - clocks: reference to a clock - usb3-lpm-capable: determines if platform is USB3 LPM capable + - quirk-broken-port-ped: set if the controller has broken port disable mechanism Example: usb@f0931000 {
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +5 -4
@@ -6,10 +6,11 @@ occurred. Required properties: - compatible : should be one among the following - (a) "samsung,s3c2410-wdt" for Exynos4 and previous SoCs - (b) "samsung,exynos5250-wdt" for Exynos5250 - (c) "samsung,exynos5420-wdt" for Exynos5420 - (c) "samsung,exynos7-wdt" for Exynos7 + - "samsung,s3c2410-wdt" for S3C2410 + - "samsung,s3c6410-wdt" for S3C6410, S5PV210 and Exynos4 + - "samsung,exynos5250-wdt" for Exynos5250 + - "samsung,exynos5420-wdt" for Exynos5420 + - "samsung,exynos7-wdt" for Exynos7 - reg : base physical address of the controller and length of memory mapped region.
Documentation/kernel-parameters.txt +10 -0
@@ -305,6 +305,16 @@ bytes respectively. Such letter suffixes can also be entirely omitted. use by PCI Format: <irq>,<irq>... + acpi_mask_gpe= [HW,ACPI] + Due to the existence of _Lxx/_Exx, some GPEs triggered + by unsupported hardware/firmware features can result in + GPE floodings that cannot be automatically disabled by + the GPE dispatcher. + This facility can be used to prevent such uncontrolled + GPE floodings. + Format: <int> + Support masking of GPEs numbered from 0x00 to 0x7f. + acpi_no_auto_serialize [HW,ACPI] Disable auto-serialization of AML methods AML control methods that contain the opcodes to create
Documentation/stable_kernel_rules.txt +1 -1
@@ -124,7 +124,7 @@ specified in the following format in the sign-off area: .. code-block:: none - Cc: <[email protected]> # 3.3.x- + Cc: <[email protected]> # 3.3.x The tag has the meaning of:
Makefile +2 -2
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 21 +SUBLEVEL = 22 EXTRAVERSION = NAME = Roaring Lionus
@@ -370,7 +370,7 @@ LDFLAGS_MODULE = CFLAGS_KERNEL = AFLAGS_KERNEL = LDFLAGS_vmlinux = -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized +CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,) CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
arch/arm/boot/dts/stih407-family.dtsi +1 -0
@@ -680,6 +680,7 @@ phy-names = "usb2-phy", "usb3-phy"; phys = <&usb2_picophy0>, <&phy_port2 PHY_TYPE_USB3>; + snps,dis_u3_susphy_quirk; }; };
arch/arm/kernel/armksyms.c +2 -2
@@ -178,6 +178,6 @@ EXPORT_SYMBOL(__pv_offset);#endif #ifdef CONFIG_HAVE_ARM_SMCCC -EXPORT_SYMBOL (arm_smccc_smc); -EXPORT_SYMBOL (arm_smccc_hvc); +EXPORT_SYMBOL (__arm_smccc_smc); +EXPORT_SYMBOL (__arm_smccc_hvc);#endif
arch/arm/kernel/smccc-call.S +8 -6
@@ -46,17 +46,19 @@ UNWIND( .fnend) /* * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2, * unsigned long a3, unsigned long a4, unsigned long a5, - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res) + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, + * struct arm_smccc_quirk *quirk) */ -ENTRY(arm_smccc_smc) +ENTRY(__arm_smccc_smc) SMCCC SMCCC_SMC -ENDPROC(arm_smccc_smc) +ENDPROC(__arm_smccc_smc) /* * void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2, * unsigned long a3, unsigned long a4, unsigned long a5, - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res) + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, + * struct arm_smccc_quirk *quirk) */ -ENTRY(arm_smccc_hvc) +ENTRY(__arm_smccc_hvc) SMCCC SMCCC_HVC -ENDPROC(arm_smccc_hvc) +ENDPROC(__arm_smccc_hvc)
arch/arm/kvm/mmu.c +20 -3
@@ -292,11 +292,18 @@ static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size)phys_addr_t addr = start, end = start + size;phys_addr_t next; +assert_spin_locked (&kvm->mmu_lock); pgd = kvm->arch.pgd +stage2_pgd_index (addr);do { next =stage2_pgd_addr_end (addr, end);if (!stage2_pgd_none (*pgd))unmap_stage2_puds (kvm, pgd, addr, next); +/* +* If the range is too large, release the kvm->mmu_lock +* to prevent starvation and lockup detector warnings. +*/ +if (next != end) +cond_resched_lock (&kvm->mmu_lock); }while (pgd++, addr = next, addr != end); }
@@ -803,6 +810,7 @@ void stage2_unmap_vm(struct kvm *kvm)int idx; idx =srcu_read_lock (&kvm->srcu); +down_read (¤t->mm->mmap_sem);spin_lock (&kvm->mmu_lock); slots =kvm_memslots (kvm);
@@ -810,6 +818,7 @@ void stage2_unmap_vm(struct kvm *kvm)stage2_unmap_memslot (kvm, memslot);spin_unlock (&kvm->mmu_lock); +up_read (¤t->mm->mmap_sem);srcu_read_unlock (&kvm->srcu, idx); }
@@ -829,7 +838,10 @@ void kvm_free_stage2_pgd(struct kvm *kvm)if (kvm->arch.pgd ==NULL )return ; +spin_lock (&kvm->mmu_lock);unmap_stage2_range (kvm,0 ,KVM_PHYS_SIZE ); +spin_unlock (&kvm->mmu_lock); +/* Free the HW pgd, one page at a time */ free_pages_exact (kvm->arch.pgd,S2_PGD_SIZE ); kvm->arch.pgd =NULL ;
@@ -1804,6 +1816,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, (KVM_PHYS_SIZE >> PAGE_SHIFT))return -EFAULT ; +down_read (¤t->mm->mmap_sem);/* * A memory region could potentially cover multiple VMAs, and any holes * between them, so iterate over all of them to find out if we can map
@@ -1847,8 +1860,10 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, pa += vm_start - vma->vm_start;/* IO region dirty page logging not allowed */ -if (memslot->flags &KVM_MEM_LOG_DIRTY_PAGES ) -return -EINVAL ; +if (memslot->flags &KVM_MEM_LOG_DIRTY_PAGES ) { + ret = -EINVAL ; + goto out; + } ret = kvm_phys_addr_ioremap(kvm, gpa, pa, vm_end - vm_start,
@@ -1860,7 +1875,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, }while (hva < reg_end);if (change ==KVM_MR_FLAGS_ONLY ) -return ret; + goto out;spin_lock (&kvm->mmu_lock);if (ret)
@@ -1868,6 +1883,8 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,else stage2_flush_memslot (kvm, memslot);spin_unlock (&kvm->mmu_lock); +out: +up_read (¤t->mm->mmap_sem);return ret; }
arch/arm/mach-davinci/da8xx-dt.c +1 -0
@@ -46,6 +46,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {static void __init da850_init_machine (void ) {of_platform_default_populate (NULL , da850_auxdata_lookup,NULL ); +davinci_pm_init (); }static const char *const da850_boards_compat[]__initconst = {
arch/arm64/boot/dts/hisilicon/hip06.dtsi +1 -1
@@ -590,7 +590,7 @@ reg = <0 0xa2000000 0 0x10000>; sas-addr = [50 01 88 20 16 00 00 00]; hisilicon,sas-syscon = <&pcie_subctl>; - am-max-trans; + hip06-sas-v2-quirk-amt; ctrl-reset-reg = <0xa18>; ctrl-reset-sts-reg = <0x5a0c>; ctrl-clock-ena-reg = <0x318>;
arch/arm64/kernel/arm64ksyms.c +2 -2
@@ -73,5 +73,5 @@ NOKPROBE_SYMBOL(_mcount);#endif /* arm-smccc */ -EXPORT_SYMBOL (arm_smccc_smc); -EXPORT_SYMBOL (arm_smccc_hvc); +EXPORT_SYMBOL (__arm_smccc_smc); +EXPORT_SYMBOL (__arm_smccc_hvc);
arch/arm64/kernel/asm-offsets.c +5 -2
@@ -140,8 +140,11 @@ int main(void)DEFINE (SLEEP_STACK_DATA_SYSTEM_REGS , offsetof(struct sleep_stack_data , system_regs));DEFINE (SLEEP_STACK_DATA_CALLEE_REGS , offsetof(struct sleep_stack_data , callee_saved_regs));#endif -DEFINE (ARM_SMCCC_RES_X0_OFFS , offsetof(struct arm_smccc_res , a0)); -DEFINE (ARM_SMCCC_RES_X2_OFFS , offsetof(struct arm_smccc_res , a2)); +DEFINE (ARM_SMCCC_RES_X0_OFFS , offsetof(struct arm_smccc_res , a0)); +DEFINE (ARM_SMCCC_RES_X2_OFFS , offsetof(struct arm_smccc_res , a2)); +DEFINE (ARM_SMCCC_QUIRK_ID_OFFS , offsetof(struct arm_smccc_quirk , id)); +DEFINE (ARM_SMCCC_QUIRK_STATE_OFFS , offsetof(struct arm_smccc_quirk , state)); +BLANK ();DEFINE (HIBERN_PBE_ORIG , offsetof(struct pbe , orig_address));DEFINE (HIBERN_PBE_ADDR , offsetof(struct pbe , address));
arch/arm64/kernel/pci.c +15 -13
@@ -121,6 +121,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)static struct pci_config_window *pci_acpi_setup_ecam_mapping (struct acpi_pci_root *root) { +struct device *dev = &root->device->dev;struct resource *bus_res = &root->secondary;u16 seg = root->segment;struct pci_config_window *cfg;
@@ -132,8 +133,7 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root) root->mcfg_addr =pci_mcfg_lookup (seg, bus_res);if (!root->mcfg_addr) { -dev_err (&root->device->dev,"%04x:%pR ECAM region not found\n" , - seg, bus_res); +dev_err (dev,"%04x:%pR ECAM region not found\n" , seg, bus_res);return NULL ; }
@@ -141,11 +141,10 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root) cfgres.start = root->mcfg_addr + bus_res->start * bsz; cfgres.end = cfgres.start +resource_size (bus_res) * bsz -1 ; cfgres.flags =IORESOURCE_MEM ; - cfg =pci_ecam_create (&root->device->dev, &cfgres, bus_res, - &pci_generic_ecam_ops); + cfg =pci_ecam_create (dev, &cfgres, bus_res, &pci_generic_ecam_ops);if (IS_ERR (cfg)) { -dev_err (&root->device->dev,"%04x:%pR error %ld mapping ECAM\n" , - seg, bus_res,PTR_ERR (cfg)); +dev_err (dev,"%04x:%pR error %ld mapping ECAM\n" , seg, bus_res, +PTR_ERR (cfg));return NULL ; }
@@ -159,33 +158,36 @@ static void pci_acpi_generic_release_info(struct acpi_pci_root_info *ci) ri = container_of(ci, struct acpi_pci_generic_root_info, common);pci_ecam_free (ri->cfg); +kfree (ci->ops);kfree (ri); } -static struct acpi_pci_root_ops acpi_pci_root_ops = { - .release_info = pci_acpi_generic_release_info, -}; -/* Interface called from ACPI code to setup PCI host controller */ struct pci_bus *pci_acpi_scan_root (struct acpi_pci_root *root) {int node =acpi_get_node (root->device->handle);struct acpi_pci_generic_root_info *ri;struct pci_bus *bus, *child; +struct acpi_pci_root_ops *root_ops; ri =kzalloc_node (sizeof (*ri),GFP_KERNEL , node);if (!ri)return NULL ; + root_ops =kzalloc_node (sizeof (*root_ops),GFP_KERNEL , node); +if (!root_ops) +return NULL ; + ri->cfg =pci_acpi_setup_ecam_mapping (root);if (!ri->cfg) {kfree (ri); +kfree (root_ops);return NULL ; } - acpi_pci_root_ops.pci_ops = &ri->cfg->ops->pci_ops; - bus =acpi_pci_root_create (root, &acpi_pci_root_ops, &ri->common, - ri->cfg); + root_ops->release_info = pci_acpi_generic_release_info; + root_ops->pci_ops = &ri->cfg->ops->pci_ops; + bus =acpi_pci_root_create (root, root_ops, &ri->common, ri->cfg);if (!bus)return NULL ;
arch/arm64/kernel/smccc-call.S +16 -7
@@ -12,6 +12,7 @@ * */ #include <linux/linkage.h> +#include <linux/arm-smccc.h> #include <asm/asm-offsets.h> .macro SMCCC instr
@@ -20,24 +21,32 @@ ldr x4, [sp] stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS] stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS] - ret + ldr x4, [sp, #8] + cbz x4, 1f /* no quirk structure */ + ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS] + cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6 + b.ne 1f + str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS] +1: ret .cfi_endproc .endm /* * void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2, * unsigned long a3, unsigned long a4, unsigned long a5, - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res) + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, + * struct arm_smccc_quirk *quirk) */ -ENTRY(arm_smccc_smc) +ENTRY(__arm_smccc_smc) SMCCC smc -ENDPROC(arm_smccc_smc) +ENDPROC(__arm_smccc_smc) /* * void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2, * unsigned long a3, unsigned long a4, unsigned long a5, - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res) + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res, + * struct arm_smccc_quirk *quirk) */ -ENTRY(arm_smccc_hvc) +ENTRY(__arm_smccc_hvc) SMCCC hvc -ENDPROC(arm_smccc_hvc) +ENDPROC(__arm_smccc_hvc)
arch/arm64/mm/fault.c +24 -18
86 lines not on this page · raw message
arch/metag/include/asm/uaccess.h +8 -7
@@ -197,20 +197,21 @@ extern long __must_check strnlen_user(const char __user *src, long count);#define strlen_user (str) strnlen_user(str, 32767) -extern unsigned long __must_check __copy_user_zeroing (void *to, -const void __user *from, -unsigned long n); +extern unsigned long raw_copy_from_user (void *to,const void __user *from, +unsigned long n);static inline unsigned long copy_from_user (void *to,const void __user *from,unsigned long n) { +unsigned long res = n;if (likely (access_ok (VERIFY_READ , from, n))) -return __copy_user_zeroing (to, from, n); -memset (to,0 , n); -return n; + res =raw_copy_from_user (to, from, n); +if (unlikely (res)) +memset (to + (n - res),0 , res); +return res; } -#define __copy_from_user (to, from, n) __copy_user_zeroing(to, from, n) +#define __copy_from_user (to, from, n) raw_copy_from_user(to, from, n)#define __copy_from_user_inatomic __copy_from_user extern unsigned long __must_check __copy_user(void __user *to,
arch/metag/lib/usercopy.c +120 -192
562 lines not on this page · raw message
arch/mips/Kconfig +1 -1
@@ -1526,7 +1526,7 @@ config CPU_MIPS64_R6 select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_MSA select GENERIC_CSUM - select MIPS_O32_FP64_SUPPORT if MIPS32_O32 + select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32 select HAVE_KVM help Choose this option to build a kernel for release 6 or later of the
arch/mips/include/asm/spinlock.h +4 -4
@@ -127,7 +127,7 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)" andi %[ticket], %[ticket], 0xffff \n" " bne %[ticket], %[my_ticket], 4f \n" " subu %[ticket], %[my_ticket], %[ticket] \n" -"2: \n" +"2: .insn \n" " .subsection 2 \n" "4: andi %[ticket], %[ticket], 0xffff \n" " sll %[ticket], 5 \n"
@@ -202,7 +202,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock)" sc %[ticket], %[ticket_ptr] \n" " beqz %[ticket], 1b \n" " li %[ticket], 1 \n" -"2: \n" +"2: .insn \n" " .subsection 2 \n" "3: b 2b \n" " li %[ticket], 0 \n"
@@ -382,7 +382,7 @@ static inline int arch_read_trylock(arch_rwlock_t *rw) " .set reorder \n" __WEAK_LLSC_MB " li %2, 1 \n" - "2: \n" + "2: .insn \n" : "=" GCC_OFF_SMALL_ASM() (rw->lock), "=&r" (tmp), "=&r" (ret) : GCC_OFF_SMALL_ASM() (rw->lock) : "memory");
@@ -422,7 +422,7 @@ static inline int arch_write_trylock(arch_rwlock_t *rw) " lui %1, 0x8000 \n" " sc %1, %0 \n" " li %2, 1 \n" - "2: \n" + "2: .insn \n" : "=" GCC_OFF_SMALL_ASM() (rw->lock), "=&r" (tmp), "=&r" (ret) : GCC_OFF_SMALL_ASM() (rw->lock)
arch/mips/kernel/cpu-probe.c +1 -1
@@ -1824,7 +1824,7 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu) }decode_configs (c); - c->options |=MIPS_CPU_TLBINV |MIPS_CPU_LDPTE ; + c->options |=MIPS_CPU_FTLB |MIPS_CPU_TLBINV |MIPS_CPU_LDPTE ; c->writecombine = _CACHE_UNCACHED_ACCELERATED;break ;default :
arch/mips/kernel/genex.S +2 -2
@@ -448,7 +448,7 @@ NESTED(nmi_handler, PT_SIZE, sp) BUILD_HANDLER reserved reserved sti verbose /* others */ .align 5 - LEAF(handle_ri_rdhwr_vivt) + LEAF(handle_ri_rdhwr_tlbp) .set push .set noat .set noreorder
@@ -467,7 +467,7 @@ NESTED(nmi_handler, PT_SIZE, sp) .set pop bltz k1, handle_ri /* slow path */ /* fall thru */ - END(handle_ri_rdhwr_vivt) + END(handle_ri_rdhwr_tlbp) LEAF(handle_ri_rdhwr) .set push
arch/mips/kernel/traps.c +13 -4
@@ -81,7 +81,7 @@ extern asmlinkage void handle_dbe(void); extern asmlinkage void handle_sys(void); extern asmlinkage void handle_bp(void); extern asmlinkage void handle_ri(void); -extern asmlinkage void handle_ri_rdhwr_vivt(void); +extern asmlinkage void handle_ri_rdhwr_tlbp(void); extern asmlinkage void handle_ri_rdhwr(void); extern asmlinkage void handle_cpu(void); extern asmlinkage void handle_ov(void);
@@ -2352,9 +2352,18 @@ void __init trap_init(void)set_except_vector (EXCCODE_SYS , handle_sys);set_except_vector (EXCCODE_BP , handle_bp); -set_except_vector (EXCCODE_RI , rdhwr_noopt ? handle_ri : - (cpu_has_vtag_icache ? - handle_ri_rdhwr_vivt : handle_ri_rdhwr)); + +if (rdhwr_noopt) +set_except_vector (EXCCODE_RI , handle_ri); +else { +if (cpu_has_vtag_icache) +set_except_vector (EXCCODE_RI , handle_ri_rdhwr_tlbp); +else if (current_cpu_type () ==CPU_LOONGSON3 ) +set_except_vector (EXCCODE_RI , handle_ri_rdhwr_tlbp); +else +set_except_vector (EXCCODE_RI , handle_ri_rdhwr); + } +set_except_vector (EXCCODE_CPU , handle_cpu);set_except_vector (EXCCODE_OV , handle_ov);set_except_vector (EXCCODE_TR , handle_tr);
arch/mips/lantiq/xway/sysctrl.c +1 -1
@@ -467,7 +467,7 @@ void __init ltq_soc_init(void)if (!np_xbar)panic ("Failed to load xbar nodes from devicetree" ); -if (of_address_to_resource (np_pmu,0 , &res_xbar)) +if (of_address_to_resource (np_xbar,0 , &res_xbar))panic ("Failed to get xbar resources" );if (request_mem_region (res_xbar.start,resource_size (&res_xbar), res_xbar.name) <0 )
arch/mips/mm/c-r4k.c +2 -0
@@ -1558,6 +1558,7 @@ static void probe_vcache(void) vcache_size = c->vcache.sets * c->vcache.ways * c->vcache.linesz; c->vcache.waybit =0 ; + c->vcache.waysize = vcache_size / c->vcache.ways;pr_info ("Unified victim cache %ldkB %s, linesize %d bytes.\n" , vcache_size >>10 , way_string[c->vcache.ways], c->vcache.linesz);
@@ -1660,6 +1661,7 @@ static void __init loongson3_sc_init(void)/* Loongson-3 has 4 cores, 1MB scache for each. scaches are shared */ scache_size *=4 ; c->scache.waybit =0 ; + c->scache.waysize = scache_size / c->scache.ways;pr_info ("Unified secondary cache %ldkB %s, linesize %d bytes.\n" , scache_size >>10 , way_string[c->scache.ways], c->scache.linesz);if (scache_size)
arch/mips/mm/tlbex.c +21 -4
@@ -762,7 +762,8 @@ static void build_huge_update_entries(u32 **p, unsigned int pte,static void build_huge_handler_tail (u32 **p,struct uasm_reloc **r,struct uasm_label **l,unsigned int pte, -unsigned int ptr) +unsigned int ptr, +unsigned int flush) {#ifdef CONFIG_SMP UASM_i_SC (p, pte,0 , ptr);
@@ -771,6 +772,22 @@ static void build_huge_handler_tail(u32 **p, struct uasm_reloc **r,#else UASM_i_SW (p, pte,0 , ptr);#endif +if (cpu_has_ftlb && flush) { +BUG_ON (!cpu_has_tlbinv); + +UASM_i_MFC0 (p, ptr,C0_ENTRYHI ); +uasm_i_ori (p, ptr, ptr,MIPS_ENTRYHI_EHINV ); +UASM_i_MTC0 (p, ptr,C0_ENTRYHI ); +build_tlb_write_entry (p, l, r, tlb_indexed); + +uasm_i_xori (p, ptr, ptr,MIPS_ENTRYHI_EHINV ); +UASM_i_MTC0 (p, ptr,C0_ENTRYHI ); +build_huge_update_entries (p, pte, ptr); +build_huge_tlb_write_entry (p, l, r, pte, tlb_random,0 ); + +return ; + } +build_huge_update_entries (p, pte, ptr);build_huge_tlb_write_entry (p, l, r, pte, tlb_indexed,0 ); }
@@ -2197,7 +2214,7 @@ static void build_r4000_tlb_load_handler(void) uasm_l_tlbl_goaround2(&l, p); }uasm_i_ori (&p, wr.r1, wr.r1, (_PAGE_ACCESSED | _PAGE_VALID)); -build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2); +build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2,1 );#endif uasm_l_nopage_tlbl (&l, p);
@@ -2252,7 +2269,7 @@ static void build_r4000_tlb_store_handler(void)build_tlb_probe_entry (&p);uasm_i_ori (&p, wr.r1, wr.r1, _PAGE_ACCESSED | _PAGE_MODIFIED | _PAGE_VALID | _PAGE_DIRTY); -build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2); +build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2,1 );#endif uasm_l_nopage_tlbs (&l, p);
@@ -2308,7 +2325,7 @@ static void build_r4000_tlb_modify_handler(void)build_tlb_probe_entry (&p);uasm_i_ori (&p, wr.r1, wr.r1, _PAGE_ACCESSED | _PAGE_MODIFIED | _PAGE_VALID | _PAGE_DIRTY); -build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2); +build_huge_handler_tail (&p, &r, &l, wr.r1, wr.r2,0 );#endif uasm_l_nopage_tlbm (&l, p);
arch/mips/ralink/rt3883.c +2 -2
@@ -36,7 +36,7 @@ static struct rt2880_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 15, 2) };static struct rt2880_pmx_func jtag_func[] = {FUNC ("jtag" ,0 ,17 ,5 ) };static struct rt2880_pmx_func mdio_func[] = {FUNC ("mdio" ,0 ,22 ,2 ) };static struct rt2880_pmx_func lna_a_func[] = {FUNC ("lna a" ,0 ,32 ,3 ) }; -static struct rt2880_pmx_func lna_g_func[] = {FUNC ("lna a" ,0 ,35 ,3 ) }; +static struct rt2880_pmx_func lna_g_func[] = {FUNC ("lna g" ,0 ,35 ,3 ) };static struct rt2880_pmx_func pci_func[] = {FUNC ("pci-dev" ,0 ,40 ,32 ),FUNC ("pci-host2" ,1 ,40 ,32 ),
@@ -44,7 +44,7 @@ static struct rt2880_pmx_func pci_func[] = {FUNC ("pci-fnc" ,3 ,40 ,32 ) };static struct rt2880_pmx_func ge1_func[] = {FUNC ("ge1" ,0 ,72 ,12 ) }; -static struct rt2880_pmx_func ge2_func[] = {FUNC ("ge1" ,0 ,84 ,12 ) }; +static struct rt2880_pmx_func ge2_func[] = {FUNC ("ge2" ,0 ,84 ,12 ) };static struct rt2880_pmx_group rt3883_pinmux_data[] = {GRP ("i2c" , i2c_func,1 ,RT3883_GPIO_MODE_I2C ),
arch/nios2/kernel/prom.c +7 -0
@@ -48,6 +48,13 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)return alloc_bootmem_align (size, align); } +int __init early_init_dt_reserve_memory_arch (phys_addr_t base,phys_addr_t size, +bool nomap) +{ +reserve_bootmem (base, size,BOOTMEM_DEFAULT ); +return 0 ; +} +void __init early_init_devtree (void *params) {__be32 *dtb = (u32 *)__dtb_start;
arch/nios2/kernel/setup.c +3 -0
@@ -195,6 +195,9 @@ void __init setup_arch(char **cmdline_p) }#endif /* CONFIG_BLK_DEV_INITRD */ +early_init_fdt_reserve_self (); +early_init_fdt_scan_reserved_mem (); +unflatten_and_copy_device_tree ();setup_cpuinfo ();
arch/powerpc/crypto/crc32c-vpmsum_glue.c +3 -0
@@ -33,10 +33,13 @@ static u32 crc32c_vpmsum(u32 crc, unsigned char const *p, size_t len) }if (len & ~VMX_ALIGN_MASK ) { +preempt_disable ();pagefault_disable ();enable_kernel_altivec (); crc =__crc32c_vpmsum (crc, p, len & ~VMX_ALIGN_MASK ); +disable_kernel_altivec ();pagefault_enable (); +preempt_enable (); } tail = len &VMX_ALIGN_MASK ;
arch/powerpc/kernel/align.c +19 -8
@@ -807,14 +807,25 @@ int fix_alignment(struct pt_regs *regs) nb = aligninfo[instr].len; flags = aligninfo[instr].flags; -/* ldbrx/stdbrx overlap lfs/stfs in the DSISR unfortunately */ -if (IS_XFORM (instruction) && ((instruction >>1 ) &0x3ff ) ==532 ) { - nb =8 ; - flags =LD +SW ; - }else if (IS_XFORM (instruction) && - ((instruction >>1 ) &0x3ff ) ==660 ) { - nb =8 ; - flags =ST +SW ; +/* +* Handle some cases which give overlaps in the DSISR values. +*/ +if (IS_XFORM (instruction)) { +switch (get_xop (instruction)) { +case 532 :/* ldbrx */ + nb =8 ; + flags =LD +SW ; +break ; +case 660 :/* stdbrx */ + nb =8 ; + flags =ST +SW ; +break ; +case 20 :/* lwarx */ +case 84 :/* ldarx */ +case 116 :/* lharx */ +case 276 :/* lqarx */ +return 0 ;/* not emulated ever */ + } }/* Byteswap little endian loads and stores */
arch/powerpc/kernel/misc_64.S +2 -2
@@ -67,7 +67,7 @@ PPC64_CACHES: * flush all bytes from start through stop-1 inclusive */ -_GLOBAL(flush_icache_range) +_GLOBAL_TOC(flush_icache_range) BEGIN_FTR_SECTION PURGE_PREFETCHED_INS blr
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(flush_icache_range) * * flush all bytes from start to stop-1 inclusive */ -_GLOBAL(flush_dcache_range) +_GLOBAL_TOC(flush_dcache_range) /* * Flush the data cache to memory
arch/powerpc/kernel/setup_64.c +9 -0
@@ -245,6 +245,15 @@ static void cpu_ready_for_interrupts(void)mtspr (SPRN_LPCR , lpcr |LPCR_AIL_3 ); } +/* +* Fixup HFSCR:TM based on CPU features. The bit is set by our +* early asm init because at that point we haven't updated our +* CPU features from firmware and device-tree. Here we have, +* so let's do it. +*/ +if (cpu_has_feature (CPU_FTR_HVMODE ) && !cpu_has_feature (CPU_FTR_TM_COMP )) +mtspr (SPRN_HFSCR ,mfspr (SPRN_HFSCR ) & ~HFSCR_TM ); +/* Set IR and DR in PACA MSR */ get_paca ()->kernel_msr =MSR_KERNEL ; }
arch/powerpc/mm/hash_native_64.c +5 -2
@@ -636,6 +636,10 @@ static void native_flush_hash_range(unsigned long number, int local)unsigned long psize = batch->psize;int ssize = batch->ssize;int i; +unsigned int use_local; + + use_local = local &&mmu_has_feature (MMU_FTR_TLBIEL ) && + mmu_psize_defs[psize].tlbiel && !cxl_ctx_in_use ();local_irq_save (flags);
@@ -665,8 +669,7 @@ static void native_flush_hash_range(unsigned long number, int local) }pte_iterate_hashed_end (); } -if (mmu_has_feature (MMU_FTR_TLBIEL ) && - mmu_psize_defs[psize].tlbiel && local) { +if (use_local) { asmvolatile ("ptesync" :::"memory" );for (i =0 ; i < number; i++) { vpn = batch->vpn[i];
arch/s390/boot/compressed/misc.c +19 -16
@@ -141,31 +141,34 @@ static void check_ipl_parmblock(void *start, unsigned long size)unsigned long decompress_kernel (void ) { -unsigned long output_addr; -unsigned char *output; +void *output, *kernel_end; - output_addr = ((unsigned long ) &_end +HEAP_SIZE +4095UL ) &-4096UL ; -check_ipl_parmblock ((void *)0 , output_addr + SZ__bss_start); -memset (&_bss,0 , &_ebss - &_bss); - free_mem_ptr = (unsigned long )&_end; - free_mem_end_ptr = free_mem_ptr +HEAP_SIZE ; - output = (unsigned char *) output_addr; + output = (void *)ALIGN ((unsigned long ) &_end +HEAP_SIZE ,PAGE_SIZE ); + kernel_end = output + SZ__bss_start; +check_ipl_parmblock ((void *)0 , (unsigned long ) kernel_end);#ifdef CONFIG_BLK_DEV_INITRD /* * Move the initrd right behind the end of the decompressed -* kernel image. +* kernel image. This also prevents initrd corruption caused by +* bss clearing since kernel_end will always be located behind the +* current bss section.. */ -if (INITRD_START &&INITRD_SIZE && -INITRD_START < (unsigned long ) output + SZ__bss_start) { -check_ipl_parmblock (output + SZ__bss_start, -INITRD_START +INITRD_SIZE ); -memmove (output + SZ__bss_start, - (void *)INITRD_START ,INITRD_SIZE ); -INITRD_START = (unsigned long ) output + SZ__bss_start; +if (INITRD_START &&INITRD_SIZE && kernel_end > (void *)INITRD_START ) { +check_ipl_parmblock (kernel_end,INITRD_SIZE ); +memmove (kernel_end, (void *)INITRD_START ,INITRD_SIZE ); +INITRD_START = (unsigned long ) kernel_end; }#endif +/* +* Clear bss section. free_mem_ptr and free_mem_end_ptr need to be +* initialized afterwards since they reside in bss. +*/ +memset (&_bss,0 , &_ebss - &_bss); + free_mem_ptr = (unsigned long ) &_end; + free_mem_end_ptr = free_mem_ptr +HEAP_SIZE ; +puts ("Uncompressing Linux... " );__decompress (input_data, input_len,NULL ,NULL , output,0 ,NULL , error);puts ("Ok, booting the kernel.\n" );
arch/s390/include/asm/uaccess.h +1 -1
@@ -144,7 +144,7 @@ unsigned long __must_check __copy_to_user(void __user *to, const void *from," jg 2b\n" \".popsection\n" \ EX_TABLE(0b,3b) EX_TABLE(1b,3b) \ - : "=d" (__rc), "=Q" (*(to)) \ + : "=d" (__rc), "+Q" (*(to)) \: " d" (size), " Q " (*(from)), \ " d" (__reg0), " K " (-EFAULT) \ : " cc"); \
arch/x86/kernel/reboot.c +16 -0
@@ -223,6 +223,22 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "P4S800"), }, }, + { /* Handle problems with rebooting on ASUS EeeBook X205TA */ + .callback = set_acpi_reboot, + .ident = "ASUS EeeBook X205TA", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_PRODUCT_NAME, "X205TA"), + }, + }, + { /* Handle problems with rebooting on ASUS EeeBook X205TAW */ + .callback = set_acpi_reboot, + .ident = "ASUS EeeBook X205TAW", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_PRODUCT_NAME, "X205TAW"), + }, + }, /* Certec */ { /* Handle problems with rebooting on Certec BPC600 */
arch/xtensa/include/asm/page.h +13 -0
@@ -164,8 +164,21 @@ void copy_user_highpage(struct page *to, struct page *from,#define ARCH_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) +#ifdef CONFIG_MMU +static inline unsigned long ___pa (unsigned long va) +{ +unsigned long off = va -PAGE_OFFSET ; + +if (off >=XCHAL_KSEG_SIZE ) + off -=XCHAL_KSEG_SIZE ; + +return off +PHYS_OFFSET ; +} +#define __pa (x) ___pa((unsigned long)(x)) +#else #define __pa (x) \ ((unsigned long) (x) - PAGE_OFFSET + PHYS_OFFSET) +#endif #define __va (x) \ ((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET))#define pfn_valid (pfn) \
drivers/acpi/button.c +1 -1
@@ -113,7 +113,7 @@ struct acpi_button {static BLOCKING_NOTIFIER_HEAD (acpi_lid_notifier);static struct acpi_device *lid_device; -static u8 lid_init_state =ACPI_BUTTON_LID_INIT_METHOD ; +static u8 lid_init_state =ACPI_BUTTON_LID_INIT_OPEN ;static unsigned long lid_report_interval__read_mostly =500 ;module_param (lid_report_interval, ulong,0644 );
drivers/acpi/internal.h +1 -0
@@ -37,6 +37,7 @@ void acpi_amba_init(void);static inline void acpi_amba_init (void ) {}#endif int acpi_sysfs_init (void ); +void acpi_gpe_apply_masked_gpes (void );void acpi_container_init (void );void acpi_memory_hotplug_init (void );#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
drivers/acpi/scan.c +1 -0
@@ -2044,6 +2044,7 @@ int __init acpi_scan_init(void) } } +acpi_gpe_apply_masked_gpes ();acpi_update_all_gpes ();acpi_ec_ecdt_start ();
drivers/acpi/sleep.c +19 -0
@@ -130,6 +130,12 @@ void __init acpi_nvs_nosave_s3(void) nvs_nosave_s3 = true; } +static int __init init_nvs_save_s3 (const struct dmi_system_id *d) +{ + nvs_nosave_s3 = false; +return 0 ; +} +/* * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the * user to request that behavior by using the 'acpi_old_suspend_ordering'
@@ -324,6 +330,19 @@ static struct dmi_system_id acpisleep_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"), }, }, +/* +* https://bugzilla.kernel.org/show_bug.cgi?id=189431 +* Lenovo G50-45 is a platform later than 2012, but needs nvs memory +* saving during S3. +*/ + { + .callback = init_nvs_save_s3, + .ident = "Lenovo G50-45", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), + }, + }, {}, };
drivers/acpi/sysfs.c +56 -0
62 lines not on this page · raw message
drivers/ata/ahci_da850.c +32 -1
@@ -54,11 +54,42 @@ static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg,writel (val, ahci_base +SATA_P0PHYCR_REG ); } +static int ahci_da850_softreset (struct ata_link *link, +unsigned int *class,unsigned long deadline) +{ +int pmp, ret; + + pmp =sata_srst_pmp (link); + +/* +* There's an issue with the SATA controller on da850 SoCs: if we +* enable Port Multiplier support, but the drive is connected directly +* to the board, it can't be detected. As a workaround: if PMP is +* enabled, we first call ahci_do_softreset() and pass it the result of +* sata_srst_pmp(). If this call fails, we retry with pmp = 0. +*/ + ret =ahci_do_softreset (link, class, pmp, deadline, ahci_check_ready); +if (pmp && ret == -EBUSY ) +return ahci_do_softreset (link, class,0 , + deadline, ahci_check_ready); + +return ret; +} + +static struct ata_port_operations ahci_da850_port_ops = { + .inherits = &ahci_platform_ops, + .softreset = ahci_da850_softreset, +/* +* No need to override .pmp_softreset - it's only used for actual +* PMP-enabled ports. +*/ +}; +static const struct ata_port_info ahci_da850_port_info = { .flags =AHCI_FLAG_COMMON , .pio_mask =ATA_PIO4 , .udma_mask =ATA_UDMA6 , - .port_ops = &ahci_platform_ops, + .port_ops = &ahci_da850_port_ops, };static struct scsi_host_template ahci_platform_sht = {
drivers/char/ppdev.c +30 -3
@@ -84,8 +84,14 @@ struct pp_struct {struct ieee1284_info state;struct ieee1284_info saved_state;long default_inactivity; +int index; }; +/* should we use PARDEVICE_MAX here? */ +static struct device *devices[PARPORT_MAX ]; + +static DEFINE_IDA (ida_index); +/* pp_struct.flags bitfields */ #define PP_CLAIMED (1<<0)#define PP_EXCL (1<<1)
@@ -287,6 +293,7 @@ static int register_device(int minor, struct pp_struct *pp)struct pardevice *pdev =NULL ;char *name;struct pardev_cb ppdev_cb; +int index; name =kasprintf (GFP_KERNEL ,CHRDEV "%x" , minor);if (name ==NULL )
@@ -299,20 +306,23 @@ static int register_device(int minor, struct pp_struct *pp)return -ENXIO ; } + index =ida_simple_get (&ida_index,0 ,0 ,GFP_KERNEL );memset (&ppdev_cb,0 ,sizeof (ppdev_cb)); ppdev_cb.irq_func = pp_irq; ppdev_cb.flags = (pp->flags &PP_EXCL ) ?PARPORT_FLAG_EXCL :0 ; ppdev_cb.private = pp; - pdev =parport_register_dev_model (port, name, &ppdev_cb, minor); + pdev =parport_register_dev_model (port, name, &ppdev_cb, index);parport_put_port (port);if (!pdev) {printk (KERN_WARNING "%s: failed to register device!\n" , name); +ida_simple_remove (&ida_index, index);kfree (name);return -ENXIO ; } pp->pdev = pdev; + pp->index = index;dev_dbg (&pdev->dev,"registered pardevice\n" );return 0 ; }
@@ -749,6 +759,7 @@ static int pp_release(struct inode *inode, struct file *file)if (pp->pdev) {parport_unregister_device (pp->pdev); +ida_simple_remove (&ida_index, pp->index); pp->pdev =NULL ;pr_debug (CHRDEV "%x: unregistered pardevice\n" , minor); }
@@ -789,13 +800,29 @@ static const struct file_operations pp_fops = {static void pp_attach (struct parport *port) { -device_create (ppdev_class, port->dev,MKDEV (PP_MAJOR , port->number), -NULL ,"parport%d" , port->number); +struct device *ret; + +if (devices[port->number]) +return ; + + ret =device_create (ppdev_class, port->dev, +MKDEV (PP_MAJOR , port->number),NULL , +"parport%d" , port->number); +if (IS_ERR (ret)) { +pr_err ("Failed to create device parport%d\n" , + port->number); +return ; + } + devices[port->number] = ret; }static void pp_detach (struct parport *port) { +if (!devices[port->number]) +return ; +device_destroy (ppdev_class,MKDEV (PP_MAJOR , port->number)); + devices[port->number] =NULL ; }static int pp_probe (struct pardevice *par_dev)
drivers/char/random.c +43 -41
106 lines not on this page · raw message
drivers/clk/nxp/clk-lpc32xx.c +28 -4
@@ -1282,13 +1282,13 @@ static struct clk_hw_proto clk_hw_proto[LPC32XX_CLK_HW_MAX] = {LPC32XX_DEFINE_MUX (PWM1_MUX ,PWMCLK_CTRL ,1 ,0x1 ,NULL ,0 ),LPC32XX_DEFINE_DIV (PWM1_DIV ,PWMCLK_CTRL ,4 ,4 ,NULL , -CLK_DIVIDER_ONE_BASED |CLK_DIVIDER_ALLOW_ZERO ), +CLK_DIVIDER_ONE_BASED ),LPC32XX_DEFINE_GATE (PWM1_GATE ,PWMCLK_CTRL ,0 ,0 ),LPC32XX_DEFINE_COMPOSITE (PWM1 ,PWM1_MUX ,PWM1_DIV ,PWM1_GATE ),LPC32XX_DEFINE_MUX (PWM2_MUX ,PWMCLK_CTRL ,3 ,0x1 ,NULL ,0 ),LPC32XX_DEFINE_DIV (PWM2_DIV ,PWMCLK_CTRL ,8 ,4 ,NULL , -CLK_DIVIDER_ONE_BASED |CLK_DIVIDER_ALLOW_ZERO ), +CLK_DIVIDER_ONE_BASED ),LPC32XX_DEFINE_GATE (PWM2_GATE ,PWMCLK_CTRL ,2 ,0 ), LPC32XX_DEFINE_COMPOSITE(PWM2, PWM2_MUX, PWM2_DIV, PWM2_GATE),
@@ -1335,8 +1335,7 @@ static struct clk_hw_proto clk_hw_proto[LPC32XX_CLK_HW_MAX] = {LPC32XX_DEFINE_GATE (USB_DIV_GATE ,USB_CTRL ,17 ,0 ),LPC32XX_DEFINE_COMPOSITE (USB_DIV , _NULL,USB_DIV_DIV ,USB_DIV_GATE ), -LPC32XX_DEFINE_DIV (SD_DIV ,MS_CTRL ,0 ,4 ,NULL , -CLK_DIVIDER_ONE_BASED |CLK_DIVIDER_ALLOW_ZERO ), +LPC32XX_DEFINE_DIV (SD_DIV ,MS_CTRL ,0 ,4 ,NULL ,CLK_DIVIDER_ONE_BASED ),LPC32XX_DEFINE_CLK (SD_GATE ,MS_CTRL ,BIT (5 ) |BIT (9 ),BIT (5 ) |BIT (9 ),0x0 ,BIT (5 ) |BIT (9 ),0x0 ,0x0 , clk_mask_ops), LPC32XX_DEFINE_COMPOSITE(SD, _NULL, SD_DIV, SD_GATE),
@@ -1478,6 +1477,20 @@ static struct clk * __init lpc32xx_clk_register(u32 id)return clk; } +static void __init lpc32xx_clk_div_quirk (u32 reg,u32 div_mask,u32 gate) +{ +u32 val; + +regmap_read (clk_regmap, reg, &val); + +if (!(val & div_mask)) { + val &= ~gate; + val |=BIT (__ffs (div_mask)); + } + +regmap_update_bits (clk_regmap, reg, gate | div_mask, val); +} +static void __init lpc32xx_clk_init (struct device_node *np) {unsigned int i;
@@ -1517,6 +1530,17 @@ static void __init lpc32xx_clk_init(struct device_node *np)return ; } +/* +* Divider part of PWM and MS clocks requires a quirk to avoid +* a misinterpretation of formally valid zero value in register +* bitfield, which indicates another clock gate. Instead of +* adding complexity to a gate clock ensure that zero value in +* divider clock is never met in runtime. +*/ +lpc32xx_clk_div_quirk (LPC32XX_CLKPWR_PWMCLK_CTRL ,0xf0 ,BIT (0 )); +lpc32xx_clk_div_quirk (LPC32XX_CLKPWR_PWMCLK_CTRL ,0xf00 ,BIT (2 )); +lpc32xx_clk_div_quirk (LPC32XX_CLKPWR_MS_CTRL ,0xf ,BIT (5 ) |BIT (9 )); +for (i =1 ; i <LPC32XX_CLK_MAX ; i++) { clk[i] =lpc32xx_clk_register (i);if (IS_ERR (clk[i])) {
drivers/clocksource/arm_arch_timer.c +8 -1
@@ -81,6 +81,7 @@ static struct clock_event_device __percpu *arch_timer_evt;static enum ppi_nr arch_timer_uses_ppi =VIRT_PPI ;static bool arch_timer_c3stop;static bool arch_timer_mem_use_virtual; +static bool arch_counter_suspend_stop;static bool evtstrm_enable =IS_ENABLED (CONFIG_ARM_ARCH_TIMER_EVTSTREAM );
@@ -576,7 +577,7 @@ static struct clocksource clocksource_counter = { .rating = 400, .read = arch_counter_read, .mask = CLOCKSOURCE_MASK(56), - .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_SUSPEND_NONSTOP, + .flags = CLOCK_SOURCE_IS_CONTINUOUS, };static struct cyclecounter cyclecounter = {
@@ -616,6 +617,8 @@ static void __init arch_counter_register(unsigned type) arch_timer_read_counter = arch_counter_get_cntvct_mem; } +if (!arch_counter_suspend_stop) + clocksource_counter.flags |=CLOCK_SOURCE_SUSPEND_NONSTOP ; start_count =arch_timer_read_counter ();clocksource_register_hz (&clocksource_counter, arch_timer_rate); cyclecounter.mult = clocksource_counter.mult;
@@ -907,6 +910,10 @@ static int __init arch_timer_of_init(struct device_node *np) of_property_read_bool(np, "arm,cpu-registers-not-fw-configured")) arch_timer_uses_ppi =PHYS_SECURE_PPI ; +/* On some systems, the counter stops ticking when in suspend. */ + arch_counter_suspend_stop =of_property_read_bool (np, +"arm,no-tick-in-suspend" ); +return arch_timer_init (); }CLOCKSOURCE_OF_DECLARE (armv7_arch_timer,"arm,armv7-timer" , arch_timer_of_init);
drivers/firmware/qcom_scm-64.c +10 -3
@@ -91,6 +91,7 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,dma_addr_t args_phys =0 ;void *args_virt =NULL ;size_t alloc_len; +struct arm_smccc_quirk quirk = {.id =ARM_SMCCC_QUIRK_QCOM_A6 };if (unlikely (arglen >N_REGISTER_ARGS )) { alloc_len =N_EXT_QCOM_SCM_ARGS *sizeof (u64);
@@ -131,10 +132,16 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id, qcom_smccc_convention, ARM_SMCCC_OWNER_SIP, fn_id); + quirk.state.a6 =0 ; +do { -arm_smccc_smc (cmd, desc->arginfo, desc->args[0 ], - desc->args[1 ], desc->args[2 ], x5,0 ,0 , - res); +arm_smccc_smc_quirk (cmd, desc->arginfo, desc->args[0 ], + desc->args[1 ], desc->args[2 ], x5, + quirk.state.a6,0 , res, &quirk); + +if (res->a0 ==QCOM_SCM_INTERRUPTED ) + cmd = res->a0; + }while (res->a0 ==QCOM_SCM_INTERRUPTED );mutex_unlock (&qcom_scm_lock);
drivers/gpio/gpiolib-acpi.c +3 -1
@@ -571,8 +571,10 @@ struct gpio_desc *acpi_find_gpio(struct device *dev, } desc =acpi_get_gpiod_by_index (adev, propname, idx, &info); -if (!IS_ERR (desc) || (PTR_ERR (desc) == -EPROBE_DEFER )) +if (!IS_ERR (desc))break ; +if (PTR_ERR (desc) == -EPROBE_DEFER ) +return ERR_CAST (desc); }/* Then from plain _CRS GPIOs */
drivers/gpu/drm/drm_edid.c +3 -3
@@ -90,7 +90,7 @@ struct detailed_mode_closure {#define LEVEL_GTF2 2#define LEVEL_CVT 3 -static struct edid_quirk { +static const struct edid_quirk { char vendor[4]; int product_id; u32 quirks;
@@ -1449,7 +1449,7 @@ EXPORT_SYMBOL(drm_edid_duplicate);* * Returns true if @vendor is in @edid, false otherwise */ -static bool edid_vendor (struct edid *edid,char *vendor) +static bool edid_vendor (struct edid *edid,const char *vendor) {char edid_vendor[3 ];
@@ -1469,7 +1469,7 @@ static bool edid_vendor(struct edid *edid, char *vendor)*/ static u32 edid_get_quirks (struct edid *edid) { -struct edid_quirk *quirk; +const struct edid_quirk *quirk;int i;for (i =0 ; i <ARRAY_SIZE (edid_quirk_list); i++) {
drivers/gpu/drm/i915/i915_pci.c +1 -0
@@ -417,6 +417,7 @@ static const struct pci_device_id pciidlist[] = {INTEL_VLV_IDS (&intel_valleyview_info),INTEL_BDW_GT12_IDS (&intel_broadwell_info),INTEL_BDW_GT3_IDS (&intel_broadwell_gt3_info), +INTEL_BDW_RSVD_IDS (&intel_broadwell_info),INTEL_CHV_IDS (&intel_cherryview_info),INTEL_SKL_GT1_IDS (&intel_skylake_info), INTEL_SKL_GT2_IDS(&intel_skylake_info),
drivers/gpu/drm/mga/mga_dma.c +19 -1
@@ -392,6 +392,24 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags)drm_mga_private_t *dev_priv;int ret; +/* There are PCI versions of the G450. These cards have the +* same PCI ID as the AGP G450, but have an additional PCI-to-PCI +* bridge chip. We detect these cards, which are not currently +* supported by this driver, by looking at the device ID of the +* bus the "card" is on. If vendor is 0x3388 (Hint Corp) and the +* device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the +* device. +*/ +if ((dev->pdev->device ==0x0525 ) && dev->pdev->bus->self + && (dev->pdev->bus->self->vendor ==0x3388 ) + && (dev->pdev->bus->self->device ==0x0021 ) + && dev->agp) { +/* FIXME: This should be quirked in the pci core, but oh well +* the hw probably stopped existing. */ +arch_phys_wc_del (dev->agp->agp_mtrr); +kfree (dev->agp); + dev->agp =NULL ; + } dev_priv =kzalloc (sizeof (drm_mga_private_t),GFP_KERNEL );if (!dev_priv)return -ENOMEM ;
@@ -698,7 +716,7 @@ static int mga_do_pci_dma_bootstrap(struct drm_device *dev,static int mga_do_dma_bootstrap (struct drm_device *dev,drm_mga_dma_bootstrap_t *dma_bs) { -const int is_agp = (dma_bs->agp_mode !=0 ) &&drm_pci_device_is_agp (dev); +const int is_agp = (dma_bs->agp_mode !=0 ) && dev->agp;int err;drm_mga_private_t *const dev_priv = (drm_mga_private_t *) dev->dev_private;
drivers/gpu/drm/mga/mga_drv.c +0 -37
@@ -37,8 +37,6 @@#include <drm/drm_pciids.h> -static int mga_driver_device_is_agp (struct drm_device *dev); -static struct pci_device_id pciidlist[] = { mga_PCI_IDS };
@@ -66,7 +64,6 @@ static struct drm_driver driver = { .lastclose = mga_driver_lastclose, .set_busid = drm_pci_set_busid, .dma_quiescent = mga_driver_dma_quiescent, - .device_is_agp = mga_driver_device_is_agp, .get_vblank_counter = mga_get_vblank_counter, .enable_vblank = mga_enable_vblank, .disable_vblank = mga_disable_vblank,
@@ -107,37 +104,3 @@ module_exit(mga_exit);MODULE_AUTHOR (DRIVER_AUTHOR );MODULE_DESCRIPTION (DRIVER_DESC );MODULE_LICENSE ("GPL and additional rights" ); - -/** -* Determine if the device really is AGP or not. -* -* In addition to the usual tests performed by \c drm_device_is_agp, this -* function detects PCI G450 cards that appear to the system exactly like -* AGP G450 cards. -* -* \param dev The device to be tested. -* -* \returns -* If the device is a PCI G450, zero is returned. Otherwise 2 is returned. -*/ -static int mga_driver_device_is_agp (struct drm_device *dev) -{ -const struct pci_dev *const pdev = dev->pdev; - -/* There are PCI versions of the G450. These cards have the -* same PCI ID as the AGP G450, but have an additional PCI-to-PCI -* bridge chip. We detect these cards, which are not currently -* supported by this driver, by looking at the device ID of the -* bus the "card" is on. If vendor is 0x3388 (Hint Corp) and the -* device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the -* device. -*/ - -if ((pdev->device ==0x0525 ) && pdev->bus->self - && (pdev->bus->self->vendor ==0x3388 ) - && (pdev->bus->self->device ==0x0021 )) { -return 0 ; - } - -return 2 ; -}
drivers/gpu/drm/msm/adreno/adreno_device.c +0 -3
@@ -25,9 +25,6 @@ bool hang_debug = false;MODULE_PARM_DESC (hang_debug,"Dump registers when hang is detected (can be slow!)" );module_param_named (hang_debug, hang_debug, bool,0600 ); -struct msm_gpu *a3xx_gpu_init (struct drm_device *dev); -struct msm_gpu *a4xx_gpu_init (struct drm_device *dev); -static const struct adreno_info gpulist[] = { { .rev =ADRENO_REV (3 ,0 ,5 ,ANY_ID ),
drivers/gpu/drm/msm/adreno/adreno_gpu.h +3 -0
@@ -311,4 +311,7 @@ static inline void adreno_gpu_write(struct adreno_gpu *gpu, gpu_write(&gpu->base, reg - 1, data); } +struct msm_gpu *a3xx_gpu_init (struct drm_device *dev); +struct msm_gpu *a4xx_gpu_init (struct drm_device *dev); +#endif /* __ADRENO_GPU_H__ */
drivers/gpu/drm/sun4i/sun4i_backend.c +1 -0
@@ -408,6 +408,7 @@ static int sun4i_backend_remove(struct platform_device *pdev)static const struct of_device_id sun4i_backend_of_table[] = { { .compatible ="allwinner,sun5i-a13-display-backend" }, + { .compatible ="allwinner,sun6i-a31-display-backend" }, { .compatible ="allwinner,sun8i-a33-display-backend" }, { } };
drivers/gpu/drm/sun4i/sun4i_drv.c +5 -0
@@ -201,12 +201,15 @@ static const struct component_master_ops sun4i_drv_master_ops = {static bool sun4i_drv_node_is_frontend (struct device_node *node) {return of_device_is_compatible (node,"allwinner,sun5i-a13-display-frontend" ) || +of_device_is_compatible (node,"allwinner,sun6i-a31-display-frontend" ) ||of_device_is_compatible (node,"allwinner,sun8i-a33-display-frontend" ); }static bool sun4i_drv_node_is_tcon (struct device_node *node) {return of_device_is_compatible (node,"allwinner,sun5i-a13-tcon" ) || +of_device_is_compatible (node,"allwinner,sun6i-a31-tcon" ) || +of_device_is_compatible (node,"allwinner,sun6i-a31s-tcon" ) ||of_device_is_compatible (node,"allwinner,sun8i-a33-tcon" ); }
@@ -322,6 +325,8 @@ static int sun4i_drv_remove(struct platform_device *pdev)static const struct of_device_id sun4i_drv_of_table[] = { { .compatible ="allwinner,sun5i-a13-display-engine" }, + { .compatible ="allwinner,sun6i-a31-display-engine" }, + { .compatible ="allwinner,sun6i-a31s-display-engine" }, { .compatible ="allwinner,sun8i-a33-display-engine" }, { } };
drivers/gpu/drm/sun4i/sun4i_tcon.c +28 -15
92 lines not on this page · raw message
drivers/gpu/drm/sun4i/sun4i_tcon.h +7 -4
@@ -142,6 +142,11 @@#define SUN4I_TCON_MAX_CHANNELS 2 +struct sun4i_tcon_quirks { +bool has_unknown_mux;/* sun5i has undocumented mux */ +bool has_channel_1;/* a33 does not have channel 1 */ +}; +struct sun4i_tcon {struct device *dev;struct drm_device *drm;
@@ -160,12 +165,10 @@ struct sun4i_tcon {/* Reset control */ struct reset_control *lcd_rst; -/* Platform adjustments */ -bool has_mux; -struct drm_panel *panel; -bool has_channel_1; +/* Platform adjustments */ +const struct sun4i_tcon_quirks *quirks; };struct drm_bridge *sun4i_tcon_find_bridge (struct device_node *node);
drivers/gpu/drm/ttm/ttm_object.c +7 -3
@@ -179,7 +179,7 @@ int ttm_base_object_init(struct ttm_object_file *tfile,if (unlikely (ret !=0 )) goto out_err0; - ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL ); + ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL , false);if (unlikely (ret !=0 )) goto out_err1;
@@ -318,7 +318,8 @@ EXPORT_SYMBOL(ttm_ref_object_exists);int ttm_ref_object_add (struct ttm_object_file *tfile,struct ttm_base_object *base, -enum ttm_ref_type ref_type,bool *existed) +enum ttm_ref_type ref_type,bool *existed, +bool require_existed) {struct drm_open_hash *ht = &tfile->ref_hash[ref_type];struct ttm_ref_object *ref;
@@ -345,6 +346,9 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, }rcu_read_unlock (); +if (require_existed) +return -EPERM ; + ret =ttm_mem_global_alloc (mem_glob,sizeof (*ref), false, false);if (unlikely (ret !=0 ))
@@ -635,7 +639,7 @@ int ttm_prime_fd_to_handle(struct ttm_object_file *tfile, prime = (struct ttm_prime_object *) dma_buf->priv; base = &prime->base; *handle = base->hash.key; - ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL ); + ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL , false);dma_buf_put (dma_buf);
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +50 -29
127 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +1 -3
@@ -114,8 +114,6 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data, param->value = dev_priv->has_dx;break ;default : -DRM_ERROR ("Illegal vmwgfx get param request: %d\n" , - param->param);return -EINVAL ; }
@@ -186,7 +184,7 @@ int vmw_get_cap_3d_ioctl(struct drm_device *dev, void *data,bool gb_objects = !!(dev_priv->capabilities &SVGA_CAP_GBOBJECTS );struct vmw_fpriv *vmw_fp =vmw_fpriv (file_priv); -if (unlikely (arg->pad64 !=0 )) { +if (unlikely (arg->pad64 !=0 || arg->max_size ==0 )) {DRM_ERROR ("Illegal GET_3D_CAP argument.\n" );return -EINVAL ; }
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +2 -2
@@ -589,7 +589,7 @@ static int vmw_user_dmabuf_synccpu_grab(struct vmw_user_dma_buffer *user_bo,return ret; ret =ttm_ref_object_add (tfile, &user_bo->prime.base, -TTM_REF_SYNCCPU_WRITE , &existed); +TTM_REF_SYNCCPU_WRITE , &existed, false);if (ret !=0 || existed)ttm_bo_synccpu_write_release (&user_bo->dma.base);
@@ -773,7 +773,7 @@ int vmw_user_dmabuf_reference(struct ttm_object_file *tfile, *handle = user_bo->prime.base.hash.key;return ttm_ref_object_add (tfile, &user_bo->prime.base, -TTM_REF_USAGE ,NULL ); +TTM_REF_USAGE ,NULL , false); }/*
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +15 -16
@@ -713,11 +713,14 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,128 ; num_sizes =0 ; -for (i =0 ; i <DRM_VMW_MAX_SURFACE_FACES ; ++i) +for (i =0 ; i <DRM_VMW_MAX_SURFACE_FACES ; ++i) { +if (req->mip_levels[i] >DRM_VMW_MAX_MIP_LEVELS ) +return -EINVAL ; num_sizes += req->mip_levels[i]; + } -if (num_sizes >DRM_VMW_MAX_SURFACE_FACES * -DRM_VMW_MAX_MIP_LEVELS ) +if (num_sizes >DRM_VMW_MAX_SURFACE_FACES *DRM_VMW_MAX_MIP_LEVELS || + num_sizes ==0 )return -EINVAL ; size = vmw_user_surface_size + 128 +
@@ -891,17 +894,16 @@ vmw_surface_handle_reference(struct vmw_private *dev_priv,uint32_t handle;struct ttm_base_object *base;int ret; +bool require_exist = false;if (handle_type ==DRM_VMW_HANDLE_PRIME ) { ret =ttm_prime_fd_to_handle (tfile, u_handle, &handle);if (unlikely (ret !=0 ))return ret; }else { -if (unlikely (drm_is_render_client (file_priv))) { -DRM_ERROR ("Render client refused legacy " -"surface reference.\n" ); -return -EACCES ; - } +if (unlikely (drm_is_render_client (file_priv))) + require_exist = true; +if (ACCESS_ONCE (vmw_fpriv (file_priv)->locked_master)) {DRM_ERROR ("Locked master refused legacy " "surface reference.\n" );
@@ -929,17 +931,14 @@ vmw_surface_handle_reference(struct vmw_private *dev_priv,/* * Make sure the surface creator has the same -* authenticating master. +* authenticating master, or is already registered with us. */ if (drm_is_primary_client (file_priv) && - user_srf->master != file_priv->master) { -DRM_ERROR ("Trying to reference surface outside of" -" master domain.\n" ); - ret = -EACCES ; - goto out_bad_resource; - } + user_srf->master != file_priv->master) + require_exist = true; - ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL ); + ret =ttm_ref_object_add (tfile, base,TTM_REF_USAGE ,NULL , + require_exist);if (unlikely (ret !=0 )) {DRM_ERROR ("Could not add a reference to a surface.\n" ); goto out_bad_resource;
drivers/hid/hid-core.c +0 -2
@@ -728,7 +728,6 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) hid->product ==USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 || hid->product ==USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP || hid->product ==USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP || - hid->product ==USB_DEVICE_ID_MS_TYPE_COVER_3 || hid->product == USB_DEVICE_ID_MS_POWER_COVER) && hid->group == HID_GROUP_MULTITOUCH) hid->group = HID_GROUP_GENERIC;
@@ -1984,7 +1983,6 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },
drivers/hid/hid-ids.h +12 -3
@@ -318,8 +318,11 @@#define USB_VENDOR_ID_DMI 0x0c0b#define USB_DEVICE_ID_DMI_ENC 0x5fab -#define USB_VENDOR_ID_DRAGONRISE 0x0079 -#define USB_DEVICE_ID_DRAGONRISE_WIIU 0x1800 +#define USB_VENDOR_ID_DRAGONRISE 0x0079 +#define USB_DEVICE_ID_DRAGONRISE_WIIU 0x1800 +#define USB_DEVICE_ID_DRAGONRISE_PS3 0x1801 +#define USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR 0x1803 +#define USB_DEVICE_ID_DRAGONRISE_GAMECUBE 0x1843#define USB_VENDOR_ID_DWAV 0x0eef#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
@@ -365,6 +368,9 @@#define USB_VENDOR_ID_FLATFROG 0x25b5#define USB_DEVICE_ID_MULTITOUCH_3200 0x0002 +#define USB_VENDOR_ID_FUTABA 0x0547 +#define USB_DEVICE_ID_LED_DISPLAY 0x7000 +#define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f#define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
@@ -722,7 +728,6 @@#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9 -#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de#define USB_DEVICE_ID_MS_POWER_COVER 0x07da#define USB_VENDOR_ID_MOJO 0x8282
@@ -1037,6 +1042,10 @@#define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH 0x0500#define USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET 0x0502 +#define USB_VENDOR_ID_WEIDA 0x2575 +#define USB_DEVICE_ID_WEIDA_8752 0xC300 +#define USB_DEVICE_ID_WEIDA_8755 0xC301 +#define USB_VENDOR_ID_WISEGROUP 0x0925#define USB_DEVICE_ID_SMARTJOY_PLUS 0x0005#define USB_DEVICE_ID_SUPER_JOY_BOX_3 0x8888
drivers/hid/hid-microsoft.c +0 -2
@@ -282,8 +282,6 @@ static const struct hid_device_id ms_devices[] = { .driver_data = MS_HIDINPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP), .driver_data = MS_HIDINPUT }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), - .driver_data = MS_HIDINPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), .driver_data = MS_HIDINPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
drivers/hid/hid-multitouch.c +43 -37
119 lines not on this page · raw message
drivers/hid/hid-sensor-hub.c +6 -0
@@ -796,6 +796,12 @@ static const struct hid_device_id sensor_hub_devices[] = { {HID_DEVICE (HID_BUS_ANY ,HID_GROUP_SENSOR_HUB ,USB_VENDOR_ID_MICROSOFT , USB_DEVICE_ID_MS_TYPE_COVER_2), .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, + { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_MICROSOFT, + 0x07bd), /* Microsoft Surface 3 */ + .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, + { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_MICROCHIP, + 0x0f01), /* MM7150 */ + .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_STM_0, USB_DEVICE_ID_STM_HID_SENSOR), .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
drivers/hid/i2c-hid/i2c-hid.c +57 -0
92 lines not on this page · raw message
drivers/hid/usbhid/hid-quirks.c +4 -1
@@ -83,10 +83,14 @@ static const struct hid_blacklist { { USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51, HID_QUIRK_NOGET }, { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_FUTABA, USB_DEVICE_ID_LED_DISPLAY, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
@@ -103,7 +107,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP, HID_QUIRK_NO_INIT_REPORTS }, - { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS },
drivers/hid/wacom_wac.c +3 -0
@@ -2896,6 +2896,9 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, {struct wacom_features *features = &wacom_wac->features; +if ((features->type ==HID_GENERIC ) && features->numbered_buttons >0 ) + features->device_type |=WACOM_DEVICETYPE_PAD ; +if (!(features->device_type &WACOM_DEVICETYPE_PAD ))return -ENODEV ;
drivers/idle/intel_idle.c +49 -0
67 lines not on this page · raw message
drivers/iio/gyro/bmg160_core.c +12 -0
@@ -27,6 +27,7 @@#include <linux/iio/trigger_consumer.h> #include <linux/iio/triggered_buffer.h> #include <linux/regmap.h> +#include <linux/delay.h> #include "bmg160.h" #define BMG160_IRQ_NAME "bmg160_event"
@@ -52,6 +53,9 @@#define BMG160_DEF_BW 100#define BMG160_REG_PMU_BW_RES BIT(7) +#define BMG160_GYRO_REG_RESET 0x14 +#define BMG160_GYRO_RESET_VAL 0xb6 +#define BMG160_REG_INT_MAP_0 0x17#define BMG160_INT_MAP_0_BIT_ANY BIT(1)
@@ -236,6 +240,14 @@ static int bmg160_chip_init(struct bmg160_data *data)int ret;unsigned int val; +/* +* Reset chip to get it in a known good state. A delay of 30ms after +* reset is required according to the datasheet. +*/ +regmap_write (data->regmap,BMG160_GYRO_REG_RESET , +BMG160_GYRO_RESET_VAL ); +usleep_range (30000 ,30700 ); + ret =regmap_read (data->regmap,BMG160_REG_CHIP_ID , &val);if (ret <0 ) {dev_err (dev,"Error reading reg_chip_id\n" );
drivers/input/keyboard/gpio_keys.c +26 -11
@@ -26,6 +26,7 @@#include <linux/gpio_keys.h> #include <linux/workqueue.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/of.h> #include <linux/of_platform.h> #include <linux/of_gpio.h>
@@ -35,6 +36,7 @@struct gpio_button_data {const struct gpio_keys_button *button;struct input_dev *input; +struct gpio_desc *gpiod;struct timer_list release_timer;unsigned int release_delay;/* in msecs, for IRQ-only buttons */
@@ -140,7 +142,7 @@ static void gpio_keys_disable_button(struct gpio_button_data *bdata)*/ disable_irq (bdata->irq); -if (gpio_is_valid (bdata->button->gpio)) +if (bdata->gpiod)cancel_delayed_work_sync (&bdata->work);else del_timer_sync (&bdata->release_timer);
@@ -358,19 +360,20 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)const struct gpio_keys_button *button = bdata->button;struct input_dev *input = bdata->input;unsigned int type = button->type ?:EV_KEY ; -int state =gpio_get_value_cansleep (button->gpio); +int state; + state =gpiod_get_value_cansleep (bdata->gpiod);if (state <0 ) { -dev_err (input->dev.parent,"failed to get gpio state\n" ); +dev_err (input->dev.parent, +"failed to get gpio state: %d\n" , state);return ; } - state = (state ?1 :0 ) ^ button->active_low;if (type ==EV_ABS ) {if (state)input_event (input, type, button->code, button->value); }else { -input_event (input, type, button->code, !!state); +input_event (input, type, button->code, state); }input_sync (input); }
@@ -456,7 +459,7 @@ static void gpio_keys_quiesce_key(void *data) {struct gpio_button_data *bdata = data; -if (gpio_is_valid (bdata->button->gpio)) +if (bdata->gpiod)cancel_delayed_work_sync (&bdata->work);else del_timer_sync (&bdata->release_timer);
@@ -478,18 +481,30 @@ static int gpio_keys_setup_key(struct platform_device *pdev, bdata->button = button;spin_lock_init (&bdata->lock); +/* +* Legacy GPIO number, so request the GPIO here and +* convert it to descriptor. +*/ if (gpio_is_valid (button->gpio)) { +unsigned flags =GPIOF_IN ; + +if (button->active_low) + flags |=GPIOF_ACTIVE_LOW ; - error =devm_gpio_request_one (&pdev->dev, button->gpio, -GPIOF_IN , desc); + error =devm_gpio_request_one (&pdev->dev, button->gpio, flags, + desc);if (error <0 ) {dev_err (dev,"Failed to request GPIO %d, error %d\n" , button->gpio, error);return error; } + bdata->gpiod =gpio_to_desc (button->gpio); +if (!bdata->gpiod) +return -EINVAL ; +if (button->debounce_interval) { - error =gpio_set_debounce (button->gpio, + error =gpiod_set_debounce (bdata->gpiod, button->debounce_interval *1000 );/* use timer if gpiolib doesn't provide debounce */ if (error <0 )
@@ -500,7 +515,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev,if (button->irq) { bdata->irq = button->irq; }else { - irq =gpio_to_irq (button->gpio); + irq =gpiod_to_irq (bdata->gpiod);if (irq <0 ) { error = irq; dev_err(dev,
@@ -575,7 +590,7 @@ static void gpio_keys_report_state(struct gpio_keys_drvdata *ddata)for (i =0 ; i < ddata->pdata->nbuttons; i++) {struct gpio_button_data *bdata = &ddata->data[i]; -if (gpio_is_valid (bdata->button->gpio)) +if (bdata->gpiod)gpio_keys_gpio_report_event (bdata); }input_sync (input);
drivers/md/dm-raid.c +1 -1
@@ -3589,7 +3589,7 @@ static int raid_preresume(struct dm_target *ti)return r;/* Resize bitmap to adjust to changed region size (aka MD bitmap chunksize) */ -if (test_bit (RT_FLAG_RS_BITMAP_LOADED , &rs->runtime_flags) && +if (test_bit (RT_FLAG_RS_BITMAP_LOADED , &rs->runtime_flags) && mddev->bitmap && mddev->bitmap_info.chunksize !=to_bytes (rs->requested_bitmap_chunk_sectors)) { r =bitmap_resize (mddev->bitmap, mddev->dev_sectors,to_bytes (rs->requested_bitmap_chunk_sectors),0 );
drivers/md/dm-verity-fec.c +14 -4
@@ -146,8 +146,6 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio, block =fec_buffer_rs_block (v, fio, n, i); res =fec_decode_rs8 (v, fio, block, &par[offset], neras);if (res <0 ) { -dm_bufio_release (buf); - r = res; goto error;
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx4/main.c +43 -41
84 lines not on this page · raw message
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +5 -3
Lines of this file are not shown. View the raw message.
drivers/pci/host/pci-thunder-pem.c +27 -23
50 lines not on this page · raw message
drivers/pci/quirks.c +84 -17
101 lines not on this page · raw message
drivers/platform/x86/acer-wmi.c +56 -0
56 lines not on this page · raw message
drivers/platform/x86/asus-wmi.c +48 -4
52 lines not on this page · raw message
drivers/scsi/ufs/ufshcd.c +143 -11
154 lines not on this page · raw message
include/linux/arm-smccc.h +41 -11
52 lines not on this page · raw message
sound/soc/intel/boards/cht_bsw_rt5645.c +83 -15
98 lines not on this page · raw message
sound/soc/sunxi/sun4i-i2s.c +55 -2
57 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.