Dear Thomas,
The script ./scripts/checkkconfigsymbols.py warns on invalid references to
Kconfig symbols (often, minor typos, name confusions or outdated references).
This is a patch series addressing the issues reported by
./scripts/checkkconfigsymbols.py in the ./arch/mips/ directory, quickly
filtered down with:
./scripts/checkkconfigsymbols.py | grep "arch/mips" -B 1
without considering kernel configs, i.e., after removing ./arch/mips/configs
in the working tree. It addresses all issues I considered to be "true
positives"; so, issues that should be addressed and cleaned up.
The patches on updating the comments might arguably be considered of lower
value by itself, but as the other patches show, checkkconfigsymbols does detect
some relevant issues in the kernel tree otherwise being unnoticed.
So, it might be worth to clean up the kernel tree to have checkkconfigsymbols
produce a rather short list of issues and then continuously follow and check
what checkkconfigsymbols reports.
These are the remaining reports from checkkconfigsymbols in ./arch/mips, which
are not addressed in this series:
SGI_IP35
Referencing files: arch/mips/include/asm/sn/addrs.h, arch/mips/include/asm/sn/agent.h, arch/mips/include/asm/sn/klconfig.h
Rationale: Ralf Baechle rejected a patch to remove the "upstream-dead"
SGI_IP35 code in 2014, because there was still some out-of-tree users.
We might want to recheck if these out-of-tree users still exist or if this
code can be dropped now.
See email discussion: https://lore.kernel.org/lkml/1400584909.4912.35.camel@x220/T/#mf1d73d4f531bab670beb30aa0adfce34cbcad528
SHELL
Referencing files: arch/mips/Makefile, arch/mips/kernel/syscalls/Makefile
Rationale: Ignore CONFIG_SHELL. Default variable in Kbuild build system.
Each patch in this series can be discussed and applied individually. They are
sent in one patch series, as they all orginate from the investigation guided
by the same tool and hence share similar topics and resolutions.
Please pick this series of minor clean-up patches on ./arch/mips/. It applies
cleanly on next-20211210. The patches with Fixes: tags might be considerable
for stable.
Best regards,
Lukas
Lukas Bulwahn (9):
mips: drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250
mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support
mips: drop selecting non-existing config NR_CPUS_DEFAULT_2
mips: dec: provide the correctly capitalized config CPU_R4X00 in init
error message
mips: kgdb: adjust the comment to the actual ifdef condition
mips: remove obsolete selection of CPU_HAS_LOAD_STORE_LR
mips: alchemy: remove historic comment on gpio build constraints
mips: txx9: remove left-over for removed TXX9_ACLC configs
mips: fix Kconfig reference to PHYS_ADDR_T_64BIT
arch/mips/Kconfig | 9 +++++----
arch/mips/alchemy/common/gpiolib.c | 2 --
arch/mips/dec/prom/init.c | 2 +-
arch/mips/include/asm/kgdb.h | 2 +-
arch/mips/txx9/Kconfig | 3 ---
arch/mips/txx9/generic/setup.c | 28 ----------------------------
6 files changed, 7 insertions(+), 39 deletions(-)
--
2.26.2
Commit 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic
MIPS system") introduces config MACH_REALTEK_RTL, which selects the
non-existing config SYS_HAS_EARLY_PRINTK_8250.
As the MACH_REALTEK_RTL config also selects SYS_HAS_EARLY_PRINTK and
USE_GENERIC_EARLY_PRINTK_8250, an early printk with 8250 should be covered.
Probably SYS_HAS_EARLY_PRINTK_8250 is just some left-over from an early
draft version of this commit.
Drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250.
Fixes: 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS system")
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 00951bfdbab0..c89ce68d9580 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -640,7 +640,6 @@ config MACH_REALTEK_RTL
select SYS_SUPPORTS_MULTITHREADING
select SYS_SUPPORTS_VPE_LOADER
select SYS_HAS_EARLY_PRINTK
- select SYS_HAS_EARLY_PRINTK_8250
select USE_GENERIC_EARLY_PRINTK_8250
select BOOT_RAW
select PINCTRL
--
2.26.2
Commit ab7c01fdc3cf ("mips: Add MIPS Release 5 support") adds the two
configs CPU_MIPS32_R5 and CPU_MIPS64_R5, which depend on the corresponding
SYS_HAS_CPU_MIPS32_R5 and SYS_HAS_CPU_MIPS64_R5, respectively.
The config SYS_HAS_CPU_MIPS32_R5 was already introduced with commit
c5b367835cfc ("MIPS: Add support for XPA."); the config
SYS_HAS_CPU_MIPS64_R5, however, was never introduced.
Hence, ./scripts/checkkconfigsymbols.py warns:
SYS_HAS_CPU_MIPS64_R5
Referencing files: arch/mips/Kconfig, arch/mips/include/asm/cpu-type.h
Add the definition for config SYS_HAS_CPU_MIPS64_R5 under the assumption
that SYS_HAS_CPU_MIPS64_R5 follows the same pattern as the existing
SYS_HAS_CPU_MIPS32_R5 and SYS_HAS_CPU_MIPS64_R6.
Fixes: ab7c01fdc3cf ("mips: Add MIPS Release 5 support")
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c89ce68d9580..878affb643e4 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1905,6 +1905,10 @@ config SYS_HAS_CPU_MIPS64_R1
config SYS_HAS_CPU_MIPS64_R2
bool
+config SYS_HAS_CPU_MIPS64_R5
+ bool
+ select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
+
config SYS_HAS_CPU_MIPS64_R6
bool
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
--
2.26.2
Commit c5eaff3e857e ("MIPS: Kconfig: Drop obsolete NR_CPUS_DEFAULT_{1,2}
options") removed the config NR_CPUS_DEFAULT_2, as with this commit, the
NR_CPUS default value is 2.
Commit 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)") introduces
the config SGI_IP30, which selects the removed config NR_CPUS_DEFAULT_2,
but this has actually no effect.
Fortunately, NR_CPUS defaults to 2 when there is no specific
NR_CPUS_DEFAULT_* config selected. So, the effect of the intended
'select NR_CPUS_DEFAULT_2' is achieved without further ado.
Drop selecting the non-existing config NR_CPUS_DEFAULT_2.
The issue was identified with ./scripts/checkkconfigsymbols.py.
Fixes: 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)")
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 878affb643e4..e329214ac06c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -763,7 +763,6 @@ config SGI_IP30
select HAVE_PCI
select IRQ_MIPS_CPU
select IRQ_DOMAIN_HIERARCHY
- select NR_CPUS_DEFAULT_2
select PCI_DRIVERS_GENERIC
select PCI_XTALK_BRIDGE
select SYS_HAS_EARLY_PRINTK
--
2.26.2
The config for MIPS R4000-series processors is named CPU_R4X00 with
upper-case X, not CPU_R4x00 as the error message suggests.
Hence, ./scripts/checkkconfigsymbols.py reports this invalid reference:
CPU_R4x00
Referencing files: arch/mips/dec/prom/init.c
When human users encounter this error message, they probably just deal
with this minor discrepancy; so, the spelling never was a big deal here.
Still, the script ./scripts/checkkconfigsymbols.py has been quite useful
to identify a number of bugs with Kconfig symbols and deserves to be
executed and checked regularly.
So, repair the error message to reduce the reports made the script and
simplify to use this script, as new issues are easier to spot when the
list of reports is shorter.
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/dec/prom/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c
index cc988bbd27fc..cb12eb211a49 100644
--- a/arch/mips/dec/prom/init.c
+++ b/arch/mips/dec/prom/init.c
@@ -113,7 +113,7 @@ void __init prom_init(void)
if ((current_cpu_type() == CPU_R4000SC) ||
(current_cpu_type() == CPU_R4400SC)) {
static const char r4k_msg[] __initconst =
- "Please recompile with \"CONFIG_CPU_R4x00 = y\".\n";
+ "Please recompile with \"CONFIG_CPU_R4X00 = y\".\n";
printk(cpu_msg);
printk(r4k_msg);
dec_machine_halt();
--
2.26.2
The comment refers to CONFIG_CPU_32BIT, but the ifdef uses CONFIG_32BIT.
As this ifdef and comment was introduced with initial mips-kgdb commit
8854700115ec ("[MIPS] kgdb: add arch support for the kernel's kgdb core"),
it is probably just a minor issue that was overlooked during the patch
creation and refactoring before submission.
This inconsistency was identified with ./scripts/checkkconfigsymbols.py.
This script has been quite useful to identify a number of bugs with
Kconfig symbols and deserves to be executed and checked regularly.
So, adjust the comment to the actual ifdef condition to reduce the
reports made the script and simplify to use this script, as new issues
are easier to spot when the list of reports is shorter.
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/include/asm/kgdb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/kgdb.h b/arch/mips/include/asm/kgdb.h
index 4f2302267deb..b4e210d633c2 100644
--- a/arch/mips/include/asm/kgdb.h
+++ b/arch/mips/include/asm/kgdb.h
@@ -18,7 +18,7 @@
#ifdef CONFIG_32BIT
#define KGDB_GDB_REG_SIZE 32
#define GDB_SIZEOF_REG sizeof(u32)
-#else /* CONFIG_CPU_32BIT */
+#else /* CONFIG_32BIT */
#define KGDB_GDB_REG_SIZE 64
#define GDB_SIZEOF_REG sizeof(u64)
#endif
--
2.26.2
Commit 18d84e2e55b6 ("MIPS: make CPU_HAS_LOAD_STORE_LR opt-out") replaced
the config CPU_HAS_LOAD_STORE_LR by the config with an inverted semantics,
making the "LOAD_STORE_LR" cpu configuration the default.
The ./arch/mips/Kconfig was adjusted accordingly.
Later, commit 65ce6197ed40 ("Revert "MIPS: Remove unused R4300 CPU
support"") reintroduces a select CPU_HAS_LOAD_STORE_LR through its revert
commit, restoring the config CPU_R4300 in ./arch/mips/Kconfig before the
refactoring above.
This select however now refers to a non-existing config and is further
unneeded, as LOAD_STORE_LR is the default now.
Remove the obsolete select for the reintroduced mips R4300 architecture.
This issue is identified with ./scripts/checkkconfigsymbols.py.
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e329214ac06c..dafc1d62c224 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1608,7 +1608,6 @@ config CPU_R4300
depends on SYS_HAS_CPU_R4300
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL
- select CPU_HAS_LOAD_STORE_LR
help
MIPS Technologies R4300-series processors.
--
2.26.2
The patch series "Remove support for TX49xx" (see Link) was only partially
applied: The ASoC driver was removed with commit a8644292ea46 ("ASoC:
txx9: Remove driver"), which was patch 10/10 from that series. The mips
architecture code to be removed with patch 1/10 from that series was not
applied.
This partial patch series application leaves the build config setup and
code in the mips architecture in a slightly unclean, intermediate state.
The configs HAS_TXX9_ACLC and SND_SOC_TXX9ACLC were removed, but are still
referenced in the txx9-architecture Kconfig and generic setup.
The script ./scripts/checkkconfigsymbols.py warns about this:
HAS_TXX9_ACLC
Referencing files: arch/mips/txx9/Kconfig
SND_SOC_TXX9ACLC
Referencing files: arch/mips/txx9/generic/setup.c
Clean up the code for those removed references.
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/txx9/Kconfig | 3 ---
arch/mips/txx9/generic/setup.c | 28 ----------------------------
2 files changed, 31 deletions(-)
diff --git a/arch/mips/txx9/Kconfig b/arch/mips/txx9/Kconfig
index a5484c284353..d9710fddac4f 100644
--- a/arch/mips/txx9/Kconfig
+++ b/arch/mips/txx9/Kconfig
@@ -64,7 +64,6 @@ config SOC_TX4927
select IRQ_TXX9
select PCI_TX4927
select GPIO_TXX9
- imply HAS_TXX9_ACLC
config SOC_TX4938
bool
@@ -74,7 +73,6 @@ config SOC_TX4938
select IRQ_TXX9
select PCI_TX4927
select GPIO_TXX9
- imply HAS_TXX9_ACLC
config SOC_TX4939
bool
@@ -82,7 +80,6 @@ config SOC_TX4939
imply HAS_TXX9_SERIAL
select HAVE_PCI
select PCI_TX4927
- imply HAS_TXX9_ACLC
config TXX9_7SEGLED
bool
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 5c42da622b8b..c7c1e30e8f3b 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -835,34 +835,6 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq,
unsigned int dma_chan_out,
unsigned int dma_chan_in)
{
-#if IS_ENABLED(CONFIG_SND_SOC_TXX9ACLC)
- unsigned int dma_base = dmac_id * TXX9_DMA_MAX_NR_CHANNELS;
- struct resource res[] = {
- {
- .start = baseaddr,
- .end = baseaddr + 0x100 - 1,
- .flags = IORESOURCE_MEM,
- }, {
- .start = irq,
- .flags = IORESOURCE_IRQ,
- }, {
- .name = "txx9dmac-chan",
- .start = dma_base + dma_chan_out,
- .flags = IORESOURCE_DMA,
- }, {
- .name = "txx9dmac-chan",
- .start = dma_base + dma_chan_in,
- .flags = IORESOURCE_DMA,
- }
- };
- struct platform_device *pdev =
- platform_device_alloc("txx9aclc-ac97", -1);
-
- if (!pdev ||
- platform_device_add_resources(pdev, res, ARRAY_SIZE(res)) ||
- platform_device_add(pdev))
- platform_device_put(pdev);
-#endif
}
static struct bus_type txx9_sramc_subsys = {
--
2.26.2
Commit d4a451d5fc84 ("arch: remove the ARCH_PHYS_ADDR_T_64BIT config
symbol") removes config ARCH_PHYS_ADDR_T_64BIT with all instances of that
config refactored appropriately. Since then, it is recommended to use the
config PHYS_ADDR_T_64BIT instead.
Commit 171543e75272 ("MIPS: Disallow CPU_SUPPORTS_HUGEPAGES for XPA,EVA")
introduces the expression "!(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))"
for config CPU_SUPPORTS_HUGEPAGES, which unintentionally refers to the
non-existing symbol ARCH_PHYS_ADDR_T_64BIT instead of the intended
PHYS_ADDR_T_64BIT.
Fix this Kconfig reference to the intended PHYS_ADDR_T_64BIT.
This issue was identified with the script ./scripts/checkkconfigsymbols.py.
I then reported it on the mailing list and Paul confirmed the mistake in
the linked email thread.
Link: https://lore.kernel.org/lkml/[email protected]/
Suggested-by: Paul Cercueil <[email protected]>
Fixes: 171543e75272 ("MIPS: Disallow CPU_SUPPORTS_HUGEPAGES for XPA,EVA")
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index dafc1d62c224..affa31d055d0 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2065,7 +2065,7 @@ config CPU_SUPPORTS_ADDRWINCFG
bool
config CPU_SUPPORTS_HUGEPAGES
bool
- depends on !(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))
+ depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
config MIPS_PGD_C0_CONTEXT
bool
depends on 64BIT
--
2.26.2
In ./arch/mips/alchemy/common/gpiolib.c, the comment points out certain
build constraints on CONFIG_GPIOLIB and CONFIG_ALCHEMY_GPIO_INDIRECT.
The commit 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h")
makes all mips machines use the common gpio.h and removes the config
ALCHEMY_GPIO_INDIRECT. So, this makes the comment in alchemy's gpiolib.c
historic and obsolete, and can be removed after the commit above.
The issue on the reference to a non-existing Kconfig symbol was identified
with ./scripts/checkkconfigsymbols.py. This script has been quite useful
to identify a number of bugs with Kconfig symbols and deserves to be
executed and checked regularly.
So, remove the historic comment to reduce the reports made the script and
simplify to use this script, as new issues are easier to spot when the
list of reports is shorter.
Signed-off-by: Lukas Bulwahn <[email protected]>
---
arch/mips/alchemy/common/gpiolib.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/mips/alchemy/common/gpiolib.c b/arch/mips/alchemy/common/gpiolib.c
index 7d5da5edd74d..a17d7a8909c4 100644
--- a/arch/mips/alchemy/common/gpiolib.c
+++ b/arch/mips/alchemy/common/gpiolib.c
@@ -23,8 +23,6 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Notes :
- * This file must ONLY be built when CONFIG_GPIOLIB=y and
- * CONFIG_ALCHEMY_GPIO_INDIRECT=n, otherwise compilation will fail!
* au1000 SoC have only one GPIO block : GPIO1
* Au1100, Au15x0, Au12x0 have a second one : GPIO2
* Au1300 is totally different: 1 block with up to 128 GPIOs
--
2.26.2
Hi Lukas,
Thanks for the patch!
On Mon, 2021-12-13 at 12:16 +0100, Lukas Bulwahn wrote:
> Commit 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic
> MIPS system") introduces config MACH_REALTEK_RTL, which selects the
> non-existing config SYS_HAS_EARLY_PRINTK_8250.
>
> As the MACH_REALTEK_RTL config also selects SYS_HAS_EARLY_PRINTK and
> USE_GENERIC_EARLY_PRINTK_8250, an early printk with 8250 should be covered.
> Probably SYS_HAS_EARLY_PRINTK_8250 is just some left-over from an early
> draft version of this commit.
>
> Drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250.
>
> Fixes: 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS system")
> Signed-off-by: Lukas Bulwahn <[email protected]>
> ---
> arch/mips/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 00951bfdbab0..c89ce68d9580 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -640,7 +640,6 @@ config MACH_REALTEK_RTL
> select SYS_SUPPORTS_MULTITHREADING
> select SYS_SUPPORTS_VPE_LOADER
> select SYS_HAS_EARLY_PRINTK
> - select SYS_HAS_EARLY_PRINTK_8250
> select USE_GENERIC_EARLY_PRINTK_8250
> select BOOT_RAW
> select PINCTRL
MACH_REALTEK_RTL doesn't actually call setup_8250_early_printk_port(). That means
USE_GENERIC_EARLY_PRINTK_8250 is also not needed. Being MIPS_GENERIC, that additionaly
means SYS_HAS_EARLY_PRINTK doesn't need to be selected.
I only recently found the MIPS_GENERIC "early" console therefore doesn't actually work,
but we use the "ns16550a" earlycon console instead. So feel free to also drop the other
two other EARLY_PRINTK symbols, if you think this is in-scope for this patch. Otherwise I
can submit a separate patch later.
In any case:
Acked-by: Sander Vanheule <[email protected]>
Best,
Sander
On Mon, Dec 13, 2021 at 7:52 PM Sander Vanheule <[email protected]> wrote:
>
> Hi Lukas,
>
> Thanks for the patch!
>
> On Mon, 2021-12-13 at 12:16 +0100, Lukas Bulwahn wrote:
> > Commit 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic
> > MIPS system") introduces config MACH_REALTEK_RTL, which selects the
> > non-existing config SYS_HAS_EARLY_PRINTK_8250.
> >
> > As the MACH_REALTEK_RTL config also selects SYS_HAS_EARLY_PRINTK and
> > USE_GENERIC_EARLY_PRINTK_8250, an early printk with 8250 should be covered.
> > Probably SYS_HAS_EARLY_PRINTK_8250 is just some left-over from an early
> > draft version of this commit.
> >
> > Drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250.
> >
> > Fixes: 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS system")
> > Signed-off-by: Lukas Bulwahn <[email protected]>
> > ---
> > arch/mips/Kconfig | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index 00951bfdbab0..c89ce68d9580 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -640,7 +640,6 @@ config MACH_REALTEK_RTL
> > select SYS_SUPPORTS_MULTITHREADING
> > select SYS_SUPPORTS_VPE_LOADER
> > select SYS_HAS_EARLY_PRINTK
> > - select SYS_HAS_EARLY_PRINTK_8250
> > select USE_GENERIC_EARLY_PRINTK_8250
> > select BOOT_RAW
> > select PINCTRL
>
> MACH_REALTEK_RTL doesn't actually call setup_8250_early_printk_port(). That means
> USE_GENERIC_EARLY_PRINTK_8250 is also not needed. Being MIPS_GENERIC, that additionaly
> means SYS_HAS_EARLY_PRINTK doesn't need to be selected.
>
> I only recently found the MIPS_GENERIC "early" console therefore doesn't actually work,
> but we use the "ns16550a" earlycon console instead. So feel free to also drop the other
> two other EARLY_PRINTK symbols, if you think this is in-scope for this patch. Otherwise I
> can submit a separate patch later.
>
> In any case:
> Acked-by: Sander Vanheule <[email protected]>
>
I am fine either way. Thomas, also feel free to just drop this patch
in the series and take the full clean-up patch from Sander.
Lukas
Hi Lukas,
On Tue, 2021-12-14 at 13:25 +0100, Lukas Bulwahn wrote:
> On Mon, Dec 13, 2021 at 7:52 PM Sander Vanheule <[email protected]> wrote:
> >
> > Hi Lukas,
> >
> > Thanks for the patch!
> >
> > On Mon, 2021-12-13 at 12:16 +0100, Lukas Bulwahn wrote:
> > > Commit 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic
> > > MIPS system") introduces config MACH_REALTEK_RTL, which selects the
> > > non-existing config SYS_HAS_EARLY_PRINTK_8250.
> > >
> > > As the MACH_REALTEK_RTL config also selects SYS_HAS_EARLY_PRINTK and
> > > USE_GENERIC_EARLY_PRINTK_8250, an early printk with 8250 should be covered.
> > > Probably SYS_HAS_EARLY_PRINTK_8250 is just some left-over from an early
> > > draft version of this commit.
> > >
> > > Drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250.
> > >
> > > Fixes: 4042147a0cc6 ("MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS
> > > system")
> > > Signed-off-by: Lukas Bulwahn <[email protected]>
> > > ---
> > > arch/mips/Kconfig | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > > index 00951bfdbab0..c89ce68d9580 100644
> > > --- a/arch/mips/Kconfig
> > > +++ b/arch/mips/Kconfig
> > > @@ -640,7 +640,6 @@ config MACH_REALTEK_RTL
> > > select SYS_SUPPORTS_MULTITHREADING
> > > select SYS_SUPPORTS_VPE_LOADER
> > > select SYS_HAS_EARLY_PRINTK
> > > - select SYS_HAS_EARLY_PRINTK_8250
> > > select USE_GENERIC_EARLY_PRINTK_8250
> > > select BOOT_RAW
> > > select PINCTRL
> >
> > MACH_REALTEK_RTL doesn't actually call setup_8250_early_printk_port(). That means
> > USE_GENERIC_EARLY_PRINTK_8250 is also not needed. Being MIPS_GENERIC, that
> > additionaly
> > means SYS_HAS_EARLY_PRINTK doesn't need to be selected.
> >
> > I only recently found the MIPS_GENERIC "early" console therefore doesn't actually
> > work,
> > but we use the "ns16550a" earlycon console instead. So feel free to also drop the
> > other
> > two other EARLY_PRINTK symbols, if you think this is in-scope for this patch.
> > Otherwise I
> > can submit a separate patch later.
> >
> > In any case:
> > Acked-by: Sander Vanheule <[email protected]>
> >
>
> I am fine either way. Thomas, also feel free to just drop this patch
> in the series and take the full clean-up patch from Sander.
I've submitted my clean-up patch for all three configs, so I guess this patch is now
superseded.
Best,
Sander
On Mon, Dec 13, 2021 at 12:16:33PM +0100, Lukas Bulwahn wrote:
> Dear Thomas,
>
> The script ./scripts/checkkconfigsymbols.py warns on invalid references to
> Kconfig symbols (often, minor typos, name confusions or outdated references).
> This is a patch series addressing the issues reported by
> ./scripts/checkkconfigsymbols.py in the ./arch/mips/ directory, quickly
> filtered down with:
>
> ./scripts/checkkconfigsymbols.py | grep "arch/mips" -B 1
>
> without considering kernel configs, i.e., after removing ./arch/mips/configs
> in the working tree. It addresses all issues I considered to be "true
> positives"; so, issues that should be addressed and cleaned up.
>
> The patches on updating the comments might arguably be considered of lower
> value by itself, but as the other patches show, checkkconfigsymbols does detect
> some relevant issues in the kernel tree otherwise being unnoticed.
> So, it might be worth to clean up the kernel tree to have checkkconfigsymbols
> produce a rather short list of issues and then continuously follow and check
> what checkkconfigsymbols reports.
>
> These are the remaining reports from checkkconfigsymbols in ./arch/mips, which
> are not addressed in this series:
>
> SGI_IP35
> Referencing files: arch/mips/include/asm/sn/addrs.h, arch/mips/include/asm/sn/agent.h, arch/mips/include/asm/sn/klconfig.h
>
> Rationale: Ralf Baechle rejected a patch to remove the "upstream-dead"
> SGI_IP35 code in 2014, because there was still some out-of-tree users.
> We might want to recheck if these out-of-tree users still exist or if this
> code can be dropped now.
> See email discussion: https://lore.kernel.org/lkml/1400584909.4912.35.camel@x220/T/#mf1d73d4f531bab670beb30aa0adfce34cbcad528
>
> SHELL
> Referencing files: arch/mips/Makefile, arch/mips/kernel/syscalls/Makefile
>
> Rationale: Ignore CONFIG_SHELL. Default variable in Kbuild build system.
>
>
> Each patch in this series can be discussed and applied individually. They are
> sent in one patch series, as they all orginate from the investigation guided
> by the same tool and hence share similar topics and resolutions.
>
> Please pick this series of minor clean-up patches on ./arch/mips/. It applies
> cleanly on next-20211210. The patches with Fixes: tags might be considerable
> for stable.
>
>
> Best regards,
>
> Lukas
>
>
> Lukas Bulwahn (9):
> mips: drop selecting the non-existing config SYS_HAS_EARLY_PRINTK_8250
> mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support
> mips: drop selecting non-existing config NR_CPUS_DEFAULT_2
> mips: dec: provide the correctly capitalized config CPU_R4X00 in init
> error message
> mips: kgdb: adjust the comment to the actual ifdef condition
> mips: remove obsolete selection of CPU_HAS_LOAD_STORE_LR
> mips: alchemy: remove historic comment on gpio build constraints
> mips: txx9: remove left-over for removed TXX9_ACLC configs
> mips: fix Kconfig reference to PHYS_ADDR_T_64BIT
>
> arch/mips/Kconfig | 9 +++++----
> arch/mips/alchemy/common/gpiolib.c | 2 --
> arch/mips/dec/prom/init.c | 2 +-
> arch/mips/include/asm/kgdb.h | 2 +-
> arch/mips/txx9/Kconfig | 3 ---
> arch/mips/txx9/generic/setup.c | 28 ----------------------------
> 6 files changed, 7 insertions(+), 39 deletions(-)
>
> --
> 2.26.2
applied patches 2-8 to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]