* [PATCH] powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k
@ 2020-06-15 7:48 Christophe Leroy
2020-06-26 4:45 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2020-06-15 7:48 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Albert Herranz
Cc: linux-kernel, linuxppc-dev
FIX_EARLY_DEBUG_BASE reserves a 128k area for debuging.
When page size is 256k, the calculation results in a 0 number of
pages, leading to the following failure:
CC arch/powerpc/kernel/asm-offsets.s
In file included from ./arch/powerpc/include/asm/nohash/32/pgtable.h:77:0,
from ./arch/powerpc/include/asm/nohash/pgtable.h:8,
from ./arch/powerpc/include/asm/pgtable.h:20,
from ./include/linux/pgtable.h:6,
from ./arch/powerpc/include/asm/kup.h:42,
from ./arch/powerpc/include/asm/uaccess.h:9,
from ./include/linux/uaccess.h:11,
from ./include/linux/crypto.h:21,
from ./include/crypto/hash.h:11,
from ./include/linux/uio.h:10,
from ./include/linux/socket.h:8,
from ./include/linux/compat.h:15,
from arch/powerpc/kernel/asm-offsets.c:14:
./arch/powerpc/include/asm/fixmap.h:75:2: error: overflow in enumeration values
__end_of_permanent_fixed_addresses,
^
make[2]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
Ensure the debug area is at least one page.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: b8e8efaa8639 ("powerpc: reserve fixmap entries for early debug")
Cc: stable@vger.kernel.org
Cc: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/fixmap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h
index 29188810ba30..925cf89cbf4b 100644
--- a/arch/powerpc/include/asm/fixmap.h
+++ b/arch/powerpc/include/asm/fixmap.h
@@ -52,7 +52,7 @@ enum fixed_addresses {
FIX_HOLE,
/* reserve the top 128K for early debugging purposes */
FIX_EARLY_DEBUG_TOP = FIX_HOLE,
- FIX_EARLY_DEBUG_BASE = FIX_EARLY_DEBUG_TOP+((128*1024)/PAGE_SIZE)-1,
+ FIX_EARLY_DEBUG_BASE = FIX_EARLY_DEBUG_TOP+(ALIGN(SZ_128, PAGE_SIZE)/PAGE_SIZE)-1,
#ifdef CONFIG_HIGHMEM
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k
2020-06-15 7:48 [PATCH] powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k Christophe Leroy
@ 2020-06-26 4:45 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-06-26 4:45 UTC (permalink / raw)
To: Paul Mackerras, Christophe Leroy, Benjamin Herrenschmidt,
Albert Herranz, Michael Ellerman
Cc: linuxppc-dev, linux-kernel
On Mon, 15 Jun 2020 07:48:25 +0000 (UTC), Christophe Leroy wrote:
> FIX_EARLY_DEBUG_BASE reserves a 128k area for debuging.
>
> When page size is 256k, the calculation results in a 0 number of
> pages, leading to the following failure:
>
> CC arch/powerpc/kernel/asm-offsets.s
> In file included from ./arch/powerpc/include/asm/nohash/32/pgtable.h:77:0,
> from ./arch/powerpc/include/asm/nohash/pgtable.h:8,
> from ./arch/powerpc/include/asm/pgtable.h:20,
> from ./include/linux/pgtable.h:6,
> from ./arch/powerpc/include/asm/kup.h:42,
> from ./arch/powerpc/include/asm/uaccess.h:9,
> from ./include/linux/uaccess.h:11,
> from ./include/linux/crypto.h:21,
> from ./include/crypto/hash.h:11,
> from ./include/linux/uio.h:10,
> from ./include/linux/socket.h:8,
> from ./include/linux/compat.h:15,
> from arch/powerpc/kernel/asm-offsets.c:14:
> ./arch/powerpc/include/asm/fixmap.h:75:2: error: overflow in enumeration values
> __end_of_permanent_fixed_addresses,
> ^
> make[2]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k
https://git.kernel.org/powerpc/c/03fd42d458fb9cb69e712600bd69ff77ff3a45a8
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-26 4:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 7:48 [PATCH] powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k Christophe Leroy
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).