1. 05 Jan, 2018 2 commits
    • Dongjiu Geng's avatar
      arm64: v8.4: Support for new floating point multiplication instructions · 3b3b6810
      Dongjiu Geng authored
      ARM v8.4 extensions add new neon instructions for performing a
      multiplication of each FP16 element of one vector with the corresponding
      FP16 element of a second vector, and to add or subtract this without an
      intermediate rounding to the corresponding FP32 element in a third vector.
      
      This patch detects this feature and let the userspace know about it via a
      HWCAP bit and MRS emulation.
      
      Cc: Dave Martin <Dave.Martin@arm.com>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarDongjiu Geng <gengdongjiu@huawei.com>
      Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      3b3b6810
    • Catalin Marinas's avatar
      arm64: asid: Do not replace active_asids if already 0 · a8ffaaa0
      Catalin Marinas authored
      Under some uncommon timing conditions, a generation check and
      xchg(active_asids, A1) in check_and_switch_context() on P1 can race with
      an ASID roll-over on P2. If P2 has not seen the update to
      active_asids[P1], it can re-allocate A1 to a new task T2 on P2. P1 ends
      up waiting on the spinlock since the xchg() returned 0 while P2 can go
      through a second ASID roll-over with (T2,A1,G2) active on P2. This
      roll-over copies active_asids[P1] == A1,G1 into reserved_asids[P1] and
      active_asids[P2] == A1,G2 into reserved_asids[P2]. A subsequent
      scheduling of T1 on P1 and T2 on P2 would match reserved_asids and get
      their generation bumped to G3:
      
      P1					P2
      --                                      --
      TTBR0.BADDR = T0
      TTBR0.ASID = A0
      asid_generation = G1
      check_and_switch_context(T1,A1,G1)
        generation match
      					check_and_switch_context(T2,A0,G0)
       				          new_context()
      					    ASID roll-over
      					    asid_generation = G2
      					    flush_context()
      					      active_asids[P1] = 0
      					      asid_map[A1] = 0
      					      reserved_asids[P1] = A0,G0
        xchg(active_asids, A1)
          active_asids[P1] = A1,G1
          xchg returns 0
        spin_lock_irqsave()
      					    allocated ASID (T2,A1,G2)
      					    asid_map[A1] = 1
      					  active_asids[P2] = A1,G2
      					...
      					check_and_switch_context(T3,A0,G0)
      					  new_context()
      					    ASID roll-over
      					    asid_generation = G3
      					    flush_context()
      					      active_asids[P1] = 0
      					      asid_map[A1] = 1
      					      reserved_asids[P1] = A1,G1
      					      reserved_asids[P2] = A1,G2
      					    allocated ASID (T3,A2,G3)
      					    asid_map[A2] = 1
      					  active_asids[P2] = A2,G3
        new_context()
          check_update_reserved_asid(A1,G1)
            matches reserved_asid[P1]
            reserved_asid[P1] = A1,G3
        updated T1 ASID to (T1,A1,G3)
      					check_and_switch_context(T2,A1,G2)
      					  new_context()
      					    check_and_switch_context(A1,G2)
      					      matches reserved_asids[P2]
      					      reserved_asids[P2] = A1,G3
      					  updated T2 ASID to (T2,A1,G3)
      
      At this point, we have two tasks, T1 and T2 both using ASID A1 with the
      latest generation G3. Any of them is allowed to be scheduled on the
      other CPU leading to two different tasks with the same ASID on the same
      CPU.
      
      This patch changes the xchg to cmpxchg so that the active_asids is only
      updated if non-zero to avoid a race with an ASID roll-over on a
      different CPU.
      
      The ASID allocation algorithm has been formally verified using the TLA+
      model checker (see
      https://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/kernel-tla.git/tree/asidalloc.tla
      for the spec).
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      a8ffaaa0
  2. 02 Jan, 2018 3 commits
  3. 22 Dec, 2017 9 commits
  4. 11 Dec, 2017 22 commits
  5. 10 Dec, 2017 4 commits
    • Jeff Layton's avatar
      hpfs: don't bother with the i_version counter or f_version · 98087c05
      Jeff Layton authored
      HPFS does not set SB_I_VERSION and does not use the i_version counter
      internally.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarMikulas Patocka <mikulas@twibright.com>
      Reviewed-by: default avatarMikulas Patocka <mikulas@twibright.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98087c05
    • Jiri Slaby's avatar
      futex: futex_wake_op, fix sign_extend32 sign bits · d70ef228
      Jiri Slaby authored
      sign_extend32 counts the sign bit parameter from 0, not from 1.  So we
      have to use "11" for 12th bit, not "12".
      
      This mistake means we have not allowed negative op and cmp args since
      commit 30d6e0a4 ("futex: Remove duplicated code and fix undefined
      behaviour") till now.
      
      Fixes: 30d6e0a4 ("futex: Remove duplicated code and fix undefined behaviour")
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Darren Hart <dvhart@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d70ef228
    • Linus Torvalds's avatar
      Merge tag 'for-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 51090c5d
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "This contains a few fixes (error handling, quota leak, FUA vs
        nobarrier mount option).
      
        There's one one worth mentioning separately - an off-by-one fix that
        leads to overwriting first byte of an adjacent page with 0, out of
        bounds of the memory allocated by an ioctl. This is under a privileged
        part of the ioctl, can be triggerd in some subvolume layouts"
      
      * tag 'for-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
        Btrfs: disable FUA if mounted with nobarrier
        btrfs: fix missing error return in btrfs_drop_snapshot
        btrfs: handle errors while updating refcounts in update_ref_for_cow
        btrfs: Fix quota reservation leak on preallocated files
      51090c5d
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 9c02e060
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
      
       - A revert of all SCPI changes from the 4.15 merge window. They had
         regressions on the Amlogic platforms, and the submaintainer isn't
         around to fix these bugs due to vacation, etc. So we agreed to revert
         and revisit in next release cycle.
      
       - A series fixing a number of bugs for ARM CCN interconnect, around
         module unload, smp_processor_id() in preemptable context, and fixing
         some memory allocation failure checks.
      
       - A handful of devicetree fixes for different platforms, fixing
         warnings and errors that were previously ignored by the compiler.
      
       - The usual set of mostly minor fixes for different platforms.
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (42 commits)
        ARM64: dts: meson-gx: fix UART pclk clock name
        ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds
        arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv
        ARM: dts: Fix dm814x missing phy-cells property
        ARM: dts: Fix elm interrupt compiler warning
        bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left.
        bus: arm-cci: Fix use of smp_processor_id() in preemptible context
        bus: arm-ccn: Fix use of smp_processor_id() in preemptible context
        bus: arm-ccn: Simplify code
        bus: arm-ccn: Check memory allocation failure
        bus: arm-ccn: constify attribute_group structures.
        firmware: arm_scpi: Revert updates made during v4.15 merge window
        arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv
        arm64: dts: sort vendor subdirectories in Makefile alphabetically
        meson-gx-socinfo: Fix package id parsing
        ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't"
        ARM: dts: meson: fix the memory region of the GPIO interrupt controller
        ARM: dts: meson: correct the sort order for the the gpio_intc node
        MAINTAINERS: exclude other Socionext SoC DT files from ARM/UNIPHIER entry
        arm64: dts: uniphier: remove unnecessary interrupt-parent
        ...
      9c02e060