1. 13 1月, 2019 7 次提交
  2. 11 1月, 2019 2 次提交
  3. 10 1月, 2019 13 次提交
  4. 09 1月, 2019 1 次提交
  5. 07 1月, 2019 17 次提交
    • K
      reset: uniphier-glue: Add AHCI reset control support in glue layer · d0c2d210
      Kunihiko Hayashi 提交于
      Add a reset line included in AHCI glue layer to enable AHCI core
      implemented in UniPhier SoCs.
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      d0c2d210
    • K
      dt-bindings: reset: uniphier: Add AHCI core reset description · 69af3d1b
      Kunihiko Hayashi 提交于
      Add compatible strings for reset control of AHCI core implemented in
      UniPhier SoCs. The reset control belongs to AHCI glue layer.
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      69af3d1b
    • K
      reset: uniphier-usb3: Rename to reset-uniphier-glue · 3eb8f765
      Kunihiko Hayashi 提交于
      This driver works for controlling the reset lines including USB3
      glue layer, however, this can be applied to other glue layers.
      Now this patch renames the driver from "reset-uniphier-usb3" to
      "reset-uniphier-glue".
      
      At the same time, this changes CONFIG_RESET_UNIPHIER_USB3 to
      CONFIG_RESET_UNIPHIER_GLUE.
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      3eb8f765
    • K
      dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals · 21b22136
      Kunihiko Hayashi 提交于
      Replace the expression of "USB3 glue layer" with the glue layer of the
      generic peripherals to allow other devices to use it. The reset control
      belongs to this glue layer.
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      21b22136
    • D
      ARM: socfpga: dts: document "altr,stratix10-rst-mgr" binding · a277105b
      Dinh Nguyen 提交于
      "altr,stratix10-rst-mgr" is used for the Stratix10 reset manager.
      Signed-off-by: NDinh Nguyen <dinguyen@kernel.org>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      a277105b
    • D
      reset: socfpga: add an early reset driver for SoCFPGA · b3ca9888
      Dinh Nguyen 提交于
      Create a separate reset driver that uses the reset operations in
      reset-simple. The reset driver for the SoCFPGA platform needs to
      register early in order to be able bring online timers that needed
      early in the kernel bootup.
      
      We do not need this early reset driver for Stratix10, because on
      arm64, Linux does not need the timers are that in reset. Linux is
      able to run just fine with the internal armv8 timer. Thus, we use
      a new binding "altr,stratix10-rst-mgr" for the Stratix10 platform.
      The Stratix10 platform will continue to use the reset-simple platform
      driver, while the 32-bit platforms(Cyclone5/Arria5/Arria10) will use
      the early reset driver.
      Signed-off-by: NDinh Nguyen <dinguyen@kernel.org>
      [p.zabel@pengutronix.de: fixed socfpga of_device_id in reset-simple]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      b3ca9888
    • C
      reset: fix null pointer dereference on dev by dev_name · 151f72f4
      Colin Ian King 提交于
      The call to dev_name will dereference dev, however, dev is later
      being null checked, so there is a possibility of a null pointer
      dereference on dev by the call to dev_name. Fix this by null
      checking dev first before the call to dev_name
      
      Detected by CoverityScan, CID#1475475 ("Dereference before null check")
      
      Fixes: 2a6cb2b1d83b ("reset: Add reset_control_get_count()")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      151f72f4
    • G
      reset: Add reset_control_get_count() · eaf91db0
      Geert Uytterhoeven 提交于
      Currently the reset core has internal support for counting the number of
      resets for a device described in DT.  Generalize this to devices using
      lookup resets, and export it for public use.
      
      This will be used by generic drivers that need to be sure a device is
      controlled by a single, dedicated reset line (e.g. vfio-platform).
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      [p.zabel@pengutronix.de: fixed a typo in reset_control_get_count comment]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      eaf91db0
    • G
      reset: Improve reset controller kernel docs · 12c62b9d
      Geert Uytterhoeven 提交于
      Grammar and indentation fixes.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      [p.zabel@pengutronix.de: dropped "shared among" -> "shared between"]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      12c62b9d
    • E
      ARC: HSDK: improve reset driver · 42f03ab3
      Eugeniy Paltsev 提交于
      As for today HSDK reset driver implements only .reset() callback.
      
      In case of driver which implements one of standard
      reset controller usage pattern
      (call *_deassert() in probe(), call *_assert() in remove())
      that leads to inoperability of this reset driver.
      
      Improve HSDK reset driver by calling .reset() callback inside of
      .deassert() callback to avoid each reset controller
      user adaptation for work with both reset methods
      (reset() and {.assert() & .deassert()} pair)
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      42f03ab3
    • B
      soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} · a6459722
      Biju Das 提交于
      The workaround for the wrong hierarchy of the 3DG-{A,B} power domains on
      RZ/G2E ES1.0 corrected the parent domains. However, the 3DG-{A,B} power
      domains were still initialized and powered in the wrong order, causing
      3DG operation to fail.
      
      Fix this by changing the order in the table at runtime, when running on
      an affected SoC.
      
      This work is based on the work done by Geert for R-Car E3.
      
      Fixes: f37d211c ("soc: renesas: rcar-sysc: Add r8a774c0 support")
      Signed-off-by: NBiju Das <biju.das@bp.renesas.com>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
      a6459722
    • A
      ARM: shmobile: fix build regressions · 8070ba63
      Arnd Bergmann 提交于
      A number of Kconfig options have become available now to random ARM
      platforms outside of ARCH_MULTIPLATFORM, which now causes Kconfig
      warnings, and other build errors when those select options that
      lack additional dependencies, e.g.:
      
      WARNING: unmet direct dependencies detected for HAVE_ARM_ARCH_TIMER
        Depends on [n]: CPU_V7 [=n]
        Selected by [y]:
        - ARCH_RCAR_GEN2 [=y] && SOC_RENESAS [=y]
        - ARCH_R8A73A4 [=y] && SOC_RENESAS [=y] && ARM [=y]
      
      WARNING: unmet direct dependencies detected for SYS_SUPPORTS_EM_STI
        Depends on [n]: GENERIC_CLOCKEVENTS [=n]
        Selected by [y]:
        - ARCH_EMEV2 [=y] && SOC_RENESAS [=y] && ARM [=y]
      
      Put the old dependency on ARCH_RENESAS back for the moment to restore
      the previous behavior.
      
      Fixes: 062887bf ("ARM: shmobile: Move SoC Kconfig symbols to drivers/soc/renesas/")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
      8070ba63
    • L
      Linux 5.0-rc1 · bfeffd15
      Linus Torvalds 提交于
      bfeffd15
    • L
      Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 85e1ffbd
      Linus Torvalds 提交于
      Pull more Kbuild updates from Masahiro Yamada:
      
       - improve boolinit.cocci and use_after_iter.cocci semantic patches
      
       - fix alignment for kallsyms
      
       - move 'asm goto' compiler test to Kconfig and clean up jump_label
         CONFIG option
      
       - generate asm-generic wrappers automatically if arch does not
         implement mandatory UAPI headers
      
       - remove redundant generic-y defines
      
       - misc cleanups
      
      * tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: rename generated .*conf-cfg to *conf-cfg
        kbuild: remove unnecessary stubs for archheader and archscripts
        kbuild: use assignment instead of define ... endef for filechk_* rules
        arch: remove redundant UAPI generic-y defines
        kbuild: generate asm-generic wrappers if mandatory headers are missing
        arch: remove stale comments "UAPI Header export list"
        riscv: remove redundant kernel-space generic-y
        kbuild: change filechk to surround the given command with { }
        kbuild: remove redundant target cleaning on failure
        kbuild: clean up rule_dtc_dt_yaml
        kbuild: remove UIMAGE_IN and UIMAGE_OUT
        jump_label: move 'asm goto' support test to Kconfig
        kallsyms: lower alignment on ARM
        scripts: coccinelle: boolinit: drop warnings on named constants
        scripts: coccinelle: check for redeclaration
        kconfig: remove unused "file" field of yylval union
        nds32: remove redundant kernel-space generic-y
        nios2: remove unneeded HAS_DMA define
      85e1ffbd
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ac5eed2b
      Linus Torvalds 提交于
      Pull perf tooling updates form Ingo Molnar:
       "A final batch of perf tooling changes: mostly fixes and small
        improvements"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits)
        perf session: Add comment for perf_session__register_idle_thread()
        perf thread-stack: Fix thread stack processing for the idle task
        perf thread-stack: Allocate an array of thread stacks
        perf thread-stack: Factor out thread_stack__init()
        perf thread-stack: Allow for a thread stack array
        perf thread-stack: Avoid direct reference to the thread's stack
        perf thread-stack: Tidy thread_stack__bottom() usage
        perf thread-stack: Simplify some code in thread_stack__process()
        tools gpio: Allow overriding CFLAGS
        tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
        tools thermal tmon: Allow overriding CFLAGS assignments
        tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
        perf c2c: Increase the HITM ratio limit for displayed cachelines
        perf c2c: Change the default coalesce setup
        perf trace beauty ioctl: Beautify USBDEVFS_ commands
        perf trace beauty: Export function to get the files for a thread
        perf trace: Wire up ioctl's USBDEBFS_ cmd table generator
        perf beauty ioctl: Add generator for USBDEVFS_ ioctl commands
        tools headers uapi: Grab a copy of usbdevice_fs.h
        perf trace: Store the major number for a file when storing its pathname
        ...
      ac5eed2b
    • L
      Change mincore() to count "mapped" pages rather than "cached" pages · 574823bf
      Linus Torvalds 提交于
      The semantics of what "in core" means for the mincore() system call are
      somewhat unclear, but Linux has always (since 2.3.52, which is when
      mincore() was initially done) treated it as "page is available in page
      cache" rather than "page is mapped in the mapping".
      
      The problem with that traditional semantic is that it exposes a lot of
      system cache state that it really probably shouldn't, and that users
      shouldn't really even care about.
      
      So let's try to avoid that information leak by simply changing the
      semantics to be that mincore() counts actual mapped pages, not pages
      that might be cheaply mapped if they were faulted (note the "might be"
      part of the old semantics: being in the cache doesn't actually guarantee
      that you can access them without IO anyway, since things like network
      filesystems may have to revalidate the cache before use).
      
      In many ways the old semantics were somewhat insane even aside from the
      information leak issue.  From the very beginning (and that beginning is
      a long time ago: 2.3.52 was released in March 2000, I think), the code
      had a comment saying
      
        Later we can get more picky about what "in core" means precisely.
      
      and this is that "later".  Admittedly it is much later than is really
      comfortable.
      
      NOTE! This is a real semantic change, and it is for example known to
      change the output of "fincore", since that program literally does a
      mmmap without populating it, and then doing "mincore()" on that mapping
      that doesn't actually have any pages in it.
      
      I'm hoping that nobody actually has any workflow that cares, and the
      info leak is real.
      
      We may have to do something different if it turns out that people have
      valid reasons to want the old semantics, and if we can limit the
      information leak sanely.
      
      Cc: Kevin Easton <kevin@guarana.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Masatake YAMATO <yamato@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      574823bf
    • L
      Fix 'acccess_ok()' on alpha and SH · 94bd8a05
      Linus Torvalds 提交于
      Commit 594cc251 ("make 'user_access_begin()' do 'access_ok()'")
      broke both alpha and SH booting in qemu, as noticed by Guenter Roeck.
      
      It turns out that the bug wasn't actually in that commit itself (which
      would have been surprising: it was mostly a no-op), but in how the
      addition of access_ok() to the strncpy_from_user() and strnlen_user()
      functions now triggered the case where those functions would test the
      access of the very last byte of the user address space.
      
      The string functions actually did that user range test before too, but
      they did it manually by just comparing against user_addr_max().  But
      with user_access_begin() doing the check (using "access_ok()"), it now
      exposed problems in the architecture implementations of that function.
      
      For example, on alpha, the access_ok() helper macro looked like this:
      
        #define __access_ok(addr, size) \
              ((get_fs().seg & (addr | size | (addr+size))) == 0)
      
      and what it basically tests is of any of the high bits get set (the
      USER_DS masking value is 0xfffffc0000000000).
      
      And that's completely wrong for the "addr+size" check.  Because it's
      off-by-one for the case where we check to the very end of the user
      address space, which is exactly what the strn*_user() functions do.
      
      Why? Because "addr+size" will be exactly the size of the address space,
      so trying to access the last byte of the user address space will fail
      the __access_ok() check, even though it shouldn't.  As a result, the
      user string accessor functions failed consistently - because they
      literally don't know how long the string is going to be, and the max
      access is going to be that last byte of the user address space.
      
      Side note: that alpha macro is buggy for another reason too - it re-uses
      the arguments twice.
      
      And SH has another version of almost the exact same bug:
      
        #define __addr_ok(addr) \
              ((unsigned long __force)(addr) < current_thread_info()->addr_limit.seg)
      
      so far so good: yes, a user address must be below the limit.  But then:
      
        #define __access_ok(addr, size)         \
              (__addr_ok((addr) + (size)))
      
      is wrong with the exact same off-by-one case: the case when "addr+size"
      is exactly _equal_ to the limit is actually perfectly fine (think "one
      byte access at the last address of the user address space")
      
      The SH version is actually seriously buggy in another way: it doesn't
      actually check for overflow, even though it did copy the _comment_ that
      talks about overflow.
      
      So it turns out that both SH and alpha actually have completely buggy
      implementations of access_ok(), but they happened to work in practice
      (although the SH overflow one is a serious serious security bug, not
      that anybody likely cares about SH security).
      
      This fixes the problems by using a similar macro on both alpha and SH.
      It isn't trying to be clever, the end address is based on this logic:
      
              unsigned long __ao_end = __ao_a + __ao_b - !!__ao_b;
      
      which basically says "add start and length, and then subtract one unless
      the length was zero".  We can't subtract one for a zero length, or we'd
      just hit an underflow instead.
      
      For a lot of access_ok() users the length is a constant, so this isn't
      actually as expensive as it initially looks.
      Reported-and-tested-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      94bd8a05