Skip to content

Commit f1e7c20

Browse files
committed
powerpc: Make STRICT_MM_TYPECHECKS a config option
The STRICT_MM_TYPECHECKS code has bit-rotted over the years. To make it possible to easily build test it, make it a CONFIG option. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 2222ce0 commit f1e7c20

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎arch/powerpc/Kconfig.debug‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ 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+
2230
config PRINT_STACK_DEPTH
2331
int "Stack depth to print" if DEBUG_KERNEL
2432
default 64

‎arch/powerpc/include/asm/page.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,7 @@ extern long long virt_phys_offset;
278278

279279
#ifndef __ASSEMBLY__
280280

281-
#undef STRICT_MM_TYPECHECKS
282-
283-
#ifdef STRICT_MM_TYPECHECKS
281+
#ifdef CONFIG_STRICT_MM_TYPECHECKS
284282
/* These are used to make use of C type-checking. */
285283

286284
/* PTE level */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
*/
119119
#ifndef __real_pte
120120

121-
#ifdef STRICT_MM_TYPECHECKS
121+
#ifdef CONFIG_STRICT_MM_TYPECHECKS
122122
#define __real_pte(e,p) ((real_pte_t){(e)})
123123
#define __rpte_to_pte(r) ((r).pte)
124124
#else

0 commit comments

Comments
 (0)