-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.1 spidev module complains loudly about "buggy DT" #1054
Comments
Even though I understand the rationale, I find it strange that this change was accepted. The mantra is to not break userpace, which I would argue that this change leads to. And doesn't it break the DT ABI also? There are in-kernel DT's that use spidev. I agree that 3) would be the best choice for now. |
There have been a long 2 threads on the spi mailing list about that.
Unfortunately no solution has materialized besides the recommendation of patching spidev - |
here one of those threads: |
@popcornmix Are you happy with option 3, at least as an interim measure? It's a one-line addition to the spidev driver:
|
Okay by me. |
Pushed. |
The upstream SPI and DT maintainers are completely opposed to declaring in Device Tree that an SPI CS line is to be managed by the spidev driver, even though the facility is useful on a hobbyist device like a Raspberry Pi where arbitrary devices can be attached, and the alternative to DT declaration (spi_board_info) has been almost entirely rendered obsolete by DT. Continue to override their objections by disabling the warning. See: raspberrypi#3361 raspberrypi#1054 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
See: raspberrypi/linux#1054 Signed-off-by: Eran Matityahu <eran.m@variscite.com>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
See: raspberrypi/linux#1054 Signed-off-by: Eran Matityahu <eran.m@variscite.com>
See: raspberrypi/linux#1054 Signed-off-by: Eran Matityahu <eran.m@variscite.com> Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
See: raspberrypi/linux#1054 Signed-off-by: Eran Matityahu <eran.m@variscite.com>
[ Upstream commit e2abfc0 ] Commit 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") mistakenly added erratum #1054 as an OS Visible Workaround (OSVW) ID 0. Erratum #1054 is not OSVW ID 0 [1], so make it a legacy erratum. There would never have been a false positive on older hardware that has OSVW bit 0 set, since the IRPERF feature was not available. However, save a couple of RDMSR executions per thread, on modern system configurations that correctly set non-zero values in their OSVW_ID_Length MSRs. [1] Revision Guide for AMD Family 17h Models 00h-0Fh Processors. The revision guide is available from the bugzilla link below. Fixes: 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200417143356.26054-1-kim.phillips@amd.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit e2abfc0 ] Commit 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") mistakenly added erratum #1054 as an OS Visible Workaround (OSVW) ID 0. Erratum #1054 is not OSVW ID 0 [1], so make it a legacy erratum. There would never have been a false positive on older hardware that has OSVW bit 0 set, since the IRPERF feature was not available. However, save a couple of RDMSR executions per thread, on modern system configurations that correctly set non-zero values in their OSVW_ID_Length MSRs. [1] Revision Guide for AMD Family 17h Models 00h-0Fh Processors. The revision guide is available from the bugzilla link below. Fixes: 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200417143356.26054-1-kim.phillips@amd.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit e2abfc0 ] Commit 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") mistakenly added erratum #1054 as an OS Visible Workaround (OSVW) ID 0. Erratum #1054 is not OSVW ID 0 [1], so make it a legacy erratum. There would never have been a false positive on older hardware that has OSVW bit 0 set, since the IRPERF feature was not available. However, save a couple of RDMSR executions per thread, on modern system configurations that correctly set non-zero values in their OSVW_ID_Length MSRs. [1] Revision Guide for AMD Family 17h Models 00h-0Fh Processors. The revision guide is available from the bugzilla link below. Fixes: 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200417143356.26054-1-kim.phillips@amd.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Sasha Levin <sashal@kernel.org>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Yunus Bas <y.bas@phytec.de>
See: raspberrypi/linux#1054 Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Avoid warning [ 2.991522] spidev spi2.2: buggy DT: spidev listed directly in DT when using spidev in device tree. See raspberrypi/linux#1054 Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
spidev is the userspace interface to the SPI subsystem. It is (at least in some ways) analogous to i2c-dev.
The Raspberry Pi DTS files, in common with the upstream bcm2835 DTS's and those for many other platforms, use a compatible string of "spidev" to cause the spidev module to be loaded. A new commit in the upstream 4.1 branch (956b200) demonstrates the author's objection to this practice by causing the module to WARN when it detects that usage:
The commit message reads:
Following the analogy with i2c-dev, I can understand why this is frowned upon. Like i2c-dev, spidev does not talk directly to any hardware, but it is undoubtedly convenient to be able to load the module (with control over the maximum frequency) from the DT blob. And encouraging people to work around this by adding their specific devices to the list of compatible strings (i.e. making a generic module specific to a group of devices) seems bizarre.
There is currently only one device with a compatible string in the match table:
In other words, the only way to make an "approved" DT is currently to claim to be a DAC. This would probably break if that DAC ever got a dedicated driver module.
There are a few options that I can think of:
None of them are very palatable, but 3) seems the least disruptive.
@msperl: You've tried to raise this with the author - what are your thoughts?
The text was updated successfully, but these errors were encountered: