Skip to content

Commit 670eea9

Browse files
committed
powerpc/mm: Always use STRICT_MM_TYPECHECKS
Testing done by Paul Mackerras has shown that with a modern compiler there is no negative effect on code generation from enabling STRICT_MM_TYPECHECKS. So remove the option, and always use the strict type definitions. Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 8ffb410 commit 670eea9

2 files changed

Lines changed: 0 additions & 54 deletions

File tree

‎arch/powerpc/Kconfig.debug‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ config PPC_WERROR
1919
depends on !PPC_DISABLE_WERROR
2020
default y
2121

22-
config STRICT_MM_TYPECHECKS
23-
bool "Do extra type checking on mm types"
24-
default n
25-
help
26-
This option turns on extra type checking for some mm related types.
27-
28-
If you don't know what this means, say N.
29-
3022
config PRINT_STACK_DEPTH
3123
int "Stack depth to print" if DEBUG_KERNEL
3224
default 64

‎arch/powerpc/include/asm/pgtable-types.h‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#ifndef _ASM_POWERPC_PGTABLE_TYPES_H
22
#define _ASM_POWERPC_PGTABLE_TYPES_H
33

4-
#ifdef CONFIG_STRICT_MM_TYPECHECKS
5-
/* These are used to make use of C type-checking. */
6-
74
/* PTE level */
85
typedef struct { pte_basic_t pte; } pte_t;
96
#define __pte(x) ((pte_t) { (x) })
@@ -48,49 +45,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
4845
#define pgprot_val(x) ((x).pgprot)
4946
#define __pgprot(x) ((pgprot_t) { (x) })
5047

51-
#else
52-
53-
/*
54-
* .. while these make it easier on the compiler
55-
*/
56-
57-
typedef pte_basic_t pte_t;
58-
#define __pte(x) (x)
59-
static inline pte_basic_t pte_val(pte_t pte)
60-
{
61-
return pte;
62-
}
63-
64-
#ifdef CONFIG_PPC64
65-
typedef unsigned long pmd_t;
66-
#define __pmd(x) (x)
67-
static inline unsigned long pmd_val(pmd_t pmd)
68-
{
69-
return pmd;
70-
}
71-
72-
#if defined(CONFIG_PPC_BOOK3S_64) || !defined(CONFIG_PPC_64K_PAGES)
73-
typedef unsigned long pud_t;
74-
#define __pud(x) (x)
75-
static inline unsigned long pud_val(pud_t pud)
76-
{
77-
return pud;
78-
}
79-
#endif /* CONFIG_PPC_BOOK3S_64 || !CONFIG_PPC_64K_PAGES */
80-
#endif /* CONFIG_PPC64 */
81-
82-
typedef unsigned long pgd_t;
83-
#define __pgd(x) (x)
84-
static inline unsigned long pgd_val(pgd_t pgd)
85-
{
86-
return pgd;
87-
}
88-
89-
typedef unsigned long pgprot_t;
90-
#define pgprot_val(x) (x)
91-
#define __pgprot(x) (x)
92-
93-
#endif /* CONFIG_STRICT_MM_TYPECHECKS */
9448
/*
9549
* With hash config 64k pages additionally define a bigger "real PTE" type that
9650
* gathers the "second half" part of the PTE for pseudo 64k pages

0 commit comments

Comments
 (0)