kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Kconfig symbol fixes on powerpc
@ 2021-08-19 11:39 Lukas Bulwahn
  2021-08-19 11:39 ` [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select Lukas Bulwahn
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Lukas Bulwahn @ 2021-08-19 11:39 UTC (permalink / raw)
  To: Paul Mackerras, Michael Ellerman, Benjamin Herrenschmidt,
	Michael Neuling, Anshuman Khandual, kvm-ppc, linuxppc-dev
  Cc: Christophe Leroy, stable, kernel-janitors, linux-kernel, Lukas Bulwahn

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.

v1 -> v2:
  Followed Christophe Leroy's comment and drop the obsolete select.


Lukas

Lukas Bulwahn (2):
  powerpc: kvm: remove obsolete and unneeded select
  powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK

 arch/powerpc/kvm/Kconfig               | 1 -
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select
  2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
@ 2021-08-19 11:39 ` Lukas Bulwahn
  2021-08-19 22:39   ` Daniel Axtens
  2021-08-19 11:39 ` [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK Lukas Bulwahn
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Lukas Bulwahn @ 2021-08-19 11:39 UTC (permalink / raw)
  To: Paul Mackerras, Michael Ellerman, Benjamin Herrenschmidt,
	Michael Neuling, Anshuman Khandual, kvm-ppc, linuxppc-dev
  Cc: Christophe Leroy, stable, kernel-janitors, linux-kernel, 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
and this config PPC_DAWR is selected with PPC if PPC64, there is no
need for any further select in the KVM_BOOK3S_64_HANDLER.

Remove an obsolete and unneeded select in config KVM_BOOK3S_64_HANDLER.

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

Fixes: a278e7ea608b ("powerpc: Fix compile issue with force DAWR")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
 arch/powerpc/kvm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index e45644657d49..ff581d70f20c 100644
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -38,7 +38,6 @@ config KVM_BOOK3S_32_HANDLER
 config KVM_BOOK3S_64_HANDLER
 	bool
 	select KVM_BOOK3S_HANDLER
-	select PPC_DAWR_FORCE_ENABLE
 
 config KVM_BOOK3S_PR_POSSIBLE
 	bool
-- 
2.26.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK
  2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
  2021-08-19 11:39 ` [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select Lukas Bulwahn
@ 2021-08-19 11:39 ` Lukas Bulwahn
  2021-08-20  0:03   ` Daniel Axtens
  2021-08-19 11:50 ` [PATCH v2 0/2] Kconfig symbol fixes on powerpc Christophe Leroy
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Lukas Bulwahn @ 2021-08-19 11:39 UTC (permalink / raw)
  To: Paul Mackerras, Michael Ellerman, Benjamin Herrenschmidt,
	Michael Neuling, Anshuman Khandual, kvm-ppc, linuxppc-dev
  Cc: Christophe Leroy, stable, kernel-janitors, linux-kernel, 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")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 6794145603de..a208997ade88 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -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
-- 
2.26.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] Kconfig symbol fixes on powerpc
  2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
  2021-08-19 11:39 ` [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select Lukas Bulwahn
  2021-08-19 11:39 ` [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK Lukas Bulwahn
@ 2021-08-19 11:50 ` Christophe Leroy
  2021-08-27 13:15 ` Michael Ellerman
  2021-08-27 13:28 ` Michael Ellerman
  4 siblings, 0 replies; 9+ messages in thread
From: Christophe Leroy @ 2021-08-19 11:50 UTC (permalink / raw)
  To: Lukas Bulwahn, Paul Mackerras, Michael Ellerman,
	Benjamin Herrenschmidt, Michael Neuling, Anshuman Khandual,
	kvm-ppc, linuxppc-dev
  Cc: stable, kernel-janitors, linux-kernel



Le 19/08/2021 à 13:39, Lukas Bulwahn a écrit :
> 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.
> 
> v1 -> v2:
>    Followed Christophe Leroy's comment and drop the obsolete select.
> 


No need to change anything now, but as your two patches are completely independent, you could have 
submitted them separately. That would have avoided to resend both when changing the first one only.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select
  2021-08-19 11:39 ` [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select Lukas Bulwahn
@ 2021-08-19 22:39   ` Daniel Axtens
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Axtens @ 2021-08-19 22:39 UTC (permalink / raw)
  To: Lukas Bulwahn, Paul Mackerras, Michael Ellerman,
	Benjamin Herrenschmidt, Michael Neuling, Anshuman Khandual,
	kvm-ppc, linuxppc-dev
  Cc: Lukas Bulwahn, kernel-janitors, stable, linux-kernel

Hi Lukas,

> diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
> index e45644657d49..ff581d70f20c 100644
> --- a/arch/powerpc/kvm/Kconfig
> +++ b/arch/powerpc/kvm/Kconfig
> @@ -38,7 +38,6 @@ config KVM_BOOK3S_32_HANDLER
>  config KVM_BOOK3S_64_HANDLER
>  	bool
>  	select KVM_BOOK3S_HANDLER
> -	select PPC_DAWR_FORCE_ENABLE

I looked at some of the history here. It looks like this select was left
over from an earlier version of the patch series that added PPC_DAWR: v2
of the series has a new symbol PPC_DAWR_FORCE_ENABLE but by version 4
that new symbol had disappeared but the select had not.

v2: https://lore.kernel.org/linuxppc-dev/20190513071703.25243-1-mikey@neuling.org/
v5: https://lore.kernel.org/linuxppc-dev/20190604030037.9424-2-mikey@neuling.org/

The rest of the patch reasoning makes sense to me: DAWR support will be
selected anyway by virtue of PPC64->PPC_DAWR so there's no need to try
to select it again anyway.

Reviewed-by: Daniel Axtens <dja@axtens.net>

Kind regards,
Daniel

>  
>  config KVM_BOOK3S_PR_POSSIBLE
>  	bool
> -- 
> 2.26.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK
  2021-08-19 11:39 ` [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK Lukas Bulwahn
@ 2021-08-20  0:03   ` Daniel Axtens
  2021-08-20  4:25     ` Michael Ellerman
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Axtens @ 2021-08-20  0:03 UTC (permalink / raw)
  To: Lukas Bulwahn, Paul Mackerras, Michael Ellerman,
	Benjamin Herrenschmidt, Michael Neuling, Anshuman Khandual,
	kvm-ppc, linuxppc-dev
  Cc: Lukas Bulwahn, kernel-janitors, stable, linux-kernel

Lukas Bulwahn <lukas.bulwahn@gmail.com> writes:

> 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.
>

Yikes, yes, 66f24fa766e3 does seem to have got that wrong. It looks like
that went into 5.13.

I think we want to specifically target this for stable so that we don't
lose the perfomance and scalability benefits of split pmd ptlocks:

Cc: stable@vger.kernel.org # v5.13+

(I don't think you need to do another revision for this, I think mpe
could add it when merging.)

I tried to check whether we accidentally broke SPLIT_PMD_PTLOCKs while
they were disabled:

 - There hasn't been any change to the pgtable_pmd_page_ctor or _dtor
   prototypes, and we haven't made any relevant changes to any of the
   files in arch/powerpc that called it.

 - I checked out v5.13 and powerpc/merge, applied this patch, built a
   pseries_le_defconfig and boot tested it in qemu. It didn't crash on
   boot or with /bin/sh and some shell commands, but I didn't exactly
   stress test the VM subsystem either.

This gives me some confidence it's both good for powerpc and stable-worthy.

Overall:
Reviewed-by: Daniel Axtens <dja@axtens.net>

Kind regards,
Daniel

> Fixes: 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK")
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
>  arch/powerpc/platforms/Kconfig.cputype | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index 6794145603de..a208997ade88 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -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
> -- 
> 2.26.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK
  2021-08-20  0:03   ` Daniel Axtens
@ 2021-08-20  4:25     ` Michael Ellerman
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-20  4:25 UTC (permalink / raw)
  To: Daniel Axtens, Lukas Bulwahn, Paul Mackerras,
	Benjamin Herrenschmidt, Michael Neuling, Anshuman Khandual,
	kvm-ppc, linuxppc-dev
  Cc: Lukas Bulwahn, kernel-janitors, stable, linux-kernel

Daniel Axtens <dja@axtens.net> writes:
> Lukas Bulwahn <lukas.bulwahn@gmail.com> writes:
>
>> 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.
>>
>
> Yikes, yes, 66f24fa766e3 does seem to have got that wrong. It looks like
> that went into 5.13.
>
> I think we want to specifically target this for stable so that we don't
> lose the perfomance and scalability benefits of split pmd ptlocks:
>
> Cc: stable@vger.kernel.org # v5.13+
>
> (I don't think you need to do another revision for this, I think mpe
> could add it when merging.)

Yeah. I rewrote the change log a bit to make it clear this is a bug fix,
not a harmless cleanup.

cheers


  powerpc: Re-enable ARCH_ENABLE_SPLIT_PMD_PTLOCK
  
  Commit 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK")
  broke PMD split page table lock for powerpc.
  
  It selects the non-existent config ARCH_ENABLE_PMD_SPLIT_PTLOCK in
  arch/powerpc/platforms/Kconfig.cputype, but clearly intended to
  select ARCH_ENABLE_SPLIT_PMD_PTLOCK (notice the word swapping!), as
  that commit did for all other architectures.
  
  Fix it by selecting the correct symbol ARCH_ENABLE_SPLIT_PMD_PTLOCK.
  
  Fixes: 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK")
  Cc: stable@vger.kernel.org # v5.13+
  Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
  Reviewed-by: Daniel Axtens <dja@axtens.net>
  [mpe: Reword change log to make it clear this is a bug fix]
  Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  Link: https://lore.kernel.org/r/20210819113954.17515-3-lukas.bulwahn@gmail.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] Kconfig symbol fixes on powerpc
  2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
                   ` (2 preceding siblings ...)
  2021-08-19 11:50 ` [PATCH v2 0/2] Kconfig symbol fixes on powerpc Christophe Leroy
@ 2021-08-27 13:15 ` Michael Ellerman
  2021-08-27 13:28 ` Michael Ellerman
  4 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-27 13:15 UTC (permalink / raw)
  To: Lukas Bulwahn, linuxppc-dev, Michael Neuling, kvm-ppc,
	Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras,
	Anshuman Khandual
  Cc: kernel-janitors, stable, Christophe Leroy, linux-kernel

On Thu, 19 Aug 2021 13:39:52 +0200, Lukas Bulwahn wrote:
> 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.
> 
> [...]

Patch 1 applied to powerpc/next.

[1/2] powerpc: kvm: remove obsolete and unneeded select
      https://git.kernel.org/powerpc/c/c26d4c5d4f0df7207da3975458261927f9305465

cheers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] Kconfig symbol fixes on powerpc
  2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
                   ` (3 preceding siblings ...)
  2021-08-27 13:15 ` Michael Ellerman
@ 2021-08-27 13:28 ` Michael Ellerman
  4 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2021-08-27 13:28 UTC (permalink / raw)
  To: Michael Neuling, Anshuman Khandual, Paul Mackerras, kvm-ppc,
	Michael Ellerman, Lukas Bulwahn, Benjamin Herrenschmidt,
	linuxppc-dev
  Cc: linux-kernel, stable, kernel-janitors, Christophe Leroy

On Thu, 19 Aug 2021 13:39:52 +0200, Lukas Bulwahn wrote:
> 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.
> 
> [...]

Patch 2 applied to powerpc/fixes.

[2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK
      https://git.kernel.org/powerpc/c/310d2e83cb9b7f1e7232319880e3fcb57592fa10

cheers

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-27 13:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 11:39 [PATCH v2 0/2] Kconfig symbol fixes on powerpc Lukas Bulwahn
2021-08-19 11:39 ` [PATCH v2 1/2] powerpc: kvm: remove obsolete and unneeded select Lukas Bulwahn
2021-08-19 22:39   ` Daniel Axtens
2021-08-19 11:39 ` [PATCH v2 2/2] powerpc: rectify selection to ARCH_ENABLE_SPLIT_PMD_PTLOCK Lukas Bulwahn
2021-08-20  0:03   ` Daniel Axtens
2021-08-20  4:25     ` Michael Ellerman
2021-08-19 11:50 ` [PATCH v2 0/2] Kconfig symbol fixes on powerpc Christophe Leroy
2021-08-27 13:15 ` Michael Ellerman
2021-08-27 13:28 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).