Linux 4.9.6
Subsystems (4)
Greg KH
maintainerI'm announcing the release of the 4.9.6 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/clock/imx31-clock.txt | 2 Documentation/kernel-parameters.txt | 3 Makefile | 2 arch/arc/Kconfig | 2 arch/arc/include/asm/module.h | 4 arch/arc/kernel/module.c | 4 arch/arm/boot/dts/Makefile | 1 arch/arm/boot/dts/am33xx.dtsi | 1 arch/arm/boot/dts/am4372.dtsi | 1 arch/arm/boot/dts/bcm283x.dtsi | 2 arch/arm/boot/dts/da850-evm.dts | 1 arch/arm/boot/dts/dm814x.dtsi | 1 arch/arm/boot/dts/dm816x.dtsi | 1 arch/arm/boot/dts/dra7.dtsi | 2 arch/arm/boot/dts/imx31.dtsi | 18 arch/arm/boot/dts/imx6q-cm-fx6.dts | 1 arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts | 11 arch/arm/boot/dts/omap2.dtsi | 1 arch/arm/boot/dts/omap3.dtsi | 1 arch/arm/boot/dts/omap4.dtsi | 1 arch/arm/boot/dts/omap5.dtsi | 2 arch/arm/boot/dts/r8a7794.dtsi | 7 arch/arm/include/asm/cputype.h | 3 arch/arm/kernel/hw_breakpoint.c | 16 arch/arm/kernel/smp_tlb.c | 7 arch/arm/mach-ux500/pm.c | 4 arch/arm64/include/asm/memory.h | 2 arch/arm64/include/uapi/asm/ptrace.h | 1 arch/arm64/kernel/entry.S | 2 arch/arm64/kernel/ptrace.c | 16 arch/arm64/kernel/traps.c | 28 arch/arm64/mm/dma-mapping.c | 3 arch/arm64/mm/init.c | 5 arch/powerpc/include/asm/ppc-opcode.h | 10 arch/powerpc/kernel/ptrace.c | 14 arch/powerpc/perf/power9-events-list.h | 2 arch/powerpc/sysdev/xics/icp-opal.c | 31 arch/s390/kvm/kvm-s390.c | 4 arch/x86/kernel/apic/io_apic.c | 2 arch/x86/kernel/pci-swiotlb.c | 2 arch/x86/pci/acpi.c | 10 arch/x86/xen/pci-swiotlb-xen.c | 2 drivers/clocksource/exynos_mct.c | 1 drivers/devfreq/devfreq.c | 15 drivers/devfreq/exynos-bus.c | 2 drivers/dma/pl330.c | 11 drivers/dma/sh/rcar-dmac.c | 8 drivers/hid/hid-corsair.c | 60 - drivers/infiniband/core/cache.c | 16 drivers/infiniband/hw/mlx4/ah.c | 6 drivers/infiniband/hw/mlx4/mad.c | 16 drivers/infiniband/hw/mlx4/main.c | 29 drivers/infiniband/hw/mlx4/qp.c | 7 drivers/infiniband/hw/mlx5/main.c | 8 drivers/infiniband/hw/mlx5/mr.c | 31 drivers/infiniband/hw/mlx5/qp.c | 29 drivers/infiniband/hw/mlx5/srq.c | 2 drivers/infiniband/sw/rxe/rxe_param.h | 2 drivers/infiniband/sw/rxe/rxe_req.c | 14 drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 drivers/input/mouse/alps.c | 19 drivers/media/platform/Kconfig | 2 drivers/media/platform/blackfin/ppi.c | 2 drivers/media/platform/s5p-mfc/s5p_mfc.c | 7 drivers/media/platform/sti/hva/hva-hw.c | 6 drivers/media/rc/ite-cir.c | 2 drivers/media/spi/gs1662.c | 3 drivers/mmc/host/mxs-mmc.c | 6 drivers/mmc/host/sdhci-acpi.c | 3 drivers/mtd/nand/Kconfig | 2 drivers/mtd/nand/lpc32xx_mlc.c | 2 drivers/mtd/nand/xway_nand.c | 5 drivers/mtd/spi-nor/cadence-quadspi.c | 6 drivers/net/ieee802154/atusb.c | 31 drivers/nvdimm/namespace_devs.c | 23 drivers/pci/host/pcie-designware.c | 10 drivers/pci/probe.c | 12 drivers/rpmsg/rpmsg_core.c | 4 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 7 drivers/scsi/mpt3sas/mpt3sas_base.h | 12 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 40 drivers/scsi/qla2xxx/qla_os.c | 16 drivers/scsi/ses.c | 2 drivers/soc/ti/wkup_m3_ipc.c | 1 drivers/spi/spi-pxa2xx.c | 1 drivers/staging/media/s5p-cec/s5p_cec.c | 4 drivers/xen/swiotlb-xen.c | 4 fs/ceph/caps.c | 17 fs/ceph/dir.c | 5 fs/ceph/inode.c | 3 fs/ceph/mds_client.c | 9 fs/fuse/dev.c | 3 fs/fuse/dir.c | 2 fs/posix_acl.c | 9 fs/ubifs/tnc.c | 25 include/dt-bindings/clock/r8a7794-clock.h | 3 include/linux/rcupdate.h | 4 include/linux/sunrpc/svc_xprt.h | 1 include/linux/swiotlb.h | 8 include/trace/events/swiotlb.h | 17 kernel/rcu/rcu.h | 1 kernel/rcu/tiny.c | 4 kernel/rcu/tiny_plugin.h | 9 kernel/rcu/tree.c | 33 kernel/rcu/tree_exp.h | 52 - kernel/rcu/tree_plugin.h | 2 kernel/rcu/update.c | 38 lib/swiotlb.c | 26 net/ceph/auth_x.c | 195 ++-- net/ceph/auth_x.h | 3 net/ceph/crypto.c | 463 ++-------- net/ceph/crypto.h | 26 net/mac80211/rx.c | 26 net/sunrpc/auth_gss/svcauth_gss.c | 2 net/sunrpc/svc_xprt.c | 10 net/sunrpc/xprtrdma/frwr_ops.c | 13 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 net/sunrpc/xprtrdma/verbs.c | 14 net/sunrpc/xprtrdma/xprt_rdma.h | 20 tools/perf/Makefile.config | 2 tools/perf/builtin-mem.c | 4 tools/perf/builtin-trace.c | 6 tools/perf/trace/beauty/mmap.c | 2 tools/perf/util/Build | 2 tools/perf/util/callchain.c | 2 tools/perf/util/callchain.h | 4 tools/perf/util/genelf.c | 9 tools/perf/util/genelf.h | 2 tools/perf/util/symbol.c | 3 tools/perf/util/trace-event-scripting.c | 6 tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c | 2 tools/virtio/ringtest/run-on-all.sh | 5 virt/kvm/arm/vgic/vgic-init.c | 18 virt/kvm/arm/vgic/vgic-v2.c | 2 virt/kvm/arm/vgic/vgic-v3.c | 2 136 files changed, 1030 insertions(+), 814 deletions(-)
Adam Ford (2):
ARM: dts: omap3: Add DTS for Logic PD SOM-LV 37xx Dev Kit
ARM: dts: omap3: Fix Card Detect and Write Protect on Logic PD SOM-LV
Alexander Graf (1):
arm64: Fix swiotlb fallback allocation
Andy Shevchenko (1):
spi: pxa2xx: add missed break
Anton Blanchard (1):
powerpc: Ignore reserved field in DCSR and PVR reads and writes
Arnaldo Carvalho de Melo (2):
perf trace: Use the syscall raw_syscalls:sys_enter timestamp perf scripting: Avoid leaking the scripting_context variable
Arnd Bergmann (4):
IB/rxe: avoid putting a large struct rxe_qp on stack
ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation
platform: pxa_camera: add VIDEO_V4L2 dependency
s5p-cec: mark PM functions as __maybe_unused again
Benjamin Herrenschmidt (1):
powerpc/icp-opal: Fix missing KVM case and harden replay
Bjorn Helgaas (2):
x86/PCI: Ignore _CRS on Supermicro X8DTH-i/6/iF/6F
PCI: Enumerate switches below PCI-to-PCIe bridges
Bryant G. Ly (2):
ibmvscsis: Fix sleeping in interrupt context
ibmvscsis: Fix max transfer length
Chanwoo Choi (2):
PM / devfreq: exynos-bus: Fix the wrong return value
PM / devfreq: Fix the bug of devfreq_add_device when governor is NULL
Christian Borntraeger (1):
KVM: s390: do not expose random data via facility bitmap
Christopher Spinrath (1):
ARM: dts: imx6q-cm-fx6: fix fec pinctrl
Chuck Lever (2):
xprtrdma: Make FRWR send queue entry accounting more accurate
xprtrdma: Squelch "max send, max recv" messages at connect time
Dan Carpenter (4):
mtd: spi-nor: Off by one in cqspi_setup_flash()
mtd: spi-nor: Fix some error codes in cqspi_setup_flash()
blackfin: check devm_pinctrl_get() for errors
st-hva: fix some error handling in hva_hw_probe()
Dan Williams (1):
libnvdimm, namespace: fix pmem namespace leak, delete when size set to zero
Dave Martin (7):
powerpc/ptrace: Preserve previous fprs/vsrs on short regset write powerpc/ptrace: Preserve previous TM fprs/vsrs on short regset write arm64/ptrace: Preserve previous registers for short regset write arm64/ptrace: Preserve previous registers for short regset write - 2 arm64/ptrace: Preserve previous registers for short regset write - 3 arm64/ptrace: Avoid uninitialised struct padding in fpr_set() arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
David Sheets (1):
fuse: fix time_to_jiffies nsec sanity check
Eli Cohen (3):
IB/mlx5: Avoid system crash when enabling many VFs IB/mlx5: Fix reported max SGE calculation IB/mlx5: Wait for all async command completions to complete
Eran Ben Elisha (2):
IB/mlx4: When no DMFS for IPoIB, don't allow NET_IF QPs IB/mlx4: Check if GRH is available before using it
Ewan D. Milne (1):
scsi: ses: Fix SAS device detection in enclosure
Fabien Parent (1):
ARM: dts: da850-evm: fix read access to SPI flash
Gary Bisson (1):
ARM: dts: imx6qdl-nitrogen6_max: fix sgtl5000 pinctrl init
Geert Uytterhoeven (3):
ARM: dts: r8a7794: Use SYSC "always-on" PM Domain for sound
swiotlb: Convert swiotlb_force from int to enum
swiotlb: Add swiotlb=noforce debug option
Greg Kroah-Hartman (1):
Linux 4.9.6
Gu Zheng (1):
tmpfs: clear S_ISGID when setting posix ACLs
Halil Pasic (1):
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
Hans de Goede (1):
mmc: sdhci-acpi: Only powered up enabled acpi child devices
Hauke Mehrtens (2):
mtd: nand: xway: disable module support
mtd: nand: xway: fix build because of module functions
Ilya Dryomov (12):
libceph: ceph_x_encrypt_buflen() takes in_len
libceph: old_key in process_one_ticket() is redundant
libceph: introduce ceph_x_encrypt_offset()
libceph: introduce ceph_crypt() for in-place en/decryption
libceph: rename and align ceph_x_authorizer::reply_buf
libceph: tweak calcu_signature() a little
libceph: switch ceph_x_encrypt() to ceph_crypt()
libceph: switch ceph_x_decrypt() to ceph_crypt()
libceph: remove now unused ceph_*{en,de}crypt*() functions
libceph: make sure ceph_aes_crypt() IV is aligned
libceph: uninline ceph_crypto_key_destroy()
libceph: stop allocating a new cipher on every crypto request
J. Bruce Fields (1):
svcrpc: don't leak contexts on PROC_DESTROY
Jack Morgenstein (2):
IB/mlx4: Fix out-of-range array index in destroy qp flow IB/mlx4: Handle well-known-gid in mad_demux processing
James Bottomley (1):
scsi: mpt3sas: fix hang on ata passthrough commands
Javier Martinez Canillas (9):
ARM: dts: dra7: Add an empty chosen node to top level DTSI
ARM: dts: dm816x: Add an empty chosen node to top level DTSI
ARM: dts: dm814x: Add an empty chosen node to top level DTSI
ARM: dts: am33xx: Add an empty chosen node to top level DTSI
ARM: dts: omap4: Add an empty chosen node to top level DTSI
ARM: dts: omap5: Add an empty chosen node to top level DTSI
ARM: dts: am4372: Add an empty chosen node to top level DTSI
ARM: dts: omap3: Add an empty chosen node to top level DTSI
ARM: dts: omap2: Add an empty chosen node to top level DTSI
Jean-Jacques Hiblot (1):
ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
Jeff Layton (3):
ceph: fix bad endianness handling in parse_reply_info_extra
ceph: fix endianness of getattr mask in ceph_d_revalidate
ceph: fix endianness bug in frag_tree_split_cmp
Jiri Olsa (2):
perf mem: Fix --all-user/--all-kernel options perf trace: Check if MAP_32BIT is defined (again)
Johan Hovold (2):
HID: corsair: fix DMA buffers on stack
HID: corsair: fix control-transfer error handling
Johannes Berg (1):
mac80211: implement multicast forwarding on fast-RX path
Joonyoung Shim (1):
clocksource/exynos_mct: Clear interrupt when cpu is shut down
Kamal Heib (1):
IB/IPoIB: Remove can't use GFP_NOIO warning
Kan Liang (1):
perf diff: Do not overwrite valid build id
Leon Romanovsky (1):
IB/core: Release allocated memory in cache setup failure
Linus Walleij (1):
ARM: 8613/1: Fix the uaccess crash on PB11MPCore
Loic Pallardy (1):
rpmsg: virtio_rpmsg_bus: fix channel creation
Maciej Debski (1):
perf jit: Enable jitdump support without dwarf
Madhavan Srinivasan (2):
powerpc/perf: Fix PM_BRU_CMPL event code for power9 selftest/powerpc: Wrong PMC initialized in pmc56_overflow test
Maor Gottlieb (2):
IB/mlx5: Assign SRQ type earlier
IB/mlx4: Set traffic class in AH
Marc Zyngier (1):
KVM: arm/arm64: vgic: Fix deadlock on error handling
Marek Szyprowski (2):
s5p-mfc: Fix clock management in s5p_mfc_release() function
dmaengine: pl330: Fix runtime PM support for terminated transfers
Mark Rutland (2):
ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs
arm64: avoid returning from bad_mode
Murali Karicheri (1):
PCI: designware: Check for iATU unroll only on platforms that use ATU
Nicolas Iooss (1):
ite-cir: initialize use_demodulator before using it
Niklas Söderlund (1):
dmaengine: rcar-dmac: unmap slave resource when channel is freed
Nikolay Borisov (1):
ceph: fix scheduler warning due to nested blocking
Oleksandr Andrushchenko (1):
arm64: mm: avoid name clash in __page_to_voff()
Paul Donohue (1):
Input: ALPS - fix TrackStick support for SS5 hardware
Paul E. McKenney (2):
rcu: Remove cond_resched() from Tiny synchronize_sched()
rcu: Narrow early boot window of illegal synchronous grace periods
Quinn Tran (1):
qla2xxx: Fix crash due to null pointer access
Rabin Vincent (1):
perf callchain: Fixup help/config for no-unwinding
Richard Weinberger (1):
ubifs: Fix journal replay wrt. xattr nodes
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APIC irq_chip retrigger callback
Saeed Mahameed (1):
IB/mlx4: Fix port query for 56Gb Ethernet links
Scott Mayhew (1):
sunrpc: don't call sleeping functions from the notifier block callbacks
Sergei Shtylyov (1):
ARM: dts: r8a7794: remove Z clock
Sriharsha Basavapatna (1):
svcrdma: avoid duplicate dma unmapping during error recovery
Stefan Schmidt (1):
ieee802154: atusb: do not use the stack for buffers to make them DMA able
Stefan Wahren (2):
ARM: dts: bcm283x: fix typo in mailbox address
mmc: mxs-mmc: Fix additional cycles after transmission stop
Tahsin Erdogan (1):
fuse: clear FR_PENDING flag when moving requests out of pending queue
Vineet Gupta (1):
ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds
Vladimir Zapolskiy (4):
ARM: dts: imx31: fix clock control module interrupts description
ARM: dts: imx31: move CCM device node to AIPS2 bus devices
ARM: dts: imx31: fix AVIC base address
mtd: nand: lpc32xx: fix invalid error handling of a requested irq
Wei Yongjun (2):
gs1662: drop kfree for memory allocated with devm_kzalloc
soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()
Yan, Zheng (1):
ceph: fix ceph_get_caps() interruption
Yonatan Cohen (1):
IB/rxe: Increase max number of completions to 32k
Greg KH
maintainerDocumentation/devicetree/bindings/clock/imx31-clock.txt +1 -1
@@ -77,7 +77,7 @@ Examples: clks: ccm@53f80000{ compatible = "fsl,imx31-ccm"; reg = <0x53f80000 0x4000>; - interrupts = <0 31 0x04 0 53 0x04>; + interrupts = <31>, <53>; #clock-cells = <1>; };
Documentation/kernel-parameters.txt +2 -1
@@ -3998,10 +3998,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. it if 0 is given (See Documentation/cgroup-v1/memory.txt) swiotlb= [ARM,IA-64,PPC,MIPS,X86] - Format: { <int> | force } + Format: { <int> | force | noforce } <int> -- Number of I/O TLB slabs force -- force using of bounce buffers even if they wouldn't be automatically used by the kernel + noforce -- Never use bounce buffers (for debugging) switches= [HW,M68k]
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME = Roaring Lionus
arch/arc/Kconfig +1 -1
@@ -28,7 +28,7 @@ config ARC select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_MEMBLOCK - select HAVE_MOD_ARCH_SPECIFIC if ARC_DW2_UNWIND + select HAVE_MOD_ARCH_SPECIFIC select HAVE_OPROFILE select HAVE_PERF_EVENTS select HANDLE_DOMAIN_IRQ
arch/arc/include/asm/module.h +2 -2
@@ -14,13 +14,13 @@#include <asm-generic/module.h> -#ifdef CONFIG_ARC_DW2_UNWIND struct mod_arch_specific { +#ifdef CONFIG_ARC_DW2_UNWIND void *unw_info;int unw_sec_idx; +#endif const char *secstr; }; -#endif #define MODULE_PROC_FAMILY "ARC700"
arch/arc/kernel/module.c +3 -1
@@ -32,8 +32,8 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,#ifdef CONFIG_ARC_DW2_UNWIND mod->arch.unw_sec_idx =0 ; mod->arch.unw_info =NULL ; - mod->arch.secstr = secstr;#endif + mod->arch.secstr = secstr;return 0 ; }
@@ -113,8 +113,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, } +#ifdef CONFIG_ARC_DW2_UNWIND if (strcmp (module->arch.secstr+sechdrs[tgtsec].sh_name,".eh_frame" ) ==0 ) module->arch.unw_sec_idx = tgtsec; +#endif return 0 ;
arch/arm/boot/dts/Makefile +1 -0
@@ -485,6 +485,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \ am3517-evm.dtb \ am3517_mt_ventoux.dtb \ logicpd-torpedo-37xx-devkit.dtb \ + logicpd-som-lv-37xx-devkit.dtb \ omap3430-sdp.dtb \ omap3-beagle.dtb \ omap3-beagle-xm.dtb \
arch/arm/boot/dts/am33xx.dtsi +1 -0
@@ -16,6 +16,7 @@ interrupt-parent = <&intc>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { i2c0 = &i2c0;
arch/arm/boot/dts/am4372.dtsi +1 -0
@@ -16,6 +16,7 @@ interrupt-parent = <&wakeupgen>; #address-cells = <1>; #size-cells = <1>; + chosen { }; memory@0 { device_type = "memory";
arch/arm/boot/dts/bcm283x.dtsi +1 -1
@@ -104,7 +104,7 @@ reg = <0x7e104000 0x10>; }; - mailbox: mailbox@7e00b800 { + mailbox: mailbox@7e00b880 { compatible = "brcm,bcm2835-mbox"; reg = <0x7e00b880 0x40>; interrupts = <0 1>;
arch/arm/boot/dts/da850-evm.dts +1 -0
@@ -99,6 +99,7 @@ #size-cells = <1>; compatible = "m25p64"; spi-max-frequency = <30000000>; + m25p,fast-read; reg = <0>; partition@0 { label = "U-Boot-SPL";
arch/arm/boot/dts/dm814x.dtsi +1 -0
@@ -12,6 +12,7 @@ interrupt-parent = <&intc>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { i2c0 = &i2c1;
arch/arm/boot/dts/dm816x.dtsi +1 -0
@@ -12,6 +12,7 @@ interrupt-parent = <&intc>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { i2c0 = &i2c1;
arch/arm/boot/dts/dra7.dtsi +2 -0
@@ -18,6 +18,7 @@ compatible = "ti,dra7xx"; interrupt-parent = <&crossbar_mpu>; + chosen { }; aliases { i2c0 = &i2c1;
@@ -1376,6 +1377,7 @@ phy-names = "sata-phy"; clocks = <&sata_ref_clk>; ti,hwmods = "sata"; + ports-implemented = <0x1>; }; rtc: rtc@48838000 {
arch/arm/boot/dts/imx31.dtsi +9 -9
@@ -30,11 +30,11 @@ }; }; - avic: avic-interrupt-controller@60000000 { + avic: interrupt-controller@68000000 { compatible = "fsl,imx31-avic", "fsl,avic"; interrupt-controller; #interrupt-cells = <1>; - reg = <0x60000000 0x100000>; + reg = <0x68000000 0x100000>; }; soc {
@@ -118,13 +118,6 @@ interrupts = <19>; clocks = <&clks 25>; }; - - clks: ccm@53f80000{ - compatible = "fsl,imx31-ccm"; - reg = <0x53f80000 0x4000>; - interrupts = <0 31 0x04 0 53 0x04>; - #clock-cells = <1>; - }; }; aips@53f00000 { /* AIPS2 */
@@ -134,6 +127,13 @@ reg = <0x53f00000 0x100000>; ranges; + clks: ccm@53f80000{ + compatible = "fsl,imx31-ccm"; + reg = <0x53f80000 0x4000>; + interrupts = <31>, <53>; + #clock-cells = <1>; + }; + gpt: timer@53f90000 { compatible = "fsl,imx31-gpt"; reg = <0x53f90000 0x4000>;
arch/arm/boot/dts/imx6q-cm-fx6.dts +0 -1
@@ -183,7 +183,6 @@ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 - MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 >; };
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi +2 -2
@@ -319,8 +319,6 @@ compatible = "fsl,imx6q-nitrogen6_max-sgtl5000", "fsl,imx-audio-sgtl5000"; model = "imx6q-nitrogen6_max-sgtl5000"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_sgtl5000>; ssi-controller = <&ssi1>; audio-codec = <&codec>; audio-routing =
@@ -402,6 +400,8 @@ codec: sgtl5000@0a { compatible = "fsl,sgtl5000"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sgtl5000>; reg = <0x0a>; clocks = <&clks IMX6QDL_CLK_CKO>; VDDA-supply = <®_2p5v>;
arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts +3 -8
@@ -158,7 +158,7 @@ &mmc1 { interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>; pinctrl-names = "default"; - pinctrl-0 = <&mmc1_pins &mmc1_cd>; + pinctrl-0 = <&mmc1_pins>; wp-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; /* gpio_126 */ cd-gpios = <&gpio4 14 IRQ_TYPE_LEVEL_LOW>; /* gpio_110 */ vmmc-supply = <&vmmc1>;
@@ -193,7 +193,8 @@ OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ - OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_strobe.gpio_126 sdmmc1_wp*/ + OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_strobe.gpio_126 */ + OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_d11.gpio_110 */ >; };
@@ -242,12 +243,6 @@ OMAP3_WKUP_IOPAD(0x2a16, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4) /* sys_boot6.gpio_8 */ >; }; - - mmc1_cd: pinmux_mmc1_cd { - pinctrl-single,pins = < - OMAP3_WKUP_IOPAD(0x212c, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_d11.gpio_110 */ - >; - }; };
arch/arm/boot/dts/omap2.dtsi +1 -0
@@ -17,6 +17,7 @@ interrupt-parent = <&intc>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { serial0 = &uart1;
arch/arm/boot/dts/omap3.dtsi +1 -0
@@ -17,6 +17,7 @@ interrupt-parent = <&intc>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { i2c0 = &i2c1;
arch/arm/boot/dts/omap4.dtsi +1 -0
@@ -15,6 +15,7 @@ interrupt-parent = <&wakeupgen>; #address-cells = <1>; #size-cells = <1>; + chosen { }; aliases { i2c0 = &i2c1;
arch/arm/boot/dts/omap5.dtsi +2 -0
@@ -17,6 +17,7 @@ compatible = "ti,omap5"; interrupt-parent = <&wakeupgen>; + chosen { }; aliases { i2c0 = &i2c1;
@@ -985,6 +986,7 @@ phy-names = "sata-phy"; clocks = <&sata_ref_clk>; ti,hwmods = "sata"; + ports-implemented = <0x1>; }; dss: dss@58000000 {
arch/arm/boot/dts/r8a7794.dtsi +3 -4
@@ -319,7 +319,7 @@ "ch12"; clocks = <&mstp5_clks R8A7794_CLK_AUDIO_DMAC0>; clock-names = "fck"; - power-domains = <&cpg_clocks>; + power-domains = <&sysc R8A7794_PD_ALWAYS_ON>; #dma-cells = <1>; dma-channels = <13>; };
@@ -1025,8 +1025,7 @@ clocks = <&extal_clk &usb_extal_clk>; #clock-cells = <1>; clock-output-names = "main", "pll0", "pll1", "pll3", - "lb", "qspi", "sdh", "sd0", "z", - "rcan"; + "lb", "qspi", "sdh", "sd0", "rcan"; #power-domain-cells = <0>; }; /* Variable factor clocks */
@@ -1483,7 +1482,7 @@ "mix.0", "mix.1", "dvc.0", "dvc.1", "clk_a", "clk_b", "clk_c", "clk_i"; - power-domains = <&cpg_clocks>; + power-domains = <&sysc R8A7794_PD_ALWAYS_ON>; status = "disabled";
arch/arm/include/asm/cputype.h +3 -0
@@ -94,6 +94,9 @@#define ARM_CPU_XSCALE_ARCH_V2 0x4000#define ARM_CPU_XSCALE_ARCH_V3 0x6000 +/* Qualcomm implemented cores */ +#define ARM_CPU_PART_SCORPION 0x510002d0 +extern unsigned int processor_id;#ifdef CONFIG_CPU_CP15
arch/arm/kernel/hw_breakpoint.c +16 -0
@@ -1066,6 +1066,22 @@ static int __init arch_hw_breakpoint_init(void)return 0 ; } +/* +* Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD +* whenever a WFI is issued, even if the core is not powered down, in +* violation of the architecture. When DBGPRSR.SPD is set, accesses to +* breakpoint and watchpoint registers are treated as undefined, so +* this results in boot time and runtime failures when these are +* accessed and we unexpectedly take a trap. +* +* It's not clear if/how this can be worked around, so we blacklist +* Scorpion CPUs to avoid these issues. +*/ +if (read_cpuid_part () ==ARM_CPU_PART_SCORPION ) { +pr_info ("Scorpion CPU detected. Hardware breakpoints and watchpoints disabled\n" ); +return 0 ; + } + has_ossr =core_has_os_save_restore ();/* Determine how many BRPs/WRPs are available. */
arch/arm/kernel/smp_tlb.c +7 -0
@@ -9,6 +9,7 @@*/ #include <linux/preempt.h> #include <linux/smp.h> +#include <linux/uaccess.h> #include <asm/smp_plat.h> #include <asm/tlbflush.h>
@@ -40,8 +41,11 @@ static inline void ipi_flush_tlb_mm(void *arg)static inline void ipi_flush_tlb_page (void *arg) {struct tlb_args *ta = (struct tlb_args *)arg; +unsigned int __ua_flags =uaccess_save_and_enable ();local_flush_tlb_page (ta->ta_vma, ta->ta_start); + +uaccess_restore (__ua_flags); }static inline void ipi_flush_tlb_kernel_page (void *arg)
@@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_page(void *arg)static inline void ipi_flush_tlb_range (void *arg) {struct tlb_args *ta = (struct tlb_args *)arg; +unsigned int __ua_flags =uaccess_save_and_enable ();local_flush_tlb_range (ta->ta_vma, ta->ta_start, ta->ta_end); + +uaccess_restore (__ua_flags); }static inline void ipi_flush_tlb_kernel_range (void *arg)
arch/arm/mach-ux500/pm.c +2 -2
@@ -134,8 +134,8 @@ bool prcmu_pending_irq(void)*/ bool prcmu_is_cpu_in_wfi (int cpu) { -return readl (PRCM_ARM_WFI_STANDBY ) & cpu ?PRCM_ARM_WFI_STANDBY_WFI1 : -PRCM_ARM_WFI_STANDBY_WFI0 ; +return readl (PRCM_ARM_WFI_STANDBY ) & + (cpu ?PRCM_ARM_WFI_STANDBY_WFI1 :PRCM_ARM_WFI_STANDBY_WFI0 ); }/*
arch/arm64/include/asm/memory.h +1 -1
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x)#define _virt_addr_valid (kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)#else #define __virt_to_pgoff (kaddr) (((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page)) -#define __page_to_voff (page) (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page)) +#define __page_to_voff (kaddr) (((u64)(kaddr) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))#define page_to_virt (page) ((void *)((__page_to_voff(page)) | PAGE_OFFSET))#define virt_to_page (vaddr) ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
arch/arm64/include/uapi/asm/ptrace.h +1 -0
@@ -77,6 +77,7 @@ struct user_fpsimd_state {__uint128_t vregs[32 ];__u32 fpsr;__u32 fpcr; +__u32 __reserved[2 ]; };struct user_hwdebug_state {
arch/arm64/kernel/entry.S +1 -1
@@ -624,7 +624,7 @@ el0_inv: mov x0, sp mov x1, #BAD_SYNC mov x2, x25 - bl bad_mode + bl bad_el0_sync b ret_to_user ENDPROC(el0_sync)
arch/arm64/kernel/ptrace.c +11 -5
@@ -550,6 +550,8 @@ static int hw_break_set(struct task_struct *target,/* (address, ctrl) registers */ limit = regset->n * regset->size;while (count && offset < limit) { +if (count <PTRACE_HBP_ADDR_SZ ) +return -EINVAL ; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &addr, offset, offset +PTRACE_HBP_ADDR_SZ );if (ret)
@@ -559,6 +561,8 @@ static int hw_break_set(struct task_struct *target,return ret; offset +=PTRACE_HBP_ADDR_SZ ; +if (!count) +break ; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &ctrl, offset, offset +PTRACE_HBP_CTRL_SZ );if (ret)
@@ -595,7 +599,7 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; -struct user_pt_regs newregs; +struct user_pt_regs newregs =task_pt_regs (target)->user_regs; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &newregs,0 ,-1 );if (ret)
@@ -625,7 +629,8 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; -struct user_fpsimd_state newstate; +struct user_fpsimd_state newstate = + target->thread.fpsimd_state.user_fpsimd; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &newstate,0 ,-1 );if (ret)
@@ -649,7 +654,7 @@ static int tls_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; -unsigned long tls; +unsigned long tls = target->thread.tp_value; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &tls,0 ,-1 );if (ret)
@@ -675,7 +680,8 @@ static int system_call_set(struct task_struct *target, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { - int syscallno, ret; + int syscallno = task_pt_regs(target)->syscallno; +int ret; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &syscallno,0 ,-1 );if (ret)
@@ -947,7 +953,7 @@ static int compat_tls_set(struct task_struct *target, const void __user *ubuf) {int ret; -compat_ulong_t tls; +compat_ulong_t tls = target->thread.tp_value; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &tls,0 ,-1 );if (ret)
arch/arm64/kernel/traps.c +24 -4
@@ -596,17 +596,34 @@ const char *esr_get_class_string(u32 esr) }/* -* bad_mode handles the impossible case in the exception vector. +* bad_mode handles the impossible case in the exception vector. This is always +* fatal. */ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) { -siginfo_t info; -void __user *pc = (void __user *)instruction_pointer (regs);console_verbose ();pr_crit ("Bad mode in %s handler detected on CPU%d, code 0x%08x -- %s\n" , handler[reason],smp_processor_id (), esr,esr_get_class_string (esr)); + +die ("Oops - bad mode" , regs,0 ); +local_irq_disable (); +panic ("bad mode" ); +} + +/* +* bad_el0_sync handles unexpected, but potentially recoverable synchronous +* exceptions taken from EL0. Unlike bad_mode, this returns. +*/ +asmlinkage void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr) +{ +siginfo_t info; +void __user *pc = (void __user *)instruction_pointer (regs); +console_verbose (); + +pr_crit ("Bad EL0 synchronous exception detected on CPU%d, code 0x%08x -- %s\n" , +smp_processor_id (), esr,esr_get_class_string (esr));__show_regs (regs); info.si_signo =SIGILL ;
@@ -614,7 +631,10 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) info.si_code =ILL_ILLOPC ; info.si_addr = pc; -arm64_notify_die ("Oops - bad mode" , regs, &info,0 ); + current->thread.fault_address =0 ; + current->thread.fault_code =0 ; + +force_sig_info (info.si_signo, &info, current); }void __pte_error (const char *file,int line,unsigned long val)
arch/arm64/mm/dma-mapping.c +2 -1
@@ -524,7 +524,8 @@ EXPORT_SYMBOL(dummy_dma_ops);static int __init arm64_dma_init (void ) { -if (swiotlb_force || max_pfn > (arm64_dma_phys_limit >>PAGE_SHIFT )) +if (swiotlb_force ==SWIOTLB_FORCE || + max_pfn > (arm64_dma_phys_limit >>PAGE_SHIFT )) swiotlb =1 ;return atomic_pool_init ();
arch/arm64/mm/init.c +4 -1
@@ -401,8 +401,11 @@ static void __init free_unused_memmap(void)*/ void __init mem_init (void ) { -if (swiotlb_force || max_pfn > (arm64_dma_phys_limit >>PAGE_SHIFT )) +if (swiotlb_force ==SWIOTLB_FORCE || + max_pfn > (arm64_dma_phys_limit >>PAGE_SHIFT ))swiotlb_init (1 ); +else + swiotlb_force =SWIOTLB_NO_FORCE ;set_max_mapnr (pfn_to_page (max_pfn) - mem_map);
arch/powerpc/include/asm/ppc-opcode.h +5 -5
@@ -157,7 +157,7 @@#define PPC_INST_MCRXR 0x7c000400#define PPC_INST_MCRXR_MASK 0xfc0007fe#define PPC_INST_MFSPR_PVR 0x7c1f42a6 -#define PPC_INST_MFSPR_PVR_MASK 0xfc1fffff +#define PPC_INST_MFSPR_PVR_MASK 0xfc1ffffe#define PPC_INST_MFTMR 0x7c0002dc#define PPC_INST_MSGSND 0x7c00019c#define PPC_INST_MSGCLR 0x7c0001dc
@@ -174,13 +174,13 @@#define PPC_INST_RFDI 0x4c00004e#define PPC_INST_RFMCI 0x4c00004c#define PPC_INST_MFSPR_DSCR 0x7c1102a6 -#define PPC_INST_MFSPR_DSCR_MASK 0xfc1fffff +#define PPC_INST_MFSPR_DSCR_MASK 0xfc1ffffe#define PPC_INST_MTSPR_DSCR 0x7c1103a6 -#define PPC_INST_MTSPR_DSCR_MASK 0xfc1fffff +#define PPC_INST_MTSPR_DSCR_MASK 0xfc1ffffe#define PPC_INST_MFSPR_DSCR_USER 0x7c0302a6 -#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1fffff +#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1ffffe#define PPC_INST_MTSPR_DSCR_USER 0x7c0303a6 -#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1fffff +#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1ffffe#define PPC_INST_MFVSRD 0x7c000066#define PPC_INST_MTVSRD 0x7c000166#define PPC_INST_SLBFEE 0x7c0007a7
arch/powerpc/kernel/ptrace.c +14 -0
@@ -463,6 +463,10 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset,flush_fp_to_thread (target); +for (i =0 ; i <32 ; i++) + buf[i] = target->thread.TS_FPR (i); + buf[32 ] = target->thread.fp_state.fpscr; +/* copy to local buffer then write that out */ i =user_regset_copyin (&pos, &count, &kbuf, &ubuf, buf,0 ,-1 );if (i)
@@ -672,6 +676,9 @@ static int vsr_set(struct task_struct *target, const struct user_regset *regset,flush_altivec_to_thread (target);flush_vsx_to_thread (target); +for (i =0 ; i <32 ; i++) + buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET ]; + ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, buf,0 ,32 *sizeof (double ));if (!ret)
@@ -1019,6 +1026,10 @@ static int tm_cfpr_set(struct task_struct *target,flush_fp_to_thread (target);flush_altivec_to_thread (target); +for (i =0 ; i <32 ; i++) + buf[i] = target->thread.TS_CKFPR (i); + buf[32 ] = target->thread.ckfp_state.fpscr; +/* copy to local buffer then write that out */ i =user_regset_copyin (&pos, &count, &kbuf, &ubuf, buf,0 ,-1 );if (i)
@@ -1283,6 +1294,9 @@ static int tm_cvsx_set(struct task_struct *target,flush_altivec_to_thread (target);flush_vsx_to_thread (target); +for (i =0 ; i <32 ; i++) + buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET ]; + ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, buf,0 ,32 *sizeof (double ));if (!ret)
arch/powerpc/perf/power9-events-list.h +1 -1
@@ -16,7 +16,7 @@ EVENT(PM_CYC, 0x0001e) EVENT(PM_ICT_NOSLOT_CYC, 0x100f8) EVENT(PM_CMPLU_STALL, 0x1e054) EVENT(PM_INST_CMPL, 0x00002) -EVENT(PM_BRU_CMPL, 0x40060) +EVENT(PM_BRU_CMPL, 0x10012)EVENT (PM_BR_MPRED_CMPL ,0x400f6 )/* All L1 D cache load references counted at finish, gated by reject */
arch/powerpc/sysdev/xics/icp-opal.c +24 -7
@@ -20,6 +20,7 @@#include <asm/xics.h> #include <asm/io.h> #include <asm/opal.h> +#include <asm/kvm_ppc.h> static void icp_opal_teardown_cpu (void ) {
@@ -39,7 +40,26 @@ static void icp_opal_flush_ipi(void)* Should we be flagging idle loop instead? * Or creating some task to be scheduled? */ -opal_int_eoi ((0x00 <<24 ) |XICS_IPI ); +if (opal_int_eoi ((0x00 <<24 ) |XICS_IPI ) >0 ) +force_external_irq_replay (); +} + +static unsigned int icp_opal_get_xirr (void ) +{ +unsigned int kvm_xirr; +__be32 hw_xirr; +int64_t rc; + +/* Handle an interrupt latched by KVM first */ + kvm_xirr =kvmppc_get_xics_latch (); +if (kvm_xirr) +return kvm_xirr; + +/* Then ask OPAL */ + rc =opal_int_get_xirr (&hw_xirr, false); +if (rc <0 ) +return 0 ; +return be32_to_cpu (hw_xirr); }static unsigned int icp_opal_get_irq (void )
@@ -47,12 +67,8 @@ static unsigned int icp_opal_get_irq(void)unsigned int xirr;unsigned int vec;unsigned int irq; -int64_t rc; - rc =opal_int_get_xirr (&xirr, false); -if (rc <0 ) -return 0 ; - xirr =be32_to_cpu (xirr); + xirr =icp_opal_get_xirr (); vec = xirr &0x00ffffff ;if (vec ==XICS_IRQ_SPURIOUS )return 0 ;
@@ -67,7 +83,8 @@ static unsigned int icp_opal_get_irq(void)xics_mask_unknown_vec (vec);/* We might learn about it later, so EOI it */ -opal_int_eoi (xirr); +if (opal_int_eoi (xirr) >0 ) +force_external_irq_replay ();return 0 ; }
arch/s390/kvm/kvm-s390.c +2 -2
@@ -916,7 +916,7 @@ static int kvm_s390_get_machine(struct kvm *kvm, struct kvm_device_attr *attr)memcpy (&mach->fac_mask, kvm->arch.model.fac_mask,S390_ARCH_FAC_LIST_SIZE_BYTE );memcpy ((unsigned long *)&mach->fac_list, S390_lowcore.stfle_fac_list, -S390_ARCH_FAC_LIST_SIZE_BYTE ); +sizeof (S390_lowcore.stfle_fac_list));if (copy_to_user ((void __user *)attr->addr, mach,sizeof (*mach))) ret = -EFAULT ;kfree (mach);
@@ -1437,7 +1437,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)/* Populate the facility mask initially. */ memcpy (kvm->arch.model.fac_mask, S390_lowcore.stfle_fac_list, -S390_ARCH_FAC_LIST_SIZE_BYTE ); +sizeof (S390_lowcore.stfle_fac_list));for (i =0 ; i <S390_ARCH_FAC_LIST_SIZE_U64 ; i++) {if (i <kvm_s390_fac_list_mask_size ()) kvm->arch.model.fac_mask[i] &= kvm_s390_fac_list_mask[i];
arch/x86/kernel/apic/io_apic.c +2 -0
@@ -1876,6 +1876,7 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, + .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
@@ -1887,6 +1888,7 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, + .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
arch/x86/kernel/pci-swiotlb.c +1 -1
@@ -70,7 +70,7 @@ int __init pci_swiotlb_detect_override(void) {int use_swiotlb = swiotlb | swiotlb_force; -if (swiotlb_force) +if (swiotlb_force ==SWIOTLB_FORCE ) swiotlb =1 ;return use_swiotlb;
arch/x86/pci/acpi.c +10 -0
@@ -114,6 +114,16 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = { DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), }, }, +/* https://bugzilla.kernel.org/show_bug.cgi?id=42606 */ + { + .callback = set_nouse_crs, + .ident = "Supermicro X8DTH", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Supermicro" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"X8DTH-i/6/iF/6F" ), + DMI_MATCH(DMI_BIOS_VERSION, "2.0a"), + }, + }, /* https://bugzilla.kernel.org/show_bug.cgi?id=15362 */ {
arch/x86/xen/pci-swiotlb-xen.c +1 -1
@@ -49,7 +49,7 @@ int __init pci_xen_swiotlb_detect(void)* activate this IOMMU. If running as PV privileged, activate it * irregardless. */ -if ((xen_initial_domain () || swiotlb || swiotlb_force)) +if (xen_initial_domain () || swiotlb || swiotlb_force ==SWIOTLB_FORCE ) xen_swiotlb =1 ;/* If we are running under Xen, we MUST disable the native SWIOTLB.
drivers/clocksource/exynos_mct.c +1 -0
@@ -495,6 +495,7 @@ static int exynos4_mct_dying_cpu(unsigned int cpu)if (mct_int_type ==MCT_INT_SPI ) {if (evt->irq !=-1 )disable_irq_nosync (evt->irq); +exynos4_mct_write (0x1 , mevt->base +MCT_L_INT_CSTAT_OFFSET ); }else {disable_percpu_irq (mct_irqs[MCT_L0_IRQ ]); }
drivers/devfreq/devfreq.c +10 -5
@@ -593,11 +593,16 @@ struct devfreq *devfreq_add_device(struct device *dev,list_add (&devfreq->node, &devfreq_list); governor =find_devfreq_governor (devfreq->governor_name); -if (!IS_ERR (governor)) - devfreq->governor = governor; -if (devfreq->governor) - err = devfreq->governor->event_handler (devfreq, -DEVFREQ_GOV_START ,NULL ); +if (IS_ERR (governor)) { +dev_err (dev,"%s: Unable to find governor for the device\n" , + __func__); + err =PTR_ERR (governor); + goto err_init; + } + + devfreq->governor = governor; + err = devfreq->governor->event_handler (devfreq,DEVFREQ_GOV_START , +NULL );if (err) {dev_err (dev,"%s: Unable to start governor for the device\n" , __func__);
drivers/devfreq/exynos-bus.c +1 -1
@@ -498,7 +498,7 @@ static int exynos_bus_probe(struct platform_device *pdev)if (IS_ERR (bus->devfreq)) {dev_err (dev,"failed to add devfreq dev with passive governor\n" ); - ret = -EPROBE_DEFER ; + ret =PTR_ERR (bus->devfreq); goto err; }
drivers/dma/pl330.c +11 -0
@@ -448,6 +448,9 @@ struct dma_pl330_chan {/* for cyclic capability */ bool cyclic; + +/* for runtime pm tracking */ +bool active; };struct pl330_dmac {
@@ -2031,6 +2034,7 @@ static void pl330_tasklet(unsigned long data)_stop (pch->thread);spin_unlock (&pch->thread->dmac->lock); power_down = true; + pch->active = false; }else {/* Make sure the PL330 Channel thread is active */ spin_lock (&pch->thread->dmac->lock);
@@ -2050,6 +2054,7 @@ static void pl330_tasklet(unsigned long data) desc->status =PREP ;list_move_tail (&desc->node, &pch->work_list);if (power_down) { + pch->active = true;spin_lock (&pch->thread->dmac->lock);_start (pch->thread);spin_unlock (&pch->thread->dmac->lock);
@@ -2164,6 +2169,7 @@ static int pl330_terminate_all(struct dma_chan *chan)unsigned long flags;struct pl330_dmac *pl330 = pch->dmac;LIST_HEAD (list); +bool power_down = false;pm_runtime_get_sync (pl330->ddma.dev);spin_lock_irqsave (&pch->lock, flags);
@@ -2174,6 +2180,8 @@ static int pl330_terminate_all(struct dma_chan *chan) pch->thread->req[0 ].desc =NULL ; pch->thread->req[1 ].desc =NULL ; pch->thread->req_running =-1 ; + power_down = pch->active; + pch->active = false;/* Mark all desc done */ list_for_each_entry (desc, &pch->submitted_list, node) {
@@ -2191,6 +2199,8 @@ static int pl330_terminate_all(struct dma_chan *chan)list_splice_tail_init (&pch->completed_list, &pl330->desc_pool);spin_unlock_irqrestore (&pch->lock, flags);pm_runtime_mark_last_busy (pl330->ddma.dev); +if (power_down) +pm_runtime_put_autosuspend (pl330->ddma.dev);pm_runtime_put_autosuspend (pl330->ddma.dev);return 0 ;
@@ -2350,6 +2360,7 @@ static void pl330_issue_pending(struct dma_chan *chan)* updated on work_list emptiness status. */ WARN_ON (list_empty (&pch->submitted_list)); + pch->active = true;pm_runtime_get_sync (pch->dmac->ddma.dev); }list_splice_tail_init (&pch->submitted_list, &pch->work_list);
drivers/dma/sh/rcar-dmac.c +8 -0
@@ -986,6 +986,7 @@ static void rcar_dmac_free_chan_resources(struct dma_chan *chan) {struct rcar_dmac_chan *rchan =to_rcar_dmac_chan (chan);struct rcar_dmac *dmac =to_rcar_dmac (chan->device); +struct rcar_dmac_chan_map *map = &rchan->map;struct rcar_dmac_desc_page *page, *_page;struct rcar_dmac_desc *desc;LIST_HEAD (list);
@@ -1019,6 +1020,13 @@ static void rcar_dmac_free_chan_resources(struct dma_chan *chan)free_page ((unsigned long )page); } +/* Remove slave mapping if present. */ +if (map->slave.xfer_size) { +dma_unmap_resource (chan->device->dev, map->addr, + map->slave.xfer_size, map->dir,0 ); + map->slave.xfer_size =0 ; + } +pm_runtime_put (chan->device->dev); }
drivers/hid/hid-corsair.c +45 -15
124 lines not on this page · raw message
drivers/infiniband/core/cache.c +7 -9
@@ -770,12 +770,8 @@ static int _gid_table_setup_one(struct ib_device *ib_dev)int err =0 ; table =kcalloc (ib_dev->phys_port_cnt,sizeof (*table),GFP_KERNEL ); - -if (!table) { -pr_warn ("failed to allocate ib gid cache for %s\n" , - ib_dev->name); +if (!table)return -ENOMEM ; - }for (port =0 ; port < ib_dev->phys_port_cnt; port++) {u8 rdma_port = port +rdma_start_port (ib_dev);
@@ -1170,14 +1166,13 @@ int ib_cache_setup_one(struct ib_device *device) GFP_KERNEL);if (!device->cache.pkey_cache || !device->cache.lmc_cache) { -pr_warn ("Couldn't allocate cache for %s\n" , device->name); -return -ENOMEM ; + err = -ENOMEM ; + goto free; } err =gid_table_setup_one (device);if (err) -/* Allocated memory will be cleaned in the release function */ -return err; + goto free;for (p =0 ; p <=rdma_end_port (device) -rdma_start_port (device); ++p)ib_cache_update (device, p +rdma_start_port (device));
@@ -1192,6 +1187,9 @@ int ib_cache_setup_one(struct ib_device *device) err:gid_table_cleanup_one (device); +free: +kfree (device->cache.pkey_cache); +kfree (device->cache.lmc_cache);return err; }
drivers/infiniband/hw/mlx4/ah.c +4 -2
@@ -114,7 +114,9 @@ static struct ib_ah *create_iboe_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr !(1 << ah->av.eth.stat_rate & dev->caps.stat_rate_support)) --ah->av.eth.stat_rate; } - + ah->av.eth.sl_tclass_flowlabel |= +cpu_to_be32 ((ah_attr->grh.traffic_class <<20 ) | + ah_attr->grh.flow_label);/* * HW requires multicast LID so we just choose one. */
@@ -122,7 +124,7 @@ static struct ib_ah *create_iboe_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr ah->av.ib.dlid =cpu_to_be16 (0xc000 );memcpy (ah->av.eth.dgid, ah_attr->grh.dgid.raw,16 ); - ah->av.eth.sl_tclass_flowlabel =cpu_to_be32 (ah_attr->sl <<29 ); + ah->av.eth.sl_tclass_flowlabel |=cpu_to_be32 (ah_attr->sl <<29 );return &ah->ibah; }
drivers/infiniband/hw/mlx4/mad.c +12 -4
@@ -702,10 +702,18 @@ static int mlx4_ib_demux_mad(struct ib_device *ibdev, u8 port,/* If a grh is present, we demux according to it */ if (wc->wc_flags &IB_WC_GRH ) { - slave =mlx4_ib_find_real_gid (ibdev, port, grh->dgid.global.interface_id); -if (slave <0 ) { -mlx4_ib_warn (ibdev,"failed matching grh\n" ); -return -ENOENT ; +if (grh->dgid.global.interface_id == +cpu_to_be64 (IB_SA_WELL_KNOWN_GUID ) && + grh->dgid.global.subnet_prefix ==cpu_to_be64 ( +atomic64_read (&dev->sriov.demux[port -1 ].subnet_prefix))) { + slave =0 ; + }else { + slave =mlx4_ib_find_real_gid (ibdev, port, + grh->dgid.global.interface_id); +if (slave <0 ) { +mlx4_ib_warn (ibdev,"failed matching grh\n" ); +return -ENOENT ; + } } }/* Class-specific handling */
drivers/infiniband/hw/mlx4/main.c +18 -11
@@ -697,9 +697,11 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,if (err) goto out; - props->active_width = (((u8 *)mailbox->buf)[5 ] ==0x40 ) ? -IB_WIDTH_4X :IB_WIDTH_1X ; - props->active_speed =IB_SPEED_QDR ; + props->active_width = (((u8 *)mailbox->buf)[5 ] ==0x40 ) || + (((u8 *)mailbox->buf)[5 ] ==0x20 /*56Gb*/ ) ? +IB_WIDTH_4X :IB_WIDTH_1X ; + props->active_speed = (((u8 *)mailbox->buf)[5 ] ==0x20 /*56Gb*/ ) ? +IB_SPEED_FDR :IB_SPEED_QDR ; props->port_cap_flags =IB_PORT_CM_SUP |IB_PORT_IP_BASED_GIDS ; props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; props->max_msg_sz = mdev->dev->caps.max_msg_sz;
@@ -2820,14 +2822,19 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) goto err_steer_qp_release; } -bitmap_zero (ibdev->ib_uc_qpns_bitmap, ibdev->steer_qpn_count); - - err =mlx4_FLOW_STEERING_IB_UC_QP_RANGE ( - dev, ibdev->steer_qpn_base, - ibdev->steer_qpn_base + - ibdev->steer_qpn_count -1 ); -if (err) - goto err_steer_free_bitmap; +if (dev->caps.flags2 &MLX4_DEV_CAP_FLAG2_DMFS_IPOIB ) { +bitmap_zero (ibdev->ib_uc_qpns_bitmap, + ibdev->steer_qpn_count); + err =mlx4_FLOW_STEERING_IB_UC_QP_RANGE ( + dev, ibdev->steer_qpn_base, + ibdev->steer_qpn_base + + ibdev->steer_qpn_count -1 ); +if (err) + goto err_steer_free_bitmap; + }else { +bitmap_fill (ibdev->ib_uc_qpns_bitmap, + ibdev->steer_qpn_count); + } }for (j =1 ; j <= ibdev->dev->caps.num_ports; j++)
drivers/infiniband/hw/mlx4/qp.c +4 -3
@@ -1280,7 +1280,8 @@ static int _mlx4_ib_destroy_qp(struct ib_qp *qp)if (is_qp0 (dev, mqp))mlx4_CLOSE_PORT (dev->dev, mqp->port); -if (dev->qp1_proxy[mqp->port -1 ] == mqp) { +if (mqp->mlx4_ib_qp_type ==MLX4_IB_QPT_PROXY_GSI && + dev->qp1_proxy[mqp->port -1 ] == mqp) {mutex_lock (&dev->qp1_proxy_lock[mqp->port -1 ]); dev->qp1_proxy[mqp->port -1 ] =NULL ;mutex_unlock (&dev->qp1_proxy_lock[mqp->port -1 ]);
@@ -1764,14 +1765,14 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,u8 port_num =mlx4_is_bonded (to_mdev (ibqp->device)->dev) ?1 : attr_mask &IB_QP_PORT ? attr->port_num : qp->port;union ib_gid gid; -struct ib_gid_attr gid_attr; +struct ib_gid_attr gid_attr = {.gid_type =IB_GID_TYPE_IB };u16 vlan =0xffff ;u8 smac[ETH_ALEN ];int status =0 ;int is_eth =rdma_cap_eth_ah (&dev->ib_dev, port_num) && attr->ah_attr.ah_flags &IB_AH_GRH ; -if (is_eth) { +if (is_eth && attr->ah_attr.ah_flags &IB_AH_GRH ) {int index = attr->ah_attr.grh.sgid_index; status = ib_get_cached_gid(ibqp->device, port_num,
drivers/infiniband/hw/mlx5/main.c +5 -3
@@ -496,6 +496,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,struct mlx5_ib_dev *dev =to_mdev (ibdev);struct mlx5_core_dev *mdev = dev->mdev;int err = -ENOMEM ; +int max_sq_desc;int max_rq_sg;int max_sq_sg;u64 min_page_size =1ull <<MLX5_CAP_GEN (mdev, log_pg_sz);
@@ -618,9 +619,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, props->max_qp_wr =1 <<MLX5_CAP_GEN (mdev, log_max_qp_sz); max_rq_sg =MLX5_CAP_GEN (mdev, max_wqe_sz_rq) /sizeof (struct mlx5_wqe_data_seg ); - max_sq_sg = (MLX5_CAP_GEN (mdev, max_wqe_sz_sq) - -sizeof (struct mlx5_wqe_ctrl_seg )) / -sizeof (struct mlx5_wqe_data_seg ); + max_sq_desc =min_t (int,MLX5_CAP_GEN (mdev, max_wqe_sz_sq),512 ); + max_sq_sg = (max_sq_desc -sizeof (struct mlx5_wqe_ctrl_seg ) - +sizeof (struct mlx5_wqe_raddr_seg )) / +sizeof (struct mlx5_wqe_data_seg ); props->max_sge =min (max_rq_sg, max_sq_sg); props->max_sge_rd =MLX5_MAX_SGE_RD ; props->max_cq =1 <<MLX5_CAP_GEN (mdev, log_max_cq);
drivers/infiniband/hw/mlx5/mr.c +30 -1
@@ -628,7 +628,8 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev) ent->order = i +2 ; ent->dev = dev; -if (dev->mdev->profile->mask &MLX5_PROF_MASK_MR_CACHE ) +if ((dev->mdev->profile->mask &MLX5_PROF_MASK_MR_CACHE ) && + (mlx5_core_is_pf (dev->mdev))) limit = dev->mdev->profile->mr_cache[i].limit;else limit =0 ;
@@ -646,6 +647,33 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev)return 0 ; } +static void wait_for_async_commands (struct mlx5_ib_dev *dev) +{ +struct mlx5_mr_cache *cache = &dev->cache; +struct mlx5_cache_ent *ent; +int total =0 ; +int i; +int j; + +for (i =0 ; i <MAX_MR_CACHE_ENTRIES ; i++) { + ent = &cache->ent[i]; +for (j =0 ; j <1000 ; j++) { +if (!ent->pending) +break ; +msleep (50 ); + } + } +for (i =0 ; i <MAX_MR_CACHE_ENTRIES ; i++) { + ent = &cache->ent[i]; + total += ent->pending; + } + +if (total) +mlx5_ib_warn (dev,"aborted while there are %d pending mr requests\n" , total); +else +mlx5_ib_warn (dev,"done with all pending requests\n" ); +} +int mlx5_mr_cache_cleanup (struct mlx5_ib_dev *dev) {int i;
@@ -659,6 +687,7 @@ int mlx5_mr_cache_cleanup(struct mlx5_ib_dev *dev)clean_keys (dev, i);destroy_workqueue (dev->cache.wq); +wait_for_async_commands (dev);del_timer_sync (&dev->delay_timer);return 0 ;
drivers/infiniband/hw/mlx5/qp.c +28 -1
@@ -351,6 +351,29 @@ static int calc_send_wqe(struct ib_qp_init_attr *attr)return ALIGN (max_t (int, inl_size, size),MLX5_SEND_WQE_BB ); } +static int get_send_sge (struct ib_qp_init_attr *attr,int wqe_size) +{ +int max_sge; + +if (attr->qp_type ==IB_QPT_RC ) + max_sge = (min_t (int, wqe_size,512 ) - +sizeof (struct mlx5_wqe_ctrl_seg ) - +sizeof (struct mlx5_wqe_raddr_seg )) / +sizeof (struct mlx5_wqe_data_seg ); +else if (attr->qp_type ==IB_QPT_XRC_INI ) + max_sge = (min_t (int, wqe_size,512 ) - +sizeof (struct mlx5_wqe_ctrl_seg ) - +sizeof (struct mlx5_wqe_xrc_seg ) - +sizeof (struct mlx5_wqe_raddr_seg )) / +sizeof (struct mlx5_wqe_data_seg ); +else + max_sge = (wqe_size -sq_overhead (attr)) / +sizeof (struct mlx5_wqe_data_seg ); + +return min_t (int, max_sge, wqe_size -sq_overhead (attr) / +sizeof (struct mlx5_wqe_data_seg )); +} +static int calc_sq_size (struct mlx5_ib_dev *dev,struct ib_qp_init_attr *attr,struct mlx5_ib_qp *qp) {
@@ -387,7 +410,11 @@ static int calc_sq_size(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *attr,return -ENOMEM ; } qp->sq.wqe_shift =ilog2 (MLX5_SEND_WQE_BB ); - qp->sq.max_gs = attr->cap.max_send_sge; + qp->sq.max_gs =get_send_sge (attr, wqe_size); +if (qp->sq.max_gs < attr->cap.max_send_sge) +return -ENOMEM ; + + attr->cap.max_send_sge = qp->sq.max_gs; qp->sq.max_post = wq_size / wqe_size; attr->cap.max_send_wr = qp->sq.max_post;
drivers/infiniband/hw/mlx5/srq.c +1 -1
@@ -282,6 +282,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,mlx5_ib_dbg (dev,"desc_size 0x%x, req wr 0x%x, srq size 0x%x, max_gs 0x%x, max_avail_gather 0x%x\n" , desc_size, init_attr->attr.max_wr, srq->msrq.max, srq->msrq.max_gs, srq->msrq.max_avail_gather); + in.type = init_attr->srq_type;if (pd->uobject) err =create_srq_user (pd, srq, &in, udata, buf_size);
@@ -294,7 +295,6 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, goto err_srq; } - in.type = init_attr->srq_type; in.log_size =ilog2 (srq->msrq.max); in.wqe_shift = srq->msrq.wqe_shift -4 ;if (srq->wq_sig)
drivers/infiniband/sw/rxe/rxe_param.h +1 -1
@@ -82,7 +82,7 @@ enum rxe_device_param {RXE_MAX_SGE =32 ,RXE_MAX_SGE_RD =32 ,RXE_MAX_CQ =16384 , -RXE_MAX_LOG_CQE =13 , +RXE_MAX_LOG_CQE =15 ,RXE_MAX_MR =2 *1024 ,RXE_MAX_PD =0x7ffc , RXE_MAX_QP_RD_ATOM = 128,
drivers/infiniband/sw/rxe/rxe_req.c +7 -7
@@ -548,23 +548,23 @@ static void update_wqe_psn(struct rxe_qp *qp,static void save_state (struct rxe_send_wqe *wqe,struct rxe_qp *qp,struct rxe_send_wqe *rollback_wqe, -struct rxe_qp *rollback_qp) +u32 *rollback_psn) { rollback_wqe->state = wqe->state; rollback_wqe->first_psn = wqe->first_psn; rollback_wqe->last_psn = wqe->last_psn; - rollback_qp->req.psn = qp->req.psn; + *rollback_psn = qp->req.psn; }static void rollback_state (struct rxe_send_wqe *wqe,struct rxe_qp *qp,struct rxe_send_wqe *rollback_wqe, -struct rxe_qp *rollback_qp) +u32 rollback_psn) { wqe->state = rollback_wqe->state; wqe->first_psn = rollback_wqe->first_psn; wqe->last_psn = rollback_wqe->last_psn; - qp->req.psn = rollback_qp->req.psn; + qp->req.psn = rollback_psn; } static void update_state(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
@@ -593,8 +593,8 @@ int rxe_requester(void *arg)int mtu;int opcode;int ret; -struct rxe_qp rollback_qp;struct rxe_send_wqe rollback_wqe; +u32 rollback_psn; next_wqe:if (unlikely (!qp->valid || qp->req.state ==QP_STATE_ERROR ))
@@ -719,7 +719,7 @@ int rxe_requester(void *arg)* rxe_xmit_packet(). * Otherwise, completer might initiate an unjustified retry flow. */ -save_state (wqe, qp, &rollback_wqe, &rollback_qp); +save_state (wqe, qp, &rollback_wqe, &rollback_psn);update_wqe_state (qp, wqe, &pkt);update_wqe_psn (qp, wqe, &pkt, payload); ret =rxe_xmit_packet (to_rdev (qp->ibqp.device), qp, &pkt, skb);
@@ -727,7 +727,7 @@ int rxe_requester(void *arg) qp->need_req_skb =1 ;kfree_skb (skb); -rollback_state (wqe, qp, &rollback_wqe, &rollback_qp); +rollback_state (wqe, qp, &rollback_wqe, rollback_psn);if (ret == -EAGAIN ) {rxe_run_task (&qp->req.task,1 );
drivers/infiniband/ulp/ipoib/ipoib_cm.c +0 -2
@@ -1054,8 +1054,6 @@ static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ipoib_ tx_qp =ib_create_qp (priv->pd, &attr);if (PTR_ERR (tx_qp) == -EINVAL ) { -ipoib_warn (priv,"can't use GFP_NOIO for QPs on device %s, using GFP_KERNEL\n" , - priv->ca->name); attr.create_flags &= ~IB_QP_CREATE_USE_GFP_NOIO ; tx_qp =ib_create_qp (priv->pd, &attr); }
drivers/input/mouse/alps.c +12 -7
@@ -1346,6 +1346,18 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse) priv->multi_packet =0 ; +/* Report trackstick */ +if (alps_get_pkt_id_ss4_v2 (packet) ==SS4_PACKET_ID_STICK ) { +if (priv->flags &ALPS_DUALPOINT ) { +input_report_key (dev2,BTN_LEFT , f->ts_left); +input_report_key (dev2,BTN_RIGHT , f->ts_right); +input_report_key (dev2,BTN_MIDDLE , f->ts_middle); +input_sync (dev2); + } +return ; + } + +/* Report touchpad */ alps_report_mt_data (psmouse, (f->fingers <=4 ) ? f->fingers :4 );input_mt_report_finger_count (dev, f->fingers);
@@ -1356,13 +1368,6 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse)input_report_abs (dev,ABS_PRESSURE , f->pressure);input_sync (dev); - -if (priv->flags &ALPS_DUALPOINT ) { -input_report_key (dev2,BTN_LEFT , f->ts_left); -input_report_key (dev2,BTN_RIGHT , f->ts_right); -input_report_key (dev2,BTN_MIDDLE , f->ts_middle); -input_sync (dev2); - } }static bool alps_is_valid_package_ss4_v2 (struct psmouse *psmouse)
drivers/media/platform/Kconfig +1 -1
@@ -93,7 +93,7 @@ config VIDEO_OMAP3_DEBUG config VIDEO_PXA27x tristate "PXA27x Quick Capture Interface driver" - depends on VIDEO_DEV && HAS_DMA + depends on VIDEO_DEV && VIDEO_V4L2 && HAS_DMA depends on PXA27x || COMPILE_TEST select VIDEOBUF2_DMA_SG select SG_SPLIT
drivers/media/platform/blackfin/ppi.c +2 -0
@@ -214,6 +214,8 @@ static int ppi_set_params(struct ppi_if *ppi, struct ppi_params *params)if (params->dlen >24 || params->dlen <=0 )return -EINVAL ; pctrl =devm_pinctrl_get (ppi->dev); +if (IS_ERR (pctrl)) +return PTR_ERR (pctrl); pstate =pinctrl_lookup_state (pctrl, pin_state[(params->dlen +7 ) /8 -1 ]);if (pinctrl_select_state (pctrl, pstate))
drivers/media/platform/s5p-mfc/s5p_mfc.c +4 -3
@@ -926,10 +926,11 @@ static int s5p_mfc_release(struct file *file)mfc_debug_enter ();if (dev)mutex_lock (&dev->mfc_mutex); -s5p_mfc_clock_on ();vb2_queue_release (&ctx->vq_src);vb2_queue_release (&ctx->vq_dst);if (dev) { +s5p_mfc_clock_on (); +/* Mark context as idle */ clear_work_bit_irqsave (ctx);/*
@@ -951,9 +952,9 @@ static int s5p_mfc_release(struct file *file)if (s5p_mfc_power_off () <0 )mfc_err ("Power off failed\n" ); } +mfc_debug (2 ,"Shutting down clock\n" ); +s5p_mfc_clock_off (); } -mfc_debug (2 ,"Shutting down clock\n" ); -s5p_mfc_clock_off ();if (dev) dev->ctx[ctx->num] =NULL ;s5p_mfc_dec_ctrls_delete (ctx);
drivers/media/platform/sti/hva/hva-hw.c +3 -3
@@ -305,16 +305,16 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)/* get memory for registers */ regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); hva->regs =devm_ioremap_resource (dev, regs); -if (IS_ERR_OR_NULL (hva->regs)) { +if (IS_ERR (hva->regs)) {dev_err (dev,"%s failed to get regs\n" ,HVA_PREFIX );return PTR_ERR (hva->regs); }/* get memory for esram */ esram =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); -if (IS_ERR_OR_NULL (esram)) { +if (!esram) {dev_err (dev,"%s failed to get esram\n" ,HVA_PREFIX ); -return PTR_ERR (esram); +return -ENODEV ; } hva->esram_addr = esram->start; hva->esram_size =resource_size (esram);
drivers/media/rc/ite-cir.c +2 -0
@@ -263,6 +263,8 @@ static void ite_set_carrier_params(struct ite_dev *dev)if (allowance >ITE_RXDCR_MAX ) allowance =ITE_RXDCR_MAX ; + + use_demodulator = true; } }
drivers/media/spi/gs1662.c +1 -2
@@ -453,10 +453,9 @@ static int gs_probe(struct spi_device *spi)static int gs_remove (struct spi_device *spi) {struct v4l2_subdev *sd =spi_get_drvdata (spi); -struct gs *gs =to_gs (sd);v4l2_device_unregister_subdev (sd); -kfree (gs); +return 0 ; }
drivers/mmc/host/mxs-mmc.c +4 -2
@@ -309,6 +309,9 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host) cmd0 =BF_SSP (cmd->opcode,CMD0_CMD ); cmd1 = cmd->arg; +if (cmd->opcode ==MMC_STOP_TRANSMISSION ) + cmd0 |=BM_SSP_CMD0_APPEND_8CYC ; +if (host->sdio_irq_en) { ctrl0 |=BM_SSP_CTRL0_SDIO_IRQ_CHECK ; cmd0 |=BM_SSP_CMD0_CONT_CLKING_EN |BM_SSP_CMD0_SLOW_CLKING_EN ;
@@ -417,8 +420,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) ssp->base + HW_SSP_BLOCK_SIZE); } -if ((cmd->opcode ==MMC_STOP_TRANSMISSION ) || - (cmd->opcode ==SD_IO_RW_EXTENDED )) +if (cmd->opcode ==SD_IO_RW_EXTENDED ) cmd0 |=BM_SSP_CMD0_APPEND_8CYC ; cmd1 = cmd->arg;
drivers/mmc/host/sdhci-acpi.c +2 -1
@@ -394,7 +394,8 @@ static int sdhci_acpi_probe(struct platform_device *pdev)/* Power on the SDHCI controller and its children */ acpi_device_fix_up_power (device);list_for_each_entry (child, &device->children, node) -acpi_device_fix_up_power (child); +if (child->status.present && child->status.enabled) +acpi_device_fix_up_power (child);if (acpi_bus_get_status (device) || !device->status.present)return -ENODEV ;
drivers/mtd/nand/Kconfig +1 -1
@@ -537,7 +537,7 @@ config MTD_NAND_FSMC Flexible Static Memory Controller (FSMC) config MTD_NAND_XWAY - tristate "Support for NAND on Lantiq XWAY SoC" + bool "Support for NAND on Lantiq XWAY SoC" depends on LANTIQ && SOC_TYPE_XWAY help Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached
drivers/mtd/nand/lpc32xx_mlc.c +1 -1
@@ -776,7 +776,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)init_completion (&host->comp_controller); host->irq =platform_get_irq (pdev,0 ); -if ((host->irq <0 ) || (host->irq >=NR_IRQS )) { +if (host->irq <0 ) {dev_err (&pdev->dev,"failed to get platform irq\n" ); res = -EINVAL ; goto err_exit3;
drivers/mtd/nand/xway_nand.c +1 -4
@@ -232,7 +232,6 @@ static const struct of_device_id xway_nand_match[] = { { .compatible = "lantiq,nand-xway" }, {}, }; -MODULE_DEVICE_TABLE (of, xway_nand_match);static struct platform_driver xway_nand_driver = { .probe = xway_nand_probe,
@@ -243,6 +242,4 @@ static struct platform_driver xway_nand_driver = { }, }; -module_platform_driver (xway_nand_driver); - -MODULE_LICENSE ("GPL" ); +builtin_platform_driver (xway_nand_driver);
drivers/mtd/spi-nor/cadence-quadspi.c +4 -2
@@ -1077,12 +1077,14 @@ static int cqspi_setup_flash(struct cqspi_st *cqspi, struct device_node *np)/* Get flash device data */ for_each_available_child_of_node (dev->of_node, np) { -if (of_property_read_u32 (np,"reg" , &cs)) { + ret =of_property_read_u32 (np,"reg" , &cs); +if (ret) {dev_err (dev,"Couldn't determine chip select.\n" ); goto err; } -if (cs >CQSPI_MAX_CHIPSELECT ) { +if (cs >=CQSPI_MAX_CHIPSELECT ) { + ret = -EINVAL ;dev_err (dev,"Chip select %d out of range.\n" , cs); goto err; }
drivers/net/ieee802154/atusb.c +27 -4
@@ -112,13 +112,26 @@ static int atusb_read_reg(struct atusb *atusb, uint8_t reg) {struct usb_device *usb_dev = atusb->usb_dev;int ret; +uint8_t *buffer;uint8_t value; + buffer =kmalloc (1 ,GFP_KERNEL ); +if (!buffer) +return -ENOMEM ; +dev_dbg (&usb_dev->dev,"atusb: reg = 0x%x\n" , reg); ret =atusb_control_msg (atusb,usb_rcvctrlpipe (usb_dev,0 ),ATUSB_REG_READ ,ATUSB_REQ_FROM_DEV , -0 , reg, &value,1 ,1000 ); -return ret >=0 ? value : ret; +0 , reg, buffer,1 ,1000 ); + +if (ret >=0 ) { + value = buffer[0 ]; +kfree (buffer); +return value; + }else { +kfree (buffer); +return ret; + } } static int atusb_write_subreg(struct atusb *atusb, uint8_t reg, uint8_t mask,
@@ -587,9 +600,13 @@ static struct ieee802154_ops atusb_ops = {static int atusb_get_and_show_revision (struct atusb *atusb) {struct usb_device *usb_dev = atusb->usb_dev; -unsigned char buffer[3 ]; +unsigned char *buffer;int ret; + buffer =kmalloc (3 ,GFP_KERNEL ); +if (!buffer) +return -ENOMEM ; +/* Get a couple of the ATMega Firmware values */ ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0), ATUSB_ID, ATUSB_REQ_FROM_DEV, 0, 0,
@@ -605,15 +622,20 @@ static int atusb_get_and_show_revision(struct atusb *atusb)dev_info (&usb_dev->dev,"Please update to version 0.2 or newer" ); } +kfree (buffer);return ret; }static int atusb_get_and_show_build (struct atusb *atusb) {struct usb_device *usb_dev = atusb->usb_dev; -char build[ATUSB_BUILD_SIZE +1 ]; +char *build;int ret; + build =kmalloc (ATUSB_BUILD_SIZE +1 ,GFP_KERNEL ); +if (!build) +return -ENOMEM ; + ret =atusb_control_msg (atusb,usb_rcvctrlpipe (usb_dev,0 ),ATUSB_BUILD ,ATUSB_REQ_FROM_DEV ,0 ,0 , build,ATUSB_BUILD_SIZE ,1000 );
@@ -622,6 +644,7 @@ static int atusb_get_and_show_build(struct atusb *atusb)dev_info (&usb_dev->dev,"Firmware: build %s\n" , build); } +kfree (build);return ret; }
drivers/nvdimm/namespace_devs.c +10 -13
@@ -957,6 +957,7 @@ static ssize_t __size_store(struct device *dev, unsigned long long val) {resource_size_t allocated =0 , available =0 ;struct nd_region *nd_region =to_nd_region (dev->parent); +struct nd_namespace_common *ndns =to_ndns (dev);struct nd_mapping *nd_mapping;struct nvdimm_drvdata *ndd;struct nd_label_id label_id;
@@ -964,7 +965,7 @@ static ssize_t __size_store(struct device *dev, unsigned long long val)u8 *uuid =NULL ;int rc, i; -if (dev->driver ||to_ndns (dev)->claim) +if (dev->driver || ndns->claim)return -EBUSY ;if (is_namespace_pmem (dev)) {
@@ -1034,20 +1035,16 @@ static ssize_t __size_store(struct device *dev, unsigned long long val)nd_namespace_pmem_set_resource (nd_region, nspm, val * nd_region->ndr_mappings); - }else if (is_namespace_blk (dev)) { -struct nd_namespace_blk *nsblk =to_nd_namespace_blk (dev); - -/* -* Try to delete the namespace if we deleted all of its -* allocation, this is not the seed device for the -* region, and it is not actively claimed by a btt -* instance. -*/ -if (val ==0 && nd_region->ns_seed != dev - && !nsblk->common.claim) -nd_device_unregister (dev,ND_ASYNC ); } +/* +* Try to delete the namespace if we deleted all of its +* allocation, this is not the seed device for the region, and +* it is not actively claimed by a btt instance. +*/ +if (val ==0 && nd_region->ns_seed != dev && !ndns->claim) +nd_device_unregister (dev,ND_ASYNC ); +return rc; }
drivers/pci/host/pcie-designware.c +5 -5
@@ -807,11 +807,6 @@ void dw_pcie_setup_rc(struct pcie_port *pp) {u32 val; -/* get iATU unroll support */ - pp->iatu_unroll_enabled =dw_pcie_iatu_unroll_enabled (pp); -dev_dbg (pp->dev,"iATU unroll: %s\n" , - pp->iatu_unroll_enabled ?"enabled" :"disabled" ); -/* set the number of lanes */ val =dw_pcie_readl_rc (pp,PCIE_PORT_LINK_CONTROL ); val &= ~PORT_LINK_MODE_MASK ;
@@ -882,6 +877,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp)* we should not program the ATU here. */ if (!pp->ops->rd_other_conf) { +/* get iATU unroll support */ + pp->iatu_unroll_enabled =dw_pcie_iatu_unroll_enabled (pp); +dev_dbg (pp->dev,"iATU unroll: %s\n" , + pp->iatu_unroll_enabled ?"enabled" :"disabled" ); +dw_pcie_prog_outbound_atu (pp,PCIE_ATU_REGION_INDEX0 ,PCIE_ATU_TYPE_MEM , pp->mem_base, pp->mem_bus_addr, pp->mem_size);
drivers/pci/probe.c +7 -5
@@ -1050,6 +1050,7 @@ void set_pcie_port_type(struct pci_dev *pdev) pos =pci_find_capability (pdev,PCI_CAP_ID_EXP );if (!pos)return ; + pdev->pcie_cap = pos;pci_read_config_word (pdev, pos +PCI_EXP_FLAGS , ®16); pdev->pcie_flags_reg = reg16;
@@ -1057,13 +1058,14 @@ void set_pcie_port_type(struct pci_dev *pdev) pdev->pcie_mpss = reg16 &PCI_EXP_DEVCAP_PAYLOAD ;/* -* A Root Port is always the upstream end of a Link. No PCIe -* component has two Links. Two Links are connected by a Switch -* that has a Port on each Link and internal logic to connect the -* two Ports. +* A Root Port or a PCI-to-PCIe bridge is always the upstream end +* of a Link. No PCIe component has two Links. Two Links are +* connected by a Switch that has a Port on each Link and internal +* logic to connect the two Ports. */ type =pci_pcie_type (pdev); -if (type ==PCI_EXP_TYPE_ROOT_PORT ) +if (type ==PCI_EXP_TYPE_ROOT_PORT || + type ==PCI_EXP_TYPE_PCIE_BRIDGE ) pdev->has_secondary_link =1 ;else if (type ==PCI_EXP_TYPE_UPSTREAM || type ==PCI_EXP_TYPE_DOWNSTREAM ) {
drivers/rpmsg/rpmsg_core.c +2 -2
@@ -411,8 +411,8 @@ int rpmsg_register_device(struct rpmsg_device *rpdev)struct device *dev = &rpdev->dev;int ret; -dev_set_name (&rpdev->dev,"%s:%s" , -dev_name (dev->parent), rpdev->id.name); +dev_set_name (&rpdev->dev,"%s.%s.%d.%d" ,dev_name (dev->parent), + rpdev->id.name, rpdev->src, rpdev->dst); rpdev->dev.bus = &rpmsg_bus; rpdev->dev.release = rpmsg_release_device;
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +4 -3
@@ -45,6 +45,7 @@#define INITIAL_SRP_LIMIT 800#define DEFAULT_MAX_SECTORS 256 +#define MAX_TXU 1024 * 1024static uint max_vdma_size =MAX_H_COPY_RDMA ;
@@ -1239,7 +1240,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi, } info =dma_alloc_coherent (&vscsi->dma_dev->dev,sizeof (*info), &token, -GFP_KERNEL ); +GFP_ATOMIC );if (!info) {dev_err (&vscsi->dev,"bad dma_alloc_coherent %p\n" , iue->target);
@@ -1291,7 +1292,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi, info->mad_version =cpu_to_be32 (MAD_VERSION_1 ); info->os_type =cpu_to_be32 (LINUX );memset (&info->port_max_txu[0 ],0 ,sizeof (info->port_max_txu)); - info->port_max_txu[0 ] =cpu_to_be32 (128 *PAGE_SIZE ); + info->port_max_txu[0 ] =cpu_to_be32 (MAX_TXU );dma_wmb (); rc = h_copy_rdma(sizeof(*info), vscsi->dds.window[LOCAL].liobn,
@@ -1357,7 +1358,7 @@ static int ibmvscsis_cap_mad(struct scsi_info *vscsi, struct iu_entry *iue) } cap =dma_alloc_coherent (&vscsi->dma_dev->dev, olen, &token, -GFP_KERNEL ); +GFP_ATOMIC );if (!cap) {dev_err (&vscsi->dev,"bad dma_alloc_coherent %p\n" , iue->target);
drivers/scsi/mpt3sas/mpt3sas_base.h +12 -0
@@ -393,6 +393,7 @@ struct MPT3SAS_TARGET {* @eedp_enable: eedp support enable bit * @eedp_type: 0(type_1), 1(type_2), 2(type_3) * @eedp_block_length: block size +* @ata_command_pending: SATL passthrough outstanding for device */ struct MPT3SAS_DEVICE {struct MPT3SAS_TARGET *sas_target;
@@ -402,6 +403,17 @@ struct MPT3SAS_DEVICE {u8 block;u8 tlr_snoop_check;u8 ignore_delay_remove; +/* +* Bug workaround for SATL handling: the mpt2/3sas firmware +* doesn't return BUSY or TASK_SET_FULL for subsequent +* commands while a SATL pass through is in operation as the +* spec requires, it simply does nothing with them until the +* pass through completes, causing them possibly to timeout if +* the passthrough is a long executing command (like format or +* secure erase). This variable allows us to do the right +* thing while a SATL command is pending. +*/ +unsigned long ata_command_pending; };#define MPT3_CMD_NOT_USED 0x8000/* free */
drivers/scsi/mpt3sas/mpt3sas_scsih.c +26 -14
@@ -3885,9 +3885,18 @@ _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc, } } -static inline bool ata_12_16_cmd (struct scsi_cmnd *scmd) +static int _scsih_set_satl_pending (struct scsi_cmnd *scmd,bool pending) { -return (scmd->cmnd[0 ] ==ATA_12 || scmd->cmnd[0 ] ==ATA_16 ); +struct MPT3SAS_DEVICE *priv = scmd->device->hostdata; + +if (scmd->cmnd[0 ] !=ATA_12 && scmd->cmnd[0 ] !=ATA_16 ) +return 0 ; + +if (pending) +return test_and_set_bit (0 , &priv->ata_command_pending); + +clear_bit (0 , &priv->ata_command_pending); +return 0 ; }/**
@@ -3911,9 +3920,7 @@ _scsih_flush_running_cmds(struct MPT3SAS_ADAPTER *ioc)if (!scmd)continue ; count++; -if (ata_12_16_cmd (scmd)) -scsi_internal_device_unblock (scmd->device, -SDEV_RUNNING ); +_scsih_set_satl_pending (scmd, false);mpt3sas_base_free_smid (ioc, smid);scsi_dma_unmap (scmd);if (ioc->pci_error_recovery)
@@ -4044,13 +4051,6 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)if (ioc->logging_level &MPT_DEBUG_SCSI )scsi_print_command (scmd); -/* -* Lock the device for any subsequent command until command is -* done. -*/ -if (ata_12_16_cmd (scmd)) -scsi_internal_device_block (scmd->device); - sas_device_priv_data = scmd->device->hostdata;if (!sas_device_priv_data || !sas_device_priv_data->sas_target) { scmd->result =DID_NO_CONNECT <<16 ;
@@ -4064,6 +4064,19 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)return 0 ; } +/* +* Bug work around for firmware SATL handling. The loop +* is based on atomic operations and ensures consistency +* since we're lockless at this point +*/ +do { +if (test_bit (0 , &sas_device_priv_data->ata_command_pending)) { + scmd->result =SAM_STAT_BUSY ; + scmd->scsi_done (scmd); +return 0 ; + } + }while (_scsih_set_satl_pending (scmd, true)); + sas_target_priv_data = sas_device_priv_data->sas_target;/* invalid device handle */
@@ -4626,8 +4639,7 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)if (scmd ==NULL )return 1 ; -if (ata_12_16_cmd (scmd)) -scsi_internal_device_unblock (scmd->device,SDEV_RUNNING ); +_scsih_set_satl_pending (scmd, false); mpi_request =mpt3sas_base_get_msg_frame (ioc, smid);
drivers/scsi/qla2xxx/qla_os.c +12 -4
@@ -3489,7 +3489,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,sizeof (struct ct6_dsd ),0 , SLAB_HWCACHE_ALIGN, NULL);if (!ctx_cachep) - goto fail_free_gid_list; + goto fail_free_srb_mempool; } ha->ctx_mempool =mempool_create_slab_pool (SRB_MIN_REQ , ctx_cachep);
@@ -3642,7 +3642,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, ha->loop_id_map =kzalloc (BITS_TO_LONGS (LOOPID_MAP_SIZE ) *sizeof (long ),GFP_KERNEL );if (!ha->loop_id_map) - goto fail_async_pd; + goto fail_loop_id_map;else {qla2x00_set_reserved_loop_ids (ha); ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0123,
@@ -3651,6 +3651,8 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,return 0 ; +fail_loop_id_map: +dma_pool_free (ha->s_dma_pool, ha->async_pd, ha->async_pd_dma); fail_async_pd:dma_pool_free (ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma); fail_ex_init_cb:
@@ -3678,6 +3680,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,dma_pool_free (ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma); ha->ms_iocb =NULL ; ha->ms_iocb_dma =0 ; + +if (ha->sns_cmd) +dma_free_coherent (&ha->pdev->dev,sizeof (struct sns_cmd_pkt ), + ha->sns_cmd, ha->sns_cmd_dma); fail_dma_pool:if (IS_QLA82XX (ha) || ql2xenabledif) {dma_pool_destroy (ha->fcp_cmnd_dma_pool);
@@ -3695,10 +3701,12 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,kfree (ha->nvram); ha->nvram =NULL ; fail_free_ctx_mempool: -mempool_destroy (ha->ctx_mempool); +if (ha->ctx_mempool) +mempool_destroy (ha->ctx_mempool); ha->ctx_mempool =NULL ; fail_free_srb_mempool: -mempool_destroy (ha->srb_mempool); +if (ha->srb_mempool) +mempool_destroy (ha->srb_mempool); ha->srb_mempool =NULL ; fail_free_gid_list: dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
drivers/scsi/ses.c +1 -1
@@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,ses_enclosure_data_process (edev,to_scsi_device (edev->edev.parent),0 ); -if (scsi_is_sas_rphy (&sdev->sdev_gendev)) +if (scsi_is_sas_rphy (sdev->sdev_target->dev.parent)) efd.addr =sas_get_address (sdev);if (efd.addr) {
drivers/soc/ti/wkup_m3_ipc.c +1 -0
@@ -459,6 +459,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)if (IS_ERR (task)) {dev_err (dev,"can't create rproc_boot thread\n" ); + ret =PTR_ERR (task); goto err_put_rproc; }
drivers/spi/spi-pxa2xx.c +1 -0
@@ -1690,6 +1690,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)pxa2xx_spi_write (drv_data,SSCR1 , tmp); tmp =SSCR0_SCR (2 ) | SSCR0_Motorola |SSCR0_DataSize (8 );pxa2xx_spi_write (drv_data,SSCR0 , tmp); +break ;default : tmp =SSCR1_RxTresh (RX_THRESH_DFLT ) |SSCR1_TxTresh (TX_THRESH_DFLT );
drivers/staging/media/s5p-cec/s5p_cec.c +2 -2
@@ -231,7 +231,7 @@ static int s5p_cec_remove(struct platform_device *pdev)return 0 ; } -static int s5p_cec_runtime_suspend (struct device *dev) +static int __maybe_unused s5p_cec_runtime_suspend (struct device *dev) {struct s5p_cec_dev *cec =dev_get_drvdata (dev);
@@ -239,7 +239,7 @@ static int s5p_cec_runtime_suspend(struct device *dev)return 0 ; } -static int s5p_cec_runtime_resume (struct device *dev) +static int __maybe_unused s5p_cec_runtime_resume (struct device *dev) {struct s5p_cec_dev *cec =dev_get_drvdata (dev);int ret;
drivers/xen/swiotlb-xen.c +2 -2
@@ -392,7 +392,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,if (dma_capable (dev, dev_addr, size) && !range_straddles_page_boundary (phys, size) && !xen_arch_need_swiotlb (dev, phys, dev_addr) && - !swiotlb_force) { + (swiotlb_force !=SWIOTLB_FORCE )) {/* we are not interested in the dma_addr returned by * xen_dma_map_page, only in the potential cache flushes executed * by the function. */
@@ -549,7 +549,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,phys_addr_t paddr =sg_phys (sg);dma_addr_t dev_addr =xen_phys_to_bus (paddr); -if (swiotlb_force || +if (swiotlb_force ==SWIOTLB_FORCE ||xen_arch_need_swiotlb (hwdev, paddr, dev_addr) || !dma_capable (hwdev, dev_addr, sg->length) ||range_straddles_page_boundary (paddr, sg->length)) {
fs/ceph/caps.c +14 -3
@@ -2507,9 +2507,20 @@ int ceph_get_caps(struct ceph_inode_info *ci, int need, int want,if (err <0 ) ret = err; }else { - ret =wait_event_interruptible (ci->i_cap_wq, -try_get_cap_refs (ci, need, want, endoff, - true, &_got, &err)); +DEFINE_WAIT_FUNC (wait, woken_wake_function); +add_wait_queue (&ci->i_cap_wq, &wait); + +while (!try_get_cap_refs (ci, need, want, endoff, + true, &_got, &err)) { +if (signal_pending (current)) { + ret = -ERESTARTSYS ; +break ; + } +wait_woken (&wait,TASK_INTERRUPTIBLE ,MAX_SCHEDULE_TIMEOUT ); + } + +remove_wait_queue (&ci->i_cap_wq, &wait); +if (err == -EAGAIN )continue ;if (err <0 )
fs/ceph/dir.c +3 -2
@@ -1255,7 +1255,8 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)struct ceph_mds_client *mdsc =ceph_sb_to_client (dir->i_sb)->mdsc;struct ceph_mds_request *req; -int op, mask, err; +int op, err; +u32 mask;if (flags &LOOKUP_RCU )return -ECHILD ;
@@ -1270,7 +1271,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) mask =CEPH_STAT_CAP_INODE |CEPH_CAP_AUTH_SHARED ;if (ceph_security_xattr_wanted (dir)) mask |=CEPH_CAP_XATTR_SHARED ; - req->r_args.getattr.mask = mask; + req->r_args.getattr.mask =cpu_to_le32 (mask); err =ceph_mdsc_do_request (mdsc,NULL , req);switch (err) {
fs/ceph/inode.c +2 -1
@@ -305,7 +305,8 @@ static int frag_tree_split_cmp(const void *l, const void *r) {struct ceph_frag_tree_split *ls = (struct ceph_frag_tree_split *)l;struct ceph_frag_tree_split *rs = (struct ceph_frag_tree_split *)r; -return ceph_frag_compare (ls->frag, rs->frag); +return ceph_frag_compare (le32_to_cpu (ls->frag), +le32_to_cpu (rs->frag)); }static bool is_frag_child (u32 f,struct ceph_inode_frag *frag)
fs/ceph/mds_client.c +5 -4
@@ -288,12 +288,13 @@ static int parse_reply_info_extra(void **p, void *end, struct ceph_mds_reply_info_parsed *info, u64 features) { -if (info->head->op ==CEPH_MDS_OP_GETFILELOCK ) +u32 op =le32_to_cpu (info->head->op); + +if (op ==CEPH_MDS_OP_GETFILELOCK )return parse_reply_info_filelock (p, end, info, features); -else if (info->head->op ==CEPH_MDS_OP_READDIR || - info->head->op ==CEPH_MDS_OP_LSSNAP ) +else if (op ==CEPH_MDS_OP_READDIR || op ==CEPH_MDS_OP_LSSNAP )return parse_reply_info_dir (p, end, info, features); -else if (info->head->op ==CEPH_MDS_OP_CREATE ) +else if (op ==CEPH_MDS_OP_CREATE )return parse_reply_info_create (p, end, info, features);else return -EIO ;
fs/fuse/dev.c +2 -1
@@ -2025,7 +2025,6 @@ static void end_requests(struct fuse_conn *fc, struct list_head *head)struct fuse_req *req; req = list_entry(head->next, struct fuse_req, list); req->out.h.error = -ECONNABORTED ; -clear_bit (FR_PENDING , &req->flags);clear_bit (FR_SENT , &req->flags);list_del_init (&req->list);request_end (fc, req);
@@ -2103,6 +2102,8 @@ void fuse_abort_conn(struct fuse_conn *fc)spin_lock (&fiq->waitq.lock); fiq->connected =0 ;list_splice_init (&fiq->pending, &to_end2); +list_for_each_entry (req, &to_end2, list) +clear_bit (FR_PENDING , &req->flags);while (forget_pending (fiq))kfree (dequeue_forget (fiq,1 ,NULL ));wake_up_all_locked (&fiq->waitq);
fs/fuse/dir.c +1 -1
@@ -68,7 +68,7 @@ static u64 time_to_jiffies(u64 sec, u32 nsec)if (sec || nsec) {struct timespec64 ts = { sec, -max_t (u32, nsec,NSEC_PER_SEC -1 ) +min_t (u32, nsec,NSEC_PER_SEC -1 ) };return get_jiffies_64 () +timespec64_to_jiffies (&ts);
fs/posix_acl.c +4 -5
@@ -922,11 +922,10 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)int error;if (type ==ACL_TYPE_ACCESS ) { - error =posix_acl_equiv_mode (acl, &inode->i_mode); -if (error <0 ) -return 0 ; -if (error ==0 ) - acl =NULL ; + error =posix_acl_update_mode (inode, + &inode->i_mode, &acl); +if (error) +return error; } inode->i_ctime =current_time (inode);
fs/ubifs/tnc.c +23 -2
@@ -34,6 +34,11 @@#include <linux/slab.h> #include "ubifs.h" +static int try_read_node (const struct ubifs_info *c,void *buf,int type, +int len,int lnum,int offs); +static int fallible_read_node (struct ubifs_info *c,const union ubifs_key *key, +struct ubifs_zbranch *zbr,void *node); +/* * Returned codes of 'matches_name()' and 'fallible_matches_name()' functions. * @NAME_LESS: name corresponding to the first argument is less than second
@@ -402,7 +407,19 @@ static int tnc_read_node_nm(struct ubifs_info *c, struct ubifs_zbranch *zbr,return 0 ; } - err =ubifs_tnc_read_node (c, zbr, node); +if (c->replaying) { + err =fallible_read_node (c, &zbr->key, zbr, node); +/* +* When the node was not found, return -ENOENT, 0 otherwise. +* Negative return codes stay as-is. +*/ +if (err ==0 ) + err = -ENOENT ; +else if (err ==1 ) + err =0 ; + }else { + err =ubifs_tnc_read_node (c, zbr, node); + }if (err)return err;
@@ -2766,7 +2783,11 @@ struct ubifs_dent_node *ubifs_tnc_next_ent(struct ubifs_info *c,if (nm->name) {if (err) {/* Handle collisions */ - err =resolve_collision (c, key, &znode, &n, nm); +if (c->replaying) + err =fallible_resolve_collision (c, key, &znode, &n, + nm,0 ); +else + err =resolve_collision (c, key, &znode, &n, nm);dbg_tnc ("rc returned %d, znode %p, n %d" , err, znode, n);if (unlikely (err <0 ))
include/dt-bindings/clock/r8a7794-clock.h +1 -2
@@ -20,8 +20,7 @@#define R8A7794_CLK_QSPI 5#define R8A7794_CLK_SDH 6#define R8A7794_CLK_SD0 7 -#define R8A7794_CLK_Z 8 -#define R8A7794_CLK_RCAN 9 +#define R8A7794_CLK_RCAN 8/* MSTP0 */ #define R8A7794_CLK_MSIOF0 0
include/linux/rcupdate.h +4 -0
@@ -444,6 +444,10 @@ bool __rcu_is_watching(void);#error "Unknown RCU implementation specified to kernel configuration"#endif +#define RCU_SCHEDULER_INACTIVE 0 +#define RCU_SCHEDULER_INIT 1 +#define RCU_SCHEDULER_RUNNING 2 +/* * init_rcu_head_on_stack()/destroy_rcu_head_on_stack() are needed for dynamic * initialization and destruction of rcu_head on the stack. rcu_head structures
include/linux/sunrpc/svc_xprt.h +1 -0
@@ -66,6 +66,7 @@ struct svc_xprt {#define XPT_LISTENER 10/* listening endpoint */ #define XPT_CACHE_AUTH 11/* cache auth info */ #define XPT_LOCAL 12/* connection from loopback interface */ +#define XPT_KILL_TEMP 13/* call xpo_kill_temp_xprt before closing */ struct svc_serv *xpt_server;/* service for transport */ atomic_t xpt_reserved;/* space on outq that is rsvd */
include/linux/swiotlb.h +7 -1
@@ -9,7 +9,13 @@ struct device;struct page ;struct scatterlist ; -extern int swiotlb_force; +enum swiotlb_force { +SWIOTLB_NORMAL ,/* Default - depending on HW DMA mask etc. */ +SWIOTLB_FORCE ,/* swiotlb=force */ +SWIOTLB_NO_FORCE ,/* swiotlb=noforce */ +}; + +extern enum swiotlb_force swiotlb_force;/* * Maximum allowable number of contiguous slabs to map,
include/trace/events/swiotlb.h +10 -7
@@ -11,16 +11,16 @@ TRACE_EVENT(swiotlb_bounced, TP_PROTO(struct device *dev, dma_addr_t dev_addr, size_t size, - int swiotlb_force), + enum swiotlb_force swiotlb_force), TP_ARGS(dev, dev_addr, size, swiotlb_force), TP_STRUCT__entry( - __string( dev_name, dev_name(dev) ) -__field (u64 ,dma_mask ) -__field ( dma_addr_t, dev_addr ) -__field ( size_t, size ) -__field ( int, swiotlb_force ) + __string( dev_name, dev_name(dev) ) + __field( u64, dma_mask ) + __field( dma_addr_t, dev_addr ) + __field( size_t, size ) + __field( enum swiotlb_force, swiotlb_force ) ), TP_fast_assign(
@@ -37,7 +37,10 @@ TRACE_EVENT(swiotlb_bounced, __entry->dma_mask, (unsigned long long )__entry->dev_addr, __entry->size, - __entry->swiotlb_force ? "swiotlb_force" : "" ) +__print_symbolic (__entry->swiotlb_force, + { SWIOTLB_NORMAL, "NORMAL" }, + { SWIOTLB_FORCE, "FORCE" }, + { SWIOTLB_NO_FORCE, "NO_FORCE" })) );#endif /* _TRACE_SWIOTLB_H */
kernel/rcu/rcu.h +1 -0
@@ -136,6 +136,7 @@ int rcu_jiffies_till_stall_check(void);#define TPS (x) tracepoint_string(x)void rcu_early_boot_tests (void ); +void rcu_test_sync_prims (void );/* * This function really isn't for public consumption, but RCU is special in
kernel/rcu/tiny.c +0 -4
@@ -185,9 +185,6 @@ static __latent_entropy void rcu_process_callbacks(struct softirq_action *unused* benefits of doing might_sleep() to reduce latency.) * * Cool, huh? (Due to Josh Triplett.) -* -* But we want to make this a static inline later. The cond_resched() -* currently makes this problematic. */ void synchronize_sched (void ) {
@@ -195,7 +192,6 @@ void synchronize_sched(void)lock_is_held (&rcu_lock_map) ||lock_is_held (&rcu_sched_lock_map), "Illegal synchronize_sched() in RCU read-side critical section"); -cond_resched (); }EXPORT_SYMBOL_GPL (synchronize_sched);
kernel/rcu/tiny_plugin.h +7 -2
@@ -60,12 +60,17 @@ EXPORT_SYMBOL_GPL(rcu_scheduler_active);/* * During boot, we forgive RCU lockdep issues. After this function is -* invoked, we start taking RCU lockdep issues seriously. +* invoked, we start taking RCU lockdep issues seriously. Note that unlike +* Tree RCU, Tiny RCU transitions directly from RCU_SCHEDULER_INACTIVE +* to RCU_SCHEDULER_RUNNING, skipping the RCU_SCHEDULER_INIT stage. +* The reason for this is that Tiny RCU does not need kthreads, so does +* not have to care about the fact that the scheduler is half-initialized +* at a certain phase of the boot process. */ void __init rcu_scheduler_starting (void ) {WARN_ON (nr_context_switches () >0 ); - rcu_scheduler_active =1 ; + rcu_scheduler_active =RCU_SCHEDULER_RUNNING ; }#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
kernel/rcu/tree.c +20 -13
@@ -127,13 +127,16 @@ int rcu_num_nodes __read_mostly = NUM_RCU_NODES; /* Total # rcu_nodes in use. */int sysctl_panic_on_rcu_stall__read_mostly ;/* -* The rcu_scheduler_active variable transitions from zero to one just -* before the first task is spawned. So when this variable is zero, RCU -* can assume that there is but one task, allowing RCU to (for example) +* The rcu_scheduler_active variable is initialized to the value +* RCU_SCHEDULER_INACTIVE and transitions RCU_SCHEDULER_INIT just before the +* first task is spawned. So when this variable is RCU_SCHEDULER_INACTIVE, +* RCU can assume that there is but one task, allowing RCU to (for example) * optimize synchronize_rcu() to a simple barrier(). When this variable -* is one, RCU must actually do all the hard work required to detect real -* grace periods. This variable is also used to suppress boot-time false -* positives from lockdep-RCU error checking. +* is RCU_SCHEDULER_INIT, RCU must actually do all the hard work required +* to detect real grace periods. This variable is also used to suppress +* boot-time false positives from lockdep-RCU error checking. Finally, it +* transitions from RCU_SCHEDULER_INIT to RCU_SCHEDULER_RUNNING after RCU +* is fully initialized, including all of its kthreads having been spawned. */ int rcu_scheduler_active__read_mostly ;EXPORT_SYMBOL_GPL (rcu_scheduler_active);
@@ -3985,18 +3988,22 @@ static int __init rcu_spawn_gp_kthread(void)early_initcall (rcu_spawn_gp_kthread);/* -* This function is invoked towards the end of the scheduler's initialization -* process. Before this is called, the idle task might contain -* RCU read-side critical sections (during which time, this idle -* task is booting the system). After this function is called, the -* idle tasks are prohibited from containing RCU read-side critical -* sections. This function also enables RCU lockdep checking. +* This function is invoked towards the end of the scheduler's +* initialization process. Before this is called, the idle task might +* contain synchronous grace-period primitives (during which time, this idle +* task is booting the system, and such primitives are no-ops). After this +* function is called, any synchronous grace-period primitives are run as +* expedited, with the requesting task driving the grace period forward. +* A later core_initcall() rcu_exp_runtime_mode() will switch to full +* runtime RCU functionality. */ void rcu_scheduler_starting (void ) {WARN_ON (num_online_cpus () !=1 );WARN_ON (nr_context_switches () >0 ); - rcu_scheduler_active =1 ; +rcu_test_sync_prims (); + rcu_scheduler_active =RCU_SCHEDULER_INIT ; +rcu_test_sync_prims (); }/*
kernel/rcu/tree_exp.h +41 -11
80 lines not on this page · raw message
kernel/rcu/tree_plugin.h +1 -1
@@ -670,7 +670,7 @@ void synchronize_rcu(void)lock_is_held (&rcu_lock_map) ||lock_is_held (&rcu_sched_lock_map), "Illegal synchronize_rcu() in RCU read-side critical section"); -if (!rcu_scheduler_active) +if (rcu_scheduler_active ==RCU_SCHEDULER_INACTIVE )return ;if (rcu_gp_is_expedited ())synchronize_rcu_expedited ();
kernel/rcu/update.c +30 -8
@@ -121,11 +121,14 @@ EXPORT_SYMBOL(rcu_read_lock_sched_held);* Should expedited grace-period primitives always fall back to their * non-expedited counterparts? Intended for use within RCU. Note * that if the user specifies both rcu_expedited and rcu_normal, then -* rcu_normal wins. +* rcu_normal wins. (Except during the time period during boot from +* when the first task is spawned until the rcu_exp_runtime_mode() +* core_initcall() is invoked, at which point everything is expedited.) */ bool rcu_gp_is_normal (void ) { -return READ_ONCE (rcu_normal); +return READ_ONCE (rcu_normal) && + rcu_scheduler_active !=RCU_SCHEDULER_INIT ; }EXPORT_SYMBOL_GPL (rcu_gp_is_normal);
@@ -135,13 +138,14 @@ static atomic_t rcu_expedited_nesting =/* * Should normal grace-period primitives be expedited? Intended for * use within RCU. Note that this function takes the rcu_expedited -* sysfs/boot variable into account as well as the rcu_expedite_gp() -* nesting. So looping on rcu_unexpedite_gp() until rcu_gp_is_expedited() -* returns false is a -really- bad idea. +* sysfs/boot variable and rcu_scheduler_active into account as well +* as the rcu_expedite_gp() nesting. So looping on rcu_unexpedite_gp() +* until rcu_gp_is_expedited() returns false is a -really- bad idea. */ bool rcu_gp_is_expedited (void ) { -return rcu_expedited ||atomic_read (&rcu_expedited_nesting); +return rcu_expedited ||atomic_read (&rcu_expedited_nesting) || + rcu_scheduler_active ==RCU_SCHEDULER_INIT ; }EXPORT_SYMBOL_GPL (rcu_gp_is_expedited);
@@ -257,7 +261,7 @@ EXPORT_SYMBOL_GPL(rcu_callback_map); int notrace debug_lockdep_rcu_enabled(void) { -return rcu_scheduler_active && debug_locks && +return rcu_scheduler_active !=RCU_SCHEDULER_INACTIVE && debug_locks && current->lockdep_recursion ==0 ; }EXPORT_SYMBOL_GPL (debug_lockdep_rcu_enabled);
@@ -591,7 +595,7 @@ EXPORT_SYMBOL_GPL(call_rcu_tasks);void synchronize_rcu_tasks (void ) {/* Complain if the scheduler has not started. */ -RCU_LOCKDEP_WARN (!rcu_scheduler_active, +RCU_LOCKDEP_WARN (rcu_scheduler_active ==RCU_SCHEDULER_INACTIVE ,"synchronize_rcu_tasks called too soon" );/* Wait for the grace period. */
@@ -813,6 +817,23 @@ static void rcu_spawn_tasks_kthread(void)#endif /* #ifdef CONFIG_TASKS_RCU */ +/* +* Test each non-SRCU synchronous grace-period wait API. This is +* useful just after a change in mode for these primitives, and +* during early boot. +*/ +void rcu_test_sync_prims (void ) +{ +if (!IS_ENABLED (CONFIG_PROVE_RCU )) +return ; +synchronize_rcu (); +synchronize_rcu_bh (); +synchronize_sched (); +synchronize_rcu_expedited (); +synchronize_rcu_bh_expedited (); +synchronize_sched_expedited (); +} +#ifdef CONFIG_PROVE_RCU /*
@@ -865,6 +886,7 @@ void rcu_early_boot_tests(void)early_boot_test_call_rcu_bh ();if (rcu_self_test_sched)early_boot_test_call_rcu_sched (); +rcu_test_sync_prims (); }static int rcu_verify_early_boot_tests (void )
lib/swiotlb.c +20 -6
@@ -53,7 +53,7 @@*/ #define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT) -int swiotlb_force; +enum swiotlb_force swiotlb_force;/* * Used to do a quick range check in swiotlb_tbl_unmap_single and
@@ -106,8 +106,12 @@ setup_io_tlb_npages(char *str) }if (*str ==',' ) ++str; -if (!strcmp (str,"force" )) - swiotlb_force =1 ; +if (!strcmp (str,"force" )) { + swiotlb_force =SWIOTLB_FORCE ; + }else if (!strcmp (str,"noforce" )) { + swiotlb_force =SWIOTLB_NO_FORCE ; + io_tlb_nslabs =1 ; + }return 0 ; }
@@ -541,8 +545,15 @@ static phys_addr_t map_single(struct device *hwdev, phys_addr_t phys, size_t size, enum dma_data_direction dir) { - dma_addr_t start_dma_addr = phys_to_dma(hwdev, io_tlb_start); + dma_addr_t start_dma_addr; + +if (swiotlb_force ==SWIOTLB_NO_FORCE ) { +dev_warn_ratelimited (hwdev,"Cannot do DMA to address %pa\n" , + &phys); +return SWIOTLB_MAP_ERROR ; + } + start_dma_addr =phys_to_dma (hwdev, io_tlb_start);return swiotlb_tbl_map_single (hwdev, start_dma_addr, phys, size, dir); }
@@ -707,6 +718,9 @@ static void swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, int do_panic) { + if (swiotlb_force == SWIOTLB_NO_FORCE) + return; +/* * Ran out of IOMMU space for this operation. This is very bad. * Unfortunately the drivers cannot handle this operation properly.
@@ -749,7 +763,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,* we can safely return the device addr and not worry about bounce * buffering it. */ -if (dma_capable (dev, dev_addr, size) && !swiotlb_force) +if (dma_capable (dev, dev_addr, size) && swiotlb_force !=SWIOTLB_FORCE )return dev_addr;trace_swiotlb_bounced (dev, dev_addr, size, swiotlb_force);
@@ -888,7 +902,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,phys_addr_t paddr =sg_phys (sg);dma_addr_t dev_addr =phys_to_dma (hwdev, paddr); -if (swiotlb_force || +if (swiotlb_force ==SWIOTLB_FORCE || !dma_capable (hwdev, dev_addr, sg->length)) {phys_addr_t map =map_single (hwdev,sg_phys (sg), sg->length, dir);
net/ceph/auth_x.c +100 -95
345 lines not on this page · raw message
net/ceph/auth_x.h +2 -1
@@ -24,6 +24,7 @@ struct ceph_x_ticket_handler {unsigned long renew_after, expires; }; +#define CEPHX_AU_ENC_BUF_LEN 128/* big enough for encrypted blob */ struct ceph_x_authorizer {struct ceph_authorizer base;
@@ -32,7 +33,7 @@ struct ceph_x_authorizer {unsigned int service;u64 nonce;u64 secret_id; -char reply_buf[128 ];/* big enough for encrypted blob */ +char enc_buf[CEPHX_AU_ENC_BUF_LEN ]__aligned(8) ; };struct ceph_x_info {
net/ceph/crypto.c +112 -351
253 lines not on this page · raw message
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +0 -2
Lines of this file are not shown. View the raw message.
tools/perf/util/trace-event-scripting.c +4 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c +1 -1
Lines of this file are not shown. View the 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.
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Greg KHOn 26.01.2017 08:48, Greg KH wrote:
Hi Greg,
Quoted 1 line
I'm announcing the release of the 4.9.6 kernel.
Somewhat late , however I didn't tested 4.9.6 but jumped from 4.9.5 to 4.9.7 and found out by box won't boot anymore.
It hangs early and freeze with a lot RCU warnings.
Since I cannot setup a netconsole right now I cannot post the errors , really sorry.
( but I could make a picture if needed )
I bisected it down to :
Quoted 2 lines
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APICirq_chipretrigger callback
Reverting this one fixes the problem for me..
Also this problem exists in Linus tree , I tested on:
4.10.0-rc6-00167-ga0a28644c1cf
The box is a PRIMERGY TX200 S5 , 2 socket , 2 x E5520 CPU(s) installed.
Regards,
Gabriel C.
Greg KH
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 19 lines · Gabriel C
On 26.01.2017 08:48, Greg KH wrote:
Hi Greg,
Quoted 1 line
I'm announcing the release of the 4.9.6 kernel.
Somewhat late , however I didn't tested 4.9.6 but jumped from 4.9.5 to 4.9.7 and found out by box won't boot anymore.
It hangs early and freeze with a lot RCU warnings.
Since I cannot setup a netconsole right now I cannot post the errors , really sorry.( but I could make a picture if needed )
I bisected it down to :
Quoted 7 lines
Quoted 2 lines
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APICirq_chipretrigger callbackReverting this one fixes the problem for me..
Also this problem exists in Linus tree , I tested on:
4.10.0-rc6-00167-ga0a28644c1cf
Ok, at least we are consistent :)
Quoted 4 lines
The box is a PRIMERGY TX200 S5 , 2 socket , 2 x E5520 CPU(s) installed.
Ruslan, any thoughts about what to do here?
thanks,
greg k-h
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 24 lines · Greg KH
Quoted 15 lines · Gabriel C
On 26.01.2017 08:48, Greg KH wrote:
Hi Greg,
Quoted 1 line
I'm announcing the release of the 4.9.6 kernel.
Somewhat late , however I didn't tested 4.9.6 but jumped from 4.9.5 to 4.9.7 and found out by box won't boot anymore.
It hangs early and freeze with a lot RCU warnings.
Since I cannot setup a netconsole right now I cannot post the errors , really sorry.( but I could make a picture if needed )
Quoted 8 lines
I bisected it down to :
Quoted 2 lines
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APICirq_chipretrigger callbackReverting this one fixes the problem for me..
Also this problem exists in Linus tree , I tested on:
4.10.0-rc6-00167-ga0a28644c1cf
Quoted 7 lines
Ok, at least we are consistent :)
Quoted 4 lines
The box is a PRIMERGY TX200 S5 , 2 socket , 2 x E5520 CPU(s) installed.
Ruslan, any thoughts about what to do here?
This looks strange. What this patch does is just revert previous behavior, broken by d32932d02e18. So we can try to test with last v4.1 stable, where retrigger callback were still present.
Also on v4.10 maybe check with software emulation of this feature and reverted patch, e.g.:
arch/x86/Kconfig +1 -0
@@ -170,6 +170,7 @@ config X86 select USER_STACKTRACE_SUPPORT select VIRT_TO_BUS select X86_FEATURE_NAMES if PROC_FS + select HARDIRQS_SW_RESEND config INSTRUCTION_DECODER def_bool y
I think for further debugging logs will be needed.
Quoted 4 lines
thanks,
greg k-h
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 29 lines · Ruslan Ruslichenko -X (rruslich - GLOBALLOGIC INC at Cisco)
Quoted 28 lines · Greg KH
Quoted 15 lines · Gabriel C
On 26.01.2017 08:48, Greg KH wrote:
Hi Greg,
Quoted 1 line
I'm announcing the release of the 4.9.6 kernel.
Somewhat late , however I didn't tested 4.9.6 but jumped from 4.9.5 to 4.9.7 and found out by box won't boot anymore.
It hangs early and freeze with a lot RCU warnings.
Since I cannot setup a netconsole right now I cannot post the errors , really sorry.( but I could make a picture if needed )
Quoted 8 lines
I bisected it down to :
Quoted 2 lines
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APICirq_chipretrigger callbackReverting this one fixes the problem for me..
Also this problem exists in Linus tree , I tested on:
4.10.0-rc6-00167-ga0a28644c1cfOk, at least we are consistent :)
Quoted 2 lines
The box is a PRIMERGY TX200 S5 , 2 socket , 2 x E5520 CPU(s) installed.
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
Ruslan, any thoughts about what to do here?
This looks strange. What this patch does is just revert previous behavior, broken by
d32932d02e18.
So we can try to test with last v4.1 stable, where retrigger callback were still present.
I can test that but first on weekend if you wish.
Quoted 9 lines
Also on v4.10 maybe check with software emulation of this feature and reverted patch, e.g.:
arch/x86/Kconfig +0
-0
arch/x86/Kconfig config X86 · line 176
Quoted 7 lines
arch/x86/Kconfig +1
-0@@ -170,6 +170,7 @@ config X86 select USER_STACKTRACE_SUPPORT select VIRT_TO_BUS select X86_FEATURE_NAMES if PROC_FS + select HARDIRQS_SW_RESEND config INSTRUCTION_DECODER def_bool y
With patch reverted + this one I get a early kernel panic.. on 4.10.0-rc7
With just the patch reverted all is fine , the box boots and all seems fine.
Quoted 1 line
I think for further debugging logs will be needed.
Yes sure , I just need to find a way to set something up like netconsole here. Right now I have no way doig that. I'll try to do that on weekend too also.
Regards,
Gabriel C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Gabriel CQuoted 4 lines · Gabriel C
Somewhat late , however I didn't tested 4.9.6 but jumped from 4.9.5 to 4.9.7 and found out by box won't boot anymore.
Quoted 10 lines
It hangs early and freeze with a lot RCU warnings.
Since I cannot setup a netconsole right now I cannot post the errors , really sorry.( but I could make a picture if needed )
I bisected it down to :
Quoted 2 lines
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APICirq_chipretrigger callback
Ok, it's
020eb3daaba2 ("x86/ioapic: Restore IO-APIC irq_chip retrigger callback")
in mainline.
Quoted 1 line
Reverting this one fixes the problem for me..
Since that came in rather late, I suspect we'll have to revert for now. The thing it fixes has been around for almost two years, so it can't be as serious a problem as the fix itself ended up being.
Thomas?
That said, it also strikes me that the implicated irq_chip_retrigger_hierarchy() function looks really very suspicious indeed.
Most of the other users don't seem to traverse the parent all the way until they find something. They just do the operation in the parent, and if the parent needs it, it might then do it in _its_ parent and so on.
And the compiler is able to turn the parent call into a tail call so it doesn't cause a stack use explosion even if the parenthood chains end up being pretty deep.
So I'm wondering if that for-loop triggers a stack overflow on your setup somehow, just because that irq_retrigger() call is now truly recursive, and hasn't been turned into tail-calls.
But for now, I'd be inclined to just revert it unless somebody has a "Duh!" moment and can tell me what's wrong with that commit with an obvious fix.
Comments?
Linus
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 3 lines · Linus Torvalds
But for now, I'd be inclined to just revert it unless somebody has a "Duh!" moment and can tell me what's wrong with that commit with an obvious fix.
I have no "Duh!" moment even after staring at the code for quite a while.
Gabriel, can you please send me the bootlog from a working kernel?
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 1 line · Thomas Gleixner
Gabriel, can you please send me the bootlog from a working kernel?
Plus content of /proc/interrupts.
Btw, how far in the boot process is the machine when this happens?
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 1 line · Thomas Gleixner
On Tue, 7 Feb 2017, Thomas Gleixner wrote:
Hi Thomas ,
Sorry I was travelling..
Quoted 2 lines
Quoted 1 line
Gabriel, can you please send me the bootlog from a working kernel?
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/dmesg
( If you wish I can send you one from .10-rc with that patch reverted )
Quoted 2 lines
Plus content of
/proc/interrupts.
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/interrupts
Quoted 1 line
Btw, how far in the boot process is the machine when this happens?
Right after :
Uncompressing Linux.....
Booting the kernel..
So early..
One thing is strange .. on all one socket boxes I have the kernel seems to be fine with that patch while breaks on both dual socket boxes ( well both have near same HW )
Also I'm going to test your patch from your other email
Regards,
Gabrile C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 10 lines · Gabriel C
Quoted 2 lines
Btw, how far in the boot process is the machine when this happens?
Right after :
Uncompressing Linux.....
Booting the kernel..So early..
After lots more boots .. I found out sometimes it gets to :
..
[ 4.656826] Key type dns_resolver registered
..
next line(s) in all my logs would be :
..
[ 4.657507] microcode: sig=0x106a5, pf=0x1, revision=0x19 [ 4.658678] microcode: Microcode Update Driver: v2.01 <[email protected]>, Peter Oruba
..
so maybe some sort race in microcode code ? but this would be strange ?
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Gabriel CQuoted 4 lines · Gabriel C
On 07.02.2017 22:25, Thomas Gleixner wrote:
Hi Thomas ,Sorry I was travelling..
Nothing to be sorry about.
Quoted 8 lines
Quoted 1 line
Btw, how far in the boot process is the machine when this happens?
Right after :
Uncompressing Linux.....
Booting the kernel..So early..
You might try with 'earlyprintk' on the command line. That should tell more.
Quoted 3 lines
One thing is strange .. on all one socket boxes I have the kernel seems to be fine with that patch while breaks on both dual socket boxes ( well both have near same HW )
That's really weird.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 2 lines · Thomas Gleixner
You might try with 'earlyprintk' on the command line. That should tell more.
With that I have some more output.. and after lots more boots I found out there are really at least 2 bugs triggered by this in 4.10.
When just boothing with earlyprintk=vga debug ignore_loglevel the kernel hangs right after :
Key type dns_resolver registered
..
The cursor blinks and one have to wait a while this bug to trigger if at all. Sometimes it just hangs there and that is.
Adding ' dis_ucode_ldr ' to commandline makes the kernel hangs right after :
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x20ac7f6ecc6, max_idle_ns: 440795315461 ns
...
and I have the bug triggered really quick..
Also I cannot get netconsole to work , I'm sure is some problem here local and I don't have any serial cable around right now. The only way I saw now to give you at least some ifo is to make an video of that crash. You can find it there :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash.mp4
Also this is after waiting a while :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/20170211_130319.jpg
I know videos and picures are not the best solution but reight now I don't have any other way to capture some logs :|
The kernel is Linus git tree + .d966564fcdc19e13eb6ba1fbe6b8101070339c3d reverted and the config is :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/config
I hope the video helps at least somewhat to have a clue what could be wrong.
Regards,
Gabriel C
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 1 line · Gabriel C
Adding '
dis_ucode_ldr' to commandline makes the kernel hangs right after :
Wait a minute, are you saying that without dis_ucode_ldr you can't even boot so far?
Quoted 10 lines
clocksource: tsc: mask:
0xffffffffffffffffmax_cycles:0x20ac7f6ecc6,max_idle_ns: 440795315461 ns
...and I have the bug triggered really quick..
Also I cannot get netconsole to work , I'm sure is some problem here local and I don't have any serial cable around right now. The only way I saw now to give you at least some ifo is to make an video of that crash. You can find it there :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash.mp4
Watchdog fires on all cores showing they're all idle. For some reason, not all cores get to dump the watchdog splat, though. Some seem really stuck.
And you have TAINT_FIRMWARE_WORKAROUND due to intel_prepare_irq_remapping() noticing intr remapping is broken on that box.
Would be better if you could disable that frugalware splash screen and switch to grub console mode so that we can see the very beginning of the boot.
Btw, your BIOS is from 2013. Is there new one, per chance, on your vendor's site? Might wanna consider updating it...
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 5 lines · Borislav Petkov
Quoted 1 line · Gabriel C
Adding '
dis_ucode_ldr' to commandline makes the kernel hangs right after :Wait a minute, are you saying that without
dis_ucode_ldryou can't even boot so far?
Yes , it will hang before tsc message ..
Also sometimes I have same trace sometimes it just hangs forever.
Quoted 12 lines
Quoted 11 lines
clocksource: tsc: mask:
0xffffffffffffffffmax_cycles:0x20ac7f6ecc6,max_idle_ns: 440795315461 ns
...and I have the bug triggered really quick..
Also I cannot get netconsole to work , I'm sure is some problem here local and I don't have any serial cable around right now. The only way I saw now to give you at least some ifo is to make an video of that crash. You can find it there :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash.mp4
Quoted 7 lines
Watchdog fires on all cores showing they're all idle. For some reason, not all cores get to dump the watchdog splat, though. Some seem really stuck.
And you have
TAINT_FIRMWARE_WORKAROUNDdue tointel_prepare_irq_remapping()noticing intr remapping is broken on that box.
Well yes and I'm not so sure is really broken.. I reverted the patch blacklisted my box right after it was addeded the time and I don't have any issues .. however since I don't have a use of that feature I don't really care is marked broken or not..
Quoted 4 lines
Would be better if you could disable that frugalware splash screen and switch to grub console mode so that we can see the very beginning of the boot.
I do that tomorrow ...
Quoted 4 lines
Btw, your BIOS is from 2013. Is there new one, per chance, on your vendor's site? Might wanna consider updating it...
This BIOS was / is newest one :(
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 2 lines · Gabriel C
Yes , it will hang before tsc message ..
Also sometimes I have same trace sometimes it just hangs forever.
It doesn't sound like dis_ucode_ldr changes anything. Or maybe it does, maybe the microcode applies some fix for some erratum or whatnot.
Right, so please disable that splash screen and do a boot video again without the dis_ucode_ldr option.
Thanks.
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 6 lines · Borislav Petkov
Quoted 2 lines · Gabriel C
Yes , it will hang before tsc message ..
Also sometimes I have same trace sometimes it just hangs forever.It doesn't sound like
dis_ucode_ldrchanges anything. Or maybe it does, maybe the microcode applies some fix for some erratum or whatnot.
Well the bug is still there but at least something in microcode code seems to trigger too..
Also when it hangs it looks like this :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash2.jpg
Will stay like this forever.. no trace or something.
Quoted 4 lines
Right, so please disable that splash screen and do a boot video again without the
dis_ucode_ldroption.
The problem was vga=.. option , not the splash :)
There is what I get :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash2.mp4
With dis_ucode_ldr there is some more output , with it will stay like this , nothing more.
Alo I disabled all 'VT-d' in BIOS .. it doesn't make any difference.
Regards,
Gabriel C
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 3 lines · Gabriel C
There is what I get :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash2.mp4
Ok, I'm watching it frame-by-frame. I can see the microcode getting updated to revision 0x19 as in your working dmesg.
The machine hangs here at the
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x20ac7f6ecc6, max_idle_ns: 440795315461 ns
line too. The exact same numbers even as in the previous run! Strange.
Quoted 1 line
With
dis_ucode_ldrthere is some more output , with it will stay like this , nothing more.
Ok, can you do redo the first video but with "initcall_debug" on the kernel command line?
And then do video of another run with "initcall_debug dis_ucode_ldr" on the kernel command line?
I'd like to see which of the initcalls doesn't return.
Thanks!
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 16 lines · Borislav Petkov
Quoted 3 lines · Gabriel C
There is what I get :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash2.mp4
Ok, I'm watching it frame-by-frame. I can see the microcode getting updated to revision
0x19as in your working dmesg.The machine hangs here at the
clocksource: tsc: mask:
0xffffffffffffffffmax_cycles:0x20ac7f6ecc6,max_idle_ns: 440795315461 nsline too. The exact same numbers even as in the previous run! Strange.
Quoted 1 line
With
dis_ucode_ldrthere is some more output , with it will stay like this , nothing more.
Quoted 7 lines
Ok, can you do redo the first video but with "
initcall_debug" on the kernel command line?And then do video of another run with "
initcall_debugdis_ucode_ldr" on the kernel command line?I'd like to see which of the initcalls doesn't return.
There are both videos .. however the output seems kind same this time..
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_initcall_debug.mp4
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_intcall_debug_ucode_off.mp4
I try to find out more tomorrow but right now I don't even have a clue where to add some printk's to get some more output :(
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 2 lines · Gabriel C
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_initcall_debug.mp4
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_intcall_debug_ucode_off.mp4
Thanks and interesting. In both cases, mcheck_init_device() doesn't return or we don't see the "initcall returned" message.
Ok, let's try a silly sprinkling of printks in that function and try to pinpoint how far we manage to come.
Apply, build, boot and shoot video again :-)
Thanks.
---
arch/x86/kernel/cpu/mcheck/mce.c +20 -0
@@ -2565,37 +2565,57 @@ static __init int mcheck_init_device(void)enum cpuhp_state hp_online;int err; +pr_err ("%s: entry\n" , __func__); +if (!mce_available (&boot_cpu_data)) { err = -EIO ; goto err_out; } +pr_err ("%s: mce_available\n" , __func__); +if (!zalloc_cpumask_var (&mce_device_initialized,GFP_KERNEL )) { err = -ENOMEM ; goto err_out; } +pr_err ("%s: zalloc_cpumask_var\n" , __func__); +mce_init_banks (); +pr_err ("%s: mce_init_banks\n" , __func__); + err =subsys_system_register (&mce_subsys,NULL );if (err) goto err_out_mem; +pr_err ("%s: subsys_system_register\n" , __func__); + err =cpuhp_setup_state (CPUHP_X86_MCE_DEAD ,"x86/mce:dead" ,NULL , mce_cpu_dead);if (err) goto err_out_mem; +pr_err ("%s: x86/mce:dead\n" , __func__); + err =cpuhp_setup_state (CPUHP_AP_ONLINE_DYN ,"x86/mce:online" , mce_cpu_online, mce_cpu_pre_down);if (err <0 ) goto err_out_online; + +pr_err ("%s: x86/mce:online\n" , __func__); + hp_online = err;register_syscore_ops (&mce_syscore_ops); +pr_err ("%s: register_syscore_ops\n" , __func__); +/* register character device /dev/mcelog */ err =misc_register (&mce_chrdev_device); + +pr_err ("%s: misc_register, err: 0x%x\n" , __func__, err); +if (err) goto err_register;
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 4 lines · Borislav Petkov
Quoted 8 lines
Thanks and interesting. In both cases,
mcheck_init_device()doesn't return or we don't see the "initcall returned" message.Ok, let's try a silly sprinkling of printks in that function and try to pinpoint how far we manage to come.
Apply, build, boot and shoot video again :-)
I didn't tested your patch yet but did a boot with mce=off and nomce which seems to not really works since is still want to mc_device_add() even when off.
See :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_mce_off.jpg
I'll build an .10-rc8 with your patch tomorrow .. is somewhat late now here :)
Another thing is .. there seems to be a real bug in tsc code .
I've build an -rc8 with a lot more debug options on an now I see the following :
...
[ 4.321029] =================================
[ 4.321909] [ INFO: inconsistent lock state ]
[ 4.322789] 4.10.0-rc8-debug #1 Tainted: G I
[ 4.323879] ---------------------------------
[ 4.324759] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[ 4.325973] cpuhp/0/14 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 4.326993] (tick_broadcast_lock){?.....}, at: [<ffffffff810f40e7>] tick_broadcast_control+0x57/0x190
[ 4.328879] {IN-HARDIRQ-W} state was registered at:
[ 4.329866] __lock_acquire+0x24f/0x19e0
[ 4.330675] lock_acquire+0xa5/0xd0
[ 4.331399] _raw_spin_lock_irqsave+0x54/0x90
[ 4.332297] tick_broadcast_switch_to_oneshot+0x11/0x50
[ 4.333371] tick_switch_to_oneshot+0x8c/0xd0
[ 4.334269] tick_init_highres+0x10/0x20
[ 4.335079] hrtimer_run_queues+0x5a/0xe0
[ 4.335907] run_local_timers+0x20/0x50
[ 4.336699] update_process_times+0x22/0x50
[ 4.337562] tick_periodic+0xa5/0xb0
[ 4.338302] tick_handle_periodic+0x1f/0x60
[ 4.378065] smp_trace_apic_timer_interrupt+0x74/0x90
[ 4.418107] smp_apic_timer_interrupt+0x9/0x10
[ 4.458095] apic_timer_interrupt+0x93/0xa0
[ 4.498048] mwait_idle+0x5a/0x90
[ 4.537618] arch_cpu_idle+0xa/0x10
[ 4.577098] default_idle_call+0x2c/0x30
[ 4.616211] do_idle+0x10c/0x1e0
[ 4.654606] cpu_startup_entry+0x5d/0x60
[ 4.692388] rest_init+0x12c/0x140
[ 4.729557] start_kernel+0x45f/0x46c
[ 4.766325] x86_64_start_reservations+0x2a/0x2c
[ 4.803075] x86_64_start_kernel+0xeb/0xf8
[ 4.839178] verify_cpu+0x0/0xfc
[ 4.874629] irq event stamp: 71
[ 4.909417] hardirqs last enabled at (71): [<ffffffff8176a887>] _raw_spin_unlock_irq+0x27/0x50
[ 4.945642] hardirqs last disabled at (70): [<ffffffff81762eaa>] __schedule+0x13a/0x7c0
[ 4.981797] softirqs last enabled at (0): [<ffffffff81060ef0>] copy_process+0x7c0/0x1ea0
[ 5.018580] softirqs last disabled at (0): [< (null)>] (null)
[ 5.055677]
other info that might help us debug this:
[ 5.072455] tsc: Refined TSC clocksource calibration: 2266.746 MHz
[ 5.072467] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x20ac7f6ecc6, max_idle_ns: 440795315461 ns
[ 5.202828] Possible unsafe locking scenario:^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This seems to be the place where the other patch breaks hell here..
[ 5.276704] CPU0
[ 5.312400] ----
[ 5.347605] lock(tick_broadcast_lock);
[ 5.383163] <Interrupt>
[ 5.418457] lock(tick_broadcast_lock);
[ 5.454015]
*** DEADLOCK ***[ 5.557982] no locks held by cpuhp/0/14.
[ 5.592295]
stack backtrace:
[ 5.657946] CPU: 0 PID: 14 Comm: cpuhp/0 Tainted: G I 4.10.0-rc8-debug #1
[ 5.690740] Hardware name: FUJITSU PRIMERGY TX200 S5 /D2709, BIOS 6.00 Rev. 1.14.2709 02/04/2013
[ 5.758323] Call Trace:
[ 5.791434] dump_stack+0x86/0xc1
[ 5.824421] print_usage_bug+0x283/0x2a0
[ 5.857357] mark_lock+0x39e/0x650
[ 5.890256] ? check_usage_forwards+0xf0/0xf0
[ 5.923436] __lock_acquire+0x2ba/0x19e0
[ 5.956617] ? pick_next_task_fair+0x350/0x700
[ 5.989903] ? finish_task_switch+0x184/0x220
[ 6.023171] ? debug_smp_processor_id+0x17/0x20
[ 6.056667] lock_acquire+0xa5/0xd0
[ 6.089882] ? tick_broadcast_control+0x57/0x190
[ 6.123395] ? smpboot_thread_fn+0x28/0x250
[ 6.156838] _raw_spin_lock+0x3c/0x80
[ 6.190175] ? tick_broadcast_control+0x57/0x190
[ 6.223914] tick_broadcast_control+0x57/0x190
[ 6.257846] ? finish_task_switch+0x184/0x220
[ 6.291900] ? smpboot_thread_fn+0x28/0x250
[ 6.325991] intel_idle_cpu_online+0x1d/0x100
[ 6.360220] cpuhp_invoke_callback+0x62/0x120
[ 6.394397] ? smpboot_thread_fn+0x28/0x250
[ 6.428451] cpuhp_thread_fun+0x87/0x110
[ 6.462611] smpboot_thread_fn+0x227/0x250
[ 6.496805] kthread+0x125/0x130
[ 6.530947] ? sort_range+0x20/0x20
[ 6.564126] ? kthread_stop+0x70/0x70
[ 6.597078] ret_from_fork+0x31/0x40
[ 6.630787] clocksource: Switched to clocksource tsc...
Maybe Thomas has some ideas ?
Regards,
Gabriel C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 9 lines · Gabriel C
[ 5.276704] CPU0 [ 5.312400] ---- [ 5.347605] lock(tick_broadcast_lock); [ 5.383163] [ 5.418457] lock(tick_broadcast_lock); [ 5.454015] *** DEADLOCK ***[ 5.557982] no locks held by cpuhp/0/14.
Oh, that looks familiar...
tick/broadcast: Make tick_broadcast_control() use raw_spinlock_irqsave()
Otherwise we end up with the lockdep splat below:
[ 12.703619] =================================
[ 12.703619] [ INFO: inconsistent lock state ]
[ 12.703621] 4.10.0-rt1-rt #18 Not tainted
[ 12.703622] ---------------------------------
[ 12.703623] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[ 12.703624] cpuhp/0/23 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 12.703625] (tick_broadcast_lock){?.....}, at: [<ffffffff81123f9a>] tick_broadcast_control+0x5a/0x1a0
[ 12.703632] {IN-HARDIRQ-W} state was registered at:
[ 12.703637] [<ffffffff810e3511>] __lock_acquire+0xa21/0x1550
[ 12.703639] [<ffffffff810e444d>] lock_acquire+0xbd/0x250
[ 12.703642] [<ffffffff81703723>] _raw_spin_lock_irqsave+0x53/0x70
[ 12.703644] [<ffffffff811240f6>] tick_broadcast_switch_to_oneshot+0x16/0x50
[ 12.703646] [<ffffffff811244d9>] tick_switch_to_oneshot+0x59/0xd0
[ 12.703647] [<ffffffff811245e5>] tick_init_highres+0x15/0x20
[ 12.703652] [<ffffffff811134cf>] hrtimer_run_queues+0x9f/0xe0
[ 12.703654] [<ffffffff81111155>] run_local_timers+0x25/0x60
[ 12.703656] [<ffffffff811111bc>] update_process_times+0x2c/0x60
[ 12.703659] [<ffffffff8112256f>] tick_periodic+0x2f/0x100
[ 12.703661] [<ffffffff81122664>] tick_handle_periodic+0x24/0x70
[ 12.703664] [<ffffffff810485d3>] local_apic_timer_interrupt+0x33/0x60
[ 12.703669] [<ffffffff81706f18>] smp_apic_timer_interrupt+0x38/0x50
[ 12.703671] [<ffffffff81705f2d>] apic_timer_interrupt+0x9d/0xb0
[ 12.703672] [<ffffffff81702b54>] mwait_idle+0x94/0x290
[ 12.703676] [<ffffffff8102862f>] arch_cpu_idle+0xf/0x20
[ 12.703677] [<ffffffff817030c1>] default_idle_call+0x31/0x60
[ 12.703681] [<ffffffff810d7575>] do_idle+0x175/0x290
[ 12.703683] [<ffffffff810d79b8>] cpu_startup_entry+0x48/0x50
[ 12.703687] [<ffffffff81046833>] start_secondary+0x133/0x160
[ 12.703689] [<ffffffff810001c4>] verify_cpu+0x0/0xfc
[ 12.703690] irq event stamp: 71
[ 12.703691] hardirqs last enabled at (71): [<ffffffff8170376c>] _raw_spin_unlock_irq+0x2c/0x80
[ 12.703696] hardirqs last disabled at (70): [<ffffffff816ff0dc>] __schedule+0x9c/0x7e0
[ 12.703699] softirqs last enabled at (0): [<ffffffff8107ba11>] copy_process.part.34+0x5f1/0x22d0
[ 12.703700] softirqs last disabled at (0): [< (null)>] (null)
[ 12.703701]
[ 12.703701] other info that might help us debug this:
[ 12.703701] Possible unsafe locking scenario:
[ 12.703701]
[ 12.703701] CPU0
[ 12.703702] ----
[ 12.703702] lock(tick_broadcast_lock);
[ 12.703703] <Interrupt>
[ 12.703704] lock(tick_broadcast_lock);
[ 12.703705]
[ 12.703705] *** DEADLOCK ***
[ 12.703705]
[ 12.703705] no locks held by cpuhp/0/23.
[ 12.703705]
[ 12.703705] stack backtrace:
[ 12.703707] CPU: 0 PID: 23 Comm: cpuhp/0 Not tainted 4.10.0-rt1-rt #18
[ 12.703708] Hardware name: Hewlett-Packard ProLiant DL980 G7, BIOS P66 07/07/2010
[ 12.703709] Call Trace:
[ 12.703715] dump_stack+0x85/0xc8
[ 12.703717] print_usage_bug+0x1ea/0x1fb
[ 12.703719] ? print_shortest_lock_dependencies+0x1c0/0x1c0
[ 12.703721] mark_lock+0x20d/0x290
[ 12.703723] __lock_acquire+0x8e6/0x1550
[ 12.703724] ? __lock_acquire+0x2ce/0x1550
[ 12.703726] ? load_balance+0x1b4/0xaf0
[ 12.703728] lock_acquire+0xbd/0x250
[ 12.703729] ? tick_broadcast_control+0x5a/0x1a0
[ 12.703735] ? efifb_probe+0x170/0x170
[ 12.703736] _raw_spin_lock+0x3b/0x50
[ 12.703737] ? tick_broadcast_control+0x5a/0x1a0
[ 12.703738] tick_broadcast_control+0x5a/0x1a0
[ 12.703740] ? efifb_probe+0x170/0x170
[ 12.703742] intel_idle_cpu_online+0x22/0x100
[ 12.703744] cpuhp_invoke_callback+0x245/0x9d0
[ 12.703747] ? finish_task_switch+0x78/0x290
[ 12.703750] ? check_preemption_disabled+0x9f/0x130
[ 12.703752] cpuhp_thread_fun+0x52/0x110
[ 12.703754] smpboot_thread_fn+0x276/0x320
[ 12.703757] kthread+0x10c/0x140
[ 12.703759] ? smpboot_update_cpumask_percpu_thread+0x130/0x130
[ 12.703760] ? kthread_park+0x90/0x90
[ 12.703762] ret_from_fork+0x2a/0x40
[ 12.709790] intel_idle: lapic_timer_reliable_states 0x2--- kernel/time/tick-broadcast.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/time/tick-broadcast.c +3 -2
@@ -357,6 +357,7 @@ void tick_broadcast_control(enum tick_brstruct clock_event_device *bc, *dev;struct tick_device *td;int cpu, bc_stopped; +unsigned long flags; td =this_cpu_ptr (&tick_cpu_device); dev = td->evtdev;
@@ -370,7 +371,7 @@ void tick_broadcast_control(enum tick_brif (!tick_device_is_functional (dev))return ; -raw_spin_lock (&tick_broadcast_lock); +raw_spin_lock_irqsave (&tick_broadcast_lock, flags); cpu =smp_processor_id (); bc = tick_broadcast_device.evtdev; bc_stopped =cpumask_empty (tick_broadcast_mask);
@@ -420,7 +421,7 @@ void tick_broadcast_control(enum tick_brtick_broadcast_setup_oneshot (bc); } } -raw_spin_unlock (&tick_broadcast_lock); +raw_spin_unlock_irqrestore (&tick_broadcast_lock, flags); }EXPORT_SYMBOL_GPL (tick_broadcast_control);
A message that is not in the archive (sent off-list or not yet received): CA+55aFzC33RgUDbb-tn9+ANJtD_R2+FzjJihnT_kGk-h+nTD1Q@mail.gmail.com
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 9 lines · Linus Torvalds
On Feb 12, 2017 18:32, "Mike Galbraith" <[email protected]> wrote:
tick/broadcast: Make
tick_broadcast_control()useraw_spinlock_irqsave()Gabriel, does this patch fix your problem even without the revert (note that the revert is already in rc8, so if you apply Mike's patch on top of current kernel sources you should revert the revert to test)
Yes I know .. I have 2 kernels one with and one without the revert.
Mike's patch fixes the warning I see in rc8 with the revert but won't fix the problem with reverted revert...
Also now I get a new warning :
...
[ 81.518032] ======================================================
[ 81.520151] [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
[ 81.522276] 4.10.0-rc8-debug-dirty #1 Tainted: G I
[ 81.524445] ------------------------------------------------------
[ 81.526560] (systemd)/1725 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
[ 81.528672] (((&rwb->window_timer))){+.-...}, at: [<ffffffff810e38e0>] del_timer_sync+0x0/0xd0
[ 81.530973]
and this task is already holding:
[ 81.535399] (&(&q->__queue_lock)->rlock){-.-...}, at: [<ffffffff81378fc0>] cfq_set_request+0x80/0x2c0
[ 81.537637] which would create a new lock dependency:
[ 81.539870] (&(&q->__queue_lock)->rlock){-.-...} -> (((&rwb->window_timer))){+.-...}
[ 81.542145]
but this new dependency connects a HARDIRQ-irq-safe lock:
[ 81.546717] (&(&q->__queue_lock)->rlock){-.-...}
[ 81.546720]
... which became HARDIRQ-irq-safe at:
[ 81.553643] __lock_acquire+0x24f/0x19e0
[ 81.555970] lock_acquire+0xa5/0xd0
[ 81.558302] _raw_spin_lock_irqsave+0x54/0x90
[ 81.560667] ata_qc_schedule_eh+0x56/0x80 [libata]
[ 81.563035] ata_qc_complete+0x99/0x1c0 [libata]
[ 81.565410] ata_do_link_abort+0x93/0xd0 [libata]
[ 81.567786] ata_port_abort+0xb/0x10 [libata]
[ 81.570150] ahci_handle_port_interrupt+0x41e/0x570 [libahci]
[ 81.572533] ahci_handle_port_intr+0x74/0xb0 [libahci]
[ 81.574918] ahci_single_level_irq_intr+0x3b/0x60 [libahci]
[ 81.577311] __handle_irq_event_percpu+0x35/0x100
[ 81.579696] handle_irq_event_percpu+0x1e/0x50
[ 81.582065] handle_irq_event+0x34/0x60
[ 81.584427] handle_edge_irq+0x112/0x140
[ 81.586776] handle_irq+0x18/0x20
[ 81.589109] do_IRQ+0x87/0x110
[ 81.591403] ret_from_intr+0x0/0x20
[ 81.593666] cpuidle_enter_state+0x102/0x230
[ 81.595939] cpuidle_enter+0x12/0x20
[ 81.598202] call_cpuidle+0x38/0x40
[ 81.600443] do_idle+0x16e/0x1e0
[ 81.602670] cpu_startup_entry+0x5d/0x60
[ 81.604890] rest_init+0x12c/0x140
[ 81.607080] start_kernel+0x45f/0x46c
[ 81.609252] x86_64_start_reservations+0x2a/0x2c
[ 81.611399] x86_64_start_kernel+0xeb/0xf8
[ 81.613505] verify_cpu+0x0/0xfc
[ 81.615574]
to a HARDIRQ-irq-unsafe lock:
[ 81.619611] (((&rwb->window_timer))){+.-...}
[ 81.619614]
... which became HARDIRQ-irq-unsafe at:
[ 81.625562] ...
[ 81.625565] __lock_acquire+0x2ba/0x19e0
[ 81.629504] lock_acquire+0xa5/0xd0
[ 81.631467] call_timer_fn+0x74/0x110
[ 81.633397] expire_timers+0xaa/0xd0
[ 81.635287] run_timer_softirq+0x72/0x140
[ 81.637145] __do_softirq+0x143/0x290
[ 81.638974] irq_exit+0x6a/0xd0
[ 81.640818] smp_trace_apic_timer_interrupt+0x79/0x90
[ 81.642698] smp_apic_timer_interrupt+0x9/0x10
[ 81.644572] apic_timer_interrupt+0x93/0xa0
[ 81.646445] cpuidle_enter_state+0x102/0x230
[ 81.648332] cpuidle_enter+0x12/0x20
[ 81.650211] call_cpuidle+0x38/0x40
[ 81.652096] do_idle+0x16e/0x1e0
[ 81.653984] cpu_startup_entry+0x5d/0x60
[ 81.655855] start_secondary+0x150/0x180
[ 81.657696] verify_cpu+0x0/0xfc
[ 81.659497]
other info that might help us debug this:[ 81.664802] Possible interrupt unsafe locking scenario:
[ 81.668296] CPU0 CPU1
[ 81.670010] ---- ----
[ 81.671685] lock(((&rwb->window_timer)));
[ 81.673358] local_irq_disable();
[ 81.675018] lock(&(&q->__queue_lock)->rlock);
[ 81.676659] lock(((&rwb->window_timer)));
[ 81.678275] <Interrupt>
[ 81.679845] lock(&(&q->__queue_lock)->rlock);
[ 81.681419]
*** DEADLOCK ***[ 81.685989] 1 lock held by (systemd)/1725:
[ 81.687518] #0: (&(&q->__queue_lock)->rlock){-.-...}, at: [<ffffffff81378fc0>] cfq_set_request+0x80/0x2c0
[ 81.689125]
the dependencies between HARDIRQ-irq-safe lock and the holding lock:
[ 81.692327] -> (&(&q->__queue_lock)->rlock){-.-...} ops: 70140 {
[ 81.693971] IN-HARDIRQ-W at:
[ 81.695606] __lock_acquire+0x24f/0x19e0
[ 81.697262] lock_acquire+0xa5/0xd0
[ 81.698906] _raw_spin_lock_irqsave+0x54/0x90
[ 81.700568] ata_qc_schedule_eh+0x56/0x80 [libata]
[ 81.702229] ata_qc_complete+0x99/0x1c0 [libata]
[ 81.703884] ata_do_link_abort+0x93/0xd0 [libata]
[ 81.705540] ata_port_abort+0xb/0x10 [libata]
[ 81.707199] ahci_handle_port_interrupt+0x41e/0x570 [libahci]
[ 81.708881] ahci_handle_port_intr+0x74/0xb0 [libahci]
[ 81.710563] ahci_single_level_irq_intr+0x3b/0x60 [libahci]
[ 81.712256] __handle_irq_event_percpu+0x35/0x100
[ 81.713952] handle_irq_event_percpu+0x1e/0x50
[ 81.715651] handle_irq_event+0x34/0x60
[ 81.717350] handle_edge_irq+0x112/0x140
[ 81.719050] handle_irq+0x18/0x20
[ 81.720744] do_IRQ+0x87/0x110
[ 81.722432] ret_from_intr+0x0/0x20
[ 81.724123] cpuidle_enter_state+0x102/0x230
[ 81.725823] cpuidle_enter+0x12/0x20
[ 81.727509] call_cpuidle+0x38/0x40
[ 81.729196] do_idle+0x16e/0x1e0
[ 81.730879] cpu_startup_entry+0x5d/0x60
[ 81.732565] rest_init+0x12c/0x140
[ 81.734246] start_kernel+0x45f/0x46c
[ 81.735927] x86_64_start_reservations+0x2a/0x2c
[ 81.737617] x86_64_start_kernel+0xeb/0xf8
[ 81.739297] verify_cpu+0x0/0xfc
[ 81.740964] IN-SOFTIRQ-W at:
[ 81.742628] __lock_acquire+0x268/0x19e0
[ 81.744311] lock_acquire+0xa5/0xd0
[ 81.745994] _raw_spin_lock_irqsave+0x54/0x90
[ 81.747699] scsi_end_request+0x144/0x1a0 [scsi_mod]
[ 81.749417] scsi_io_completion+0x268/0x610 [scsi_mod]
[ 81.751133] scsi_finish_command+0x103/0x110 [scsi_mod]
[ 81.752856] scsi_softirq_done+0x11f/0x130 [scsi_mod]
[ 81.754575] blk_done_softirq+0x9b/0xb0
[ 81.756288] __do_softirq+0x143/0x290
[ 81.757992] irq_exit+0x6a/0xd0
[ 81.759688] smp_trace_apic_timer_interrupt+0x79/0x90
[ 81.761407] smp_apic_timer_interrupt+0x9/0x10
[ 81.763131] apic_timer_interrupt+0x93/0xa0
[ 81.764862] _raw_spin_unlock_irqrestore+0x47/0x70
[ 81.766606] release_pages+0x51/0x390
[ 81.768347] free_pages_and_swap_cache+0x2a/0xb0
[ 81.770100] tlb_flush_mmu_free+0x34/0x50
[ 81.771851] tlb_finish_mmu+0x17/0x50
[ 81.773592] unmap_region+0xe8/0x100
[ 81.775322] do_munmap+0x264/0x3e0
[ 81.777040] SyS_munmap+0x49/0x70
[ 81.778752] entry_SYSCALL_64_fastpath+0x1f/0xc2
[ 81.780483] INITIAL USE at:
[ 81.782221] __lock_acquire+0x1c9/0x19e0
[ 81.783978] lock_acquire+0xa5/0xd0
[ 81.785721] _raw_spin_lock_irq+0x48/0x80
[ 81.787470] blkcg_init_queue+0xad/0x1b0
[ 81.789217] blk_alloc_queue_node+0x27d/0x2d0
[ 81.790959] blk_mq_init_queue+0x1b/0x60
[ 81.792695] loop_add+0xf4/0x280
[ 81.794427] loop_init+0x101/0x142
[ 81.796166] do_one_initcall+0x6f/0x190
[ 81.797914] kernel_init_freeable+0x321/0x3b7
[ 81.799659] kernel_init+0x9/0xf0
[ 81.801360] ret_from_fork+0x31/0x40
[ 81.803029] }
[ 81.804660] ... key at: [<ffffffff82f1e728>] __key.42689+0x0/0x8
[ 81.806315] ... acquired at:
[ 81.807937] check_irq_usage+0x4d/0xa0
[ 81.809555] __lock_acquire+0x1110/0x19e0
[ 81.811176] lock_acquire+0xa5/0xd0
[ 81.812783] del_timer_sync+0x49/0xd0
[ 81.814385] wbt_disable_default+0x1e/0x60
[ 81.815991] check_blkcg_changed+0x22d/0x380
[ 81.817594] cfq_set_request+0xe5/0x2c0
[ 81.819194] elv_set_request+0x1a/0x20
[ 81.820775] get_request+0x88d/0x900
[ 81.822355] blk_queue_bio+0x1e9/0x320
[ 81.823925] generic_make_request+0xbe/0x170
[ 81.825492] submit_bio+0x121/0x150
[ 81.827050] btrfs_map_bio+0x282/0x2a0
[ 81.828613] btree_submit_bio_hook+0x71/0xe0
[ 81.830181] submit_one_bio+0x65/0x90
[ 81.831750] read_extent_buffer_pages+0x1fa/0x2f0
[ 81.833336] btree_read_extent_buffer_pages+0x59/0xf0
[ 81.834932] read_tree_block+0x2d/0x50
[ 81.836528] read_block_for_search.isra.10+0x296/0x2e0
[ 81.838140] btrfs_search_slot+0x6cc/0x920
[ 81.839754] btrfs_lookup_csum+0x3e/0x120
[ 81.841370] __btrfs_lookup_bio_sums+0x258/0x4d0
[ 81.842993] btrfs_lookup_bio_sums+0x11/0x20
[ 81.844621] btrfs_submit_compressed_read+0x3d0/0x4c0
[ 81.846259] btrfs_submit_bio_hook+0xbb/0x170
[ 81.847889] submit_one_bio+0x65/0x90
[ 81.849516] extent_readpages+0x1dd/0x1f0
[ 81.851145] btrfs_readpages+0x1a/0x20
[ 81.852769] __do_page_cache_readahead+0x249/0x320
[ 81.854396] ondemand_readahead+0x47e/0x4b0
[ 81.856025] page_cache_sync_readahead+0x3c/0x40
[ 81.857656] generic_file_read_iter+0x20e/0x770
[ 81.859279] __vfs_read+0xe5/0x120
[ 81.860897] vfs_read+0xc7/0x170
[ 81.862503] SyS_read+0x44/0xa0
[ 81.864102] entry_SYSCALL_64_fastpath+0x1f/0xc2[ 81.867299]
the dependencies between the lock to be acquired
[ 81.867300] and HARDIRQ-irq-unsafe lock:
[ 81.872089] -> (((&rwb->window_timer))){+.-...} ops: 463 {
[ 81.873716] HARDIRQ-ON-W at:
[ 81.875336] __lock_acquire+0x2ba/0x19e0
[ 81.876969] lock_acquire+0xa5/0xd0
[ 81.878598] call_timer_fn+0x74/0x110
[ 81.880225] expire_timers+0xaa/0xd0
[ 81.881853] run_timer_softirq+0x72/0x140
[ 81.883486] __do_softirq+0x143/0x290
[ 81.885127] irq_exit+0x6a/0xd0
[ 81.886765] smp_trace_apic_timer_interrupt+0x79/0x90
[ 81.888419] smp_apic_timer_interrupt+0x9/0x10
[ 81.890066] apic_timer_interrupt+0x93/0xa0
[ 81.891706] cpuidle_enter_state+0x102/0x230
[ 81.893349] cpuidle_enter+0x12/0x20
[ 81.894982] call_cpuidle+0x38/0x40
[ 81.896610] do_idle+0x16e/0x1e0
[ 81.898235] cpu_startup_entry+0x5d/0x60
[ 81.899866] start_secondary+0x150/0x180
[ 81.901497] verify_cpu+0x0/0xfc
[ 81.903126] IN-SOFTIRQ-W at:
[ 81.904753] __lock_acquire+0x268/0x19e0
[ 81.906402] lock_acquire+0xa5/0xd0
[ 81.908052] call_timer_fn+0x74/0x110
[ 81.909702] expire_timers+0xaa/0xd0
[ 81.911347] run_timer_softirq+0x72/0x140
[ 81.912980] __do_softirq+0x143/0x290
[ 81.914605] irq_exit+0x6a/0xd0
[ 81.916227] smp_trace_apic_timer_interrupt+0x79/0x90
[ 81.917867] smp_apic_timer_interrupt+0x9/0x10
[ 81.919510] apic_timer_interrupt+0x93/0xa0
[ 81.921161] cpuidle_enter_state+0x102/0x230
[ 81.922807] cpuidle_enter+0x12/0x20
[ 81.924444] call_cpuidle+0x38/0x40
[ 81.926082] do_idle+0x16e/0x1e0
[ 81.927718] cpu_startup_entry+0x5d/0x60
[ 81.929358] start_secondary+0x150/0x180
[ 81.930996] verify_cpu+0x0/0xfc
[ 81.932628] INITIAL USE at:
[ 81.934256] __lock_acquire+0x1c9/0x19e0
[ 81.935907] lock_acquire+0xa5/0xd0
[ 81.937550] call_timer_fn+0x74/0x110
[ 81.939192] expire_timers+0xaa/0xd0
[ 81.940826] run_timer_softirq+0x72/0x140
[ 81.942456] __do_softirq+0x143/0x290
[ 81.944075] irq_exit+0x6a/0xd0
[ 81.945685] smp_trace_apic_timer_interrupt+0x79/0x90
[ 81.947304] smp_apic_timer_interrupt+0x9/0x10
[ 81.948926] apic_timer_interrupt+0x93/0xa0
[ 81.950547] cpuidle_enter_state+0x102/0x230
[ 81.952162] cpuidle_enter+0x12/0x20
[ 81.953766] call_cpuidle+0x38/0x40
[ 81.955369] do_idle+0x16e/0x1e0
[ 81.956971] cpu_startup_entry+0x5d/0x60
[ 81.958580] start_secondary+0x150/0x180
[ 81.960191] verify_cpu+0x0/0xfc
[ 81.961787] }
[ 81.963360] ... key at: [<ffffffff82f1f7e0>] __key.37597+0x0/0x8
[ 81.964971] ... acquired at:
[ 81.966566] check_irq_usage+0x4d/0xa0
[ 81.968162] __lock_acquire+0x1110/0x19e0
[ 81.969767] lock_acquire+0xa5/0xd0
[ 81.971374] del_timer_sync+0x49/0xd0
[ 81.972973] wbt_disable_default+0x1e/0x60
[ 81.974574] check_blkcg_changed+0x22d/0x380
[ 81.976192] cfq_set_request+0xe5/0x2c0
[ 81.977800] elv_set_request+0x1a/0x20
[ 81.979384] get_request+0x88d/0x900
[ 81.980954] blk_queue_bio+0x1e9/0x320
[ 81.982506] generic_make_request+0xbe/0x170
[ 81.984057] submit_bio+0x121/0x150
[ 81.985606] btrfs_map_bio+0x282/0x2a0
[ 81.987157] btree_submit_bio_hook+0x71/0xe0
[ 81.988713] submit_one_bio+0x65/0x90
[ 81.990269] read_extent_buffer_pages+0x1fa/0x2f0
[ 81.991829] btree_read_extent_buffer_pages+0x59/0xf0
[ 81.993394] read_tree_block+0x2d/0x50
[ 81.994950] read_block_for_search.isra.10+0x296/0x2e0
[ 81.996513] btrfs_search_slot+0x6cc/0x920
[ 81.998073] btrfs_lookup_csum+0x3e/0x120
[ 81.999624] __btrfs_lookup_bio_sums+0x258/0x4d0
[ 82.001190] btrfs_lookup_bio_sums+0x11/0x20
[ 82.002767] btrfs_submit_compressed_read+0x3d0/0x4c0
[ 82.004352] btrfs_submit_bio_hook+0xbb/0x170
[ 82.005933] submit_one_bio+0x65/0x90
[ 82.007513] extent_readpages+0x1dd/0x1f0
[ 82.009092] btrfs_readpages+0x1a/0x20
[ 82.010667] __do_page_cache_readahead+0x249/0x320
[ 82.012241] ondemand_readahead+0x47e/0x4b0
[ 82.013816] page_cache_sync_readahead+0x3c/0x40
[ 82.015398] generic_file_read_iter+0x20e/0x770
[ 82.016989] __vfs_read+0xe5/0x120
[ 82.018577] vfs_read+0xc7/0x170
[ 82.020155] SyS_read+0x44/0xa0
[ 82.021731] entry_SYSCALL_64_fastpath+0x1f/0xc2[ 82.024866]
stack backtrace:
[ 82.027929] CPU: 13 PID: 1725 Comm: (systemd) Tainted: G I 4.10.0-rc8-debug-dirty #1
[ 82.029530] Hardware name: FUJITSU PRIMERGY TX200 S5 /D2709, BIOS 6.00 Rev. 1.14.2709 02/04/2013
[ 82.031213] Call Trace:
[ 82.032870] dump_stack+0x86/0xc1
[ 82.034527] check_usage+0x5fc/0x630
[ 82.036191] check_irq_usage+0x4d/0xa0
[ 82.037852] __lock_acquire+0x1110/0x19e0
[ 82.039510] ? __lock_acquire+0x18f0/0x19e0
[ 82.041160] ? __lock_acquire+0x18f0/0x19e0
[ 82.042792] lock_acquire+0xa5/0xd0
[ 82.044425] ? collect_expired_timers+0xb0/0xb0
[ 82.046069] del_timer_sync+0x49/0xd0
[ 82.047711] ? collect_expired_timers+0xb0/0xb0
[ 82.049366] wbt_disable_default+0x1e/0x60
[ 82.051024] check_blkcg_changed+0x22d/0x380
[ 82.052678] ? cfq_pd_offline+0x110/0x110
[ 82.054327] ? debug_smp_processor_id+0x17/0x20
[ 82.055977] ? get_lock_stats+0x19/0x50
[ 82.057623] ? cfq_set_request+0x80/0x2c0
[ 82.059276] cfq_set_request+0xe5/0x2c0
[ 82.060926] ? _raw_spin_unlock_irq+0x27/0x50
[ 82.062656] ? __this_cpu_preempt_check+0x13/0x20
[ 82.064314] ? trace_hardirqs_on_caller+0x1db/0x210
[ 82.065976] ? trace_hardirqs_on+0xd/0x10
[ 82.067630] ? _raw_spin_unlock_irq+0x38/0x50
[ 82.069291] elv_set_request+0x1a/0x20
[ 82.070937] get_request+0x88d/0x900
[ 82.072568] ? get_request+0x47/0x900
[ 82.074202] ? prepare_to_wait_event+0x180/0x180
[ 82.075842] blk_queue_bio+0x1e9/0x320
[ 82.077476] generic_make_request+0xbe/0x170
[ 82.079117] submit_bio+0x121/0x150
[ 82.080754] ? __percpu_counter_add+0x8b/0xb0
[ 82.082390] btrfs_map_bio+0x282/0x2a0
[ 82.084027] ? free_root_pointers+0x60/0x60
[ 82.085673] btree_submit_bio_hook+0x71/0xe0
[ 82.087320] submit_one_bio+0x65/0x90
[ 82.088969] read_extent_buffer_pages+0x1fa/0x2f0
[ 82.090628] ? free_root_pointers+0x60/0x60
[ 82.092284] btree_read_extent_buffer_pages+0x59/0xf0
[ 82.093952] read_tree_block+0x2d/0x50
[ 82.095612] read_block_for_search.isra.10+0x296/0x2e0
[ 82.097282] btrfs_search_slot+0x6cc/0x920
[ 82.098946] ? __this_cpu_preempt_check+0x13/0x20
[ 82.100617] btrfs_lookup_csum+0x3e/0x120
[ 82.102280] __btrfs_lookup_bio_sums+0x258/0x4d0
[ 82.103951] ? kmem_cache_alloc+0x11a/0x130
[ 82.105613] btrfs_lookup_bio_sums+0x11/0x20
[ 82.107280] btrfs_submit_compressed_read+0x3d0/0x4c0
[ 82.108953] btrfs_submit_bio_hook+0xbb/0x170
[ 82.110610] submit_one_bio+0x65/0x90
[ 82.112260] extent_readpages+0x1dd/0x1f0
[ 82.113910] ? btrfs_direct_IO+0x320/0x320
[ 82.115559] ? alloc_pages_current+0x14a/0x1e0
[ 82.117219] ? __page_cache_alloc+0xcc/0x150
[ 82.118873] btrfs_readpages+0x1a/0x20
[ 82.120524] __do_page_cache_readahead+0x249/0x320
[ 82.122181] ? __do_page_cache_readahead+0xb4/0x320
[ 82.123836] ondemand_readahead+0x47e/0x4b0
[ 82.125491] page_cache_sync_readahead+0x3c/0x40
[ 82.127148] generic_file_read_iter+0x20e/0x770
[ 82.128817] ? __do_page_fault+0x325/0x410
[ 82.130490] __vfs_read+0xe5/0x120
[ 82.132152] vfs_read+0xc7/0x170
[ 82.133809] SyS_read+0x44/0xa0
[ 82.135479] entry_SYSCALL_64_fastpath+0x1f/0xc2
[ 82.137166] RIP: 0033:0x7f4eace2ff27
[ 82.138825] RSP: 002b:00007ffdd7f77318 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
[ 82.140477] RAX: ffffffffffffffda RBX: ffffffff813b0823 RCX: 00007f4eace2ff27
[ 82.142106] RDX: 0000000000000340 RSI: 00007ffdd7f77408 RDI: 0000000000000008
[ 82.143751] RBP: ffffc9000ccb7f88 R08: 0000000090000002 R09: 00007ffdd7f773ef
[ 82.145408] R10: 00007f4eace310d0 R11: 0000000000000202 R12: 00007ffdd7f773ef
[ 82.147072] R13: 0000000000000340 R14: 0000000000000008 R15: 00007ffdd7f77400
[ 82.148745] ? __this_cpu_preempt_check+0x13/0x20
...For the kernel with the revert reverted I'll do some videos later on today.. I need the box to do some work first :)
So far .. the kernel with the reverted revert + Mike's patch ( but even without Mike's patch ) will trigger an bug in mce code , with mce=off it will trigger an bug in microcode code , with dis_ucode_ldr we trigger an bug(s) in smp_call_*() and hrtimer_*() functions..
Also this 2 liner patch seems to break hell .. at least on my box.
Regards,
Gabriel C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 9 lines · Gabriel C
Quoted 3 lines · Linus Torvalds
Gabriel, does this patch fix your problem even without the revert (note that the revert is already in rc8, so if you apply Mike's patch on top of current kernel sources you should revert the revert to test)
Yes I know .. I have 2 kernels one with and one without the revert.
Mike's patch fixes the warning I see in rc8 with the revert but won't fix the problem with reverted revert...
Can you please send your .config ?
Quoted 2 lines
Also now I get a new warning :
Yes, that's definitely broken. I'll send that splat to the block folks.
Quoted 6 lines
So far .. the kernel with the reverted revert + Mike's patch ( but even without Mike's patch ) will trigger an bug in mce code ,
with mce=off it will trigger an bug in microcode code , withdis_ucode_ldrwe trigger an bug(s) in smp_call_*() and hrtimer_*() functions..Also this 2 liner patch seems to break hell .. at least on my box.
I'm still stumped.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 11 lines · Thomas Gleixner
Quoted 9 lines · Gabriel C
Quoted 3 lines · Linus Torvalds
Gabriel, does this patch fix your problem even without the revert (note that the revert is already in rc8, so if you apply Mike's patch on top of current kernel sources you should revert the revert to test)
Yes I know .. I have 2 kernels one with and one without the revert.
Mike's patch fixes the warning I see in rc8 with the revert but won't fix the problem with reverted revert...
Quoted 6 lines
Can you please send your .config ?
Quoted 2 lines
Also now I get a new warning :
Yes, that's definitely broken. I'll send that splat to the block folks.
Can you disable CONFIG_BLK_WBT for now so we get to the real stuff?
Quoted 13 lines
Quoted 6 lines
So far .. the kernel with the reverted revert + Mike's patch ( but even without Mike's patch ) will trigger an bug in mce code ,
with mce=off it will trigger an bug in microcode code , withdis_ucode_ldrwe trigger an bug(s) in smp_call_*() and hrtimer_*() functions..Also this 2 liner patch seems to break hell .. at least on my box.
I'm still stumped.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 8 lines · Thomas Gleixner
Quoted 6 lines · Thomas Gleixner
Quoted 5 lines · Gabriel C
Quoted 3 lines · Linus Torvalds
Gabriel, does this patch fix your problem even without the revert (note that the revert is already in rc8, so if you apply Mike's patch on top of current kernel sources you should revert the revert to test)
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Yes I know .. I have 2 kernels one with and one without the revert.
Mike's patch fixes the warning I see in rc8 with the revert but won't fix the problem with reverted revert...
Can you please send your .config ?
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/config-4.10-rc8
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Also now I get a new warning :
Yes, that's definitely broken. I'll send that splat to the block folks.
Can you disable
CONFIG_BLK_WBTfor now so we get to the real stuff?
Sure. I'll rebuild both kernels in a bit. just got home.
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Gabriel CQuoted 7 lines · Gabriel C
So far .. the kernel with the reverted revert + Mike's patch ( but even without Mike's patch ) will trigger an bug in mce code ,
with mce=off it will trigger an bug in microcode code , withdis_ucode_ldrwe trigger an bug(s) in smp_call_*() and hrtimer_*() functions..Also this 2 liner patch seems to break hell .. at least on my box.
I suspect you might be seeing symptoms that are "downstream" from the real issue. So depending on what you enable/disable you get problems in different parts.
That said, the block lockdep splat Jens sent a patch for. But it looks very unlikely to be the root cause.
The fact that the two-liner patch matters so much and so consistently (despite timing differences elsewhere) makes me think it realy is specifically about irq retriggering, not the random symptoms we see.
Can you try this patch on top of a working setup that doesn't have a lot of other noise in it (ie presumably just plain rc8, for example)? All it does is do a WARN_ON() when the irq_retrigger() code is actually triggered. It shouldn't be so common as to spam all your logs, but I might be wrong, so I put a stub in where you could replace the
if (1)
with something like
if (printk_ratelimit())
which should limit it to something like a max of 10 warnings every five seconds.
I'm wondering if we somehow end up trying to retrigger an NMI or other internal APIC thing (maybe that's where the machine check comes in?) that definitely shouldn't be retriggered.
Linus
arch/x86/kernel/irq.c | 4 ++++ kernel/irq/resend.c | 5 +++++ 2 files changed, 9 insertions(+)
arch/x86/kernel/irq.c +4 -0
@@ -532,6 +532,10 @@ void fixup_irqs(void)if (irr & (1 << (vector %32 ))) { desc =__this_cpu_read (vector_irq[vector]); +if (1 ) {// rate limit? +printk ("IRQ retrigger for %s\n" , desc->name); +WARN_ON_ONCE (1 ); + }raw_spin_lock (&desc->lock); data =irq_desc_get_irq_data (desc); chip =irq_data_get_irq_chip (data);
kernel/irq/resend.c +5 -0
@@ -71,6 +71,11 @@ void check_irq_resend(struct irq_desc *desc) desc->istate &= ~IRQS_PENDING ; desc->istate |=IRQS_REPLAY ; +if (1 ) {// rate limit? +printk ("IRQ retrigger for %s\n" , desc->name); +WARN_ON_ONCE (1 ); + } +if (!desc->irq_data.chip->irq_retrigger || !desc->irq_data.chip->irq_retrigger (&desc->irq_data)) {#ifdef CONFIG_HARDIRQS_SW_RESEND
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 3 lines · Linus Torvalds
The fact that the two-liner patch matters so much and so consistently (despite timing differences elsewhere) makes me think it realy is specifically about irq retriggering, not the random symptoms we see.
I agree,
Quoted 3 lines
I'm wondering if we somehow end up trying to retrigger an NMI or other internal APIC thing (maybe that's where the machine check comes in?) that definitely shouldn't be retriggered.
We never retrigger any of the special vectors, just the device interrupts can get that treatment and there only the few edge interrupts connected to the IO-APIC are relevant.
Boris has access to a machine with a similar CPU. It shows the symptom of boot hang, but only after Boris used Gabriels config file. The normal SuSe config just boots fine. Again, nothing stands out there which immediately rings a bell. :(
Thanks,
Thomas
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 4 lines · Thomas Gleixner
We never retrigger any of the special vectors, just the device interrupts can get that treatment and there only the few edge interrupts connected to the IO-APIC are relevant.
Don't we walk up to the local apic when we walk the parent chain? I didn't check how the parent chain thing is connected..
Anyway, I'm wondering if the WARN_ON might give some ideas (and I just noticed that I made the WARN_ON() be WARN_ON_ONCE() in the patch I sent out, because I'm so used to trying to avoid constant streams of warnings, but in this case we migth want them - particularly if Gabriel then tries it with a broken kernel and we get a "it halts after _this_ one" situation.
Quoted 4 lines
Boris has access to a machine with a similar CPU. It shows the symptom of boot hang, but only after Boris used Gabriels config file. The normal SuSe config just boots fine. Again, nothing stands out there which immediately rings a bell. :(
Oh, I must have missed that email.
Boris - have you tried to narrow down the exact config isse with the ktest config bisection script? I haven't used it myself, but I'm adding StevenR to see if he has suggestions.
Linus
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 21 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
We never retrigger any of the special vectors, just the device interrupts can get that treatment and there only the few edge interrupts connected to the IO-APIC are relevant.
Don't we walk up to the local apic when we walk the parent chain? I didn't check how the parent chain thing is connected..
Anyway, I'm wondering if the
WARN_ONmight give some ideas (and I just noticed that I made theWARN_ON()beWARN_ON_ONCE()in the patch I sent out, because I'm so used to trying to avoid constant streams of warnings, but in this case we migth want them - particularly if Gabriel then tries it with a broken kernel and we get a "it halts after _this_ one" situation.Quoted 4 lines
Boris has access to a machine with a similar CPU. It shows the symptom of boot hang, but only after Boris used Gabriels config file. The normal SuSe config just boots fine. Again, nothing stands out there which immediately rings a bell. :(
Quoted 5 lines
Oh, I must have missed that email.
Boris - have you tried to narrow down the exact config isse with the ktest config bisection script? I haven't used it myself, but I'm adding StevenR to see if he has suggestions.
I found a machine myself which does not come up with that config, but the remote console is not working, so I'll poke at it first thing tomorrow morning when I'm in the office.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Linus TorvaldsQuoted 21 lines · On Mon, 13 Feb 2017 12:12:53 -0800 Linus Torvalds…
Quoted 4 lines · Thomas Gleixner
We never retrigger any of the special vectors, just the device interrupts can get that treatment and there only the few edge interrupts connected to the IO-APIC are relevant.
Don't we walk up to the local apic when we walk the parent chain? I didn't check how the parent chain thing is connected..
Anyway, I'm wondering if the
WARN_ONmight give some ideas (and I just noticed that I made theWARN_ON()beWARN_ON_ONCE()in the patch I sent out, because I'm so used to trying to avoid constant streams of warnings, but in this case we migth want them - particularly if Gabriel then tries it with a broken kernel and we get a "it halts after _this_ one" situation.Quoted 4 lines
Boris has access to a machine with a similar CPU. It shows the symptom of boot hang, but only after Boris used Gabriels config file. The normal SuSe config just boots fine. Again, nothing stands out there which immediately rings a bell. :(
Quoted 6 lines
Oh, I must have missed that email.
Boris - have you tried to narrow down the exact config isse with the ktest config bisection script? I haven't used it myself, but I'm adding StevenR to see if he has suggestions.
Funny you mention this. I'm about to finish a config-bisect stand alone script (doesn't need all the stuff that ktest.pl has), and I was looking for a test case.
-- Steve
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Linus TorvaldsQuoted 2 lines · Linus Torvalds
Boris - have you tried to narrow down the exact config isse with the ktest config bisection script?
I'd love to but that box is one piece of shite. I only have remote console access and the remote console sucks big time. It booted fine with our SLES config but then I tried Gabriel's config and it froze. Btw, remote recovery is a serious PITA - had to reinstall it. It was *actually* faster. :-\
Then, I reverted
020eb3daaba2 ("x86/ioapic: Restore IO-APIC irq_chip retrigger callback")
ontop of -rc7 as Thomas requested and it started spewing the crap below (yeah, that serial output is f*cked).
And it went nuts after this, flooding dmesg with that splat (I've sent tglx a 14M dmesg) and then I killed it.
So all in all, bisecting on this box would be like trying to sew with astronaut's gloves. So I really really hope tglx or Gabriel are more successful there.
FWIW, it really looks like something's tickling this in Gabriel's .config.
HTH.
[ 8.608102] Btrfs loaded, crc32c=crc32c-generic [ 8.618171] console [netcon0] enabled [ 8.625703] netconsole: network logging started [ 8.635613] rtc_cmos 00:04: setting system clock to 2017-02-13 20:15:50 UTC ( 1487016950) [ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol dfish_pdev_bus) [ 8.669770] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G I 4.10.0-rc^M[ 8.618171] console [netcon0] enabled [ 8.625703] netconsole: network logging started [ 8.635613] rtc_cmos 00:04: setting system clock to 2017-02-13 20:15:50 UTC ( 1487016950) [ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol dfish_pdev_bus) [ 8.669770] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G I 4.10.0-rc 7-dirty #3 [ 8.686066] Hardware name: HP ProLiant ML370 G6, BIOS P63 05/05/2011 [ 8.698915] Call Trace: [ 8.703972] dump_stack+0x63/0x85 [ 8.710757] __setup_irq+0x486/0x5e0 [ 8.718060] request_threaded_irq+0x121/0x190 [ 8.726939] univ8250_setup_irq+0x202/0x250 [ 8.735458] serial8250_do_startup+0x411/0x5e0 [ 8.744500] serial8250_startup+0x16/0x20 [ 8.752672] uart_startup+0x8d/0x140 [ 8.759973] uart_port_activate+0x4d/0x60 [ 8.768190] tty_port_open+0x7d/0xc0 [ 8.775494] ? tty_add_file+0x7d/0x90 [ 8.782969] uart_open+0x38/0x50 [ 8.789622] tty_open+0x384/0x580 [ 8.796407] chrdev_open+0x147/0x1e0 [ 8.803711] ? cdev_put+0x20/0x20 [ 8.810537] do_dentry_open.isra.15+0x17b/0x2c0 ^M[ 8.759973] uart_port_activate+0x4d/0x60 [ 8.768190] tty_port_open+0x7d/0xc0 [ 8.775494] ? tty_add_file+0x7d/0x90 [ 8.782969] uart_open+0x38/0x50 [ 8.789622] tty_open+0x384/0x580 [ 8.796407] chrdev_open+0x147/0x1e0 [ 8.803711] ? cdev_put+0x20/0x20 [ 8.810537] do_dentry_open.isra.15+0x17b/0x2c0 [ 8.819811] ? __inode_permission+0xa3/0xc0 [ 8.828329] vfs_open+0x4f/0x60 [ 8.834809] path_openat+0xe6a/0x1190 [ 8.842290] ? ida_get_new_above+0x211/0x230 [ 8.850981] ? proc_alloc_inum+0x4f/0xb0 [ 8.858976] do_filp_open+0x7d/0xd0 [ 8.866109] ? __check_object_size+0xbe/0x1e8 [ 8.874973] ? __alloc_fd+0x13e/0x150 [ 8.882446] do_sys_open+0x130/0x1c0 [ 8.889749] SyS_open+0x19/0x20 [ 8.896199] kernel_init_freeable+0x1b8/0x224 [ 8.905120] ? do_early_param+0x8a/0x8a [ 8.912947] ? rest_init+0x90/0x90 [ 8.919906] kernel_init+0x9/0x100 [ 8.926907] ret_from_fork+0x2c/0x40 [ 8.937513] Freeing unused kernel memory: 1600K [ 8.946755] Write protecting the kernel read-only data: 12288k ^M[ 8.866109] ? __check_object_size+0xbe/0x1e8 [ 8.874973] ? __alloc_fd+0x13e/0x150 [ 8.882446] do_sys_open+0x130/0x1c0 [ 8.889749] SyS_open+0x19/0x20 [ 8.896199] kernel_init_freeable+0x1b8/0x224 [ 8.905120] ? do_early_param+0x8a/0x8a [ 8.912947] ? rest_init+0x90/0x90 [ 8.919906] kernel_init+0x9/0x100 [ 8.926907] ret_from_fork+0x2c/0x40 [ 8.937513] Freeing unused kernel memory: 1600K [ 8.946755] Write protecting the kernel read-only data: 12288k [ 8.962756] Freeing unused kernel memory: 1364K [ 8.977387] Freeing unused kernel memory: 1740K [ 8.988912] systemd[1]: Failed to insert module 'autofs4': Function not imple mented [ 9.004624] systemd[1]: Failed to insert module 'ipv6': Function not implemen ted [ 9.019744] systemd[1]: Failed to insert module 'unix': Function not implemen ted [ 9.034844] tsc: Refined TSC clocksource calibration: 2532.613 MHz [ 9.035665] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2481921a 2d0, max_idle_ns: 440795281605 ns [ 9.069575] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol dfish_pdev_bus) [ 9.086738] CPU: 2 PID: 1 Comm: systemd Tainted: G I 4.10.0-rc7-^M[ 9.019744] systemd[1]: Failed to insert module 'unix': Function not implemen
ted
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 5 lines · Borislav Petkov
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)
Uurgh.
Gabriel, can you please disable CONFIG_GOLDFISH and everything related to that?
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 10 lines · Thomas Gleixner
Quoted 5 lines · Borislav Petkov
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)Uurgh.
Gabriel, can you please disable
CONFIG_GOLDFISHand everything related to that?
Sure. I was about to start building the kernels.
I'll build an rc8 -CONFIG_GOLDFISH , -CONFIG_BLK_WBT + the debug patch from Linus.
An one with with reverted revert.. with same config then..
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 12 lines · Gabriel C
Quoted 9 lines · Thomas Gleixner
Quoted 5 lines · Borislav Petkov
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (gol
dfish_pdev_bus)Uurgh.
Quoted 8 lines
Quoted 1 line
Gabriel, can you please disable
CONFIG_GOLDFISHand everything related to that?Sure. I was about to start building the kernels.
I'll build an rc8 -CONFIG_GOLDFISH , -CONFIG_BLK_WBT + the debug patch from Linus.
An one with with reverted revert.. with same config then..
Ok some news .. without CONFIG_GOLDFISH && CONFIG_BLK_WBT + Linus debug patch + Mike's patch ,
+ 'x86/ioapic: Restore IO-APIC irq_chip retrigger callback' back in I have an working kernel.
Linus debug patch triggers once but that seems to be the netconsole.. ( e1000e stuff )
..
[ 10.049367] IRQ retrigger for edge [ 10.049368] ------------[ cut here ]------------ [ 10.049373] WARNING: CPU: 11 PID: 1 at kernel/irq/resend.c:76 check_irq_resend+0x5f/0x80 [ 10.049374] Modules linked in: [ 10.049377] CPU: 11 PID: 1 Comm: swapper/0 Tainted: G I 4.10.0-rc8-debug-00001-ga1015e374d94-dirty #4 [ 10.049378] Hardware name: FUJITSU PRIMERGY TX200 S5 /D2709, BIOS 6.00 Rev. 1.14.2709 02/04/2013 [ 10.049379] Call Trace: [ 10.049382] dump_stack+0x86/0xc1 [ 10.049385] __warn+0xbb/0xe0 [ 10.049387] warn_slowpath_null+0x18/0x20 [ 10.049388] check_irq_resend+0x5f/0x80 [ 10.049390] __enable_irq+0x4d/0x60 [ 10.049391] enable_irq+0x66/0x80 [ 10.049394] e1000_netpoll+0x76/0x110 [ 10.049397] netpoll_poll_dev+0xa0/0x170 [ 10.049398] netpoll_send_skb_on_dev+0x1ab/0x2b0 [ 10.049400] netpoll_send_udp+0x417/0x450 [ 10.049403] write_msg+0xdb/0xf0 [ 10.049404] console_unlock+0x2e5/0x430 [ 10.049406] register_console+0x287/0x370 [ 10.049408] init_netconsole+0x1e0/0x27f [ 10.049409] ? option_setup+0x1f/0x1f [ 10.049413] do_one_initcall+0x6f/0x190 [ 10.049416] ? do_early_param+0x8f/0x8f [ 10.049417] kernel_init_freeable+0x321/0x3b7 [ 10.049420] ? rest_init+0x140/0x140 [ 10.049421] kernel_init+0x9/0xf0 [ 10.049423] ret_from_fork+0x31/0x40 [ 10.049425] ---[ end trace 471c8e9095d0e278 ]---
...
Now I need to find out which CONFIG_* option broke it ..
I'll start to re-enable *GOLDFISH things first since this seems to be somewhat broken.
Is the first thing I will do tomorrow.
Regards,
Gabriel C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Borislav PetkovQuoted 5 lines · Borislav Petkov
FWIW, it really looks like something's tickling this in Gabriel's .config.
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (goldfish_pdev_bus)
How the hell is that "goldfish_pdev_bus" thing there at all?
And I'm not talking about the driver being enabled, I'm talking about the bus probe finding such a device in the first place?
That thing is supposed to only trigger on virtual hardware in QEMU. But it must have actually probed successfully in order to have an interrupt. How is that thing supposed to match anything>?
Linus
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 7 lines · Linus Torvalds
Quoted 5 lines · Borislav Petkov
FWIW, it really looks like something's tickling this in Gabriel's .config.
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (goldfish_pdev_bus)
Quoted 8 lines
How the hell is that "
goldfish_pdev_bus" thing there at all?And I'm not talking about the driver being enabled, I'm talking about the bus probe finding such a device in the first place?
That thing is supposed to only trigger on virtual hardware in QEMU. But it must have actually probed successfully in order to have an interrupt. How is that thing supposed to match anything>?
That's easy.
arch/x86/platform/goldfish/goldfish.c
static int __init goldfish_init(void)
{
platform_device_register_simple("goldfish_pdev_bus", -1,
goldfish_pdev_bus_resources, 2);
return 0;
}device_initcall(goldfish_init);
So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 28 lines · Thomas Gleixner
Quoted 7 lines · Linus Torvalds
Quoted 5 lines · Borislav Petkov
FWIW, it really looks like something's tickling this in Gabriel's .config.
[ 8.652522] genirq: Flags mismatch irq 4. 00000000 (serial) vs. 00000080 (goldfish_pdev_bus)Quoted 8 lines
How the hell is that "
goldfish_pdev_bus" thing there at all?And I'm not talking about the driver being enabled, I'm talking about the bus probe finding such a device in the first place?
That thing is supposed to only trigger on virtual hardware in QEMU. But it must have actually probed successfully in order to have an interrupt. How is that thing supposed to match anything>?
That's easy.
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }
Quoted 6 lines
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
And of course that stupid driver init runs before the serial device init happens. Which leaves the serial w/o interrupt. Crap.
Thanks,
Thomas
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Thomas GleixnerQuoted 10 lines · Thomas Gleixner
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }
Quoted 6 lines
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Ugh. Yeah, that's crazy. Random hardcoded interfaces that get enabled by people by mistake.
And yeah, it's not just the irq. It just randomly sets up memory addresses too.
That thing needs to be disabled some way. Maybe not marked "broken", but there needs to be something that actually enables it at runtime (like a kernel command line option or something like that).
That said - that code was presumably enabled before too, so why would this break something? And if this is the cause, we need to figure out what it is that it then triggers..
Linus
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 22 lines · Linus Torvalds
Quoted 9 lines · Thomas Gleixner
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }Quoted 6 lines
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Ugh. Yeah, that's crazy. Random hardcoded interfaces that get enabled by people by mistake.
And yeah, it's not just the irq. It just randomly sets up memory addresses too.
Quoted 7 lines
That thing needs to be disabled some way. Maybe not marked "broken", but there needs to be something that actually enables it at runtime (like a kernel command line option or something like that).
That said - that code was presumably enabled before too, so why would this break something? And if this is the cause, we need to figure out what it is that it then triggers..
I'm on it ...
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 18 lines · Thomas Gleixner
Quoted 17 lines · Linus Torvalds
Quoted 15 lines · Thomas Gleixner
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Quoted 8 lines
Quoted 8 lines
Ugh. Yeah, that's crazy. Random hardcoded interfaces that get enabled by people by mistake.
And yeah, it's not just the irq. It just randomly sets up memory addresses too.
That thing needs to be disabled some way. Maybe not marked "broken", but there needs to be something that actually enables it at runtime (like a kernel command line option or something like that).
I prefer to mark it broken, because that's what it is, but we can add a command line option as well. See below.
Quoted 5 lines
Quoted 3 lines
That said - that code was presumably enabled before too, so why would this break something? And if this is the cause, we need to figure out what it is that it then triggers..
I'm on it ...
When that goldfish bus driver gets an interrupt then it really goes down the drain:
static irqreturn_t goldfish_pdev_bus_interrupt(int irq, void *dev_id)
{
irqreturn_t ret = IRQ_NONE;
while (1) {
u32 op = readl(pdev_bus_base + PDEV_BUS_OP);So here it reads from that hardcoded physical address which was handed in via that platform device.
switch (op) {
case PDEV_BUS_OP_DONE:
return IRQ_NONE;If 'op' is 0 it returns IRQ_NONE;
case PDEV_BUS_OP_REMOVE_DEV: goldfish_pdev_remove(); break; case PDEV_BUS_OP_ADD_DEV: goldfish_new_pdev(); break;
These two handle device add/remove which pokes more in that address range. Cute stuff with kmalloc(GFP_ATOMIC) and other nice things inside of a hard interrupt handler.
} ret = IRQ_HANDLED;
Sets ret to HANDLED, which is pointless because the only exit from this while(1) loop is via the PDEV_BUS_OP_DONE case, which returns IRQ_NONE !
} return ret; }
On my machine this loop never breaks because op = 0xffffffff . Which obviously causes the rcu stalls and whatever.
I haven't seen such an engineering trainwreck in a long time.
So now, the real interesting question remains:
Why is that ioapic - retrigger patch causing that nonsense to run?
Quoted 1 line
From Linus debug patch we can't see which interrupt line is retriggered and
it's a WARN_ONCE()....
Gabriel, can you please apply the debug patch below instead of the one Linus sent, so we can get some more information about this. Can you upload /proc/interrupts as well? The last one I've seen does not have e1000 in it.
Leave GOLDFISH and WBT disabled for now.
Thanks,
tglx
8<-------------
kernel/irq/chip.c +3 -2
@@ -1098,9 +1098,10 @@ EXPORT_SYMBOL_GPL(irq_chip_set_type_pareint irq_chip_retrigger_hierarchy (struct irq_data *data) {for (data = data->parent_data; data; data = data->parent_data) -if (data->chip && data->chip->irq_retrigger) +if (data->chip && data->chip->irq_retrigger) { +pr_info ("Retrigger %s %u\n" , data->chip->name, data->irq);return data->chip->irq_retrigger (data); - + }return 0 ; }
Greg Kroah-Hartman
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 22 lines · Thomas Gleixner
Quoted 21 lines · Thomas Gleixner
Quoted 20 lines · Linus Torvalds
Quoted 9 lines · Thomas Gleixner
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }Quoted 6 lines
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Ugh. Yeah, that's crazy. Random hardcoded interfaces that get enabled by people by mistake.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
And yeah, it's not just the irq. It just randomly sets up memory addresses too.
That thing needs to be disabled some way. Maybe not marked "broken", but there needs to be something that actually enables it at runtime (like a kernel command line option or something like that).
I prefer to mark it broken, because that's what it is, but we can add a command line option as well. See below.
I have no problem marking all of the Goldfish stuff broken as it seems to be a "dead" platform at the moment, no one is providing any updates or cares about it, and the only users I know of it are using a _very_ old kernel version (the Android emulator).
Want me to send a patch for that as I think the Goldfish stuff originally came through my tree...
thanks,
greg k-h
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 32 lines · Greg Kroah-Hartman
Quoted 22 lines · Thomas Gleixner
Quoted 21 lines · Thomas Gleixner
Quoted 20 lines · Linus Torvalds
Quoted 9 lines · Thomas Gleixner
arch/x86/platform/goldfish/goldfish.cstatic int
__initgoldfish_init(void){ platform_device_register_simple("goldfish_pdev_bus", -1, goldfish_pdev_bus_resources, 2); return 0; }Quoted 6 lines
device_initcall(goldfish_init);So it unconditionallyt registers that platform device, which has IRQ 4 as irq resource and the driver happily matches on the platform devices.
Wonderful crap, isn't it? It should be made 'depend on BROKEN'.
Ugh. Yeah, that's crazy. Random hardcoded interfaces that get enabled by people by mistake.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
And yeah, it's not just the irq. It just randomly sets up memory addresses too.
That thing needs to be disabled some way. Maybe not marked "broken", but there needs to be something that actually enables it at runtime (like a kernel command line option or something like that).
I prefer to mark it broken, because that's what it is, but we can add a command line option as well. See below.
Quoted 7 lines
I have no problem marking all of the Goldfish stuff broken as it seems to be a "dead" platform at the moment, no one is providing any updates or cares about it, and the only users I know of it are using a _very_ old kernel version (the Android emulator).
Want me to send a patch for that as I think the Goldfish stuff originally came through my tree...
Alternatively we can add a command line option 'goldfish' to the x86/platform code which prevents the creation of platform device if not set. Either way is fine.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Thomas GleixnerQuoted 5 lines · Thomas Gleixner
Gabriel, can you please apply the debug patch below instead of the one Linus sent, so we can get some more information about this. Can you upload
/proc/interruptsas well? The last one I've seen does not have e1000 in it.Leave GOLDFISH and WBT disabled for now.
Here is a better one. Please turn on GOLDFISH and leave WBT disabled unless you have Jens patch applied.
That should give us the connection between the retrigger and the goldfish irq firing.
output from lspci -vvv would be helpful as well.
Thanks,
tglx
---
drivers/platform/goldfish/pdev_bus.c +8 -1
@@ -154,10 +154,17 @@ static int goldfish_new_pdev(void)return 0 ; } +extern int stop_crap; +static irqreturn_t goldfish_pdev_bus_interrupt (int irq,void *dev_id) {irqreturn_t ret =IRQ_NONE ; -while (1 ) { + +if (!stop_crap) { +pr_info ("Goldfish IRQ\n" ); + stop_crap =1 ; + } +while (0 ) {u32 op =readl (pdev_bus_base +PDEV_BUS_OP );switch (op) {case PDEV_BUS_OP_DONE :
kernel/irq/chip.c +6 -2
@@ -1088,6 +1088,8 @@ int irq_chip_set_type_parent(struct irq_ }EXPORT_SYMBOL_GPL (irq_chip_set_type_parent); +int stop_crap; +/** * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware * @data: Pointer to interrupt specific data
@@ -1098,9 +1100,11 @@ EXPORT_SYMBOL_GPL(irq_chip_set_type_pareint irq_chip_retrigger_hierarchy (struct irq_data *data) {for (data = data->parent_data; data; data = data->parent_data) -if (data->chip && data->chip->irq_retrigger) +if (data->chip && data->chip->irq_retrigger) { +if (!stop_crap) +pr_info ("Retrigger %s %u\n" , data->chip->name, data->irq);return data->chip->irq_retrigger (data); - + }return 0 ; }
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 4 lines · Thomas Gleixner
Quoted 3 lines · Thomas Gleixner
Gabriel, can you please apply the debug patch below instead of the one Linus sent, so we can get some more information about this. Can you upload
/proc/interruptsas well? The last one I've seen does not have e1000 in it.
Yes the card was not used the time I've send first round of hw infos..
Quoted 10 lines
Quoted 2 lines
Leave GOLDFISH and WBT disabled for now.
Here is a better one. Please turn on GOLDFISH and leave WBT disabled unless you have Jens patch applied.
That should give us the connection between the retrigger and the goldfish irq firing.
output from lspci -vvv would be helpful as well.
lspci , interrupts , dmidecode output can be found there :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/hw/
dmesg with initcall_debug :
The only place I see your debug patch triggers is :
..
[ 7.029816] calling goldfish_pdev_bus_driver_init+0x0/0x14 @ 1 [ 7.031707] Retrigger (null) 4 [ 7.033556] Goldfish IRQ
..
So data->chip->name being NULL here.
Regards,
Gabriel C
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Quoted 8 lines · Gabriel C
On 14.02.2017 17:45, Thomas Gleixner wrote:
The only place I see your debug patch triggers is :..
[ 7.029816] calling goldfish_pdev_bus_driver_init+0x0/0x14 @ 1 [ 7.031707] Retrigger (null) 4 [ 7.033556] Goldfish IRQ
Ok. So the interrupt is pending for unknown reasons when it gets requested by that goldfish driver and the enable logic retriggers it. The retrigger invokes that interrupt handler which then goes into infinite loop mode.
Having interrupts marked pending after boot happens occasionally and with proper written drivers and interrupt handlers that's a non issue. Every interrupt routine must be able to handle spurious interrupts.
So that's not a some mysterious low level interrupt handling problem, it's just a completely bogus driver.
Quoted 1 line
So
data->chip->namebeing NULL here.
Ok. That's the lapic_controller chip missing a chip name. I'll fix that along with a command line option which makes that goldfish nonsense not register that platform device unconditionally.
Thanks,
tglx
Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Mike GalbraithQuoted 23 lines · Mike Galbraith
kernel/time/tick-broadcast.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)kernel/time/tick-broadcast.c +2
-1@@ -357,6 +357,7 @@ void tick_broadcast_control(enum tick_brstruct clock_event_device *bc, *dev;struct tick_device *td;int cpu, bc_stopped; +unsigned long flags; td =this_cpu_ptr (&tick_cpu_device); dev = td->evtdev;@@ -370,7 +371,7 @@ void tick_broadcast_control(enum tick_brif (!tick_device_is_functional (dev))return ; -raw_spin_lock (&tick_broadcast_lock); +raw_spin_lock_irqsave (&tick_broadcast_lock, flags); cpu =smp_processor_id (); bc = tick_broadcast_device.evtdev; bc_stopped =cpumask_empty (tick_broadcast_mask);
kernel/time/tick-broadcast.c void tick_broadcast_control(enum tick_br · line 424
Quoted 5 lines
kernel/time/tick-broadcast.c +1
-1@@ -420,7 +421,7 @@ void tick_broadcast_control(enum tick_brtick_broadcast_setup_oneshot (bc); } } -raw_spin_unlock (&tick_broadcast_lock); +raw_spin_unlock_irqrestore (&tick_broadcast_lock, flags);
That cures the lockdep splat, but the comment above tick_broadcast_control() says:
* Called with interrupts disabled, so clockevents_lock is not
* required here because the local clock event device cannot go away
* under us.
So if we want to relax the calling convention, then we need to take the lock early. Otherwise it's unsafe to fiddle with the local clock event device.
The calling convention was broken with the following commit:
29d7bbada98e intel_idle: Remove superfluous SMP fuction call
So we could fix it at the call site, but making the core more robust is the better solution.
I'll fix it up.
Thanks,
tglx
tip-bot for Mike Galbraith
merge bot[tip:timers/urgent] tick/broadcast: Prevent deadlock on tick_broadcast_lock
In reply to Mike Galbraithtick/broadcast: Prevent deadlock on tick_broadcast_lock
Commit-ID: 202461e2f3c15dbfb05825d29ace0d20cdf55fa4 Gitweb: http://git.kernel.org/tip/202461e2f3c15dbfb05825d29ace0d20cdf55fa4 Author: Mike Galbraith <[email protected]> AuthorDate: Mon, 13 Feb 2017 03:31:55 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon, 13 Feb 2017 09:49:31 +0100
tick/broadcast: Prevent deadlock on tick_broadcast_lock
tick_broadcast_lock is taken from interrupt context, but the following call chain takes the lock without disabling interrupts:
[ 12.703736] _raw_spin_lock+0x3b/0x50 [ 12.703738] tick_broadcast_control+0x5a/0x1a0 [ 12.703742] intel_idle_cpu_online+0x22/0x100 [ 12.703744] cpuhp_invoke_callback+0x245/0x9d0 [ 12.703752] cpuhp_thread_fun+0x52/0x110 [ 12.703754] smpboot_thread_fn+0x276/0x320
So the following deadlock can happen:
lock(tick_broadcast_lock);
<Interrupt>
lock(tick_broadcast_lock);intel_idle_cpu_online() is the only place which violates the calling convention of tick_broadcast_control(). This was caused by the removal of the smp function call in course of the cpu hotplug rework.
Instead of slapping local_irq_disable/enable() at the call site, we can relax the calling convention and handle it in the core code, which makes the whole machinery more robust.
--- kernel/time/tick-broadcast.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
kernel/time/tick-broadcast.c +7 -8
@@ -347,17 +347,16 @@ static void tick_handle_periodic_broadcast(struct clock_event_device *dev)* * Called when the system enters a state where affected tick devices * might stop. Note: TICK_BROADCAST_FORCE cannot be undone. -* -* Called with interrupts disabled, so clockevents_lock is not -* required here because the local clock event device cannot go away -* under us. */ void tick_broadcast_control (enum tick_broadcast_mode mode) {struct clock_event_device *bc, *dev;struct tick_device *td;int cpu, bc_stopped; +unsigned long flags; +/* Protects also the local clockevent device. */ +raw_spin_lock_irqsave (&tick_broadcast_lock, flags); td =this_cpu_ptr (&tick_cpu_device); dev = td->evtdev;
@@ -365,12 +364,11 @@ void tick_broadcast_control(enum tick_broadcast_mode mode)* Is the device not affected by the powerstate ? */ if (!dev || !(dev->features &CLOCK_EVT_FEAT_C3STOP )) -return ; + goto out;if (!tick_device_is_functional (dev)) -return ; + goto out; -raw_spin_lock (&tick_broadcast_lock); cpu =smp_processor_id (); bc = tick_broadcast_device.evtdev; bc_stopped =cpumask_empty (tick_broadcast_mask);
@@ -420,7 +418,8 @@ void tick_broadcast_control(enum tick_broadcast_mode mode)tick_broadcast_setup_oneshot (bc); } } -raw_spin_unlock (&tick_broadcast_lock); +out: +raw_spin_unlock_irqrestore (&tick_broadcast_lock, flags); }EXPORT_SYMBOL_GPL (tick_broadcast_control);
Borislav Petkov
maintainerRe: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Gabriel CQuoted 3 lines · Gabriel C
I didn't tested your patch yet but did a boot with mce=off and nomce which seems to not really works since is still want to
mc_device_add()even when off.
mc_device_add() is microcode loader's ->add_dev() subsys pointer and that's not from mce. From mce you should be seeing only (with the debug patch applied):
[ 1.717508] mce: mcheck_init_device: entry [ 1.718769] mce: Unable to init device /dev/mcelog (rc: -5)
Quoted 3 lines
See :
http://ftp.frugalware.org/pub/other/people/crazy/kernel/t/crash_mce_off.jpg
That looks like core 13 got the NMI from the watchdog at
if (wait)
csd_lock_wait(csd);IINM and from what I could correlate to the asm it generates here, RIP points to that READ_ONCE there in smp_cond_load_acquire() in smp_call_function_single() which is called by collect_cpu_info() of the microcode loader to get the microcode-relevant info from the CPU.
So this is simply a bystander CPU which got interrupted.
Quoted 1 line
I'll build an .10-rc8 with your patch tomorrow .. is somewhat late now here :)
Ok.
Quoted 3 lines
Another thing is .. there seems to be a real bug in tsc code .
I've build an -rc8 with a lot more debug options on an now I see the following :
Right before I went to bed I thought of telling you to enable lockdep :-)
Good. :-)
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
In reply to Linus TorvaldsQuoted 8 lines · Linus Torvalds
That said, it also strikes me that the implicated
irq_chip_retrigger_hierarchy()function looks really very suspicious indeed.Most of the other users don't seem to traverse the parent all the way until they find something. They just do the operation in the parent, and if the parent needs it, it might then do it in _its_ parent and so on.
The whole point of the hierarchy is that we have decoupled the stacked chips so the ioapic does not know whether it is connected to the irq remapping unit or to the vector domain directly.
Quoted 3 lines
So I'm wondering if that for-loop triggers a stack overflow on your setup somehow, just because that
irq_retrigger()call is now truly recursive, and hasn't been turned into tail-calls.
It would only be recursive if some level down the hierarchy would use the same callback.
The ioapic is always on top of its hierarchy and its either connected to the vector domain directly, which is the last level in the hierarchy and implements the real retrigger callback or to the irq remapping unit which does not have a retrigger callback. So it's not a recursion problem AFAICT, but lets try and just use the apic callback directly as we did before the whole hierarchy rework. That's wrong for other reasons, but that does not matter in that particular case. Patch below.
We have the same situation with the MSI interrupt domains which all use irq_chip_retrigger_hierarchy() function as their retrigger callback, which does not seem to have the same effect on Gabriels machine.
I have the feeling that this commit unearthes some other subtle wreckage in the interrupt machinery which gets not triggered otherwise.
Thanks,
tglx
8<-------------------
arch/x86/kernel/apic/io_apic.c +4 -2
@@ -1867,6 +1867,8 @@ static int ioapic_set_affinity(struct irq_data *irq_data,return ret; } +extern int apic_retrigger_irq (struct irq_data *irq_data); +static struct irq_chip ioapic_chip__read_mostly = { .name ="IO-APIC" , .irq_startup = startup_ioapic_irq,
@@ -1875,7 +1877,7 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_retrigger = apic_retrigger_irq, .flags = IRQCHIP_SKIP_SET_WAKE, };
@@ -1887,7 +1889,7 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_retrigger = apic_retrigger_irq, .flags = IRQCHIP_SKIP_SET_WAKE, };
arch/x86/kernel/apic/vector.c +1 -1
@@ -496,7 +496,7 @@ void setup_vector_irq(int cpu)__setup_vector_irq (cpu); } -static int apic_retrigger_irq (struct irq_data *irq_data) +int apic_retrigger_irq (struct irq_data *irq_data) {struct apic_chip_data *data =apic_chip_data (irq_data);unsigned long flags;