Skip to content
Permalink
zhaoxiao/input…
Switch branches/tags

Commits on Feb 16, 2022

  1. input: da7280: Make use of the helper function dev_err_probe()

    devm_pwm_get() can return -EPROBE_DEFER if the pwm regulator is not
    ready yet. Use dev_err_probe() for pwm regulator resources
    to indicate the deferral reason when waiting for the
    resource to come up.
    
    Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
    zhaoxiao authored and intel-lab-lkp committed Feb 16, 2022
  2. Input: ps2-gpio - enforce GPIOs flag open drain

    The PS/2 bus defines the data and clock line be open drain, therefore
    for both enforce the particular GPIO flags in the driver.
    
    Without enforcing to flag at least the clock gpio as open drain we run
    into the following warning:
    
    WARNING: CPU: 1 PID: 40 at drivers/gpio/gpiolib.c:3175 gpiochip_enable_irq+0x54/0x90
    
    gpiochip_enable_irq() warns on a GPIO being configured as output while
    serving as IRQ source without being flagged as open drain.
    
    Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
    Link: https://lore.kernel.org/r/20220215180829.63543-4-danilokrummrich@dk-develop.de
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    dakr authored and dtor committed Feb 16, 2022
  3. Input: ps2-gpio - don't send rx data before the stop bit

    Sending the data before processing the stop bit from the device already
    saves the data of the current xfer in case the stop bit is missed.
    
    However, when TX xfers are enabled this introduces a race condition when
    a peripheral driver using the bus immediately requests a TX xfer from IRQ
    context.
    
    Therefore the data must be send after receiving the stop bit, although
    it is possible the data is lost when missing the stop bit.
    
    Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
    Link: https://lore.kernel.org/r/20220215160208.34826-5-danilokrummrich@dk-develop.de
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    dakr authored and dtor committed Feb 16, 2022
  4. Input: ps2-gpio - remove tx timeout from ps2_gpio_irq_tx()

    Actually, there's no extra clock pulse to wait for.
    
    The assumption of an extra clock pulse was mistakenly derived from the
    fact that by the time this driver was introduced the GPIO controller of
    the test machine (bcm2835) generated spurious interrupts.
    
    Since now spurious interrupts are handled properly this can and must be
    removed in order to make TX xfers work properly.
    
    While at it, remove duplicate gpiod_direction_input(). The data gpio
    must already be configured to act as input when receiving the ACK bit.
    
    This patch is tested with the original hardware (peripherals and board)
    the driver was developed on.
    
    Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
    Link: https://lore.kernel.org/r/20220215160208.34826-4-danilokrummrich@dk-develop.de
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    dakr authored and dtor committed Feb 16, 2022
  5. Input: ps2-gpio - use ktime for IRQ timekeeping

    Using jiffies for the IRQ timekeeping is not sufficient for two reasons:
    
    (1) Usually jiffies have a resolution of 1ms to 10ms. The IRQ intervals
        based on the clock frequency of PS2 protocol specification (10kHz -
        16.7kHz) are between ~60us and 100us only. Therefore only those IRQ
        intervals can be detected which are either at the end of a transfer
        or are overly delayed. While this is sufficient in most cases, since
        we have quite a lot of ways to detect faulty transfers, it can
        produce false positives in rare cases: When the jiffies value
        changes right between two interrupt that are in time, we wrongly
        assume that we missed one or more clock cycles.
    
    (2) Some gpio controllers (e.g. the one in the bcm283x chips) may generate
        spurious IRQs when processing interrupts in the frequency given by PS2
        devices.
    
    Both issues can be fixed by using ktime resolution for IRQ timekeeping.
    
    However, it is still possible to miss clock cycles without detecting
    them. When the PS2 device generates the falling edge of the clock signal
    we have between ~30us and 50us to sample the data line, because after
    this time we reach the next rising edge at which the device changes the
    data signal already. But, the only thing we can detect is whether the
    IRQ interval is within the given period. Therefore it is possible to
    have an IRQ latency greater than ~30us to 50us, sample the wrong bit on
    the data line and still be on time with the next IRQ. However, this can
    only happen when within a given transfer the IRQ latency increases
    slowly.
    
    ___            ______            ______            ______            ___
       \          /      \          /      \          /      \          /
        \        /        \        /        \        /        \        /
         \______/          \______/          \______/          \______/
    
        |-----------------|                 |--------|
             60us/100us                      30us/50us
    
    Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
    Link: https://lore.kernel.org/r/20220215160208.34826-3-danilokrummrich@dk-develop.de
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    dakr authored and dtor committed Feb 16, 2022
  6. Input: ps2-gpio - refactor struct ps2_gpio_data

    Refactor struct ps2_gpio_data in order to clearly separate RX and TX
    state data.
    
    This change intends to increase code readability and does not bring any
    functional change.
    
    Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
    Link: https://lore.kernel.org/r/20220215160208.34826-2-danilokrummrich@dk-develop.de
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    dakr authored and dtor committed Feb 16, 2022

Commits on Feb 8, 2022

  1. Input: mtk-pmic-keys - add support for MT6358

    MT6358 pmic keys behave differently than mt6397 and mt6323: there are
    two interrupts per key: one for press, the other one for release (_r)
    
    Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
    Link: https://lore.kernel.org/r/20220121140323.4080640-4-mkorpershoek@baylibre.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    makohoek authored and dtor committed Feb 8, 2022
  2. dt-bindings: input: mtk-pmic-keys: add MT6358 binding definition

    Add the binding documentation of the mtk-pmic-keys for the MT6358 PMICs.
    
    MT6358 is a little different since it used separate IRQs for the
    release key (_r) event
    
    Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Link: https://lore.kernel.org/r/20220121140323.4080640-3-mkorpershoek@baylibre.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    makohoek authored and dtor committed Feb 8, 2022
  3. Input: mtk-pmic-keys - use get_irq_byname() instead of index

    Some pmics of the mt6397 family (such as MT6358), have two IRQs per
    physical key: one for press event, another for release event.
    
    The mtk-pmic-keys driver assumes that each key only has one
    IRQ. The key index and the RES_IRQ resource index have a 1/1 mapping.
    
    This won't work for MT6358, as we have multiple resources (2) for one key.
    
    To prepare mtk-pmic-keys to support MT6358, retrieve IRQs by name
    instead of by index.
    
    Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
    Link: https://lore.kernel.org/r/20220121140323.4080640-2-mkorpershoek@baylibre.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    makohoek authored and dtor committed Feb 8, 2022

Commits on Jan 18, 2022

  1. Merge tag 'v5.16' into next

    Sync up with mainline to bring in the latest API changes.
    dtor committed Jan 18, 2022

Commits on Jan 10, 2022

  1. Input: ti_am335x_tsc - fix a typo in a comment

    change 'postion' to 'position'
    
    Signed-off-by: Qinghua Jin <qhjin.dev@gmail.com>
    Link: https://lore.kernel.org/r/20220106084215.355295-1-qhjin.dev@gmail.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    qhjindev authored and dtor committed Jan 10, 2022

Commits on Jan 9, 2022

  1. Linux 5.16

    torvalds committed Jan 9, 2022
  2. Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/dtor/input
    
    Pull input fix from Dmitry Torokhov:
     "A small fixup to the Zinitix touchscreen driver to avoid enabling the
      IRQ line before we successfully requested it"
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
      Input: zinitix - make sure the IRQ is allocated before it gets enabled
    torvalds committed Jan 9, 2022
  3. Merge tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/soc/soc
    
    Pull ARM SoC fix from Olof Johansson:
     "One more fix for 5.16
    
      I had missed one patch when I sent up what I thought was the last
      batch of fixes for this release. This one fixes issues on the
      Raspberry Pi platforms due to gpio init changes this release, so
      hopefully we can get it merged before final release is cut"
    
    * tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
      ARM: dts: gpio-ranges property is now required
    torvalds committed Jan 9, 2022
  4. Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel…

    ….org/pub/scm/linux/kernel/git/acme/linux
    
    Pull perf tools fixes from Arnaldo Carvalho de Melo:
    
     - Revert "libtraceevent: Increase libtraceevent logging when verbose",
       breaks the build with libtraceevent-1.3.0, i.e. when building with
       'LIBTRACEEVENT_DYNAMIC=1'.
    
     - Avoid early exit in 'perf trace' due to running SIGCHLD handler
       before it makes sense to. It can happen when using a BPF source code
       event that have to be first built into an object file.
    
    * tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
      Revert "libtraceevent: Increase libtraceevent logging when verbose"
      perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to
    torvalds committed Jan 9, 2022
  5. Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)"

    This reverts commit f7d6779.
    
    This bisected regression has impacted suspend-resume stability
    since 5.15-rc1. It regressed -stable via 5.14.10.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215315
    Fixes: f7d6779 ("drm/amdgpu: stop scheduler when calling hw_fini (v2)")
    Cc: Guchun Chen <guchun.chen@amd.com>
    Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
    Cc: Christian Koenig <christian.koenig@amd.com>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: <stable@vger.kernel.org> # 5.14+
    Signed-off-by: Len Brown <len.brown@intel.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    lenb authored and torvalds committed Jan 9, 2022
  6. Input: zinitix - add compatible for bt532

    Zinitix BT532 is another touch controller that seem to implement the
    same interface as an already supported BT541. Add it to the driver.
    
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Nikita Travkin <nikita@trvn.ru>
    Link: https://lore.kernel.org/r/20220106072840.36851-5-nikita@trvn.ru
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    TravMurav authored and dtor committed Jan 9, 2022
  7. Input: zinitix - handle proper supply names

    The supply names of the Zinitix touchscreen were a bit confused, the new
    bindings rectifies this.
    
    To deal with old and new devicetrees, first check if we have "vddo" and in
    case that exists assume the old supply names. Else go and look for the new
    ones.
    
    We cannot just get the regulators since we would get an OK and a dummy
    regulator: we need to check explicitly for the old supply name.
    
    Use struct device *dev as a local variable instead of the I2C client since
    the device is what we are actually obtaining the resources from.
    
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    [Slightly changed the legacy regulator detection]
    Signed-off-by: Nikita Travkin <nikita@trvn.ru>
    Link: https://lore.kernel.org/r/20220106072840.36851-4-nikita@trvn.ru
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    linusw authored and dtor committed Jan 9, 2022
  8. dt-bindings: input/ts/zinitix: Convert to YAML, fix and extend

    This converts the Zinitix BT4xx and BT5xx touchscreen bindings to YAML,
    fix them up a bit and extends them.
    
    We list all the existing BT4xx and BT5xx components with compatible
    strings.  These are all similar, use the same bindings and work in
    similar ways.
    
    We rename the supplies from the erroneous vdd/vddo to the actual supply
    names vcca/vdd as specified on the actual component. It is long
    established that supplies shall be named after the supply pin names of a
    component.  The confusion probably stems from that in a certain product
    the rails to the component were named vdd/vddo. Drop some notes on how OS
    implementations should avoid confusion by first looking for vddo, and if
    that exists assume the legacy binding pair and otherwise use vcca/vdd.
    
    Add reset-gpios as sometimes manufacturers pulls a GPIO line to the reset
    line on the chip.
    
    Add optional touchscreen-fuzz-x and touchscreen-fuzz-y properties.
    
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    [Fixed dt_schema_check]
    Signed-off-by: Nikita Travkin <nikita@trvn.ru>
    Link: https://lore.kernel.org/r/20220106072840.36851-3-nikita@trvn.ru
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    linusw authored and dtor committed Jan 9, 2022
  9. Input: zinitix - make sure the IRQ is allocated before it gets enabled

    Since irq request is the last thing in the driver probe, it happens
    later than the input device registration. This means that there is a
    small time window where if the open method is called the driver will
    attempt to enable not yet available irq.
    
    Fix that by moving the irq request before the input device registration.
    
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Fixes: 2682265 ("Input: add zinitix touchscreen driver")
    Signed-off-by: Nikita Travkin <nikita@trvn.ru>
    Link: https://lore.kernel.org/r/20220106072840.36851-2-nikita@trvn.ru
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    TravMurav authored and dtor committed Jan 9, 2022
  10. Input: axp20x-pek - revert "always register interrupt handlers" change

    The power button on Cherry Trail systems with an AXP288 PMIC is connected
    to both the power button pin of the PMIC as well as to a power button GPIO
    on the Cherry Trail SoC itself. This leads to double power button event
    reporting which is a problem.
    
    Since reporting power button presses through the PMIC is not supported on
    all PMICs used on Cherry Trail systems, we want to keep the GPIO
    power button events, so the axp20x-pek code checks for the presence of
    a GPIO power button and in that case does not register its input-device.
    
    On most systems the GPIO power button also can wake-up the system from
    suspend, so the axp20x-pek driver would also not register its interrupt
    handler. But on some systems there was a bug causing wakeup by the GPIO
    power button handler to not work.
    
    Commit 9747070 ("Input: axp20x-pek - always register interrupt
    handlers") was added as a work around for this registering the axp20x-pek
    interrupts, but not the input-device on Cherry Trail systems.
    
    In the mean time the root-cause of the GPIO power button wakeup events
    not working has been found and fixed by the "pinctrl: cherryview: Do not
    allow the same interrupt line to be used by 2 pins" patch,
    so this is no longer necessary.
    
    This reverts the workaround going back to only registering the
    interrupt handlers on systems where we also register the input-device.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Acked-by: Chen-Yu Tsai <wens@csie.org>
    Link: https://lore.kernel.org/r/20220106111647.66520-1-hdegoede@redhat.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    jwrdegoede authored and dtor committed Jan 9, 2022

Commits on Jan 8, 2022

  1. ARM: dts: gpio-ranges property is now required

    Since [1], added in 5.7, the absence of a gpio-ranges property has
    prevented GPIOs from being restored to inputs when released.
    Add those properties for BCM283x and BCM2711 devices.
    
    [1] commit 2ab73c6 ("gpio: Support GPIO controllers without
        pin-ranges")
    
    Link: https://lore.kernel.org/r/20220104170247.956760-1-linus.walleij@linaro.org
    Fixes: 2ab73c6 ("gpio: Support GPIO controllers without pin-ranges")
    Fixes: 266423e ("pinctrl: bcm2835: Change init order for gpio hogs")
    Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
    Reported-by: Florian Fainelli <f.fainelli@gmail.com>
    Reported-by: Jan Kiszka <jan.kiszka@web.de>
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20211206092237.4105895-3-phil@raspberrypi.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Olof Johansson <olof@lixom.net>
    pelwell authored and olofj committed Jan 8, 2022
  2. Merge tag 'soc-fixes-5.16-4' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/soc/soc
    
    Pull ARM SoC fixes from Olof Johansson:
     "A few more fixes have come in, nothing overly severe but would be good
      to get in by final release:
    
       - More specific compatible fields on the qspi controller for socfpga,
         to enable quirks in the driver
    
       - A runtime PM fix for Renesas to fix mismatched reference counts on
         errors"
    
    * tag 'soc-fixes-5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
      ARM: dts: socfpga: change qspi to "intel,socfpga-qspi"
      dt-bindings: spi: cadence-quadspi: document "intel,socfpga-qspi"
      reset: renesas: Fix Runtime PM usage
    torvalds committed Jan 8, 2022
  3. Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c fixes from Wolfram Sang:
     "Fix the regression with AMD GPU suspend by reverting the
      handling of bus regulators in the I2C core.
    
      Also, there is a fix for the MPC driver to prevent an
      out-of-bound-access"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      Revert "i2c: core: support bus regulator controlling in adapter"
      i2c: mpc: Avoid out of bounds memory access
    torvalds committed Jan 8, 2022
  4. Merge tag 'for-v5.16-rc' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/sre/linux-power-supply
    
    Pull power supply fixes from Sebastian Reichel:
     "Three fixes for the 5.16 cycle:
    
       - Avoid going beyond last capacity in the power-supply core
    
       - Replace 1E6L with NSEC_PER_MSEC to avoid floating point calculation
         in LLVM resulting in a build failure
    
       - Fix ADC measurements in bq25890 charger driver"
    
    * tag 'for-v5.16-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
      power: reset: ltc2952: Fix use of floating point literals
      power: bq25890: Enable continuous conversion for ADC at charging
      power: supply: core: Break capacity loop
    torvalds committed Jan 8, 2022
  5. Merge tag 'xfs-5.16-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/x…

    …fs-linux
    
    Pull xfs fix from Darrick Wong:
    
     - Make the old ALLOCSP ioctl behave in a consistent manner with newer
       syscalls like fallocate.
    
    * tag 'xfs-5.16-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
      xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
    torvalds committed Jan 8, 2022

Commits on Jan 7, 2022

  1. Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/tj/cgroup
    
    Pull cgroup fixes from Tejun Heo:
     "This contains the cgroup.procs permission check fixes so that they use
      the credentials at the time of open rather than write, which also
      fixes the cgroup namespace lifetime bug"
    
    * 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
      selftests: cgroup: Test open-time cgroup namespace usage for migration checks
      selftests: cgroup: Test open-time credential usage for migration checks
      selftests: cgroup: Make cg_create() use 0755 for permission instead of 0644
      cgroup: Use open-time cgroup namespace for process migration perm checks
      cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv
      cgroup: Use open-time credentials for process migraton perm checks
    torvalds committed Jan 7, 2022
  2. Merge tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block

    Pull block fix from Jens Axboe:
     "Just the md bitmap regression this time"
    
    * tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block:
      md/raid1: fix missing bitmap update w/o WriteMostly devices
    torvalds committed Jan 7, 2022
  3. Merge tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/ras/ras
    
    Pull EDAC fix from Tony Luck:
     "Fix 10nm EDAC driver to release and unmap resources on systems without
      HBM"
    
    * tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
      EDAC/i10nm: Release mdev/mbase when failing to detect HBM
    torvalds committed Jan 7, 2022
  4. Revert "i2c: core: support bus regulator controlling in adapter"

    This largely reverts commit 5a7b95f. It
    breaks suspend with AMD GPUs, and we couldn't incrementally fix it. So,
    let's remove the code and go back to the drawing board. We keep the
    header extension to not break drivers already populating the regulator.
    We expect to re-add the code handling it soon.
    
    Fixes: 5a7b95f ("i2c: core: support bus regulator controlling in adapter")
    Reported-by: "Tareque Md.Hanif" <tarequemd.hanif@yahoo.com>
    Link: https://lore.kernel.org/r/1295184560.182511.1639075777725@mail.yahoo.com
    Reported-by: Konstantin Kharlamov <hi-angel@yandex.ru>
    Link: https://lore.kernel.org/r/7143a7147978f4104171072d9f5225d2ce355ec1.camel@yandex.ru
    BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1850
    Tested-by: "Tareque Md.Hanif" <tarequemd.hanif@yahoo.com>
    Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
    Signed-off-by: Wolfram Sang <wsa@kernel.org>
    Cc: <stable@vger.kernel.org> # 5.14+
    Wolfram Sang committed Jan 7, 2022
  5. Revert "libtraceevent: Increase libtraceevent logging when verbose"

    This reverts commit 08efcb4.
    
    This breaks the build as it will prefer using libbpf-devel header files,
    even when not using LIBBPF_DYNAMIC=1, breaking the build.
    
    This was detected on OpenSuSE Tumbleweed with libtraceevent-devel 1.3.0,
    as described by Jiri Slaby:
    
    =======================================================================
    It breaks build with LIBTRACEEVENT_DYNAMIC and version 1.3.0:
    > util/debug.c: In function ‘perf_debug_option’:
    > util/debug.c:243:17: error: implicit declaration of function
    ‘tep_set_loglevel’ [-Werror=implicit-function-declaration]
    >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
    >       |                 ^~~~~~~~~~~~~~~~
    > util/debug.c:243:34: error: ‘TEP_LOG_INFO’ undeclared (first use in this
    function); did you mean ‘TEP_PRINT_INFO’?
    >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
    >       |                                  ^~~~~~~~~~~~
    >       |                                  TEP_PRINT_INFO
    > util/debug.c:243:34: note: each undeclared identifier is reported only once
    for each function it appears in
    > util/debug.c:245:34: error: ‘TEP_LOG_DEBUG’ undeclared (first use in this
    function)
    >   245 |                 tep_set_loglevel(TEP_LOG_DEBUG);
    >       |                                  ^~~~~~~~~~~~~
    > util/debug.c:247:34: error: ‘TEP_LOG_ALL’ undeclared (first use in this
    function)
    >   247 |                 tep_set_loglevel(TEP_LOG_ALL);
    >       |                                  ^~~~~~~~~~~
    
    It is because the gcc's command line looks like:
    gcc
    ...
    -I/home/abuild/rpmbuild/BUILD/tools/lib/
    ...
    -DLIBTRACEEVENT_VERSION=65790
    ...
    =======================================================================
    
    The proper way to fix this is more involved and so not suitable for this
    late in the 5.16-rc stage.
    
    Reported-by: Jiri Slaby <jirislaby@kernel.org>
    Link: https://lore.kernel.org/lkml/bc2b0786-8965-1bcd-2316-9d9bb37b9c31@kernel.org
    Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Song Liu <songliubraving@fb.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Link: https://lore.kernel.org/lkml/YddGjjmlMZzxUZbN@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Arnaldo Carvalho de Melo committed Jan 7, 2022
  6. perf trace: Avoid early exit due to running SIGCHLD handler before it…

    … makes sense to
    
    When running 'perf trace' with an BPF object like:
    
      # perf trace -e openat,tools/perf/examples/bpf/hello.c
    
    the event parsing eventually calls llvm__get_kbuild_opts() that runs a
    script and that ends up with SIGCHLD delivered to the 'perf trace'
    handler, which assumes the workload process is done and quits 'perf
    trace'.
    
    Move the SIGCHLD handler setup directly to trace__run(), where the event
    is parsed and the object is already compiled.
    
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Christy Lee <christyc.y.lee@gmail.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Michael Petlan <mpetlan@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lore.kernel.org/lkml/20220106222030.227499-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jan 7, 2022
  7. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull kvm fixes from Paolo Bonzini:
     "Two small fixes for x86:
    
       - lockdep WARN due to missing lock nesting annotation
    
       - NULL pointer dereference when accessing debugfs"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: x86: Check for rmaps allocation
      KVM: SEV: Mark nested locking of kvm->lock
    torvalds committed Jan 7, 2022
  8. Merge tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm…

    …/drm
    
    Pull drm fixes from Dave Airlie:
     "There is only the amdgpu runtime pm regression fix in here:
    
      amdgpu:
    
       - suspend/resume fix
    
       - fix runtime PM regression"
    
    * tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm:
      drm/amdgpu: disable runpm if we are the primary adapter
      fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb
      drm/amd/pm: keep the BACO feature enabled for suspend
    torvalds committed Jan 7, 2022
  9. KVM: x86: Check for rmaps allocation

    With TDP MMU being the default now, access to mmu_rmaps_stat debugfs
    file causes following oops:
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    PGD 0 P4D 0
    Oops: 0000 [#1] PREEMPT SMP NOPTI
    CPU: 7 PID: 3185 Comm: cat Not tainted 5.16.0-rc4+ torvalds#204
    RIP: 0010:pte_list_count+0x6/0x40
     Call Trace:
      <TASK>
      ? kvm_mmu_rmaps_stat_show+0x15e/0x320
      seq_read_iter+0x126/0x4b0
      ? aa_file_perm+0x124/0x490
      seq_read+0xf5/0x140
      full_proxy_read+0x5c/0x80
      vfs_read+0x9f/0x1a0
      ksys_read+0x67/0xe0
      __x64_sys_read+0x19/0x20
      do_syscall_64+0x3b/0xc0
      entry_SYSCALL_64_after_hwframe+0x44/0xae
     RIP: 0033:0x7fca6fc13912
    
    Return early when rmaps are not present.
    
    Reported-by: Vasant Hegde <vasant.hegde@amd.com>
    Tested-by: Vasant Hegde <vasant.hegde@amd.com>
    Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
    Reviewed-by: Peter Xu <peterx@redhat.com>
    Reviewed-by: Sean Christopherson <seanjc@google.com>
    Message-Id: <20220105040337.4234-1-nikunj@amd.com>
    Cc: stable@vger.kernel.org
    Fixes: 3bcd066 ("KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file")
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Nikunj A Dadhania authored and bonzini committed Jan 7, 2022
Older