1. 11 Oct, 2023 5 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-thermal' · a26b452e
      Rafael J. Wysocki authored
      The ACPI thermal driver changes include some thermal core modifications
      that are depended on by subsequent thermal core changes, so merge them.
      
      * acpi-thermal: (26 commits)
        thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()
        thermal: trip: Remove lockdep assertion from for_each_thermal_trip()
        thermal: core: Drop thermal_zone_device_exec()
        ACPI: thermal: Use thermal_zone_for_each_trip() for updating trips
        ACPI: thermal: Combine passive and active trip update functions
        ACPI: thermal: Move get_active_temp()
        ACPI: thermal: Fix up function header formatting in two places
        ACPI: thermal: Drop list of device ACPI handles from struct acpi_thermal
        ACPI: thermal: Rename structure fields holding temperature in deci-Kelvin
        ACPI: thermal: Drop critical_valid and hot_valid trip flags
        ACPI: thermal: Do not use trip indices for cooling device binding
        ACPI: thermal: Mark uninitialized active trips as invalid
        ACPI: thermal: Merge trip initialization functions
        ACPI: thermal: Collapse trip devices update function wrappers
        ACPI: thermal: Collapse trip devices update functions
        ACPI: thermal: Add device list to struct acpi_thermal_trip
        ACPI: thermal: Fix a small leak in acpi_thermal_add()
        ACPI: thermal: Drop valid flag from struct acpi_thermal_trip
        ACPI: thermal: Drop redundant trip point flags
        ACPI: thermal: Untangle initialization and updates of active trips
        ...
      a26b452e
    • Rafael J. Wysocki's avatar
      thermal: trip: Drop lockdep assertion from thermal_zone_trip_id() · 108ffd12
      Rafael J. Wysocki authored
      The lockdep assertion in thermal_zone_trip_id() triggers when the
      trip point sysfs attribute of a thermal instance is read, because
      there is no thermal zone locking in that code path.
      
      This is not verly useful, though, because there is no mechanism by which
      the location of the trips[] table in a thermal zone or its size can
      change after binding cooling devices to the trips in that thermal
      zone and before those cooling devices are unbound from them.  Thus
      it is not in fact necessary to hold the thermal zone lock when
      thermal_zone_trip_id() is called from trip_point_show() and so the
      lockdep asserion in the former is invalid.
      
      Accordingly, drop that lockdep assertion.
      
      Fixes: 2c7b4bfa ("thermal: core: Store trip pointer in struct thermal_instance")
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      108ffd12
    • Dan Carpenter's avatar
      thermal: core: prevent potential string overflow · c9962609
      Dan Carpenter authored
      The dev->id value comes from ida_alloc() so it's a number between zero
      and INT_MAX.  If it's too high then these sprintf()s will overflow.
      
      Fixes: 203d3d4a ("the generic thermal sysfs driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c9962609
    • Lukasz Luba's avatar
      thermal: Add myself as thermal reviewer in MAINTAINERS · e17ea8a1
      Lukasz Luba authored
      Become designated reviewer and help thermal subsystem in development
      process.
      Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e17ea8a1
    • Rafael J. Wysocki's avatar
      thermal: Remove Amit Kucheria from MAINTAINERS · b0e82ae3
      Rafael J. Wysocki authored
      Amit Kucheria has not been participating in kernel development in any
      way or form for quite some time, so it is not useful to list him as a
      designated reviewer for the thermal subsystem or as the thermal zone DT
      binding maintainer.
      
      Remove him from the THERMAL entry in MAINTAINERS and list Daniel Lezcano
      as the new thermal zone DT binding maintainer.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Acked-by: default avatarAmit Kucheria <amitk@kernel.org>
      b0e82ae3
  2. 07 Oct, 2023 1 commit
    • Rafael J. Wysocki's avatar
      thermal: trip: Remove lockdep assertion from for_each_thermal_trip() · b4444402
      Rafael J. Wysocki authored
      The lockdep assertion in for_each_thermal_trip() was added to possibly
      catch incorrect usage of that function without the thermal zone lock.
      However, it turns out that the ACPI thermal driver has a legitimate
      reason to call for_each_thermal_trip() without locking.
      
      Namely, it is called by acpi_thermal_bind_unbind_cdev() in the thermal
      zone registration and unregistration paths.  That function cannot acquire
      the thermal zone lock by itself, because it calls functions that acquire
      it, thermal_bind_cdev_to_trip() or thermal_unbind_cdev_from_trip().
      However, it is invoked when the ACPI notify handler for the thermal
      zone in question has not been registered yet (in the registration path)
      or after that handler has been unregistered (in the unregistration
      path).  Therefore, when for_each_thermal_trip() is called by
      acpi_thermal_bind_unbind_cdev(), thermal trip changes induced by the
      platform firmware cannot take place and so the thermal zone's trips[]
      table is effectively immutable.  Hence, it is valid to call
      for_each_thermal_trip() from acpi_thermal_bind_unbind_cdev() without
      locking and the lockdep assertion in the former is in fact incorrect, so
      remove it.
      
      Fixes: d5ea8892 ("ACPI: thermal: Do not use trip indices for cooling device binding")
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b4444402
  3. 05 Oct, 2023 6 commits
  4. 03 Oct, 2023 1 commit
  5. 29 Sep, 2023 1 commit
  6. 28 Sep, 2023 11 commits
  7. 27 Sep, 2023 1 commit
  8. 26 Sep, 2023 10 commits
  9. 25 Sep, 2023 1 commit
    • Rafael J. Wysocki's avatar
      thermal: core: Drop trips_disabled bitmask · 95021088
      Rafael J. Wysocki authored
      After recent changes, thermal_zone_get_trip() cannot fail, as invoked
      from thermal_zone_device_register_with_trips(), so the only role of
      the trips_disabled bitmask is struct thermal_zone_device is to make
      handle_thermal_trip() skip trip points whose temperature was initially
      zero.  However, since the unit of temperature in the thermal core is
      millicelsius, zero may very well be a valid temperature value at least
      in some usage scenarios and the trip temperature may as well change
      later.  Thus there is no reason to permanently disable trip points
      with initial temperature equal to zero.
      
      Accordingly, drop the trips_disabled bitmask along with the code
      related to it.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      95021088
  10. 24 Sep, 2023 3 commits
    • Linus Torvalds's avatar
      Linux 6.6-rc3 · 6465e260
      Linus Torvalds authored
      6465e260
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8a511e7e
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
      "ARM:
      
         - Fix EL2 Stage-1 MMIO mappings where a random address was used
      
         - Fix SMCCC function number comparison when the SVE hint is set
      
        RISC-V:
      
         - Fix KVM_GET_REG_LIST API for ISA_EXT registers
      
         - Fix reading ISA_EXT register of a missing extension
      
         - Fix ISA_EXT register handling in get-reg-list test
      
         - Fix filtering of AIA registers in get-reg-list test
      
        x86:
      
         - Fixes for TSC_AUX virtualization
      
         - Stop zapping page tables asynchronously, since we don't zap them as
           often as before"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: SVM: Do not use user return MSR support for virtualized TSC_AUX
        KVM: SVM: Fix TSC_AUX virtualization setup
        KVM: SVM: INTERCEPT_RDTSCP is never intercepted anyway
        KVM: x86/mmu: Stop zapping invalidated TDP MMU roots asynchronously
        KVM: x86/mmu: Do not filter address spaces in for_each_tdp_mmu_root_yield_safe()
        KVM: x86/mmu: Open code leaf invalidation from mmu_notifier
        KVM: riscv: selftests: Selectively filter-out AIA registers
        KVM: riscv: selftests: Fix ISA_EXT register handling in get-reg-list
        RISC-V: KVM: Fix riscv_vcpu_get_isa_ext_single() for missing extensions
        RISC-V: KVM: Fix KVM_GET_REG_LIST API for ISA_EXT registers
        KVM: selftests: Assert that vasprintf() is successful
        KVM: arm64: nvhe: Ignore SVE hint in SMCCC function ID
        KVM: arm64: Properly return allocated EL2 VA from hyp_alloc_private_va_range()
      8a511e7e
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 5edc6bb3
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix the "bytes" output of the per_cpu stat file
      
         The tracefs/per_cpu/cpu*/stats "bytes" was giving bogus values as the
         accounting was not accurate. It is suppose to show how many used
         bytes are still in the ring buffer, but even when the ring buffer was
         empty it would still show there were bytes used.
      
       - Fix a bug in eventfs where reading a dynamic event directory (open)
         and then creating a dynamic event that goes into that diretory screws
         up the accounting.
      
         On close, the newly created event dentry will get a "dput" without
         ever having a "dget" done for it. The fix is to allocate an array on
         dir open to save what dentries were actually "dget" on, and what ones
         to "dput" on close.
      
      * tag 'trace-v6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        eventfs: Remember what dentries were created on dir open
        ring-buffer: Fix bytes info in per_cpu buffer stats
      5edc6bb3