diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/cputable.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/dma-mapping.h | 125 | ||||
-rw-r--r-- | include/asm-powerpc/iommu.h | 16 | ||||
-rw-r--r-- | include/asm-powerpc/mman.h | 32 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 8 | ||||
-rw-r--r-- | include/asm-powerpc/processor.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/spu.h | 1 |
7 files changed, 148 insertions, 39 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 3171ac904b91..4fd76898975b 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -186,6 +186,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
186 | #define CPU_FTR_1T_SEGMENT LONG_ASM_CONST(0x0004000000000000) | 186 | #define CPU_FTR_1T_SEGMENT LONG_ASM_CONST(0x0004000000000000) |
187 | #define CPU_FTR_NO_SLBIE_B LONG_ASM_CONST(0x0008000000000000) | 187 | #define CPU_FTR_NO_SLBIE_B LONG_ASM_CONST(0x0008000000000000) |
188 | #define CPU_FTR_VSX LONG_ASM_CONST(0x0010000000000000) | 188 | #define CPU_FTR_VSX LONG_ASM_CONST(0x0010000000000000) |
189 | #define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000) | ||
189 | 190 | ||
190 | #ifndef __ASSEMBLY__ | 191 | #ifndef __ASSEMBLY__ |
191 | 192 | ||
@@ -401,7 +402,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
401 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 402 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
402 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 403 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
403 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ | 404 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
404 | CPU_FTR_DSCR) | 405 | CPU_FTR_DSCR | CPU_FTR_SAO) |
405 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 406 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
406 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 407 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
407 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 408 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index bbefb69bfb67..74c549780987 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -13,6 +13,7 @@ | |||
13 | /* need struct page definitions */ | 13 | /* need struct page definitions */ |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
16 | #include <linux/dma-attrs.h> | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 19 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
@@ -44,6 +45,15 @@ extern void __dma_sync_page(struct page *page, unsigned long offset, | |||
44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ | 45 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ |
45 | 46 | ||
46 | #ifdef CONFIG_PPC64 | 47 | #ifdef CONFIG_PPC64 |
48 | |||
49 | static inline unsigned long device_to_mask(struct device *dev) | ||
50 | { | ||
51 | if (dev->dma_mask && *dev->dma_mask) | ||
52 | return *dev->dma_mask; | ||
53 | /* Assume devices without mask can take 32 bit addresses */ | ||
54 | return 0xfffffffful; | ||
55 | } | ||
56 | |||
47 | /* | 57 | /* |
48 | * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO | 58 | * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO |
49 | */ | 59 | */ |
@@ -53,13 +63,17 @@ struct dma_mapping_ops { | |||
53 | void (*free_coherent)(struct device *dev, size_t size, | 63 | void (*free_coherent)(struct device *dev, size_t size, |
54 | void *vaddr, dma_addr_t dma_handle); | 64 | void *vaddr, dma_addr_t dma_handle); |
55 | dma_addr_t (*map_single)(struct device *dev, void *ptr, | 65 | dma_addr_t (*map_single)(struct device *dev, void *ptr, |
56 | size_t size, enum dma_data_direction direction); | 66 | size_t size, enum dma_data_direction direction, |
67 | struct dma_attrs *attrs); | ||
57 | void (*unmap_single)(struct device *dev, dma_addr_t dma_addr, | 68 | void (*unmap_single)(struct device *dev, dma_addr_t dma_addr, |
58 | size_t size, enum dma_data_direction direction); | 69 | size_t size, enum dma_data_direction direction, |
70 | struct dma_attrs *attrs); | ||
59 | int (*map_sg)(struct device *dev, struct scatterlist *sg, | 71 | int (*map_sg)(struct device *dev, struct scatterlist *sg, |
60 | int nents, enum dma_data_direction direction); | 72 | int nents, enum dma_data_direction direction, |
73 | struct dma_attrs *attrs); | ||
61 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, | 74 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, |
62 | int nents, enum dma_data_direction direction); | 75 | int nents, enum dma_data_direction direction, |
76 | struct dma_attrs *attrs); | ||
63 | int (*dma_supported)(struct device *dev, u64 mask); | 77 | int (*dma_supported)(struct device *dev, u64 mask); |
64 | int (*set_dma_mask)(struct device *dev, u64 dma_mask); | 78 | int (*set_dma_mask)(struct device *dev, u64 dma_mask); |
65 | }; | 79 | }; |
@@ -109,6 +123,77 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
109 | return 0; | 123 | return 0; |
110 | } | 124 | } |
111 | 125 | ||
126 | static inline dma_addr_t dma_map_single_attrs(struct device *dev, | ||
127 | void *cpu_addr, | ||
128 | size_t size, | ||
129 | enum dma_data_direction direction, | ||
130 | struct dma_attrs *attrs) | ||
131 | { | ||
132 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
133 | |||
134 | BUG_ON(!dma_ops); | ||
135 | return dma_ops->map_single(dev, cpu_addr, size, direction, attrs); | ||
136 | } | ||
137 | |||
138 | static inline void dma_unmap_single_attrs(struct device *dev, | ||
139 | dma_addr_t dma_addr, | ||
140 | size_t size, | ||
141 | enum dma_data_direction direction, | ||
142 | struct dma_attrs *attrs) | ||
143 | { | ||
144 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
145 | |||
146 | BUG_ON(!dma_ops); | ||
147 | dma_ops->unmap_single(dev, dma_addr, size, direction, attrs); | ||
148 | } | ||
149 | |||
150 | static inline dma_addr_t dma_map_page_attrs(struct device *dev, | ||
151 | struct page *page, | ||
152 | unsigned long offset, size_t size, | ||
153 | enum dma_data_direction direction, | ||
154 | struct dma_attrs *attrs) | ||
155 | { | ||
156 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
157 | |||
158 | BUG_ON(!dma_ops); | ||
159 | return dma_ops->map_single(dev, page_address(page) + offset, size, | ||
160 | direction, attrs); | ||
161 | } | ||
162 | |||
163 | static inline void dma_unmap_page_attrs(struct device *dev, | ||
164 | dma_addr_t dma_address, | ||
165 | size_t size, | ||
166 | enum dma_data_direction direction, | ||
167 | struct dma_attrs *attrs) | ||
168 | { | ||
169 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
170 | |||
171 | BUG_ON(!dma_ops); | ||
172 | dma_ops->unmap_single(dev, dma_address, size, direction, attrs); | ||
173 | } | ||
174 | |||
175 | static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
176 | int nents, enum dma_data_direction direction, | ||
177 | struct dma_attrs *attrs) | ||
178 | { | ||
179 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
180 | |||
181 | BUG_ON(!dma_ops); | ||
182 | return dma_ops->map_sg(dev, sg, nents, direction, attrs); | ||
183 | } | ||
184 | |||
185 | static inline void dma_unmap_sg_attrs(struct device *dev, | ||
186 | struct scatterlist *sg, | ||
187 | int nhwentries, | ||
188 | enum dma_data_direction direction, | ||
189 | struct dma_attrs *attrs) | ||
190 | { | ||
191 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
192 | |||
193 | BUG_ON(!dma_ops); | ||
194 | dma_ops->unmap_sg(dev, sg, nhwentries, direction, attrs); | ||
195 | } | ||
196 | |||
112 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 197 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
113 | dma_addr_t *dma_handle, gfp_t flag) | 198 | dma_addr_t *dma_handle, gfp_t flag) |
114 | { | 199 | { |
@@ -131,63 +216,43 @@ static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | |||
131 | size_t size, | 216 | size_t size, |
132 | enum dma_data_direction direction) | 217 | enum dma_data_direction direction) |
133 | { | 218 | { |
134 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 219 | return dma_map_single_attrs(dev, cpu_addr, size, direction, NULL); |
135 | |||
136 | BUG_ON(!dma_ops); | ||
137 | return dma_ops->map_single(dev, cpu_addr, size, direction); | ||
138 | } | 220 | } |
139 | 221 | ||
140 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, | 222 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, |
141 | size_t size, | 223 | size_t size, |
142 | enum dma_data_direction direction) | 224 | enum dma_data_direction direction) |
143 | { | 225 | { |
144 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 226 | dma_unmap_single_attrs(dev, dma_addr, size, direction, NULL); |
145 | |||
146 | BUG_ON(!dma_ops); | ||
147 | dma_ops->unmap_single(dev, dma_addr, size, direction); | ||
148 | } | 227 | } |
149 | 228 | ||
150 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | 229 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, |
151 | unsigned long offset, size_t size, | 230 | unsigned long offset, size_t size, |
152 | enum dma_data_direction direction) | 231 | enum dma_data_direction direction) |
153 | { | 232 | { |
154 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 233 | return dma_map_page_attrs(dev, page, offset, size, direction, NULL); |
155 | |||
156 | BUG_ON(!dma_ops); | ||
157 | return dma_ops->map_single(dev, page_address(page) + offset, size, | ||
158 | direction); | ||
159 | } | 234 | } |
160 | 235 | ||
161 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, | 236 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, |
162 | size_t size, | 237 | size_t size, |
163 | enum dma_data_direction direction) | 238 | enum dma_data_direction direction) |
164 | { | 239 | { |
165 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 240 | dma_unmap_page_attrs(dev, dma_address, size, direction, NULL); |
166 | |||
167 | BUG_ON(!dma_ops); | ||
168 | dma_ops->unmap_single(dev, dma_address, size, direction); | ||
169 | } | 241 | } |
170 | 242 | ||
171 | static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, | 243 | static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, |
172 | int nents, enum dma_data_direction direction) | 244 | int nents, enum dma_data_direction direction) |
173 | { | 245 | { |
174 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 246 | return dma_map_sg_attrs(dev, sg, nents, direction, NULL); |
175 | |||
176 | BUG_ON(!dma_ops); | ||
177 | return dma_ops->map_sg(dev, sg, nents, direction); | ||
178 | } | 247 | } |
179 | 248 | ||
180 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | 249 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, |
181 | int nhwentries, | 250 | int nhwentries, |
182 | enum dma_data_direction direction) | 251 | enum dma_data_direction direction) |
183 | { | 252 | { |
184 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 253 | dma_unmap_sg_attrs(dev, sg, nhwentries, direction, NULL); |
185 | |||
186 | BUG_ON(!dma_ops); | ||
187 | dma_ops->unmap_sg(dev, sg, nhwentries, direction); | ||
188 | } | 254 | } |
189 | 255 | ||
190 | |||
191 | /* | 256 | /* |
192 | * Available generic sets of operations | 257 | * Available generic sets of operations |
193 | */ | 258 | */ |
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 852e15f51a1e..51ecfef8d843 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -79,11 +79,13 @@ extern void iommu_free_table(struct iommu_table *tbl, const char *node_name); | |||
79 | extern struct iommu_table *iommu_init_table(struct iommu_table * tbl, | 79 | extern struct iommu_table *iommu_init_table(struct iommu_table * tbl, |
80 | int nid); | 80 | int nid); |
81 | 81 | ||
82 | extern int iommu_map_sg(struct device *dev, struct scatterlist *sglist, | 82 | extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, |
83 | int nelems, unsigned long mask, | 83 | struct scatterlist *sglist, int nelems, |
84 | enum dma_data_direction direction); | 84 | unsigned long mask, enum dma_data_direction direction, |
85 | struct dma_attrs *attrs); | ||
85 | extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | 86 | extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, |
86 | int nelems, enum dma_data_direction direction); | 87 | int nelems, enum dma_data_direction direction, |
88 | struct dma_attrs *attrs); | ||
87 | 89 | ||
88 | extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl, | 90 | extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl, |
89 | size_t size, dma_addr_t *dma_handle, | 91 | size_t size, dma_addr_t *dma_handle, |
@@ -92,9 +94,11 @@ extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, | |||
92 | void *vaddr, dma_addr_t dma_handle); | 94 | void *vaddr, dma_addr_t dma_handle); |
93 | extern dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, | 95 | extern dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, |
94 | void *vaddr, size_t size, unsigned long mask, | 96 | void *vaddr, size_t size, unsigned long mask, |
95 | enum dma_data_direction direction); | 97 | enum dma_data_direction direction, |
98 | struct dma_attrs *attrs); | ||
96 | extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, | 99 | extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, |
97 | size_t size, enum dma_data_direction direction); | 100 | size_t size, enum dma_data_direction direction, |
101 | struct dma_attrs *attrs); | ||
98 | 102 | ||
99 | extern void iommu_init_early_pSeries(void); | 103 | extern void iommu_init_early_pSeries(void); |
100 | extern void iommu_init_early_iSeries(void); | 104 | extern void iommu_init_early_iSeries(void); |
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h index 24cf664a8295..f8a32e20ba04 100644 --- a/include/asm-powerpc/mman.h +++ b/include/asm-powerpc/mman.h | |||
@@ -1,7 +1,9 @@ | |||
1 | #ifndef _ASM_POWERPC_MMAN_H | 1 | #ifndef _ASM_POWERPC_MMAN_H |
2 | #define _ASM_POWERPC_MMAN_H | 2 | #define _ASM_POWERPC_MMAN_H |
3 | 3 | ||
4 | #include <asm/cputable.h> | ||
4 | #include <asm-generic/mman.h> | 5 | #include <asm-generic/mman.h> |
6 | #include <linux/mm.h> | ||
5 | 7 | ||
6 | /* | 8 | /* |
7 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
@@ -10,6 +12,8 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
11 | */ | 13 | */ |
12 | 14 | ||
15 | #define PROT_SAO 0x10 /* Strong Access Ordering */ | ||
16 | |||
13 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 17 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
14 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 18 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
15 | #define MAP_LOCKED 0x80 | 19 | #define MAP_LOCKED 0x80 |
@@ -24,4 +28,32 @@ | |||
24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 28 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 29 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
26 | 30 | ||
31 | #ifdef CONFIG_PPC64 | ||
32 | /* | ||
33 | * This file is included by linux/mman.h, so we can't use cacl_vm_prot_bits() | ||
34 | * here. How important is the optimization? | ||
35 | */ | ||
36 | static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot) | ||
37 | { | ||
38 | return (prot & PROT_SAO) ? VM_SAO : 0; | ||
39 | } | ||
40 | #define arch_calc_vm_prot_bits(prot) arch_calc_vm_prot_bits(prot) | ||
41 | |||
42 | static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags) | ||
43 | { | ||
44 | return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : 0; | ||
45 | } | ||
46 | #define arch_vm_get_page_prot(vm_flags) arch_vm_get_page_prot(vm_flags) | ||
47 | |||
48 | static inline int arch_validate_prot(unsigned long prot) | ||
49 | { | ||
50 | if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_SAO)) | ||
51 | return 0; | ||
52 | if ((prot & PROT_SAO) && !cpu_has_feature(CPU_FTR_SAO)) | ||
53 | return 0; | ||
54 | return 1; | ||
55 | } | ||
56 | #define arch_validate_prot(prot) arch_validate_prot(prot) | ||
57 | |||
58 | #endif /* CONFIG_PPC64 */ | ||
27 | #endif /* _ASM_POWERPC_MMAN_H */ | 59 | #endif /* _ASM_POWERPC_MMAN_H */ |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index b2754d46be44..ab98a9c80b28 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -93,6 +93,9 @@ | |||
93 | #define _PAGE_RW 0x0200 /* software: user write access allowed */ | 93 | #define _PAGE_RW 0x0200 /* software: user write access allowed */ |
94 | #define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */ | 94 | #define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */ |
95 | 95 | ||
96 | /* Strong Access Ordering */ | ||
97 | #define _PAGE_SAO (_PAGE_WRITETHRU | _PAGE_NO_CACHE | _PAGE_COHERENT) | ||
98 | |||
96 | #define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT) | 99 | #define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT) |
97 | 100 | ||
98 | #define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY) | 101 | #define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY) |
@@ -312,13 +315,14 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
312 | return; | 315 | return; |
313 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 316 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); |
314 | } | 317 | } |
318 | |||
315 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | 319 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, |
316 | unsigned long addr, pte_t *ptep) | 320 | unsigned long addr, pte_t *ptep) |
317 | { | 321 | { |
318 | unsigned long old; | 322 | unsigned long old; |
319 | 323 | ||
320 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | 324 | if ((pte_val(*ptep) & _PAGE_RW) == 0) |
321 | return; | 325 | return; |
322 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | 326 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); |
323 | } | 327 | } |
324 | 328 | ||
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 061cd17ba83b..101ed87f7d84 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -234,6 +234,8 @@ struct thread_struct { | |||
234 | #define thread_saved_pc(tsk) \ | 234 | #define thread_saved_pc(tsk) \ |
235 | ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) | 235 | ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) |
236 | 236 | ||
237 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.regs) | ||
238 | |||
237 | unsigned long get_wchan(struct task_struct *p); | 239 | unsigned long get_wchan(struct task_struct *p); |
238 | 240 | ||
239 | #define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) | 241 | #define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 99348c1f4cab..8b2eb044270a 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -191,6 +191,7 @@ struct cbe_spu_info { | |||
191 | struct list_head spus; | 191 | struct list_head spus; |
192 | int n_spus; | 192 | int n_spus; |
193 | int nr_active; | 193 | int nr_active; |
194 | atomic_t busy_spus; | ||
194 | atomic_t reserved_spus; | 195 | atomic_t reserved_spus; |
195 | }; | 196 | }; |
196 | 197 | ||