diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 12:03:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 12:03:46 -0400 |
commit | cdd854bc42b5e6c79bbbc40c6600d995ffe6e747 (patch) | |
tree | 18c4dcc07bbb8aeb2b23bc812cd60cc293f36cd8 /arch/powerpc/include/asm | |
parent | bbc4fd12a635492ad9d12bb418124fa2d5f0d734 (diff) | |
parent | 42a0ae2282b512d1a8f6f020327f5f7b8f31a5ea (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (79 commits)
powerpc/8xx: Add support for the MPC8xx based boards from TQC
powerpc/85xx: Introduce support for the Freescale P1022DS reference board
powerpc/85xx: Adding DTS for the STx GP3-SSA MPC8555 board
powerpc/85xx: Change deprecated binding for 85xx-based boards
powerpc/tqm85xx: add a quirk for ti1520 PCMCIA bridge
powerpc/tqm85xx: update PCI interrupt-map attribute
powerpc/mpc8308rdb: support for MPC8308RDB board from Freescale
powerpc/fsl_pci: add quirk for mpc8308 pcie bridge
powerpc/85xx: Cleanup QE initialization for MPC85xxMDS boards
powerpc/85xx: Fix booting for P1021MDS boards
powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards
powerpc/85xx: kexec for SMP 85xx BookE systems
powerpc/5200/i2c: improve i2c bus error recovery
of/xilinxfb: update tft compatible versions
powerpc/fsl-diu-fb: Support setting display mode using EDID
powerpc/5121: doc/dts-bindings: update doc of FSL DIU bindings
powerpc/5121: shared DIU framebuffer support
powerpc/5121: move fsl-diu-fb.h to include/linux
powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor
powerpc/512x: add clock structure for Video-IN (VIU) unit
...
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/abs_addr.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/asm-compat.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/cputable.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/dbell.h | 8 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hvcall.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hw_breakpoint.h | 74 | ||||
-rw-r--r-- | arch/powerpc/include/asm/machdep.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu-book3e.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mpc5121.h | 32 | ||||
-rw-r--r-- | arch/powerpc/include/asm/paca.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/percpu.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 7 | ||||
-rw-r--r-- | arch/powerpc/include/asm/processor.h | 8 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg_booke.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/rtas.h | 13 | ||||
-rw-r--r-- | arch/powerpc/include/asm/time.h | 7 | ||||
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/vdso_datapage.h | 2 |
19 files changed, 162 insertions, 22 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/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/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/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/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/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/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..3033c1b30745 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -87,6 +87,9 @@ static inline int pcibus_to_node(struct pci_bus *bus) | |||
87 | .balance_interval = 1, \ | 87 | .balance_interval = 1, \ |
88 | } | 88 | } |
89 | 89 | ||
90 | extern int __node_distance(int, int); | ||
91 | #define node_distance(a, b) __node_distance(a, b) | ||
92 | |||
90 | extern void __init dump_numa_cpu_topology(void); | 93 | extern void __init dump_numa_cpu_topology(void); |
91 | 94 | ||
92 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); | 95 | extern 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 */ |