1. 30 8月, 2018 1 次提交
  2. 29 8月, 2018 2 次提交
    • T
      ARM: dts: omap4-droid4: Fix emmc errors seen on some devices · 2d59bb60
      Tony Lindgren 提交于
      Otherwise we can get the following errors occasionally on some devices:
      
      mmc1: tried to HW reset card, got error -110
      mmcblk1: error -110 requesting status
      mmcblk1: recovery failed!
      print_req_error: I/O error, dev mmcblk1, sector 14329
      ...
      
      I have one device that hits this error almost on every boot, and another
      one that hits it only rarely with the other ones I've used behave without
      problems. I'm not sure if the issue is related to a particular eMMC card
      model, but in case it is, both of the machines with issues have:
      
      # cat /sys/class/mmc_host/mmc1/mmc1:0001/manfid \
      /sys/class/mmc_host/mmc1/mmc1:0001/oemid \
      /sys/class/mmc_host/mmc1/mmc1:0001/name
      0x000045
      0x0100
      SEM16G
      
      and the working ones have:
      
      0x000011
      0x0100
      016G92
      
      Note that "ti,non-removable" is different as omap_hsmmc_reg_get() does not
      call omap_hsmmc_disable_boot_regulators() if no_regulator_off_init is set.
      And currently we set no_regulator_off_init only for "ti,non-removable" and
      not for "non-removable". It seems that we should have "non-removable" with
      some other mmc generic property behave in the same way instead of having to
      use a non-generic property. But let's fix the issue first.
      
      Fixes: 7e2f8c0a ("ARM: dts: Add minimal support for motorola droid 4
      xt894")
      Cc: Marcel Partap <mpartap@gmx.net>
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Michael Scott <hashcode0f@gmail.com>
      Cc: NeKit <nekit1000@gmail.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Sebastian Reichel <sre@kernel.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      2d59bb60
    • N
      ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts · 496f3347
      Neeraj Dantu 提交于
      Fix wrong mode for dts file added by commit bb3e3fbb
      ("ARM: dts: Add DT support for Octavo Systems OSD3358-SM-RED
      based on TI AM335x").
      Signed-off-by: NNeeraj Dantu <neeraj.dantu@octavosystems.com>
      CC: Robert Nelson <robertcnelson@gmail.com>
      CC: Jason Kridner <jkridner@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      496f3347
  3. 27 8月, 2018 7 次提交
  4. 24 8月, 2018 3 次提交
  5. 23 8月, 2018 2 次提交
  6. 22 8月, 2018 2 次提交
  7. 18 8月, 2018 2 次提交
  8. 17 8月, 2018 2 次提交
    • T
      ARM: OMAP2+: Fix module address for modules using mpu_rt_idx · 1dbcb97c
      Tony Lindgren 提交于
      If we use device tree data for a module interconnect target we want
      to map the control registers from the module start. Legacy hwmod platform
      data however is using child IP offsets for cpsw module with mpu_rt_idx.
      
      In cases where we have the interconnect target module already using device
      tree data with legacy hwmod platform data still around, the sysc register
      area is not adjusted for mpu_rt_idx causing wrong registers being accessed.
      
      Let's fix the issue for mixed dts and platform data mode by ioremapping
      the module registers using child IP offset if mpu_rt_idx is set. For
      device tree only data there's no reason to use mpu_rt_idx.
      
      Fixes: 6c72b355 ("ARM: OMAP2+: Parse module IO range from dts for legacy
      "ti,hwmods" support")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1dbcb97c
    • T
      ARM: OMAP2+: Fix null hwmod for ti-sysc debug · 4769c003
      Tony Lindgren 提交于
      We may call omap_hwmod_parse_module_range() with no hwmod allocated yet
      and may have debug enabled. Let's fix this by checking for hwmod before
      trying to use it's name.
      
      Fixes: 6c72b355 ("ARM: OMAP2+: Parse module IO range from dts for legacy
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      4769c003
  9. 14 8月, 2018 1 次提交
  10. 12 8月, 2018 3 次提交
  11. 03 8月, 2018 7 次提交
    • P
      ARM: Convert to GENERIC_IRQ_MULTI_HANDLER · 4c301f9b
      Palmer Dabbelt 提交于
      Converts the ARM interrupt code to use the recently added
      GENERIC_IRQ_MULTI_HANDLER, which is essentially just a copy of ARM's
      existhing MULTI_IRQ_HANDLER.  The only changes are:
      
      * handle_arch_irq is now defined in a generic C file instead of an
        arm-specific assembly file.
       
      * handle_arch_irq is now marked as __ro_after_init.
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: linux@armlinux.org.uk
      Cc: catalin.marinas@arm.com
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: jonas@southpole.se
      Cc: stefan.kristiansson@saunalahti.fi
      Cc: shorne@gmail.com
      Cc: jason@lakedaemon.net
      Cc: marc.zyngier@arm.com
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: nicolas.pitre@linaro.org
      Cc: vladimir.murzin@arm.com
      Cc: keescook@chromium.org
      Cc: jinb.park7@gmail.com
      Cc: yamada.masahiro@socionext.com
      Cc: alexandre.belloni@bootlin.com
      Cc: pombredanne@nexb.com
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Cc: kstewart@linuxfoundation.org
      Cc: jhogan@kernel.org
      Cc: mark.rutland@arm.com
      Cc: ard.biesheuvel@linaro.org
      Cc: james.morse@arm.com
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: openrisc@lists.librecores.org
      Link: https://lkml.kernel.org/r/20180622170126.6308-3-palmer@sifive.com
      4c301f9b
    • E
      crypto: arm/chacha20 - always use vrev for 16-bit rotates · 4e34e51f
      Eric Biggers 提交于
      The 4-way ChaCha20 NEON code implements 16-bit rotates with vrev32.16,
      but the one-way code (used on remainder blocks) implements it with
      vshl + vsri, which is slower.  Switch the one-way code to vrev32.16 too.
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4e34e51f
    • R
      ARM: spectre-v1: mitigate user accesses · a3c0f847
      Russell King 提交于
      Spectre variant 1 attacks are about this sequence of pseudo-code:
      
      	index = load(user-manipulated pointer);
      	access(base + index * stride);
      
      In order for the cache side-channel to work, the access() must me made
      to memory which userspace can detect whether cache lines have been
      loaded.  On 32-bit ARM, this must be either user accessible memory, or
      a kernel mapping of that same user accessible memory.
      
      The problem occurs when the load() speculatively loads privileged data,
      and the subsequent access() is made to user accessible memory.
      
      Any load() which makes use of a user-maniplated pointer is a potential
      problem if the data it has loaded is used in a subsequent access.  This
      also applies for the access() if the data loaded by that access is used
      by a subsequent access.
      
      Harden the get_user() accessors against Spectre attacks by forcing out
      of bounds addresses to a NULL pointer.  This prevents get_user() being
      used as the load() step above.  As a side effect, put_user() will also
      be affected even though it isn't implicated.
      
      Also harden copy_from_user() by redoing the bounds check within the
      arm_copy_from_user() code, and NULLing the pointer if out of bounds.
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      a3c0f847
    • R
      ARM: spectre-v1: use get_user() for __get_user() · b1cd0a14
      Russell King 提交于
      Fixing __get_user() for spectre variant 1 is not sane: we would have to
      add address space bounds checking in order to validate that the location
      should be accessed, and then zero the address if found to be invalid.
      
      Since __get_user() is supposed to avoid the bounds check, and this is
      exactly what get_user() does, there's no point having two different
      implementations that are doing the same thing.  So, when the Spectre
      workarounds are required, make __get_user() an alias of get_user().
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      b1cd0a14
    • R
      ARM: use __inttype() in get_user() · d09fbb32
      Russell King 提交于
      Borrow the x86 implementation of __inttype() to use in get_user() to
      select an integer type suitable to temporarily hold the result value.
      This is necessary to avoid propagating the volatile nature of the
      result argument, which can cause the following warning:
      
      lib/iov_iter.c:413:5: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      d09fbb32
    • R
      ARM: oabi-compat: copy semops using __copy_from_user() · 8c8484a1
      Russell King 提交于
      __get_user_error() is used as a fast accessor to make copying structure
      members as efficient as possible.  However, with software PAN and the
      recent Spectre variant 1, the efficiency is reduced as these are no
      longer fast accessors.
      
      In the case of software PAN, it has to switch the domain register around
      each access, and with Spectre variant 1, it would have to repeat the
      access_ok() check for each access.
      
      Rather than using __get_user_error() to copy each semops element member,
      copy each semops element in full using __copy_from_user().
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      8c8484a1
    • R
      ARM: vfp: use __copy_from_user() when restoring VFP state · 42019fc5
      Russell King 提交于
      __get_user_error() is used as a fast accessor to make copying structure
      members in the signal handling path as efficient as possible.  However,
      with software PAN and the recent Spectre variant 1, the efficiency is
      reduced as these are no longer fast accessors.
      
      In the case of software PAN, it has to switch the domain register around
      each access, and with Spectre variant 1, it would have to repeat the
      access_ok() check for each access.
      
      Use __copy_from_user() rather than __get_user_err() for individual
      members when restoring VFP state.
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      42019fc5
  12. 02 8月, 2018 4 次提交
    • C
      kconfig: include kernel/Kconfig.preempt from init/Kconfig · 87a4c375
      Christoph Hellwig 提交于
      Almost all architectures include it.  Add a ARCH_NO_PREEMPT symbol to
      disable preempt support for alpha, hexagon, non-coldfire m68k and
      user mode Linux.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      87a4c375
    • C
      Kconfig: consolidate the "Kernel hacking" menu · 06ec64b8
      Christoph Hellwig 提交于
      Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to
      the top-level Kconfig.  For two architectures that means moving their
      arch-specific symbols in that menu into a new arch Kconfig.debug file,
      and for a few more creating a dummy file so that we can include it
      unconditionally.
      
      Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where
      it belongs.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      06ec64b8
    • C
      kconfig: include common Kconfig files from top-level Kconfig · 1572497c
      Christoph Hellwig 提交于
      Instead of duplicating the source statements in every architecture just
      do it once in the toplevel Kconfig file.
      
      Note that with this the inclusion of arch/$(SRCARCH/Kconfig moves out of
      the top-level Kconfig into arch/Kconfig so that don't violate ordering
      constraits while keeping a sensible menu structure.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      1572497c
    • L
      mm: do not initialize TLB stack vma's with vma_init() · 8b11ec1b
      Linus Torvalds 提交于
      Commit 2c4541e2 ("mm: use vma_init() to initialize VMAs on stack and
      data segments") tried to initialize various left-over ad-hoc vma's
      "properly", but actually made things worse for the temporary vma's used
      for TLB flushing.
      
      vma_init() doesn't actually initialize all of the vma, just a few
      fields, so doing something like
      
         -       struct vm_area_struct vma = { .vm_mm = tlb->mm, };
         +       struct vm_area_struct vma;
         +
         +       vma_init(&vma, tlb->mm);
      
      was actually very bad: instead of having a nicely initialized vma with
      every field but "vm_mm" zeroed, you'd have an entirely uninitialized vma
      with only a couple of fields initialized.  And they weren't even fields
      that the code in question mostly cared about.
      
      The flush_tlb_range() function takes a "struct vma" rather than a
      "struct mm_struct", because a few architectures actually care about what
      kind of range it is - being able to only do an ITLB flush if it's a
      range that doesn't have data accesses enabled, for example.  And all the
      normal users already have the vma for doing the range invalidation.
      
      But a few people want to call flush_tlb_range() with a range they just
      made up, so they also end up using a made-up vma.  x86 just has a
      special "flush_tlb_mm_range()" function for this, but other
      architectures (arm and ia64) do the "use fake vma" thing instead, and
      thus got caught up in the vma_init() changes.
      
      At the same time, the TLB flushing code really doesn't care about most
      other fields in the vma, so vma_init() is just unnecessary and
      pointless.
      
      This fixes things by having an explicit "this is just an initializer for
      the TLB flush" initializer macro, which is used by the arm/arm64/ia64
      people who mis-use this interface with just a dummy vma.
      
      Fixes: 2c4541e2 ("mm: use vma_init() to initialize VMAs on stack and data segments")
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Hugh Dickins <hughd@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b11ec1b
  13. 01 8月, 2018 3 次提交
  14. 30 7月, 2018 1 次提交