diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/Kbuild | 2 | ||||
-rw-r--r-- | include/asm-powerpc/bug.h | 80 | ||||
-rw-r--r-- | include/asm-powerpc/cputable.h | 16 | ||||
-rw-r--r-- | include/asm-powerpc/dcr-native.h | 37 | ||||
-rw-r--r-- | include/asm-powerpc/dcr.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/hw_irq.h | 19 | ||||
-rw-r--r-- | include/asm-powerpc/module.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/pci-bridge.h | 4 | ||||
-rw-r--r-- | include/asm-powerpc/pci.h | 33 | ||||
-rw-r--r-- | include/asm-powerpc/reg.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/rtas.h | 3 |
11 files changed, 117 insertions, 83 deletions
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 1e637381c118..703970fb0ec0 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -17,7 +17,6 @@ header-y += ipc.h | |||
17 | header-y += poll.h | 17 | header-y += poll.h |
18 | header-y += shmparam.h | 18 | header-y += shmparam.h |
19 | header-y += sockios.h | 19 | header-y += sockios.h |
20 | header-y += spu_info.h | ||
21 | header-y += ucontext.h | 20 | header-y += ucontext.h |
22 | header-y += ioctl.h | 21 | header-y += ioctl.h |
23 | header-y += linkage.h | 22 | header-y += linkage.h |
@@ -37,6 +36,7 @@ unifdef-y += posix_types.h | |||
37 | unifdef-y += ptrace.h | 36 | unifdef-y += ptrace.h |
38 | unifdef-y += seccomp.h | 37 | unifdef-y += seccomp.h |
39 | unifdef-y += signal.h | 38 | unifdef-y += signal.h |
39 | unifdef-y += spu_info.h | ||
40 | unifdef-y += termios.h | 40 | unifdef-y += termios.h |
41 | unifdef-y += types.h | 41 | unifdef-y += types.h |
42 | unifdef-y += unistd.h | 42 | unifdef-y += unistd.h |
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index 978b2c7e84ea..709568879f73 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h | |||
@@ -13,36 +13,39 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | struct bug_entry { | ||
17 | unsigned long bug_addr; | ||
18 | long line; | ||
19 | const char *file; | ||
20 | const char *function; | ||
21 | }; | ||
22 | |||
23 | struct bug_entry *find_bug(unsigned long bugaddr); | ||
24 | |||
25 | /* | ||
26 | * If this bit is set in the line number it means that the trap | ||
27 | * is for WARN_ON rather than BUG or BUG_ON. | ||
28 | */ | ||
29 | #define BUG_WARNING_TRAP 0x1000000 | ||
30 | |||
31 | #ifdef CONFIG_BUG | 16 | #ifdef CONFIG_BUG |
32 | 17 | ||
18 | /* _EMIT_BUG_ENTRY expects args %0,%1,%2,%3 to be FILE, LINE, flags and | ||
19 | sizeof(struct bug_entry), respectively */ | ||
20 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
21 | #define _EMIT_BUG_ENTRY \ | ||
22 | ".section __bug_table,\"a\"\n" \ | ||
23 | "2:\t" PPC_LONG "1b, %0\n" \ | ||
24 | "\t.short %1, %2\n" \ | ||
25 | ".org 2b+%3\n" \ | ||
26 | ".previous\n" | ||
27 | #else | ||
28 | #define _EMIT_BUG_ENTRY \ | ||
29 | ".section __bug_table,\"a\"\n" \ | ||
30 | "2:\t" PPC_LONG "1b\n" \ | ||
31 | "\t.short %2\n" \ | ||
32 | ".org 2b+%3\n" \ | ||
33 | ".previous\n" | ||
34 | #endif | ||
35 | |||
33 | /* | 36 | /* |
34 | * BUG_ON() and WARN_ON() do their best to cooperate with compile-time | 37 | * BUG_ON() and WARN_ON() do their best to cooperate with compile-time |
35 | * optimisations. However depending on the complexity of the condition | 38 | * optimisations. However depending on the complexity of the condition |
36 | * some compiler versions may not produce optimal results. | 39 | * some compiler versions may not produce optimal results. |
37 | */ | 40 | */ |
38 | 41 | ||
39 | #define BUG() do { \ | 42 | #define BUG() do { \ |
40 | __asm__ __volatile__( \ | 43 | __asm__ __volatile__( \ |
41 | "1: twi 31,0,0\n" \ | 44 | "1: twi 31,0,0\n" \ |
42 | ".section __bug_table,\"a\"\n" \ | 45 | _EMIT_BUG_ENTRY \ |
43 | "\t"PPC_LONG" 1b,%0,%1,%2\n" \ | 46 | : : "i" (__FILE__), "i" (__LINE__), \ |
44 | ".previous" \ | 47 | "i" (0), "i" (sizeof(struct bug_entry))); \ |
45 | : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \ | 48 | for(;;) ; \ |
46 | } while (0) | 49 | } while (0) |
47 | 50 | ||
48 | #define BUG_ON(x) do { \ | 51 | #define BUG_ON(x) do { \ |
@@ -51,23 +54,21 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
51 | BUG(); \ | 54 | BUG(); \ |
52 | } else { \ | 55 | } else { \ |
53 | __asm__ __volatile__( \ | 56 | __asm__ __volatile__( \ |
54 | "1: "PPC_TLNEI" %0,0\n" \ | 57 | "1: "PPC_TLNEI" %4,0\n" \ |
55 | ".section __bug_table,\"a\"\n" \ | 58 | _EMIT_BUG_ENTRY \ |
56 | "\t"PPC_LONG" 1b,%1,%2,%3\n" \ | 59 | : : "i" (__FILE__), "i" (__LINE__), "i" (0), \ |
57 | ".previous" \ | 60 | "i" (sizeof(struct bug_entry)), \ |
58 | : : "r" ((long)(x)), "i" (__LINE__), \ | 61 | "r" ((long)(x))); \ |
59 | "i" (__FILE__), "i" (__FUNCTION__)); \ | ||
60 | } \ | 62 | } \ |
61 | } while (0) | 63 | } while (0) |
62 | 64 | ||
63 | #define __WARN() do { \ | 65 | #define __WARN() do { \ |
64 | __asm__ __volatile__( \ | 66 | __asm__ __volatile__( \ |
65 | "1: twi 31,0,0\n" \ | 67 | "1: twi 31,0,0\n" \ |
66 | ".section __bug_table,\"a\"\n" \ | 68 | _EMIT_BUG_ENTRY \ |
67 | "\t"PPC_LONG" 1b,%0,%1,%2\n" \ | 69 | : : "i" (__FILE__), "i" (__LINE__), \ |
68 | ".previous" \ | 70 | "i" (BUGFLAG_WARNING), \ |
69 | : : "i" (__LINE__ + BUG_WARNING_TRAP), \ | 71 | "i" (sizeof(struct bug_entry))); \ |
70 | "i" (__FILE__), "i" (__FUNCTION__)); \ | ||
71 | } while (0) | 72 | } while (0) |
72 | 73 | ||
73 | #define WARN_ON(x) ({ \ | 74 | #define WARN_ON(x) ({ \ |
@@ -77,13 +78,12 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
77 | __WARN(); \ | 78 | __WARN(); \ |
78 | } else { \ | 79 | } else { \ |
79 | __asm__ __volatile__( \ | 80 | __asm__ __volatile__( \ |
80 | "1: "PPC_TLNEI" %0,0\n" \ | 81 | "1: "PPC_TLNEI" %4,0\n" \ |
81 | ".section __bug_table,\"a\"\n" \ | 82 | _EMIT_BUG_ENTRY \ |
82 | "\t"PPC_LONG" 1b,%1,%2,%3\n" \ | 83 | : : "i" (__FILE__), "i" (__LINE__), \ |
83 | ".previous" \ | 84 | "i" (BUGFLAG_WARNING), \ |
84 | : : "r" (__ret_warn_on), \ | 85 | "i" (sizeof(struct bug_entry)), \ |
85 | "i" (__LINE__ + BUG_WARNING_TRAP), \ | 86 | "r" (__ret_warn_on)); \ |
86 | "i" (__FILE__), "i" (__FUNCTION__)); \ | ||
87 | } \ | 87 | } \ |
88 | unlikely(__ret_warn_on); \ | 88 | unlikely(__ret_warn_on); \ |
89 | }) | 89 | }) |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 6fe5c9d4ca3b..7384b8086b75 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -126,6 +126,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
126 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) | 126 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) |
127 | #define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) | 127 | #define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) |
128 | #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) | 128 | #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) |
129 | #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000) | ||
129 | 130 | ||
130 | /* | 131 | /* |
131 | * Add the 64-bit processor unique features in the top half of the word; | 132 | * Add the 64-bit processor unique features in the top half of the word; |
@@ -152,6 +153,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
152 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) | 153 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) |
153 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) | 154 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) |
154 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) | 155 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) |
156 | #define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) | ||
155 | 157 | ||
156 | #ifndef __ASSEMBLY__ | 158 | #ifndef __ASSEMBLY__ |
157 | 159 | ||
@@ -295,6 +297,9 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
295 | #define CPU_FTRS_E300 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ | 297 | #define CPU_FTRS_E300 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ |
296 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | \ | 298 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | \ |
297 | CPU_FTR_COMMON) | 299 | CPU_FTR_COMMON) |
300 | #define CPU_FTRS_E300C2 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ | ||
301 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | \ | ||
302 | CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE) | ||
298 | #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 303 | #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
299 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) | 304 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) |
300 | #define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) | 305 | #define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) |
@@ -330,13 +335,14 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 335 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
331 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 336 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
332 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 337 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
333 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE) | 338 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
339 | CPU_FTR_DSCR) | ||
334 | #define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 340 | #define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
335 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
336 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 342 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
337 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 343 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
338 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ | 344 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ |
339 | CPU_FTR_SPURR | CPU_FTR_REAL_LE) | 345 | CPU_FTR_SPURR | CPU_FTR_REAL_LE | CPU_FTR_DSCR) |
340 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 346 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 347 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
342 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 348 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
@@ -364,7 +370,8 @@ enum { | |||
364 | CPU_FTRS_7450_21 | CPU_FTRS_7450_23 | CPU_FTRS_7455_1 | | 370 | CPU_FTRS_7450_21 | CPU_FTRS_7450_23 | CPU_FTRS_7455_1 | |
365 | CPU_FTRS_7455_20 | CPU_FTRS_7455 | CPU_FTRS_7447_10 | | 371 | CPU_FTRS_7455_20 | CPU_FTRS_7455 | CPU_FTRS_7447_10 | |
366 | CPU_FTRS_7447 | CPU_FTRS_7447A | CPU_FTRS_82XX | | 372 | CPU_FTRS_7447 | CPU_FTRS_7447A | CPU_FTRS_82XX | |
367 | CPU_FTRS_G2_LE | CPU_FTRS_E300 | CPU_FTRS_CLASSIC32 | | 373 | CPU_FTRS_G2_LE | CPU_FTRS_E300 | CPU_FTRS_E300C2 | |
374 | CPU_FTRS_CLASSIC32 | | ||
368 | #else | 375 | #else |
369 | CPU_FTRS_GENERIC_32 | | 376 | CPU_FTRS_GENERIC_32 | |
370 | #endif | 377 | #endif |
@@ -403,7 +410,8 @@ enum { | |||
403 | CPU_FTRS_7450_21 & CPU_FTRS_7450_23 & CPU_FTRS_7455_1 & | 410 | CPU_FTRS_7450_21 & CPU_FTRS_7450_23 & CPU_FTRS_7455_1 & |
404 | CPU_FTRS_7455_20 & CPU_FTRS_7455 & CPU_FTRS_7447_10 & | 411 | CPU_FTRS_7455_20 & CPU_FTRS_7455 & CPU_FTRS_7447_10 & |
405 | CPU_FTRS_7447 & CPU_FTRS_7447A & CPU_FTRS_82XX & | 412 | CPU_FTRS_7447 & CPU_FTRS_7447A & CPU_FTRS_82XX & |
406 | CPU_FTRS_G2_LE & CPU_FTRS_E300 & CPU_FTRS_CLASSIC32 & | 413 | CPU_FTRS_G2_LE & CPU_FTRS_E300 & CPU_FTRS_E300C2 & |
414 | CPU_FTRS_CLASSIC32 & | ||
407 | #else | 415 | #else |
408 | CPU_FTRS_GENERIC_32 & | 416 | CPU_FTRS_GENERIC_32 & |
409 | #endif | 417 | #endif |
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h index fd4a5f5e33d1..d7a1bc1551c6 100644 --- a/include/asm-powerpc/dcr-native.h +++ b/include/asm-powerpc/dcr-native.h | |||
@@ -20,8 +20,7 @@ | |||
20 | #ifndef _ASM_POWERPC_DCR_NATIVE_H | 20 | #ifndef _ASM_POWERPC_DCR_NATIVE_H |
21 | #define _ASM_POWERPC_DCR_NATIVE_H | 21 | #define _ASM_POWERPC_DCR_NATIVE_H |
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | 23 | #ifndef __ASSEMBLY__ | |
24 | #include <asm/reg.h> | ||
25 | 24 | ||
26 | typedef struct {} dcr_host_t; | 25 | typedef struct {} dcr_host_t; |
27 | 26 | ||
@@ -32,7 +31,41 @@ typedef struct {} dcr_host_t; | |||
32 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) | 31 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) |
33 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) | 32 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) |
34 | 33 | ||
34 | /* Device Control Registers */ | ||
35 | void __mtdcr(int reg, unsigned int val); | ||
36 | unsigned int __mfdcr(int reg); | ||
37 | #define mfdcr(rn) \ | ||
38 | ({unsigned int rval; \ | ||
39 | if (__builtin_constant_p(rn)) \ | ||
40 | asm volatile("mfdcr %0," __stringify(rn) \ | ||
41 | : "=r" (rval)); \ | ||
42 | else \ | ||
43 | rval = __mfdcr(rn); \ | ||
44 | rval;}) | ||
45 | |||
46 | #define mtdcr(rn, v) \ | ||
47 | do { \ | ||
48 | if (__builtin_constant_p(rn)) \ | ||
49 | asm volatile("mtdcr " __stringify(rn) ",%0" \ | ||
50 | : : "r" (v)); \ | ||
51 | else \ | ||
52 | __mtdcr(rn, v); \ | ||
53 | } while (0) | ||
54 | |||
55 | /* R/W of indirect DCRs make use of standard naming conventions for DCRs */ | ||
56 | #define mfdcri(base, reg) \ | ||
57 | ({ \ | ||
58 | mtdcr(base ## _CFGADDR, base ## _ ## reg); \ | ||
59 | mfdcr(base ## _CFGDATA); \ | ||
60 | }) | ||
61 | |||
62 | #define mtdcri(base, reg, data) \ | ||
63 | do { \ | ||
64 | mtdcr(base ## _CFGADDR, base ## _ ## reg); \ | ||
65 | mtdcr(base ## _CFGDATA, data); \ | ||
66 | } while (0) | ||
35 | 67 | ||
68 | #endif /* __ASSEMBLY__ */ | ||
36 | #endif /* __KERNEL__ */ | 69 | #endif /* __KERNEL__ */ |
37 | #endif /* _ASM_POWERPC_DCR_NATIVE_H */ | 70 | #endif /* _ASM_POWERPC_DCR_NATIVE_H */ |
38 | 71 | ||
diff --git a/include/asm-powerpc/dcr.h b/include/asm-powerpc/dcr.h index 473f2c7fd892..b66c5e6941f0 100644 --- a/include/asm-powerpc/dcr.h +++ b/include/asm-powerpc/dcr.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #ifndef _ASM_POWERPC_DCR_H | 20 | #ifndef _ASM_POWERPC_DCR_H |
21 | #define _ASM_POWERPC_DCR_H | 21 | #define _ASM_POWERPC_DCR_H |
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | #ifdef CONFIG_PPC_DCR | ||
23 | 24 | ||
24 | #ifdef CONFIG_PPC_DCR_NATIVE | 25 | #ifdef CONFIG_PPC_DCR_NATIVE |
25 | #include <asm/dcr-native.h> | 26 | #include <asm/dcr-native.h> |
@@ -38,5 +39,6 @@ extern unsigned int dcr_resource_len(struct device_node *np, | |||
38 | unsigned int index); | 39 | unsigned int index); |
39 | #endif /* CONFIG_PPC_MERGE */ | 40 | #endif /* CONFIG_PPC_MERGE */ |
40 | 41 | ||
42 | #endif /* CONFIG_PPC_DCR */ | ||
41 | #endif /* __KERNEL__ */ | 43 | #endif /* __KERNEL__ */ |
42 | #endif /* _ASM_POWERPC_DCR_H */ | 44 | #endif /* _ASM_POWERPC_DCR_H */ |
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index d604863d72fb..9e4dd98eb220 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h | |||
@@ -107,25 +107,6 @@ static inline void local_irq_save_ptr(unsigned long *flags) | |||
107 | 107 | ||
108 | #endif /* CONFIG_PPC64 */ | 108 | #endif /* CONFIG_PPC64 */ |
109 | 109 | ||
110 | #define mask_irq(irq) \ | ||
111 | ({ \ | ||
112 | irq_desc_t *desc = get_irq_desc(irq); \ | ||
113 | if (desc->chip && desc->chip->disable) \ | ||
114 | desc->chip->disable(irq); \ | ||
115 | }) | ||
116 | #define unmask_irq(irq) \ | ||
117 | ({ \ | ||
118 | irq_desc_t *desc = get_irq_desc(irq); \ | ||
119 | if (desc->chip && desc->chip->enable) \ | ||
120 | desc->chip->enable(irq); \ | ||
121 | }) | ||
122 | #define ack_irq(irq) \ | ||
123 | ({ \ | ||
124 | irq_desc_t *desc = get_irq_desc(irq); \ | ||
125 | if (desc->chip && desc->chip->ack) \ | ||
126 | desc->chip->ack(irq); \ | ||
127 | }) | ||
128 | |||
129 | /* | 110 | /* |
130 | * interrupt-retrigger: should we handle this via lost interrupts and IPIs | 111 | * interrupt-retrigger: should we handle this via lost interrupts and IPIs |
131 | * or should we not care like we do now ? --BenH. | 112 | * or should we not care like we do now ? --BenH. |
diff --git a/include/asm-powerpc/module.h b/include/asm-powerpc/module.h index 584fabfb4f08..e5f14b13ccf0 100644 --- a/include/asm-powerpc/module.h +++ b/include/asm-powerpc/module.h | |||
@@ -46,8 +46,6 @@ struct mod_arch_specific { | |||
46 | unsigned int num_bugs; | 46 | unsigned int num_bugs; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | extern struct bug_entry *module_find_bug(unsigned long bugaddr); | ||
50 | |||
51 | /* | 49 | /* |
52 | * Select ELF headers. | 50 | * Select ELF headers. |
53 | * Make empty section for module_frob_arch_sections to expand. | 51 | * Make empty section for module_frob_arch_sections to expand. |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 7bb7f9009806..cb02c9d1ef93 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -31,12 +31,12 @@ struct pci_controller { | |||
31 | int last_busno; | 31 | int last_busno; |
32 | 32 | ||
33 | void __iomem *io_base_virt; | 33 | void __iomem *io_base_virt; |
34 | unsigned long io_base_phys; | 34 | resource_size_t io_base_phys; |
35 | 35 | ||
36 | /* Some machines have a non 1:1 mapping of | 36 | /* Some machines have a non 1:1 mapping of |
37 | * the PCI memory space in the CPU bus space | 37 | * the PCI memory space in the CPU bus space |
38 | */ | 38 | */ |
39 | unsigned long pci_mem_offset; | 39 | resource_size_t pci_mem_offset; |
40 | unsigned long pci_io_size; | 40 | unsigned long pci_io_size; |
41 | 41 | ||
42 | struct pci_ops *ops; | 42 | struct pci_ops *ops; |
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 16f13319c769..ac656ee6bb19 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -143,8 +143,13 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
143 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ | 143 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ |
144 | #define HAVE_PCI_MMAP 1 | 144 | #define HAVE_PCI_MMAP 1 |
145 | 145 | ||
146 | #ifdef CONFIG_PPC64 | 146 | #if defined(CONFIG_PPC64) || defined(CONFIG_NOT_COHERENT_CACHE) |
147 | /* pci_unmap_{single,page} is not a nop, thus... */ | 147 | /* |
148 | * For 64-bit kernels, pci_unmap_{single,page} is not a nop. | ||
149 | * For 32-bit non-coherent kernels, pci_dma_sync_single_for_cpu() and | ||
150 | * so on are not nops. | ||
151 | * and thus... | ||
152 | */ | ||
148 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 153 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
149 | dma_addr_t ADDR_NAME; | 154 | dma_addr_t ADDR_NAME; |
150 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ | 155 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ |
@@ -158,6 +163,20 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
158 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 163 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
159 | (((PTR)->LEN_NAME) = (VAL)) | 164 | (((PTR)->LEN_NAME) = (VAL)) |
160 | 165 | ||
166 | #else /* 32-bit && coherent */ | ||
167 | |||
168 | /* pci_unmap_{page,single} is a nop so... */ | ||
169 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
170 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
171 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
172 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
173 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
174 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
175 | |||
176 | #endif /* CONFIG_PPC64 || CONFIG_NOT_COHERENT_CACHE */ | ||
177 | |||
178 | #ifdef CONFIG_PPC64 | ||
179 | |||
161 | /* The PCI address space does not equal the physical memory address | 180 | /* The PCI address space does not equal the physical memory address |
162 | * space (we have an IOMMU). The IDE and SCSI device layers use | 181 | * space (we have an IOMMU). The IDE and SCSI device layers use |
163 | * this boolean for bounce buffer decisions. | 182 | * this boolean for bounce buffer decisions. |
@@ -172,16 +191,8 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
172 | */ | 191 | */ |
173 | #define PCI_DMA_BUS_IS_PHYS (1) | 192 | #define PCI_DMA_BUS_IS_PHYS (1) |
174 | 193 | ||
175 | /* pci_unmap_{page,single} is a nop so... */ | ||
176 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
177 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
178 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
179 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
180 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
181 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
182 | |||
183 | #endif /* CONFIG_PPC64 */ | 194 | #endif /* CONFIG_PPC64 */ |
184 | 195 | ||
185 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 196 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
186 | struct pci_bus_region *region, | 197 | struct pci_bus_region *region, |
187 | struct resource *res); | 198 | struct resource *res); |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 6faae7b14d55..a3631b15754c 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -143,6 +143,7 @@ | |||
143 | 143 | ||
144 | /* Special Purpose Registers (SPRNs)*/ | 144 | /* Special Purpose Registers (SPRNs)*/ |
145 | #define SPRN_CTR 0x009 /* Count Register */ | 145 | #define SPRN_CTR 0x009 /* Count Register */ |
146 | #define SPRN_DSCR 0x11 | ||
146 | #define SPRN_CTRLF 0x088 | 147 | #define SPRN_CTRLF 0x088 |
147 | #define SPRN_CTRLT 0x098 | 148 | #define SPRN_CTRLT 0x098 |
148 | #define CTRL_CT 0xc0000000 /* current thread */ | 149 | #define CTRL_CT 0xc0000000 /* current thread */ |
@@ -163,6 +164,7 @@ | |||
163 | #define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ | 164 | #define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ |
164 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ | 165 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ |
165 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ | 166 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ |
167 | #define SPRN_SPURR 0x134 /* Scaled PURR */ | ||
166 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ | 168 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ |
167 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ | 169 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ |
168 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ | 170 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 5a0c136c0416..8eaa7b28d9d0 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
@@ -159,6 +159,7 @@ extern struct rtas_t rtas; | |||
159 | 159 | ||
160 | extern void enter_rtas(unsigned long); | 160 | extern void enter_rtas(unsigned long); |
161 | extern int rtas_token(const char *service); | 161 | extern int rtas_token(const char *service); |
162 | extern int rtas_service_present(const char *service); | ||
162 | extern int rtas_call(int token, int, int, int *, ...); | 163 | extern int rtas_call(int token, int, int, int *, ...); |
163 | extern void rtas_restart(char *cmd); | 164 | extern void rtas_restart(char *cmd); |
164 | extern void rtas_power_off(void); | 165 | extern void rtas_power_off(void); |
@@ -221,8 +222,6 @@ extern int rtas_get_error_log_max(void); | |||
221 | extern spinlock_t rtas_data_buf_lock; | 222 | extern spinlock_t rtas_data_buf_lock; |
222 | extern char rtas_data_buf[RTAS_DATA_BUF_SIZE]; | 223 | extern char rtas_data_buf[RTAS_DATA_BUF_SIZE]; |
223 | 224 | ||
224 | extern void rtas_stop_self(void); | ||
225 | |||
226 | /* RMO buffer reserved for user-space RTAS use */ | 225 | /* RMO buffer reserved for user-space RTAS use */ |
227 | extern unsigned long rtas_rmo_buf; | 226 | extern unsigned long rtas_rmo_buf; |
228 | 227 | ||