Thread (55 messages) flat view 55 messages, 3 authors, 2020-04-02

Re: [PATCH v1 16/46] powerpc/mm: Allocate static page tables for fixmap

From: Luc Van Oostenryck <hidden>
Date: 2020-03-17 16:00:13
Also in: lkml

On Tue, Mar 17, 2020 at 03:38:46PM +0100, Christophe Leroy wrote:
quoted
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index f62de06e3d07..9934659cb871 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -29,11 +29,27 @@
  #include <asm/fixmap.h>
  #include <asm/setup.h>
  #include <asm/sections.h>
+#include <asm/early_ioremap.h>
  #include <mm/mmu_decl.h>
  extern char etext[], _stext[], _sinittext[], _einittext[];
+static u8 early_fixmap_pagetable[FIXMAP_PTE_SIZE] __page_aligned_data;
Sparse reports this as a variable size array. This is definitely not. Gcc
properly sees it is an 8k table (2 pages).
Yes, thing is that FIXMAP_PTE_SIZE is not that constant since it uses
__builtin_ffs() (via PTE_SHIFT / PTE_T_LOG2).
Nevertheless, since Sparse v0.6.1 (released in October) accepts these
in constant expressions, like GCC does.

-- Luc
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help