aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/compat.h2
-rw-r--r--include/asm-powerpc/dma-mapping.h1
-rw-r--r--include/asm-powerpc/pci.h20
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h10
-rw-r--r--include/asm-powerpc/pgtable-ppc64.h10
5 files changed, 2 insertions, 41 deletions
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h
index aacaabd28ac1..64ab1ddbdf85 100644
--- a/include/asm-powerpc/compat.h
+++ b/include/asm-powerpc/compat.h
@@ -33,8 +33,10 @@ typedef s32 compat_timer_t;
33 33
34typedef s32 compat_int_t; 34typedef s32 compat_int_t;
35typedef s32 compat_long_t; 35typedef s32 compat_long_t;
36typedef s64 compat_s64;
36typedef u32 compat_uint_t; 37typedef u32 compat_uint_t;
37typedef u32 compat_ulong_t; 38typedef u32 compat_ulong_t;
39typedef u64 compat_u64;
38 40
39struct compat_timespec { 41struct compat_timespec {
40 compat_time_t tv_sec; 42 compat_time_t tv_sec;
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index a19a6f1a1cf1..f6bd804d9090 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -61,7 +61,6 @@ struct dma_mapping_ops {
61 void (*unmap_sg)(struct device *dev, struct scatterlist *sg, 61 void (*unmap_sg)(struct device *dev, struct scatterlist *sg,
62 int nents, enum dma_data_direction direction); 62 int nents, enum dma_data_direction direction);
63 int (*dma_supported)(struct device *dev, u64 mask); 63 int (*dma_supported)(struct device *dev, u64 mask);
64 int (*dac_dma_supported)(struct device *dev, u64 mask);
65 int (*set_dma_mask)(struct device *dev, u64 dma_mask); 64 int (*set_dma_mask)(struct device *dev, u64 dma_mask);
66}; 65};
67 66
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index 0cd3e77efd20..7b11765c6865 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -74,18 +74,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
74extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); 74extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops);
75extern struct dma_mapping_ops *get_pci_dma_ops(void); 75extern struct dma_mapping_ops *get_pci_dma_ops(void);
76 76
77/* For DAC DMA, we currently don't support it by default, but
78 * we let 64-bit platforms override this.
79 */
80static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask)
81{
82 struct dma_mapping_ops *d = get_pci_dma_ops();
83
84 if (d && d->dac_dma_supported)
85 return d->dac_dma_supported(&hwdev->dev, mask);
86 return 0;
87}
88
89static inline void pci_dma_burst_advice(struct pci_dev *pdev, 77static inline void pci_dma_burst_advice(struct pci_dev *pdev,
90 enum pci_dma_burst_strategy *strat, 78 enum pci_dma_burst_strategy *strat,
91 unsigned long *strategy_parameter) 79 unsigned long *strategy_parameter)
@@ -122,12 +110,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
122} 110}
123#endif 111#endif
124 112
125/*
126 * At present there are very few 32-bit PPC machines that can have
127 * memory above the 4GB point, and we don't support that.
128 */
129#define pci_dac_dma_supported(pci_dev, mask) (0)
130
131/* Set the name of the bus as it appears in /proc/bus/pci */ 113/* Set the name of the bus as it appears in /proc/bus/pci */
132static inline int pci_proc_domain(struct pci_bus *bus) 114static inline int pci_proc_domain(struct pci_bus *bus)
133{ 115{
@@ -236,8 +218,6 @@ extern void of_scan_bus(struct device_node *node, struct pci_bus *bus);
236 218
237extern int pci_read_irq_line(struct pci_dev *dev); 219extern int pci_read_irq_line(struct pci_dev *dev);
238 220
239extern void pcibios_add_platform_entries(struct pci_dev *dev);
240
241struct file; 221struct file;
242extern pgprot_t pci_phys_mem_access_prot(struct file *file, 222extern pgprot_t pci_phys_mem_access_prot(struct file *file,
243 unsigned long pfn, 223 unsigned long pfn,
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index b2b880a6f631..6c236d4d6262 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -500,9 +500,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
500 * The following only work if pte_present() is true. 500 * The following only work if pte_present() is true.
501 * Undefined behaviour if not.. 501 * Undefined behaviour if not..
502 */ 502 */
503static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
504static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } 503static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
505static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; }
506static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } 504static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
507static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 505static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
508static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 506static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
@@ -510,21 +508,13 @@ static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
510static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } 508static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
511static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } 509static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; }
512 510
513static inline pte_t pte_rdprotect(pte_t pte) {
514 pte_val(pte) &= ~_PAGE_USER; return pte; }
515static inline pte_t pte_wrprotect(pte_t pte) { 511static inline pte_t pte_wrprotect(pte_t pte) {
516 pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } 512 pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; }
517static inline pte_t pte_exprotect(pte_t pte) {
518 pte_val(pte) &= ~_PAGE_EXEC; return pte; }
519static inline pte_t pte_mkclean(pte_t pte) { 513static inline pte_t pte_mkclean(pte_t pte) {
520 pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } 514 pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; }
521static inline pte_t pte_mkold(pte_t pte) { 515static inline pte_t pte_mkold(pte_t pte) {
522 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } 516 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
523 517
524static inline pte_t pte_mkread(pte_t pte) {
525 pte_val(pte) |= _PAGE_USER; return pte; }
526static inline pte_t pte_mkexec(pte_t pte) {
527 pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; }
528static inline pte_t pte_mkwrite(pte_t pte) { 518static inline pte_t pte_mkwrite(pte_t pte) {
529 pte_val(pte) |= _PAGE_RW; return pte; } 519 pte_val(pte) |= _PAGE_RW; return pte; }
530static inline pte_t pte_mkdirty(pte_t pte) { 520static inline pte_t pte_mkdirty(pte_t pte) {
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h
index 4ea99922a75c..7ca8b5c10019 100644
--- a/include/asm-powerpc/pgtable-ppc64.h
+++ b/include/asm-powerpc/pgtable-ppc64.h
@@ -227,9 +227,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
227 * The following only work if pte_present() is true. 227 * The following only work if pte_present() is true.
228 * Undefined behaviour if not.. 228 * Undefined behaviour if not..
229 */ 229 */
230static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER;}
231static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;} 230static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;}
232static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC;}
233static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;} 231static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;}
234static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;} 232static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;}
235static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} 233static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;}
@@ -237,20 +235,12 @@ static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;}
237static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } 235static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
238static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } 236static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; }
239 237
240static inline pte_t pte_rdprotect(pte_t pte) {
241 pte_val(pte) &= ~_PAGE_USER; return pte; }
242static inline pte_t pte_exprotect(pte_t pte) {
243 pte_val(pte) &= ~_PAGE_EXEC; return pte; }
244static inline pte_t pte_wrprotect(pte_t pte) { 238static inline pte_t pte_wrprotect(pte_t pte) {
245 pte_val(pte) &= ~(_PAGE_RW); return pte; } 239 pte_val(pte) &= ~(_PAGE_RW); return pte; }
246static inline pte_t pte_mkclean(pte_t pte) { 240static inline pte_t pte_mkclean(pte_t pte) {
247 pte_val(pte) &= ~(_PAGE_DIRTY); return pte; } 241 pte_val(pte) &= ~(_PAGE_DIRTY); return pte; }
248static inline pte_t pte_mkold(pte_t pte) { 242static inline pte_t pte_mkold(pte_t pte) {
249 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } 243 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
250static inline pte_t pte_mkread(pte_t pte) {
251 pte_val(pte) |= _PAGE_USER; return pte; }
252static inline pte_t pte_mkexec(pte_t pte) {
253 pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; }
254static inline pte_t pte_mkwrite(pte_t pte) { 244static inline pte_t pte_mkwrite(pte_t pte) {
255 pte_val(pte) |= _PAGE_RW; return pte; } 245 pte_val(pte) |= _PAGE_RW; return pte; }
256static inline pte_t pte_mkdirty(pte_t pte) { 246static inline pte_t pte_mkdirty(pte_t pte) {