* [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c
@ 2020-06-15 13:18 Christophe Leroy
2020-06-16 6:42 ` Michael Ellerman
2020-06-26 4:45 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy @ 2020-06-15 13:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linuxppc-dev, linux-kernel
H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined.
!= H_SUCCESS means != 0. Modify the test accordingly.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/mm/ptdump/hashpagetable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c
index a2c33efc7ce8..5b8bd34cd3a1 100644
--- a/arch/powerpc/mm/ptdump/hashpagetable.c
+++ b/arch/powerpc/mm/ptdump/hashpagetable.c
@@ -258,7 +258,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *
for (i = 0; i < HPTES_PER_GROUP; i += 4, hpte_group += 4) {
lpar_rc = plpar_pte_read_4(0, hpte_group, (void *)ptes);
- if (lpar_rc != H_SUCCESS)
+ if (lpar_rc)
continue;
for (j = 0; j < 4; j++) {
if (HPTE_V_COMPARE(ptes[j].v, want_v) &&
--
2.25.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c
2020-06-15 13:18 [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c Christophe Leroy
@ 2020-06-16 6:42 ` Michael Ellerman
2020-06-26 4:45 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-06-16 6:42 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined.
It's always defined in hvcall.h, but it doesn't always get included via
plpar_wrappers.h.
It looks to be CONFIG_SMP=n that causes that, for SMP=y we get a copy
via asm/spinlock.h
> != H_SUCCESS means != 0. Modify the test accordingly.
I guess that's an OK solution.
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
> Cc: stable@vger.kernel.org
I don't think it needs to go to stable, none of the defconfigs hit it,
we don't even really support SMP=n for 64-bit book3s.
cheers
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/mm/ptdump/hashpagetable.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c
> index a2c33efc7ce8..5b8bd34cd3a1 100644
> --- a/arch/powerpc/mm/ptdump/hashpagetable.c
> +++ b/arch/powerpc/mm/ptdump/hashpagetable.c
> @@ -258,7 +258,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *
> for (i = 0; i < HPTES_PER_GROUP; i += 4, hpte_group += 4) {
> lpar_rc = plpar_pte_read_4(0, hpte_group, (void *)ptes);
>
> - if (lpar_rc != H_SUCCESS)
> + if (lpar_rc)
> continue;
> for (j = 0; j < 4; j++) {
> if (HPTE_V_COMPARE(ptes[j].v, want_v) &&
> --
> 2.25.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c
2020-06-15 13:18 [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c Christophe Leroy
2020-06-16 6:42 ` Michael Ellerman
@ 2020-06-26 4:45 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-06-26 4:45 UTC (permalink / raw)
To: Christophe Leroy, Paul Mackerras, Benjamin Herrenschmidt,
Michael Ellerman
Cc: linuxppc-dev, linux-kernel
On Mon, 15 Jun 2020 13:18:39 +0000 (UTC), Christophe Leroy wrote:
> H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined.
>
> != H_SUCCESS means != 0. Modify the test accordingly.
Applied to powerpc/next.
[1/1] powerpc/ptdump: Fix build failure in hashpagetable.c
https://git.kernel.org/powerpc/c/7c466b0807960edc13e4b855be85ea765df9a6cd
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-26 5:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-15 13:18 [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c Christophe Leroy
2020-06-16 6:42 ` Michael Ellerman
2020-06-26 4:45 ` 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).