1. 04 Feb, 2019 7 commits
    • Paul Burton's avatar
      MIPS: mm: Remove redundant preempt_disable in local_flush_tlb_mm() · f7908a00
      Paul Burton authored
      The r4k variant of local_flush_tlb_mm() wraps its call to
      drop_mmu_context() with a preempt_disable() & preempt_enable() pair, but
      this is redundant since drop_mmu_context() disables interrupts and from
      Documentation/preempt-locking.txt:
      
        Note that you do not need to explicitly prevent preemption if you are
        holding any locks or interrupts are disabled, since preemption is
        implicitly disabled in those cases.
      
      Remove the redundant preempt_disable() & preempt_enable() calls.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      f7908a00
    • Paul Burton's avatar
      MIPS: mm: Move drop_mmu_context() comment into appropriate block · 6067d47e
      Paul Burton authored
      drop_mmu_context() is preceded by a comment indicating what happens if
      the mm provided is currently active on the local CPU. Move that comment
      into the block that executes in this case, adjusting slightly to reflect
      its new location.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      6067d47e
    • Paul Burton's avatar
      MIPS: mm: Consolidate drop_mmu_context() has-ASID checks · c9b2a3dc
      Paul Burton authored
      If an mm does not have an ASID on the local CPU then drop_mmu_context()
      is always redundant, since there's no context to "drop". Various callers
      of drop_mmu_context() check whether the mm has been allocated an ASID
      before making the call. Move that check into drop_mmu_context() and
      remove it from callers to simplify them.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      c9b2a3dc
    • Paul Burton's avatar
      MIPS: mm: Avoid HTW stop/start when dropping an inactive mm · 67741ba3
      Paul Burton authored
      If drop_mmu_context() is called with an mm that is not currently active
      on the local CPU then there's no need for us to stop & start a hardware
      page table walker because it can't be fetching entries for the ASID
      corresponding to the mm we're operating on.
      
      Move the htw_stop() & htw_start() calls into the block which we run only
      if the mm is currently active, in order to avoid the redundant work.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      67741ba3
    • Paul Burton's avatar
      MIPS: mm: Remove redundant get_new_mmu_context() cpu argument · 4739f7dd
      Paul Burton authored
      get_new_mmu_context() accepts a cpu argument, but implicitly assumes
      that this is always equal to smp_processor_id() by operating on the
      local CPU's TLB & icache.
      
      Remove the cpu argument and have get_new_mmu_context() call
      smp_processor_id() instead.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      4739f7dd
    • Paul Burton's avatar
      MIPS: mm: Remove redundant drop_mmu_context() cpu argument · 9a27324f
      Paul Burton authored
      The drop_mmu_context() function accepts a cpu argument, but it
      implicitly expects that this is always equal to smp_processor_id() by
      allocating & configuring an ASID on the local CPU when the mm is active
      on the CPU indicated by the cpu argument.
      
      All callers do provide the value of smp_processor_id() to the cpu
      argument.
      
      Remove the redundant argument and have drop_mmu_context() call
      smp_processor_id() itself, making it clearer that the cpu variable
      always represents the local CPU.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      9a27324f
    • Paul Burton's avatar
      MIPS: mm: Define activate_mm() using switch_mm() · c653bd04
      Paul Burton authored
      MIPS has separate definitions of activate_mm() & switch_mm() which are
      identical apart from switch_mm() checking that the ASID is valid before
      acquiring a new one.
      
      We know that when activate_mm() is called cpu_context(X, mm) will be
      zero, and this will never be considered a valid ASID because we never
      allow the ASID version number to be zero, instead beginning with version
      1 using asid_first_version(). Therefore switch_mm() will always allocate
      a new ASID when called for a new task, meaning that it will behave
      identically to activate_mm().
      
      Take advantage of this to remove the duplication & define activate_mm()
      using switch_mm() just like many other architectures do.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      c653bd04
  2. 28 Jan, 2019 2 commits
  3. 23 Jan, 2019 3 commits
    • Masahiro Yamada's avatar
      MIPS: remove meaningless generic-(CONFIG_GENERIC_CSUM) += checksum.h · a0f0b69f
      Masahiro Yamada authored
      This line is weird in multiple ways.
      
      (CONFIG_GENERIC_CSUM) might be a typo of $(CONFIG_GENERIC_CSUM).
      
      Even if you add '$' to it, $(CONFIG_GENERIC_CSUM) is never evaluated
      to 'y' because scripts/Makefile.asm-generic does not include
      include/config/auto.conf. So, the asm-generic wrapper of checksum.h
      is never generated.
      
      Even if you manage to generate it, it is never included by anyone
      because MIPS has the checkin header with the same file name:
      
        arch/mips/include/asm/checksum.h
      
      As you see in the top Makefile, the checkin headers are included before
      generated ones.
      
        LINUXINCLUDE    := \
                        -I$(srctree)/arch/$(SRCARCH)/include \
                        -I$(objtree)/arch/$(SRCARCH)/include/generated \
                        ...
      
      Commit 4e0748f5 ("MIPS: Use generic checksum functions for MIPS R6")
      already added the asm-generic fallback code in the checkin header:
      
        #ifdef CONFIG_GENERIC_CSUM
        #include <asm/generic/checksum.h>
        #else
          ...
        #endif
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      a0f0b69f
    • Jiaxun Yang's avatar
      MIPS: Loongson32: Revert ISA level to MIPS32R2 · 7e280f6b
      Jiaxun Yang authored
      GS232 core have implemented all necessary mips32r2 instructions.
      Serval missing FP instructions can be emulated by kernel.
      
      The issue of di instruction have been solved.
      Thus we revert the ISA level back to MIPS32R2.
      Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      Cc: keguang.zhang@gmail.com
      7e280f6b
    • Jiaxun Yang's avatar
      MIPS: Loongson32: workaround di issue · bdea8bb1
      Jiaxun Yang authored
      GS232 core used in Loongson-1 processors has a bug that
      di instruction doesn't save the irqflag immediately.
      
      Workaround by set irqflag in CP0 before di instructions
      as same as Loongson-3.
      Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      Cc: keguang.zhang@gmail.com
      bdea8bb1
  4. 22 Jan, 2019 19 commits
  5. 18 Jan, 2019 1 commit
    • Hauke Mehrtens's avatar
      MIPS: Compile post DMA flush only when needed · f263f2a2
      Hauke Mehrtens authored
      dma_sync_phys() is only called for some CPUs when a mapping is removed.
      Add ARCH_HAS_SYNC_DMA_FOR_CPU only for the CPUs listed in
      cpu_needs_post_dma_flush() which need this extra call and do not compile
      this code in for other CPUs. We need this for R10000, R12000, BMIPS5000
      CPUs and CPUs supporting MAAR which was introduced in MIPS32r5.
      
      This will hopefully improve the performance of the not affected devices.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: ralf@linux-mips.org
      Cc: jhogan@kernel.org
      Cc: linux-mips@vger.kernel.org
      Cc: nbd@nbd.name
      f263f2a2
  6. 13 Jan, 2019 8 commits
    • Linus Torvalds's avatar
      Linux 5.0-rc2 · 1c7fc5cb
      Linus Torvalds authored
      1c7fc5cb
    • Jonathan Neuschäfer's avatar
      kernel/sys.c: Clarify that UNAME26 does not generate unique versions anymore · b7285b42
      Jonathan Neuschäfer authored
      UNAME26 is a mechanism to report Linux's version as 2.6.x, for
      compatibility with old/broken software.  Due to the way it is
      implemented, it would have to be updated after 5.0, to keep the
      resulting versions unique.  Linus Torvalds argued:
      
       "Do we actually need this?
      
        I'd rather let it bitrot, and just let it return random versions. It
        will just start again at 2.4.60, won't it?
      
        Anybody who uses UNAME26 for a 5.x kernel might as well think it's
        still 4.x. The user space is so old that it can't possibly care about
        differences between 4.x and 5.x, can it?
      
        The only thing that matters is that it shows "2.4.<largeenough>",
        which it will do regardless"
      Signed-off-by: default avatarJonathan Neuschäfer <j.neuschaefer@gmx.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b7285b42
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · dbc3c09b
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A bigger batch than I anticipated this week, for two reasons:
      
         - Some fallout on Davinci from board file -> DTB conversion, that
           also includes a few longer-standing fixes (i.e. not recent
           regressions).
      
         - drivers/reset material that has been in linux-next for a while, but
           didn't get sent to us until now for a variety of reasons
           (maintainer out sick, holidays, etc). There's a functional
           dependency in there such that one platform (Altera's SoCFPGA) won't
           boot without one of the patches; instead of reverting the patch
           that got merged, I looked at this set and decided it was small
           enough that I'll pick it up anyway. If you disagree I can revisit
           with a smaller set.
      
        That being said, there's also a handful of the usual stuff:
      
         - Fix for a crash on Armada 7K/8K when the kernel touches
           PSCI-reserved memory
      
         - Fix for PCIe reset on Macchiatobin (Armada 8K development board,
           what this email is sent from in fact :)
      
         - Enable a few new-merged modules for Amlogic in arm64 defconfig
      
         - Error path fixes on Integrator
      
         - Build fix for Renesas and Qualcomm
      
         - Initialization fix for Renesas RZ/G2E
      
        .. plus a few more fixlets"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
        ARM: integrator: impd1: use struct_size() in devm_kzalloc()
        qcom-scm: Include <linux/err.h> header
        gpio: pl061: handle failed allocations
        ARM: dts: kirkwood: Fix polarity of GPIO fan lines
        arm64: dts: marvell: mcbin: fix PCIe reset signal
        arm64: dts: marvell: armada-ap806: reserve PSCI area
        ARM: dts: da850-lcdk: Correct the sound card name
        ARM: dts: da850-lcdk: Correct the audio codec regulators
        ARM: dts: da850-evm: Correct the sound card name
        ARM: dts: da850-evm: Correct the audio codec regulators
        ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries
        ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries
        ARM: davinci: dm355-evm: fix label names in GPIO lookup entries
        ARM: davinci: da850-evm: fix label names in GPIO lookup entries
        ARM: davinci: da830-evm: fix label names in GPIO lookup entries
        arm64: defconfig: enable modules for amlogic s400 sound card
        reset: uniphier-glue: Add AHCI reset control support in glue layer
        dt-bindings: reset: uniphier: Add AHCI core reset description
        reset: uniphier-usb3: Rename to reset-uniphier-glue
        dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals
        ...
      dbc3c09b
    • Linus Torvalds's avatar
      Merge tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 6b529fb0
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - two regression fixes in clone/dedupe ioctls, the generic check
         callback needs to lock extents properly and wait for io to avoid
         problems with writeback and relocation
      
       - fix deadlock when using free space tree due to block group creation
      
       - a recently added check refuses a valid fileystem with seeding device,
         make that work again with a quickfix, proper solution needs more
         intrusive changes
      
      * tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: Use real device structure to verify dev extent
        Btrfs: fix deadlock when using free space tree due to block group creation
        Btrfs: fix race between reflink/dedupe and relocation
        Btrfs: fix race between cloning range ending at eof and writeback
      6b529fb0
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 72d657dd
      Linus Torvalds authored
      Pull driver core fixes from Greg KH:
       "Here is one small sysfs change, and a documentation update for 5.0-rc2
      
        The sysfs change moves from using BUG_ON to WARN_ON, as discussed in
        an email thread on lkml while trying to track down another driver bug.
        sysfs should not be crashing and preventing people from seeing where
        they went wrong. Now it properly recovers and warns the developer.
      
        The documentation update removes the use of BUS_ATTR() as the kernel
        is moving away from this to use the specific BUS_ATTR_RW() and friends
        instead. There are pending patches in all of the different subsystems
        to remove the last users of this macro, but for now, don't advertise
        it should be used anymore to keep new ones from being introduced.
      
        Both have been in linux-next with no reported issues"
      
      * tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation: driver core: remove use of BUS_ATTR
        sysfs: convert BUG_ON to WARN_ON
      72d657dd
    • Linus Torvalds's avatar
      Merge tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · f7c1038b
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are some small staging driver fixes for some reported issues.
      
        One reverts a patch that was made to the rtl8723bs driver that turned
        out to not be needed at all as it was a bug in clang. The others fix
        up some reported issues in the rtl8188eu driver and update the
        MAINTAINERS file to point to Larry for this driver so he can get the
        bug reports easier.
      
        All have been in linux-next with no reported issues"
      
      * tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Revert "staging: rtl8723bs: Mark ACPI table declaration as used"
        staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
        staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
        MAINTAINERS: Add entry for staging driver r8188eu
      f7c1038b
    • Linus Torvalds's avatar
      Merge tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 437e878a
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are 2 tty and serial fixes for 5.0-rc2 that resolve some reported
        issues.
      
        The first is a simple serial driver fix for a regression that showed
        up in 5.0-rc1. The second one resolves a number of reported issues
        with the recent tty locking fixes that went into 5.0-rc1. Lots of
        people have tested the second one and say it resolves their issues.
      
        Both have been in linux-next with no reported issues"
      
      * tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: Don't hold ldisc lock in tty_reopen() if ldisc present
        serial: lantiq: Do not swap register read/writes
      437e878a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1dd8a3f6
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB driver fixes and quirk updates for 5.0-rc2.
      
        The majority here are some quirks for some storage devices to get them
        to work properly. There's also a fix here to resolve the reported
        issues with some audio devices that say they are UAC3 compliant, but
        really are not.
      
        And a fix up for the MAINTAINERS file to remove a dead url.
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: storage: Remove outdated URL from MAINTAINERS
        USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
        usbcore: Select only first configuration for non-UAC3 compliant devices
        USB: storage: add quirk for SMI SM3350
        USB: storage: don't insert sane sense for SPC3+ when bad sense specified
        usb: cdc-acm: send ZLP for Telit 3G Intel based modems
      1dd8a3f6