Skip to content
  1. Dec 02, 2017
    • Palmer Dabbelt's avatar
      move libgcc.h to include/linux · 185e788c
      Palmer Dabbelt authored
      185e788c
    • Palmer Dabbelt's avatar
    • Palmer Dabbelt's avatar
      RISC-V: User-Visible Changes · 07f8ba74
      Palmer Dabbelt authored
      This merge contains the user-visible, ABI-breaking changes that we want
      to make sure we have in Linux before our first release.   Highlights
      include:
      
      * VDSO entries for clock_get/gettimeofday/getcpu have been added.  These
        are simple syscalls now, but we want to let glibc use them from the
        start so we can make them faster later.
      * A VDSO entry for instruction cache flushing has been added so
        userspace can flush the instruction cache.
      * The VDSO symbol versions for __vdso_cmpxchg{32,64} have been removed,
        as those VDSO entries don't actually exist.
      
      Conflicts:
              arch/riscv/include/asm/tlbflush.h
      07f8ba74
    • Palmer Dabbelt's avatar
      RISC-V Atomic Cleanups · f8182f61
      Palmer Dabbelt authored
      This patch set is the result of some feedback that filtered through
      after our original patch set was reviewed, some of which was the result
      of me missing some email.  It contains:
      
      * A new READ_ONCE in arch_spin_is_locked()
      * __test_and_op_bit_ord() is now actually ordered
      * Improvements to various comments
      * Removal of some dead code
      f8182f61
    • Palmer Dabbelt's avatar
      RISC-V: __io_writes should respect the length argument · da894ff1
      Palmer Dabbelt authored
      
      
      Whoops -- I must have just been being an idiot again.  Thanks to Segher
      for finding the bug :).
      
      CC: Segher Boessenkool <segher@kernel.crashing.org>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      da894ff1
    • Christoph Hellwig's avatar
      move libgcc.h to include/linux · 4db2b604
      Christoph Hellwig authored
      
      
      Introducing a new include/lib directory just for this file totally
      messes up tab completion for include/linux, which is highly annoying.
      
      Move it to include/linux where we have headers for all kinds of other
      lib/ code as well.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      4db2b604
  2. Dec 01, 2017
    • Palmer Dabbelt's avatar
      RISC-V: Clean up an unused include · 0e710ac6
      Palmer Dabbelt authored
      
      
      We used to have some cmpxchg syscalls.  They're no longer there, so we
      no longer need the include.
      
      CC: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      0e710ac6
    • Andrew Waterman's avatar
      RISC-V: Allow userspace to flush the instruction cache · 921ebd8f
      Andrew Waterman authored
      
      
      Despite RISC-V having a direct 'fence.i' instruction available to
      userspace (which we can't trap!), that's not actually viable when
      running on Linux because the kernel might schedule a process on another
      hart.  There is no way for userspace to handle this without invoking the
      kernel (as it doesn't know the thread->hart mappings), so we've defined
      a RISC-V specific system call to flush the instruction cache.
      
      This patch adds both a system call and a VDSO entry.  If possible, we'd
      like to avoid having the system call be considered part of the
      user-facing ABI and instead restrict that to the VDSO entry -- both just
      in general to avoid having additional user-visible ABI to maintain, and
      because we'd prefer that users just call the VDSO entry because there
      might be a better way to do this in the future (ie, one that doesn't
      require entering the kernel).
      
      Signed-off-by: default avatarAndrew Waterman <andrew@sifive.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      921ebd8f
    • Andrew Waterman's avatar
      RISC-V: Flush I$ when making a dirty page executable · 08f051ed
      Andrew Waterman authored
      
      
      The RISC-V ISA allows for instruction caches that are not coherent WRT
      stores, even on a single hart.  As a result, we need to explicitly flush
      the instruction cache whenever marking a dirty page as executable in
      order to preserve the correct system behavior.
      
      Local instruction caches aren't that scary (our implementations actually
      flush the cache, but RISC-V is defined to allow higher-performance
      implementations to exist), but RISC-V defines no way to perform an
      instruction cache shootdown.  When explicitly asked to do so we can
      shoot down remote instruction caches via an IPI, but this is a bit on
      the slow side.
      
      Instead of requiring an IPI to all harts whenever marking a page as
      executable, we simply flush the currently running harts.  In order to
      maintain correct behavior, we additionally mark every other hart as
      needing a deferred instruction cache which will be taken before anything
      runs on it.
      
      Signed-off-by: default avatarAndrew Waterman <andrew@sifive.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      08f051ed
  3. Nov 29, 2017
  4. Nov 27, 2017
  5. Nov 26, 2017
    • Russell King's avatar
      ARM: BUG if jumping to usermode address in kernel mode · 8bafae20
      Russell King authored
      
      
      Detect if we are returning to usermode via the normal kernel exit paths
      but the saved PSR value indicates that we are in kernel mode.  This
      could occur due to corrupted stack state, which has been observed with
      "ftracetest".
      
      This ensures that we catch the problem case before we get to user code.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      8bafae20
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 844056fd
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
      
       - The final conversion of timer wheel timers to timer_setup().
      
         A few manual conversions and a large coccinelle assisted sweep and
         the removal of the old initialization mechanisms and the related
         code.
      
       - Remove the now unused VSYSCALL update code
      
       - Fix permissions of /proc/timer_list. I still need to get rid of that
         file completely
      
       - Rename a misnomed clocksource function and remove a stale declaration
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        m68k/macboing: Fix missed timer callback assignment
        treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts
        timer: Remove redundant __setup_timer*() macros
        timer: Pass function down to initialization routines
        timer: Remove unused data arguments from macros
        timer: Switch callback prototype to take struct timer_list * argument
        timer: Pass timer_list pointer to callbacks unconditionally
        Coccinelle: Remove setup_timer.cocci
        timer: Remove setup_*timer() interface
        timer: Remove init_timer() interface
        treewide: setup_timer() -> timer_setup() (2 field)
        treewide: setup_timer() -> timer_setup()
        treewide: init_timer() -> setup_timer()
        treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
        s390: cmm: Convert timers to use timer_setup()
        lightnvm: Convert timers to use timer_setup()
        drivers/net: cris: Convert timers to use timer_setup()
        drm/vc4: Convert timers to use timer_setup()
        block/laptop_mode: Convert timers to use timer_setup()
        net/atm/mpc: Avoid open-coded assignment of timer callback function
        ...
      844056fd
    • Linus Torvalds's avatar
      Merge tag 'arc-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · ca122fe3
      Linus Torvalds authored
      Pull ARC updates from Vineet Gupta:
      
       - more changes for HS48 cores: supporting MMUv5, detecting new
         micro-arch gizmos
      
       - axs10x platform wiring up reset driver merged in this cycle
      
       - ARC perf driver optimizations
      
      * tag 'arc-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: perf: avoid vmalloc backed mmap
        ARCv2: perf: optimize given that num counters <= 32
        ARCv2: perf: tweak overflow interrupt
        ARC: [plat-axs10x] DTS: Add reset controller node to manage ethernet reset
        ARCv2: boot log: updates for HS48: dual-issue, ECC, Loop Buffer
        ARCv2: Accomodate HS48 MMUv5 by relaxing MMU ver checking
        ARC: [plat-axs10x] auto-select AXS101 or AXS103 given the  ISA config
      ca122fe3
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 5e2fda47
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - use 'pwd' instead of '/bin/pwd' for portability
      
       - clean up Makefiles
      
       - fix ld-option for clang
      
       - fix malloc'ed data size in Kconfig
      
       - fix parallel building along with coccicheck
      
       - fix a minor issue of package building
      
       - prompt to use "rpm-pkg" instead of "rpm"
      
       - clean up *.i and *.lst patterns by "make clean"
      
      * tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: drop $(extra-y) from real-objs-y
        kbuild: clean up *.i and *.lst patterns by make clean
        kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used
        kbuild: pkg: use --transform option to prefix paths in tar
        coccinelle: fix parallel build with CHECK=scripts/coccicheck
        kconfig/symbol.c: use correct pointer type argument for sizeof
        kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
        kbuild: remove all dummy assignments to obj-
        kbuild: create built-in.o automatically if parent directory wants it
        kbuild: /bin/pwd -> pwd
      5e2fda47
    • Linus Torvalds's avatar
      Merge tag 'afs-fixes-20171124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · f61ec2c9
      Linus Torvalds authored
      Pull AFS fixes from David Howells:
      
       - Make AFS file locking work again.
      
       - Don't write to a page that's being written out, but wait for it to
         complete.
      
       - Do d_drop() and d_add() in the right places.
      
       - Put keys on error paths.
      
       - Remove some redundant code.
      
      * tag 'afs-fixes-20171124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: remove redundant assignment of dvnode to itself
        afs: cell: Remove unnecessary code in afs_lookup_cell
        afs: Fix signal handling in some file ops
        afs: Fix some dentry handling in dir ops and missing key_puts
        afs: Make afs_write_begin() avoid writing to a page that's being stored
        afs: Fix file locking
      f61ec2c9
  6. Nov 25, 2017
    • Linus Torvalds's avatar
      Merge tag 'kvm-4.15-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7753ea09
      Linus Torvalds authored
      Pull KVM updates from Radim Krčmář:
       "Trimmed second batch of KVM changes for Linux 4.15:
      
         - GICv4 Support for KVM/ARM
      
         - re-introduce support for CPUs without virtual NMI (cc stable) and
           allow testing of KVM without virtual NMI on available CPUs
      
         - fix long-standing performance issues with assigned devices on AMD
           (cc stable)"
      
      * tag 'kvm-4.15-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (30 commits)
        kvm: vmx: Allow disabling virtual NMI support
        kvm: vmx: Reinstate support for CPUs without virtual NMI
        KVM: SVM: obey guest PAT
        KVM: arm/arm64: Don't queue VLPIs on INV/INVALL
        KVM: arm/arm64: Fix GICv4 ITS initialization issues
        KVM: arm/arm64: GICv4: Theory of operations
        KVM: arm/arm64: GICv4: Enable VLPI support
        KVM: arm/arm64: GICv4: Prevent userspace from changing doorbell affinity
        KVM: arm/arm64: GICv4: Prevent a VM using GICv4 from being saved
        KVM: arm/arm64: GICv4: Enable virtual cpuif if VLPIs can be delivered
        KVM: arm/arm64: GICv4: Hook vPE scheduling into vgic flush/sync
        KVM: arm/arm64: GICv4: Use the doorbell interrupt as an unblocking source
        KVM: arm/arm64: GICv4: Add doorbell interrupt handling
        KVM: arm/arm64: GICv4: Use pending_last as a scheduling hint
        KVM: arm/arm64: GICv4: Handle INVALL applied to a vPE
        KVM: arm/arm64: GICv4: Propagate property updates to VLPIs
        KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE
        KVM: arm/arm64: GICv4: Handle CLEAR applied to a VLPI
        KVM: arm/arm64: GICv4: Propagate affinity changes to the physical ITS
        KVM: arm/arm64: GICv4: Unmap VLPI when freeing an LPI
        ...
      7753ea09
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 83ada031
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A small batch of fixes, about 50% tagged for stable and the rest for
        recently merged code.
      
        There's one more fix for the >128T handling on hash. Once a process
        had requested a single mmap above 128T we would then always search
        above 128T. The correct behaviour is to consider the hint address in
        isolation for each mmap request.
      
        Then a couple of fixes for the IMC PMU, a missing EXPORT_SYMBOL in
        VAS, a fix for STRICT_KERNEL_RWX on 32-bit, and a fix to correctly
        identify P9 DD2.1 but in code that is currently not used by default.
      
        Thanks to: Aneesh Kumar K.V, Christophe Leroy, Madhavan Srinivasan,
        Sukadev Bhattiprolu"
      
      * tag 'powerpc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Fix Power9 DD2.1 logic in DT CPU features
        powerpc/perf: Fix IMC_MAX_PMU macro
        powerpc/perf: Fix pmu_count to count only nest imc pmus
        powerpc: Fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX
        powerpc/perf/imc: Use cpu_to_node() not topology_physical_package_id()
        powerpc/vas: Export chip_to_vas_id()
        powerpc/64s/slice: Use addr limit when computing slice mask
      83ada031
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · eda5d471
      Linus Torvalds authored
      Pull SCSI target updates from Nicholas Bellinger:
      
       "This series is predominantly bug-fixes, with a few small improvements
        that have been outstanding over the last release cycle.
      
        As usual, the associated bug-fixes have CC' tags for stable.
      
        Also, things have been particularly quiet wrt new developments the
        last months, with most folks continuing to focus on stability atop 4.x
        stable kernels for their respective production configurations.
      
        Also at this point, the stable trees have been synced up with
        mainline. This will continue to be a priority, as production users
        tend to run exclusively atop stable kernels, a few releases behind
        mainline.
      
        The highlights include:
      
         - Fix PR PREEMPT_AND_ABORT null pointer dereference regression in
           v4.11+ (tangwenji)
      
         - Fix OOPs during removing TCMU device (Xiubo Li + Zhang Zhuoyu)
      
         - Add netlink command reply supported option for each device (Kenjiro
           Nakayama)
      
         - cxgbit: Abort the TCP connection in case of data out timeout (Varun
           Prakash)
      
         - Fix PR/ALUA file path truncation (David Disseldorp)
      
         - Fix double se_cmd completion during ->cmd_time_out (Mike Christie)
      
         - Fix QUEUE_FULL + SCSI task attribute handling in 4.1+ (Bryant Ly +
           nab)
      
         - Fix quiese during transport_write_pending_qf endless loop (nab)
      
         - Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK in 3.14+
           (Don White + nab)"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (35 commits)
        tcmu: Add a missing unlock on an error path
        tcmu: Fix some memory corruption
        iscsi-target: Fix non-immediate TMR reference leak
        iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
        target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
        target: Fix quiese during transport_write_pending_qf endless loop
        target: Fix caw_sem leak in transport_generic_request_failure
        target: Fix QUEUE_FULL + SCSI task attribute handling
        iSCSI-target: Use common error handling code in iscsi_decode_text_input()
        target/iscsi: Detect conn_cmd_list corruption early
        target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd()
        target/iscsi: Modify iscsit_do_crypto_hash_buf() prototype
        target/iscsi: Fix endianness in an error message
        target/iscsi: Use min() in iscsit_dump_data_payload() instead of open-coding it
        target/iscsi: Define OFFLOAD_BUF_SIZE once
        target: Inline transport_put_cmd()
        target: Suppress gcc 7 fallthrough warnings
        target: Move a declaration of a global variable into a header file
        tcmu: fix double se_cmd completion
        target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES
        ...
      eda5d471
  7. Nov 24, 2017