diff options
Diffstat (limited to 'include/asm-powerpc')
31 files changed, 181 insertions, 96 deletions
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 04ce8f8a2ee7..5ab7d7fe198c 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -29,7 +29,6 @@ unifdef-y += elf.h | |||
29 | unifdef-y += nvram.h | 29 | unifdef-y += nvram.h |
30 | unifdef-y += param.h | 30 | unifdef-y += param.h |
31 | unifdef-y += posix_types.h | 31 | unifdef-y += posix_types.h |
32 | unifdef-y += ptrace.h | ||
33 | unifdef-y += seccomp.h | 32 | unifdef-y += seccomp.h |
34 | unifdef-y += signal.h | 33 | unifdef-y += signal.h |
35 | unifdef-y += spu_info.h | 34 | unifdef-y += spu_info.h |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 2a3e9075a5a0..ef8a248dfd55 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -127,6 +127,8 @@ extern struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr); | |||
127 | extern void do_feature_fixups(unsigned long value, void *fixup_start, | 127 | extern void do_feature_fixups(unsigned long value, void *fixup_start, |
128 | void *fixup_end); | 128 | void *fixup_end); |
129 | 129 | ||
130 | extern const char *powerpc_base_platform; | ||
131 | |||
130 | #endif /* __ASSEMBLY__ */ | 132 | #endif /* __ASSEMBLY__ */ |
131 | 133 | ||
132 | /* CPU kernel features */ | 134 | /* CPU kernel features */ |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 74c549780987..c7ca45f97dd2 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -415,7 +415,7 @@ static inline void dma_sync_sg_for_device(struct device *dev, | |||
415 | __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); | 415 | __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); |
416 | } | 416 | } |
417 | 417 | ||
418 | static inline int dma_mapping_error(dma_addr_t dma_addr) | 418 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
419 | { | 419 | { |
420 | #ifdef CONFIG_PPC64 | 420 | #ifdef CONFIG_PPC64 |
421 | return (dma_addr == DMA_ERROR_CODE); | 421 | return (dma_addr == DMA_ERROR_CODE); |
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index 89664675b469..80d1f399ee51 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
@@ -217,6 +217,14 @@ typedef elf_vrregset_t elf_fpxregset_t; | |||
217 | 217 | ||
218 | #define ELF_PLATFORM (cur_cpu_spec->platform) | 218 | #define ELF_PLATFORM (cur_cpu_spec->platform) |
219 | 219 | ||
220 | /* While ELF_PLATFORM indicates the ISA supported by the platform, it | ||
221 | * may not accurately reflect the underlying behavior of the hardware | ||
222 | * (as in the case of running in Power5+ compatibility mode on a | ||
223 | * Power6 machine). ELF_BASE_PLATFORM allows ld.so to load libraries | ||
224 | * that are tuned for the real hardware. | ||
225 | */ | ||
226 | #define ELF_BASE_PLATFORM (powerpc_base_platform) | ||
227 | |||
220 | #ifdef __powerpc64__ | 228 | #ifdef __powerpc64__ |
221 | # define ELF_PLAT_INIT(_r, load_addr) do { \ | 229 | # define ELF_PLAT_INIT(_r, load_addr) do { \ |
222 | _r->gpr[2] = load_addr; \ | 230 | _r->gpr[2] = load_addr; \ |
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h index ef328995ba9d..3a179827528d 100644 --- a/include/asm-powerpc/firmware.h +++ b/include/asm-powerpc/firmware.h | |||
@@ -46,6 +46,7 @@ | |||
46 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) | 46 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) |
47 | #define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000) | 47 | #define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000) |
48 | #define FW_FEATURE_BULK_REMOVE ASM_CONST(0x0000000002000000) | 48 | #define FW_FEATURE_BULK_REMOVE ASM_CONST(0x0000000002000000) |
49 | #define FW_FEATURE_CMO ASM_CONST(0x0000000004000000) | ||
49 | 50 | ||
50 | #ifndef __ASSEMBLY__ | 51 | #ifndef __ASSEMBLY__ |
51 | 52 | ||
@@ -58,7 +59,7 @@ enum { | |||
58 | FW_FEATURE_MIGRATE | FW_FEATURE_PERFMON | FW_FEATURE_CRQ | | 59 | FW_FEATURE_MIGRATE | FW_FEATURE_PERFMON | FW_FEATURE_CRQ | |
59 | FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN | | 60 | FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN | |
60 | FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE | | 61 | FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE | |
61 | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR, | 62 | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR | FW_FEATURE_CMO, |
62 | FW_FEATURE_PSERIES_ALWAYS = 0, | 63 | FW_FEATURE_PSERIES_ALWAYS = 0, |
63 | FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, | 64 | FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, |
64 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, | 65 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, |
diff --git a/include/asm-powerpc/gpio.h b/include/asm-powerpc/gpio.h index 77ad3a890f30..ea04632399d8 100644 --- a/include/asm-powerpc/gpio.h +++ b/include/asm-powerpc/gpio.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <asm-generic/gpio.h> | 18 | #include <asm-generic/gpio.h> |
19 | 19 | ||
20 | #ifdef CONFIG_HAVE_GPIO_LIB | 20 | #ifdef CONFIG_GPIOLIB |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * We don't (yet) implement inlined/rapid versions for on-chip gpios. | 23 | * We don't (yet) implement inlined/rapid versions for on-chip gpios. |
@@ -51,6 +51,6 @@ static inline int irq_to_gpio(unsigned int irq) | |||
51 | return -EINVAL; | 51 | return -EINVAL; |
52 | } | 52 | } |
53 | 53 | ||
54 | #endif /* CONFIG_HAVE_GPIO_LIB */ | 54 | #endif /* CONFIG_GPIOLIB */ |
55 | 55 | ||
56 | #endif /* __ASM_POWERPC_GPIO_H */ | 56 | #endif /* __ASM_POWERPC_GPIO_H */ |
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index be32ff02f4a0..26f0d0ab27a5 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -7,7 +7,7 @@ | |||
7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | 7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, |
8 | unsigned long len); | 8 | unsigned long len); |
9 | 9 | ||
10 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 10 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
11 | unsigned long end, unsigned long floor, | 11 | unsigned long end, unsigned long floor, |
12 | unsigned long ceiling); | 12 | unsigned long ceiling); |
13 | 13 | ||
@@ -21,11 +21,13 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
21 | * If the arch doesn't supply something else, assume that hugepage | 21 | * If the arch doesn't supply something else, assume that hugepage |
22 | * size aligned regions are ok without further preparation. | 22 | * size aligned regions are ok without further preparation. |
23 | */ | 23 | */ |
24 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 24 | static inline int prepare_hugepage_range(struct file *file, |
25 | unsigned long addr, unsigned long len) | ||
25 | { | 26 | { |
26 | if (len & ~HPAGE_MASK) | 27 | struct hstate *h = hstate_file(file); |
28 | if (len & ~huge_page_mask(h)) | ||
27 | return -EINVAL; | 29 | return -EINVAL; |
28 | if (addr & ~HPAGE_MASK) | 30 | if (addr & ~huge_page_mask(h)) |
29 | return -EINVAL; | 31 | return -EINVAL; |
30 | return 0; | 32 | return 0; |
31 | } | 33 | } |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index bf6cd7cb996c..fbe2932fa9e9 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -92,6 +92,11 @@ | |||
92 | #define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ | 92 | #define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ |
93 | #define H_R_XLATE (1UL<<(63-25)) /* include a valid logical page num in the pte if the valid bit is set */ | 93 | #define H_R_XLATE (1UL<<(63-25)) /* include a valid logical page num in the pte if the valid bit is set */ |
94 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */ | 94 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */ |
95 | #define H_PAGE_STATE_CHANGE (1UL<<(63-28)) | ||
96 | #define H_PAGE_UNUSED ((1UL<<(63-29)) | (1UL<<(63-30))) | ||
97 | #define H_PAGE_SET_UNUSED (H_PAGE_STATE_CHANGE | H_PAGE_UNUSED) | ||
98 | #define H_PAGE_SET_LOANED (H_PAGE_SET_UNUSED | (1UL<<(63-31))) | ||
99 | #define H_PAGE_SET_ACTIVE H_PAGE_STATE_CHANGE | ||
95 | #define H_AVPN (1UL<<(63-32)) /* An avpn is provided as a sanity test */ | 100 | #define H_AVPN (1UL<<(63-32)) /* An avpn is provided as a sanity test */ |
96 | #define H_ANDCOND (1UL<<(63-33)) | 101 | #define H_ANDCOND (1UL<<(63-33)) |
97 | #define H_ICACHE_INVALIDATE (1UL<<(63-40)) /* icbi, etc. (ignored for IO pages) */ | 102 | #define H_ICACHE_INVALIDATE (1UL<<(63-40)) /* icbi, etc. (ignored for IO pages) */ |
@@ -210,7 +215,9 @@ | |||
210 | #define H_JOIN 0x298 | 215 | #define H_JOIN 0x298 |
211 | #define H_VASI_STATE 0x2A4 | 216 | #define H_VASI_STATE 0x2A4 |
212 | #define H_ENABLE_CRQ 0x2B0 | 217 | #define H_ENABLE_CRQ 0x2B0 |
213 | #define MAX_HCALL_OPCODE H_ENABLE_CRQ | 218 | #define H_SET_MPP 0x2D0 |
219 | #define H_GET_MPP 0x2D4 | ||
220 | #define MAX_HCALL_OPCODE H_GET_MPP | ||
214 | 221 | ||
215 | #ifndef __ASSEMBLY__ | 222 | #ifndef __ASSEMBLY__ |
216 | 223 | ||
@@ -270,6 +277,20 @@ struct hcall_stats { | |||
270 | }; | 277 | }; |
271 | #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) | 278 | #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) |
272 | 279 | ||
280 | struct hvcall_mpp_data { | ||
281 | unsigned long entitled_mem; | ||
282 | unsigned long mapped_mem; | ||
283 | unsigned short group_num; | ||
284 | unsigned short pool_num; | ||
285 | unsigned char mem_weight; | ||
286 | unsigned char unallocated_mem_weight; | ||
287 | unsigned long unallocated_entitlement; /* value in bytes */ | ||
288 | unsigned long pool_size; | ||
289 | signed long loan_request; | ||
290 | unsigned long backing_mem; | ||
291 | }; | ||
292 | |||
293 | int h_get_mpp(struct hvcall_mpp_data *); | ||
273 | #endif /* __ASSEMBLY__ */ | 294 | #endif /* __ASSEMBLY__ */ |
274 | #endif /* __KERNEL__ */ | 295 | #endif /* __KERNEL__ */ |
275 | #endif /* _ASM_POWERPC_HVCALL_H */ | 296 | #endif /* _ASM_POWERPC_HVCALL_H */ |
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 3d90bf7d3d73..1aaf27be8741 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
@@ -14,14 +14,6 @@ | |||
14 | #endif | 14 | #endif |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | 16 | ||
17 | #ifndef MAX_HWIFS | ||
18 | #ifdef __powerpc64__ | ||
19 | #define MAX_HWIFS 10 | ||
20 | #else | ||
21 | #define MAX_HWIFS 8 | ||
22 | #endif | ||
23 | #endif | ||
24 | |||
25 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) | 17 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) |
26 | #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c)) | 18 | #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c)) |
27 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) | 19 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) |
@@ -40,16 +32,6 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
40 | case 0x170: return 15; | 32 | case 0x170: return 15; |
41 | } | 33 | } |
42 | #endif | 34 | #endif |
43 | #ifdef CONFIG_PPC_PREP | ||
44 | switch (base) { | ||
45 | case 0x1f0: return 13; | ||
46 | case 0x170: return 13; | ||
47 | case 0x1e8: return 11; | ||
48 | case 0x168: return 10; | ||
49 | case 0xfff0: return 14; /* MCP(N)750 ide0 */ | ||
50 | case 0xffe0: return 15; /* MCP(N)750 ide1 */ | ||
51 | } | ||
52 | #endif | ||
53 | return 0; | 35 | return 0; |
54 | } | 36 | } |
55 | 37 | ||
@@ -62,14 +44,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
62 | case 1: return 0x170; | 44 | case 1: return 0x170; |
63 | } | 45 | } |
64 | #endif | 46 | #endif |
65 | #ifdef CONFIG_PPC_PREP | ||
66 | switch (index) { | ||
67 | case 0: return 0x1f0; | ||
68 | case 1: return 0x170; | ||
69 | case 2: return 0x1e8; | ||
70 | case 3: return 0x168; | ||
71 | } | ||
72 | #endif | ||
73 | return 0; | 47 | return 0; |
74 | } | 48 | } |
75 | 49 | ||
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 8b627823f5f9..77c7fa025e65 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -617,7 +617,8 @@ static inline void iosync(void) | |||
617 | * and can be hooked by the platform via ppc_md | 617 | * and can be hooked by the platform via ppc_md |
618 | * | 618 | * |
619 | * * ioremap_flags allows to specify the page flags as an argument and can | 619 | * * ioremap_flags allows to specify the page flags as an argument and can |
620 | * also be hooked by the platform via ppc_md | 620 | * also be hooked by the platform via ppc_md. ioremap_prot is the exact |
621 | * same thing as ioremap_flags. | ||
621 | * | 622 | * |
622 | * * ioremap_nocache is identical to ioremap | 623 | * * ioremap_nocache is identical to ioremap |
623 | * | 624 | * |
@@ -639,6 +640,8 @@ extern void __iomem *ioremap(phys_addr_t address, unsigned long size); | |||
639 | extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, | 640 | extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, |
640 | unsigned long flags); | 641 | unsigned long flags); |
641 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) | 642 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) |
643 | #define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot)) | ||
644 | |||
642 | extern void iounmap(volatile void __iomem *addr); | 645 | extern void iounmap(volatile void __iomem *addr); |
643 | 646 | ||
644 | extern void __iomem *__ioremap(phys_addr_t, unsigned long size, | 647 | extern void __iomem *__ioremap(phys_addr_t, unsigned long size, |
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index 567ed92cd91f..2fe268b10333 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -125,7 +125,10 @@ struct lppaca { | |||
125 | // NOTE: This value will ALWAYS be zero for dedicated processors and | 125 | // NOTE: This value will ALWAYS be zero for dedicated processors and |
126 | // will NEVER be zero for shared processors (ie, initialized to a 1). | 126 | // will NEVER be zero for shared processors (ie, initialized to a 1). |
127 | volatile u32 yield_count; // PLIC increments each dispatchx00-x03 | 127 | volatile u32 yield_count; // PLIC increments each dispatchx00-x03 |
128 | u8 reserved6[124]; // Reserved x04-x7F | 128 | u32 reserved6; |
129 | volatile u64 cmo_faults; // CMO page fault count x08-x0F | ||
130 | volatile u64 cmo_fault_time; // CMO page fault time x10-x17 | ||
131 | u8 reserved7[104]; // Reserved x18-x7F | ||
129 | 132 | ||
130 | //============================================================================= | 133 | //============================================================================= |
131 | // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data | 134 | // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data |
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 1233d735fd28..893aafd87fde 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -76,7 +76,7 @@ struct machdep_calls { | |||
76 | * destroyed as well */ | 76 | * destroyed as well */ |
77 | void (*hpte_clear_all)(void); | 77 | void (*hpte_clear_all)(void); |
78 | 78 | ||
79 | void (*tce_build)(struct iommu_table * tbl, | 79 | int (*tce_build)(struct iommu_table *tbl, |
80 | long index, | 80 | long index, |
81 | long npages, | 81 | long npages, |
82 | unsigned long uaddr, | 82 | unsigned long uaddr, |
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h index d1dc16afb118..19c7a9403490 100644 --- a/include/asm-powerpc/mmu-hash64.h +++ b/include/asm-powerpc/mmu-hash64.h | |||
@@ -194,9 +194,9 @@ extern int mmu_ci_restrictions; | |||
194 | 194 | ||
195 | #ifdef CONFIG_HUGETLB_PAGE | 195 | #ifdef CONFIG_HUGETLB_PAGE |
196 | /* | 196 | /* |
197 | * The page size index of the huge pages for use by hugetlbfs | 197 | * The page size indexes of the huge pages for use by hugetlbfs |
198 | */ | 198 | */ |
199 | extern int mmu_huge_psize; | 199 | extern unsigned int mmu_huge_psizes[MMU_PAGE_COUNT]; |
200 | 200 | ||
201 | #endif /* CONFIG_HUGETLB_PAGE */ | 201 | #endif /* CONFIG_HUGETLB_PAGE */ |
202 | 202 | ||
@@ -281,6 +281,8 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
281 | unsigned long pstart, unsigned long mode, | 281 | unsigned long pstart, unsigned long mode, |
282 | int psize, int ssize); | 282 | int psize, int ssize); |
283 | extern void set_huge_psize(int psize); | 283 | extern void set_huge_psize(int psize); |
284 | extern void add_gpage(unsigned long addr, unsigned long page_size, | ||
285 | unsigned long number_of_pages); | ||
284 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); | 286 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); |
285 | 287 | ||
286 | extern void htab_initialize(void); | 288 | extern void htab_initialize(void); |
diff --git a/include/asm-powerpc/mpc52xx_psc.h b/include/asm-powerpc/mpc52xx_psc.h index 710c5d36efaa..8917ed630565 100644 --- a/include/asm-powerpc/mpc52xx_psc.h +++ b/include/asm-powerpc/mpc52xx_psc.h | |||
@@ -60,10 +60,12 @@ | |||
60 | #define MPC52xx_PSC_RXTX_FIFO_ALARM 0x0002 | 60 | #define MPC52xx_PSC_RXTX_FIFO_ALARM 0x0002 |
61 | #define MPC52xx_PSC_RXTX_FIFO_EMPTY 0x0001 | 61 | #define MPC52xx_PSC_RXTX_FIFO_EMPTY 0x0001 |
62 | 62 | ||
63 | /* PSC interrupt mask bits */ | 63 | /* PSC interrupt status/mask bits */ |
64 | #define MPC52xx_PSC_IMR_TXRDY 0x0100 | 64 | #define MPC52xx_PSC_IMR_TXRDY 0x0100 |
65 | #define MPC52xx_PSC_IMR_RXRDY 0x0200 | 65 | #define MPC52xx_PSC_IMR_RXRDY 0x0200 |
66 | #define MPC52xx_PSC_IMR_DB 0x0400 | 66 | #define MPC52xx_PSC_IMR_DB 0x0400 |
67 | #define MPC52xx_PSC_IMR_TXEMP 0x0800 | ||
68 | #define MPC52xx_PSC_IMR_ORERR 0x1000 | ||
67 | #define MPC52xx_PSC_IMR_IPC 0x8000 | 69 | #define MPC52xx_PSC_IMR_IPC 0x8000 |
68 | 70 | ||
69 | /* PSC input port change bit */ | 71 | /* PSC input port change bit */ |
@@ -92,6 +94,34 @@ | |||
92 | 94 | ||
93 | #define MPC52xx_PSC_RFNUM_MASK 0x01ff | 95 | #define MPC52xx_PSC_RFNUM_MASK 0x01ff |
94 | 96 | ||
97 | #define MPC52xx_PSC_SICR_DTS1 (1 << 29) | ||
98 | #define MPC52xx_PSC_SICR_SHDR (1 << 28) | ||
99 | #define MPC52xx_PSC_SICR_SIM_MASK (0xf << 24) | ||
100 | #define MPC52xx_PSC_SICR_SIM_UART (0x0 << 24) | ||
101 | #define MPC52xx_PSC_SICR_SIM_UART_DCD (0x8 << 24) | ||
102 | #define MPC52xx_PSC_SICR_SIM_CODEC_8 (0x1 << 24) | ||
103 | #define MPC52xx_PSC_SICR_SIM_CODEC_16 (0x2 << 24) | ||
104 | #define MPC52xx_PSC_SICR_SIM_AC97 (0x3 << 24) | ||
105 | #define MPC52xx_PSC_SICR_SIM_SIR (0x8 << 24) | ||
106 | #define MPC52xx_PSC_SICR_SIM_SIR_DCD (0xc << 24) | ||
107 | #define MPC52xx_PSC_SICR_SIM_MIR (0x5 << 24) | ||
108 | #define MPC52xx_PSC_SICR_SIM_FIR (0x6 << 24) | ||
109 | #define MPC52xx_PSC_SICR_SIM_CODEC_24 (0x7 << 24) | ||
110 | #define MPC52xx_PSC_SICR_SIM_CODEC_32 (0xf << 24) | ||
111 | #define MPC52xx_PSC_SICR_GENCLK (1 << 23) | ||
112 | #define MPC52xx_PSC_SICR_I2S (1 << 22) | ||
113 | #define MPC52xx_PSC_SICR_CLKPOL (1 << 21) | ||
114 | #define MPC52xx_PSC_SICR_SYNCPOL (1 << 20) | ||
115 | #define MPC52xx_PSC_SICR_CELLSLAVE (1 << 19) | ||
116 | #define MPC52xx_PSC_SICR_CELL2XCLK (1 << 18) | ||
117 | #define MPC52xx_PSC_SICR_ESAI (1 << 17) | ||
118 | #define MPC52xx_PSC_SICR_ENAC97 (1 << 16) | ||
119 | #define MPC52xx_PSC_SICR_SPI (1 << 15) | ||
120 | #define MPC52xx_PSC_SICR_MSTR (1 << 14) | ||
121 | #define MPC52xx_PSC_SICR_CPOL (1 << 13) | ||
122 | #define MPC52xx_PSC_SICR_CPHA (1 << 12) | ||
123 | #define MPC52xx_PSC_SICR_USEEOF (1 << 11) | ||
124 | #define MPC52xx_PSC_SICR_DISABLEEOF (1 << 10) | ||
95 | 125 | ||
96 | /* Structure of the hardware registers */ | 126 | /* Structure of the hardware registers */ |
97 | struct mpc52xx_psc { | 127 | struct mpc52xx_psc { |
@@ -132,8 +162,12 @@ struct mpc52xx_psc { | |||
132 | u8 reserved5[3]; | 162 | u8 reserved5[3]; |
133 | u8 ctlr; /* PSC + 0x1c */ | 163 | u8 ctlr; /* PSC + 0x1c */ |
134 | u8 reserved6[3]; | 164 | u8 reserved6[3]; |
135 | u16 ccr; /* PSC + 0x20 */ | 165 | /* BitClkDiv field of CCR is byte swapped in |
136 | u8 reserved7[14]; | 166 | * the hardware for mpc5200/b compatibility */ |
167 | u32 ccr; /* PSC + 0x20 */ | ||
168 | u32 ac97_slots; /* PSC + 0x24 */ | ||
169 | u32 ac97_cmd; /* PSC + 0x28 */ | ||
170 | u32 ac97_data; /* PSC + 0x2c */ | ||
137 | u8 ivr; /* PSC + 0x30 */ | 171 | u8 ivr; /* PSC + 0x30 */ |
138 | u8 reserved8[3]; | 172 | u8 reserved8[3]; |
139 | u8 ip; /* PSC + 0x34 */ | 173 | u8 ip; /* PSC + 0x34 */ |
diff --git a/include/asm-powerpc/namei.h b/include/asm-powerpc/namei.h deleted file mode 100644 index 657443474a6a..000000000000 --- a/include/asm-powerpc/namei.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_NAMEI_H | ||
2 | #define _ASM_POWERPC_NAMEI_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | /* | ||
7 | * Adapted from include/asm-alpha/namei.h | ||
8 | * | ||
9 | * Included from fs/namei.c | ||
10 | */ | ||
11 | |||
12 | /* This dummy routine maybe changed to something useful | ||
13 | * for /usr/gnemul/ emulation stuff. | ||
14 | * Look at asm-sparc/namei.h for details. | ||
15 | */ | ||
16 | |||
17 | #define __emul_prefix() NULL | ||
18 | |||
19 | #endif /* __KERNEL__ */ | ||
20 | #endif /* _ASM_POWERPC_NAMEI_H */ | ||
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index cffdf0eb0df6..e088545cb3f5 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
@@ -119,9 +119,6 @@ extern phys_addr_t kernstart_addr; | |||
119 | /* align addr on a size boundary - adjust address up if needed */ | 119 | /* align addr on a size boundary - adjust address up if needed */ |
120 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) | 120 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) |
121 | 121 | ||
122 | /* to align the pointer to the (next) page boundary */ | ||
123 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | ||
124 | |||
125 | /* | 122 | /* |
126 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for | 123 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for |
127 | * "kernelness", use is_kernel_addr() - it should do what you want. | 124 | * "kernelness", use is_kernel_addr() - it should do what you want. |
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 02fd80710e9d..043bfdfe4f73 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -90,6 +90,7 @@ extern unsigned int HPAGE_SHIFT; | |||
90 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | 90 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) |
91 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 91 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
92 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 92 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
93 | #define HUGE_MAX_HSTATE 3 | ||
93 | 94 | ||
94 | #endif /* __ASSEMBLY__ */ | 95 | #endif /* __ASSEMBLY__ */ |
95 | 96 | ||
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h index 68980990f62a..812a1d8f35cb 100644 --- a/include/asm-powerpc/pgalloc-64.h +++ b/include/asm-powerpc/pgalloc-64.h | |||
@@ -22,7 +22,7 @@ extern struct kmem_cache *pgtable_cache[]; | |||
22 | #define PUD_CACHE_NUM 1 | 22 | #define PUD_CACHE_NUM 1 |
23 | #define PMD_CACHE_NUM 1 | 23 | #define PMD_CACHE_NUM 1 |
24 | #define HUGEPTE_CACHE_NUM 2 | 24 | #define HUGEPTE_CACHE_NUM 2 |
25 | #define PTE_NONCACHE_NUM 3 /* from GFP rather than kmem_cache */ | 25 | #define PTE_NONCACHE_NUM 7 /* from GFP rather than kmem_cache */ |
26 | 26 | ||
27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
28 | { | 28 | { |
@@ -119,7 +119,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | |||
119 | __free_page(ptepage); | 119 | __free_page(ptepage); |
120 | } | 120 | } |
121 | 121 | ||
122 | #define PGF_CACHENUM_MASK 0x3 | 122 | #define PGF_CACHENUM_MASK 0x7 |
123 | 123 | ||
124 | typedef struct pgtable_free { | 124 | typedef struct pgtable_free { |
125 | unsigned long val; | 125 | unsigned long val; |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index fd2090dc1dce..c9601dfb4a1e 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -51,6 +51,9 @@ | |||
51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ | 51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ |
52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) | 52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) |
53 | 53 | ||
54 | /* There is no 4K PFN hack on 4K pages */ | ||
55 | #define _PAGE_4K_PFN 0 | ||
56 | |||
54 | /* PAGE_MASK gives the right answer below, but only by accident */ | 57 | /* PAGE_MASK gives the right answer below, but only by accident */ |
55 | /* It should be preserving the high 48 bits and then specifically */ | 58 | /* It should be preserving the high 48 bits and then specifically */ |
56 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ | 59 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ |
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h index c5007712473f..7e54adb35596 100644 --- a/include/asm-powerpc/pgtable-64k.h +++ b/include/asm-powerpc/pgtable-64k.h | |||
@@ -138,7 +138,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd) | |||
138 | unsigned __split = (psize == MMU_PAGE_4K || \ | 138 | unsigned __split = (psize == MMU_PAGE_4K || \ |
139 | psize == MMU_PAGE_64K_AP); \ | 139 | psize == MMU_PAGE_64K_AP); \ |
140 | shift = mmu_psize_defs[psize].shift; \ | 140 | shift = mmu_psize_defs[psize].shift; \ |
141 | for (index = 0; va < __end; index++, va += (1 << shift)) { \ | 141 | for (index = 0; va < __end; index++, va += (1L << shift)) { \ |
142 | if (!__split || __rpte_sub_valid(rpte, index)) do { \ | 142 | if (!__split || __rpte_sub_valid(rpte, index)) do { \ |
143 | 143 | ||
144 | #define pte_iterate_hashed_end() } while(0); } } while(0) | 144 | #define pte_iterate_hashed_end() } while(0); } } while(0) |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 3a96d001cb75..bdbab72f3ebc 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -395,6 +395,12 @@ extern int icache_44x_need_flush; | |||
395 | #ifndef _PAGE_EXEC | 395 | #ifndef _PAGE_EXEC |
396 | #define _PAGE_EXEC 0 | 396 | #define _PAGE_EXEC 0 |
397 | #endif | 397 | #endif |
398 | #ifndef _PAGE_ENDIAN | ||
399 | #define _PAGE_ENDIAN 0 | ||
400 | #endif | ||
401 | #ifndef _PAGE_COHERENT | ||
402 | #define _PAGE_COHERENT 0 | ||
403 | #endif | ||
398 | #ifndef _PMD_PRESENT_MASK | 404 | #ifndef _PMD_PRESENT_MASK |
399 | #define _PMD_PRESENT_MASK _PMD_PRESENT | 405 | #define _PMD_PRESENT_MASK _PMD_PRESENT |
400 | #endif | 406 | #endif |
@@ -405,6 +411,12 @@ extern int icache_44x_need_flush; | |||
405 | 411 | ||
406 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) | 412 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) |
407 | 413 | ||
414 | |||
415 | #define PAGE_PROT_BITS __pgprot(_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | ||
416 | _PAGE_WRITETHRU | _PAGE_ENDIAN | \ | ||
417 | _PAGE_USER | _PAGE_ACCESSED | \ | ||
418 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \ | ||
419 | _PAGE_EXEC | _PAGE_HWEXEC) | ||
408 | /* | 420 | /* |
409 | * Note: the _PAGE_COHERENT bit automatically gets set in the hardware | 421 | * Note: the _PAGE_COHERENT bit automatically gets set in the hardware |
410 | * PTE if CONFIG_SMP is defined (hash_page does this); there is no need | 422 | * PTE if CONFIG_SMP is defined (hash_page does this); there is no need |
@@ -538,6 +550,10 @@ static inline pte_t pte_mkyoung(pte_t pte) { | |||
538 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 550 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
539 | static inline pte_t pte_mkspecial(pte_t pte) { | 551 | static inline pte_t pte_mkspecial(pte_t pte) { |
540 | return pte; } | 552 | return pte; } |
553 | static inline unsigned long pte_pgprot(pte_t pte) | ||
554 | { | ||
555 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; | ||
556 | } | ||
541 | 557 | ||
542 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 558 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
543 | { | 559 | { |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index ab98a9c80b28..ba8000352b9a 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -117,6 +117,10 @@ | |||
117 | #define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE) | 117 | #define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE) |
118 | #define HAVE_PAGE_AGP | 118 | #define HAVE_PAGE_AGP |
119 | 119 | ||
120 | #define PAGE_PROT_BITS __pgprot(_PAGE_GUARDED | _PAGE_COHERENT | \ | ||
121 | _PAGE_NO_CACHE | _PAGE_WRITETHRU | \ | ||
122 | _PAGE_4K_PFN | _PAGE_RW | _PAGE_USER | \ | ||
123 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_EXEC) | ||
120 | /* PTEIDX nibble */ | 124 | /* PTEIDX nibble */ |
121 | #define _PTEIDX_SECONDARY 0x8 | 125 | #define _PTEIDX_SECONDARY 0x8 |
122 | #define _PTEIDX_GROUP_IX 0x7 | 126 | #define _PTEIDX_GROUP_IX 0x7 |
@@ -262,6 +266,10 @@ static inline pte_t pte_mkhuge(pte_t pte) { | |||
262 | return pte; } | 266 | return pte; } |
263 | static inline pte_t pte_mkspecial(pte_t pte) { | 267 | static inline pte_t pte_mkspecial(pte_t pte) { |
264 | return pte; } | 268 | return pte; } |
269 | static inline unsigned long pte_pgprot(pte_t pte) | ||
270 | { | ||
271 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; | ||
272 | } | ||
265 | 273 | ||
266 | /* Atomic PTE updates */ | 274 | /* Atomic PTE updates */ |
267 | static inline unsigned long pte_update(struct mm_struct *mm, | 275 | static inline unsigned long pte_update(struct mm_struct *mm, |
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index d18ffe7bc7c4..dbb8ca172e44 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h | |||
@@ -38,6 +38,19 @@ extern void paging_init(void); | |||
38 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 38 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
39 | 39 | ||
40 | #include <asm-generic/pgtable.h> | 40 | #include <asm-generic/pgtable.h> |
41 | |||
42 | |||
43 | /* | ||
44 | * This gets called at the end of handling a page fault, when | ||
45 | * the kernel has put a new PTE into the page table for the process. | ||
46 | * We use it to ensure coherency between the i-cache and d-cache | ||
47 | * for the page which has just been mapped in. | ||
48 | * On machines which use an MMU hash table, we use this to put a | ||
49 | * corresponding HPTE into the hash table ahead of time, instead of | ||
50 | * waiting for the inevitable extra hash-table miss exception. | ||
51 | */ | ||
52 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | ||
53 | |||
41 | #endif /* __ASSEMBLY__ */ | 54 | #endif /* __ASSEMBLY__ */ |
42 | 55 | ||
43 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/semaphore.h b/include/asm-powerpc/semaphore.h deleted file mode 100644 index d9b2034ed1d2..000000000000 --- a/include/asm-powerpc/semaphore.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/semaphore.h> | ||
diff --git a/include/asm-powerpc/syscalls.h b/include/asm-powerpc/syscalls.h index 2b8a458f990a..eb8eb400c664 100644 --- a/include/asm-powerpc/syscalls.h +++ b/include/asm-powerpc/syscalls.h | |||
@@ -31,6 +31,7 @@ asmlinkage int sys_vfork(unsigned long p1, unsigned long p2, | |||
31 | unsigned long p3, unsigned long p4, unsigned long p5, | 31 | unsigned long p3, unsigned long p4, unsigned long p5, |
32 | unsigned long p6, struct pt_regs *regs); | 32 | unsigned long p6, struct pt_regs *regs); |
33 | asmlinkage long sys_pipe(int __user *fildes); | 33 | asmlinkage long sys_pipe(int __user *fildes); |
34 | asmlinkage long sys_pipe2(int __user *fildes, int flags); | ||
34 | asmlinkage long sys_rt_sigaction(int sig, | 35 | asmlinkage long sys_rt_sigaction(int sig, |
35 | const struct sigaction __user *act, | 36 | const struct sigaction __user *act, |
36 | struct sigaction __user *oact, size_t sigsetsize); | 37 | struct sigaction __user *oact, size_t sigsetsize); |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index ae7085c65692..e084272ed1c2 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -316,3 +316,9 @@ COMPAT_SYS(fallocate) | |||
316 | SYSCALL(subpage_prot) | 316 | SYSCALL(subpage_prot) |
317 | COMPAT_SYS_SPU(timerfd_settime) | 317 | COMPAT_SYS_SPU(timerfd_settime) |
318 | COMPAT_SYS_SPU(timerfd_gettime) | 318 | COMPAT_SYS_SPU(timerfd_gettime) |
319 | COMPAT_SYS_SPU(signalfd4) | ||
320 | SYSCALL_SPU(eventfd2) | ||
321 | SYSCALL_SPU(epoll_create1) | ||
322 | SYSCALL_SPU(dup3) | ||
323 | SYSCALL_SPU(pipe2) | ||
324 | SYSCALL(inotify_init1) | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index e6e25e2364eb..d6648c143322 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -110,6 +110,8 @@ static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } | |||
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | extern int set_dabr(unsigned long dabr); | 112 | extern int set_dabr(unsigned long dabr); |
113 | extern void do_dabr(struct pt_regs *regs, unsigned long address, | ||
114 | unsigned long error_code); | ||
113 | extern void print_backtrace(unsigned long *); | 115 | extern void print_backtrace(unsigned long *); |
114 | extern void show_regs(struct pt_regs * regs); | 116 | extern void show_regs(struct pt_regs * regs); |
115 | extern void flush_instruction_cache(void); | 117 | extern void flush_instruction_cache(void); |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index b705c2a7651a..a9db562df69a 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -66,20 +66,12 @@ struct thread_info { | |||
66 | 66 | ||
67 | #if THREAD_SHIFT >= PAGE_SHIFT | 67 | #if THREAD_SHIFT >= PAGE_SHIFT |
68 | 68 | ||
69 | #define THREAD_ORDER (THREAD_SHIFT - PAGE_SHIFT) | 69 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) |
70 | |||
71 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
72 | #define alloc_thread_info(tsk) \ | ||
73 | ((struct thread_info *)__get_free_pages(GFP_KERNEL | \ | ||
74 | __GFP_ZERO, THREAD_ORDER)) | ||
75 | #else | ||
76 | #define alloc_thread_info(tsk) \ | ||
77 | ((struct thread_info *)__get_free_pages(GFP_KERNEL, THREAD_ORDER)) | ||
78 | #endif | ||
79 | #define free_thread_info(ti) free_pages((unsigned long)ti, THREAD_ORDER) | ||
80 | 70 | ||
81 | #else /* THREAD_SHIFT < PAGE_SHIFT */ | 71 | #else /* THREAD_SHIFT < PAGE_SHIFT */ |
82 | 72 | ||
73 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
74 | |||
83 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); | 75 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); |
84 | extern void free_thread_info(struct thread_info *ti); | 76 | extern void free_thread_info(struct thread_info *ti); |
85 | 77 | ||
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index 5c9108147644..361cd5c7a32b 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h | |||
@@ -162,16 +162,5 @@ extern void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, | |||
162 | 162 | ||
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | /* | ||
166 | * This gets called at the end of handling a page fault, when | ||
167 | * the kernel has put a new PTE into the page table for the process. | ||
168 | * We use it to ensure coherency between the i-cache and d-cache | ||
169 | * for the page which has just been mapped in. | ||
170 | * On machines which use an MMU hash table, we use this to put a | ||
171 | * corresponding HPTE into the hash table ahead of time, instead of | ||
172 | * waiting for the inevitable extra hash-table miss exception. | ||
173 | */ | ||
174 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | ||
175 | |||
176 | #endif /*__KERNEL__ */ | 165 | #endif /*__KERNEL__ */ |
177 | #endif /* _ASM_POWERPC_TLBFLUSH_H */ | 166 | #endif /* _ASM_POWERPC_TLBFLUSH_H */ |
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index ce91bb662063..e07d0c76ed77 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -335,10 +335,16 @@ | |||
335 | #define __NR_subpage_prot 310 | 335 | #define __NR_subpage_prot 310 |
336 | #define __NR_timerfd_settime 311 | 336 | #define __NR_timerfd_settime 311 |
337 | #define __NR_timerfd_gettime 312 | 337 | #define __NR_timerfd_gettime 312 |
338 | #define __NR_signalfd4 313 | ||
339 | #define __NR_eventfd2 314 | ||
340 | #define __NR_epoll_create1 315 | ||
341 | #define __NR_dup3 316 | ||
342 | #define __NR_pipe2 317 | ||
343 | #define __NR_inotify_init1 318 | ||
338 | 344 | ||
339 | #ifdef __KERNEL__ | 345 | #ifdef __KERNEL__ |
340 | 346 | ||
341 | #define __NR_syscalls 313 | 347 | #define __NR_syscalls 319 |
342 | 348 | ||
343 | #define __NR__exit __NR_exit | 349 | #define __NR__exit __NR_exit |
344 | #define NR_syscalls __NR_syscalls | 350 | #define NR_syscalls __NR_syscalls |
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 56512a968dab..0a290a195946 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h | |||
@@ -39,16 +39,32 @@ | |||
39 | #define VIO_IRQ_DISABLE 0UL | 39 | #define VIO_IRQ_DISABLE 0UL |
40 | #define VIO_IRQ_ENABLE 1UL | 40 | #define VIO_IRQ_ENABLE 1UL |
41 | 41 | ||
42 | /* | ||
43 | * VIO CMO minimum entitlement for all devices and spare entitlement | ||
44 | */ | ||
45 | #define VIO_CMO_MIN_ENT 1562624 | ||
46 | |||
42 | struct iommu_table; | 47 | struct iommu_table; |
43 | 48 | ||
44 | /* | 49 | /** |
45 | * The vio_dev structure is used to describe virtual I/O devices. | 50 | * vio_dev - This structure is used to describe virtual I/O devices. |
51 | * | ||
52 | * @desired: set from return of driver's get_desired_dma() function | ||
53 | * @entitled: bytes of IO data that has been reserved for this device. | ||
54 | * @allocated: bytes of IO data currently in use by the device. | ||
55 | * @allocs_failed: number of DMA failures due to insufficient entitlement. | ||
46 | */ | 56 | */ |
47 | struct vio_dev { | 57 | struct vio_dev { |
48 | const char *name; | 58 | const char *name; |
49 | const char *type; | 59 | const char *type; |
50 | uint32_t unit_address; | 60 | uint32_t unit_address; |
51 | unsigned int irq; | 61 | unsigned int irq; |
62 | struct { | ||
63 | size_t desired; | ||
64 | size_t entitled; | ||
65 | size_t allocated; | ||
66 | atomic_t allocs_failed; | ||
67 | } cmo; | ||
52 | struct device dev; | 68 | struct device dev; |
53 | }; | 69 | }; |
54 | 70 | ||
@@ -56,12 +72,19 @@ struct vio_driver { | |||
56 | const struct vio_device_id *id_table; | 72 | const struct vio_device_id *id_table; |
57 | int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); | 73 | int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); |
58 | int (*remove)(struct vio_dev *dev); | 74 | int (*remove)(struct vio_dev *dev); |
75 | /* A driver must have a get_desired_dma() function to | ||
76 | * be loaded in a CMO environment if it uses DMA. | ||
77 | */ | ||
78 | unsigned long (*get_desired_dma)(struct vio_dev *dev); | ||
59 | struct device_driver driver; | 79 | struct device_driver driver; |
60 | }; | 80 | }; |
61 | 81 | ||
62 | extern int vio_register_driver(struct vio_driver *drv); | 82 | extern int vio_register_driver(struct vio_driver *drv); |
63 | extern void vio_unregister_driver(struct vio_driver *drv); | 83 | extern void vio_unregister_driver(struct vio_driver *drv); |
64 | 84 | ||
85 | extern int vio_cmo_entitlement_update(size_t); | ||
86 | extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); | ||
87 | |||
65 | extern void __devinit vio_unregister_device(struct vio_dev *dev); | 88 | extern void __devinit vio_unregister_device(struct vio_dev *dev); |
66 | 89 | ||
67 | struct device_node; | 90 | struct device_node; |