diff options
Diffstat (limited to 'arch/powerpc/include/asm')
26 files changed, 184 insertions, 235 deletions
diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h index 9a846efe6382..5ab0b71531be 100644 --- a/arch/powerpc/include/asm/abs_addr.h +++ b/arch/powerpc/include/asm/abs_addr.h | |||
@@ -69,7 +69,7 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
69 | * Legacy iSeries Hypervisor calls | 69 | * Legacy iSeries Hypervisor calls |
70 | */ | 70 | */ |
71 | #define iseries_hv_addr(virtaddr) \ | 71 | #define iseries_hv_addr(virtaddr) \ |
72 | (0x8000000000000000 | virt_to_abs(virtaddr)) | 72 | (0x8000000000000000UL | virt_to_abs(virtaddr)) |
73 | 73 | ||
74 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
75 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ | 75 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ |
diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h index 2048a6aeea91..decad950f11a 100644 --- a/arch/powerpc/include/asm/asm-compat.h +++ b/arch/powerpc/include/asm/asm-compat.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define PPC_STLCX stringify_in_c(stdcx.) | 30 | #define PPC_STLCX stringify_in_c(stdcx.) |
31 | #define PPC_CNTLZL stringify_in_c(cntlzd) | 31 | #define PPC_CNTLZL stringify_in_c(cntlzd) |
32 | #define PPC_LR_STKOFF 16 | 32 | #define PPC_LR_STKOFF 16 |
33 | #define PPC_MIN_STKFRM 112 | ||
33 | 34 | ||
34 | /* Move to CR, single-entry optimized version. Only available | 35 | /* Move to CR, single-entry optimized version. Only available |
35 | * on POWER4 and later. | 36 | * on POWER4 and later. |
@@ -55,6 +56,7 @@ | |||
55 | #define PPC_CNTLZL stringify_in_c(cntlzw) | 56 | #define PPC_CNTLZL stringify_in_c(cntlzw) |
56 | #define PPC_MTOCRF stringify_in_c(mtcrf) | 57 | #define PPC_MTOCRF stringify_in_c(mtcrf) |
57 | #define PPC_LR_STKOFF 4 | 58 | #define PPC_LR_STKOFF 4 |
59 | #define PPC_MIN_STKFRM 16 | ||
58 | 60 | ||
59 | #endif | 61 | #endif |
60 | 62 | ||
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index b0b21134f61a..5e2e2cfcc81b 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -517,6 +517,10 @@ static inline int cpu_has_feature(unsigned long feature) | |||
517 | & feature); | 517 | & feature); |
518 | } | 518 | } |
519 | 519 | ||
520 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
521 | #define HBP_NUM 1 | ||
522 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
523 | |||
520 | #endif /* !__ASSEMBLY__ */ | 524 | #endif /* !__ASSEMBLY__ */ |
521 | 525 | ||
522 | #endif /* __KERNEL__ */ | 526 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h index 501189a543d1..0893ab9343a6 100644 --- a/arch/powerpc/include/asm/dbell.h +++ b/arch/powerpc/include/asm/dbell.h | |||
@@ -27,10 +27,10 @@ enum ppc_dbell { | |||
27 | PPC_G_DBELL_MC = 4, /* guest mcheck doorbell */ | 27 | PPC_G_DBELL_MC = 4, /* guest mcheck doorbell */ |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #ifdef CONFIG_SMP | 30 | extern void doorbell_message_pass(int target, int msg); |
31 | extern unsigned long dbell_smp_message[NR_CPUS]; | 31 | extern void doorbell_exception(struct pt_regs *regs); |
32 | extern void smp_dbell_message_pass(int target, int msg); | 32 | extern void doorbell_check_self(void); |
33 | #endif | 33 | extern void doorbell_setup_this_cpu(void); |
34 | 34 | ||
35 | static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag) | 35 | static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag) |
36 | { | 36 | { |
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index 5119b7db3142..de03ca58db5d 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
@@ -74,6 +74,7 @@ | |||
74 | #define H_NOT_ENOUGH_RESOURCES -44 | 74 | #define H_NOT_ENOUGH_RESOURCES -44 |
75 | #define H_R_STATE -45 | 75 | #define H_R_STATE -45 |
76 | #define H_RESCINDEND -46 | 76 | #define H_RESCINDEND -46 |
77 | #define H_MULTI_THREADS_ACTIVE -9005 | ||
77 | 78 | ||
78 | 79 | ||
79 | /* Long Busy is a condition that can be returned by the firmware | 80 | /* Long Busy is a condition that can be returned by the firmware |
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h b/arch/powerpc/include/asm/hw_breakpoint.h new file mode 100644 index 000000000000..1c33ec17ca36 --- /dev/null +++ b/arch/powerpc/include/asm/hw_breakpoint.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * PowerPC BookIII S hardware breakpoint definitions | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | * | ||
18 | * Copyright 2010, IBM Corporation. | ||
19 | * Author: K.Prasad <prasad@linux.vnet.ibm.com> | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef _PPC_BOOK3S_64_HW_BREAKPOINT_H | ||
24 | #define _PPC_BOOK3S_64_HW_BREAKPOINT_H | ||
25 | |||
26 | #ifdef __KERNEL__ | ||
27 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
28 | |||
29 | struct arch_hw_breakpoint { | ||
30 | bool extraneous_interrupt; | ||
31 | u8 len; /* length of the target data symbol */ | ||
32 | int type; | ||
33 | unsigned long address; | ||
34 | }; | ||
35 | |||
36 | #include <linux/kdebug.h> | ||
37 | #include <asm/reg.h> | ||
38 | #include <asm/system.h> | ||
39 | |||
40 | struct perf_event; | ||
41 | struct pmu; | ||
42 | struct perf_sample_data; | ||
43 | |||
44 | #define HW_BREAKPOINT_ALIGN 0x7 | ||
45 | /* Maximum permissible length of any HW Breakpoint */ | ||
46 | #define HW_BREAKPOINT_LEN 0x8 | ||
47 | |||
48 | extern int hw_breakpoint_slots(int type); | ||
49 | extern int arch_bp_generic_fields(int type, int *gen_bp_type); | ||
50 | extern int arch_check_bp_in_kernelspace(struct perf_event *bp); | ||
51 | extern int arch_validate_hwbkpt_settings(struct perf_event *bp); | ||
52 | extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused, | ||
53 | unsigned long val, void *data); | ||
54 | int arch_install_hw_breakpoint(struct perf_event *bp); | ||
55 | void arch_uninstall_hw_breakpoint(struct perf_event *bp); | ||
56 | void hw_breakpoint_pmu_read(struct perf_event *bp); | ||
57 | extern void flush_ptrace_hw_breakpoint(struct task_struct *tsk); | ||
58 | |||
59 | extern struct pmu perf_ops_bp; | ||
60 | extern void ptrace_triggered(struct perf_event *bp, int nmi, | ||
61 | struct perf_sample_data *data, struct pt_regs *regs); | ||
62 | static inline void hw_breakpoint_disable(void) | ||
63 | { | ||
64 | set_dabr(0); | ||
65 | } | ||
66 | extern void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs); | ||
67 | |||
68 | #else /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
69 | static inline void hw_breakpoint_disable(void) { } | ||
70 | static inline void thread_change_pc(struct task_struct *tsk, | ||
71 | struct pt_regs *regs) { } | ||
72 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
73 | #endif /* __KERNEL__ */ | ||
74 | #endif /* _PPC_BOOK3S_64_HW_BREAKPOINT_H */ | ||
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index ecba37a91749..67ab5fb7d153 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -300,34 +300,6 @@ extern unsigned int irq_alloc_virt(struct irq_host *host, | |||
300 | */ | 300 | */ |
301 | extern void irq_free_virt(unsigned int virq, unsigned int count); | 301 | extern void irq_free_virt(unsigned int virq, unsigned int count); |
302 | 302 | ||
303 | |||
304 | /* -- OF helpers -- */ | ||
305 | |||
306 | /** | ||
307 | * irq_create_of_mapping - Map a hardware interrupt into linux virq space | ||
308 | * @controller: Device node of the interrupt controller | ||
309 | * @inspec: Interrupt specifier from the device-tree | ||
310 | * @intsize: Size of the interrupt specifier from the device-tree | ||
311 | * | ||
312 | * This function is identical to irq_create_mapping except that it takes | ||
313 | * as input informations straight from the device-tree (typically the results | ||
314 | * of the of_irq_map_*() functions. | ||
315 | */ | ||
316 | extern unsigned int irq_create_of_mapping(struct device_node *controller, | ||
317 | const u32 *intspec, unsigned int intsize); | ||
318 | |||
319 | /** | ||
320 | * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space | ||
321 | * @device: Device node of the device whose interrupt is to be mapped | ||
322 | * @index: Index of the interrupt to map | ||
323 | * | ||
324 | * This function is a wrapper that chains of_irq_map_one() and | ||
325 | * irq_create_of_mapping() to make things easier to callers | ||
326 | */ | ||
327 | extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index); | ||
328 | |||
329 | /* -- End OF helpers -- */ | ||
330 | |||
331 | /** | 303 | /** |
332 | * irq_early_init - Init irq remapping subsystem | 304 | * irq_early_init - Init irq remapping subsystem |
333 | */ | 305 | */ |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 9f0fc9e6ce0d..adc8e6cdf339 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -266,6 +266,7 @@ struct machdep_calls { | |||
266 | void (*suspend_disable_irqs)(void); | 266 | void (*suspend_disable_irqs)(void); |
267 | void (*suspend_enable_irqs)(void); | 267 | void (*suspend_enable_irqs)(void); |
268 | #endif | 268 | #endif |
269 | int (*suspend_disable_cpu)(void); | ||
269 | 270 | ||
270 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | 271 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE |
271 | ssize_t (*cpu_probe)(const char *, size_t); | 272 | ssize_t (*cpu_probe)(const char *, size_t); |
@@ -277,6 +278,7 @@ extern void e500_idle(void); | |||
277 | extern void power4_idle(void); | 278 | extern void power4_idle(void); |
278 | extern void power4_cpu_offline_powersave(void); | 279 | extern void power4_cpu_offline_powersave(void); |
279 | extern void ppc6xx_idle(void); | 280 | extern void ppc6xx_idle(void); |
281 | extern void book3e_idle(void); | ||
280 | 282 | ||
281 | /* | 283 | /* |
282 | * ppc_md contains a copy of the machine description structure for the | 284 | * ppc_md contains a copy of the machine description structure for the |
@@ -366,8 +368,5 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal) | |||
366 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) | 368 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) |
367 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) | 369 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) |
368 | 370 | ||
369 | void generic_suspend_disable_irqs(void); | ||
370 | void generic_suspend_enable_irqs(void); | ||
371 | |||
372 | #endif /* __KERNEL__ */ | 371 | #endif /* __KERNEL__ */ |
373 | #endif /* _ASM_POWERPC_MACHDEP_H */ | 372 | #endif /* _ASM_POWERPC_MACHDEP_H */ |
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index 675e159b5ef4..7ab82c825a03 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h | |||
@@ -38,7 +38,7 @@ struct macio_dev | |||
38 | { | 38 | { |
39 | struct macio_bus *bus; /* macio bus this device is on */ | 39 | struct macio_bus *bus; /* macio bus this device is on */ |
40 | struct macio_dev *media_bay; /* Device is part of a media bay */ | 40 | struct macio_dev *media_bay; /* Device is part of a media bay */ |
41 | struct of_device ofdev; | 41 | struct platform_device ofdev; |
42 | struct device_dma_parameters dma_parms; /* ide needs that */ | 42 | struct device_dma_parameters dma_parms; /* ide needs that */ |
43 | int n_resources; | 43 | int n_resources; |
44 | struct resource resource[MACIO_DEV_COUNT_RESOURCES]; | 44 | struct resource resource[MACIO_DEV_COUNT_RESOURCES]; |
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h index 74695816205c..87a1d787c5b6 100644 --- a/arch/powerpc/include/asm/mmu-book3e.h +++ b/arch/powerpc/include/asm/mmu-book3e.h | |||
@@ -193,6 +193,10 @@ struct mmu_psize_def | |||
193 | { | 193 | { |
194 | unsigned int shift; /* number of bits */ | 194 | unsigned int shift; /* number of bits */ |
195 | unsigned int enc; /* PTE encoding */ | 195 | unsigned int enc; /* PTE encoding */ |
196 | unsigned int ind; /* Corresponding indirect page size shift */ | ||
197 | unsigned int flags; | ||
198 | #define MMU_PAGE_SIZE_DIRECT 0x1 /* Supported as a direct size */ | ||
199 | #define MMU_PAGE_SIZE_INDIRECT 0x2 /* Supported as an indirect size */ | ||
196 | }; | 200 | }; |
197 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | 201 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; |
198 | 202 | ||
diff --git a/arch/powerpc/include/asm/mpc5121.h b/arch/powerpc/include/asm/mpc5121.h index e6a30bb1d16a..8c0ab2ca689c 100644 --- a/arch/powerpc/include/asm/mpc5121.h +++ b/arch/powerpc/include/asm/mpc5121.h | |||
@@ -21,4 +21,36 @@ struct mpc512x_reset_module { | |||
21 | u32 rcer; /* Reset Control Enable Register */ | 21 | u32 rcer; /* Reset Control Enable Register */ |
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* | ||
25 | * Clock Control Module | ||
26 | */ | ||
27 | struct mpc512x_ccm { | ||
28 | u32 spmr; /* System PLL Mode Register */ | ||
29 | u32 sccr1; /* System Clock Control Register 1 */ | ||
30 | u32 sccr2; /* System Clock Control Register 2 */ | ||
31 | u32 scfr1; /* System Clock Frequency Register 1 */ | ||
32 | u32 scfr2; /* System Clock Frequency Register 2 */ | ||
33 | u32 scfr2s; /* System Clock Frequency Shadow Register 2 */ | ||
34 | u32 bcr; /* Bread Crumb Register */ | ||
35 | u32 p0ccr; /* PSC0 Clock Control Register */ | ||
36 | u32 p1ccr; /* PSC1 CCR */ | ||
37 | u32 p2ccr; /* PSC2 CCR */ | ||
38 | u32 p3ccr; /* PSC3 CCR */ | ||
39 | u32 p4ccr; /* PSC4 CCR */ | ||
40 | u32 p5ccr; /* PSC5 CCR */ | ||
41 | u32 p6ccr; /* PSC6 CCR */ | ||
42 | u32 p7ccr; /* PSC7 CCR */ | ||
43 | u32 p8ccr; /* PSC8 CCR */ | ||
44 | u32 p9ccr; /* PSC9 CCR */ | ||
45 | u32 p10ccr; /* PSC10 CCR */ | ||
46 | u32 p11ccr; /* PSC11 CCR */ | ||
47 | u32 spccr; /* SPDIF Clock Control Register */ | ||
48 | u32 cccr; /* CFM Clock Control Register */ | ||
49 | u32 dccr; /* DIU Clock Control Register */ | ||
50 | u32 m1ccr; /* MSCAN1 CCR */ | ||
51 | u32 m2ccr; /* MSCAN2 CCR */ | ||
52 | u32 m3ccr; /* MSCAN3 CCR */ | ||
53 | u32 m4ccr; /* MSCAN4 CCR */ | ||
54 | u8 res[0x98]; /* Reserved */ | ||
55 | }; | ||
24 | #endif /* __ASM_POWERPC_MPC5121_H__ */ | 56 | #endif /* __ASM_POWERPC_MPC5121_H__ */ |
diff --git a/arch/powerpc/include/asm/of_device.h b/arch/powerpc/include/asm/of_device.h deleted file mode 100644 index 444e97e2982e..000000000000 --- a/arch/powerpc/include/asm/of_device.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_OF_DEVICE_H | ||
2 | #define _ASM_POWERPC_OF_DEVICE_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/device.h> | ||
6 | #include <linux/of.h> | ||
7 | |||
8 | /* | ||
9 | * The of_device is a kind of "base class" that is a superset of | ||
10 | * struct device for use by devices attached to an OF node and | ||
11 | * probed using OF properties. | ||
12 | */ | ||
13 | struct of_device | ||
14 | { | ||
15 | struct device dev; /* Generic device interface */ | ||
16 | struct pdev_archdata archdata; | ||
17 | }; | ||
18 | |||
19 | extern struct of_device *of_device_alloc(struct device_node *np, | ||
20 | const char *bus_id, | ||
21 | struct device *parent); | ||
22 | |||
23 | extern int of_device_uevent(struct device *dev, | ||
24 | struct kobj_uevent_env *env); | ||
25 | |||
26 | #endif /* __KERNEL__ */ | ||
27 | #endif /* _ASM_POWERPC_OF_DEVICE_H */ | ||
diff --git a/arch/powerpc/include/asm/of_platform.h b/arch/powerpc/include/asm/of_platform.h deleted file mode 100644 index d4aaa3489440..000000000000 --- a/arch/powerpc/include/asm/of_platform.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_OF_PLATFORM_H | ||
2 | #define _ASM_POWERPC_OF_PLATFORM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
5 | * <benh@kernel.crashing.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | /* Platform devices and busses creation */ | ||
15 | extern struct of_device *of_platform_device_create(struct device_node *np, | ||
16 | const char *bus_id, | ||
17 | struct device *parent); | ||
18 | /* pseudo "matches" value to not do deep probe */ | ||
19 | #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1) | ||
20 | |||
21 | extern int of_platform_bus_probe(struct device_node *root, | ||
22 | const struct of_device_id *matches, | ||
23 | struct device *parent); | ||
24 | |||
25 | extern struct of_device *of_find_device_by_phandle(phandle ph); | ||
26 | |||
27 | extern void of_instantiate_rtc(void); | ||
28 | |||
29 | #endif /* _ASM_POWERPC_OF_PLATFORM_H */ | ||
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 8ce7963ad41d..1ff6662f7faf 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -146,7 +146,7 @@ struct paca_struct { | |||
146 | extern struct paca_struct *paca; | 146 | extern struct paca_struct *paca; |
147 | extern __initdata struct paca_struct boot_paca; | 147 | extern __initdata struct paca_struct boot_paca; |
148 | extern void initialise_paca(struct paca_struct *new_paca, int cpu); | 148 | extern void initialise_paca(struct paca_struct *new_paca, int cpu); |
149 | 149 | extern void setup_paca(struct paca_struct *new_paca); | |
150 | extern void allocate_pacas(void); | 150 | extern void allocate_pacas(void); |
151 | extern void free_unused_pacas(void); | 151 | extern void free_unused_pacas(void); |
152 | 152 | ||
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 76e1f313a58e..51e9e6f90d12 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -303,13 +303,8 @@ extern void pcibios_free_controller(struct pci_controller *phb); | |||
303 | extern void pcibios_setup_phb_resources(struct pci_controller *hose); | 303 | extern void pcibios_setup_phb_resources(struct pci_controller *hose); |
304 | 304 | ||
305 | #ifdef CONFIG_PCI | 305 | #ifdef CONFIG_PCI |
306 | extern unsigned long pci_address_to_pio(phys_addr_t address); | ||
307 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | 306 | extern int pcibios_vaddr_is_ioport(void __iomem *address); |
308 | #else | 307 | #else |
309 | static inline unsigned long pci_address_to_pio(phys_addr_t address) | ||
310 | { | ||
311 | return (unsigned long)-1; | ||
312 | } | ||
313 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) | 308 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) |
314 | { | 309 | { |
315 | return 0; | 310 | return 0; |
diff --git a/arch/powerpc/include/asm/percpu.h b/arch/powerpc/include/asm/percpu.h index f879252b7ea6..2cedefddba37 100644 --- a/arch/powerpc/include/asm/percpu.h +++ b/arch/powerpc/include/asm/percpu.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_PERCPU_H_ | 1 | #ifndef _ASM_POWERPC_PERCPU_H_ |
2 | #define _ASM_POWERPC_PERCPU_H_ | 2 | #define _ASM_POWERPC_PERCPU_H_ |
3 | #ifdef __powerpc64__ | 3 | #ifdef __powerpc64__ |
4 | #include <linux/compiler.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * Same as asm-generic/percpu.h, except that we store the per cpu offset | 6 | * Same as asm-generic/percpu.h, except that we store the per cpu offset |
@@ -12,9 +11,7 @@ | |||
12 | 11 | ||
13 | #include <asm/paca.h> | 12 | #include <asm/paca.h> |
14 | 13 | ||
15 | #define __per_cpu_offset(cpu) (paca[cpu].data_offset) | ||
16 | #define __my_cpu_offset local_paca->data_offset | 14 | #define __my_cpu_offset local_paca->data_offset |
17 | #define per_cpu_offset(x) (__per_cpu_offset(x)) | ||
18 | 15 | ||
19 | #endif /* CONFIG_SMP */ | 16 | #endif /* CONFIG_SMP */ |
20 | #endif /* __powerpc64__ */ | 17 | #endif /* __powerpc64__ */ |
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index d553bbeb726c..43adc8b819ed 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -52,13 +52,17 @@ | |||
52 | #define PPC_INST_WAIT 0x7c00007c | 52 | #define PPC_INST_WAIT 0x7c00007c |
53 | #define PPC_INST_TLBIVAX 0x7c000624 | 53 | #define PPC_INST_TLBIVAX 0x7c000624 |
54 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 | 54 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 |
55 | #define PPC_INST_XXLOR 0xf0000510 | ||
55 | 56 | ||
56 | /* macros to insert fields into opcodes */ | 57 | /* macros to insert fields into opcodes */ |
57 | #define __PPC_RA(a) (((a) & 0x1f) << 16) | 58 | #define __PPC_RA(a) (((a) & 0x1f) << 16) |
58 | #define __PPC_RB(b) (((b) & 0x1f) << 11) | 59 | #define __PPC_RB(b) (((b) & 0x1f) << 11) |
59 | #define __PPC_RS(s) (((s) & 0x1f) << 21) | 60 | #define __PPC_RS(s) (((s) & 0x1f) << 21) |
60 | #define __PPC_RT(s) __PPC_RS(s) | 61 | #define __PPC_RT(s) __PPC_RS(s) |
62 | #define __PPC_XA(a) ((((a) & 0x1f) << 16) | (((a) & 0x20) >> 3)) | ||
63 | #define __PPC_XB(b) ((((b) & 0x1f) << 11) | (((b) & 0x20) >> 4)) | ||
61 | #define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5)) | 64 | #define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5)) |
65 | #define __PPC_XT(s) __PPC_XS(s) | ||
62 | #define __PPC_T_TLB(t) (((t) & 0x3) << 21) | 66 | #define __PPC_T_TLB(t) (((t) & 0x3) << 21) |
63 | #define __PPC_WC(w) (((w) & 0x3) << 21) | 67 | #define __PPC_WC(w) (((w) & 0x3) << 21) |
64 | /* | 68 | /* |
@@ -106,9 +110,12 @@ | |||
106 | * the 128 bit load store instructions based on that. | 110 | * the 128 bit load store instructions based on that. |
107 | */ | 111 | */ |
108 | #define VSX_XX1(s, a, b) (__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b)) | 112 | #define VSX_XX1(s, a, b) (__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b)) |
113 | #define VSX_XX3(t, a, b) (__PPC_XT(t) | __PPC_XA(a) | __PPC_XB(b)) | ||
109 | #define STXVD2X(s, a, b) stringify_in_c(.long PPC_INST_STXVD2X | \ | 114 | #define STXVD2X(s, a, b) stringify_in_c(.long PPC_INST_STXVD2X | \ |
110 | VSX_XX1((s), (a), (b))) | 115 | VSX_XX1((s), (a), (b))) |
111 | #define LXVD2X(s, a, b) stringify_in_c(.long PPC_INST_LXVD2X | \ | 116 | #define LXVD2X(s, a, b) stringify_in_c(.long PPC_INST_LXVD2X | \ |
112 | VSX_XX1((s), (a), (b))) | 117 | VSX_XX1((s), (a), (b))) |
118 | #define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \ | ||
119 | VSX_XX3((t), (a), (b))) | ||
113 | 120 | ||
114 | #endif /* _ASM_POWERPC_PPC_OPCODE_H */ | 121 | #endif /* _ASM_POWERPC_PPC_OPCODE_H */ |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 7492fe8ad6e4..19c05b0f74be 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -209,6 +209,14 @@ struct thread_struct { | |||
209 | #ifdef CONFIG_PPC64 | 209 | #ifdef CONFIG_PPC64 |
210 | unsigned long start_tb; /* Start purr when proc switched in */ | 210 | unsigned long start_tb; /* Start purr when proc switched in */ |
211 | unsigned long accum_tb; /* Total accumilated purr for process */ | 211 | unsigned long accum_tb; /* Total accumilated purr for process */ |
212 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
213 | struct perf_event *ptrace_bps[HBP_NUM]; | ||
214 | /* | ||
215 | * Helps identify source of single-step exception and subsequent | ||
216 | * hw-breakpoint enablement | ||
217 | */ | ||
218 | struct perf_event *last_hit_ubp; | ||
219 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
212 | #endif | 220 | #endif |
213 | unsigned long dabr; /* Data address breakpoint register */ | 221 | unsigned long dabr; /* Data address breakpoint register */ |
214 | #ifdef CONFIG_ALTIVEC | 222 | #ifdef CONFIG_ALTIVEC |
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index ddd408a93b5a..ae26f2efd089 100644 --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h | |||
@@ -17,9 +17,6 @@ | |||
17 | * 2 of the License, or (at your option) any later version. | 17 | * 2 of the License, or (at your option) any later version. |
18 | */ | 18 | */ |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/of_fdt.h> | ||
21 | #include <linux/proc_fs.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
24 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
25 | 22 | ||
@@ -43,49 +40,14 @@ extern void pci_create_OF_bus_map(void); | |||
43 | * OF address retreival & translation | 40 | * OF address retreival & translation |
44 | */ | 41 | */ |
45 | 42 | ||
46 | /* Translate an OF address block into a CPU physical address | ||
47 | */ | ||
48 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); | ||
49 | |||
50 | /* Translate a DMA address from device space to CPU space */ | 43 | /* Translate a DMA address from device space to CPU space */ |
51 | extern u64 of_translate_dma_address(struct device_node *dev, | 44 | extern u64 of_translate_dma_address(struct device_node *dev, |
52 | const u32 *in_addr); | 45 | const u32 *in_addr); |
53 | 46 | ||
54 | /* Extract an address from a device, returns the region size and | ||
55 | * the address space flags too. The PCI version uses a BAR number | ||
56 | * instead of an absolute index | ||
57 | */ | ||
58 | extern const u32 *of_get_address(struct device_node *dev, int index, | ||
59 | u64 *size, unsigned int *flags); | ||
60 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
61 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 48 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
62 | u64 *size, unsigned int *flags); | 49 | #define pci_address_to_pio pci_address_to_pio |
63 | #else | 50 | #endif /* CONFIG_PCI */ |
64 | static inline const u32 *of_get_pci_address(struct device_node *dev, | ||
65 | int bar_no, u64 *size, unsigned int *flags) | ||
66 | { | ||
67 | return NULL; | ||
68 | } | ||
69 | #endif /* CONFIG_PCI */ | ||
70 | |||
71 | /* Get an address as a resource. Note that if your address is | ||
72 | * a PIO address, the conversion will fail if the physical address | ||
73 | * can't be internally converted to an IO token with | ||
74 | * pci_address_to_pio(), that is because it's either called to early | ||
75 | * or it can't be matched to any host bridge IO space | ||
76 | */ | ||
77 | extern int of_address_to_resource(struct device_node *dev, int index, | ||
78 | struct resource *r); | ||
79 | #ifdef CONFIG_PCI | ||
80 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | ||
81 | struct resource *r); | ||
82 | #else | ||
83 | static inline int of_pci_address_to_resource(struct device_node *dev, int bar, | ||
84 | struct resource *r) | ||
85 | { | ||
86 | return -ENOSYS; | ||
87 | } | ||
88 | #endif /* CONFIG_PCI */ | ||
89 | 51 | ||
90 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | 52 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and |
91 | * size parameters. | 53 | * size parameters. |
@@ -104,69 +66,12 @@ struct device_node *of_find_next_cache_node(struct device_node *np); | |||
104 | /* Get the MAC address */ | 66 | /* Get the MAC address */ |
105 | extern const void *of_get_mac_address(struct device_node *np); | 67 | extern const void *of_get_mac_address(struct device_node *np); |
106 | 68 | ||
107 | /* | 69 | #ifdef CONFIG_NUMA |
108 | * OF interrupt mapping | 70 | extern int of_node_to_nid(struct device_node *device); |
109 | */ | 71 | #else |
110 | 72 | static inline int of_node_to_nid(struct device_node *device) { return 0; } | |
111 | /* This structure is returned when an interrupt is mapped. The controller | 73 | #endif |
112 | * field needs to be put() after use | 74 | #define of_node_to_nid of_node_to_nid |
113 | */ | ||
114 | |||
115 | #define OF_MAX_IRQ_SPEC 4 /* We handle specifiers of at most 4 cells */ | ||
116 | |||
117 | struct of_irq { | ||
118 | struct device_node *controller; /* Interrupt controller node */ | ||
119 | u32 size; /* Specifier size */ | ||
120 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ | ||
121 | }; | ||
122 | |||
123 | /** | ||
124 | * of_irq_map_init - Initialize the irq remapper | ||
125 | * @flags: flags defining workarounds to enable | ||
126 | * | ||
127 | * Some machines have bugs in the device-tree which require certain workarounds | ||
128 | * to be applied. Call this before any interrupt mapping attempts to enable | ||
129 | * those workarounds. | ||
130 | */ | ||
131 | #define OF_IMAP_OLDWORLD_MAC 0x00000001 | ||
132 | #define OF_IMAP_NO_PHANDLE 0x00000002 | ||
133 | |||
134 | extern void of_irq_map_init(unsigned int flags); | ||
135 | |||
136 | /** | ||
137 | * of_irq_map_raw - Low level interrupt tree parsing | ||
138 | * @parent: the device interrupt parent | ||
139 | * @intspec: interrupt specifier ("interrupts" property of the device) | ||
140 | * @ointsize: size of the passed in interrupt specifier | ||
141 | * @addr: address specifier (start of "reg" property of the device) | ||
142 | * @out_irq: structure of_irq filled by this function | ||
143 | * | ||
144 | * Returns 0 on success and a negative number on error | ||
145 | * | ||
146 | * This function is a low-level interrupt tree walking function. It | ||
147 | * can be used to do a partial walk with synthetized reg and interrupts | ||
148 | * properties, for example when resolving PCI interrupts when no device | ||
149 | * node exist for the parent. | ||
150 | * | ||
151 | */ | ||
152 | |||
153 | extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, | ||
154 | u32 ointsize, const u32 *addr, | ||
155 | struct of_irq *out_irq); | ||
156 | |||
157 | |||
158 | /** | ||
159 | * of_irq_map_one - Resolve an interrupt for a device | ||
160 | * @device: the device whose interrupt is to be resolved | ||
161 | * @index: index of the interrupt to resolve | ||
162 | * @out_irq: structure of_irq filled by this function | ||
163 | * | ||
164 | * This function resolves an interrupt, walking the tree, for a given | ||
165 | * device-tree node. It's the high level pendant to of_irq_map_raw(). | ||
166 | * It also implements the workarounds for OldWolrd Macs. | ||
167 | */ | ||
168 | extern int of_irq_map_one(struct device_node *device, int index, | ||
169 | struct of_irq *out_irq); | ||
170 | 75 | ||
171 | /** | 76 | /** |
172 | * of_irq_map_pci - Resolve the interrupt for a PCI device | 77 | * of_irq_map_pci - Resolve the interrupt for a PCI device |
@@ -180,19 +85,19 @@ extern int of_irq_map_one(struct device_node *device, int index, | |||
180 | * resolving using the OF tree walking. | 85 | * resolving using the OF tree walking. |
181 | */ | 86 | */ |
182 | struct pci_dev; | 87 | struct pci_dev; |
88 | struct of_irq; | ||
183 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | 89 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); |
184 | 90 | ||
185 | extern int of_irq_to_resource(struct device_node *dev, int index, | 91 | extern void of_instantiate_rtc(void); |
186 | struct resource *r); | ||
187 | 92 | ||
188 | /** | 93 | /* These includes are put at the bottom because they may contain things |
189 | * of_iomap - Maps the memory mapped IO for a given device_node | 94 | * that are overridden by this file. Ideally they shouldn't be included |
190 | * @device: the device whose io range will be mapped | 95 | * by this file, but there are a bunch of .c files that currently depend |
191 | * @index: index of the io range | 96 | * on it. Eventually they will be cleaned up. */ |
192 | * | 97 | #include <linux/of_fdt.h> |
193 | * Returns a pointer to the mapped memory | 98 | #include <linux/of_address.h> |
194 | */ | 99 | #include <linux/of_irq.h> |
195 | extern void __iomem *of_iomap(struct device_node *device, int index); | 100 | #include <linux/platform_device.h> |
196 | 101 | ||
197 | #endif /* __KERNEL__ */ | 102 | #endif /* __KERNEL__ */ |
198 | #endif /* _POWERPC_PROM_H */ | 103 | #endif /* _POWERPC_PROM_H */ |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index d62fdf4e504b..d8be016d2ede 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -890,7 +890,7 @@ | |||
890 | #ifndef __ASSEMBLY__ | 890 | #ifndef __ASSEMBLY__ |
891 | #define mfmsr() ({unsigned long rval; \ | 891 | #define mfmsr() ({unsigned long rval; \ |
892 | asm volatile("mfmsr %0" : "=r" (rval)); rval;}) | 892 | asm volatile("mfmsr %0" : "=r" (rval)); rval;}) |
893 | #ifdef CONFIG_PPC64 | 893 | #ifdef CONFIG_PPC_BOOK3S_64 |
894 | #define __mtmsrd(v, l) asm volatile("mtmsrd %0," __stringify(l) \ | 894 | #define __mtmsrd(v, l) asm volatile("mtmsrd %0," __stringify(l) \ |
895 | : : "r" (v) : "memory") | 895 | : : "r" (v) : "memory") |
896 | #define mtmsrd(v) __mtmsrd((v), 0) | 896 | #define mtmsrd(v) __mtmsrd((v), 0) |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 2360317179a9..667a498eaee1 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -29,8 +29,8 @@ | |||
29 | #if defined(CONFIG_PPC_BOOK3E_64) | 29 | #if defined(CONFIG_PPC_BOOK3E_64) |
30 | #define MSR_ MSR_ME | MSR_CE | 30 | #define MSR_ MSR_ME | MSR_CE |
31 | #define MSR_KERNEL MSR_ | MSR_CM | 31 | #define MSR_KERNEL MSR_ | MSR_CM |
32 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | 32 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | MSR_DE |
33 | #define MSR_USER64 MSR_USER32 | MSR_CM | 33 | #define MSR_USER64 MSR_USER32 | MSR_CM | MSR_DE |
34 | #elif defined (CONFIG_40x) | 34 | #elif defined (CONFIG_40x) |
35 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) | 35 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) |
36 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | 36 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
@@ -62,6 +62,7 @@ | |||
62 | #define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ | 62 | #define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ |
63 | #define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ | 63 | #define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ |
64 | #define SPRN_MAS8_MAS1 0x15d /* MMU Assist Register 8 || 1 */ | 64 | #define SPRN_MAS8_MAS1 0x15d /* MMU Assist Register 8 || 1 */ |
65 | #define SPRN_EPTCFG 0x15e /* Embedded Page Table Config */ | ||
65 | #define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ | 66 | #define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ |
66 | #define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ | 67 | #define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ |
67 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ | 68 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ |
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 20de73c36682..3d35f8ae377e 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h | |||
@@ -63,6 +63,14 @@ struct rtas_t { | |||
63 | struct device_node *dev; /* virtual address pointer */ | 63 | struct device_node *dev; /* virtual address pointer */ |
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct rtas_suspend_me_data { | ||
67 | atomic_t working; /* number of cpus accessing this struct */ | ||
68 | atomic_t done; | ||
69 | int token; /* ibm,suspend-me */ | ||
70 | atomic_t error; | ||
71 | struct completion *complete; /* wait on this until working == 0 */ | ||
72 | }; | ||
73 | |||
66 | /* RTAS event classes */ | 74 | /* RTAS event classes */ |
67 | #define RTAS_INTERNAL_ERROR 0x80000000 /* set bit 0 */ | 75 | #define RTAS_INTERNAL_ERROR 0x80000000 /* set bit 0 */ |
68 | #define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */ | 76 | #define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */ |
@@ -137,6 +145,9 @@ struct rtas_t { | |||
137 | #define RTAS_TYPE_PMGM_CONFIG_CHANGE 0x70 | 145 | #define RTAS_TYPE_PMGM_CONFIG_CHANGE 0x70 |
138 | #define RTAS_TYPE_PMGM_SERVICE_PROC 0x71 | 146 | #define RTAS_TYPE_PMGM_SERVICE_PROC 0x71 |
139 | 147 | ||
148 | /* RTAS check-exception vector offset */ | ||
149 | #define RTAS_VECTOR_EXTERNAL_INTERRUPT 0x500 | ||
150 | |||
140 | struct rtas_error_log { | 151 | struct rtas_error_log { |
141 | unsigned long version:8; /* Architectural version */ | 152 | unsigned long version:8; /* Architectural version */ |
142 | unsigned long severity:3; /* Severity level of error */ | 153 | unsigned long severity:3; /* Severity level of error */ |
@@ -174,6 +185,8 @@ extern int rtas_set_indicator(int indicator, int index, int new_value); | |||
174 | extern int rtas_set_indicator_fast(int indicator, int index, int new_value); | 185 | extern int rtas_set_indicator_fast(int indicator, int index, int new_value); |
175 | extern void rtas_progress(char *s, unsigned short hex); | 186 | extern void rtas_progress(char *s, unsigned short hex); |
176 | extern void rtas_initialize(void); | 187 | extern void rtas_initialize(void); |
188 | extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data); | ||
189 | extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); | ||
177 | 190 | ||
178 | struct rtc_time; | 191 | struct rtc_time; |
179 | extern unsigned long rtas_get_boot_time(void); | 192 | extern unsigned long rtas_get_boot_time(void); |
diff --git a/arch/powerpc/include/asm/smu.h b/arch/powerpc/include/asm/smu.h index 7ae2753da565..e3bdada8c542 100644 --- a/arch/powerpc/include/asm/smu.h +++ b/arch/powerpc/include/asm/smu.h | |||
@@ -457,8 +457,8 @@ extern void smu_poll(void); | |||
457 | */ | 457 | */ |
458 | extern int smu_init(void); | 458 | extern int smu_init(void); |
459 | extern int smu_present(void); | 459 | extern int smu_present(void); |
460 | struct of_device; | 460 | struct platform_device; |
461 | extern struct of_device *smu_get_ofdev(void); | 461 | extern struct platform_device *smu_get_ofdev(void); |
462 | 462 | ||
463 | 463 | ||
464 | /* | 464 | /* |
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h index 27ccb764fdab..dc779dfcf258 100644 --- a/arch/powerpc/include/asm/time.h +++ b/arch/powerpc/include/asm/time.h | |||
@@ -28,16 +28,12 @@ | |||
28 | extern unsigned long tb_ticks_per_jiffy; | 28 | extern unsigned long tb_ticks_per_jiffy; |
29 | extern unsigned long tb_ticks_per_usec; | 29 | extern unsigned long tb_ticks_per_usec; |
30 | extern unsigned long tb_ticks_per_sec; | 30 | extern unsigned long tb_ticks_per_sec; |
31 | extern u64 tb_to_xs; | ||
32 | extern unsigned tb_to_us; | ||
33 | 31 | ||
34 | struct rtc_time; | 32 | struct rtc_time; |
35 | extern void to_tm(int tim, struct rtc_time * tm); | 33 | extern void to_tm(int tim, struct rtc_time * tm); |
36 | extern void GregorianDay(struct rtc_time *tm); | 34 | extern void GregorianDay(struct rtc_time *tm); |
37 | extern time_t last_rtc_update; | ||
38 | 35 | ||
39 | extern void generic_calibrate_decr(void); | 36 | extern void generic_calibrate_decr(void); |
40 | extern void wakeup_decrementer(void); | ||
41 | extern void snapshot_timebase(void); | 37 | extern void snapshot_timebase(void); |
42 | 38 | ||
43 | extern void set_dec_cpu6(unsigned int val); | 39 | extern void set_dec_cpu6(unsigned int val); |
@@ -204,9 +200,6 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp) | |||
204 | extern u64 mulhdu(u64, u64); | 200 | extern u64 mulhdu(u64, u64); |
205 | #endif | 201 | #endif |
206 | 202 | ||
207 | extern void smp_space_timers(unsigned int); | ||
208 | |||
209 | extern unsigned mulhwu_scale_factor(unsigned, unsigned); | ||
210 | extern void div128_by_32(u64 dividend_high, u64 dividend_low, | 203 | extern void div128_by_32(u64 dividend_high, u64 dividend_low, |
211 | unsigned divisor, struct div_result *dr); | 204 | unsigned divisor, struct div_result *dr); |
212 | 205 | ||
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 32adf7280720..afe4aaa65c3b 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -41,8 +41,6 @@ static inline int cpu_to_node(int cpu) | |||
41 | cpu_all_mask : \ | 41 | cpu_all_mask : \ |
42 | node_to_cpumask_map[node]) | 42 | node_to_cpumask_map[node]) |
43 | 43 | ||
44 | int of_node_to_nid(struct device_node *device); | ||
45 | |||
46 | struct pci_bus; | 44 | struct pci_bus; |
47 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
48 | extern int pcibus_to_node(struct pci_bus *bus); | 46 | extern int pcibus_to_node(struct pci_bus *bus); |
@@ -87,6 +85,9 @@ static inline int pcibus_to_node(struct pci_bus *bus) | |||
87 | .balance_interval = 1, \ | 85 | .balance_interval = 1, \ |
88 | } | 86 | } |
89 | 87 | ||
88 | extern int __node_distance(int, int); | ||
89 | #define node_distance(a, b) __node_distance(a, b) | ||
90 | |||
90 | extern void __init dump_numa_cpu_topology(void); | 91 | extern void __init dump_numa_cpu_topology(void); |
91 | 92 | ||
92 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); | 93 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); |
@@ -94,11 +95,6 @@ extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid); | |||
94 | 95 | ||
95 | #else | 96 | #else |
96 | 97 | ||
97 | static inline int of_node_to_nid(struct device_node *device) | ||
98 | { | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static inline void dump_numa_cpu_topology(void) {} | 98 | static inline void dump_numa_cpu_topology(void) {} |
103 | 99 | ||
104 | static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) | 100 | static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) |
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h index 13c2c283e178..08679c5319b8 100644 --- a/arch/powerpc/include/asm/vdso_datapage.h +++ b/arch/powerpc/include/asm/vdso_datapage.h | |||
@@ -85,6 +85,7 @@ struct vdso_data { | |||
85 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 85 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
86 | __s32 wtom_clock_nsec; | 86 | __s32 wtom_clock_nsec; |
87 | struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */ | 87 | struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */ |
88 | __u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */ | ||
88 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 89 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
89 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 90 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
90 | }; | 91 | }; |
@@ -105,6 +106,7 @@ struct vdso_data { | |||
105 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 106 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
106 | __s32 wtom_clock_nsec; | 107 | __s32 wtom_clock_nsec; |
107 | struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */ | 108 | struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */ |
109 | __u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */ | ||
108 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 110 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
109 | __u32 dcache_block_size; /* L1 d-cache block size */ | 111 | __u32 dcache_block_size; /* L1 d-cache block size */ |
110 | __u32 icache_block_size; /* L1 i-cache block size */ | 112 | __u32 icache_block_size; /* L1 i-cache block size */ |