[PW_SID:1154548] hwmon: (lm63) Add Sensylink CTF2301 support - #2558
[PW_SID:1154548] hwmon: (lm63) Add Sensylink CTF2301 support#2558linux-riscv-bot wants to merge 13 commits into
Conversation
…_RWX When CONFIG_STRICT_MODULE_RWX is not set, execmem cannot create temporary writable mappings for read-only executable pages. In this case, the execmem ranges must already have writable permissions. Currently EXECMEM_KPROBES unconditionally uses PAGE_KERNEL_READ_EXEC, which causes kprobe instruction slot writes to trigger page faults on systems where CONFIG_STRICT_MODULE_RWX is not enabled. Fix this by using PAGE_KERNEL_EXEC when CONFIG_STRICT_MODULE_RWX is not available. Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Nam Cao <namcao@linutronix.de> Link: https://patch.msgid.link/20260814082742.148403-2-xiaofengmian@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
patch_map() always creates a temporary writable mapping via fixmap for kernel text addresses, even when CONFIG_STRICT_KERNEL_RWX is disabled and the kernel text is already mapped with _PAGE_WRITE. This is unnecessary overhead at best, and on minimal configurations it can cause page faults. Skip the fixmap path for kernel text when CONFIG_STRICT_KERNEL_RWX is not enabled, since the text pages are already writable in that case. The module text path is already gated on CONFIG_STRICT_MODULE_RWX and is kept unchanged. Reported-by: Klara Modin <klara@kasm.eu> Closes: https://lore.kernel.org/all/ant_8TaBbov_GS4i@soda.int.kasm.eu/ Reported-by: Lad Prabhakar <prabhakar.csengg@gmail.com> Closes: https://lore.kernel.org/all/CA+V-a8tQK8rih9SGGTyqrEBGpNkx4H0eX2YccCRrgkVAPr+EBg@mail.gmail.com/ Tested-by: Klara Modin <klarasmodin@gmail.com> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20260814082742.148403-3-xiaofengmian@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
This reverts commit 3033b2b. The reverted patch is userspace-visible behavior change, not a bug fix. The two variables here (pmm and pmlen) control two independent features: pmm is the _hardware_ pointer masking mode that applies while executing in userspace. pmlen is the shift amount that the _kernel_ uses when untagging addresses; PMLEN_0 means no untagging occurs, so the kernel does not accept tagged addresses in syscall arguments. It is valid (as documented and tested by the self test) to enable pointer masking without enabling the tagged address ABI. This separation is necessary to allow userspace to create an execution environment similar to what the kernel supports on arm64 by default, where TBI is enabled but the tagged address ABI is not. (On arm64, there is no equivalent to PR_PMLEN_MASK because TBI is always enabled.) Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Link: https://patch.msgid.link/20260820014551.1979772-1-samuel.holland@sifive.com Cc: stable@vger.kernel.org Fixes: 3033b2b ("riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set") Signed-off-by: Paul Walmsley <pjw@kernel.org>
Prefer the convenient string choice 'str_disabled_enabled()' helper over hardcoded strings in 'setup_global_riscv_enable()'. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://patch.msgid.link/20260819160546.3219942-1-dmantipov@yandex.ru Signed-off-by: Paul Walmsley <pjw@kernel.org>
The vendor-extension handlers reached from hwprobe_one_pair() (hwprobe_isa_vendor_ext_thead_0() and friends) only OR the present bits into pair->value via VENDOR_EXTENSION_SUPPORTED() and clear their own missing bits; they assume the caller has already zeroed pair->value. That holds for hwprobe_get_values() (it zeroes each pair) and hwprobe_get_cpus() (it re-initializes its scratch pair per key), but not for complete_hwprobe_vdso_data(), which reuses a single pair across all keys without re-zeroing. A vendor key therefore inherits stale bits from the previously probed key, and the wrong value is cached in the vDSO all_cpu_hwprobe_values[] and handed to userspace on the fast patih. Zero pair->value once at the top of hwprobe_one_pair() so every handler starts from a clean value regardless of the caller, and drop the now redundant zeroing in the *_BLOCK_SIZE cases. hwprobe_isa_ext0() keeps its own zeroing because hwprobe_ext0_has() calls it directly, bypassing hwprobe_one_pair(). Fixes: a5ea53d ("riscv: hwprobe: Add thead vendor extension probing") Signed-off-by: Andy Chiu <tchiu@tenstorrent.com> Reviewed-by: Jesse Taube <jtaubepe@redhat.com> Link: https://patch.msgid.link/20260725001614.2578617-2-tchiu@tenstorrent.com Cc: stable@vger.kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
x86 did this in commit b0a848f ("x86/bugs: Make i386 use GENERIC_BUG_RELATIVE_POINTERS") powerpc did this in commit 1baa1f7 ("powerpc: Allow relative pointers in bug table entries") Similar as x86 and powerpc does, make RV32 use GENERIC_BUG_RELATIVE_POINTERS for "there is only one code path." and "less #ifdef is more better". Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://patch.msgid.link/20260221024255.3552-1-jszhang@kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
Add the vendor prefix for Sensylink Microelectronics. Link: https://en.sensylink.com/ Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move the National Semiconductor LM63, LM64, and LM96163 compatibles out of trivial-devices.yaml and into a dedicated binding. Describe their integrated fan control and preserve the optional interrupt used by the ALERT output. Permit use as thermal cooling devices via #cooling-cells. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the Sensylink CTF2301 temperature sensor and fan controller to the LM63 family binding. The chip follows the LM63 register model and can provide a thermal cooling device when #cooling-cells is present. Do not provide a national,lm63 fallback because the CTF2301 is not fully compatible with LM63. It uses different conversion-rate encodings, extended local-temperature registers, additional fan lookup table entries, and device-specific PWM and ALERT/TACH configuration. An older LM63 driver would therefore not operate the device correctly. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add Sensylink CTF2301 support to the LM63 driver. CTF2301 follows the LM63-style temperature, tachometer, and PWM register layout, while using a 12-bit local temperature register and requiring the ALERT/TACH pin to be configured for tachometer input. Register an optional thermal cooling device when the device tree node provides #cooling-cells, allowing thermal zones to control the fan through the existing PWM path without changing behavior for existing LM63-family users. Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the K3 I2C6 pinctrl state used by boards that route I2C6 to pads 7 and 8. Use a 25 mA drive strength, which is supported for both K3 IO voltage domains, and leave board-specific IO voltage selection to board files. Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Enable I2C6 on the K3 CoM260 module and describe the Sensylink CTF2301 temperature sensor and fan controller at address 0x4c. Override the I2C6 pin power source at board level because the IO rail voltage is board-specific. Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 1: "[v4,1/6] dt-bindings: vendor-prefixes: Add Sensylink" |
|
Patch 2: "[v4,2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding" |
|
Patch 2: "[v4,2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding" |
|
Patch 2: "[v4,2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding" |
|
Patch 2: "[v4,2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding" |
|
Patch 2: "[v4,2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 5: "[v4,5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
6f6f7c0 to
1252e7d
Compare
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
|
Patch 6: "[v4,6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260" |
9ed823f to
a54e736
Compare
PR for series 1154548 applied to workflow__riscv__fixes
Name: hwmon: (lm63) Add Sensylink CTF2301 support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1154548
Version: 4