1. 03 Jan, 2019 1 commit
  2. 18 Dec, 2018 1 commit
  3. 17 Dec, 2018 1 commit
  4. 07 Dec, 2018 2 commits
  5. 30 Nov, 2018 1 commit
    • Hans de Goede's avatar
      HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk · 40502074
      Hans de Goede authored
      The 258a:6a88 keyboard-dock shipped with the Prowise PT301 tablet is
      likely another ITE based design. The controller die is directly bonded
      to the PCB with a blob of black glue on top so there are no markings and
      the 258a vendor-id used is unknown anywhere. But the keyboard has the
      exact same hotkeys mapped to Fn+F1 - F10 as the other ITE8595 keyboard
      I have *and* it has the same quirky behavior wrt the rfkill hotkey.
      
      Either way as said this keyboard has the same quirk for its rfkill /
      airplane mode hotkey as the ITE 8595 chip, it only sends a single release
      event when pressed and released, it never sends a press event.
      
      This commit adds the 258a:6a88 USB id to the hid-ite id-table, fixing
      the rfkill key not working on this keyboard.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      40502074
  6. 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's 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: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: Harry Cutts's avatarHarry Cutts <hcutts@chromium.org>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      e2b95b27
  7. 20 Nov, 2018 1 commit
  8. 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 Rheinsberg's avatar
      Revert "HID: uhid: use strlcpy() instead of strncpy()" · 4d26d1d1
      David Rheinsberg 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: David Rheinsberg's 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: Jann Horn's avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      8c01db76
  9. 12 Nov, 2018 1 commit
  10. 08 Nov, 2018 1 commit
  11. 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: Linus Walleij's 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
  12. 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
  13. 31 Oct, 2018 15 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