aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/Kbuild2
-rw-r--r--include/asm-powerpc/cputable.h6
-rw-r--r--include/asm-powerpc/hw_irq.h19
-rw-r--r--include/asm-powerpc/pci-bridge.h4
-rw-r--r--include/asm-powerpc/pci.h33
-rw-r--r--include/asm-powerpc/reg.h2
-rw-r--r--include/asm-powerpc/rtas.h3
7 files changed, 32 insertions, 37 deletions
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 1e637381c118..703970fb0ec0 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -17,7 +17,6 @@ header-y += ipc.h
17header-y += poll.h 17header-y += poll.h
18header-y += shmparam.h 18header-y += shmparam.h
19header-y += sockios.h 19header-y += sockios.h
20header-y += spu_info.h
21header-y += ucontext.h 20header-y += ucontext.h
22header-y += ioctl.h 21header-y += ioctl.h
23header-y += linkage.h 22header-y += linkage.h
@@ -37,6 +36,7 @@ unifdef-y += posix_types.h
37unifdef-y += ptrace.h 36unifdef-y += ptrace.h
38unifdef-y += seccomp.h 37unifdef-y += seccomp.h
39unifdef-y += signal.h 38unifdef-y += signal.h
39unifdef-y += spu_info.h
40unifdef-y += termios.h 40unifdef-y += termios.h
41unifdef-y += types.h 41unifdef-y += types.h
42unifdef-y += unistd.h 42unifdef-y += unistd.h
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index aca72f90849e..7384b8086b75 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -153,6 +153,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
153#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) 153#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000)
154#define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) 154#define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000)
155#define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) 155#define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000)
156#define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000)
156 157
157#ifndef __ASSEMBLY__ 158#ifndef __ASSEMBLY__
158 159
@@ -334,13 +335,14 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
334 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ 335 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
335 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 336 CPU_FTR_MMCRA | CPU_FTR_SMT | \
336 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 337 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
337 CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE) 338 CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \
339 CPU_FTR_DSCR)
338#define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 340#define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
339 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ 341 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
340 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 342 CPU_FTR_MMCRA | CPU_FTR_SMT | \
341 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 343 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
342 CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ 344 CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \
343 CPU_FTR_SPURR | CPU_FTR_REAL_LE) 345 CPU_FTR_SPURR | CPU_FTR_REAL_LE | CPU_FTR_DSCR)
344#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 346#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
345 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ 347 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
346 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ 348 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h
index d604863d72fb..9e4dd98eb220 100644
--- a/include/asm-powerpc/hw_irq.h
+++ b/include/asm-powerpc/hw_irq.h
@@ -107,25 +107,6 @@ static inline void local_irq_save_ptr(unsigned long *flags)
107 107
108#endif /* CONFIG_PPC64 */ 108#endif /* CONFIG_PPC64 */
109 109
110#define mask_irq(irq) \
111 ({ \
112 irq_desc_t *desc = get_irq_desc(irq); \
113 if (desc->chip && desc->chip->disable) \
114 desc->chip->disable(irq); \
115 })
116#define unmask_irq(irq) \
117 ({ \
118 irq_desc_t *desc = get_irq_desc(irq); \
119 if (desc->chip && desc->chip->enable) \
120 desc->chip->enable(irq); \
121 })
122#define ack_irq(irq) \
123 ({ \
124 irq_desc_t *desc = get_irq_desc(irq); \
125 if (desc->chip && desc->chip->ack) \
126 desc->chip->ack(irq); \
127 })
128
129/* 110/*
130 * interrupt-retrigger: should we handle this via lost interrupts and IPIs 111 * interrupt-retrigger: should we handle this via lost interrupts and IPIs
131 * or should we not care like we do now ? --BenH. 112 * or should we not care like we do now ? --BenH.
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 7bb7f9009806..cb02c9d1ef93 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -31,12 +31,12 @@ struct pci_controller {
31 int last_busno; 31 int last_busno;
32 32
33 void __iomem *io_base_virt; 33 void __iomem *io_base_virt;
34 unsigned long io_base_phys; 34 resource_size_t io_base_phys;
35 35
36 /* Some machines have a non 1:1 mapping of 36 /* Some machines have a non 1:1 mapping of
37 * the PCI memory space in the CPU bus space 37 * the PCI memory space in the CPU bus space
38 */ 38 */
39 unsigned long pci_mem_offset; 39 resource_size_t pci_mem_offset;
40 unsigned long pci_io_size; 40 unsigned long pci_io_size;
41 41
42 struct pci_ops *ops; 42 struct pci_ops *ops;
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index 16f13319c769..ac656ee6bb19 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -143,8 +143,13 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
143/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ 143/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
144#define HAVE_PCI_MMAP 1 144#define HAVE_PCI_MMAP 1
145 145
146#ifdef CONFIG_PPC64 146#if defined(CONFIG_PPC64) || defined(CONFIG_NOT_COHERENT_CACHE)
147/* pci_unmap_{single,page} is not a nop, thus... */ 147/*
148 * For 64-bit kernels, pci_unmap_{single,page} is not a nop.
149 * For 32-bit non-coherent kernels, pci_dma_sync_single_for_cpu() and
150 * so on are not nops.
151 * and thus...
152 */
148#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ 153#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
149 dma_addr_t ADDR_NAME; 154 dma_addr_t ADDR_NAME;
150#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ 155#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
@@ -158,6 +163,20 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
158#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ 163#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
159 (((PTR)->LEN_NAME) = (VAL)) 164 (((PTR)->LEN_NAME) = (VAL))
160 165
166#else /* 32-bit && coherent */
167
168/* pci_unmap_{page,single} is a nop so... */
169#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
170#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
171#define pci_unmap_addr(PTR, ADDR_NAME) (0)
172#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
173#define pci_unmap_len(PTR, LEN_NAME) (0)
174#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
175
176#endif /* CONFIG_PPC64 || CONFIG_NOT_COHERENT_CACHE */
177
178#ifdef CONFIG_PPC64
179
161/* The PCI address space does not equal the physical memory address 180/* The PCI address space does not equal the physical memory address
162 * space (we have an IOMMU). The IDE and SCSI device layers use 181 * space (we have an IOMMU). The IDE and SCSI device layers use
163 * this boolean for bounce buffer decisions. 182 * this boolean for bounce buffer decisions.
@@ -172,16 +191,8 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
172 */ 191 */
173#define PCI_DMA_BUS_IS_PHYS (1) 192#define PCI_DMA_BUS_IS_PHYS (1)
174 193
175/* pci_unmap_{page,single} is a nop so... */
176#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
177#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
178#define pci_unmap_addr(PTR, ADDR_NAME) (0)
179#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
180#define pci_unmap_len(PTR, LEN_NAME) (0)
181#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
182
183#endif /* CONFIG_PPC64 */ 194#endif /* CONFIG_PPC64 */
184 195
185extern void pcibios_resource_to_bus(struct pci_dev *dev, 196extern void pcibios_resource_to_bus(struct pci_dev *dev,
186 struct pci_bus_region *region, 197 struct pci_bus_region *region,
187 struct resource *res); 198 struct resource *res);
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 6faae7b14d55..a3631b15754c 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -143,6 +143,7 @@
143 143
144/* Special Purpose Registers (SPRNs)*/ 144/* Special Purpose Registers (SPRNs)*/
145#define SPRN_CTR 0x009 /* Count Register */ 145#define SPRN_CTR 0x009 /* Count Register */
146#define SPRN_DSCR 0x11
146#define SPRN_CTRLF 0x088 147#define SPRN_CTRLF 0x088
147#define SPRN_CTRLT 0x098 148#define SPRN_CTRLT 0x098
148#define CTRL_CT 0xc0000000 /* current thread */ 149#define CTRL_CT 0xc0000000 /* current thread */
@@ -163,6 +164,7 @@
163#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ 164#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */
164#define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ 165#define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */
165#define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ 166#define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */
167#define SPRN_SPURR 0x134 /* Scaled PURR */
166#define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ 168#define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */
167#define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ 169#define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */
168#define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ 170#define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 5a0c136c0416..8eaa7b28d9d0 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -159,6 +159,7 @@ extern struct rtas_t rtas;
159 159
160extern void enter_rtas(unsigned long); 160extern void enter_rtas(unsigned long);
161extern int rtas_token(const char *service); 161extern int rtas_token(const char *service);
162extern int rtas_service_present(const char *service);
162extern int rtas_call(int token, int, int, int *, ...); 163extern int rtas_call(int token, int, int, int *, ...);
163extern void rtas_restart(char *cmd); 164extern void rtas_restart(char *cmd);
164extern void rtas_power_off(void); 165extern void rtas_power_off(void);
@@ -221,8 +222,6 @@ extern int rtas_get_error_log_max(void);
221extern spinlock_t rtas_data_buf_lock; 222extern spinlock_t rtas_data_buf_lock;
222extern char rtas_data_buf[RTAS_DATA_BUF_SIZE]; 223extern char rtas_data_buf[RTAS_DATA_BUF_SIZE];
223 224
224extern void rtas_stop_self(void);
225
226/* RMO buffer reserved for user-space RTAS use */ 225/* RMO buffer reserved for user-space RTAS use */
227extern unsigned long rtas_rmo_buf; 226extern unsigned long rtas_rmo_buf;
228 227