mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 08:48:48 +00:00
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>
This commit is contained in:
parent
8ffb4103f5
commit
670eea9241
@ -19,14 +19,6 @@ config PPC_WERROR
|
|||||||
depends on !PPC_DISABLE_WERROR
|
depends on !PPC_DISABLE_WERROR
|
||||||
default y
|
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
|
config PRINT_STACK_DEPTH
|
||||||
int "Stack depth to print" if DEBUG_KERNEL
|
int "Stack depth to print" if DEBUG_KERNEL
|
||||||
default 64
|
default 64
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
#ifndef _ASM_POWERPC_PGTABLE_TYPES_H
|
#ifndef _ASM_POWERPC_PGTABLE_TYPES_H
|
||||||
#define _ASM_POWERPC_PGTABLE_TYPES_H
|
#define _ASM_POWERPC_PGTABLE_TYPES_H
|
||||||
|
|
||||||
#ifdef CONFIG_STRICT_MM_TYPECHECKS
|
|
||||||
/* These are used to make use of C type-checking. */
|
|
||||||
|
|
||||||
/* PTE level */
|
/* PTE level */
|
||||||
typedef struct { pte_basic_t pte; } pte_t;
|
typedef struct { pte_basic_t pte; } pte_t;
|
||||||
#define __pte(x) ((pte_t) { (x) })
|
#define __pte(x) ((pte_t) { (x) })
|
||||||
@ -48,49 +45,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
|
|||||||
#define pgprot_val(x) ((x).pgprot)
|
#define pgprot_val(x) ((x).pgprot)
|
||||||
#define __pgprot(x) ((pgprot_t) { (x) })
|
#define __pgprot(x) ((pgprot_t) { (x) })
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/*
|
|
||||||
* .. while these make it easier on the compiler
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef pte_basic_t pte_t;
|
|
||||||
#define __pte(x) (x)
|
|
||||||
static inline pte_basic_t pte_val(pte_t pte)
|
|
||||||
{
|
|
||||||
return pte;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PPC64
|
|
||||||
typedef unsigned long pmd_t;
|
|
||||||
#define __pmd(x) (x)
|
|
||||||
static inline unsigned long pmd_val(pmd_t pmd)
|
|
||||||
{
|
|
||||||
return pmd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CONFIG_PPC_BOOK3S_64) || !defined(CONFIG_PPC_64K_PAGES)
|
|
||||||
typedef unsigned long pud_t;
|
|
||||||
#define __pud(x) (x)
|
|
||||||
static inline unsigned long pud_val(pud_t pud)
|
|
||||||
{
|
|
||||||
return pud;
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_PPC_BOOK3S_64 || !CONFIG_PPC_64K_PAGES */
|
|
||||||
#endif /* CONFIG_PPC64 */
|
|
||||||
|
|
||||||
typedef unsigned long pgd_t;
|
|
||||||
#define __pgd(x) (x)
|
|
||||||
static inline unsigned long pgd_val(pgd_t pgd)
|
|
||||||
{
|
|
||||||
return pgd;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef unsigned long pgprot_t;
|
|
||||||
#define pgprot_val(x) (x)
|
|
||||||
#define __pgprot(x) (x)
|
|
||||||
|
|
||||||
#endif /* CONFIG_STRICT_MM_TYPECHECKS */
|
|
||||||
/*
|
/*
|
||||||
* With hash config 64k pages additionally define a bigger "real PTE" type that
|
* With hash config 64k pages additionally define a bigger "real PTE" type that
|
||||||
* gathers the "second half" part of the PTE for pseudo 64k pages
|
* gathers the "second half" part of the PTE for pseudo 64k pages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user