1. 06 Sep, 2019 1 commit
  2. 05 Sep, 2019 2 commits
  3. 03 Sep, 2019 1 commit
    • Dexuan Cui's avatar
      irqdomain: Add the missing assignment of domain->fwnode for named fwnode · 711419e5
      Dexuan Cui authored
      Recently device pass-through stops working for Linux VM running on Hyper-V.
      
      git-bisect shows the regression is caused by the recent commit
      467a3bb9 ("PCI: hv: Allocate a named fwnode ..."), but the root cause
      is that the commit d59f6617 forgets to set the domain->fwnode for
      IRQCHIP_FWNODE_NAMED*, and as a result:
      
      1. The domain->fwnode remains to be NULL.
      
      2. irq_find_matching_fwspec() returns NULL since "h->fwnode == fwnode" is
      false, and pci_set_bus_msi_domain() sets the Hyper-V PCI root bus's
      msi_domain to NULL.
      
      3. When the device is added onto the root bus, the device's dev->msi_domain
      is set to NULL in pci_set_msi_domain().
      
      4. When a device driver tries to enable MSI-X, pci_msi_setup_msi_irqs()
      calls arch_setup_msi_irqs(), which uses the native MSI chip (i.e.
      arch/x86/kernel/apic/msi.c: pci_msi_controller) to set up the irqs, but
      actually pci_msi_setup_msi_irqs() is supposed to call
      msi_domain_alloc_irqs() with the hbus->irq_domain, which is created in
      hv_pcie_init_irq_domain() and is associated with the Hyper-V chip
      hv_msi_irq_chip. Consequently, the irq line is not properly set up, and
      the device driver can not receive any interrupt.
      
      Fixes: d59f6617 ("genirq: Allow fwnode to carry name information only")
      Fixes: 467a3bb9 ("PCI: hv: Allocate a named fwnode instead of an address-based one")
      Reported-by: default avatarLili Deng <v-lide@microsoft.com>
      Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/PU1P153MB01694D9AF625AC335C600C5FBFBE0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM
      711419e5
  4. 30 Aug, 2019 6 commits
  5. 28 Aug, 2019 1 commit
  6. 27 Aug, 2019 2 commits
    • Ming Lei's avatar
      genirq/affinity: Spread vectors on node according to nr_cpu ratio · b1a5a73e
      Ming Lei authored
      Now __irq_build_affinity_masks() spreads vectors evenly per node, but there
      is a case that not all vectors have been spread when each numa node has a
      different number of CPUs which triggers the warning in the spreading code.
      
      Improve the spreading algorithm by
      
       - assigning vectors according to the ratio of the number of CPUs on a node
         to the number of remaining CPUs.
      
       - running the assignment from smaller nodes to bigger nodes to guarantee
         that every active node gets allocated at least one vector.
      
      This ensures that all vectors are spread out. Asided of that the spread
      becomes more fair if the nodes have different number of CPUs.
      
      For example, on the following machine:
      	CPU(s):              16
      	On-line CPU(s) list: 0-15
      	Thread(s) per core:  1
      	Core(s) per socket:  8
      	Socket(s):           2
      	NUMA node(s):        2
      	...
      	NUMA node0 CPU(s):   0,1,3,5-9,11,13-15
      	NUMA node1 CPU(s):   2,4,10,12
      
      When a driver requests to allocate 8 vectors, the following spread results:
      
      	irq 31, cpu list 2,4
      	irq 32, cpu list 10,12
      	irq 33, cpu list 0-1
      	irq 34, cpu list 3,5
      	irq 35, cpu list 6-7
      	irq 36, cpu list 8-9
      	irq 37, cpu list 11,13
      	irq 38, cpu list 14-15
      
      So Node 0 has now 6 and Node 1 has 2 vectors assigned. The original
      algorithm assigned 4 vectors on each node which was unfair versus Node 0.
      
      [ tglx: Massaged changelog ]
      Reported-by: default avatarJon Derrick <jonathan.derrick@intel.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Reviewed-by: default avatarJon Derrick <jonathan.derrick@intel.com>
      Link: https://lkml.kernel.org/r/20190816022849.14075-3-ming.lei@redhat.com
      b1a5a73e
    • Ming Lei's avatar
      genirq/affinity: Improve __irq_build_affinity_masks() · 53c1788b
      Ming Lei authored
      One invariant of __irq_build_affinity_masks() is that all CPUs in the
      specified masks (cpu_mask AND node_to_cpumask for each node) should be
      covered during the spread. Even though all requested vectors have been
      reached, it's still required to spread vectors among remained CPUs. A
      similar policy has been taken in case of 'numvecs <= nodes' already.
      
      So remove the following check inside the loop:
      
      	if (done >= numvecs)
      		break;
      
      Meantime assign at least 1 vector for remaining nodes if 'numvecs' vectors
      have been handled already.
      
      Also, if the specified cpumask for one numa node is empty, simply do not
      spread vectors on this node.
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20190816022849.14075-2-ming.lei@redhat.com
      53c1788b
  7. 20 Aug, 2019 16 commits
  8. 19 Aug, 2019 1 commit
  9. 18 Aug, 2019 10 commits
    • Linus Torvalds's avatar
      Linux 5.3-rc5 · d1abaeb3
      Linus Torvalds authored
      d1abaeb3
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 6825e5a6
      Linus Torvalds authored
      Pull MTD fix from Richard Weinberger:
       "A single fix for MTD to correctly set the spi-nor WP pin"
      
      * tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: spi-nor: Fix the disabling of write protection at init
      6825e5a6
    • Linus Torvalds's avatar
      Merge tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 3039fadf
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Two fixes that popped up during testing:
      
         - fix for sysfs-related code that adds/removes block groups, warnings
           appear during several fstests in connection with sysfs updates in
           5.3, the fix essentially replaces a workaround with scope NOFS and
           applies to 5.2-based branch too
      
         - add sanity check of trim range"
      
      * tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: trim: Check the range passed into to prevent overflow
        Btrfs: fix sysfs warning and missing raid sysfs directories
      3039fadf
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c332f3a7
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of fixes for x86:
      
         - Fix the inconsistent error handling in the umwait init code
      
         - Rework the boot param zeroing so gcc9 stops complaining about out
           of bound memset. The resulting source code is actually more sane to
           read than the smart solution we had
      
         - Maintainers update so Tony gets involved when Intel models are
           added
      
         - Some more fallthrough fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Save fields explicitly, zero out everything else
        MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h
        x86/fpu/math-emu: Address fallthrough warnings
        x86/apic/32: Fix yet another implicit fallthrough warning
        x86/umwait: Fix error handling in umwait_init()
      c332f3a7
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 645c03aa
      Linus Torvalds authored
      Pull EFI fix from Thomas Gleixner:
       "A single fix for a EFI mixed mode regression caused by recent rework
        which did not take the firmware bitwidth into account"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi-stub: Fix get_efi_config_table on mixed-mode setups
      645c03aa
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · 5bba5c9c
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are four small SPDX fixes for 5.3-rc5.
      
        A few style fixes for some SPDX comments, added an SPDX tag for one
        file, and fix up some GPL boilerplate for another file.
      
        All of these have been in linux-next for a few weeks with no reported
        issues (they are comment changes only, so that's to be expected...)"
      
      * tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        i2c: stm32: Use the correct style for SPDX License Identifier
        intel_th: Use the correct style for SPDX License Identifier
        coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
        kernel/configs: Replace GPL boilerplate code with SPDX identifier
      5bba5c9c
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 4503c0a4
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.3-rc5.
      
        These are two different subsystems needing some fixes, the habanalabs
        driver which is has some more big endian fixes for problems found. The
        other are some small soundwire fixes, including some Kconfig
        dependencies needed to resolve reported build errors.
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: xilinx-sdfec: fix dependency and build error
        habanalabs: fix device IRQ unmasking for BE host
        habanalabs: fix endianness handling for internal QMAN submission
        habanalabs: fix completion queue handling when host is BE
        habanalabs: fix endianness handling for packets from user
        habanalabs: fix DRAM usage accounting on context tear down
        habanalabs: Avoid double free in error flow
        soundwire: fix regmap dependencies and align with other serial links
        soundwire: cadence_master: fix definitions for INTSTAT0/1
        soundwire: cadence_master: fix register definition for SLAVE_STATE
      4503c0a4
    • Linus Torvalds's avatar
      Merge tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · ae1a616a
      Linus Torvalds authored
      Pull staging/IIO fixes from Greg KH:
       "Here are four small staging and iio driver fixes for 5.3-rc5
      
        Two are for the dt3000 comedi driver for some reported problems found
        in that codebase, and two are some small iio fixes.
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: dt3000: Fix rounding up of timer divisor
        staging: comedi: dt3000: Fix signed integer overflow 'divider * base'
        iio: adc: max9611: Fix temperature reading in probe
        iio: frequency: adf4371: Fix output frequency setting
      ae1a616a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 359334ca
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are number of small USB fixes for 5.3-rc5.
      
        Syzbot has been on a tear recently now that it has some good USB
        debugging hooks integrated, so there's a number of fixes in here found
        by those tools for some _very_ old bugs. Also a handful of gadget
        driver fixes for reported issues, some hopefully-final dma fixes for
        host controller drivers, and some new USB serial gadget driver ids.
      
        All of these have been in linux-next this week with no reported issues
        (the usb-serial ones were in linux-next in its own branch, but merged
        into mine on Friday)"
      
      * tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: add a hcd_uses_dma helper
        usb: don't create dma pools for HCDs with a localmem_pool
        usb: chipidea: imx: fix EPROBE_DEFER support during driver probe
        usb: host: fotg2: restart hcd after port reset
        USB: CDC: fix sanity checks in CDC union parser
        usb: cdc-acm: make sure a refcount is taken early enough
        USB: serial: option: add the BroadMobi BM818 card
        USB: serial: option: Add Motorola modem UARTs
        USB: core: Fix races in character device registration and deregistraion
        usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt
        usb: gadget: composite: Clear "suspended" on reset/disconnect
        usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
        USB: serial: option: add D-Link DWM-222 device ID
        USB: serial: option: Add support for ZTE MF871A
      359334ca
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block · 8fde2832
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A collection of fixes that should go into this series. This contains:
      
         - Revert of the REQ_NOWAIT_INLINE and associated dio changes. There
           were still corner cases there, and even though I had a solution for
           it, it's too involved for this stage. (me)
      
         - Set of NVMe fixes (via Sagi)
      
         - io_uring fix for fixed buffers (Anthony)
      
         - io_uring defer issue fix (Jackie)
      
         - Regression fix for queue sync at exit time (zhengbin)
      
         - xen blk-back memory leak fix (Wenwen)"
      
      * tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block:
        io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list
        block: remove REQ_NOWAIT_INLINE
        io_uring: fix manual setup of iov_iter for fixed buffers
        xen/blkback: fix memory leaks
        blk-mq: move cancel of requeue_work to the front of blk_exit_queue
        nvme-pci: Fix async probe remove race
        nvme: fix controller removal race with scan work
        nvme-rdma: fix possible use-after-free in connect error flow
        nvme: fix a possible deadlock when passthru commands sent to a multipath device
        nvme-core: Fix extra device_put() call on error path
        nvmet-file: fix nvmet_file_flush() always returning an error
        nvmet-loop: Flush nvme_delete_wq when removing the port
        nvmet: Fix use-after-free bug when a port is removed
        nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns
      8fde2832