diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:17:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:17:05 -0400 |
commit | 79c4581262e225a7c96d88b632b05ab3b5e9a52c (patch) | |
tree | 8ef030c74ab7e0d0df27cf86195f915efd2832f7 /arch/powerpc/include/asm | |
parent | 59534f7298c5e28aaa64e6ed550e247f64ee72ae (diff) | |
parent | 99ec28f183daa450faa7bdad6f932364ae325648 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (92 commits)
powerpc: Remove unused 'protect4gb' boot parameter
powerpc: Build-in e1000e for pseries & ppc64_defconfig
powerpc/pseries: Make request_ras_irqs() available to other pseries code
powerpc/numa: Use ibm,architecture-vec-5 to detect form 1 affinity
powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
powerpc: Use smt_snooze_delay=-1 to always busy loop
powerpc: Remove check of ibm,smt-snooze-delay OF property
powerpc/kdump: Fix race in kdump shutdown
powerpc/kexec: Fix race in kexec shutdown
powerpc/kexec: Speedup kexec hash PTE tear down
powerpc/pseries: Add hcall to read 4 ptes at a time in real mode
powerpc: Use more accurate limit for first segment memory allocations
powerpc/kdump: Use chip->shutdown to disable IRQs
powerpc/kdump: CPUs assume the context of the oopsing CPU
powerpc/crashdump: Do not fail on NULL pointer dereferencing
powerpc/eeh: Fix oops when probing in early boot
powerpc/pci: Check devices status property when scanning OF tree
powerpc/vio: Switch VIO Bus PM to use generic helpers
powerpc: Avoid bad relocations in iSeries code
powerpc: Use common cpu_die (fixes SMP+SUSPEND build)
...
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/cache.h | 6 | ||||
-rw-r--r-- | arch/powerpc/include/asm/cputable.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hvcall.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/kexec.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu-44x.h | 51 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmzone.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mpic.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/paca.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/parport.h | 11 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgalloc-64.h | 6 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc32.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h | 64 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg_booke.h | 24 | ||||
-rw-r--r-- | arch/powerpc/include/asm/smp.h | 18 | ||||
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 26 |
17 files changed, 213 insertions, 17 deletions
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 81de6eb3455d..725634fc18c6 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h | |||
@@ -12,8 +12,12 @@ | |||
12 | #define L1_CACHE_SHIFT 6 | 12 | #define L1_CACHE_SHIFT 6 |
13 | #define MAX_COPY_PREFETCH 4 | 13 | #define MAX_COPY_PREFETCH 4 |
14 | #elif defined(CONFIG_PPC32) | 14 | #elif defined(CONFIG_PPC32) |
15 | #define L1_CACHE_SHIFT 5 | ||
16 | #define MAX_COPY_PREFETCH 4 | 15 | #define MAX_COPY_PREFETCH 4 |
16 | #if defined(CONFIG_PPC_47x) | ||
17 | #define L1_CACHE_SHIFT 7 | ||
18 | #else | ||
19 | #define L1_CACHE_SHIFT 5 | ||
20 | #endif | ||
17 | #else /* CONFIG_PPC64 */ | 21 | #else /* CONFIG_PPC64 */ |
18 | #define L1_CACHE_SHIFT 7 | 22 | #define L1_CACHE_SHIFT 7 |
19 | #endif | 23 | #endif |
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index abb833b0e58f..e3cba4e1eb34 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -72,6 +72,7 @@ extern int machine_check_4xx(struct pt_regs *regs); | |||
72 | extern int machine_check_440A(struct pt_regs *regs); | 72 | extern int machine_check_440A(struct pt_regs *regs); |
73 | extern int machine_check_e500(struct pt_regs *regs); | 73 | extern int machine_check_e500(struct pt_regs *regs); |
74 | extern int machine_check_e200(struct pt_regs *regs); | 74 | extern int machine_check_e200(struct pt_regs *regs); |
75 | extern int machine_check_47x(struct pt_regs *regs); | ||
75 | 76 | ||
76 | /* NOTE WELL: Update identify_cpu() if fields are added or removed! */ | 77 | /* NOTE WELL: Update identify_cpu() if fields are added or removed! */ |
77 | struct cpu_spec { | 78 | struct cpu_spec { |
@@ -365,6 +366,7 @@ extern const char *powerpc_base_platform; | |||
365 | #define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) | 366 | #define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) |
366 | #define CPU_FTRS_440x6 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE | \ | 367 | #define CPU_FTRS_440x6 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE | \ |
367 | CPU_FTR_INDEXED_DCR) | 368 | CPU_FTR_INDEXED_DCR) |
369 | #define CPU_FTRS_47X (CPU_FTRS_440x6) | ||
368 | #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ | 370 | #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ |
369 | CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ | 371 | CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ |
370 | CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_NOEXECUTE) | 372 | CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_NOEXECUTE) |
@@ -453,6 +455,9 @@ enum { | |||
453 | #ifdef CONFIG_44x | 455 | #ifdef CONFIG_44x |
454 | CPU_FTRS_44X | CPU_FTRS_440x6 | | 456 | CPU_FTRS_44X | CPU_FTRS_440x6 | |
455 | #endif | 457 | #endif |
458 | #ifdef CONFIG_PPC_47x | ||
459 | CPU_FTRS_47X | | ||
460 | #endif | ||
456 | #ifdef CONFIG_E200 | 461 | #ifdef CONFIG_E200 |
457 | CPU_FTRS_E200 | | 462 | CPU_FTRS_E200 | |
458 | #endif | 463 | #endif |
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index f0275818b95c..5119b7db3142 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
@@ -228,6 +228,7 @@ | |||
228 | #define H_JOIN 0x298 | 228 | #define H_JOIN 0x298 |
229 | #define H_VASI_STATE 0x2A4 | 229 | #define H_VASI_STATE 0x2A4 |
230 | #define H_ENABLE_CRQ 0x2B0 | 230 | #define H_ENABLE_CRQ 0x2B0 |
231 | #define H_GET_EM_PARMS 0x2B8 | ||
231 | #define H_SET_MPP 0x2D0 | 232 | #define H_SET_MPP 0x2D0 |
232 | #define H_GET_MPP 0x2D4 | 233 | #define H_GET_MPP 0x2D4 |
233 | #define MAX_HCALL_OPCODE H_GET_MPP | 234 | #define MAX_HCALL_OPCODE H_GET_MPP |
@@ -281,6 +282,7 @@ long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...); | |||
281 | */ | 282 | */ |
282 | #define PLPAR_HCALL9_BUFSIZE 9 | 283 | #define PLPAR_HCALL9_BUFSIZE 9 |
283 | long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); | 284 | long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); |
285 | long plpar_hcall9_raw(unsigned long opcode, unsigned long *retbuf, ...); | ||
284 | 286 | ||
285 | /* For hcall instrumentation. One structure per-hcall, per-CPU */ | 287 | /* For hcall instrumentation. One structure per-hcall, per-CPU */ |
286 | struct hcall_stats { | 288 | struct hcall_stats { |
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 7e06b43720d3..a6ca6da1430b 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h | |||
@@ -31,6 +31,10 @@ | |||
31 | #define KEXEC_ARCH KEXEC_ARCH_PPC | 31 | #define KEXEC_ARCH KEXEC_ARCH_PPC |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define KEXEC_STATE_NONE 0 | ||
35 | #define KEXEC_STATE_IRQS_OFF 1 | ||
36 | #define KEXEC_STATE_REAL_MODE 2 | ||
37 | |||
34 | #ifndef __ASSEMBLY__ | 38 | #ifndef __ASSEMBLY__ |
35 | #include <linux/cpumask.h> | 39 | #include <linux/cpumask.h> |
36 | #include <asm/reg.h> | 40 | #include <asm/reg.h> |
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h index 0372669383a8..bf52d704fc47 100644 --- a/arch/powerpc/include/asm/mmu-44x.h +++ b/arch/powerpc/include/asm/mmu-44x.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define PPC44x_TLB_I 0x00000400 /* Caching is inhibited */ | 40 | #define PPC44x_TLB_I 0x00000400 /* Caching is inhibited */ |
41 | #define PPC44x_TLB_M 0x00000200 /* Memory is coherent */ | 41 | #define PPC44x_TLB_M 0x00000200 /* Memory is coherent */ |
42 | #define PPC44x_TLB_G 0x00000100 /* Memory is guarded */ | 42 | #define PPC44x_TLB_G 0x00000100 /* Memory is guarded */ |
43 | #define PPC44x_TLB_E 0x00000080 /* Memory is guarded */ | 43 | #define PPC44x_TLB_E 0x00000080 /* Memory is little endian */ |
44 | 44 | ||
45 | #define PPC44x_TLB_PERM_MASK 0x0000003f | 45 | #define PPC44x_TLB_PERM_MASK 0x0000003f |
46 | #define PPC44x_TLB_UX 0x00000020 /* User execution */ | 46 | #define PPC44x_TLB_UX 0x00000020 /* User execution */ |
@@ -53,6 +53,52 @@ | |||
53 | /* Number of TLB entries */ | 53 | /* Number of TLB entries */ |
54 | #define PPC44x_TLB_SIZE 64 | 54 | #define PPC44x_TLB_SIZE 64 |
55 | 55 | ||
56 | /* 47x bits */ | ||
57 | #define PPC47x_MMUCR_TID 0x0000ffff | ||
58 | #define PPC47x_MMUCR_STS 0x00010000 | ||
59 | |||
60 | /* Page identification fields */ | ||
61 | #define PPC47x_TLB0_EPN_MASK 0xfffff000 /* Effective Page Number */ | ||
62 | #define PPC47x_TLB0_VALID 0x00000800 /* Valid flag */ | ||
63 | #define PPC47x_TLB0_TS 0x00000400 /* Translation address space */ | ||
64 | #define PPC47x_TLB0_4K 0x00000000 | ||
65 | #define PPC47x_TLB0_16K 0x00000010 | ||
66 | #define PPC47x_TLB0_64K 0x00000030 | ||
67 | #define PPC47x_TLB0_1M 0x00000070 | ||
68 | #define PPC47x_TLB0_16M 0x000000f0 | ||
69 | #define PPC47x_TLB0_256M 0x000001f0 | ||
70 | #define PPC47x_TLB0_1G 0x000003f0 | ||
71 | #define PPC47x_TLB0_BOLTED_R 0x00000008 /* tlbre only */ | ||
72 | |||
73 | /* Translation fields */ | ||
74 | #define PPC47x_TLB1_RPN_MASK 0xfffff000 /* Real Page Number */ | ||
75 | #define PPC47x_TLB1_ERPN_MASK 0x000003ff | ||
76 | |||
77 | /* Storage attribute and access control fields */ | ||
78 | #define PPC47x_TLB2_ATTR_MASK 0x0003ff80 | ||
79 | #define PPC47x_TLB2_IL1I 0x00020000 /* Memory is guarded */ | ||
80 | #define PPC47x_TLB2_IL1D 0x00010000 /* Memory is guarded */ | ||
81 | #define PPC47x_TLB2_U0 0x00008000 /* User 0 */ | ||
82 | #define PPC47x_TLB2_U1 0x00004000 /* User 1 */ | ||
83 | #define PPC47x_TLB2_U2 0x00002000 /* User 2 */ | ||
84 | #define PPC47x_TLB2_U3 0x00001000 /* User 3 */ | ||
85 | #define PPC47x_TLB2_W 0x00000800 /* Caching is write-through */ | ||
86 | #define PPC47x_TLB2_I 0x00000400 /* Caching is inhibited */ | ||
87 | #define PPC47x_TLB2_M 0x00000200 /* Memory is coherent */ | ||
88 | #define PPC47x_TLB2_G 0x00000100 /* Memory is guarded */ | ||
89 | #define PPC47x_TLB2_E 0x00000080 /* Memory is little endian */ | ||
90 | #define PPC47x_TLB2_PERM_MASK 0x0000003f | ||
91 | #define PPC47x_TLB2_UX 0x00000020 /* User execution */ | ||
92 | #define PPC47x_TLB2_UW 0x00000010 /* User write */ | ||
93 | #define PPC47x_TLB2_UR 0x00000008 /* User read */ | ||
94 | #define PPC47x_TLB2_SX 0x00000004 /* Super execution */ | ||
95 | #define PPC47x_TLB2_SW 0x00000002 /* Super write */ | ||
96 | #define PPC47x_TLB2_SR 0x00000001 /* Super read */ | ||
97 | #define PPC47x_TLB2_U_RWX (PPC47x_TLB2_UX|PPC47x_TLB2_UW|PPC47x_TLB2_UR) | ||
98 | #define PPC47x_TLB2_S_RWX (PPC47x_TLB2_SX|PPC47x_TLB2_SW|PPC47x_TLB2_SR) | ||
99 | #define PPC47x_TLB2_S_RW (PPC47x_TLB2_SW | PPC47x_TLB2_SR) | ||
100 | #define PPC47x_TLB2_IMG (PPC47x_TLB2_I | PPC47x_TLB2_M | PPC47x_TLB2_G) | ||
101 | |||
56 | #ifndef __ASSEMBLY__ | 102 | #ifndef __ASSEMBLY__ |
57 | 103 | ||
58 | extern unsigned int tlb_44x_hwater; | 104 | extern unsigned int tlb_44x_hwater; |
@@ -79,12 +125,15 @@ typedef struct { | |||
79 | 125 | ||
80 | #if (PAGE_SHIFT == 12) | 126 | #if (PAGE_SHIFT == 12) |
81 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K | 127 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K |
128 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_4K | ||
82 | #define mmu_virtual_psize MMU_PAGE_4K | 129 | #define mmu_virtual_psize MMU_PAGE_4K |
83 | #elif (PAGE_SHIFT == 14) | 130 | #elif (PAGE_SHIFT == 14) |
84 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K | 131 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K |
132 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_16K | ||
85 | #define mmu_virtual_psize MMU_PAGE_16K | 133 | #define mmu_virtual_psize MMU_PAGE_16K |
86 | #elif (PAGE_SHIFT == 16) | 134 | #elif (PAGE_SHIFT == 16) |
87 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K | 135 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K |
136 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_64K | ||
88 | #define mmu_virtual_psize MMU_PAGE_64K | 137 | #define mmu_virtual_psize MMU_PAGE_64K |
89 | #elif (PAGE_SHIFT == 18) | 138 | #elif (PAGE_SHIFT == 18) |
90 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K | 139 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K |
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 7ffbb65ff7a9..7ebf42ed84a2 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) | 18 | #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) |
19 | #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) | 19 | #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) |
20 | #define MMU_FTR_TYPE_3E ASM_CONST(0x00000020) | 20 | #define MMU_FTR_TYPE_3E ASM_CONST(0x00000020) |
21 | #define MMU_FTR_TYPE_47x ASM_CONST(0x00000040) | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * This is individual features | 24 | * This is individual features |
diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h index 35acac90c8ca..aac87cbceb57 100644 --- a/arch/powerpc/include/asm/mmzone.h +++ b/arch/powerpc/include/asm/mmzone.h | |||
@@ -30,7 +30,7 @@ extern struct pglist_data *node_data[]; | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | extern int numa_cpu_lookup_table[]; | 32 | extern int numa_cpu_lookup_table[]; |
33 | extern cpumask_t numa_cpumask_lookup_table[]; | 33 | extern cpumask_var_t node_to_cpumask_map[]; |
34 | #ifdef CONFIG_MEMORY_HOTPLUG | 34 | #ifdef CONFIG_MEMORY_HOTPLUG |
35 | extern unsigned long max_pfn; | 35 | extern unsigned long max_pfn; |
36 | #endif | 36 | #endif |
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index 61913d9a21a0..e000cce8f6dd 100644 --- a/arch/powerpc/include/asm/mpic.h +++ b/arch/powerpc/include/asm/mpic.h | |||
@@ -463,9 +463,6 @@ extern void mpic_cpu_set_priority(int prio); | |||
463 | /* Request IPIs on primary mpic */ | 463 | /* Request IPIs on primary mpic */ |
464 | extern void mpic_request_ipis(void); | 464 | extern void mpic_request_ipis(void); |
465 | 465 | ||
466 | /* Send an IPI (non offseted number 0..3) */ | ||
467 | extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask); | ||
468 | |||
469 | /* Send a message (IPI) to a given target (cpu number or MSG_*) */ | 466 | /* Send a message (IPI) to a given target (cpu number or MSG_*) */ |
470 | void smp_mpic_message_pass(int target, int msg); | 467 | void smp_mpic_message_pass(int target, int msg); |
471 | 468 | ||
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index a011603d4079..971dfa4815f0 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -82,6 +82,7 @@ struct paca_struct { | |||
82 | s16 hw_cpu_id; /* Physical processor number */ | 82 | s16 hw_cpu_id; /* Physical processor number */ |
83 | u8 cpu_start; /* At startup, processor spins until */ | 83 | u8 cpu_start; /* At startup, processor spins until */ |
84 | /* this becomes non-zero. */ | 84 | /* this becomes non-zero. */ |
85 | u8 kexec_state; /* set when kexec down has irqs off */ | ||
85 | #ifdef CONFIG_PPC_STD_MMU_64 | 86 | #ifdef CONFIG_PPC_STD_MMU_64 |
86 | struct slb_shadow *slb_shadow_ptr; | 87 | struct slb_shadow *slb_shadow_ptr; |
87 | 88 | ||
diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h index 94942d60ddfd..1ca1102b4a2f 100644 --- a/arch/powerpc/include/asm/parport.h +++ b/arch/powerpc/include/asm/parport.h | |||
@@ -19,6 +19,8 @@ static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | |||
19 | u32 io1, io2; | 19 | u32 io1, io2; |
20 | int propsize; | 20 | int propsize; |
21 | int count = 0; | 21 | int count = 0; |
22 | int virq; | ||
23 | |||
22 | for (np = NULL; (np = of_find_compatible_node(np, | 24 | for (np = NULL; (np = of_find_compatible_node(np, |
23 | "parallel", | 25 | "parallel", |
24 | "pnpPNP,400")) != NULL;) { | 26 | "pnpPNP,400")) != NULL;) { |
@@ -26,10 +28,13 @@ static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | |||
26 | if (!prop || propsize > 6*sizeof(u32)) | 28 | if (!prop || propsize > 6*sizeof(u32)) |
27 | continue; | 29 | continue; |
28 | io1 = prop[1]; io2 = prop[2]; | 30 | io1 = prop[1]; io2 = prop[2]; |
29 | prop = of_get_property(np, "interrupts", NULL); | 31 | |
30 | if (!prop) | 32 | virq = irq_of_parse_and_map(np, 0); |
33 | if (virq == NO_IRQ) | ||
31 | continue; | 34 | continue; |
32 | if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL, 0) != NULL) | 35 | |
36 | if (parport_pc_probe_port(io1, io2, virq, autodma, NULL, 0) | ||
37 | != NULL) | ||
33 | count++; | 38 | count++; |
34 | } | 39 | } |
35 | return count; | 40 | return count; |
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h index 605f5c5398d1..292725cec2e3 100644 --- a/arch/powerpc/include/asm/pgalloc-64.h +++ b/arch/powerpc/include/asm/pgalloc-64.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #include <linux/cpumask.h> | 11 | #include <linux/cpumask.h> |
12 | #include <linux/percpu.h> | 12 | #include <linux/percpu.h> |
13 | 13 | ||
14 | struct vmemmap_backing { | ||
15 | struct vmemmap_backing *list; | ||
16 | unsigned long phys; | ||
17 | unsigned long virt_addr; | ||
18 | }; | ||
19 | |||
14 | /* | 20 | /* |
15 | * Functions that deal with pagetables that could be at any level of | 21 | * Functions that deal with pagetables that could be at any level of |
16 | * the table need to be passed an "index_size" so they know how to | 22 | * the table need to be passed an "index_size" so they know how to |
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index 55646adfa843..a7db96f2b5c3 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
@@ -287,7 +287,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | |||
287 | #define pmd_page_vaddr(pmd) \ | 287 | #define pmd_page_vaddr(pmd) \ |
288 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 288 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
289 | #define pmd_page(pmd) \ | 289 | #define pmd_page(pmd) \ |
290 | (mem_map + (pmd_val(pmd) >> PAGE_SHIFT)) | 290 | pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) |
291 | #else | 291 | #else |
292 | #define pmd_page_vaddr(pmd) \ | 292 | #define pmd_page_vaddr(pmd) \ |
293 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) | 293 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) |
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 9e2d84c06b74..5d8be0416227 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -89,6 +89,7 @@ struct pt_regs { | |||
89 | 89 | ||
90 | #define instruction_pointer(regs) ((regs)->nip) | 90 | #define instruction_pointer(regs) ((regs)->nip) |
91 | #define user_stack_pointer(regs) ((regs)->gpr[1]) | 91 | #define user_stack_pointer(regs) ((regs)->gpr[1]) |
92 | #define kernel_stack_pointer(regs) ((regs)->gpr[1]) | ||
92 | #define regs_return_value(regs) ((regs)->gpr[3]) | 93 | #define regs_return_value(regs) ((regs)->gpr[3]) |
93 | 94 | ||
94 | #ifdef CONFIG_SMP | 95 | #ifdef CONFIG_SMP |
@@ -141,6 +142,69 @@ do { \ | |||
141 | #define arch_has_block_step() (!cpu_has_feature(CPU_FTR_601)) | 142 | #define arch_has_block_step() (!cpu_has_feature(CPU_FTR_601)) |
142 | #define ARCH_HAS_USER_SINGLE_STEP_INFO | 143 | #define ARCH_HAS_USER_SINGLE_STEP_INFO |
143 | 144 | ||
145 | /* | ||
146 | * kprobe-based event tracer support | ||
147 | */ | ||
148 | |||
149 | #include <linux/stddef.h> | ||
150 | #include <linux/thread_info.h> | ||
151 | extern int regs_query_register_offset(const char *name); | ||
152 | extern const char *regs_query_register_name(unsigned int offset); | ||
153 | #define MAX_REG_OFFSET (offsetof(struct pt_regs, dsisr)) | ||
154 | |||
155 | /** | ||
156 | * regs_get_register() - get register value from its offset | ||
157 | * @regs: pt_regs from which register value is gotten | ||
158 | * @offset: offset number of the register. | ||
159 | * | ||
160 | * regs_get_register returns the value of a register whose offset from @regs. | ||
161 | * The @offset is the offset of the register in struct pt_regs. | ||
162 | * If @offset is bigger than MAX_REG_OFFSET, this returns 0. | ||
163 | */ | ||
164 | static inline unsigned long regs_get_register(struct pt_regs *regs, | ||
165 | unsigned int offset) | ||
166 | { | ||
167 | if (unlikely(offset > MAX_REG_OFFSET)) | ||
168 | return 0; | ||
169 | return *(unsigned long *)((unsigned long)regs + offset); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * regs_within_kernel_stack() - check the address in the stack | ||
174 | * @regs: pt_regs which contains kernel stack pointer. | ||
175 | * @addr: address which is checked. | ||
176 | * | ||
177 | * regs_within_kernel_stack() checks @addr is within the kernel stack page(s). | ||
178 | * If @addr is within the kernel stack, it returns true. If not, returns false. | ||
179 | */ | ||
180 | |||
181 | static inline bool regs_within_kernel_stack(struct pt_regs *regs, | ||
182 | unsigned long addr) | ||
183 | { | ||
184 | return ((addr & ~(THREAD_SIZE - 1)) == | ||
185 | (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * regs_get_kernel_stack_nth() - get Nth entry of the stack | ||
190 | * @regs: pt_regs which contains kernel stack pointer. | ||
191 | * @n: stack entry number. | ||
192 | * | ||
193 | * regs_get_kernel_stack_nth() returns @n th entry of the kernel stack which | ||
194 | * is specified by @regs. If the @n th entry is NOT in the kernel stack, | ||
195 | * this returns 0. | ||
196 | */ | ||
197 | static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | ||
198 | unsigned int n) | ||
199 | { | ||
200 | unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); | ||
201 | addr += n; | ||
202 | if (regs_within_kernel_stack(regs, (unsigned long)addr)) | ||
203 | return *addr; | ||
204 | else | ||
205 | return 0; | ||
206 | } | ||
207 | |||
144 | #endif /* __ASSEMBLY__ */ | 208 | #endif /* __ASSEMBLY__ */ |
145 | 209 | ||
146 | #endif /* __KERNEL__ */ | 210 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 5572e86223f4..b68f025924a8 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -817,6 +817,7 @@ | |||
817 | #define PVR_403GC 0x00200200 | 817 | #define PVR_403GC 0x00200200 |
818 | #define PVR_403GCX 0x00201400 | 818 | #define PVR_403GCX 0x00201400 |
819 | #define PVR_405GP 0x40110000 | 819 | #define PVR_405GP 0x40110000 |
820 | #define PVR_476 0x11a52000 | ||
820 | #define PVR_STB03XXX 0x40310000 | 821 | #define PVR_STB03XXX 0x40310000 |
821 | #define PVR_NP405H 0x41410000 | 822 | #define PVR_NP405H 0x41410000 |
822 | #define PVR_NP405L 0x41610000 | 823 | #define PVR_NP405L 0x41610000 |
@@ -853,6 +854,9 @@ | |||
853 | #define PVR_8245 0x80811014 | 854 | #define PVR_8245 0x80811014 |
854 | #define PVR_8260 PVR_8240 | 855 | #define PVR_8260 PVR_8240 |
855 | 856 | ||
857 | /* 476 Simulator seems to currently have the PVR of the 602... */ | ||
858 | #define PVR_476_ISS 0x00052000 | ||
859 | |||
856 | /* 64-bit processors */ | 860 | /* 64-bit processors */ |
857 | /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ | 861 | /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ |
858 | #define PV_NORTHSTAR 0x0033 | 862 | #define PV_NORTHSTAR 0x0033 |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 414d434a66d0..5304a37ba425 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -191,6 +191,10 @@ | |||
191 | #define MCSR_DCFP 0x01000000 /* D-Cache Flush Parity Error */ | 191 | #define MCSR_DCFP 0x01000000 /* D-Cache Flush Parity Error */ |
192 | #define MCSR_IMPE 0x00800000 /* Imprecise Machine Check Exception */ | 192 | #define MCSR_IMPE 0x00800000 /* Imprecise Machine Check Exception */ |
193 | 193 | ||
194 | #define PPC47x_MCSR_GPR 0x01000000 /* GPR parity error */ | ||
195 | #define PPC47x_MCSR_FPR 0x00800000 /* FPR parity error */ | ||
196 | #define PPC47x_MCSR_IPR 0x00400000 /* Imprecise Machine Check Exception */ | ||
197 | |||
194 | #ifdef CONFIG_E500 | 198 | #ifdef CONFIG_E500 |
195 | #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ | 199 | #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ |
196 | #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ | 200 | #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ |
@@ -604,5 +608,25 @@ | |||
604 | #define DBCR_JOI 0x00000002 /* JTAG Serial Outbound Int. Enable */ | 608 | #define DBCR_JOI 0x00000002 /* JTAG Serial Outbound Int. Enable */ |
605 | #define DBCR_JII 0x00000001 /* JTAG Serial Inbound Int. Enable */ | 609 | #define DBCR_JII 0x00000001 /* JTAG Serial Inbound Int. Enable */ |
606 | #endif /* 403GCX */ | 610 | #endif /* 403GCX */ |
611 | |||
612 | /* Some 476 specific registers */ | ||
613 | #define SPRN_SSPCR 830 | ||
614 | #define SPRN_USPCR 831 | ||
615 | #define SPRN_ISPCR 829 | ||
616 | #define SPRN_MMUBE0 820 | ||
617 | #define MMUBE0_IBE0_SHIFT 24 | ||
618 | #define MMUBE0_IBE1_SHIFT 16 | ||
619 | #define MMUBE0_IBE2_SHIFT 8 | ||
620 | #define MMUBE0_VBE0 0x00000004 | ||
621 | #define MMUBE0_VBE1 0x00000002 | ||
622 | #define MMUBE0_VBE2 0x00000001 | ||
623 | #define SPRN_MMUBE1 821 | ||
624 | #define MMUBE1_IBE3_SHIFT 24 | ||
625 | #define MMUBE1_IBE4_SHIFT 16 | ||
626 | #define MMUBE1_IBE5_SHIFT 8 | ||
627 | #define MMUBE1_VBE3 0x00000004 | ||
628 | #define MMUBE1_VBE4 0x00000002 | ||
629 | #define MMUBE1_VBE5 0x00000001 | ||
630 | |||
607 | #endif /* __ASM_POWERPC_REG_BOOKE_H__ */ | 631 | #endif /* __ASM_POWERPC_REG_BOOKE_H__ */ |
608 | #endif /* __KERNEL__ */ | 632 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 1d3b270d3083..66e237bbe15f 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -40,7 +40,7 @@ extern void smp_message_recv(int); | |||
40 | DECLARE_PER_CPU(unsigned int, cpu_pvr); | 40 | DECLARE_PER_CPU(unsigned int, cpu_pvr); |
41 | 41 | ||
42 | #ifdef CONFIG_HOTPLUG_CPU | 42 | #ifdef CONFIG_HOTPLUG_CPU |
43 | extern void fixup_irqs(cpumask_t map); | 43 | extern void fixup_irqs(const struct cpumask *map); |
44 | int generic_cpu_disable(void); | 44 | int generic_cpu_disable(void); |
45 | int generic_cpu_enable(unsigned int cpu); | 45 | int generic_cpu_enable(unsigned int cpu); |
46 | void generic_cpu_die(unsigned int cpu); | 46 | void generic_cpu_die(unsigned int cpu); |
@@ -68,8 +68,19 @@ static inline void set_hard_smp_processor_id(int cpu, int phys) | |||
68 | } | 68 | } |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 71 | DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map); |
72 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 72 | DECLARE_PER_CPU(cpumask_var_t, cpu_core_map); |
73 | |||
74 | static inline struct cpumask *cpu_sibling_mask(int cpu) | ||
75 | { | ||
76 | return per_cpu(cpu_sibling_map, cpu); | ||
77 | } | ||
78 | |||
79 | static inline struct cpumask *cpu_core_mask(int cpu) | ||
80 | { | ||
81 | return per_cpu(cpu_core_map, cpu); | ||
82 | } | ||
83 | |||
73 | extern int cpu_to_core_id(int cpu); | 84 | extern int cpu_to_core_id(int cpu); |
74 | 85 | ||
75 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. | 86 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. |
@@ -93,7 +104,6 @@ void smp_init_pSeries(void); | |||
93 | void smp_init_cell(void); | 104 | void smp_init_cell(void); |
94 | void smp_init_celleb(void); | 105 | void smp_init_celleb(void); |
95 | void smp_setup_cpu_maps(void); | 106 | void smp_setup_cpu_maps(void); |
96 | void smp_setup_cpu_sibling_map(void); | ||
97 | 107 | ||
98 | extern int __cpu_disable(void); | 108 | extern int __cpu_disable(void); |
99 | extern void __cpu_die(unsigned int cpu); | 109 | extern void __cpu_die(unsigned int cpu); |
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 8eaec310a25b..32adf7280720 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -8,6 +8,26 @@ struct device_node; | |||
8 | 8 | ||
9 | #ifdef CONFIG_NUMA | 9 | #ifdef CONFIG_NUMA |
10 | 10 | ||
11 | /* | ||
12 | * Before going off node we want the VM to try and reclaim from the local | ||
13 | * node. It does this if the remote distance is larger than RECLAIM_DISTANCE. | ||
14 | * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of | ||
15 | * 20, we never reclaim and go off node straight away. | ||
16 | * | ||
17 | * To fix this we choose a smaller value of RECLAIM_DISTANCE. | ||
18 | */ | ||
19 | #define RECLAIM_DISTANCE 10 | ||
20 | |||
21 | /* | ||
22 | * Before going off node we want the VM to try and reclaim from the local | ||
23 | * node. It does this if the remote distance is larger than RECLAIM_DISTANCE. | ||
24 | * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of | ||
25 | * 20, we never reclaim and go off node straight away. | ||
26 | * | ||
27 | * To fix this we choose a smaller value of RECLAIM_DISTANCE. | ||
28 | */ | ||
29 | #define RECLAIM_DISTANCE 10 | ||
30 | |||
11 | #include <asm/mmzone.h> | 31 | #include <asm/mmzone.h> |
12 | 32 | ||
13 | static inline int cpu_to_node(int cpu) | 33 | static inline int cpu_to_node(int cpu) |
@@ -19,7 +39,7 @@ static inline int cpu_to_node(int cpu) | |||
19 | 39 | ||
20 | #define cpumask_of_node(node) ((node) == -1 ? \ | 40 | #define cpumask_of_node(node) ((node) == -1 ? \ |
21 | cpu_all_mask : \ | 41 | cpu_all_mask : \ |
22 | &numa_cpumask_lookup_table[node]) | 42 | node_to_cpumask_map[node]) |
23 | 43 | ||
24 | int of_node_to_nid(struct device_node *device); | 44 | int of_node_to_nid(struct device_node *device); |
25 | 45 | ||
@@ -102,8 +122,8 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
102 | #ifdef CONFIG_PPC64 | 122 | #ifdef CONFIG_PPC64 |
103 | #include <asm/smp.h> | 123 | #include <asm/smp.h> |
104 | 124 | ||
105 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | 125 | #define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) |
106 | #define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) | 126 | #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) |
107 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) | 127 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) |
108 | #endif | 128 | #endif |
109 | #endif | 129 | #endif |