Skip to content

Commit

Permalink
powerpc: Make STRICT_MM_TYPECHECKS a config option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mpe committed May 11, 2015
1 parent 2222ce0 commit f1e7c20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ config PPC_WERROR
depends on !PPC_DISABLE_WERROR
default y

config STRICT_MM_TYPECHECKS
bool "Do extra type checking on mm types"
default n
help
This option turns on extra type checking for some mm related types.

If you don't know what this means, say N.

config PRINT_STACK_DEPTH
int "Stack depth to print" if DEBUG_KERNEL
default 64
Expand Down
4 changes: 1 addition & 3 deletions arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ extern long long virt_phys_offset;

#ifndef __ASSEMBLY__

#undef STRICT_MM_TYPECHECKS

#ifdef STRICT_MM_TYPECHECKS
#ifdef CONFIG_STRICT_MM_TYPECHECKS
/* These are used to make use of C type-checking. */

/* PTE level */
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/pgtable-ppc64.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
*/
#ifndef __real_pte

#ifdef STRICT_MM_TYPECHECKS
#ifdef CONFIG_STRICT_MM_TYPECHECKS
#define __real_pte(e,p) ((real_pte_t){(e)})
#define __rpte_to_pte(r) ((r).pte)
#else
Expand Down

0 comments on commit f1e7c20

Please sign in to comment.