aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-08-30drm/msm: Remove unused pm_stateRob Clark1-2/+0
This was added in commit ec446d09366c ("drm/msm: call drm_atomic_helper_suspend() and drm_atomic_helper_resume()"), but unused since commit ca8199f13498 ("drm/msm/dpu: ensure device suspend happens during PM sleep") which switched to drm_mode_config_helper_suspend()/ drm_mode_config_helper_resume().. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/607746/
2024-08-30drm/msm: Remove prototypes for non-existing functionsLaurent Pinchart1-2/+0
The msm_atomic_state_clear() and msm_atomic_state_free() functions are declared but never defined. Remove their prototypes. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/610618/ Signed-off-by: Rob Clark <[email protected]>
2024-08-30drm/msm/adreno: Use kvmemdup to simplify the codeLi Zetao1-4/+2
Use kvmemdup instead of kvmalloc() + memcpy() to simplify the code. No functional change intended. Signed-off-by: Li Zetao <[email protected]> Reviewed-by: Akhil P Oommen <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/609596/ Signed-off-by: Rob Clark <[email protected]>
2024-08-30libbpf: Ensure new BTF objects inherit input endiannessTony Ambardar1-0/+4
New split BTF needs to preserve base's endianness. Similarly, when creating a distilled BTF, we need to preserve original endianness. Fix by updating libbpf's btf__distill_base() and btf_new_empty() to retain the byte order of any source BTF objects when creating new ones. Fixes: ba451366bf44 ("libbpf: Implement basic split BTF support") Fixes: 58e185a0dc35 ("libbpf: Add btf__distill_base() creating split BTF with distilled base BTF") Reported-by: Song Liu <[email protected]> Reported-by: Eduard Zingerman <[email protected]> Suggested-by: Eduard Zingerman <[email protected]> Signed-off-by: Tony Ambardar <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Alan Maguire <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]/ Link: https://lore.kernel.org/bpf/[email protected]
2024-08-30bpf: Fix a crash when btf_parse_base() returns an error pointerMartin KaFai Lau1-1/+1
The pointer returned by btf_parse_base could be an error pointer. IS_ERR() check is needed before calling btf_free(base_btf). Fixes: 8646db238997 ("libbpf,bpf: Share BTF relocate-related code with kernel") Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Reviewed-by: Alan Maguire <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
2024-08-30io_uring: add GCOV_PROFILE_URING Kconfig optionJens Axboe2-0/+17
If GCOV is enabled and this option is set, it enables code coverage profiling of the io_uring subsystem. Only use this for test purposes, as it will impact the runtime performance. Signed-off-by: Jens Axboe <[email protected]>
2024-08-30io_uring/kbuf: return correct iovec count from classic buffer peekJens Axboe1-1/+1
io_provided_buffers_select() returns 0 to indicate success, but it should be returning 1 to indicate that 1 vec was mapped. This causes peeking to fail with classic provided buffers, and while that's not a use case that anyone should use, it should still work correctly. The end result is that no buffer will be selected, and hence a completion with '0' as the result will be posted, without a buffer attached. Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers") Signed-off-by: Jens Axboe <[email protected]>
2024-08-30fbdev: efifb: Use driver-private screen_info for sysfsThomas Weißschuh1-1/+3
Since commit b9cfd1d271ab ("fbdev/efifb: Use screen_info pointer from device") efifb uses a local copy of screen_info and applies its modifications there. Adapt the sysfs attributes to also work with the custom copy instead of the unmodified platform data. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: efifb: Use devm_register_framebuffer()Thomas Weißschuh1-11/+1
This simplifies the error handling. Also the drvdata slot is now unused and can be used for other usecases. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: efifb: Register sysfs groups through driver coreThomas Weißschuh1-9/+2
The driver core can register and cleanup sysfs groups already. Make use of that functionality to simplify the error handling and cleanup. Also avoid a UAF race during unregistering where the sysctl attributes were usable after the info struct was freed. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: Introduce devm_register_framebuffer()Thomas Weißschuh2-0/+31
Introduce a device-managed variant of register_framebuffer() which automatically unregisters the framebuffer on device destruction. This can simplify the error handling and resource management in drivers. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: omapfb: Use sysfs_emit_at() to simplify codeChristophe JAILLET1-22/+14
This file already uses sysfs_emit(). So be consistent and also use sysfs_emit_at(). Moreover, size is always < PAGE_SIZE because scnprintf() (and now sysfs_emit_at()) returns the number of characters written not including the trailing '\0'. So some tests can be removed. This slightly simplifies the code and makes it more readable. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()Christophe JAILLET1-7/+8
Use sysfs_emit_at() instead of snprintf() + custom logic. Using sysfs_emit_at() is much more simple. Also, sysfs_emit() is already used in this function, so using sysfs_emit_at() is more consistent. Also simplify the logic: - always add a space after an entry - change the last space into a '\n' Finally it is easy to see that, given the size of cabc_modes, PAGE_SIZE can not be reached. So better keep everything simple (and correct). Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: mmp: Use devm_clk_get_enabled() helpersying zuxin1-5/+1
The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). Signed-off-by: ying zuxin <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30fbdev: hpfb: Fix an error handling path in hpfb_dio_probe()Christophe JAILLET1-0/+1
If an error occurs after request_mem_region(), a corresponding release_mem_region() should be called, as already done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2024-08-30bpf: Use sockfd_put() helperJinjie Ruan1-1/+1
Replace fput() with sockfd_put() in bpf_fd_reuseport_array_update_elem(). Signed-off-by: Jinjie Ruan <[email protected]> Acked-by: Stanislav Fomichev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2024-08-30drm/xe/hwmon: Treat hwmon as a per-device conceptMatt Roper1-42/+53
There's only one instance of hwmon per device, and MMIO access to it is always done through the root tile. The code has been passing around a pointer to the root tile's primary GT, which is confusing since this isn't really a GT-level concept. Replace that pointer with an xe_device pointer and use xe_root_mmio_gt(xe) to get a pointer when we need to do register MMIO. This makes things easier to follow, and also cleans up the code in preparation for a much larger MMIO register access overhaul that's coming soon. Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-08-30drm/xe/pcode: Treat pcode as per-tile rather than per-GTMatt Roper11-79/+85
There's only one instance of the pcode per tile, and for GT-related accesses both the primary and media GT share the same register interface. Since Xe was using per-GT locking, the pcode mutex wasn't actually protecting everything that it should since concurrent accesses related to a tile's primary GT and media GT were possible. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-08-30drm/xe/display: Drop unnecessary xe_gt.h includesMatt Roper4-4/+0
None of the Xe display files work directly with the GT or need anything from xe_gt.h. Drop the unnecessary include. Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Himal Prasad Ghimiray <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-08-30selftests: vDSO: quash clang omitted parameter warning in getrandom testJason A. Donenfeld1-3/+3
When building with clang, there's this warning: vdso_test_getrandom.c:145:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] 145 | static void *test_vdso_getrandom(void *) | ^ vdso_test_getrandom.c:155:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] 155 | static void *test_libc_getrandom(void *) | ^ vdso_test_getrandom.c:165:43: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] 165 | static void *test_syscall_getrandom(void *) Add the named ctx parameter to quash it. Reported-by: Mark Brown <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
2024-08-30bpf: Remove custom build ruleAlexey Gladkov4-6/+6
According to the documentation, when building a kernel with the C=2 parameter, all source files should be checked. But this does not happen for the kernel/bpf/ directory. $ touch kernel/bpf/core.o $ make C=2 CHECK=true kernel/bpf/core.o Outputs: CHECK scripts/mod/empty.c CALL scripts/checksyscalls.sh DESCEND objtool INSTALL libsubcmd_headers CC kernel/bpf/core.o As can be seen the compilation is done, but CHECK is not executed. This happens because kernel/bpf/Makefile has defined its own rule for compilation and forgotten the macro that does the check. There is no need to duplicate the build code, and this rule can be removed to use generic rules. Acked-by: Masahiro Yamada <[email protected]> Tested-by: Oleg Nesterov <[email protected]> Tested-by: Alan Maguire <[email protected]> Signed-off-by: Alexey Gladkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2024-08-30arm64: zynqmp: Add PCIe phys property for ZCU102Sean Anderson1-0/+1
Add PCIe phy bindings for the ZCU102. Link: https://lore.kernel.org/r/[email protected] Tested-by: Thippeswamy Havalige <[email protected]> Signed-off-by: Sean Anderson <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Michal Simek <[email protected]>
2024-08-30hwmon: (ina2xx) Use shunt voltage to calculate currentGuenter Roeck1-1/+13
Since the shunt voltage and the current register report the same values when the chip is calibrated, we can calculate the current directly from the shunt voltage without relying on chip calibration. With this change, the current register is no longer accessed. Its register address is only used to indicate if reading or writing current or shunt voltage is desired when accessing registers. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Add support for current limitsGuenter Roeck2-2/+63
While the chips supported by this driver do not directly support current limits, they do support setting shunt voltage limits. The shunt voltage divided by the shunt resistor value is the current. On top of that, calibration values are set such that in the shunt voltage register and the current register report the same values. That means we can report and configure current limits based on shunt voltage limits, and we can do so with much better accuracy than by setting shunt voltage limits. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Pass register to alert limit write functionsGuenter Roeck1-10/+11
Pass the to-be-limited register to alert functions and use it to determine conversion from limit to register value. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Convert to use with_info hwmon APIGuenter Roeck1-202/+293
Convert driver to use the with_info hardware monitoring API to reduce its dependency on sysfs attribute functions. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Move ina2xx_get_value()Guenter Roeck1-36/+36
ina2xx_get_value() will be needed earlier in the next patch, so move it. No functional change. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Set alert latchGuenter Roeck1-2/+5
Alerts should only be cleared after reported, not immediately after the alert condition has been cleared. Set the latch enable bit to keep alerts latched until the alert register has been read from the chip. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Consolidate chip initialization codeGuenter Roeck1-68/+43
Move all chip initialization code into a single function. No functional change. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Fix various overflow issuesGuenter Roeck1-12/+20
Module tests show various overflow problems when writing limits and other attributes. in0_crit: Suspected overflow: [max=82, read 0, written 2147483648] in0_lcrit: Suspected overflow: [max=82, read 0, written 2147483648] in1_crit: Suspected overflow: [max=40959, read 0, written 2147483647] in1_lcrit: Suspected overflow: [max=40959, read 0, written 2147483647] power1_crit: Suspected overflow: [max=134218750, read 0, written 2147483648] update_interval: Suspected overflow: [max=2253, read 2, written 2147483647] Implement missing clamping on attribute write operations to avoid those problems. While at it, check in the probe function if the shunt resistor value passed from devicetree is valid, and bail out if it isn't. Also limit mutex use to the code calling ina2xx_set_shunt() since it isn't needed when called from the probe function. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Re-initialize chip using regmap functionsGuenter Roeck1-9/+41
If it is necessary to re-initialize the chip, for example because it has been power cycled, use regmap functions to update register contents. This ensures that all registers, including the configuration register and alert registers, are updated to previously configured values without having to locally cache everything. For this to work, volatile registers have to be marked as volatile. Also, the cache needs to be bypassed when reading the calibration and mask_enable registers. While the calibration register is not volatile, it will be reset to 0 if the chip has been power cycled. Most of the bits in the mask_enable register are configuration bits, except for bit 4 which reports if an alert has been observed. Both registers need to be marked as non-volatile to be updated after a power cycle, but it is necessary to bypass the cache when reading them to detect if the chip has been power cycled and to read the alert status. The chip does not support register auto-increments. It is therefore necessary to configure regmap to use single register read/write operations. Otherwise regmap tries to write all registers in a single operation when synchronizing register contents with the hardware, and the synchronization fails. Another necessary change is to declare ina226_alert_to_reg() as u16. So far it returned an s16 which is sign extended to a large negative value which is then sent to regmap as unsigned int, causing an -EINVAL error return. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Use local regmap pointer if used more than onceGuenter Roeck1-13/+10
If regmap is accessed more than once in a function, declare and used local regmap variable. While at it, drop low value debug messages. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Mark regmap_config as constGuenter Roeck1-10/+2
Recent versions of checkpatch complain that struct regmap_config should be declared as const. WARNING: struct regmap_config should normally be const Doing so reveals a potential problem in the driver: If both supported chips are present in a single system, the maximum number of registers may race when devices are instantiated since max_registers is updated in the probe function. Solve the problem by setting .max_registers to the maximum register address of all supported chips. This does not make a practical difference while fixing the potential race condition and reducing code complexity. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Use bit operationsGuenter Roeck1-42/+42
Use bit operations where possible to make the code more generic and to align it with other drivers. Also use compile time conversion from bit to mask to reduce runtime overhead. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Replace platform data with device propertiesGuenter Roeck1-12/+4
There are no in-tree users of ina2xx platform data. Drop it and support device properties instead as alternative if it should ever be needed. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30hwmon: (ina2xx) Reorder include files to alphabetic orderGuenter Roeck1-8/+7
Simplify driver maintenance by reordering include files to alphabetic order. Whule at it, drop unnecessary / unused jiffies.h. No functional change. Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2024-08-30arm64: smccc: Reserve block of KVM "vendor" services for pKVM hypercallsWill Deacon1-0/+60
pKVM relies on hypercalls to expose services such as memory sharing to protected guests. Tentatively allocate a block of 58 hypercalls (i.e. fill the remaining space in the first 64 function IDs) for pKVM usage, as future extensions such as pvIOMMU support, range-based memory sharing and validation of assigned devices will require additional services. Suggested-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30drivers/virt: pkvm: Intercept ioremap using pKVM MMIO_GUARD hypercallWill Deacon3-0/+68
Hook up pKVM's MMIO_GUARD hypercall so that ioremap() and friends will register the target physical address as MMIO with the hypervisor, allowing guest exits to that page to be emulated by the host with full syndrome information. Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30arm64: mm: Add confidential computing hook to ioremap_prot()Will Deacon2-1/+26
Confidential Computing environments such as pKVM and Arm's CCA distinguish between shared (i.e. emulated) and private (i.e. assigned) MMIO regions. Introduce a hook into our implementation of ioremap_prot() so that MMIO regions can be shared if necessary. Reviewed-by: Catalin Marinas <[email protected]> Reviewed-by: Steven Price <[email protected]> Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30drivers/virt: pkvm: Hook up mem_encrypt API using pKVM hypercallsWill Deacon3-0/+119
If we detect the presence of pKVM's SHARE and UNSHARE hypercalls, then register a backend implementation of the mem_encrypt API so that things like DMA buffers can be shared appropriately with the host. Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30arm64: mm: Add top-level dispatcher for internal mem_encrypt APIWill Deacon5-1/+68
Implementing the internal mem_encrypt API for arm64 depends entirely on the Confidential Computing environment in which the kernel is running. Introduce a simple dispatcher so that backend hooks can be registered depending upon the environment in which the kernel finds itself. Reviewed-by: Catalin Marinas <[email protected]> Reviewed-by: Steven Price <[email protected]> Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30drivers/virt: pkvm: Add initial support for running as a protected guestWill Deacon8-0/+88
Implement a pKVM protected guest driver to probe the presence of pKVM and determine the memory protection granule using the HYP_MEMINFO hypercall. Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30firmware/smccc: Call arch-specific hook on discovering KVM servicesMarc Zyngier3-0/+8
arm64 will soon require its own callback to initialise services that are only available on this architecture. Introduce a hook that can be overloaded by the architecture. Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30kselftest/arm64: Fix build warnings for ptraceDev Jain1-2/+2
A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly introduced ksft_exit_fail_perror(). Signed-off-by: Dev Jain <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30iommu/arm-smmu-v3-test: Test masters with stall enabledMostafa Saleh1-21/+62
At the moment, the SMMUv3 unit tests assume ATS is always enabled, although this is sufficient to test hitless/non-hitless transitions, but exercising other features is useful to check ste/cd population logic (for example the .get_used logic). Add an enum where bits define features per-master, at the moment there is only ATS and STALLs which are mutually exclusive, but this would make it easier to extend with other features in the future. Also, Add 2 more tests for s1 <-> s2 transitions with stalls enabled. Signed-off-by: Mostafa Saleh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30iommu/arm-smmu-v3: Match Stall behaviour for S2Mostafa Saleh2-5/+4
According to the spec (ARM IHI 0070 F.b), in "5.5 Fault configuration (A, R, S bits)": A STE with stage 2 translation enabled and STE.S2S == 0 is considered ILLEGAL if SMMU_IDR0.STALL_MODEL == 0b10. Also described in the pseudocode “SteIllegal()” if STE.Config == '11x' then [..] if eff_idr0_stall_model == '10' && STE.S2S == '0' then // stall_model forcing stall, but S2S == 0 return TRUE; Which means, S2S must be set when stall model is "ARM_SMMU_FEAT_STALL_FORCE", but currently the driver ignores that. Although, the driver can do the minimum and only set S2S for “ARM_SMMU_FEAT_STALL_FORCE”, it is more consistent to match S1 behaviour, which also sets it for “ARM_SMMU_FEAT_STALL” if the master has requested stalls. Also, since S2 stalls are enabled now, report them to the IOMMU layer and for VFIO devices it will fail anyway as VFIO doesn’t register an iopf handler. Signed-off-by: Mostafa Saleh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
2024-08-30ASoC: cs-amp-lib: Add KUnit test case for empty calibration entriesRichard Fitzgerald1-0/+44
Add a test case for commit bb4485562f59 ("ASoC: cs-amp-lib: Ignore empty UEFI calibration entries"). Any entries in the calibration blob that have calTime==0 are empty entries. So they must not be returned by a lookup. Signed-off-by: Richard Fitzgerald <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-08-30clk: rockchip: fix error for unknown clocksSebastian Reichel1-1/+2
There is a clk == NULL check after the switch to check for unsupported clk types. Since clk is re-assigned in a loop, this check is useless right now for anything but the first round. Let's fix this up by assigning clk = NULL in the loop before the switch statement. Fixes: a245fecbb806 ("clk: rockchip: add basic infrastructure for clock branches") Cc: [email protected] Signed-off-by: Sebastian Reichel <[email protected]> [added fixes + stable-cc] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
2024-08-30clk: rockchip: rk3588: drop unused codeSebastian Reichel1-40/+0
All clocks are registered early using CLK_OF_DECLARE(), which marks the DT node as processed. For the processed DT node the probe routine is never called. Thus this whole code is never executed. This could be "fixed" by using CLK_OF_DECLARE_DRIVER, which avoids marking the DT node as processed. But then the probe routine would re-register all the clocks by calling rk3588_clk_init() again. Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
2024-08-30nvme: fix metadata handling in nvme-passthroughPuranjay Mohan1-8/+14
On an NVMe namespace that does not support metadata, it is possible to send an IO command with metadata through io-passthru. This allows issues like [1] to trigger in the completion code path. nvme_map_user_request() doesn't check if the namespace supports metadata before sending it forward. It also allows admin commands with metadata to be processed as it ignores metadata when bdev == NULL and may report success. Reject an IO command with metadata when the NVMe namespace doesn't support it and reject an admin command if it has metadata. [1] https://lore.kernel.org/all/[email protected]/ Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Puranjay Mohan <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Anuj Gupta <[email protected]> Signed-off-by: Keith Busch <[email protected]>