Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] Kill off the PTE_FMT macro

32-bit powerpc uses a PTE_FMT macro to handle printk() formatting of
PTE entries (which can vary in type and size). Apparently there was a
good reason for it once, but with current compilers it's simpler just
to workaround the variation with a cast in the printk() itself
(there's only one use).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

David Gibson and committed by
Paul Mackerras
0aeafb0c 2abb7019

+2 -3
-2
include/asm-powerpc/page_32.h
··· 14 14 #ifdef CONFIG_PTE_64BIT 15 15 typedef unsigned long long pte_basic_t; 16 16 #define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */ 17 - #define PTE_FMT "%16Lx" 18 17 #else 19 18 typedef unsigned long pte_basic_t; 20 19 #define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */ 21 - #define PTE_FMT "%.8lx" 22 20 #endif 23 21 24 22 struct page;
+2 -1
include/asm-powerpc/pgtable-ppc32.h
··· 101 101 #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) 102 102 103 103 #define pte_ERROR(e) \ 104 - printk("%s:%d: bad pte "PTE_FMT".\n", __FILE__, __LINE__, pte_val(e)) 104 + printk("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \ 105 + (unsigned long long)pte_val(e)) 105 106 #define pmd_ERROR(e) \ 106 107 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e)) 107 108 #define pgd_ERROR(e) \