1. 03 Mar, 2023 25 commits
    • Daniel Lezcano's avatar
      thermal: Add a thermal zone id accessor · 3034f859
      Daniel Lezcano authored
      In order to get the thermal zone id but without directly accessing the
      thermal zone device structure, add an accessor.
      
      Use the accessor in the hwmon_scmi and acpi_thermal.
      
      No functional change intented.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3034f859
    • Daniel Lezcano's avatar
      thermal/drivers/spear: Don't use tz->device but pdev->dev · 25e43976
      Daniel Lezcano authored
      Use the spear associated device instead of the thermal zone device
      which belongs to the thermal framework internals.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      25e43976
    • Daniel Lezcano's avatar
      thermal/core: Add thermal_zone_device structure 'type' accessor · 072e35c9
      Daniel Lezcano authored
      The thermal zone device structure is exposed via the exported
      thermal.h header. This structure should stay private the thermal core
      code. In order to encapsulate the structure, let's add an accessor to
      get the 'type' of the thermal zone.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      072e35c9
    • Daniel Lezcano's avatar
      thermal: Don't use 'device' internal thermal zone structure field · dec07d39
      Daniel Lezcano authored
      Some drivers are directly using the thermal zone's 'device' structure
      field.
      
      Use the driver device pointer instead of the thermal zone device when
      it is available.
      
      Remove the traces when they are duplicate with the traces in the core
      code.
      
      Cc: Jean Delvare <jdelvare@suse.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek LVTS
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dec07d39
    • Daniel Lezcano's avatar
      thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() · 4a16c190
      Daniel Lezcano authored
      The devres variant of thermal_add_hwmon_sysfs() only takes the thermal
      zone structure pointer as parameter.
      
      Actually, it uses the tz->device to add it in the devres list.
      
      It is preferable to use the device registering the thermal zone
      instead of the thermal zone device itself. That prevents the driver
      accessing the thermal zone structure internals and it is from my POV
      more correct regarding how devm_ is used.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> #amlogic_thermal
      Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4a16c190
    • Daniel Lezcano's avatar
      thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() · 8f3f4ad4
      Daniel Lezcano authored
      The thermal->tzp->no_hwmon parameter is only used when calling
      thermal_zone_device_register().
      
      Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no
      effect.
      
      Remove the call and again prevent the drivers to access the thermal
      internals.
      
      Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8f3f4ad4
    • Daniel Lezcano's avatar
      thermal: Remove debug or error messages in get_temp() ops · abda7383
      Daniel Lezcano authored
      Some get_temp() ops implementation are showing an error or a debug
      message if the reading of the sensor fails.
      
      The debug message is already displayed from the call site of this
      ops. So we can remove it.
      
      On the other side, the error should not be displayed because in
      production that can raise tons of messages.
      
      Finally, some drivers are showing a debug message with the
      temperature, this is also accessible through the trace from the core
      code in the temperature_update() function.
      
      Another benefit is the dev_* messages are accessing the thermal zone
      device field from the structure, so we encapsulate even more the code
      by preventing these accesses.
      
      Remove those messages.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> #Armada
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #brcmstb_thermal.c
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      abda7383
    • Daniel Lezcano's avatar
      thermal/core: Show a debug message when get_temp() fails · 4216e815
      Daniel Lezcano authored
      The different thermal drivers are showing an error in case the
      get_temp() fails. Actually no traces should be displayed in the
      backend ops but in the call site of this ops.
      
      Furthermore, the message is often a dev_dbg message where the
      tz->device is used, thus using the internal of the structure from the
      driver.
      
      Show a debug message if the thermal_zone_get_temp() fails to read the
      sensor temperature, so code showing the message is factored out and
      the tz->device accesss is in the scope of the thermal core framework.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4216e815
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers · 3d4e1bad
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw
      Acked-by: Gregory Greenman <gregory.greenman@intel.com> #iwlwifi
      Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> #power_supply
      Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> #ahci
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3d4e1bad
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers · 0ce637a5
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Guenter Roeck <linux@roeck-us.net> #hwmon
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0ce637a5
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers · 5f68d078
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc and lvts
      Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek lvts
      Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com> #da9062
      Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>  #spread
      Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom
      Reviewed-by: Dhruva Gole <d-gole@ti.com> # K3 bandgap
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> #uniphier
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5f68d078
    • Daniel Lezcano's avatar
      thermal/core: Add a thermal zone 'devdata' accessor · a6ff3c00
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Provide an accessor to the 'devdata' structure and make use of it in
      the different drivers.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a6ff3c00
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0a3f9a6b
      Linus Torvalds authored
      Pull more thermal control updates from Rafael Wysocki:
       "These fix two issues in the Intel thermal control drivers.
      
        Specifics:
      
         - Fix an error pointer dereference in the quark_dts Intel thermal
           driver (Dan Carpenter)
      
         - Fix the intel_bxt_pmic_thermal driver Kconfig entry to select
           REGMAP which is not user-visible instead of depending on it (Randy
           Dunlap)"
      
      * tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: BXT_PMIC: select REGMAP instead of depending on it
        thermal: intel: quark_dts: fix error pointer dereference
      0a3f9a6b
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 44b6f565
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These update ACPI quirks for some x86 platforms and add an IRQ
        override quirk for one more system.
      
        Specifics:
      
         - Add an ACPI IRQ override quirk for Asus Expertbook B2402FBA
           (Vojtech Hejsek)
      
         - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed
           any more after a firmware update (Mario Limonciello)
      
         - Add all Cezanne systems to the list for forcing StorageD3Enable,
           because they all need the same quirk (Mario Limonciello)"
      
      * tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable
        ACPI: x86: Drop quirk for HP Elitebook
        ACPI: resource: Skip IRQ override on Asus Expertbook B2402FBA
      44b6f565
    • Linus Torvalds's avatar
      Merge tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c8b4accf
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These update power capping (new hardware support and cleanup) and
        cpufreq (bug fixes, cleanups and intel_pstate adjustment for a new
        platform).
      
        Specifics:
      
         - Fix error handling in the apple-soc cpufreq driver (Dan Carpenter)
      
         - Change the log level of a message in the amd-pstate cpufreq driver
           so it is more visible to users (Kai-Heng Feng)
      
         - Adjust the balance_performance EPP value for Sapphire Rapids in the
           intel_pstate cpufreq driver (Srinivas Pandruvada)
      
         - Remove MODULE_LICENSE from 3 pieces of non-modular code (Nick
           Alcock)
      
         - Make a read-only kobj_type structure in the schedutil cpufreq
           governor constant (Thomas Weißschuh)
      
         - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL
           power capping driver (Sumeet Pawnikar)"
      
      * tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: apple-soc: Fix an IS_ERR() vs NULL check
        powercap: remove MODULE_LICENSE in non-modules
        cpufreq: intel_pstate: remove MODULE_LICENSE in non-modules
        powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC
        cpufreq: amd-pstate: remove MODULE_LICENSE in non-modules
        cpufreq: schedutil: make kobj_type structure constant
        cpufreq: amd-pstate: Let user know amd-pstate is disabled
        cpufreq: intel_pstate: Adjust balance_performance EPP for Sapphire Rapids
      c8b4accf
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux · 53ae7e11
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
       "Here's a set of fixes/changes that didn't make the first cut, either
        because they got queued before I sent the early merge request, or
        fixes that came in afterwards. In detail:
      
         - Don't set MSG_NOSIGNAL on recv/recvmsg opcodes, as AF_PACKET will
           error out (David)
      
         - Fix for spurious poll wakeups (me)
      
         - Fix for a file leak for buffered reads in certain conditions
           (Joseph)
      
         - Don't allow registered buffers of mixed types (Pavel)
      
         - Improve handling of huge pages for registered buffers (Pavel)
      
         - Provided buffer ring size calculation fix (Wojciech)
      
         - Minor cleanups (me)"
      
      * tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux:
        io_uring/poll: don't pass in wake func to io_init_poll_iocb()
        io_uring: fix fget leak when fs don't support nowait buffered read
        io_uring/poll: allow some retries for poll triggering spuriously
        io_uring: remove MSG_NOSIGNAL from recvmsg
        io_uring/rsrc: always initialize 'folio' to NULL
        io_uring/rsrc: optimise registered huge pages
        io_uring/rsrc: optimise single entry advance
        io_uring/rsrc: disallow multi-source reg buffers
        io_uring: remove unused wq_list_merge
        io_uring: fix size calculation when registering buf ring
        io_uring/rsrc: fix a comment in io_import_fixed()
        io_uring: rename 'in_idle' to 'in_cancel'
        io_uring: consolidate the put_ref-and-return section of adding work
      53ae7e11
    • Linus Torvalds's avatar
      Merge tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux · 9d0281b5
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - Don't access released socket during error recovery (Akinobu
              Mita)
            - Bring back auto-removal of deleted namespaces during sequential
              scan (Christoph Hellwig)
            - Fix an error code in nvme_auth_process_dhchap_challenge (Dan
              Carpenter)
            - Show well known discovery name (Daniel Wagner)
            - Add a missing endianess conversion in effects masking (Keith
              Busch)
      
       - Fix for a regression introduced in blk-rq-qos during init in this
         merge window (Breno)
      
       - Reorder a few fields in struct blk_mq_tag_set, eliminating a few
         holes and shrinking it (Christophe)
      
       - Remove redundant bdev_get_queue() NULL checks (Juhyung)
      
       - Add sed-opal single user mode support flag (Luca)
      
       - Remove SQE128 check in ublk as it isn't needed, saving some memory
         (Ming)
      
       - Op specific segment checking for cloned requests (Uday)
      
       - Exclusive open partition scan fixes (Yu)
      
       - Loop offset/size checking before assigning them in the device (Zhong)
      
       - Bio polling fixes (me)
      
      * tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux:
        blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
        nvme-fabrics: show well known discovery name
        nvme-tcp: don't access released socket during error recovery
        nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge()
        nvme: bring back auto-removal of deleted namespaces during sequential scan
        blk-iocost: Pass gendisk to ioc_refresh_params
        nvme: fix sparse warning on effects masking
        block: be a bit more careful in checking for NULL bdev while polling
        block: clear bio->bi_bdev when putting a bio back in the cache
        loop: loop_set_status_from_info() check before assignment
        ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
        block: remove more NULL checks after bdev_get_queue()
        blk-mq: Reorder fields in 'struct blk_mq_tag_set'
        block: fix scan partition for exclusively open device again
        block: Revert "block: Do not reread partition table on exclusively open device"
        sed-opal: add support flag for SUM in status ioctl
      9d0281b5
    • Linus Torvalds's avatar
      Merge tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 1bd1aee6
      Linus Torvalds authored
      Pull ATA fix from Damien Le Moal:
      
       - Revert commit 104ff59a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI
         controller") as it is causing serious regressions (failure to boot)
         on some laptops
      
      * tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller"
      1bd1aee6
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pm' and 'acpi-x86' · 57b76324
      Rafael J. Wysocki authored
      Merge additional ACPI quirks for x86 systems:
      
       - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed
         any more after a firmware update (Mario Limonciello).
      
       - Add all Cezanne systems to the list for forcing StorageD3Enable,
         because they all need the same quirk (Mario Limonciello).
      
      * acpi-pm:
        ACPI: x86: Drop quirk for HP Elitebook
      
      * acpi-x86:
        ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable
      57b76324
    • Linus Torvalds's avatar
      Merge tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 0bdf4a8b
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - Add empty command line parameter handling stubs to kernel for all
         command line parameters which are handled in the decompressor. This
         avoids invalid "Unknown kernel command line parameters" messages from
         the kernel, and also avoids that these will be incorrectly passed to
         user space. This caused already confusion, therefore add the empty
         stubs
      
       - Add missing phys_to_virt() handling to machine check handler
      
       - Introduce and use a union to be used for zcrypt inline assemblies.
         This makes sure that only a register wide member of the union is
         passed as input and output parameter to inline assemblies, while
         usual C code uses other members of the union to access bit fields of
         it
      
       - Add and use a READ_ONCE_ALIGNED_128() macro, which can be used to
         atomically read a 128-bit value from memory. This replaces the
         (mis-)use of the 128-bit cmpxchg operation to do the same in cpum_sf
         code. Currently gcc does not generate the used lpq instruction if
         __READ_ONCE() is used for aligned 128-bit accesses, therefore use
         this s390 specific helper
      
       - Simplify machine check handler code if a task needs to be killed
         because of e.g. register corruption due to a machine malfunction
      
       - Perform CPU reset to clear pending interrupts and TLB entries on an
         already stopped target CPU before delegating work to it
      
       - Generate arch/s390/boot/vmlinux.map link map for the decompressor,
         when CONFIG_VMLINUX_MAP is enabled for debugging purposes
      
       - Fix segment type handling for dcssblk devices. It incorrectly always
         returned type "READ/WRITE" even for read-only segements, which can
         result in a kernel panic if somebody tries to write to a read-only
         device
      
       - Sort config S390 select list again
      
       - Fix two kprobe reenter bugs revealed by a recently added kprobe kunit
         test
      
      * tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/kprobes: fix current_kprobe never cleared after kprobes reenter
        s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler
        s390/Kconfig: sort config S390 select list again
        s390/extmem: return correct segment type in __segment_load()
        s390/decompressor: add link map saving
        s390/smp: perform cpu reset before delegating work to target cpu
        s390/mcck: cleanup user process termination path
        s390/cpum_sf: use READ_ONCE_ALIGNED_128() instead of 128-bit cmpxchg
        s390/rwonce: add READ_ONCE_ALIGNED_128() macro
        s390/ap,zcrypt,vfio: introduce and use ap_queue_status_reg union
        s390/nmi: fix virtual-physical address confusion
        s390/setup: do not complain about parameters handled in decompressor
      0bdf4a8b
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · bf1a1bad
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
      
       - Some cleanups and fixes for the Zbb-optimized string routines
      
       - Support for custom (vendor or implementation defined) perf events
      
       - COMMAND_LINE_SIZE has been increased to 1024
      
      * tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Bump COMMAND_LINE_SIZE value to 1024
        drivers/perf: RISC-V: Allow programming custom firmware events
        riscv, lib: Fix Zbb strncmp
        RISC-V: improve string-function assembly
      bf1a1bad
    • Rafael J. Wysocki's avatar
      Merge branch 'powercap' · 5719638d
      Rafael J. Wysocki authored
      Merge additional power capping changes for 6.3-rc1:
      
       - Remove MODULE_LICENSE from non-modular power capping code (Nick
         Alcock).
      
       - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL
         power capping driver (Sumeet Pawnikar).
      
      * powercap:
        powercap: remove MODULE_LICENSE in non-modules
        powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC
      5719638d
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 271d8939
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "A few drivers got some nice cleanups and a new driver are making the
        bulk of the changes.
      
        Subsystem:
         - allow rtc_read_alarm without read_alarm callback
      
        New driver:
         - NXP BBNSM module RTC
      
        Drivers:
         - use IRQ flags from fwnode when available
         - abx80x: nvmem support
         - brcmstb-waketimer: add non-wake alarm support
         - ingenic: provide CLK32K clock
         - isl12022: cleanups
         - moxart: switch to using gpiod API
         - pcf85363: allow setting quartz load
         - pm8xxx: cleanups and support for setting time
         - rv3028, rv3032: add ACPI support"
      
      * tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (64 commits)
        rtc: pm8xxx: add support for nvmem offset
        dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset
        rtc: abx80x: Add nvmem support
        rtc: rx6110: Remove unused of_gpio,h
        rtc: efi: Avoid spamming the log on RTC read failure
        rtc: isl12022: sort header inclusion alphabetically
        rtc: isl12022: Join string literals back
        rtc: isl12022: Drop unneeded OF guards and of_match_ptr()
        rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L
        rtc: isl12022: Get rid of unneeded private struct isl12022
        rtc: pcf85363: add support for the quartz-load-femtofarads property
        dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding
        rtc: allow rtc_read_alarm without read_alarm callback
        rtc: rv3032: add ACPI support
        rtc: rv3028: add ACPI support
        rtc: bbnsm: Add the bbnsm rtc support
        rtc: jz4740: Register clock provider for the CLK32K pin
        rtc: jz4740: Use dev_err_probe()
        rtc: jz4740: Use readl_poll_timeout
        dt-bindings: rtc: Add #clock-cells property
        ...
      271d8939
    • Damien Le Moal's avatar
      ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" · 6210038a
      Damien Le Moal authored
      Commit 104ff59a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI
      controller") enabled low power mode for the Tiger Lake AHIC adapter in
      the author system but created regressions for others. Revert this patch
      for now until a better solution is found to make this adapter
      eco-friendly.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=217114
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      6210038a
    • Uday Shankar's avatar
      blk-mq: enforce op-specific segment limits in blk_insert_cloned_request · 49d24398
      Uday Shankar authored
      The block layer might merge together discard requests up until the
      max_discard_segments limit is hit, but blk_insert_cloned_request checks
      the segment count against max_segments regardless of the req op. This
      can result in errors like the following when discards are issued through
      a DM device and max_discard_segments exceeds max_segments for the queue
      of the chosen underlying device.
      
      blk_insert_cloned_request: over max segments limit. (256 > 129)
      
      Fix this by looking at the req_op and enforcing the appropriate segment
      limit - max_discard_segments for REQ_OP_DISCARDs and max_segments for
      everything else.
      Signed-off-by: default avatarUday Shankar <ushankar@purestorage.com>
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20230301000655.48112-1-ushankar@purestorage.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      49d24398
  2. 02 Mar, 2023 15 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm · 2eb29d59
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "fbdev:
         - fix uninit var in error path
      
        shmem:
         - revert unGPLing an export
      
        i915:
         - Don't use stolen memory or BAR mappings for ring buffers with LLC
         - Add inverted backlight quirk for HP 14-r206nv
         - Fix GSI offset for MCR lookups
         - GVT fixes (memleak, debugfs attributes, kconfig, typos)
      
        amdgpu:
         - SMU 13 fixes
         - Enable TMZ for GC 10.3.6
         - Misc display fixes
         - Buddy allocator fixes
         - GC 11 fixes
         - S0ix fix
         - INFO IOCTL queries for GC 11
         - VCN harvest fixes for SR-IOV
         - UMC 8.10 RAS fixes
         - Don't restrict bpc to 8
         - NBIO 7.5 fix
         - Allow freesync on PCon for more devices
      
        amdkfd:
         - SDMA fix
         - Illegal memory access fix"
      
      * tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm: (45 commits)
        drm/amdgpu/vcn: fix compilation issue with legacy gcc
        drm/amd/display: Extend Freesync over PCon support for more devices
        Revert "drm/amd/display: Do not set DRR on pipe commit"
        drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
        drm/amd/display: Ext displays with dock can't recognized after resume
        drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini
        drm/amdgpu: remove unused variable ring
        drm/amd/display: fix dm irq error message in gpu recover
        drm/amd: Fix initialization for nbio 7.5.1
        drm/amd/display: Don't restrict bpc to 8 bpc
        drm/amdgpu: Make umc_v8_10_convert_error_address static and remove unused variable
        drm/radeon: Fix eDP for single-display iMac11,2
        drm/shmem-helper: Revert accidental non-GPL export
        drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init()
        drm/amd/pm: downgrade log level upon SMU IF version mismatch
        drm/amdgpu: Add ecc info query interface for umc v8_10
        drm/amdgpu: Add convert_error_address function for umc v8_10
        drm/amdgpu: add bad_page_threshold check in ras_eeprom_check_err
        drm/amdgpu: change default behavior of bad_page_threshold parameter
        drm/amdgpu: exclude duplicate pages from UMC RAS UE count
        ...
      2eb29d59
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 39ce4395
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - In copy_highpage(), only reset the tag of the destination pointer if
         KASAN_HW_TAGS is enabled so that user-space MTE does not interfere
         with KASAN_SW_TAGS (which relies on top-byte-ignore).
      
       - Remove warning if SME is detected without SVE, the kernel can cope
         with such configuration (though none in the field currently).
      
       - In cfi_handler(), pass the ESR_EL1 value to die() for consistency
         with other die() callers.
      
       - Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP on arm64 since the pte
         manipulation from the generic vmemmap_remap_pte() does not follow the
         required ARM break-before-make sequence (clear the pte, flush the
         TLBs, set the new pte). It may be re-enabled once this sequence is
         sorted.
      
       - Fix possible memory leak in the arm64 ACPI code if the SMCCC version
         and conduit checks fail.
      
       - Forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE since gcc ignores
        -falign-functions=N with -Os.
      
       - Don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN as no
         randomisation would actually take place.
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN
        arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE
        arm64: acpi: Fix possible memory leak of ffh_ctxt
        arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP
        arm64: pass ESR_ELx to die() of cfi_handler
        arm64/fpsimd: Remove warning for SME without SVE
        arm64: Reset KASAN tag in copy_highpage with HW tags only
      39ce4395
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.3-2023-03-02' of... · 54ceb927
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.3-2023-03-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
      
      amd-drm-fixes-6.3-2023-03-02:
      
      amdgpu:
      - SMU 13 fixes
      - Enable TMZ for GC 10.3.6
      - Misc display fixes
      - Buddy allocator fixes
      - GC 11 fixes
      - S0ix fix
      - INFO IOCTL queries for GC 11
      - VCN harvest fixes for SR-IOV
      - UMC 8.10 RAS fixes
      - Don't restrict bpc to 8
      - NBIO 7.5 fix
      - Allow freesync on PCon for more devices
      
      amdkfd:
      - SDMA fix
      - Illegal memory access fix
      
      radeon:
      - Display fix for iMac11,2
      
      UAPI:
      - Add some additional INFO IOCTL queries for GC 11 fixes
        Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230302051843.7793-1-alexander.deucher@amd.com
      54ceb927
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2023-02-27' of... · 7b7d2429
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2023-02-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      drm/i915 fixes for v6.3-rc1:
      - Don't use stolen memory or BAR mappings for ring buffers with LLC
      - Add inverted backlight quirk for HP 14-r206nv
      - Fix GSI offset for MCR lookups
      - GVT fixes (memleak, debugfs attributes, kconfig, typos)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87cz5v2z0j.fsf@intel.com
      7b7d2429
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-fixes-2023-02-28' of... · 3d3921d1
      Dave Airlie authored
      Merge tag 'drm-misc-next-fixes-2023-02-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
      
      Short summary of fixes pull:
      
      Fixes uninitialized variables in fbdev error paths and reverts an
      SHMEM-helper symbol back to being exported as GPL.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/Y/3Fw1HjgPcplo+j@linux-uq9g
      3d3921d1
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-6.3-rc1' of git://www.linux-watchdog.org/linux-watchdog · a9a01e12
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - qcom-wdt dt-bindings improvements and additions (like MSM8994 and
         MDM9615)
      
       - mtk_wdt: Add reset_by_toprgu support
      
       - devm_clk_get_enabled() helper changes
      
       - Fix kmemleak in watchdog_cdev_register
      
       - watchdog sysfs improvements
      
       - Other fixes and small improvements
      
      * tag 'linux-watchdog-6.3-rc1' of git://www.linux-watchdog.org/linux-watchdog: (52 commits)
        watchdog: at91rm9200: Only warn once about problems in .remove()
        watchdog: mt7621-wdt: avoid ralink architecture dependent code
        watchdog: mt7621-wdt: avoid static global declarations
        dt-bindings: watchdog: mt7621-wdt: add phandle to access system controller registers
        watchdog: sbsa_wdog: Make sure the timeout programming is within the limits
        dt-bindings: watchdog: qcom-wdt: add qcom,apss-wdt-sa8775p compatible
        watchdog: report options in sysfs
        watchdog: report fw_version in sysfs
        dt-bindings: watchdog: fsl-imx: document suspend in wait mode
        watchdog: imx2_wdg: suspend watchdog in WAIT mode
        watchdog: pcwd_usb: Fix attempting to access uninitialized memory
        dt-bindings: watchdog: qcom-wdt: merge MSM timer
        dt-bindings: watchdog: qcom-wdt: allow interrupts
        dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615
        dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles
        dt-bindings: watchdog: qcom-wdt: do not allow fallback alone
        dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019
        watchdog: Fix kmemleak in watchdog_cdev_register
        watchdog: Include <linux/kstrtox.h> when appropriate
        watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path
        ...
      a9a01e12
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.3-rc1' of https://github.com/ceph/ceph-client · c3f9b9fa
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Two small fixes from Xiubo and myself, marked for stable"
      
      * tag 'ceph-for-6.3-rc1' of https://github.com/ceph/ceph-client:
        rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails
        ceph: update the time stamps and try to drop the suid/sgid
      c3f9b9fa
    • Linus Torvalds's avatar
      Merge tag 'mips_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 04a357b1
      Linus Torvalds authored
      Pull more MIPS updates from Thomas Bogendoerfer:
       "A few more cleanups and fixes"
      
      * tag 'mips_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Workaround clang inline compat branch issue
        mips: dts: ralink: mt7621: add phandle to system controller node for watchdog
        mips: dts: ralink: mt7621: rename watchdog node from 'wdt' into 'watchdog'
        mips: ralink: make SOC_MT7621 select PINCTRL
        mips: remove SYS_HAS_CPU_MIPS32_R1 from RALINK
        MIPS: cevt-r4k: Offset the value used to clear compare interrupt
        MIPS: smp-cps: Don't rely on CP0_CMGCRBASE
        MIPS: Remove DMA_PERDEV_COHERENT
      04a357b1
    • Linus Torvalds's avatar
      Merge tag 'objtool-core-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 857f1268
      Linus Torvalds authored
      Pull objtool updates from Ingo Molnar:
      
       - Shrink 'struct instruction', to improve objtool performance & memory
         footprint
      
       - Other maximum memory usage reductions - this makes the build both
         faster, and fixes kernel build OOM failures on allyesconfig and
         similar configs when they try to build the final (large) vmlinux.o
      
       - Fix ORC unwinding when a kprobe (INT3) is set on a stack-modifying
         single-byte instruction (PUSH/POP or LEAVE). This requires the
         extension of the ORC metadata structure with a 'signal' field
      
       - Misc fixes & cleanups
      
      * tag 'objtool-core-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
        objtool: Fix ORC 'signal' propagation
        objtool: Remove instruction::list
        x86: Fix FILL_RETURN_BUFFER
        objtool: Fix overlapping alternatives
        objtool: Union instruction::{call_dest,jump_table}
        objtool: Remove instruction::reloc
        objtool: Shrink instruction::{type,visited}
        objtool: Make instruction::alts a single-linked list
        objtool: Make instruction::stack_ops a single-linked list
        objtool: Change arch_decode_instruction() signature
        x86/entry: Fix unwinding from kprobe on PUSH/POP instruction
        x86/unwind/orc: Add 'signal' field to ORC metadata
        objtool: Optimize layout of struct special_alt
        objtool: Optimize layout of struct symbol
        objtool: Allocate multiple structures with calloc()
        objtool: Make struct check_options static
        objtool: Make struct entries[] static and const
        objtool: Fix HOSTCC flag usage
        objtool: Properly support make V=1
        objtool: Install libsubcmd in build
        ...
      857f1268
    • Linus Torvalds's avatar
      Merge tag 'auxdisplay-6.3' of https://github.com/ojeda/linux · 6972633c
      Linus Torvalds authored
      Pull auxdisplay fix from Miguel Ojeda:
      
        - hd44780: Fix potential memory leak in hd44780_remove() (Jianglei Nie)
      
      * tag 'auxdisplay-6.3' of https://github.com/ojeda/linux:
        auxdisplay: hd44780: Fix potential memory leak in hd44780_remove()
      6972633c
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.3-rc1_2' of... · 7c2bc4ed
      Linus Torvalds authored
      Merge tag 'driver-core-6.3-rc1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here is another small set of driver core patches.
      
        They resolve some reported problems with the previous driver core
        patches that are in your tree.
      
        They solve a problem with the bus_type cleanup as reported and fixed
        by Geert, and two fw_devlink changes to make debugging problems
        easier.
      
        There is one known outstanding problem with the fw_deflink changes in
        your tree that is still being worked on, and it looks like a clk core
        change will be submitted soon for that, probably after 6.3-rc1.
      
        All three of these have been in linux-next with no reported problems
        (only reports that they fixed problems)"
      
      * tag 'driver-core-6.3-rc1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        driver core: fw_devlink: Print full path and name of fwnode
        driver core: fw_devlink: Avoid spurious error message
        driver core: bus: Handle early calls to bus_to_subsys()
      7c2bc4ed
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 093b2dc4
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A small set of fixes for SPI drivers, Krishna has been doing a bunch
        of work on Tegra210 QuadSPI and found a bunch of issues there and
        there's a couple of small fixes for other drivers too"
      
      * tag 'spi-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: tegra210-quad: Fix iterator outside loop
        spi: tegra210-quad: Fix validate combined sequence
        spi: tegra210-quad: set half duplex flag
        spi: spi-sn-f-ospi: fix duplicate flag while assigning to mode_bits
        spi: cadence-quadspi: Fix cancel the indirect read mask
      093b2dc4
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · fd7ee8de
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "Two fixes here, one driver fix for incorrect error codes and a fix in
        the core to use ktime_get_boottime() in order to fix accounting of the
        time regulators have been powered down over suspend. ktime_get()
        pauses over suspend which is not what we want"
      
      * tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: core: Use ktime_get_boottime() to determine how long a regulator was off
        regulator: max597x: Fix error return code in max597x_get_status
      fd7ee8de
    • Vasily Gorbik's avatar
      s390/kprobes: fix current_kprobe never cleared after kprobes reenter · cd579539
      Vasily Gorbik authored
      Recent test_kprobe_missed kprobes kunit test uncovers the following
      problem. Once kprobe is triggered from another kprobe (kprobe reenter),
      all future kprobes on this cpu are considered as kprobe reenter, thus
      pre_handler and post_handler are not being called and kprobes are counted
      as "missed".
      
      Commit b9599798 ("[S390] kprobes: activation and deactivation")
      introduced a simpler scheme for kprobes (de)activation and status
      tracking by using push_kprobe/pop_kprobe, which supposed to work for
      both initial kprobe entry as well as kprobe reentry and helps to avoid
      handling those two cases differently. The problem is that a sequence of
      calls in case of kprobes reenter:
      push_kprobe() <- NULL (current_kprobe)
      push_kprobe() <- kprobe1 (current_kprobe)
      pop_kprobe() -> kprobe1 (current_kprobe)
      pop_kprobe() -> kprobe1 (current_kprobe)
      leaves "kprobe1" as "current_kprobe" on this cpu, instead of setting it
      to NULL. In fact push_kprobe/pop_kprobe can only store a single state
      (there is just one prev_kprobe in kprobe_ctlblk). Which is a hack but
      sufficient, there is no need to have another prev_kprobe just to store
      NULL. To make a simple and backportable fix simply reset "prev_kprobe"
      when kprobe is poped from this "stack". No need to worry about
      "kprobe_status" in this case, because its value is only checked when
      current_kprobe != NULL.
      
      Cc: stable@vger.kernel.org
      Fixes: b9599798 ("[S390] kprobes: activation and deactivation")
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      cd579539
    • Vasily Gorbik's avatar
      s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler · 42e19e6f
      Vasily Gorbik authored
      Recent test_kprobe_missed kprobes kunit test uncovers the following error
      (reported when CONFIG_DEBUG_ATOMIC_SLEEP is enabled):
      
      BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
      in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 662, name: kunit_try_catch
      preempt_count: 0, expected: 0
      RCU nest depth: 0, expected: 0
      no locks held by kunit_try_catch/662.
      irq event stamp: 280
      hardirqs last  enabled at (279): [<00000003e60a3d42>] __do_pgm_check+0x17a/0x1c0
      hardirqs last disabled at (280): [<00000003e3bd774a>] kprobe_exceptions_notify+0x27a/0x318
      softirqs last  enabled at (0): [<00000003e3c5c890>] copy_process+0x14a8/0x4c80
      softirqs last disabled at (0): [<0000000000000000>] 0x0
      CPU: 46 PID: 662 Comm: kunit_try_catch Tainted: G                 N 6.2.0-173644-g44c18d77f0c0 #2
      Hardware name: IBM 3931 A01 704 (LPAR)
      Call Trace:
       [<00000003e60a3a00>] dump_stack_lvl+0x120/0x198
       [<00000003e3d02e82>] __might_resched+0x60a/0x668
       [<00000003e60b9908>] __mutex_lock+0xc0/0x14e0
       [<00000003e60bad5a>] mutex_lock_nested+0x32/0x40
       [<00000003e3f7b460>] unregister_kprobe+0x30/0xd8
       [<00000003e51b2602>] test_kprobe_missed+0xf2/0x268
       [<00000003e51b5406>] kunit_try_run_case+0x10e/0x290
       [<00000003e51b7dfa>] kunit_generic_run_threadfn_adapter+0x62/0xb8
       [<00000003e3ce30f8>] kthread+0x2d0/0x398
       [<00000003e3b96afa>] __ret_from_fork+0x8a/0xe8
       [<00000003e60ccada>] ret_from_fork+0xa/0x40
      
      The reason for this error report is that kprobes handling code failed
      to restore irqs.
      
      The problem is that when kprobe is triggered from another kprobe
      post_handler current sequence of enable_singlestep / disable_singlestep
      is the following:
      enable_singlestep  <- original kprobe (saves kprobe_saved_imask)
      enable_singlestep  <- kprobe triggered from post_handler (clobbers kprobe_saved_imask)
      disable_singlestep <- kprobe triggered from post_handler (restores kprobe_saved_imask)
      disable_singlestep <- original kprobe (restores wrong clobbered kprobe_saved_imask)
      
      There is just one kprobe_ctlblk per cpu and both calls saves and
      loads irq mask to kprobe_saved_imask. To fix the problem simply move
      resume_execution (which calls disable_singlestep) before calling
      post_handler. This also fixes the problem that post_handler is called
      with pt_regs which were not yet adjusted after single-stepping.
      
      Cc: stable@vger.kernel.org
      Fixes: 4ba069b8 ("[S390] add kprobes support.")
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      42e19e6f