diff options
Diffstat (limited to 'include/asm-powerpc/processor.h')
-rw-r--r-- | include/asm-powerpc/processor.h | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 415fa393b00c..93f83efeb310 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -22,22 +22,6 @@ | |||
22 | * -- BenH. | 22 | * -- BenH. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* Platforms codes (to be obsoleted) */ | ||
26 | #define PLATFORM_PSERIES 0x0100 | ||
27 | #define PLATFORM_PSERIES_LPAR 0x0101 | ||
28 | #define PLATFORM_ISERIES_LPAR 0x0201 | ||
29 | #define PLATFORM_LPAR 0x0001 | ||
30 | #define PLATFORM_POWERMAC 0x0400 | ||
31 | #define PLATFORM_MAPLE 0x0500 | ||
32 | #define PLATFORM_PREP 0x0600 | ||
33 | #define PLATFORM_CHRP 0x0700 | ||
34 | #define PLATFORM_CELL 0x1000 | ||
35 | |||
36 | /* Compat platform codes for 32 bits */ | ||
37 | #define _MACH_prep PLATFORM_PREP | ||
38 | #define _MACH_Pmac PLATFORM_POWERMAC | ||
39 | #define _MACH_chrp PLATFORM_CHRP | ||
40 | |||
41 | /* PREP sub-platform types see residual.h for these */ | 25 | /* PREP sub-platform types see residual.h for these */ |
42 | #define _PREP_Motorola 0x01 /* motorola prep */ | 26 | #define _PREP_Motorola 0x01 /* motorola prep */ |
43 | #define _PREP_Firm 0x02 /* firmworks prep */ | 27 | #define _PREP_Firm 0x02 /* firmworks prep */ |
@@ -49,19 +33,14 @@ | |||
49 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ | 33 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ |
50 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ | 34 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ |
51 | 35 | ||
52 | #ifdef __KERNEL__ | 36 | #if defined(__KERNEL__) && defined(CONFIG_PPC32) |
53 | #define platform_is_pseries() (_machine == PLATFORM_PSERIES || \ | ||
54 | _machine == PLATFORM_PSERIES_LPAR) | ||
55 | #define platform_is_lpar() (!!(_machine & PLATFORM_LPAR)) | ||
56 | 37 | ||
57 | #if defined(CONFIG_PPC_MULTIPLATFORM) | 38 | extern int _chrp_type; |
58 | extern int _machine; | ||
59 | 39 | ||
60 | #ifdef CONFIG_PPC32 | 40 | #ifdef CONFIG_PPC_PREP |
61 | 41 | ||
62 | /* what kind of prep workstation we are */ | 42 | /* what kind of prep workstation we are */ |
63 | extern int _prep_type; | 43 | extern int _prep_type; |
64 | extern int _chrp_type; | ||
65 | 44 | ||
66 | /* | 45 | /* |
67 | * This is used to identify the board type from a given PReP board | 46 | * This is used to identify the board type from a given PReP board |
@@ -71,17 +50,14 @@ extern int _chrp_type; | |||
71 | extern unsigned char ucBoardRev; | 50 | extern unsigned char ucBoardRev; |
72 | extern unsigned char ucBoardRevMaj, ucBoardRevMin; | 51 | extern unsigned char ucBoardRevMaj, ucBoardRevMin; |
73 | 52 | ||
74 | #endif /* CONFIG_PPC32 */ | 53 | #endif /* CONFIG_PPC_PREP */ |
75 | 54 | ||
76 | #elif defined(CONFIG_PPC_ISERIES) | 55 | #ifndef CONFIG_PPC_MULTIPLATFORM |
77 | /* | ||
78 | * iSeries is soon to become MULTIPLATFORM hopefully ... | ||
79 | */ | ||
80 | #define _machine PLATFORM_ISERIES_LPAR | ||
81 | #else | ||
82 | #define _machine 0 | 56 | #define _machine 0 |
83 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 57 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
84 | #endif /* __KERNEL__ */ | 58 | |
59 | #endif /* defined(__KERNEL__) && defined(CONFIG_PPC32) */ | ||
60 | |||
85 | /* | 61 | /* |
86 | * Default implementation of macro that returns current | 62 | * Default implementation of macro that returns current |
87 | * instruction pointer ("program counter"). | 63 | * instruction pointer ("program counter"). |
@@ -252,6 +228,10 @@ static inline unsigned long __pack_fe01(unsigned int fpmode) | |||
252 | #define cpu_relax() barrier() | 228 | #define cpu_relax() barrier() |
253 | #endif | 229 | #endif |
254 | 230 | ||
231 | /* Check that a certain kernel stack pointer is valid in task_struct p */ | ||
232 | int validate_sp(unsigned long sp, struct task_struct *p, | ||
233 | unsigned long nbytes); | ||
234 | |||
255 | /* | 235 | /* |
256 | * Prefetch macros. | 236 | * Prefetch macros. |
257 | */ | 237 | */ |