1. 17 Aug, 2017 1 commit
  2. 15 Aug, 2017 9 commits
    • Joerg Roedel's avatar
      iommu/vt-d: Make use of iova deferred flushing · 13cf0174
      Joerg Roedel authored
      Remove the deferred flushing implementation in the Intel
      VT-d driver and use the one from the common iova code
      instead.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      13cf0174
    • Joerg Roedel's avatar
      iommu/vt-d: Allow to flush more than 4GB of device TLBs · c8acb28b
      Joerg Roedel authored
      The shift qi_flush_dev_iotlb() is done on an int, which
      limits the mask to 32 bits. Make the mask 64 bits wide so
      that more than 4GB of address range can be flushed at once.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      c8acb28b
    • Joerg Roedel's avatar
      iommu/amd: Make use of iova queue flushing · 9003d618
      Joerg Roedel authored
      Rip out the implementation in the AMD IOMMU driver and use
      the one in the common iova code instead.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      9003d618
    • Joerg Roedel's avatar
      iommu/iova: Add flush timer · 9a005a80
      Joerg Roedel authored
      Add a timer to flush entries from the Flush-Queues every
      10ms. This makes sure that no stale TLB entries remain for
      too long after an IOVA has been unmapped.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      9a005a80
    • Joerg Roedel's avatar
      iommu/iova: Add locking to Flush-Queues · 8109c2a2
      Joerg Roedel authored
      The lock is taken from the same CPU most of the time. But
      having it allows to flush the queue also from another CPU if
      necessary.
      
      This will be used by a timer to regularily flush any pending
      IOVAs from the Flush-Queues.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      8109c2a2
    • Joerg Roedel's avatar
      iommu/iova: Add flush counters to Flush-Queue implementation · fb418dab
      Joerg Roedel authored
      There are two counters:
      
      	* fq_flush_start_cnt  - Increased when a TLB flush
      	                        is started.
      
      	* fq_flush_finish_cnt - Increased when a TLB flush
      				is finished.
      
      The fq_flush_start_cnt is assigned to every Flush-Queue
      entry on its creation. When freeing entries from the
      Flush-Queue, the value in the entry is compared to the
      fq_flush_finish_cnt. The entry can only be freed when its
      value is less than the value of fq_flush_finish_cnt.
      
      The reason for these counters it to take advantage of IOMMU
      TLB flushes that happened on other CPUs. These already
      flushed the TLB for Flush-Queue entries on other CPUs so
      that they can already be freed without flushing the TLB
      again.
      
      This makes it less likely that the Flush-Queue is full and
      saves IOMMU TLB flushes.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      fb418dab
    • Joerg Roedel's avatar
      iommu/iova: Implement Flush-Queue ring buffer · 19282101
      Joerg Roedel authored
      Add a function to add entries to the Flush-Queue ring
      buffer. If the buffer is full, call the flush-callback and
      free the entries.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      19282101
    • Joerg Roedel's avatar
      iommu/iova: Add flush-queue data structures · 42f87e71
      Joerg Roedel authored
      This patch adds the basic data-structures to implement
      flush-queues in the generic IOVA code. It also adds the
      initialization and destroy routines for these data
      structures.
      
      The initialization routine is designed so that the use of
      this feature is optional for the users of IOVA code.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      42f87e71
    • Robin Murphy's avatar
      iommu/of: Fix of_iommu_configure() for disabled IOMMUs · da4b0275
      Robin Murphy authored
      Sudeep reports that the logic got slightly broken when a PCI iommu-map
      entry targets an IOMMU marked as disabled in DT, since of_pci_map_rid()
      succeeds in following a phandle, and of_iommu_xlate() doesn't return an
      error value, but we miss checking whether ops was actually non-NULL.
      Whilst this could be solved with a point fix in of_pci_iommu_init(), it
      suggests that all the juggling of ERR_PTR values through the ops pointer
      is proving rather too complicated for its own good, so let's instead
      simplify the whole flow (with a side-effect of eliminating the cause of
      the bug).
      
      The fact that we now rely on iommu_fwspec means that we no longer need
      to pass around an iommu_ops pointer at all - we can simply propagate a
      regular int return value until we know whether we have a viable IOMMU,
      then retrieve the ops from the fwspec if and when we actually need them.
      This makes everything a bit more uniform and certainly easier to follow.
      
      Fixes: d87beb74 ("iommu/of: Handle PCI aliases properly")
      Reported-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Tested-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      da4b0275
  3. 13 Aug, 2017 7 commits
    • Linus Torvalds's avatar
      Linux 4.13-rc5 · ef954844
      Linus Torvalds authored
      ef954844
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · b2298fc9
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Another round of MIPS fixes:
      
         - compressed boot: Ignore a generated .c file
      
         - VDSO: Fix a register clobber list
      
         - DECstation: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
      
         - Octeon: Fix recent cleanups that cleaned away a bit too much thus
           breaking the arch side of the EDAC and USB drivers.
      
         - uasm: Fix duplicate const in "const struct foo const bar[]" which
           GCC 7.1 no longer accepts.
      
         - Fix race on setting and getting cpu_online_mask
      
         - Fix preemption issue. To do so cleanly introduce macro to get the
           size of L3 cache line.
      
         - Revert include cleanup that sometimes results in build error
      
         - MicroMIPS uses bit 0 of the PC to indicate microMIPS mode. Make
           sure this bit is set for kernel entry as well.
      
         - Prevent configuring the kernel for both microMIPS and MT. There are
           no such CPUs currently and thus the combination is unsupported and
           results in build errors.
      
        This has been sitting in linux-next for a few days and has survived
        automated testing by Imagination's test farm. No known regressions
        pending except a number of issues that crept up due to lots of people
        switching to GCC 7.1"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Set ISA bit in entry-y for microMIPS kernels
        MIPS: Prevent building MT support for microMIPS kernels
        MIPS: PCI: Fix smp_processor_id() in preemptible
        MIPS: Introduce cpu_tcache_line_size
        MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
        MIPS: VDSO: Fix clobber lists in fallback code paths
        Revert "MIPS: Don't unnecessarily include kmalloc.h into <asm/cache.h>."
        MIPS: OCTEON: Fix USB platform code breakage.
        MIPS: Octeon: Fix broken EDAC driver.
        MIPS: gitignore: ignore generated .c files
        MIPS: Fix race on setting and getting cpu_online_mask
        MIPS: mm: remove duplicate "const" qualifier on insn_table
      b2298fc9
    • Linus Torvalds's avatar
      Merge tag 'driver-core-4.13-rc5' of... · c9dc281d
      Linus Torvalds authored
      Merge tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are three firmware core fixes for 4.13-rc5.
      
        All three of these fix reported issues and have been floating around
        for a few weeks. They have been in linux-next with no reported
        problems"
      
      * tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        firmware: avoid invalid fallback aborts by using killable wait
        firmware: fix batched requests - send wake up on failure on direct lookups
        firmware: fix batched requests - wake all waiters
      c9dc281d
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · ce7ba95c
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are two patches for 4.13-rc5.
      
        One is a fix for a reported thunderbolt issue, and the other a fix for
        an MEI driver issue. Both have been in linux-next with no reported
        issues"
      
      * tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        thunderbolt: Do not enumerate more ports from DROM than the controller has
        mei: exclude device from suspend direct complete optimization
      ce7ba95c
    • Linus Torvalds's avatar
      Merge tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 438630ef
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are two tty serial driver fixes for 4.13-rc5. One is a revert of
        a -rc1 patch that turned out to not be a good idea, and the other is a
        fix for the pl011 serial driver.
      
        Both have been in linux-next with no reported issues"
      
      * tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "serial: Delete dead code for CIR serial ports"
        tty: pl011: fix initialization order of QDF2400 E44
      438630ef
    • Linus Torvalds's avatar
      Merge tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · dd95f186
      Linus Torvalds authored
      Pull staging/iio fixes from Greg KH:
       "Here are some Staging and IIO driver fixes for 4.13-rc5.
      
        Nothing major, just a number of small fixes for reported issues. All
        of these have been in linux-next for a while now with no reported
        issues. Full details are in the shortlog"
      
      * tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING
        iio: aspeed-adc: wait for initial sequence.
        iio: accel: bmc150: Always restore device to normal mode after suspend-resume
        staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
        iio: adc: axp288: Fix the GPADC pin reading often wrongly returning 0
        iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
        iio: accel: st_accel: add SPI-3wire support
        iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications"
        iio: adc: sun4i-gpadc-iio: fix unbalanced irq enable/disable
        iio: pressure: st_pressure_core: disable multiread by default for LPS22HB
        iio: light: tsl2563: use correct event code
      dd95f186
    • Linus Torvalds's avatar
      Merge tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 10cec917
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of small USB driver fixes and new device ids for
        4.13-rc5. There is the usual gadget driver fixes, some new quirks for
        "messy" hardware, and some new device ids.
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: serial: pl2303: add new ATEN device id
        usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
        USB: Check for dropped connection before switching to full speed
        usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
        usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
        usb: renesas_usbhs: Fix UGCTRL2 value for R-Car Gen3
        usb: phy: phy-msm-usb: Fix usage of devm_regulator_bulk_get()
        usb: gadget: udc: renesas_usb3: Fix usb_gadget_giveback_request() calling
        usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets
        USB: serial: option: add D-Link DWM-222 device ID
        usb: musb: fix tx fifo flush handling again
        usb: core: unlink urbs from the tail of the endpoint's urb_list
        usb-storage: fix deadlock involving host lock and scsi_done
        uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
        USB: hcd: Mark secondary HCD as dead if the primary one died
        USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
      10cec917
  4. 12 Aug, 2017 4 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd · 89a55278
      Linus Torvalds authored
      Pull another MTD fix from Brian Norris:
       "An mtdblock regression occurred in -rc1 (all writes were broken!), in
        the process of some block subsystem refactoring. Noticed and fixed
        last week, but I'm a little slow on the uptake"
      
      * tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd:
        mtd: blkdevs: Fix mtd block write failure
      89a55278
    • Abhishek Sahu's avatar
      mtd: blkdevs: Fix mtd block write failure · 9a515447
      Abhishek Sahu authored
      All the MTD block write requests are failing with
      following error messages
      
          mkfs.ext4  /dev/mtdblock0
      
          print_req_error: I/O error, dev mtdblock0, sector 0
          Buffer I/O error on dev mtdblock0, logical block 0,
          lost async page write
      
      The control is going to default case after block write request
      because of missing return.
      
      Fixes: commit 2a842aca ("block: introduce new block status code type")
      Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      9a515447
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · a99bcdce
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "The highlights include:
      
         - Fix iscsi-target payload memory leak during
           ISCSI_FLAG_TEXT_CONTINUE (Varun Prakash)
      
         - Fix tcm_qla2xxx incorrect use of tcm_qla2xxx_free_cmd during ABORT
           (Pascal de Bruijn + Himanshu Madhani + nab)
      
         - Fix iscsi-target long-standing issue with parallel delete of a
           single network portal across multiple target instances (Gary Guo +
           nab)
      
         - Fix target dynamic se_node GPF during uncached shutdown regression
           (Justin Maggard + nab)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target: Fix node_acl demo-mode + uncached dynamic shutdown regression
        iscsi-target: Fix iscsi_np reset hung task during parallel delete
        qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)
        cxgbit: fix sg_nents calculation
        iscsi-target: fix invalid flags in text response
        iscsi-target: fix memory leak in iscsit_setup_text_cmd()
        cxgbit: add missing __kfree_skb()
        tcmu: free old string on reconfig
        tcmu: Fix possible to/from address overflow when doing the memcpy
      a99bcdce
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 043cd07c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Some fixes for Xen:
      
         - a fix for a regression introduced in 4.13 for a Xen HVM-guest
           configured with KASLR
      
         - a fix for a possible deadlock in the xenbus driver when booting the
           system
      
         - a fix for lost interrupts in Xen guests"
      
      * tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/events: Fix interrupt lost during irq_disable and irq_enable
        xen: avoid deadlock in xenbus
        xen: fix hvm guest with kaslr enabled
        xen: split up xen_hvm_init_shared_info()
        x86: provide an init_mem_mapping hypervisor hook
      043cd07c
  5. 11 Aug, 2017 17 commits
  6. 10 Aug, 2017 2 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 27df704d
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "21 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
        userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage
        zram: rework copy of compressor name in comp_algorithm_store()
        rmap: do not call mmu_notifier_invalidate_page() under ptl
        mm: fix list corruptions on shmem shrinklist
        mm/balloon_compaction.c: don't zero ballooned pages
        MAINTAINERS: copy virtio on balloon_compaction.c
        mm: fix KSM data corruption
        mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem
        mm: make tlb_flush_pending global
        mm: refactor TLB gathering API
        Revert "mm: numa: defer TLB flush for THP migration as long as possible"
        mm: migrate: fix barriers around tlb_flush_pending
        mm: migrate: prevent racy access to tlb_flush_pending
        fault-inject: fix wrong should_fail() decision in task context
        test_kmod: fix small memory leak on filesystem tests
        test_kmod: fix the lock in register_test_dev_kmod()
        test_kmod: fix bug which allows negative values on two config options
        test_kmod: fix spelling mistake: "EMTPY" -> "EMPTY"
        userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
        mm: ratelimit PFNs busy info message
        ...
      27df704d
    • Mike Rapoport's avatar
      userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage · e86b298b
      Mike Rapoport authored
      When the process exit races with outstanding mcopy_atomic, it would be
      better to return ESRCH error.  When such race occurs the process and
      it's mm are going away and returning "no such process" to the uffd
      monitor seems better fit than ENOSPC.
      
      Link: http://lkml.kernel.org/r/1502111545-32305-1-git-send-email-rppt@linux.vnet.ibm.comSigned-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
      Suggested-by: default avatarMichal Hocko <mhocko@suse.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
      Cc: Pavel Emelyanov <xemul@virtuozzo.com>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e86b298b