diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/cputable.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/iommu.h | 5 | ||||
-rw-r--r-- | include/asm-powerpc/machdep.h | 10 | ||||
-rw-r--r-- | include/asm-powerpc/prom.h | 8 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/thread_info.h | 20 | ||||
-rw-r--r-- | include/asm-powerpc/tlbflush.h | 9 |
7 files changed, 40 insertions, 17 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index c019501daceb..79a0556a0ab8 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -101,6 +101,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
101 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) | 101 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) |
102 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) | 102 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) |
103 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) | 103 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) |
104 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) | ||
104 | #else | 105 | #else |
105 | /* ensure on 32b processors the flags are available for compiling but | 106 | /* ensure on 32b processors the flags are available for compiling but |
106 | * don't do anything */ | 107 | * don't do anything */ |
@@ -116,6 +117,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
116 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) | 117 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) |
117 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) | 118 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) |
118 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) | 119 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) |
120 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) | ||
119 | #endif | 121 | #endif |
120 | 122 | ||
121 | #ifndef __ASSEMBLY__ | 123 | #ifndef __ASSEMBLY__ |
@@ -339,6 +341,7 @@ enum { | |||
339 | #ifdef __powerpc64__ | 341 | #ifdef __powerpc64__ |
340 | CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | | 342 | CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | |
341 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | | 343 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | |
344 | CPU_FTR_CI_LARGE_PAGE | | ||
342 | #endif | 345 | #endif |
343 | 0, | 346 | 0, |
344 | 347 | ||
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 9d91bdd667ae..6a35e6570ccd 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -74,6 +74,11 @@ extern void iommu_devnode_init_pSeries(struct device_node *dn); | |||
74 | 74 | ||
75 | /* Creates table for an individual device node */ | 75 | /* Creates table for an individual device node */ |
76 | extern void iommu_devnode_init_iSeries(struct device_node *dn); | 76 | extern void iommu_devnode_init_iSeries(struct device_node *dn); |
77 | /* Get table parameters from HV */ | ||
78 | extern void iommu_table_getparms_iSeries(unsigned long busno, | ||
79 | unsigned char slotno, | ||
80 | unsigned char virtbus, | ||
81 | struct iommu_table* tbl); | ||
77 | 82 | ||
78 | #endif /* CONFIG_PPC_ISERIES */ | 83 | #endif /* CONFIG_PPC_ISERIES */ |
79 | 84 | ||
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 629ca964b974..fa03864d06eb 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -47,20 +47,22 @@ struct machdep_calls { | |||
47 | #ifdef CONFIG_PPC64 | 47 | #ifdef CONFIG_PPC64 |
48 | void (*hpte_invalidate)(unsigned long slot, | 48 | void (*hpte_invalidate)(unsigned long slot, |
49 | unsigned long va, | 49 | unsigned long va, |
50 | int large, | 50 | int psize, |
51 | int local); | 51 | int local); |
52 | long (*hpte_updatepp)(unsigned long slot, | 52 | long (*hpte_updatepp)(unsigned long slot, |
53 | unsigned long newpp, | 53 | unsigned long newpp, |
54 | unsigned long va, | 54 | unsigned long va, |
55 | int large, | 55 | int pize, |
56 | int local); | 56 | int local); |
57 | void (*hpte_updateboltedpp)(unsigned long newpp, | 57 | void (*hpte_updateboltedpp)(unsigned long newpp, |
58 | unsigned long ea); | 58 | unsigned long ea, |
59 | int psize); | ||
59 | long (*hpte_insert)(unsigned long hpte_group, | 60 | long (*hpte_insert)(unsigned long hpte_group, |
60 | unsigned long va, | 61 | unsigned long va, |
61 | unsigned long prpn, | 62 | unsigned long prpn, |
63 | unsigned long rflags, | ||
62 | unsigned long vflags, | 64 | unsigned long vflags, |
63 | unsigned long rflags); | 65 | int psize); |
64 | long (*hpte_remove)(unsigned long hpte_group); | 66 | long (*hpte_remove)(unsigned long hpte_group); |
65 | void (*flush_hash_range)(unsigned long number, int local); | 67 | void (*flush_hash_range)(unsigned long number, int local); |
66 | 68 | ||
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 3a0104fa0462..7587bf5f38c6 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -178,6 +178,14 @@ extern struct device_node *of_get_next_child(const struct device_node *node, | |||
178 | extern struct device_node *of_node_get(struct device_node *node); | 178 | extern struct device_node *of_node_get(struct device_node *node); |
179 | extern void of_node_put(struct device_node *node); | 179 | extern void of_node_put(struct device_node *node); |
180 | 180 | ||
181 | /* For scanning the flat device-tree at boot time */ | ||
182 | int __init of_scan_flat_dt(int (*it)(unsigned long node, | ||
183 | const char *uname, int depth, | ||
184 | void *data), | ||
185 | void *data); | ||
186 | void* __init of_get_flat_dt_prop(unsigned long node, const char *name, | ||
187 | unsigned long *size); | ||
188 | |||
181 | /* For updating the device tree at runtime */ | 189 | /* For updating the device tree at runtime */ |
182 | extern void of_attach_node(struct device_node *); | 190 | extern void of_attach_node(struct device_node *); |
183 | extern void of_detach_node(const struct device_node *); | 191 | extern void of_detach_node(const struct device_node *); |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index b5da0b851e02..3536a5cd7a2d 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -289,7 +289,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | |||
289 | 289 | ||
290 | #ifdef CONFIG_PPC64 | 290 | #ifdef CONFIG_PPC64 |
291 | static __inline__ unsigned long | 291 | static __inline__ unsigned long |
292 | __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) | 292 | __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) |
293 | { | 293 | { |
294 | unsigned long prev; | 294 | unsigned long prev; |
295 | 295 | ||
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index ab17db79f69d..e525f49bd179 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -65,23 +65,27 @@ struct thread_info { | |||
65 | 65 | ||
66 | /* thread information allocation */ | 66 | /* thread information allocation */ |
67 | 67 | ||
68 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
69 | #define THREAD_INFO_GFP GFP_KERNEL | __GFP_ZERO | ||
70 | #else | ||
71 | #define THREAD_INFO_GFP GFP_KERNEL | ||
72 | #endif | ||
73 | |||
74 | #if THREAD_SHIFT >= PAGE_SHIFT | 68 | #if THREAD_SHIFT >= PAGE_SHIFT |
75 | 69 | ||
76 | #define THREAD_ORDER (THREAD_SHIFT - PAGE_SHIFT) | 70 | #define THREAD_ORDER (THREAD_SHIFT - PAGE_SHIFT) |
77 | 71 | ||
72 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
78 | #define alloc_thread_info(tsk) \ | 73 | #define alloc_thread_info(tsk) \ |
79 | ((struct thread_info *)__get_free_pages(THREAD_INFO_GFP, THREAD_ORDER)) | 74 | ((struct thread_info *)__get_free_pages(GFP_KERNEL | \ |
75 | __GFP_ZERO, THREAD_ORDER)) | ||
76 | #else | ||
77 | #define alloc_thread_info(tsk) \ | ||
78 | ((struct thread_info *)__get_free_pages(GFP_KERNEL, THREAD_ORDER)) | ||
79 | #endif | ||
80 | #define free_thread_info(ti) free_pages((unsigned long)ti, THREAD_ORDER) | 80 | #define free_thread_info(ti) free_pages((unsigned long)ti, THREAD_ORDER) |
81 | 81 | ||
82 | #else /* THREAD_SHIFT < PAGE_SHIFT */ | 82 | #else /* THREAD_SHIFT < PAGE_SHIFT */ |
83 | 83 | ||
84 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, THREAD_INFO_GFP) | 84 | #ifdef CONFIG_DEBUG_STACK_USAGE |
85 | #define alloc_thread_info(tsk) kzalloc(THREAD_SIZE, GFP_KERNEL) | ||
86 | #else | ||
87 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | ||
88 | #endif | ||
85 | #define free_thread_info(ti) kfree(ti) | 89 | #define free_thread_info(ti) kfree(ti) |
86 | 90 | ||
87 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ | 91 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ |
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index ca3655672bbc..a2998eee37bb 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h | |||
@@ -31,9 +31,9 @@ struct mm_struct; | |||
31 | struct ppc64_tlb_batch { | 31 | struct ppc64_tlb_batch { |
32 | unsigned long index; | 32 | unsigned long index; |
33 | struct mm_struct *mm; | 33 | struct mm_struct *mm; |
34 | pte_t pte[PPC64_TLB_BATCH_NR]; | 34 | real_pte_t pte[PPC64_TLB_BATCH_NR]; |
35 | unsigned long vaddr[PPC64_TLB_BATCH_NR]; | 35 | unsigned long vaddr[PPC64_TLB_BATCH_NR]; |
36 | unsigned int large; | 36 | unsigned int psize; |
37 | }; | 37 | }; |
38 | DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 38 | DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
39 | 39 | ||
@@ -48,8 +48,9 @@ static inline void flush_tlb_pending(void) | |||
48 | put_cpu_var(ppc64_tlb_batch); | 48 | put_cpu_var(ppc64_tlb_batch); |
49 | } | 49 | } |
50 | 50 | ||
51 | extern void flush_hash_page(unsigned long va, pte_t pte, int local); | 51 | extern void flush_hash_page(unsigned long va, real_pte_t pte, int psize, |
52 | void flush_hash_range(unsigned long number, int local); | 52 | int local); |
53 | extern void flush_hash_range(unsigned long number, int local); | ||
53 | 54 | ||
54 | #else /* CONFIG_PPC64 */ | 55 | #else /* CONFIG_PPC64 */ |
55 | 56 | ||