aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/Kbuild53
-rw-r--r--arch/powerpc/include/asm/abs_addr.h4
-rw-r--r--arch/powerpc/include/asm/asm-compat.h2
-rw-r--r--arch/powerpc/include/asm/cache.h2
-rw-r--r--arch/powerpc/include/asm/cpm.h24
-rw-r--r--arch/powerpc/include/asm/cpm1.h3
-rw-r--r--arch/powerpc/include/asm/cputable.h8
-rw-r--r--arch/powerpc/include/asm/dbell.h8
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h20
-rw-r--r--arch/powerpc/include/asm/highmem.h2
-rw-r--r--arch/powerpc/include/asm/hvcall.h1
-rw-r--r--arch/powerpc/include/asm/hw_breakpoint.h74
-rw-r--r--arch/powerpc/include/asm/ioctls.h2
-rw-r--r--arch/powerpc/include/asm/irq.h34
-rw-r--r--arch/powerpc/include/asm/kdump.h11
-rw-r--r--arch/powerpc/include/asm/kexec.h13
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h10
-rw-r--r--arch/powerpc/include/asm/kvm_fpu.h27
-rw-r--r--arch/powerpc/include/asm/kvm_host.h18
-rw-r--r--arch/powerpc/include/asm/lmb.h15
-rw-r--r--arch/powerpc/include/asm/local64.h1
-rw-r--r--arch/powerpc/include/asm/machdep.h5
-rw-r--r--arch/powerpc/include/asm/macio.h6
-rw-r--r--arch/powerpc/include/asm/memblock.h15
-rw-r--r--arch/powerpc/include/asm/mmu-book3e.h4
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h4
-rw-r--r--arch/powerpc/include/asm/mpc5121.h32
-rw-r--r--arch/powerpc/include/asm/mpc52xx.h1
-rw-r--r--arch/powerpc/include/asm/mpc52xx_psc.h1
-rw-r--r--arch/powerpc/include/asm/of_device.h27
-rw-r--r--arch/powerpc/include/asm/of_platform.h29
-rw-r--r--arch/powerpc/include/asm/paca.h2
-rw-r--r--arch/powerpc/include/asm/page_32.h2
-rw-r--r--arch/powerpc/include/asm/page_64.h8
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h5
-rw-r--r--arch/powerpc/include/asm/percpu.h3
-rw-r--r--arch/powerpc/include/asm/perf_event.h12
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h7
-rw-r--r--arch/powerpc/include/asm/processor.h8
-rw-r--r--arch/powerpc/include/asm/prom.h133
-rw-r--r--arch/powerpc/include/asm/ptrace.h32
-rw-r--r--arch/powerpc/include/asm/reg.h2
-rw-r--r--arch/powerpc/include/asm/reg_booke.h38
-rw-r--r--arch/powerpc/include/asm/rtas.h13
-rw-r--r--arch/powerpc/include/asm/scatterlist.h3
-rw-r--r--arch/powerpc/include/asm/smu.h4
-rw-r--r--arch/powerpc/include/asm/system.h3
-rw-r--r--arch/powerpc/include/asm/termbits.h1
-rw-r--r--arch/powerpc/include/asm/time.h7
-rw-r--r--arch/powerpc/include/asm/topology.h10
-rw-r--r--arch/powerpc/include/asm/vdso_datapage.h2
51 files changed, 378 insertions, 373 deletions
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 5ab7d7fe198c..d51df17c7e6f 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -1,37 +1,36 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += auxvec.h 3header-y += auxvec.h
4header-y += ioctls.h 4header-y += bootx.h
5header-y += sembuf.h 5header-y += byteorder.h
6header-y += siginfo.h 6header-y += cputable.h
7header-y += stat.h 7header-y += elf.h
8header-y += errno.h 8header-y += errno.h
9header-y += ipcbuf.h
10header-y += msgbuf.h
11header-y += shmbuf.h
12header-y += socket.h
13header-y += termbits.h
14header-y += fcntl.h 9header-y += fcntl.h
15header-y += poll.h
16header-y += sockios.h
17header-y += ucontext.h
18header-y += ioctl.h 10header-y += ioctl.h
11header-y += ioctls.h
12header-y += ipcbuf.h
19header-y += linkage.h 13header-y += linkage.h
14header-y += msgbuf.h
15header-y += nvram.h
16header-y += param.h
17header-y += poll.h
18header-y += posix_types.h
19header-y += ps3fb.h
20header-y += resource.h 20header-y += resource.h
21header-y += seccomp.h
22header-y += sembuf.h
23header-y += shmbuf.h
21header-y += sigcontext.h 24header-y += sigcontext.h
25header-y += siginfo.h
26header-y += signal.h
27header-y += socket.h
28header-y += sockios.h
29header-y += spu_info.h
30header-y += stat.h
22header-y += statfs.h 31header-y += statfs.h
23header-y += ps3fb.h 32header-y += termbits.h
24 33header-y += termios.h
25unifdef-y += bootx.h 34header-y += types.h
26unifdef-y += byteorder.h 35header-y += ucontext.h
27unifdef-y += cputable.h 36header-y += unistd.h
28unifdef-y += elf.h
29unifdef-y += nvram.h
30unifdef-y += param.h
31unifdef-y += posix_types.h
32unifdef-y += seccomp.h
33unifdef-y += signal.h
34unifdef-y += spu_info.h
35unifdef-y += termios.h
36unifdef-y += types.h
37unifdef-y += unistd.h
diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h
index 98324c5a8286..5ab0b71531be 100644
--- a/arch/powerpc/include/asm/abs_addr.h
+++ b/arch/powerpc/include/asm/abs_addr.h
@@ -12,7 +12,7 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/lmb.h> 15#include <linux/memblock.h>
16 16
17#include <asm/types.h> 17#include <asm/types.h>
18#include <asm/page.h> 18#include <asm/page.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/cache.h b/arch/powerpc/include/asm/cache.h
index 725634fc18c6..4b509411ad8a 100644
--- a/arch/powerpc/include/asm/cache.h
+++ b/arch/powerpc/include/asm/cache.h
@@ -42,7 +42,7 @@ extern struct ppc64_caches ppc64_caches;
42#endif /* __powerpc64__ && ! __ASSEMBLY__ */ 42#endif /* __powerpc64__ && ! __ASSEMBLY__ */
43 43
44#if !defined(__ASSEMBLY__) 44#if !defined(__ASSEMBLY__)
45#define __read_mostly __attribute__((__section__(".data.read_mostly"))) 45#define __read_mostly __attribute__((__section__(".data..read_mostly")))
46#endif 46#endif
47 47
48#endif /* __KERNEL__ */ 48#endif /* __KERNEL__ */
diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h
index 0835eb977ba9..e50323fe941f 100644
--- a/arch/powerpc/include/asm/cpm.h
+++ b/arch/powerpc/include/asm/cpm.h
@@ -7,6 +7,30 @@
7#include <linux/of.h> 7#include <linux/of.h>
8 8
9/* 9/*
10 * SPI Parameter RAM common to QE and CPM.
11 */
12struct spi_pram {
13 __be16 rbase; /* Rx Buffer descriptor base address */
14 __be16 tbase; /* Tx Buffer descriptor base address */
15 u8 rfcr; /* Rx function code */
16 u8 tfcr; /* Tx function code */
17 __be16 mrblr; /* Max receive buffer length */
18 __be32 rstate; /* Internal */
19 __be32 rdp; /* Internal */
20 __be16 rbptr; /* Internal */
21 __be16 rbc; /* Internal */
22 __be32 rxtmp; /* Internal */
23 __be32 tstate; /* Internal */
24 __be32 tdp; /* Internal */
25 __be16 tbptr; /* Internal */
26 __be16 tbc; /* Internal */
27 __be32 txtmp; /* Internal */
28 __be32 res; /* Tx temp. */
29 __be16 rpbase; /* Relocation pointer (CPM1 only) */
30 __be16 res1; /* Reserved */
31};
32
33/*
10 * USB Controller pram common to QE and CPM. 34 * USB Controller pram common to QE and CPM.
11 */ 35 */
12struct usb_ctlr { 36struct usb_ctlr {
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h
index 81b01192f440..bd07650dca56 100644
--- a/arch/powerpc/include/asm/cpm1.h
+++ b/arch/powerpc/include/asm/cpm1.h
@@ -17,6 +17,7 @@
17#ifndef __CPM1__ 17#ifndef __CPM1__
18#define __CPM1__ 18#define __CPM1__
19 19
20#include <linux/init.h>
20#include <asm/8xx_immap.h> 21#include <asm/8xx_immap.h>
21#include <asm/ptrace.h> 22#include <asm/ptrace.h>
22#include <asm/cpm.h> 23#include <asm/cpm.h>
@@ -54,7 +55,7 @@ extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */
54 55
55extern void cpm_setbrg(uint brg, uint rate); 56extern void cpm_setbrg(uint brg, uint rate);
56 57
57extern void cpm_load_patch(cpm8xx_t *cp); 58extern void __init cpm_load_patch(cpm8xx_t *cp);
58 59
59extern void cpm_reset(void); 60extern void cpm_reset(void);
60 61
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index e3cba4e1eb34..3a40a992e594 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -70,6 +70,7 @@ struct pt_regs;
70extern int machine_check_generic(struct pt_regs *regs); 70extern int machine_check_generic(struct pt_regs *regs);
71extern int machine_check_4xx(struct pt_regs *regs); 71extern int machine_check_4xx(struct pt_regs *regs);
72extern int machine_check_440A(struct pt_regs *regs); 72extern int machine_check_440A(struct pt_regs *regs);
73extern int machine_check_e500mc(struct pt_regs *regs);
73extern int machine_check_e500(struct pt_regs *regs); 74extern int machine_check_e500(struct pt_regs *regs);
74extern int machine_check_e200(struct pt_regs *regs); 75extern int machine_check_e200(struct pt_regs *regs);
75extern int machine_check_47x(struct pt_regs *regs); 76extern int machine_check_47x(struct pt_regs *regs);
@@ -196,6 +197,7 @@ extern const char *powerpc_base_platform;
196#define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000) 197#define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000)
197#define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0040000000000000) 198#define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0040000000000000)
198#define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0080000000000000) 199#define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0080000000000000)
200#define CPU_FTR_ASYM_SMT LONG_ASM_CONST(0x0100000000000000)
199 201
200#ifndef __ASSEMBLY__ 202#ifndef __ASSEMBLY__
201 203
@@ -411,7 +413,7 @@ extern const char *powerpc_base_platform;
411 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 413 CPU_FTR_MMCRA | CPU_FTR_SMT | \
412 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 414 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
413 CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ 415 CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \
414 CPU_FTR_DSCR | CPU_FTR_SAO) 416 CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT)
415#define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ 417#define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
416 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ 418 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
417 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ 419 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
@@ -516,6 +518,10 @@ static inline int cpu_has_feature(unsigned long feature)
516 & feature); 518 & feature);
517} 519}
518 520
521#ifdef CONFIG_HAVE_HW_BREAKPOINT
522#define HBP_NUM 1
523#endif /* CONFIG_HAVE_HW_BREAKPOINT */
524
519#endif /* !__ASSEMBLY__ */ 525#endif /* !__ASSEMBLY__ */
520 526
521#endif /* __KERNEL__ */ 527#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 30extern void doorbell_message_pass(int target, int msg);
31extern unsigned long dbell_smp_message[NR_CPUS]; 31extern void doorbell_exception(struct pt_regs *regs);
32extern void smp_dbell_message_pass(int target, int msg); 32extern void doorbell_check_self(void);
33#endif 33extern void doorbell_setup_this_cpu(void);
34 34
35static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag) 35static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag)
36{ 36{
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index c85ef230135b..8c9c6ad2004e 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -209,26 +209,6 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
209 209
210#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 210#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
211#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 211#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
212#ifdef CONFIG_NOT_COHERENT_CACHE
213#define dma_is_consistent(d, h) (0)
214#else
215#define dma_is_consistent(d, h) (1)
216#endif
217
218static inline int dma_get_cache_alignment(void)
219{
220#ifdef CONFIG_PPC64
221 /* no easy way to get cache size on all processors, so return
222 * the maximum possible, to be safe */
223 return (1 << INTERNODE_CACHE_SHIFT);
224#else
225 /*
226 * Each processor family will define its own L1_CACHE_SHIFT,
227 * L1_CACHE_BYTES wraps to this, so this is always safe.
228 */
229 return L1_CACHE_BYTES;
230#endif
231}
232 212
233static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 213static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
234 enum dma_data_direction direction) 214 enum dma_data_direction direction)
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h
index a74c4ee6c020..d10d64a4be38 100644
--- a/arch/powerpc/include/asm/highmem.h
+++ b/arch/powerpc/include/asm/highmem.h
@@ -62,7 +62,7 @@ extern void *kmap_high(struct page *page);
62extern void kunmap_high(struct page *page); 62extern void kunmap_high(struct page *page);
63extern void *kmap_atomic_prot(struct page *page, enum km_type type, 63extern void *kmap_atomic_prot(struct page *page, enum km_type type,
64 pgprot_t prot); 64 pgprot_t prot);
65extern void kunmap_atomic(void *kvaddr, enum km_type type); 65extern void kunmap_atomic_notypecheck(void *kvaddr, enum km_type type);
66 66
67static inline void *kmap(struct page *page) 67static inline void *kmap(struct page *page)
68{ 68{
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
29struct 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
40struct perf_event;
41struct pmu;
42struct 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
48extern int hw_breakpoint_slots(int type);
49extern int arch_bp_generic_fields(int type, int *gen_bp_type);
50extern int arch_check_bp_in_kernelspace(struct perf_event *bp);
51extern int arch_validate_hwbkpt_settings(struct perf_event *bp);
52extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
53 unsigned long val, void *data);
54int arch_install_hw_breakpoint(struct perf_event *bp);
55void arch_uninstall_hw_breakpoint(struct perf_event *bp);
56void hw_breakpoint_pmu_read(struct perf_event *bp);
57extern void flush_ptrace_hw_breakpoint(struct task_struct *tsk);
58
59extern struct pmu perf_ops_bp;
60extern void ptrace_triggered(struct perf_event *bp, int nmi,
61 struct perf_sample_data *data, struct pt_regs *regs);
62static inline void hw_breakpoint_disable(void)
63{
64 set_dabr(0);
65}
66extern void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs);
67
68#else /* CONFIG_HAVE_HW_BREAKPOINT */
69static inline void hw_breakpoint_disable(void) { }
70static 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/ioctls.h b/arch/powerpc/include/asm/ioctls.h
index 1842186d872c..851920052e08 100644
--- a/arch/powerpc/include/asm/ioctls.h
+++ b/arch/powerpc/include/asm/ioctls.h
@@ -80,6 +80,7 @@
80# define TIOCPKT_START 8 80# define TIOCPKT_START 8
81# define TIOCPKT_NOSTOP 16 81# define TIOCPKT_NOSTOP 16
82# define TIOCPKT_DOSTOP 32 82# define TIOCPKT_DOSTOP 32
83# define TIOCPKT_IOCTL 64
83 84
84 85
85#define TIOCNOTTY 0x5422 86#define TIOCNOTTY 0x5422
@@ -93,6 +94,7 @@
93#define TIOCSRS485 0x542f 94#define TIOCSRS485 0x542f
94#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 95#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
95#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 96#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
97#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
96 98
97#define TIOCSERCONFIG 0x5453 99#define TIOCSERCONFIG 0x5453
98#define TIOCSERGWILD 0x5454 100#define TIOCSERGWILD 0x5454
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index e054baef1845..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 */
301extern void irq_free_virt(unsigned int virq, unsigned int count); 301extern 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 */
316extern 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 */
327extern 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 */
@@ -358,7 +330,6 @@ extern void exc_lvl_ctx_init(void);
358#define exc_lvl_ctx_init() 330#define exc_lvl_ctx_init()
359#endif 331#endif
360 332
361#ifdef CONFIG_IRQSTACKS
362/* 333/*
363 * Per-cpu stacks for handling hard and soft interrupts. 334 * Per-cpu stacks for handling hard and soft interrupts.
364 */ 335 */
@@ -369,11 +340,6 @@ extern void irq_ctx_init(void);
369extern void call_do_softirq(struct thread_info *tp); 340extern void call_do_softirq(struct thread_info *tp);
370extern int call_handle_irq(int irq, void *p1, 341extern int call_handle_irq(int irq, void *p1,
371 struct thread_info *tp, void *func); 342 struct thread_info *tp, void *func);
372#else
373#define irq_ctx_init()
374
375#endif /* CONFIG_IRQSTACKS */
376
377extern void do_IRQ(struct pt_regs *regs); 343extern void do_IRQ(struct pt_regs *regs);
378 344
379#endif /* _ASM_IRQ_H */ 345#endif /* _ASM_IRQ_H */
diff --git a/arch/powerpc/include/asm/kdump.h b/arch/powerpc/include/asm/kdump.h
index 5ebfe5d3c61f..6857af58b02e 100644
--- a/arch/powerpc/include/asm/kdump.h
+++ b/arch/powerpc/include/asm/kdump.h
@@ -3,8 +3,17 @@
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5 5
6/* Kdump kernel runs at 32 MB, change at your peril. */ 6/*
7 * If CONFIG_RELOCATABLE is enabled we can place the kdump kernel anywhere.
8 * To keep enough space in the RMO for the first stage kernel on 64bit, we
9 * place it at 64MB. If CONFIG_RELOCATABLE is not enabled we must place
10 * the second stage at 32MB.
11 */
12#if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC64)
13#define KDUMP_KERNELBASE 0x4000000
14#else
7#define KDUMP_KERNELBASE 0x2000000 15#define KDUMP_KERNELBASE 0x2000000
16#endif
8 17
9/* How many bytes to reserve at zero for kdump. The reserve limit should 18/* How many bytes to reserve at zero for kdump. The reserve limit should
10 * be greater or equal to the trampoline's end address. 19 * be greater or equal to the trampoline's end address.
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h
index a6ca6da1430b..076327f2eff7 100644
--- a/arch/powerpc/include/asm/kexec.h
+++ b/arch/powerpc/include/asm/kexec.h
@@ -2,6 +2,18 @@
2#define _ASM_POWERPC_KEXEC_H 2#define _ASM_POWERPC_KEXEC_H
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#ifdef CONFIG_FSL_BOOKE
6
7/*
8 * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
9 * and therefore we can only deal with memory within this range
10 */
11#define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)
12#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)
13#define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)
14
15#else
16
5/* 17/*
6 * Maximum page that is mapped directly into kernel memory. 18 * Maximum page that is mapped directly into kernel memory.
7 * XXX: Since we copy virt we can use any page we allocate 19 * XXX: Since we copy virt we can use any page we allocate
@@ -21,6 +33,7 @@
21/* TASK_SIZE, probably left over from use_mm ?? */ 33/* TASK_SIZE, probably left over from use_mm ?? */
22#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE 34#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
23#endif 35#endif
36#endif
24 37
25#define KEXEC_CONTROL_PAGE_SIZE 4096 38#define KEXEC_CONTROL_PAGE_SIZE 4096
26 39
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index 6f74d93725a0..8274a2d43925 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -115,7 +115,15 @@ extern void kvmppc_mmu_book3s_32_init(struct kvm_vcpu *vcpu);
115extern int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte); 115extern int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte);
116extern int kvmppc_mmu_map_segment(struct kvm_vcpu *vcpu, ulong eaddr); 116extern int kvmppc_mmu_map_segment(struct kvm_vcpu *vcpu, ulong eaddr);
117extern void kvmppc_mmu_flush_segments(struct kvm_vcpu *vcpu); 117extern void kvmppc_mmu_flush_segments(struct kvm_vcpu *vcpu);
118extern struct kvmppc_pte *kvmppc_mmu_find_pte(struct kvm_vcpu *vcpu, u64 ea, bool data); 118
119extern void kvmppc_mmu_hpte_cache_map(struct kvm_vcpu *vcpu, struct hpte_cache *pte);
120extern struct hpte_cache *kvmppc_mmu_hpte_cache_next(struct kvm_vcpu *vcpu);
121extern void kvmppc_mmu_hpte_destroy(struct kvm_vcpu *vcpu);
122extern int kvmppc_mmu_hpte_init(struct kvm_vcpu *vcpu);
123extern void kvmppc_mmu_invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte);
124extern int kvmppc_mmu_hpte_sysinit(void);
125extern void kvmppc_mmu_hpte_sysexit(void);
126
119extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); 127extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
120extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); 128extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
121extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec); 129extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec);
diff --git a/arch/powerpc/include/asm/kvm_fpu.h b/arch/powerpc/include/asm/kvm_fpu.h
index 94f05de9ad04..c3d4f0518a67 100644
--- a/arch/powerpc/include/asm/kvm_fpu.h
+++ b/arch/powerpc/include/asm/kvm_fpu.h
@@ -22,24 +22,24 @@
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24 24
25extern void fps_fres(struct thread_struct *t, u32 *dst, u32 *src1); 25extern void fps_fres(u64 *fpscr, u32 *dst, u32 *src1);
26extern void fps_frsqrte(struct thread_struct *t, u32 *dst, u32 *src1); 26extern void fps_frsqrte(u64 *fpscr, u32 *dst, u32 *src1);
27extern void fps_fsqrts(struct thread_struct *t, u32 *dst, u32 *src1); 27extern void fps_fsqrts(u64 *fpscr, u32 *dst, u32 *src1);
28 28
29extern void fps_fadds(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2); 29extern void fps_fadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
30extern void fps_fdivs(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2); 30extern void fps_fdivs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
31extern void fps_fmuls(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2); 31extern void fps_fmuls(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
32extern void fps_fsubs(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2); 32extern void fps_fsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
33 33
34extern void fps_fmadds(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2, 34extern void fps_fmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
35 u32 *src3); 35 u32 *src3);
36extern void fps_fmsubs(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2, 36extern void fps_fmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
37 u32 *src3); 37 u32 *src3);
38extern void fps_fnmadds(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2, 38extern void fps_fnmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
39 u32 *src3); 39 u32 *src3);
40extern void fps_fnmsubs(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2, 40extern void fps_fnmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
41 u32 *src3); 41 u32 *src3);
42extern void fps_fsel(struct thread_struct *t, u32 *dst, u32 *src1, u32 *src2, 42extern void fps_fsel(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
43 u32 *src3); 43 u32 *src3);
44 44
45#define FPD_ONE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \ 45#define FPD_ONE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
@@ -82,4 +82,7 @@ FPD_THREE_IN(fmadd)
82FPD_THREE_IN(fnmsub) 82FPD_THREE_IN(fnmsub)
83FPD_THREE_IN(fnmadd) 83FPD_THREE_IN(fnmadd)
84 84
85extern void kvm_cvt_fd(u32 *from, u64 *to, u64 *fpscr);
86extern void kvm_cvt_df(u64 *from, u32 *to, u64 *fpscr);
87
85#endif 88#endif
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 0c9ad869decd..b0b23c007d6e 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -35,10 +35,17 @@
35#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 35#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
36 36
37/* We don't currently support large pages. */ 37/* We don't currently support large pages. */
38#define KVM_HPAGE_GFN_SHIFT(x) 0
38#define KVM_NR_PAGE_SIZES 1 39#define KVM_NR_PAGE_SIZES 1
39#define KVM_PAGES_PER_HPAGE(x) (1UL<<31) 40#define KVM_PAGES_PER_HPAGE(x) (1UL<<31)
40 41
41#define HPTEG_CACHE_NUM 1024 42#define HPTEG_CACHE_NUM (1 << 15)
43#define HPTEG_HASH_BITS_PTE 13
44#define HPTEG_HASH_BITS_VPTE 13
45#define HPTEG_HASH_BITS_VPTE_LONG 5
46#define HPTEG_HASH_NUM_PTE (1 << HPTEG_HASH_BITS_PTE)
47#define HPTEG_HASH_NUM_VPTE (1 << HPTEG_HASH_BITS_VPTE)
48#define HPTEG_HASH_NUM_VPTE_LONG (1 << HPTEG_HASH_BITS_VPTE_LONG)
42 49
43struct kvm; 50struct kvm;
44struct kvm_run; 51struct kvm_run;
@@ -151,6 +158,9 @@ struct kvmppc_mmu {
151}; 158};
152 159
153struct hpte_cache { 160struct hpte_cache {
161 struct hlist_node list_pte;
162 struct hlist_node list_vpte;
163 struct hlist_node list_vpte_long;
154 u64 host_va; 164 u64 host_va;
155 u64 pfn; 165 u64 pfn;
156 ulong slot; 166 ulong slot;
@@ -282,8 +292,10 @@ struct kvm_vcpu_arch {
282 unsigned long pending_exceptions; 292 unsigned long pending_exceptions;
283 293
284#ifdef CONFIG_PPC_BOOK3S 294#ifdef CONFIG_PPC_BOOK3S
285 struct hpte_cache hpte_cache[HPTEG_CACHE_NUM]; 295 struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE];
286 int hpte_cache_offset; 296 struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE];
297 struct hlist_head hpte_hash_vpte_long[HPTEG_HASH_NUM_VPTE_LONG];
298 int hpte_cache_count;
287#endif 299#endif
288}; 300};
289 301
diff --git a/arch/powerpc/include/asm/lmb.h b/arch/powerpc/include/asm/lmb.h
deleted file mode 100644
index 6f5fdf0a19ae..000000000000
--- a/arch/powerpc/include/asm/lmb.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASM_POWERPC_LMB_H
2#define _ASM_POWERPC_LMB_H
3
4#include <asm/udbg.h>
5
6#define LMB_DBG(fmt...) udbg_printf(fmt)
7
8#ifdef CONFIG_PPC32
9extern phys_addr_t lowmem_end_addr;
10#define LMB_REAL_LIMIT lowmem_end_addr
11#else
12#define LMB_REAL_LIMIT 0
13#endif
14
15#endif /* _ASM_POWERPC_LMB_H */
diff --git a/arch/powerpc/include/asm/local64.h b/arch/powerpc/include/asm/local64.h
new file mode 100644
index 000000000000..36c93b5cc239
--- /dev/null
+++ b/arch/powerpc/include/asm/local64.h
@@ -0,0 +1 @@
#include <asm-generic/local64.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);
277extern void power4_idle(void); 278extern void power4_idle(void);
278extern void power4_cpu_offline_powersave(void); 279extern void power4_cpu_offline_powersave(void);
279extern void ppc6xx_idle(void); 280extern void ppc6xx_idle(void);
281extern 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
369void generic_suspend_disable_irqs(void);
370void 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 19a661b4cb98..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];
@@ -123,10 +123,6 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev)
123 */ 123 */
124struct macio_driver 124struct macio_driver
125{ 125{
126 char *name;
127 struct of_device_id *match_table;
128 struct module *owner;
129
130 int (*probe)(struct macio_dev* dev, const struct of_device_id *match); 126 int (*probe)(struct macio_dev* dev, const struct of_device_id *match);
131 int (*remove)(struct macio_dev* dev); 127 int (*remove)(struct macio_dev* dev);
132 128
diff --git a/arch/powerpc/include/asm/memblock.h b/arch/powerpc/include/asm/memblock.h
new file mode 100644
index 000000000000..3c29728b56b1
--- /dev/null
+++ b/arch/powerpc/include/asm/memblock.h
@@ -0,0 +1,15 @@
1#ifndef _ASM_POWERPC_MEMBLOCK_H
2#define _ASM_POWERPC_MEMBLOCK_H
3
4#include <asm/udbg.h>
5
6#define MEMBLOCK_DBG(fmt...) udbg_printf(fmt)
7
8#ifdef CONFIG_PPC32
9extern phys_addr_t lowmem_end_addr;
10#define MEMBLOCK_REAL_LIMIT lowmem_end_addr
11#else
12#define MEMBLOCK_REAL_LIMIT 0
13#endif
14
15#endif /* _ASM_POWERPC_MEMBLOCK_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};
197extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 201extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
198 202
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 2102b214a87c..0e398cfee2c8 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -250,7 +250,9 @@ extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
250int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, 250int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
251 pte_t *ptep, unsigned long trap, int local, int ssize, 251 pte_t *ptep, unsigned long trap, int local, int ssize,
252 unsigned int shift, unsigned int mmu_psize); 252 unsigned int shift, unsigned int mmu_psize);
253 253extern void hash_failure_debug(unsigned long ea, unsigned long access,
254 unsigned long vsid, unsigned long trap,
255 int ssize, int psize, unsigned long pte);
254extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 256extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
255 unsigned long pstart, unsigned long prot, 257 unsigned long pstart, unsigned long prot,
256 int psize, int ssize); 258 int psize, int ssize);
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 */
27struct 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/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index b664ce79a172..1f41382eda38 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -271,6 +271,7 @@ struct mpc52xx_intr {
271/* mpc52xx_common.c */ 271/* mpc52xx_common.c */
272extern void mpc5200_setup_xlb_arbiter(void); 272extern void mpc5200_setup_xlb_arbiter(void);
273extern void mpc52xx_declare_of_platform_devices(void); 273extern void mpc52xx_declare_of_platform_devices(void);
274extern int mpc5200_psc_ac97_gpio_reset(int psc_number);
274extern void mpc52xx_map_common_devices(void); 275extern void mpc52xx_map_common_devices(void);
275extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); 276extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
276extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node); 277extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
diff --git a/arch/powerpc/include/asm/mpc52xx_psc.h b/arch/powerpc/include/asm/mpc52xx_psc.h
index ecc4fc69ac13..2966df604221 100644
--- a/arch/powerpc/include/asm/mpc52xx_psc.h
+++ b/arch/powerpc/include/asm/mpc52xx_psc.h
@@ -131,6 +131,7 @@
131#define MPC52xx_PSC_SICR_SIM_FIR (0x6 << 24) 131#define MPC52xx_PSC_SICR_SIM_FIR (0x6 << 24)
132#define MPC52xx_PSC_SICR_SIM_CODEC_24 (0x7 << 24) 132#define MPC52xx_PSC_SICR_SIM_CODEC_24 (0x7 << 24)
133#define MPC52xx_PSC_SICR_SIM_CODEC_32 (0xf << 24) 133#define MPC52xx_PSC_SICR_SIM_CODEC_32 (0xf << 24)
134#define MPC52xx_PSC_SICR_ACRB (0x8 << 24)
134#define MPC52xx_PSC_SICR_AWR (1 << 30) 135#define MPC52xx_PSC_SICR_AWR (1 << 30)
135#define MPC52xx_PSC_SICR_GENCLK (1 << 23) 136#define MPC52xx_PSC_SICR_GENCLK (1 << 23)
136#define MPC52xx_PSC_SICR_I2S (1 << 22) 137#define MPC52xx_PSC_SICR_I2S (1 << 22)
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 */
13struct of_device
14{
15 struct device dev; /* Generic device interface */
16 struct pdev_archdata archdata;
17};
18
19extern struct of_device *of_device_alloc(struct device_node *np,
20 const char *bus_id,
21 struct device *parent);
22
23extern 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 */
15extern 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
21extern int of_platform_bus_probe(struct device_node *root,
22 const struct of_device_id *matches,
23 struct device *parent);
24
25extern struct of_device *of_find_device_by_phandle(phandle ph);
26
27extern 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 {
146extern struct paca_struct *paca; 146extern struct paca_struct *paca;
147extern __initdata struct paca_struct boot_paca; 147extern __initdata struct paca_struct boot_paca;
148extern void initialise_paca(struct paca_struct *new_paca, int cpu); 148extern void initialise_paca(struct paca_struct *new_paca, int cpu);
149 149extern void setup_paca(struct paca_struct *new_paca);
150extern void allocate_pacas(void); 150extern void allocate_pacas(void);
151extern void free_unused_pacas(void); 151extern void free_unused_pacas(void);
152 152
diff --git a/arch/powerpc/include/asm/page_32.h b/arch/powerpc/include/asm/page_32.h
index bd0849dbcaaa..68d73b2a7bfc 100644
--- a/arch/powerpc/include/asm/page_32.h
+++ b/arch/powerpc/include/asm/page_32.h
@@ -10,7 +10,7 @@
10#define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32 10#define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32
11 11
12#ifdef CONFIG_NOT_COHERENT_CACHE 12#ifdef CONFIG_NOT_COHERENT_CACHE
13#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES 13#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
14#endif 14#endif
15 15
16#ifdef CONFIG_PTE_64BIT 16#ifdef CONFIG_PTE_64BIT
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
index bfc4e027e2ad..358ff14ea25e 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -162,14 +162,6 @@ do { \
162 162
163#endif /* !CONFIG_HUGETLB_PAGE */ 163#endif /* !CONFIG_HUGETLB_PAGE */
164 164
165#ifdef MODULE
166#define __page_aligned __attribute__((__aligned__(PAGE_SIZE)))
167#else
168#define __page_aligned \
169 __attribute__((__aligned__(PAGE_SIZE), \
170 __section__(".data.page_aligned")))
171#endif
172
173#define VM_DATA_DEFAULT_FLAGS \ 165#define VM_DATA_DEFAULT_FLAGS \
174 (test_thread_flag(TIF_32BIT) ? \ 166 (test_thread_flag(TIF_32BIT) ? \
175 VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64) 167 VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)
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);
303extern void pcibios_setup_phb_resources(struct pci_controller *hose); 303extern void pcibios_setup_phb_resources(struct pci_controller *hose);
304 304
305#ifdef CONFIG_PCI 305#ifdef CONFIG_PCI
306extern unsigned long pci_address_to_pio(phys_addr_t address);
307extern int pcibios_vaddr_is_ioport(void __iomem *address); 306extern int pcibios_vaddr_is_ioport(void __iomem *address);
308#else 307#else
309static inline unsigned long pci_address_to_pio(phys_addr_t address)
310{
311 return (unsigned long)-1;
312}
313static inline int pcibios_vaddr_is_ioport(void __iomem *address) 308static 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/perf_event.h b/arch/powerpc/include/asm/perf_event.h
index e6d4ce69b126..5c16b891d501 100644
--- a/arch/powerpc/include/asm/perf_event.h
+++ b/arch/powerpc/include/asm/perf_event.h
@@ -21,3 +21,15 @@
21#ifdef CONFIG_FSL_EMB_PERF_EVENT 21#ifdef CONFIG_FSL_EMB_PERF_EVENT
22#include <asm/perf_event_fsl_emb.h> 22#include <asm/perf_event_fsl_emb.h>
23#endif 23#endif
24
25#ifdef CONFIG_PERF_EVENTS
26#include <asm/ptrace.h>
27#include <asm/reg.h>
28
29#define perf_arch_fetch_caller_regs(regs, __ip) \
30 do { \
31 (regs)->nip = __ip; \
32 (regs)->gpr[1] = *(unsigned long *)__get_SP(); \
33 asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \
34 } while (0)
35#endif
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 */
48extern 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 */
51extern u64 of_translate_dma_address(struct device_node *dev, 44extern 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 */
58extern 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
61extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, 48extern 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 */
64static 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 */
77extern int of_address_to_resource(struct device_node *dev, int index,
78 struct resource *r);
79#ifdef CONFIG_PCI
80extern int of_pci_address_to_resource(struct device_node *dev, int bar,
81 struct resource *r);
82#else
83static 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 */
105extern const void *of_get_mac_address(struct device_node *np); 67extern const void *of_get_mac_address(struct device_node *np);
106 68
107/* 69#ifdef CONFIG_NUMA
108 * OF interrupt mapping 70extern int of_node_to_nid(struct device_node *device);
109 */ 71#else
110 72static 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
117struct 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
134extern 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
153extern 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 */
168extern 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 */
182struct pci_dev; 87struct pci_dev;
88struct of_irq;
183extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); 89extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
184 90
185extern int of_irq_to_resource(struct device_node *dev, int index, 91extern 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>
195extern 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/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 5d8be0416227..0175a676b34b 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -24,11 +24,7 @@
24 * 2 of the License, or (at your option) any later version. 24 * 2 of the License, or (at your option) any later version.
25 */ 25 */
26 26
27#ifdef __KERNEL__
28#include <linux/types.h> 27#include <linux/types.h>
29#else
30#include <stdint.h>
31#endif
32 28
33#ifndef __ASSEMBLY__ 29#ifndef __ASSEMBLY__
34 30
@@ -364,13 +360,13 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
364#ifndef __ASSEMBLY__ 360#ifndef __ASSEMBLY__
365 361
366struct ppc_debug_info { 362struct ppc_debug_info {
367 uint32_t version; /* Only version 1 exists to date */ 363 __u32 version; /* Only version 1 exists to date */
368 uint32_t num_instruction_bps; 364 __u32 num_instruction_bps;
369 uint32_t num_data_bps; 365 __u32 num_data_bps;
370 uint32_t num_condition_regs; 366 __u32 num_condition_regs;
371 uint32_t data_bp_alignment; 367 __u32 data_bp_alignment;
372 uint32_t sizeof_condition; /* size of the DVC register */ 368 __u32 sizeof_condition; /* size of the DVC register */
373 uint64_t features; 369 __u64 features;
374}; 370};
375 371
376#endif /* __ASSEMBLY__ */ 372#endif /* __ASSEMBLY__ */
@@ -386,13 +382,13 @@ struct ppc_debug_info {
386#ifndef __ASSEMBLY__ 382#ifndef __ASSEMBLY__
387 383
388struct ppc_hw_breakpoint { 384struct ppc_hw_breakpoint {
389 uint32_t version; /* currently, version must be 1 */ 385 __u32 version; /* currently, version must be 1 */
390 uint32_t trigger_type; /* only some combinations allowed */ 386 __u32 trigger_type; /* only some combinations allowed */
391 uint32_t addr_mode; /* address match mode */ 387 __u32 addr_mode; /* address match mode */
392 uint32_t condition_mode; /* break/watchpoint condition flags */ 388 __u32 condition_mode; /* break/watchpoint condition flags */
393 uint64_t addr; /* break/watchpoint address */ 389 __u64 addr; /* break/watchpoint address */
394 uint64_t addr2; /* range end or mask */ 390 __u64 addr2; /* range end or mask */
395 uint64_t condition_value; /* contents of the DVC register */ 391 __u64 condition_value; /* contents of the DVC register */
396}; 392};
397 393
398#endif /* __ASSEMBLY__ */ 394#endif /* __ASSEMBLY__ */
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 5304a37ba425..667a498eaee1 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -4,6 +4,12 @@
4 * are not true Book E PowerPCs, they borrowed a number of features 4 * are not true Book E PowerPCs, they borrowed a number of features
5 * before Book E was finalized, and are included here as well. Unfortunatly, 5 * before Book E was finalized, and are included here as well. Unfortunatly,
6 * they sometimes used different locations than true Book E CPUs did. 6 * they sometimes used different locations than true Book E CPUs did.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * Copyright 2009-2010 Freescale Semiconductor, Inc.
7 */ 13 */
8#ifdef __KERNEL__ 14#ifdef __KERNEL__
9#ifndef __ASM_POWERPC_REG_BOOKE_H__ 15#ifndef __ASM_POWERPC_REG_BOOKE_H__
@@ -23,8 +29,8 @@
23#if defined(CONFIG_PPC_BOOK3E_64) 29#if defined(CONFIG_PPC_BOOK3E_64)
24#define MSR_ MSR_ME | MSR_CE 30#define MSR_ MSR_ME | MSR_CE
25#define MSR_KERNEL MSR_ | MSR_CM 31#define MSR_KERNEL MSR_ | MSR_CM
26#define MSR_USER32 MSR_ | MSR_PR | MSR_EE 32#define MSR_USER32 MSR_ | MSR_PR | MSR_EE | MSR_DE
27#define MSR_USER64 MSR_USER32 | MSR_CM 33#define MSR_USER64 MSR_USER32 | MSR_CM | MSR_DE
28#elif defined (CONFIG_40x) 34#elif defined (CONFIG_40x)
29#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)
30#define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) 36#define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE)
@@ -56,6 +62,7 @@
56#define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ 62#define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */
57#define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ 63#define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */
58#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 */
59#define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ 66#define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */
60#define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ 67#define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */
61#define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ 68#define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */
@@ -88,6 +95,7 @@
88#define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */ 95#define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */
89#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */ 96#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */
90#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */ 97#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */
98#define SPRN_MCARU 0x239 /* Machine Check Address Register Upper */
91#define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */ 99#define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */
92#define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */ 100#define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */
93#define SPRN_MCSR 0x23C /* Machine Check Status Register */ 101#define SPRN_MCSR 0x23C /* Machine Check Status Register */
@@ -196,8 +204,11 @@
196#define PPC47x_MCSR_IPR 0x00400000 /* Imprecise Machine Check Exception */ 204#define PPC47x_MCSR_IPR 0x00400000 /* Imprecise Machine Check Exception */
197 205
198#ifdef CONFIG_E500 206#ifdef CONFIG_E500
207/* All e500 */
199#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ 208#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
200#define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ 209#define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */
210
211/* e500v1/v2 */
201#define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */ 212#define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */
202#define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */ 213#define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */
203#define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */ 214#define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */
@@ -209,12 +220,20 @@
209#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */ 220#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */
210#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */ 221#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */
211 222
212/* e500 parts may set unused bits in MCSR; mask these off */ 223/* e500mc */
213#define MCSR_MASK (MCSR_MCP | MCSR_ICPERR | MCSR_DCP_PERR | \ 224#define MCSR_DCPERR_MC 0x20000000UL /* D-Cache Parity Error */
214 MCSR_DCPERR | MCSR_BUS_IAERR | MCSR_BUS_RAERR | \ 225#define MCSR_L2MMU_MHIT 0x04000000UL /* Hit on multiple TLB entries */
215 MCSR_BUS_WAERR | MCSR_BUS_IBERR | MCSR_BUS_RBERR | \ 226#define MCSR_NMI 0x00100000UL /* Non-Maskable Interrupt */
216 MCSR_BUS_WBERR | MCSR_BUS_IPERR | MCSR_BUS_RPERR) 227#define MCSR_MAV 0x00080000UL /* MCAR address valid */
228#define MCSR_MEA 0x00040000UL /* MCAR is effective address */
229#define MCSR_IF 0x00010000UL /* Instruction Fetch */
230#define MCSR_LD 0x00008000UL /* Load */
231#define MCSR_ST 0x00004000UL /* Store */
232#define MCSR_LDG 0x00002000UL /* Guarded Load */
233#define MCSR_TLBSYNC 0x00000002UL /* Multiple tlbsyncs detected */
234#define MCSR_BSL2_ERR 0x00000001UL /* Backside L2 cache error */
217#endif 235#endif
236
218#ifdef CONFIG_E200 237#ifdef CONFIG_E200
219#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ 238#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
220#define MCSR_CP_PERR 0x20000000UL /* Cache Push Parity Error */ 239#define MCSR_CP_PERR 0x20000000UL /* Cache Push Parity Error */
@@ -225,11 +244,6 @@
225#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */ 244#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */
226#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered 245#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered
227 store or cache line push */ 246 store or cache line push */
228
229/* e200 parts may set unused bits in MCSR; mask these off */
230#define MCSR_MASK (MCSR_MCP | MCSR_CP_PERR | MCSR_CPERR | \
231 MCSR_EXCP_ERR | MCSR_BUS_IRERR | MCSR_BUS_DRERR | \
232 MCSR_BUS_WRERR)
233#endif 247#endif
234 248
235/* Bit definitions for the DBSR. */ 249/* Bit definitions for the DBSR. */
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
66struct 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
140struct rtas_error_log { 151struct 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);
174extern int rtas_set_indicator_fast(int indicator, int index, int new_value); 185extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
175extern void rtas_progress(char *s, unsigned short hex); 186extern void rtas_progress(char *s, unsigned short hex);
176extern void rtas_initialize(void); 187extern void rtas_initialize(void);
188extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
189extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
177 190
178struct rtc_time; 191struct rtc_time;
179extern unsigned long rtas_get_boot_time(void); 192extern unsigned long rtas_get_boot_time(void);
diff --git a/arch/powerpc/include/asm/scatterlist.h b/arch/powerpc/include/asm/scatterlist.h
index 34cc78fd0ef4..de1f620bd5c9 100644
--- a/arch/powerpc/include/asm/scatterlist.h
+++ b/arch/powerpc/include/asm/scatterlist.h
@@ -12,9 +12,6 @@
12#include <asm/dma.h> 12#include <asm/dma.h>
13#include <asm-generic/scatterlist.h> 13#include <asm-generic/scatterlist.h>
14 14
15#ifdef __powerpc64__
16#define ISA_DMA_THRESHOLD (~0UL)
17#endif
18#define ARCH_HAS_SG_CHAIN 15#define ARCH_HAS_SG_CHAIN
19 16
20#endif /* _ASM_POWERPC_SCATTERLIST_H */ 17#endif /* _ASM_POWERPC_SCATTERLIST_H */
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 */
458extern int smu_init(void); 458extern int smu_init(void);
459extern int smu_present(void); 459extern int smu_present(void);
460struct of_device; 460struct platform_device;
461extern struct of_device *smu_get_ofdev(void); 461extern struct platform_device *smu_get_ofdev(void);
462 462
463 463
464/* 464/*
diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h
index a6297c67c3d6..6c294acac848 100644
--- a/arch/powerpc/include/asm/system.h
+++ b/arch/powerpc/include/asm/system.h
@@ -515,11 +515,8 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
515 * powers of 2 writes until it reaches sufficient alignment). 515 * powers of 2 writes until it reaches sufficient alignment).
516 * 516 *
517 * Based on this we disable the IP header alignment in network drivers. 517 * Based on this we disable the IP header alignment in network drivers.
518 * We also modify NET_SKB_PAD to be a cacheline in size, thus maintaining
519 * cacheline alignment of buffers.
520 */ 518 */
521#define NET_IP_ALIGN 0 519#define NET_IP_ALIGN 0
522#define NET_SKB_PAD L1_CACHE_BYTES
523 520
524#define cmpxchg64(ptr, o, n) \ 521#define cmpxchg64(ptr, o, n) \
525 ({ \ 522 ({ \
diff --git a/arch/powerpc/include/asm/termbits.h b/arch/powerpc/include/asm/termbits.h
index 6698188ca550..549d700e18f2 100644
--- a/arch/powerpc/include/asm/termbits.h
+++ b/arch/powerpc/include/asm/termbits.h
@@ -189,6 +189,7 @@ struct ktermios {
189#define FLUSHO 0x00800000 189#define FLUSHO 0x00800000
190#define PENDIN 0x20000000 190#define PENDIN 0x20000000
191#define IEXTEN 0x00000400 191#define IEXTEN 0x00000400
192#define EXTPROC 0x10000000
192 193
193/* Values for the ACTION argument to `tcflow'. */ 194/* Values for the ACTION argument to `tcflow'. */
194#define TCOOFF 0 195#define TCOOFF 0
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 @@
28extern unsigned long tb_ticks_per_jiffy; 28extern unsigned long tb_ticks_per_jiffy;
29extern unsigned long tb_ticks_per_usec; 29extern unsigned long tb_ticks_per_usec;
30extern unsigned long tb_ticks_per_sec; 30extern unsigned long tb_ticks_per_sec;
31extern u64 tb_to_xs;
32extern unsigned tb_to_us;
33 31
34struct rtc_time; 32struct rtc_time;
35extern void to_tm(int tim, struct rtc_time * tm); 33extern void to_tm(int tim, struct rtc_time * tm);
36extern void GregorianDay(struct rtc_time *tm); 34extern void GregorianDay(struct rtc_time *tm);
37extern time_t last_rtc_update;
38 35
39extern void generic_calibrate_decr(void); 36extern void generic_calibrate_decr(void);
40extern void wakeup_decrementer(void);
41extern void snapshot_timebase(void); 37extern void snapshot_timebase(void);
42 38
43extern void set_dec_cpu6(unsigned int val); 39extern void set_dec_cpu6(unsigned int val);
@@ -204,9 +200,6 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp)
204extern u64 mulhdu(u64, u64); 200extern u64 mulhdu(u64, u64);
205#endif 201#endif
206 202
207extern void smp_space_timers(unsigned int);
208
209extern unsigned mulhwu_scale_factor(unsigned, unsigned);
210extern void div128_by_32(u64 dividend_high, u64 dividend_low, 203extern 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
44int of_node_to_nid(struct device_node *device);
45
46struct pci_bus; 44struct pci_bus;
47#ifdef CONFIG_PCI 45#ifdef CONFIG_PCI
48extern int pcibus_to_node(struct pci_bus *bus); 46extern 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
88extern int __node_distance(int, int);
89#define node_distance(a, b) __node_distance(a, b)
90
90extern void __init dump_numa_cpu_topology(void); 91extern void __init dump_numa_cpu_topology(void);
91 92
92extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); 93extern 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
97static inline int of_node_to_nid(struct device_node *device)
98{
99 return 0;
100}
101
102static inline void dump_numa_cpu_topology(void) {} 98static inline void dump_numa_cpu_topology(void) {}
103 99
104static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) 100static 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 */