Skip to contentSkip to conversation

Kconfig symbol fixes on powerpc

PATCH Superseded Lukas Bulwahn 3 participants 6 messages Aug 19, 2021

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Kconfig symbol fixes on powerpc

Dear powerpc maintainers,

The script ./scripts/checkkconfigsymbols.py warns on invalid references to Kconfig symbols (often, minor typos, name confusions or outdated references).

This patch series addresses all issues reported by ./scripts/checkkconfigsymbols.py in ./drivers/usb/ for Kconfig and Makefile files. Issues in the Kconfig and Makefile files indicate some shortcomings in the overall build definitions, and often are true actionable issues to address.

These issues can be identified and filtered by:

./scripts/checkkconfigsymbols.py | grep -E "arch/powerpc/.*(Kconfig|Makefile)" -B 1 -A 1

After applying this patch series on linux-next (next-20210817), the command above yields just two false positives (SHELL, r13) due to tool shortcomings.

As these two patches are fixes, please consider if they are suitable for backporting to stable.

Lukas

Lukas Bulwahn (2):
powerpc: kvm: rectify selection to PPC_DAWR
powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK

 arch/powerpc/kvm/Kconfig               | 2 +-
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 powerpc: kvm: rectify selection to PPC_DAWR

Commit a278e7ea608b ("powerpc: Fix compile issue with force DAWR") selects the non-existing config PPC_DAWR_FORCE_ENABLE for config KVM_BOOK3S_64_HANDLER. As this commit also introduces a config PPC_DAWR, it probably intends to select PPC_DAWR instead.

Rectify the selection in config KVM_BOOK3S_64_HANDLER to PPC_DAWR.

The issue was identified with ./scripts/checkkconfigsymbols.py.

Fixes a278e7ea608b ("powerpc: Fix compile issue with force DAWR")
---
 arch/powerpc/kvm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/Kconfig +1 -1
index e45644657d49..aa29ea56c80a 100644
@@ -38,7 +38,7 @@ config KVM_BOOK3S_32_HANDLER
 config KVM_BOOK3S_64_HANDLER
 	bool
 	select KVM_BOOK3S_HANDLER
-	select PPC_DAWR_FORCE_ENABLE
+	select PPC_DAWR
 
 config KVM_BOOK3S_PR_POSSIBLE
 	bool
Signature · 1 line
2.26.2
#2 lore raw

Re: [PATCH 1/2] powerpc: kvm: rectify selection to PPC_DAWR

Le 19/08/2021 à 11:32, Lukas Bulwahn a écrit :

Quoted 20 lines

Commit a278e7ea608b ("powerpc: Fix compile issue with force DAWR") selects the non-existing config PPC_DAWR_FORCE_ENABLE for config KVM_BOOK3S_64_HANDLER. As this commit also introduces a config PPC_DAWR, it probably intends to select PPC_DAWR instead.

Rectify the selection in config KVM_BOOK3S_64_HANDLER to PPC_DAWR.

The issue was identified with ./scripts/checkkconfigsymbols.py.

Fixes a278e7ea608b ("powerpc: Fix compile issue with force DAWR")
---
  arch/powerpc/kvm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/Kconfig +0 -0
index e45644657d49..aa29ea56c80a 100644

arch/powerpc/kvm/Kconfig config KVM_BOOK3S_32_HANDLER · line 41

Quoted 5 lines
arch/powerpc/kvm/Kconfig +1 -1
@@ -38,7 +38,7 @@ config KVM_BOOK3S_32_HANDLER
  config KVM_BOOK3S_64_HANDLER
  	bool
  	select KVM_BOOK3S_HANDLER
-	select PPC_DAWR_FORCE_ENABLE
+	select PPC_DAWR

That's useless, see https://elixir.bootlin.com/linux/v5.14-rc6/source/arch/powerpc/Kconfig#L267

In arch/powerpc/Kconfig, you already have:

	select PPC_DAWR				if PPC64
Quoted 4 lines
arch/powerpc/kvm/Kconfig +0 -0
  config KVM_BOOK3S_PR_POSSIBLE
  	bool
 
#3 lore raw

Re: [PATCH 1/2] powerpc: kvm: rectify selection to PPC_DAWR

Quoted 32 lines · Christophe Leroy
Quoted 20 lines · Lukas Bulwahn

Commit a278e7ea608b ("powerpc: Fix compile issue with force DAWR") selects the non-existing config PPC_DAWR_FORCE_ENABLE for config KVM_BOOK3S_64_HANDLER. As this commit also introduces a config PPC_DAWR, it probably intends to select PPC_DAWR instead.

Rectify the selection in config KVM_BOOK3S_64_HANDLER to PPC_DAWR.

The issue was identified with ./scripts/checkkconfigsymbols.py.

Fixes a278e7ea608b ("powerpc: Fix compile issue with force DAWR")
---
  arch/powerpc/kvm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/Kconfig +0 -0
index e45644657d49..aa29ea56c80a 100644

arch/powerpc/kvm/Kconfig config KVM_BOOK3S_32_HANDLER · line 41

Quoted 5 lines
arch/powerpc/kvm/Kconfig +1 -1
@@ -38,7 +38,7 @@ config KVM_BOOK3S_32_HANDLER
  config KVM_BOOK3S_64_HANDLER
      bool
      select KVM_BOOK3S_HANDLER
-     select PPC_DAWR_FORCE_ENABLE
+     select PPC_DAWR

That's useless, see https://elixir.bootlin.com/linux/v5.14-rc6/source/arch/powerpc/Kconfig#L267

Quoted 4 lines

In arch/powerpc/Kconfig, you already have:

select PPC_DAWR if PPC64

Ah, I see. Then, it is just a needless and non-effective select here, and then select can be deleted completely.

I will send a patch series v2.

Lukas

#4 lore raw

PATCH 2/2 powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK

In reply to Lukas Bulwahn

Commit 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK") selects the non-existing config ARCH_ENABLE_PMD_SPLIT_PTLOCK in ./arch/powerpc/platforms/Kconfig.cputype, but clearly it intends to select ARCH_ENABLE_SPLIT_PMD_PTLOCK here (notice the word swapping!), as this commit does select that for all other architectures.

Rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK instead.

Fixes 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK")
---
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/Kconfig.cputype +1 -1
index 6794145603de..a208997ade88 100644
@@ -98,7 +98,7 @@ config PPC_BOOK3S_64
 	select PPC_HAVE_PMU_SUPPORT
 	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
 	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
-	select ARCH_ENABLE_PMD_SPLIT_PTLOCK
+	select ARCH_ENABLE_SPLIT_PMD_PTLOCK
 	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
 	select ARCH_SUPPORTS_HUGETLBFS
 	select ARCH_SUPPORTS_NUMA_BALANCING
Signature · 1 line
2.26.2
#5 lore raw

Re: [PATCH 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK

Quoted 5 lines · Lukas Bulwahn

Commit 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK") selects the non-existing config ARCH_ENABLE_PMD_SPLIT_PTLOCK in ./arch/powerpc/platforms/Kconfig.cputype, but clearly it intends to select ARCH_ENABLE_SPLIT_PMD_PTLOCK here (notice the word swapping!), as this commit does select that for all other architectures.

Right, indeed the words here got swapped. They look very similar and also a cross compile would not even detect the problem because the non-existent config option would simply evaluate to 0. Thanks for catching this.

Quoted 23 lines

Rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK instead.

Fixes 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK")
---
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/Kconfig.cputype +1 -1
index 6794145603de..a208997ade88 100644
@@ -98,7 +98,7 @@ config PPC_BOOK3S_64
 	select PPC_HAVE_PMU_SUPPORT
 	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
 	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
-	select ARCH_ENABLE_PMD_SPLIT_PTLOCK
+	select ARCH_ENABLE_SPLIT_PMD_PTLOCK
 	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
 	select ARCH_SUPPORTS_HUGETLBFS
 	select ARCH_SUPPORTS_NUMA_BALANCING