1. 22 Nov, 2018 7 commits
    • Benjamin Tissoires's avatar
      Revert "Input: Add the `REL_WHEEL_HI_RES` event code" · ffe0e7cf
      Benjamin Tissoires authored
      This reverts commit aaf9978c.
      
      Quoting Peter:
      
      There is a HID feature report called "Resolution Multiplier"
      Described in the "Enhanced Wheel Support in Windows" doc and
      the "USB HID Usage Tables" page 30.
      
      http://download.microsoft.com/download/b/d/1/bd1f7ef4-7d72-419e-bc5c-9f79ad7bb66e/wheel.docx
      https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
      
      This was new for Windows Vista, so we're only a decade behind here. I only
      accidentally found this a few days ago while debugging a stuck button on a
      Microsoft mouse.
      
      The docs above describe it like this: a wheel control by default sends
      value 1 per notch. If the resolution multiplier is active, the wheel is
      expected to send a value of $multiplier per notch (e.g. MS Sculpt mouse) or
      just send events more often, i.e. for less physical motion (e.g. MS Comfort
      mouse).
      
      For the latter, you need the right HW of course. The Sculpt mouse has
      tactile wheel clicks, so nothing really changes. The Comfort mouse has
      continuous motion with no tactile clicks. Similar to the free-wheeling
      Logitech mice but without any inertia.
      
      Note that the doc also says that Vista and onwards *always* enable this
      feature where available.
      
      An example HID definition looks like this:
      
             Usage Page Generic Desktop (0x01)
             Usage Resolution Multiplier (0x48)
             Logical Minimum 0
             Logical Maximum 1
             Physical Minimum 1
             Physical Maximum 16
             Report Size 2 # in bits
             Report Count 1
             Feature (Data, Var, Abs)
      
      So the actual bits have values 0 or 1 and that reflects real values 1 or 16.
      We've only seen single-bits so far, so there's low-res and hi-res, but
      nothing in between.
      
      The multiplier is available for HID usages "Wheel" and "AC Pan" (horiz wheel).
      Microsoft suggests that
      
      > Vendors should ship their devices with smooth scrolling disabled and allow
      > Windows to enable it. This ensures that the device works like a regular HID
      > device on legacy operating systems that do not support smooth scrolling.
      (see the wheel doc linked above)
      
      The mice that we tested so far do reset on unplug.
      
      Device Support looks to be all (?) Microsoft mice but nothing else
      
      Not supported:
      - Logitech G500s, G303
      - Roccat Kone XTD
      - all the cheap Lenovo, HP, Dell, Logitech USB mice that come with a
        workstation that I could find don't have it.
      - Etekcity something something
      - Razer Imperator
      
      Supported:
      - Microsoft Comfort Optical Mouse 3000 - yes, physical: 1:4
      - Microsoft Sculpt Ergonomic Mouse - yes, physical: 1:12
      - Microsoft Surface mouse - yes, physical: 1:4
      
      So again, I think this is really just available on Microsoft mice, but
      probably all decent MS mice released over the last decade.
      
      Looking at the hardware itself:
      
      - no noticeable notches in the weel
      - low-res: 18 events per 360deg rotation (click angle 20 deg)
      - high-res: 72 events per 360deg → matches multiplier of 4
      
      - I can feel the notches during wheel turns
      - low-res: 24 events per 360 deg rotation (click angle 15 deg)
        - horiz wheel is tilt-based, continuous output value 1
      - high-res: 24 events per 360deg with value 12 → matches multiplier of 12
        - horiz wheel output rate doubles/triples?, values is 3
      
      - It's a touch strip, not a wheel so no notches
      - high-res: events have value 4 instead of 1
        a bit strange given that it doesn't actually have notches.
      
      Ok, why is this an issue for the current API? First, because the logitech
      multiplier used in Harry's patches looks suspiciously like the Resolution
      Multiplier so I think we should assume it's the same thing. Nestor, can you
      shed some light on that?
      
      - `REL_WHEEL` is defined as the number of notches, emulated where needed.
      - `REL_WHEEL_HI_RES` is the movement of the user's finger in microns.
      - `WM_MOUSEWHEEL` (Windows) is is a multiple of 120, defined as "the threshold
        for action to be taken and one such action"
        https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousewheel
      
      If the multiplier is set to M, this means we need an accumulated value of M
      until we can claim there was a wheel click. So after enabling the multiplier
      and setting it to the maximum (like Windows):
      - M units are 15deg rotation → 1 unit is 2620/M micron (see below). This is
        the `REL_WHEEL_HI_RES` value.
        - wheel diameter 20mm: 15 deg rotation is 2.62mm, 2620 micron (pi * 20mm /
          (360deg/15deg))
      - For every M units accumulated, send one `REL_WHEEL` event
      
      The problem here is that we've now hardcoded 20mm/15 deg into the kernel and
      we have no way of getting the size of the wheel or the click angle into the
      kernel.
      
      In userspace we now have to undo the kernel's calculation. If our click angle
      is e.g. 20 degree we have to undo the (lossy) calculation from the kernel and
      calculate the correct angle instead. This also means the 15 is a hardcoded
      option forever and cannot be changed.
      
      In hid-logitech-hidpp.c, the microns per unit is hardcoded per device.
      Harry, did you measure those by hand? We'd need to update the kernel for
      every device and there are 10 years worth of devices from MS alone.
      
      The multiplier default is 8 which is in the right ballpark, so I'm pretty
      sure this is the same as the Resolution Multiplier, just in HID++ lingo. And
      given that the 120 magic factor is what Windows uses in the end, I can't
      imagine Logitech rolling their own thing here. Nestor?
      
      And we're already fairly inaccurate with the microns anyway. The MX Anywhere
      2S has a click angle of 20 degrees (18 stops) and a 17mm wheel, so a wheel
      notch is approximately 2.67mm, one event at multiplier 8 (1/8 of a notch)
      would be 334 micron. That's only 80% of the fallback value of 406 in the
      kernel. Multiplier 6 gives us 445micron (10% off). I'm assuming multiplier 7
      doesn't exist because it's not a factor of 120.
      
      Summary:
      
      Best option may be to simply do what Windows is doing, all the HW manufacturers
      have to use that approach after all. Switch `REL_WHEEL_HI_RES` to report in
      fractions of 120, with 120 being one notch and divide that by the multiplier
      for the actual events. So e.g. the Logitech multiplier 8 would send value 15
      for each event in hi-res mode. This can be converted in userspace to
      whatever userspace needs (combined with a hwdb there that tells you wheel
      size/click angle/...).
      
      Conflicts:
      	include/uapi/linux/input-event-codes.h -> I kept the new
               reserved event in the code, so I had to adapt the revert
               slightly
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      ffe0e7cf
    • Benjamin Tissoires's avatar
      Revert "HID: input: Create a utility class for counting scroll events" · f1539a0c
      Benjamin Tissoires authored
      This reverts commit 1ff2e1a4.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      f1539a0c
    • Benjamin Tissoires's avatar
      Revert "HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration"" · 00acc9e2
      Benjamin Tissoires authored
      This reverts commit 051dc9b0.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      00acc9e2
    • Benjamin Tissoires's avatar
      Revert "HID: logitech: Enable high-resolution scrolling on Logitech mice" · 5372fc37
      Benjamin Tissoires authored
      This reverts commit d56ca985.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      5372fc37
    • Benjamin Tissoires's avatar
      Revert "HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice" · a69616d5
      Benjamin Tissoires authored
      This reverts commit 3fe1d6bb.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      a69616d5
    • Benjamin Tissoires's avatar
      Revert "HID: logitech: fix a used uninitialized GCC warning" · d0341efe
      Benjamin Tissoires authored
      This reverts commit 5fe2ccbe.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      d0341efe
    • Benjamin Tissoires's avatar
      Revert "HID: input: simplify/fix high-res scroll event handling" · e2b95b27
      Benjamin Tissoires authored
      This reverts commit 044ee890.
      
      It turns out the current API is not that compatible with
      some Microsoft mice, so better start again from scratch.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: default avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      e2b95b27
  2. 20 Nov, 2018 1 commit
  3. 19 Nov, 2018 5 commits
    • Kai-Heng Feng's avatar
      HID: i2c-hid: Disable runtime PM for LG touchscreen · 86c31524
      Kai-Heng Feng authored
      LG touchscreen (1fd2:8001) stops working after reboot:
      [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device.
      
      The device in question stops working after receives SLEEP, ON, SLEEP
      commands in a short period. The scenario is like this:
      - Once the desktop session closes, it also closed the hid device, so the
      device gets runtime suspended and receives a SLEEP command.
      - Before calling shutdown callback, it gets runtime resumed and received
      an ON command.
      - In the shutdown callback, it receives another SLEEP command.
      
      I failed to find a reliable interval between ON/SLEEP commands that can
      make it work, so let's simply disable runtime PM for the device.
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      86c31524
    • Kai-Heng Feng's avatar
      HID: multitouch: Add pointstick support for Cirque Touchpad · 12d43aac
      Kai-Heng Feng authored
      Cirque Touchpad/Pointstick combo is similar to Alps devices, it requires
      MT_CLS_WIN_8_DUAL to expose its pointstick as a mouse.
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      12d43aac
    • Rodrigo Rivas Costa's avatar
      HID: steam: remove input device when a hid client is running. · 385a4886
      Rodrigo Rivas Costa authored
      Previously, when a HID client such as the Steam Client was running, this
      driver disabled its input device to avoid doubling the input events.
      
      While it worked mostly fine, some games got confused by the idle gamepad,
      and switched to two player mode, or asked the user to choose which gamepad
      to use. Other games just crashed, probably a bug in Unity [1].
      
      With this commit, when a HID client starts, the input device is removed;
      when the HID client ends the input device is recreated.
      
      [1]: https://github.com/ValveSoftware/steam-for-linux/issues/5645Signed-off-by: default avatarRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      385a4886
    • David Herrmann's avatar
      Revert "HID: uhid: use strlcpy() instead of strncpy()" · 4d26d1d1
      David Herrmann authored
      This reverts commit 336fd4f5.
      
      Please note that `strlcpy()` does *NOT* do what you think it does.
      strlcpy() *ALWAYS* reads the full input string, regardless of the
      'length' parameter. That is, if the input is not zero-terminated,
      strlcpy() will *READ* beyond input boundaries. It does this, because it
      always returns the size it *would* copy if the target was big enough,
      not the truncated size it actually copied.
      
      The original code was perfectly fine. The hid device is
      zero-initialized and the strncpy() functions copied up to n-1
      characters. The result is always zero-terminated this way.
      
      This is the third time someone tried to replace strncpy with strlcpy in
      this function, and gets it wrong. I now added a comment that should at
      least make people reconsider.
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      4d26d1d1
    • Eric Biggers's avatar
      HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges · 8c01db76
      Eric Biggers authored
      When a UHID_CREATE command is written to the uhid char device, a
      copy_from_user() is done from a user pointer embedded in the command.
      When the address limit is KERNEL_DS, e.g. as is the case during
      sys_sendfile(), this can read from kernel memory.  Alternatively,
      information can be leaked from a setuid binary that is tricked to write
      to the file descriptor.  Therefore, forbid UHID_CREATE in these cases.
      
      No other commands in uhid_char_write() are affected by this bug and
      UHID_CREATE is marked as "obsolete", so apply the restriction to
      UHID_CREATE only rather than to uhid_char_write() entirely.
      
      Thanks to Dmitry Vyukov for adding uhid definitions to syzkaller and to
      Jann Horn for commit 9da3f2b7 ("x86/fault: BUG() when uaccess
      helpers fault on kernel addresses"), allowing this bug to be found.
      
      Reported-by: syzbot+72473edc9bf4eb1c6556@syzkaller.appspotmail.com
      Fixes: d365c6cf ("HID: uhid: add UHID_CREATE and UHID_DESTROY events")
      Cc: <stable@vger.kernel.org> # v3.6+
      Cc: Jann Horn <jannh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Reviewed-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      8c01db76
  4. 12 Nov, 2018 1 commit
  5. 08 Nov, 2018 1 commit
  6. 06 Nov, 2018 3 commits
    • Linus Walleij's avatar
      HID: fix up .raw_event() documentation · aa9b760c
      Linus Walleij authored
      The documentation for the .raw_event() callback says that if the
      driver return 1, there will be no further processing of the event,
      but this is not true, the actual code in hid-core.c looks like this:
      
        if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
                 ret = hdrv->raw_event(hid, report, data, size);
                 if (ret < 0)
                         goto unlock;
         }
      
         ret = hid_report_raw_event(hid, type, data, size, interrupt);
      
      The only return value that has any effect on the processing is
      a negative error.
      
      Correct this as it seems to confuse people: I found bogus code in
      the Razer out-of-tree driver attempting to return 1 here.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      aa9b760c
    • Arnd Bergmann's avatar
      HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled · 3fc202e8
      Arnd Bergmann authored
      asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI
      is disabled, or not reachable from a built-in device driver. This leads to
      a theoretical evaluation of an uninitialized variable that the compiler
      complains about, failing to check that the hardcoded return value makes
      this an unreachable code path:
      
      In file included from include/linux/printk.h:336,
                       from include/linux/kernel.h:14,
                       from include/linux/list.h:9,
                       from include/linux/dmi.h:5,
                       from drivers/hid/hid-asus.c:29:
      drivers/hid/hid-asus.c: In function 'asus_input_configured':
      include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         __dynamic_dev_dbg(&descriptor, dev, fmt, \
         ^~~~~~~~~~~~~~~~~
      drivers/hid/hid-asus.c:359:6: note: 'value' was declared here
        u32 value;
            ^~~~~
      
      With an extra IS_ENABLED() check, the warning goes away.
      
      Fixes: 3b692c55 ("HID: asus: only support backlight when it's not driven by WMI")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      3fc202e8
    • Jiri Kosina's avatar
      Merge branch 'master' into for-4.20/upstream-fixes · 0c724420
      Jiri Kosina authored
      Pull in a merge commit that brought in 3b692c55 ("HID: asus: only
      support backlight when it's not driven by WMI") so that fixup could be
      applied on top of it.
      0c724420
  7. 01 Nov, 2018 1 commit
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86 · eb7046e9
      Linus Torvalds authored
      Pull x86 platform driver updates from Darren Hart:
      
       - Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86
         as they are closely coupled with other drivers in this location.
      
       - Improve _init* usage for acerhdf and fix some usage issues with
         messages and module parameters.
      
       - Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating
         workqueue overhead, eliminate double reporting of keyboard backlight.
      
       - Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio).
      
       - Notify intel_telemetry users when IPC1 device is not enabled.
      
       - Update various drivers with new laptop model IDs.
      
       - Update several intel drivers to use SPDX identifers and order headers
         alphabetically.
      
      * tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits)
        HID: asus: only support backlight when it's not driven by WMI
        platform/x86: asus-wmi: export function for evaluating WMI methods
        platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed
        platform/x86: wmi: declare device_type structure as constant
        platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill
        platform/x86: Add Intel AtomISP2 dummy / power-management driver
        platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models
        platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet
        platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet
        platform/x86: intel_telemetry: Get rid of custom macro
        platform/x86: intel_telemetry: report debugfs failure
        MAINTAINERS: intel_telemetry: Update maintainers info
        platform/x86: Add LG Gram laptop special features driver
        platform/x86: asus-wmi: Simplify the keyboard brightness updating process
        platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible
        platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items
        MAINTAINERS: intel_pmc_core: Update MAINTAINERS
        firmware: dcdbas: include linux/io.h
        platform/x86: intel-wmi-thunderbolt: Add dynamic debugging
        platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier
        ...
      eb7046e9
  8. 31 Oct, 2018 21 commits
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v4.20' of... · 5b744981
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform
      
      Pull chrome-platform updates from Benson Leung:
      
       - Move mfd/cros_ec_lpc* includes to drivers/platform from mfd
      
       - Adding a new interrupt path for cros_ec_lpc
      
      * tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
        platform/chrome: chromeos_tbmc - Remove unneeded const
        platform/chrome: Add a new interrupt path for cros_ec_lpc
        mfd: cros_ec: Fix and improve kerneldoc comments.
        platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform.
      5b744981
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-4.20-mw2' of... · 3dca04d6
      Linus Torvalds authored
      Merge tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
      
      Pull more RISC-V updates from Palmer Dabbelt:
       "This contains the follow-on patches I'd like to target for the 4.20
        merge window. I'm being somewhat conservative here, as while there are
        a few patches on the mailing list that were posted early in the merge
        window I'd like to let those bake for another round -- this was a
        fairly big release as far as RISC-V is concerened, and we need to walk
        before we can run.
      
        As far as the patches that made it go:
      
         - A patch to ignore offline CPUs when calculating AT_HWCAP. This
           should fix GDB on the HiFive unleashed, which has an embedded core
           for hart 0 which is exposed to Linux as an offline CPU.
      
         - A move of EM_RISCV to elf-em.h, which is where it should have been
           to begin with.
      
         - I've also removed the 64-bit divide routines. I know I'm not really
           playing by my own rules here because I posted the patches this
           morning, but since they shouldn't be in the kernel I think it's
           better to err on the side of going too fast here.
      
        I don't anticipate any more patch sets for the merge window"
      
      * tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
        Move EM_RISCV into elf-em.h
        RISC-V: properly determine hardware caps
        Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines"
        Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32"
      3dca04d6
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 9bb9d4fd
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - removal of old and dead code
      
       - a bug fix for our tty driver
      
       - other minor cleanups across the code base
      
      * 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Make line/tty semantics use true write IRQ
        um: trap: fix spelling mistake, EACCESS -> EACCES
        um: Don't hardcode path as it is architecture dependent
        um: NULL check before kfree is not needed
        um: remove unused AIO code
        um: Give start_idle_thread() a return code
        um: Remove update_debugregs()
        um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP
      9bb9d4fd
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming · adb6b2b2
      Linus Torvalds authored
      Pull c6x update from Mark Salter.
      
      * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
        c6x: switch to NO_BOOTMEM
      adb6b2b2
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 9b5cf826
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
       "As well as the usual bug fixes, this adds the following new features:
      
         - cached readdir and readlink
      
         - max I/O size increased from 128k to 1M
      
         - improved performance and scalability of request queues
      
         - copy_file_range support
      
        The only non-fuse bits are trivial cleanups of macros in
        <linux/bitops.h>"
      
      * tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (31 commits)
        fuse: enable caching of symlinks
        fuse: only invalidate atime in direct read
        fuse: don't need GETATTR after every READ
        fuse: allow fine grained attr cache invaldation
        bitops: protect variables in bit_clear_unless() macro
        bitops: protect variables in set_mask_bits() macro
        fuse: realloc page array
        fuse: add max_pages to init_out
        fuse: allocate page array more efficiently
        fuse: reduce size of struct fuse_inode
        fuse: use iversion for readdir cache verification
        fuse: use mtime for readdir cache verification
        fuse: add readdir cache version
        fuse: allow using readdir cache
        fuse: allow caching readdir
        fuse: extract fuse_emit() helper
        fuse: add FOPEN_CACHE_DIR
        fuse: split out readdir.c
        fuse: Use hash table to link processing request
        fuse: kill req->intr_unique
        ...
      9b5cf826
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client · 31990f0f
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The highlights are:
      
         - a series that fixes some old memory allocation issues in libceph
           (myself). We no longer allocate memory in places where allocation
           failures cannot be handled and BUG when the allocation fails.
      
         - support for copy_file_range() syscall (Luis Henriques). If size and
           alignment conditions are met, it leverages RADOS copy-from
           operation. Otherwise, a local copy is performed.
      
         - a patch that reduces memory requirement of ceph_sync_read() from
           the size of the entire read to the size of one object (Zheng Yan).
      
         - fallocate() syscall is now restricted to FALLOC_FL_PUNCH_HOLE (Luis
           Henriques)"
      
      * tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client: (25 commits)
        ceph: new mount option to disable usage of copy-from op
        ceph: support copy_file_range file operation
        libceph: support the RADOS copy-from operation
        ceph: add non-blocking parameter to ceph_try_get_caps()
        libceph: check reply num_data_items in setup_request_data()
        libceph: preallocate message data items
        libceph, rbd, ceph: move ceph_osdc_alloc_messages() calls
        libceph: introduce alloc_watch_request()
        libceph: assign cookies in linger_submit()
        libceph: enable fallback to ceph_msg_new() in ceph_msgpool_get()
        ceph: num_ops is off by one in ceph_aio_retry_work()
        libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op()
        ceph: set timeout conditionally in __cap_delay_requeue
        libceph: don't consume a ref on pagelist in ceph_msg_data_add_pagelist()
        libceph: introduce ceph_pagelist_alloc()
        libceph: osd_req_op_cls_init() doesn't need to take opcode
        libceph: bump CEPH_MSG_MAX_DATA_LEN
        ceph: only allow punch hole mode in fallocate
        ceph: refactor ceph_sync_read()
        ceph: check if LOOKUPNAME request was aborted when filling trace
        ...
      31990f0f
    • Palmer Dabbelt's avatar
      lib: Remove umoddi3 and udivmoddi4 · ef70696a
      Palmer Dabbelt authored
      These were only necessary for an out-of-tree driver that has since been
      fixed to use the proper divide routines.  I've simply reverted the pair
      of commits we made last week.
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      ef70696a
    • Palmer Dabbelt's avatar
      Move EM_RISCV into elf-em.h · 9b4789ea
      Palmer Dabbelt authored
      This should never have been inside our arch port to begin with, it's
      just a relic from when we were maintaining out of tree patches.
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Tested-by: default avatarDavid Abdurachmanov <david.abdurachmanov@gmail.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      9b4789ea
    • Andreas Schwab's avatar
      RISC-V: properly determine hardware caps · 732e8e41
      Andreas Schwab authored
      On the Hifive-U platform, cpu 0 is a masked cpu with less capabilities
      than the other cpus.  Ignore it for the purpose of determining the
      hardware capabilities of the system.
      Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      732e8e41
    • Palmer Dabbelt's avatar
      Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines" · 0ef08ca3
      Palmer Dabbelt authored
      We don't want 64-bit divide in the kernel.
      
      This reverts commit 6315730e.
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      0ef08ca3
    • Palmer Dabbelt's avatar
      Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32" · 3b306f6f
      Palmer Dabbelt authored
      I'm removing the generic 64-bit divide support, which means this will no
      longer work.
      
      This reverts commit 757331db.
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      3b306f6f
    • Linus Torvalds's avatar
      Merge tag 'fbdev-v4.20' of https://github.com/bzolnier/linux · a9ac6cc4
      Linus Torvalds authored
      Pull fbdev updates from Bartlomiej Zolnierkiewicz:
       "No major changes to the subsystem itself, mainly fb drivers fixes &
        cleanups (atyfb & udlfb updates stand out from the rest) + removal of
        no longer needed old clps711xfb driver.
      
        Details:
      
         - update atyfb driver - improvements for ATI Mach64 chips: detect the
           dot clock divider correctly on Sparc, fix display corruptions (due
           to endianness issues and improper reading of accelerator
           registers), optimize scrolling performance and also fix debugging
           printks (Mikulas Patocka)
      
         - rewrite USB unplug handling in udlfb driver using framebuffer
           subsystem reference counting (Mikulas Patocka)
      
         - fix support for native-mode display-timings in atmel_lcdfb driver
           (Sam Ravnborg)
      
         - fix information leak & add missing access_ok() checks in sbuslib
           (Dan Carpenter)
      
         - allow using GPIO expanders that can sleep in ssd1307fb driver
           (Michal Vokáč)
      
         - convert omapfb driver to use GPIO descriptors instead of GPIO
           numbers for Amstrad Delta board (Janusz Krzysztofik)
      
         - fix broken Kconfig menu dependencies (Randy Dunlap)
      
         - convert fbdev subsystem to use %pOFn instead of device_node.name
           (Rob Herring)
      
         - remove the dead old CLPS711x LCD support driver (the new CLPS711x
           LCD support driver is still available)
      
         - misc fixes (Jia-Ju Bai, Gustavo A. R. Silva)
      
         - misc cleanups (Mehdi Bounya, Nathan Chancellor, YueHaibing)"
      
      * tag 'fbdev-v4.20' of https://github.com/bzolnier/linux: (22 commits)
        video: fbdev: remove redundant 'default n' from Kconfig-s
        video: fbdev: remove dead old CLPS711x LCD support driver
        Revert "video: ssd1307fb: Do not hard code active-low reset sequence"
        video: fbdev: arcfb: mark expected switch fall-through
        pxa168fb: remove set but not used variables 'mi'
        video: ssd1307fb: Do not hard code active-low reset sequence
        video: ssd1307fb: Use gpiod_set_value_cansleep() for reset
        fbdev: fix broken menu dependencies
        video: fbdev: sis: Remove unnecessary parentheses and commented code
        video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table
        fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
        fbdev: sbuslib: use checked version of put_user()
        fbdev: Convert to using %pOFn instead of device_node.name
        atmel_lcdfb: support native-mode display-timings
        Video: vgastate: fixed a spacing coding style
        atyfb: fix debugging printks
        mach64: optimize wait_for_fifo
        mach64: fix image corruption due to reading accelerator registers
        mach64: fix display corruption on big endian machines
        mach64: detect the dot clock divider correctly on sparc
        ...
      a9ac6cc4
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · d547d44e
      Linus Torvalds authored
      Pull thermal management updates from Zhang Rui:
      
       - Fix a use-after-free issue when unregistering a thermal cooling
         device (Dmitry Osipenko)
      
       - use power_efficient_wq for thermal worker to save more power (Jeson
         Gao)
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal: core: using power_efficient_wq for thermal worker
        thermal: core: Fix use-after-free in thermal_cooling_device_destroy_sysfs
      d547d44e
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 519f64bf
      Linus Torvalds authored
      Pull clk updates from Stephen Boyd:
       "This time it looks like a quieter release cycle in the clk tree. I
        guess that's because of summer time holidays/vacations. The biggest
        change in the diffstat is in the Qualcomm clk driver, where they got
        support for CPUs and handful of SoCs. After that, the at91 driver got
        a major rewrite for newer DT bindings that should make things easier
        going forward and the TI code moved to a clockdomain based design.
      
        The long tail is mostly small driver updates for newer clks and some
        simpler SoC clock drivers such as the Hisilicon and imx support.
      
        In the core framework, we only have two small changes this time.
      
        One is a new clk API to get all clks for a device with the bulk clk
        APIs. This allows drivers that don't care about doing anything besides
        turning on all the clks to just clk_get() them all and turn them on.
      
        The other change is the beginning of a way to support save and restore
        of clk settings in the clk framework. TI is the only user right now,
        but we will want to expand upon this design in the future to support
        more save and restore of clk registers. At least this gets us started
        and works well enough for one SoC, but there's more work in the
        future.
      
        Core:
         - clk_bulk_get_all() API and friends to get all the clks for a device
         - Basic clk state save/restore hooks
      
        New Drivers:
         - Renesas RZ/A2 (R7S9210) SoC, including early clocks
         - Rensas RZ/G1N (R8A7744) and RZ/G2E (R8A774C0) SoCs
         - Rensas RZ/G2M (r8a774a1) SoC
         - Qualcomm Krait CPU clk support
         - Qualcomm QCS404 GCC support
         - Qualcomm SDM660 GCC support
         - Qualcomm SDM845 camera clock controller
         - Ingenic jz4725b CGU
         - Hisilicon 3670 SoC support
         - TI SCI clks on K3 SoCs
         - iMX6 MMDC clks
         - Reset Controller (RMU) support for Actions Semi Owl S900 and S700 SoCs
      
        Updates:
         - Rework at91 PMC clock driver for new DT bindings
         - Nvidia Tegra clk driver MBIST workaround fix
         - S2RAM support for Marvell mvebu periph clks
         - Use updated printk format for OF node names
         - Fix TI code to only search DT subnodes
         - Various static analysis finds
         - Tag various drivers with SPDX license tags
         - Support dynamic frequency switching (DFS) on qcom SDM845 GCC
         - Only use s2mps11 dt-binding defines instead of redefining them in the driver
         - Add some more missing clks to qcom MSM8996 GCC
         - Quad SPI clks on qcom SDM845
         - Add support for CMT timer clocks on R-Car V3H
         - Add support for SHDI and various timer clocks on R-Car V3M
         - Improve OSC and RCLK (watchdog) handling on R-Car Gen3 SoCs
         - Amlogic clk-pll driver improvements and updates
         - Amlogic axg audio controller system clocks
         - Register Amlogic meson8b clock controller early
         - Add support for SATA and Fine Display Processor (FDP) clocks on R-Car M3-N
         - Consolidation of system suspend related code in Exynos, S5P, S3C SoC clk drivers
         - Fixes for system suspend support on Exynos542x (Odroid boards) and Exynos5433 SoC
         - Remove obsoleted Exynos4212 ISP clock definitions
         - Migrated TI am3/4/5 and dra7 SoCs to clockdomain based design
         - TI RTC+DDR sleep mode support for clock save/restore
         - Allwinner A64 display engine support and fixes
         - Allwinner A83t display engine support and fixes"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (186 commits)
        clk: qcom: Remove unused arrays in SDM845 GCC
        clk: fixed-rate: fix of_node_get-put imbalance
        clk: s2mps11: Add used attribute to s2mps11_dt_match
        clk: qcom: gcc-sdm660: Add MODULE_LICENSE
        clk: qcom: Add safe switch hook for krait mux clocks
        dt-bindings: clock: Document qcom,krait-cc
        clk: qcom: Add Krait clock controller driver
        dt-bindings: arm: Document qcom,kpss-gcc
        clk: qcom: Add KPSS ACC/GCC driver
        clk: qcom: Add support for Krait clocks
        clk: qcom: Add IPQ806X's HFPLLs
        clk: qcom: Add MSM8960/APQ8064's HFPLLs
        dt-bindings: clock: Document qcom,hfpll
        clk: qcom: Add HFPLL driver
        clk: qcom: Add support for High-Frequency PLLs (HFPLLs)
        ARM: Add Krait L2 register accessor functions
        clk: imx6q: add mmdc0 ipg clock
        clk: imx6sl: add mmdc ipg clocks
        clk: imx6sll: add mmdc1 ipg clock
        clk: imx6sx: add mmdc1 ipg clock
        ...
      519f64bf
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.20-rc1.v2' of git://github.com/awilliam/linux-vfio · 0c86e761
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - EDID interfaces for vfio devices supporting display extensions (Gerd
         Hoffmann)
      
       - Generically select Type-1 IOMMU model support on ARM/ARM64 (Geert
         Uytterhoeven)
      
       - Quirk for VFs reporting INTx pin (Alex Williamson)
      
       - Fix error path memory leak in MSI support (Li Qiang)
      
      * tag 'vfio-v4.20-rc1.v2' of git://github.com/awilliam/linux-vfio:
        vfio: add edid support to mbochs sample driver
        vfio: add edid api for display (vgpu) devices.
        drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs
        vfio/pci: Mask buggy SR-IOV VF INTx support
        vfio/pci: Fix potential memory leak in vfio_msi_cap_len
      0c86e761
    • Linus Torvalds's avatar
      Merge tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · b3491d84
      Linus Torvalds authored
      Pull new experimental media request API from Mauro Carvalho Chehab:
       "A new media request API
      
        This API is needed to support device drivers that can dynamically
        change their parameters for each new frame. The latest versions of
        Google camera and codec HAL depends on such feature.
      
        At this stage, it supports only stateless codecs.
      
        It has been discussed for a long time (at least over the last 3-4
        years), and we finally reached to something that seem to work.
      
        This series contain both the API and core changes required to support
        it and a new m2m decoder driver (cedrus).
      
        As the current API is still experimental, the only real driver using
        it (cedrus) was added at staging[1]. We intend to keep it there for a
        while, in order to test the API. Only when we're sure that this API
        works for other cases (like encoders), we'll move this driver out of
        staging and set the API into a stone.
      
        [1] We added support for the vivid virtual driver (used only for
        testing) to it too, as it makes easier to test the API for the ones
        that don't have the cedrus hardware"
      
      * tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (53 commits)
        media: dt-bindings: Document the Rockchip VPU bindings
        media: platform: Add Cedrus VPU decoder driver
        media: dt-bindings: media: Document bindings for the Cedrus VPU driver
        media: v4l: Add definition for the Sunxi tiled NV12 format
        media: v4l: Add definitions for MPEG-2 slice format and metadata
        media: videobuf2-core: Rework and rename helper for request buffer count
        media: v4l2-ctrls.c: initialize an error return code with zero
        media: v4l2-compat-ioctl32.c: add missing documentation for a field
        media: media-request: update documentation
        media: media-request: EPERM -> EACCES/EBUSY
        media: v4l2-ctrls: improve media_request_(un)lock_for_update
        media: v4l2-ctrls: use media_request_(un)lock_for_access
        media: media-request: add media_request_(un)lock_for_access
        media: vb2: set reqbufs/create_bufs capabilities
        media: videodev2.h: add new capabilities for buffer types
        media: buffer.rst: only set V4L2_BUF_FLAG_REQUEST_FD for QBUF
        media: v4l2-ctrls: return -EACCES if request wasn't completed
        media: media-request: return -EINVAL for invalid request_fds
        media: vivid: add request support
        media: vivid: add mc
        ...
      b3491d84
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 59fc453b
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
      
       - the rest of MM
      
       - lib/bitmap updates
      
       - hfs updates
      
       - fatfs updates
      
       - various other misc things
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (94 commits)
        mm/gup.c: fix __get_user_pages_fast() comment
        mm: Fix warning in insert_pfn()
        memory-hotplug.rst: add some details about locking internals
        powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages()
        powerpc/powernv: hold device_hotplug_lock when calling device_online()
        mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock
        mm/memory_hotplug: make add_memory() take the device_hotplug_lock
        mm/memory_hotplug: make remove_memory() take the device_hotplug_lock
        mm/memblock.c: warn if zero alignment was requested
        memblock: stop using implicit alignment to SMP_CACHE_BYTES
        docs/boot-time-mm: remove bootmem documentation
        mm: remove include/linux/bootmem.h
        memblock: replace BOOTMEM_ALLOC_* with MEMBLOCK variants
        mm: remove nobootmem
        memblock: rename __free_pages_bootmem to memblock_free_pages
        memblock: rename free_all_bootmem to memblock_free_all
        memblock: replace free_bootmem_late with memblock_free_late
        memblock: replace free_bootmem{_node} with memblock_free
        mm: nobootmem: remove bootmem allocation APIs
        memblock: replace alloc_bootmem with memblock_alloc
        ...
      59fc453b
    • Fengguang Wu's avatar
      mm/gup.c: fix __get_user_pages_fast() comment · 2ebe8228
      Fengguang Wu authored
      mmu_gather_tlb() no longer exists.  Replace with mmu_table_batch().
      
      Link: http://lkml.kernel.org/r/20180928053441.rpzwafzlsnp74mkl@wfg-t540p.sh.intel.comSigned-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Jiri Kosina <trivial@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2ebe8228
    • Jan Kara's avatar
      mm: Fix warning in insert_pfn() · f2c57d91
      Jan Kara authored
      In DAX mode a write pagefault can race with write(2) in the following
      way:
      
      CPU0                            CPU1
                                      write fault for mapped zero page (hole)
      dax_iomap_rw()
        iomap_apply()
          xfs_file_iomap_begin()
            - allocates blocks
          dax_iomap_actor()
            invalidate_inode_pages2_range()
              - invalidates radix tree entries in given range
                                      dax_iomap_pte_fault()
                                        grab_mapping_entry()
                                          - no entry found, creates empty
                                        ...
                                        xfs_file_iomap_begin()
                                          - finds already allocated block
                                        ...
                                        vmf_insert_mixed_mkwrite()
                                          - WARNs and does nothing because there
                                            is still zero page mapped in PTE
              unmap_mapping_pages()
      
      This race results in WARN_ON from insert_pfn() and is occasionally
      triggered by fstest generic/344. Note that the race is otherwise
      harmless as before write(2) on CPU0 is finished, we will invalidate page
      tables properly and thus user of mmap will see modified data from
      write(2) from that point on. So just restrict the warning only to the
      case when the PFN in PTE is not zero page.
      
      Link: http://lkml.kernel.org/r/20180824154542.26872-1-jack@suse.czSigned-off-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2c57d91
    • David Hildenbrand's avatar
      memory-hotplug.rst: add some details about locking internals · dee6da22
      David Hildenbrand authored
      Let's document the magic a bit, especially why device_hotplug_lock is
      required when adding/removing memory and how it all play together with
      requests to online/offline memory from user space.
      
      Link: http://lkml.kernel.org/r/20180925091457.28651-7-david@redhat.comSigned-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarPavel Tatashin <pavel.tatashin@microsoft.com>
      Reviewed-by: default avatarRashmica Gupta <rashmica.g@gmail.com>
      Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Balbir Singh <bsingharora@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: John Allen <jallen@linux.vnet.ibm.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dee6da22
    • David Hildenbrand's avatar
      powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages() · 56668487
      David Hildenbrand authored
      Let's perform all checking + offlining + removing under
      device_hotplug_lock, so nobody can mess with these devices via sysfs
      concurrently.
      
      [david@redhat.com: take device_hotplug_lock outside of loop]
        Link: http://lkml.kernel.org/r/20180927092554.13567-6-david@redhat.com
      Link: http://lkml.kernel.org/r/20180925091457.28651-6-david@redhat.comSigned-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarPavel Tatashin <pavel.tatashin@microsoft.com>
      Reviewed-by: default avatarRashmica Gupta <rashmica.g@gmail.com>
      Acked-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Rashmica Gupta <rashmica.g@gmail.com>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: John Allen <jallen@linux.vnet.ibm.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      56668487