Summary: | sys-kernel/gentoo-sources-5.7.8 .. 5.7.12 - WARNING: CPU: 0 PID: 496333 at drivers/i2c/busses/i2c-designware-common.c:247 i2c_dw_clk_rate+0x11/0x20 [i2c_designware_core] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Liam Dennehy <liam> |
Component: | Current packages | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugzilla.kernel.org/show_bug.cgi?id=208625 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Liam Dennehy
2020-08-12 16:43:12 UTC
Well this is rather random:
$ diff designware-no-warning.config designware-warning.config
309c309
< CONFIG_X86_AMD_PLATFORM_DEVICE=y
---
> # CONFIG_X86_AMD_PLATFORM_DEVICE is not set
So, enable CONFIG_X86_AMD_PLATFORM_DEVICE and no more kernel warning...
(In reply to Liam Dennehy from comment #1) > Well this is rather random: > > $ diff designware-no-warning.config designware-warning.config > 309c309 > < CONFIG_X86_AMD_PLATFORM_DEVICE=y > --- > > # CONFIG_X86_AMD_PLATFORM_DEVICE is not set > > So, enable CONFIG_X86_AMD_PLATFORM_DEVICE and no more kernel warning... Something that trickles down from that must be causing it .. from the report, its related to some i2c driver code. This is likely a sledgehammer fix whilst the real bug is identified .. It may be more foundational than trickle down. From https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/Kconfig?h=v5.7.12&id=67da9e2c2b730b9b788ace749d22d769cf11ee2b#n638 > I2C and UART depend on COMMON_CLK to set clock. Relevant code from warning in 5.7.12 drivers/i2c/busses/i2c-designware-common.c:241 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/i2c/busses/i2c-designware-common.c?h=v5.7.12&id=67da9e2c2b730b9b788ace749d22d769cf11ee2b#n241 ``` unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev) { /* * Clock is not necessary if we got LCNT/HCNT values directly from * the platform code. */ if (WARN_ON_ONCE(!dev->get_clk_rate_khz)) return 0; return dev->get_clk_rate_khz(dev); } ``` It seems this platform driver is serving a clock other modules/drivers depend on? Is this still an issue with later kernels? Not seeing this fault on 5.10.27 Good news, please reopen if you see it I just saw this on 5.15.26 Enabling CONFIG_X86_AMD_PLATFORM_DEVICE made it go away. |