aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/abs_addr.h73
-rw-r--r--include/asm-ppc64/cache.h36
-rw-r--r--include/asm-ppc64/cacheflush.h48
-rw-r--r--include/asm-ppc64/compat.h205
-rw-r--r--include/asm-ppc64/current.h16
-rw-r--r--include/asm-ppc64/eeh.h46
-rw-r--r--include/asm-ppc64/hvcall.h173
-rw-r--r--include/asm-ppc64/lppaca.h132
-rw-r--r--include/asm-ppc64/mmu.h6
-rw-r--r--include/asm-ppc64/mmzone.h65
-rw-r--r--include/asm-ppc64/paca.h121
-rw-r--r--include/asm-ppc64/page.h7
-rw-r--r--include/asm-ppc64/pci-bridge.h1
-rw-r--r--include/asm-ppc64/pgalloc.h4
-rw-r--r--include/asm-ppc64/prom.h2
-rw-r--r--include/asm-ppc64/signal.h132
-rw-r--r--include/asm-ppc64/system.h2
-rw-r--r--include/asm-ppc64/systemcfg.h64
-rw-r--r--include/asm-ppc64/tce.h64
-rw-r--r--include/asm-ppc64/udbg.h31
-rw-r--r--include/asm-ppc64/vdso.h83
21 files changed, 30 insertions, 1281 deletions
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h
deleted file mode 100644
index dc3fc3fefef2..000000000000
--- a/include/asm-ppc64/abs_addr.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef _ABS_ADDR_H
2#define _ABS_ADDR_H
3
4#include <linux/config.h>
5
6/*
7 * c 2001 PPC 64 Team, IBM Corp
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 */
14
15#include <asm/types.h>
16#include <asm/page.h>
17#include <asm/prom.h>
18#include <asm/lmb.h>
19#include <asm/firmware.h>
20
21struct mschunks_map {
22 unsigned long num_chunks;
23 unsigned long chunk_size;
24 unsigned long chunk_shift;
25 unsigned long chunk_mask;
26 u32 *mapping;
27};
28
29extern struct mschunks_map mschunks_map;
30
31/* Chunks are 256 KB */
32#define MSCHUNKS_CHUNK_SHIFT (18)
33#define MSCHUNKS_CHUNK_SIZE (1UL << MSCHUNKS_CHUNK_SHIFT)
34#define MSCHUNKS_OFFSET_MASK (MSCHUNKS_CHUNK_SIZE - 1)
35
36static inline unsigned long chunk_to_addr(unsigned long chunk)
37{
38 return chunk << MSCHUNKS_CHUNK_SHIFT;
39}
40
41static inline unsigned long addr_to_chunk(unsigned long addr)
42{
43 return addr >> MSCHUNKS_CHUNK_SHIFT;
44}
45
46static inline unsigned long phys_to_abs(unsigned long pa)
47{
48 unsigned long chunk;
49
50 /* This is a no-op on non-iSeries */
51 if (!firmware_has_feature(FW_FEATURE_ISERIES))
52 return pa;
53
54 chunk = addr_to_chunk(pa);
55
56 if (chunk < mschunks_map.num_chunks)
57 chunk = mschunks_map.mapping[chunk];
58
59 return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK);
60}
61
62/* Convenience macros */
63#define virt_to_abs(va) phys_to_abs(__pa(va))
64#define abs_to_virt(aa) __va(aa)
65
66/*
67 * Converts Virtual Address to Real Address for
68 * Legacy iSeries Hypervisor calls
69 */
70#define iseries_hv_addr(virtaddr) \
71 (0x8000000000000000 | virt_to_abs(virtaddr))
72
73#endif /* _ABS_ADDR_H */
diff --git a/include/asm-ppc64/cache.h b/include/asm-ppc64/cache.h
deleted file mode 100644
index 92140a7efbd1..000000000000
--- a/include/asm-ppc64/cache.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 */
7#ifndef __ARCH_PPC64_CACHE_H
8#define __ARCH_PPC64_CACHE_H
9
10#include <asm/types.h>
11
12/* bytes per L1 cache line */
13#define L1_CACHE_SHIFT 7
14#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
15
16#define SMP_CACHE_BYTES L1_CACHE_BYTES
17#define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */
18
19#ifndef __ASSEMBLY__
20
21struct ppc64_caches {
22 u32 dsize; /* L1 d-cache size */
23 u32 dline_size; /* L1 d-cache line size */
24 u32 log_dline_size;
25 u32 dlines_per_page;
26 u32 isize; /* L1 i-cache size */
27 u32 iline_size; /* L1 i-cache line size */
28 u32 log_iline_size;
29 u32 ilines_per_page;
30};
31
32extern struct ppc64_caches ppc64_caches;
33
34#endif
35
36#endif
diff --git a/include/asm-ppc64/cacheflush.h b/include/asm-ppc64/cacheflush.h
deleted file mode 100644
index ffbc08be8e52..000000000000
--- a/include/asm-ppc64/cacheflush.h
+++ /dev/null
@@ -1,48 +0,0 @@
1#ifndef _PPC64_CACHEFLUSH_H
2#define _PPC64_CACHEFLUSH_H
3
4#include <linux/mm.h>
5#include <asm/cputable.h>
6
7/*
8 * No cache flushing is required when address mappings are
9 * changed, because the caches on PowerPCs are physically
10 * addressed.
11 */
12#define flush_cache_all() do { } while (0)
13#define flush_cache_mm(mm) do { } while (0)
14#define flush_cache_range(vma, start, end) do { } while (0)
15#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
16#define flush_icache_page(vma, page) do { } while (0)
17#define flush_cache_vmap(start, end) do { } while (0)
18#define flush_cache_vunmap(start, end) do { } while (0)
19
20extern void flush_dcache_page(struct page *page);
21#define flush_dcache_mmap_lock(mapping) do { } while (0)
22#define flush_dcache_mmap_unlock(mapping) do { } while (0)
23
24extern void __flush_icache_range(unsigned long, unsigned long);
25extern void flush_icache_user_range(struct vm_area_struct *vma,
26 struct page *page, unsigned long addr,
27 int len);
28
29extern void flush_dcache_range(unsigned long start, unsigned long stop);
30extern void flush_dcache_phys_range(unsigned long start, unsigned long stop);
31extern void flush_inval_dcache_range(unsigned long start, unsigned long stop);
32
33#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
34do { memcpy(dst, src, len); \
35 flush_icache_user_range(vma, page, vaddr, len); \
36} while (0)
37#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
38 memcpy(dst, src, len)
39
40extern void __flush_dcache_icache(void *page_va);
41
42static inline void flush_icache_range(unsigned long start, unsigned long stop)
43{
44 if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
45 __flush_icache_range(start, stop);
46}
47
48#endif /* _PPC64_CACHEFLUSH_H */
diff --git a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h
deleted file mode 100644
index 6ec62cd2d1d1..000000000000
--- a/include/asm-ppc64/compat.h
+++ /dev/null
@@ -1,205 +0,0 @@
1#ifndef _ASM_PPC64_COMPAT_H
2#define _ASM_PPC64_COMPAT_H
3/*
4 * Architecture specific compatibility types
5 */
6#include <linux/types.h>
7#include <linux/sched.h>
8
9#define COMPAT_USER_HZ 100
10
11typedef u32 compat_size_t;
12typedef s32 compat_ssize_t;
13typedef s32 compat_time_t;
14typedef s32 compat_clock_t;
15typedef s32 compat_pid_t;
16typedef u32 __compat_uid_t;
17typedef u32 __compat_gid_t;
18typedef u32 __compat_uid32_t;
19typedef u32 __compat_gid32_t;
20typedef u32 compat_mode_t;
21typedef u32 compat_ino_t;
22typedef u32 compat_dev_t;
23typedef s32 compat_off_t;
24typedef s64 compat_loff_t;
25typedef s16 compat_nlink_t;
26typedef u16 compat_ipc_pid_t;
27typedef s32 compat_daddr_t;
28typedef u32 compat_caddr_t;
29typedef __kernel_fsid_t compat_fsid_t;
30typedef s32 compat_key_t;
31typedef s32 compat_timer_t;
32
33typedef s32 compat_int_t;
34typedef s32 compat_long_t;
35typedef u32 compat_uint_t;
36typedef u32 compat_ulong_t;
37
38struct compat_timespec {
39 compat_time_t tv_sec;
40 s32 tv_nsec;
41};
42
43struct compat_timeval {
44 compat_time_t tv_sec;
45 s32 tv_usec;
46};
47
48struct compat_stat {
49 compat_dev_t st_dev;
50 compat_ino_t st_ino;
51 compat_mode_t st_mode;
52 compat_nlink_t st_nlink;
53 __compat_uid32_t st_uid;
54 __compat_gid32_t st_gid;
55 compat_dev_t st_rdev;
56 compat_off_t st_size;
57 compat_off_t st_blksize;
58 compat_off_t st_blocks;
59 compat_time_t st_atime;
60 u32 st_atime_nsec;
61 compat_time_t st_mtime;
62 u32 st_mtime_nsec;
63 compat_time_t st_ctime;
64 u32 st_ctime_nsec;
65 u32 __unused4[2];
66};
67
68struct compat_flock {
69 short l_type;
70 short l_whence;
71 compat_off_t l_start;
72 compat_off_t l_len;
73 compat_pid_t l_pid;
74};
75
76#define F_GETLK64 12 /* using 'struct flock64' */
77#define F_SETLK64 13
78#define F_SETLKW64 14
79
80struct compat_flock64 {
81 short l_type;
82 short l_whence;
83 compat_loff_t l_start;
84 compat_loff_t l_len;
85 compat_pid_t l_pid;
86};
87
88struct compat_statfs {
89 int f_type;
90 int f_bsize;
91 int f_blocks;
92 int f_bfree;
93 int f_bavail;
94 int f_files;
95 int f_ffree;
96 compat_fsid_t f_fsid;
97 int f_namelen; /* SunOS ignores this field. */
98 int f_frsize;
99 int f_spare[5];
100};
101
102#define COMPAT_RLIM_OLD_INFINITY 0x7fffffff
103#define COMPAT_RLIM_INFINITY 0xffffffff
104
105typedef u32 compat_old_sigset_t;
106
107#define _COMPAT_NSIG 64
108#define _COMPAT_NSIG_BPW 32
109
110typedef u32 compat_sigset_word;
111
112#define COMPAT_OFF_T_MAX 0x7fffffff
113#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
114
115/*
116 * A pointer passed in from user mode. This should not
117 * be used for syscall parameters, just declare them
118 * as pointers because the syscall entry code will have
119 * appropriately comverted them already.
120 */
121typedef u32 compat_uptr_t;
122
123static inline void __user *compat_ptr(compat_uptr_t uptr)
124{
125 return (void __user *)(unsigned long)uptr;
126}
127
128static inline void __user *compat_alloc_user_space(long len)
129{
130 struct pt_regs *regs = current->thread.regs;
131 unsigned long usp = regs->gpr[1];
132
133 /*
134 * We cant access below the stack pointer in the 32bit ABI and
135 * can access 288 bytes in the 64bit ABI
136 */
137 if (!(test_thread_flag(TIF_32BIT)))
138 usp -= 288;
139
140 return (void __user *) (usp - len);
141}
142
143/*
144 * ipc64_perm is actually 32/64bit clean but since the compat layer refers to
145 * it we may as well define it.
146 */
147struct compat_ipc64_perm {
148 compat_key_t key;
149 __compat_uid_t uid;
150 __compat_gid_t gid;
151 __compat_uid_t cuid;
152 __compat_gid_t cgid;
153 compat_mode_t mode;
154 unsigned int seq;
155 unsigned int __pad2;
156 unsigned long __unused1; /* yes they really are 64bit pads */
157 unsigned long __unused2;
158};
159
160struct compat_semid64_ds {
161 struct compat_ipc64_perm sem_perm;
162 unsigned int __unused1;
163 compat_time_t sem_otime;
164 unsigned int __unused2;
165 compat_time_t sem_ctime;
166 compat_ulong_t sem_nsems;
167 compat_ulong_t __unused3;
168 compat_ulong_t __unused4;
169};
170
171struct compat_msqid64_ds {
172 struct compat_ipc64_perm msg_perm;
173 unsigned int __unused1;
174 compat_time_t msg_stime;
175 unsigned int __unused2;
176 compat_time_t msg_rtime;
177 unsigned int __unused3;
178 compat_time_t msg_ctime;
179 compat_ulong_t msg_cbytes;
180 compat_ulong_t msg_qnum;
181 compat_ulong_t msg_qbytes;
182 compat_pid_t msg_lspid;
183 compat_pid_t msg_lrpid;
184 compat_ulong_t __unused4;
185 compat_ulong_t __unused5;
186};
187
188struct compat_shmid64_ds {
189 struct compat_ipc64_perm shm_perm;
190 unsigned int __unused1;
191 compat_time_t shm_atime;
192 unsigned int __unused2;
193 compat_time_t shm_dtime;
194 unsigned int __unused3;
195 compat_time_t shm_ctime;
196 unsigned int __unused4;
197 compat_size_t shm_segsz;
198 compat_pid_t shm_cpid;
199 compat_pid_t shm_lpid;
200 compat_ulong_t shm_nattch;
201 compat_ulong_t __unused5;
202 compat_ulong_t __unused6;
203};
204
205#endif /* _ASM_PPC64_COMPAT_H */
diff --git a/include/asm-ppc64/current.h b/include/asm-ppc64/current.h
deleted file mode 100644
index 52ddc60c8b65..000000000000
--- a/include/asm-ppc64/current.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _PPC64_CURRENT_H
2#define _PPC64_CURRENT_H
3
4#include <asm/paca.h>
5
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#define get_current() (get_paca()->__current)
14#define current get_current()
15
16#endif /* !(_PPC64_CURRENT_H) */
diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h
index 40c8eb57493e..89f26ab31908 100644
--- a/include/asm-ppc64/eeh.h
+++ b/include/asm-ppc64/eeh.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * eeh.h 2 * eeh.h
3 * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation. 3 * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation.
4 * 4 *
@@ -6,12 +6,12 @@
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -27,8 +27,6 @@
27 27
28struct pci_dev; 28struct pci_dev;
29struct device_node; 29struct device_node;
30struct device_node;
31struct notifier_block;
32 30
33#ifdef CONFIG_EEH 31#ifdef CONFIG_EEH
34 32
@@ -37,6 +35,10 @@ struct notifier_block;
37#define EEH_MODE_NOCHECK (1<<1) 35#define EEH_MODE_NOCHECK (1<<1)
38#define EEH_MODE_ISOLATED (1<<2) 36#define EEH_MODE_ISOLATED (1<<2)
39 37
38/* Max number of EEH freezes allowed before we consider the device
39 * to be permanently disabled. */
40#define EEH_MAX_ALLOWED_FREEZES 5
41
40void __init eeh_init(void); 42void __init eeh_init(void);
41unsigned long eeh_check_failure(const volatile void __iomem *token, 43unsigned long eeh_check_failure(const volatile void __iomem *token,
42 unsigned long val); 44 unsigned long val);
@@ -59,36 +61,14 @@ void eeh_add_device_late(struct pci_dev *);
59 * eeh_remove_device - undo EEH setup for the indicated pci device 61 * eeh_remove_device - undo EEH setup for the indicated pci device
60 * @dev: pci device to be removed 62 * @dev: pci device to be removed
61 * 63 *
62 * This routine should be when a device is removed from a running 64 * This routine should be called when a device is removed from
63 * system (e.g. by hotplug or dlpar). 65 * a running system (e.g. by hotplug or dlpar). It unregisters
66 * the PCI device from the EEH subsystem. I/O errors affecting
67 * this device will no longer be detected after this call; thus,
68 * i/o errors affecting this slot may leave this device unusable.
64 */ 69 */
65void eeh_remove_device(struct pci_dev *); 70void eeh_remove_device(struct pci_dev *);
66 71
67#define EEH_DISABLE 0
68#define EEH_ENABLE 1
69#define EEH_RELEASE_LOADSTORE 2
70#define EEH_RELEASE_DMA 3
71
72/**
73 * Notifier event flags.
74 */
75#define EEH_NOTIFY_FREEZE 1
76
77/** EEH event -- structure holding pci slot data that describes
78 * a change in the isolation status of a PCI slot. A pointer
79 * to this struct is passed as the data pointer in a notify callback.
80 */
81struct eeh_event {
82 struct list_head list;
83 struct pci_dev *dev;
84 struct device_node *dn;
85 int reset_state;
86};
87
88/** Register to find out about EEH events. */
89int eeh_register_notifier(struct notifier_block *nb);
90int eeh_unregister_notifier(struct notifier_block *nb);
91
92/** 72/**
93 * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. 73 * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
94 * 74 *
@@ -129,7 +109,7 @@ static inline void eeh_remove_device(struct pci_dev *dev) { }
129#define EEH_IO_ERROR_VALUE(size) (-1UL) 109#define EEH_IO_ERROR_VALUE(size) (-1UL)
130#endif /* CONFIG_EEH */ 110#endif /* CONFIG_EEH */
131 111
132/* 112/*
133 * MMIO read/write operations with EEH support. 113 * MMIO read/write operations with EEH support.
134 */ 114 */
135static inline u8 eeh_readb(const volatile void __iomem *addr) 115static inline u8 eeh_readb(const volatile void __iomem *addr)
diff --git a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h
deleted file mode 100644
index ab7c3cf24888..000000000000
--- a/include/asm-ppc64/hvcall.h
+++ /dev/null
@@ -1,173 +0,0 @@
1#ifndef _PPC64_HVCALL_H
2#define _PPC64_HVCALL_H
3
4#define HVSC .long 0x44000022
5
6#define H_Success 0
7#define H_Busy 1 /* Hardware busy -- retry later */
8#define H_Constrained 4 /* Resource request constrained to max allowed */
9#define H_LongBusyStartRange 9900 /* Start of long busy range */
10#define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */
11#define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */
12#define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */
13#define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */
14#define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */
15#define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */
16#define H_LongBusyEndRange 9905 /* End of long busy range */
17#define H_Hardware -1 /* Hardware error */
18#define H_Function -2 /* Function not supported */
19#define H_Privilege -3 /* Caller not privileged */
20#define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */
21#define H_Bad_Mode -5 /* Illegal msr value */
22#define H_PTEG_Full -6 /* PTEG is full */
23#define H_Not_Found -7 /* PTE was not found" */
24#define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */
25#define H_NoMem -9
26#define H_Authority -10
27#define H_Permission -11
28#define H_Dropped -12
29#define H_SourceParm -13
30#define H_DestParm -14
31#define H_RemoteParm -15
32#define H_Resource -16
33
34/* Long Busy is a condition that can be returned by the firmware
35 * when a call cannot be completed now, but the identical call
36 * should be retried later. This prevents calls blocking in the
37 * firmware for long periods of time. Annoyingly the firmware can return
38 * a range of return codes, hinting at how long we should wait before
39 * retrying. If you don't care for the hint, the macro below is a good
40 * way to check for the long_busy return codes
41 */
42#define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange))
43
44/* Flags */
45#define H_LARGE_PAGE (1UL<<(63-16))
46#define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */
47#define H_R_XLATE (1UL<<(63-25)) /* include a valid logical page num in the pte if the valid bit is set */
48#define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */
49#define H_AVPN (1UL<<(63-32)) /* An avpn is provided as a sanity test */
50#define H_ANDCOND (1UL<<(63-33))
51#define H_ICACHE_INVALIDATE (1UL<<(63-40)) /* icbi, etc. (ignored for IO pages) */
52#define H_ICACHE_SYNCHRONIZE (1UL<<(63-41)) /* dcbst, icbi, etc (ignored for IO pages */
53#define H_ZERO_PAGE (1UL<<(63-48)) /* zero the page before mapping (ignored for IO pages) */
54#define H_COPY_PAGE (1UL<<(63-49))
55#define H_N (1UL<<(63-61))
56#define H_PP1 (1UL<<(63-62))
57#define H_PP2 (1UL<<(63-63))
58
59/* DABRX flags */
60#define H_DABRX_HYPERVISOR (1UL<<(63-61))
61#define H_DABRX_KERNEL (1UL<<(63-62))
62#define H_DABRX_USER (1UL<<(63-63))
63
64/* pSeries hypervisor opcodes */
65#define H_REMOVE 0x04
66#define H_ENTER 0x08
67#define H_READ 0x0c
68#define H_CLEAR_MOD 0x10
69#define H_CLEAR_REF 0x14
70#define H_PROTECT 0x18
71#define H_GET_TCE 0x1c
72#define H_PUT_TCE 0x20
73#define H_SET_SPRG0 0x24
74#define H_SET_DABR 0x28
75#define H_PAGE_INIT 0x2c
76#define H_SET_ASR 0x30
77#define H_ASR_ON 0x34
78#define H_ASR_OFF 0x38
79#define H_LOGICAL_CI_LOAD 0x3c
80#define H_LOGICAL_CI_STORE 0x40
81#define H_LOGICAL_CACHE_LOAD 0x44
82#define H_LOGICAL_CACHE_STORE 0x48
83#define H_LOGICAL_ICBI 0x4c
84#define H_LOGICAL_DCBF 0x50
85#define H_GET_TERM_CHAR 0x54
86#define H_PUT_TERM_CHAR 0x58
87#define H_REAL_TO_LOGICAL 0x5c
88#define H_HYPERVISOR_DATA 0x60
89#define H_EOI 0x64
90#define H_CPPR 0x68
91#define H_IPI 0x6c
92#define H_IPOLL 0x70
93#define H_XIRR 0x74
94#define H_PERFMON 0x7c
95#define H_MIGRATE_DMA 0x78
96#define H_REGISTER_VPA 0xDC
97#define H_CEDE 0xE0
98#define H_CONFER 0xE4
99#define H_PROD 0xE8
100#define H_GET_PPP 0xEC
101#define H_SET_PPP 0xF0
102#define H_PURR 0xF4
103#define H_PIC 0xF8
104#define H_REG_CRQ 0xFC
105#define H_FREE_CRQ 0x100
106#define H_VIO_SIGNAL 0x104
107#define H_SEND_CRQ 0x108
108#define H_COPY_RDMA 0x110
109#define H_SET_XDABR 0x134
110#define H_STUFF_TCE 0x138
111#define H_PUT_TCE_INDIRECT 0x13C
112#define H_VTERM_PARTNER_INFO 0x150
113#define H_REGISTER_VTERM 0x154
114#define H_FREE_VTERM 0x158
115#define H_POLL_PENDING 0x1D8
116
117#ifndef __ASSEMBLY__
118
119/* plpar_hcall() -- Generic call interface using above opcodes
120 *
121 * The actual call interface is a hypervisor call instruction with
122 * the opcode in R3 and input args in R4-R7.
123 * Status is returned in R3 with variable output values in R4-R11.
124 * Only H_PTE_READ with H_READ_4 uses R6-R11 so we ignore it for now
125 * and return only two out args which MUST ALWAYS BE PROVIDED.
126 */
127long plpar_hcall(unsigned long opcode,
128 unsigned long arg1,
129 unsigned long arg2,
130 unsigned long arg3,
131 unsigned long arg4,
132 unsigned long *out1,
133 unsigned long *out2,
134 unsigned long *out3);
135
136/* Same as plpar_hcall but for those opcodes that return no values
137 * other than status. Slightly more efficient.
138 */
139long plpar_hcall_norets(unsigned long opcode, ...);
140
141/*
142 * Special hcall interface for ibmveth support.
143 * Takes 8 input parms. Returns a rc and stores the
144 * R4 return value in *out1.
145 */
146long plpar_hcall_8arg_2ret(unsigned long opcode,
147 unsigned long arg1,
148 unsigned long arg2,
149 unsigned long arg3,
150 unsigned long arg4,
151 unsigned long arg5,
152 unsigned long arg6,
153 unsigned long arg7,
154 unsigned long arg8,
155 unsigned long *out1);
156
157/* plpar_hcall_4out()
158 *
159 * same as plpar_hcall except with 4 output arguments.
160 *
161 */
162long plpar_hcall_4out(unsigned long opcode,
163 unsigned long arg1,
164 unsigned long arg2,
165 unsigned long arg3,
166 unsigned long arg4,
167 unsigned long *out1,
168 unsigned long *out2,
169 unsigned long *out3,
170 unsigned long *out4);
171
172#endif /* __ASSEMBLY__ */
173#endif /* _PPC64_HVCALL_H */
diff --git a/include/asm-ppc64/lppaca.h b/include/asm-ppc64/lppaca.h
deleted file mode 100644
index 9e2a6c0649a0..000000000000
--- a/include/asm-ppc64/lppaca.h
+++ /dev/null
@@ -1,132 +0,0 @@
1/*
2 * lppaca.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef _ASM_LPPACA_H
20#define _ASM_LPPACA_H
21
22//=============================================================================
23//
24// This control block contains the data that is shared between the
25// hypervisor (PLIC) and the OS.
26//
27//
28//----------------------------------------------------------------------------
29#include <asm/types.h>
30
31struct lppaca
32{
33//=============================================================================
34// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
35// NOTE: The xDynXyz fields are fields that will be dynamically changed by
36// PLIC when preparing to bring a processor online or when dispatching a
37// virtual processor!
38//=============================================================================
39 u32 desc; // Eye catcher 0xD397D781 x00-x03
40 u16 size; // Size of this struct x04-x05
41 u16 reserved1; // Reserved x06-x07
42 u16 reserved2:14; // Reserved x08-x09
43 u8 shared_proc:1; // Shared processor indicator ...
44 u8 secondary_thread:1; // Secondary thread indicator ...
45 volatile u8 dyn_proc_status:8; // Dynamic Status of this proc x0A-x0A
46 u8 secondary_thread_count; // Secondary thread count x0B-x0B
47 volatile u16 dyn_hv_phys_proc_index;// Dynamic HV Physical Proc Index0C-x0D
48 volatile u16 dyn_hv_log_proc_index;// Dynamic HV Logical Proc Indexx0E-x0F
49 u32 decr_val; // Value for Decr programming x10-x13
50 u32 pmc_val; // Value for PMC regs x14-x17
51 volatile u32 dyn_hw_node_id; // Dynamic Hardware Node id x18-x1B
52 volatile u32 dyn_hw_proc_id; // Dynamic Hardware Proc Id x1C-x1F
53 volatile u32 dyn_pir; // Dynamic ProcIdReg value x20-x23
54 u32 dsei_data; // DSEI data x24-x27
55 u64 sprg3; // SPRG3 value x28-x2F
56 u8 reserved3[80]; // Reserved x30-x7F
57
58//=============================================================================
59// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
60//=============================================================================
61 // This Dword contains a byte for each type of interrupt that can occur.
62 // The IPI is a count while the others are just a binary 1 or 0.
63 union {
64 u64 any_int;
65 struct {
66 u16 reserved; // Reserved - cleared by #mpasmbl
67 u8 xirr_int; // Indicates xXirrValue is valid or Immed IO
68 u8 ipi_cnt; // IPI Count
69 u8 decr_int; // DECR interrupt occurred
70 u8 pdc_int; // PDC interrupt occurred
71 u8 quantum_int; // Interrupt quantum reached
72 u8 old_plic_deferred_ext_int; // Old PLIC has a deferred XIRR pending
73 } fields;
74 } int_dword;
75
76 // Whenever any fields in this Dword are set then PLIC will defer the
77 // processing of external interrupts. Note that PLIC will store the
78 // XIRR directly into the xXirrValue field so that another XIRR will
79 // not be presented until this one clears. The layout of the low
80 // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the
81 // entire Dword is zero or not. A non-zero value in the low order
82 // 2-bytes will result in SLIC being granted the highest thread
83 // priority upon return. A 0 will return to SLIC as medium priority.
84 u64 plic_defer_ints_area; // Entire Dword
85
86 // Used to pass the real SRR0/1 from PLIC to SLIC as well as to
87 // pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid.
88 u64 saved_srr0; // Saved SRR0 x10-x17
89 u64 saved_srr1; // Saved SRR1 x18-x1F
90
91 // Used to pass parms from the OS to PLIC for SetAsrAndRfid
92 u64 saved_gpr3; // Saved GPR3 x20-x27
93 u64 saved_gpr4; // Saved GPR4 x28-x2F
94 u64 saved_gpr5; // Saved GPR5 x30-x37
95
96 u8 reserved4; // Reserved x38-x38
97 u8 cpuctls_task_attrs; // Task attributes for cpuctls x39-x39
98 u8 fpregs_in_use; // FP regs in use x3A-x3A
99 u8 pmcregs_in_use; // PMC regs in use x3B-x3B
100 volatile u32 saved_decr; // Saved Decr Value x3C-x3F
101 volatile u64 emulated_time_base;// Emulated TB for this thread x40-x47
102 volatile u64 cur_plic_latency; // Unaccounted PLIC latency x48-x4F
103 u64 tot_plic_latency; // Accumulated PLIC latency x50-x57
104 u64 wait_state_cycles; // Wait cycles for this proc x58-x5F
105 u64 end_of_quantum; // TB at end of quantum x60-x67
106 u64 pdc_saved_sprg1; // Saved SPRG1 for PMC int x68-x6F
107 u64 pdc_saved_srr0; // Saved SRR0 for PMC int x70-x77
108 volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B
109 u16 slb_count; // # of SLBs to maintain x7C-x7D
110 u8 idle; // Indicate OS is idle x7E
111 u8 vmxregs_in_use; // VMX registers in use x7F
112
113
114//=============================================================================
115// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors
116//=============================================================================
117 // This is the yield_count. An "odd" value (low bit on) means that
118 // the processor is yielded (either because of an OS yield or a PLIC
119 // preempt). An even value implies that the processor is currently
120 // executing.
121 // NOTE: This value will ALWAYS be zero for dedicated processors and
122 // will NEVER be zero for shared processors (ie, initialized to a 1).
123 volatile u32 yield_count; // PLIC increments each dispatchx00-x03
124 u8 reserved6[124]; // Reserved x04-x7F
125
126//=============================================================================
127// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
128//=============================================================================
129 u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF
130};
131
132#endif /* _ASM_LPPACA_H */
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
index 4c18a5cb69f5..1a7e0afa2dc6 100644
--- a/include/asm-ppc64/mmu.h
+++ b/include/asm-ppc64/mmu.h
@@ -14,7 +14,7 @@
14#define _PPC64_MMU_H_ 14#define _PPC64_MMU_H_
15 15
16#include <linux/config.h> 16#include <linux/config.h>
17#include <asm/ppc_asm.h> /* for ASM_CONST */ 17#include <asm/asm-compat.h>
18#include <asm/page.h> 18#include <asm/page.h>
19 19
20/* 20/*
@@ -224,9 +224,12 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
224 unsigned long pstart, unsigned long mode, 224 unsigned long pstart, unsigned long mode,
225 int psize); 225 int psize);
226 226
227extern void htab_initialize(void);
228extern void htab_initialize_secondary(void);
227extern void hpte_init_native(void); 229extern void hpte_init_native(void);
228extern void hpte_init_lpar(void); 230extern void hpte_init_lpar(void);
229extern void hpte_init_iSeries(void); 231extern void hpte_init_iSeries(void);
232extern void mm_init_ppc64(void);
230 233
231extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, 234extern long pSeries_lpar_hpte_insert(unsigned long hpte_group,
232 unsigned long va, unsigned long prpn, 235 unsigned long va, unsigned long prpn,
@@ -245,6 +248,7 @@ extern long iSeries_hpte_insert(unsigned long hpte_group,
245 248
246extern void stabs_alloc(void); 249extern void stabs_alloc(void);
247extern void slb_initialize(void); 250extern void slb_initialize(void);
251extern void stab_initialize(unsigned long stab);
248 252
249#endif /* __ASSEMBLY__ */ 253#endif /* __ASSEMBLY__ */
250 254
diff --git a/include/asm-ppc64/mmzone.h b/include/asm-ppc64/mmzone.h
index 80a708e7093a..54958d6cae04 100644
--- a/include/asm-ppc64/mmzone.h
+++ b/include/asm-ppc64/mmzone.h
@@ -8,15 +8,14 @@
8#define _ASM_MMZONE_H_ 8#define _ASM_MMZONE_H_
9 9
10#include <linux/config.h> 10#include <linux/config.h>
11#include <asm/smp.h>
12 11
13/* generic non-linear memory support: 12/*
13 * generic non-linear memory support:
14 * 14 *
15 * 1) we will not split memory into more chunks than will fit into the 15 * 1) we will not split memory into more chunks than will fit into the
16 * flags field of the struct page 16 * flags field of the struct page
17 */ 17 */
18 18
19
20#ifdef CONFIG_NEED_MULTIPLE_NODES 19#ifdef CONFIG_NEED_MULTIPLE_NODES
21 20
22extern struct pglist_data *node_data[]; 21extern struct pglist_data *node_data[];
@@ -30,36 +29,11 @@ extern struct pglist_data *node_data[];
30 */ 29 */
31 30
32extern int numa_cpu_lookup_table[]; 31extern int numa_cpu_lookup_table[];
33extern char *numa_memory_lookup_table;
34extern cpumask_t numa_cpumask_lookup_table[]; 32extern cpumask_t numa_cpumask_lookup_table[];
35extern int nr_cpus_in_node[]; 33#ifdef CONFIG_MEMORY_HOTPLUG
36 34extern unsigned long max_pfn;
37/* 16MB regions */
38#define MEMORY_INCREMENT_SHIFT 24
39#define MEMORY_INCREMENT (1UL << MEMORY_INCREMENT_SHIFT)
40
41/* NUMA debugging, will not work on a DLPAR machine */
42#undef DEBUG_NUMA
43
44static inline int pa_to_nid(unsigned long pa)
45{
46 int nid;
47
48 nid = numa_memory_lookup_table[pa >> MEMORY_INCREMENT_SHIFT];
49
50#ifdef DEBUG_NUMA
51 /* the physical address passed in is not in the map for the system */
52 if (nid == -1) {
53 printk("bad address: %lx\n", pa);
54 BUG();
55 }
56#endif 35#endif
57 36
58 return nid;
59}
60
61#define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)
62
63/* 37/*
64 * Following are macros that each numa implmentation must define. 38 * Following are macros that each numa implmentation must define.
65 */ 39 */
@@ -67,39 +41,10 @@ static inline int pa_to_nid(unsigned long pa)
67#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) 41#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
68#define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn) 42#define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn)
69 43
70#ifdef CONFIG_DISCONTIGMEM
71
72/*
73 * Given a kernel address, find the home node of the underlying memory.
74 */
75#define kvaddr_to_nid(kaddr) pa_to_nid(__pa(kaddr))
76
77#define pfn_to_nid(pfn) pa_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
78
79/* Written this way to avoid evaluating arguments twice */
80#define discontigmem_pfn_to_page(pfn) \
81({ \
82 unsigned long __tmp = pfn; \
83 (NODE_DATA(pfn_to_nid(__tmp))->node_mem_map + \
84 node_localnr(__tmp, pfn_to_nid(__tmp))); \
85})
86
87#define discontigmem_page_to_pfn(p) \
88({ \
89 struct page *__tmp = p; \
90 (((__tmp) - page_zone(__tmp)->zone_mem_map) + \
91 page_zone(__tmp)->zone_start_pfn); \
92})
93
94/* XXX fix for discontiguous physical memory */
95#define discontigmem_pfn_valid(pfn) ((pfn) < num_physpages)
96
97#endif /* CONFIG_DISCONTIGMEM */
98
99#endif /* CONFIG_NEED_MULTIPLE_NODES */ 44#endif /* CONFIG_NEED_MULTIPLE_NODES */
100 45
101#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID 46#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
102#define early_pfn_to_nid(pfn) pa_to_nid(((unsigned long)pfn) << PAGE_SHIFT) 47extern int __init early_pfn_to_nid(unsigned long pfn);
103#endif 48#endif
104 49
105#endif /* _ASM_MMZONE_H_ */ 50#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h
deleted file mode 100644
index bccacd6aa93a..000000000000
--- a/include/asm-ppc64/paca.h
+++ /dev/null
@@ -1,121 +0,0 @@
1#ifndef _PPC64_PACA_H
2#define _PPC64_PACA_H
3
4/*
5 * include/asm-ppc64/paca.h
6 *
7 * This control block defines the PACA which defines the processor
8 * specific data for each logical processor on the system.
9 * There are some pointers defined that are utilized by PLIC.
10 *
11 * C 2001 PPC 64 Team, IBM Corp
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18
19#include <linux/config.h>
20#include <asm/types.h>
21#include <asm/lppaca.h>
22#include <asm/iseries/it_lp_reg_save.h>
23#include <asm/mmu.h>
24
25register struct paca_struct *local_paca asm("r13");
26#define get_paca() local_paca
27
28struct task_struct;
29
30/*
31 * Defines the layout of the paca.
32 *
33 * This structure is not directly accessed by firmware or the service
34 * processor except for the first two pointers that point to the
35 * lppaca area and the ItLpRegSave area for this CPU. Both the
36 * lppaca and ItLpRegSave objects are currently contained within the
37 * PACA but they do not need to be.
38 */
39struct paca_struct {
40 /*
41 * Because hw_cpu_id, unlike other paca fields, is accessed
42 * routinely from other CPUs (from the IRQ code), we stick to
43 * read-only (after boot) fields in the first cacheline to
44 * avoid cacheline bouncing.
45 */
46
47 /*
48 * MAGIC: These first two pointers can't be moved - they're
49 * accessed by the firmware
50 */
51 struct lppaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */
52 struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */
53
54 /*
55 * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c
56 * load lock_token and paca_index with a single lwz
57 * instruction. They must travel together and be properly
58 * aligned.
59 */
60 u16 lock_token; /* Constant 0x8000, used in locks */
61 u16 paca_index; /* Logical processor number */
62
63 u32 default_decr; /* Default decrementer value */
64 u64 kernel_toc; /* Kernel TOC address */
65 u64 stab_real; /* Absolute address of segment table */
66 u64 stab_addr; /* Virtual address of segment table */
67 void *emergency_sp; /* pointer to emergency stack */
68 s16 hw_cpu_id; /* Physical processor number */
69 u8 cpu_start; /* At startup, processor spins until */
70 /* this becomes non-zero. */
71
72 /*
73 * Now, starting in cacheline 2, the exception save areas
74 */
75 /* used for most interrupts/exceptions */
76 u64 exgen[10] __attribute__((aligned(0x80)));
77 u64 exmc[10]; /* used for machine checks */
78 u64 exslb[10]; /* used for SLB/segment table misses
79 * on the linear mapping */
80#ifdef CONFIG_PPC_64K_PAGES
81 pgd_t *pgdir;
82#endif /* CONFIG_PPC_64K_PAGES */
83
84 mm_context_t context;
85 u16 slb_cache[SLB_CACHE_ENTRIES];
86 u16 slb_cache_ptr;
87
88 /*
89 * then miscellaneous read-write fields
90 */
91 struct task_struct *__current; /* Pointer to current */
92 u64 kstack; /* Saved Kernel stack addr */
93 u64 stab_rr; /* stab/slb round-robin counter */
94 u64 next_jiffy_update_tb; /* TB value for next jiffy update */
95 u64 saved_r1; /* r1 save for RTAS calls */
96 u64 saved_msr; /* MSR saved here by enter_rtas */
97 u8 proc_enabled; /* irq soft-enable flag */
98
99 /* not yet used */
100 u64 exdsi[8]; /* used for linear mapping hash table misses */
101
102 /*
103 * iSeries structure which the hypervisor knows about -
104 * this structure should not cross a page boundary.
105 * The vpa_init/register_vpa call is now known to fail if the
106 * lppaca structure crosses a page boundary.
107 * The lppaca is also used on POWER5 pSeries boxes.
108 * The lppaca is 640 bytes long, and cannot readily change
109 * since the hypervisor knows its layout, so a 1kB
110 * alignment will suffice to ensure that it doesn't
111 * cross a page boundary.
112 */
113 struct lppaca lppaca __attribute__((__aligned__(0x400)));
114#ifdef CONFIG_PPC_ISERIES
115 struct ItLpRegSave reg_save;
116#endif
117};
118
119extern struct paca_struct paca[];
120
121#endif /* _PPC64_PACA_H */
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
index 82ce187e5be8..3efc3288f7e9 100644
--- a/include/asm-ppc64/page.h
+++ b/include/asm-ppc64/page.h
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include <linux/config.h> 13#include <linux/config.h>
14#include <asm/ppc_asm.h> /* for ASM_CONST */ 14#include <asm/asm-compat.h>
15 15
16/* 16/*
17 * We support either 4k or 64k software page size. When using 64k pages 17 * We support either 4k or 64k software page size. When using 64k pages
@@ -279,11 +279,6 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */
279 279
280#define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) 280#define __va(x) ((void *)((unsigned long)(x) + KERNELBASE))
281 281
282#ifdef CONFIG_DISCONTIGMEM
283#define page_to_pfn(page) discontigmem_page_to_pfn(page)
284#define pfn_to_page(pfn) discontigmem_pfn_to_page(pfn)
285#define pfn_valid(pfn) discontigmem_pfn_valid(pfn)
286#endif
287#ifdef CONFIG_FLATMEM 282#ifdef CONFIG_FLATMEM
288#define pfn_to_page(pfn) (mem_map + (pfn)) 283#define pfn_to_page(pfn) (mem_map + (pfn))
289#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) 284#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h
index 60cf8c838af0..efbdaece0cf0 100644
--- a/include/asm-ppc64/pci-bridge.h
+++ b/include/asm-ppc64/pci-bridge.h
@@ -63,7 +63,6 @@ struct pci_dn {
63 int devfn; /* for pci devices */ 63 int devfn; /* for pci devices */
64 int eeh_mode; /* See eeh.h for possible EEH_MODEs */ 64 int eeh_mode; /* See eeh.h for possible EEH_MODEs */
65 int eeh_config_addr; 65 int eeh_config_addr;
66 int eeh_capable; /* from firmware */
67 int eeh_check_count; /* # times driver ignored error */ 66 int eeh_check_count; /* # times driver ignored error */
68 int eeh_freeze_count; /* # times this device froze up. */ 67 int eeh_freeze_count; /* # times this device froze up. */
69 int eeh_is_bridge; /* device is pci-to-pci bridge */ 68 int eeh_is_bridge; /* device is pci-to-pci bridge */
diff --git a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h
index 98da0e4262bd..dcf3622d1946 100644
--- a/include/asm-ppc64/pgalloc.h
+++ b/include/asm-ppc64/pgalloc.h
@@ -10,8 +10,8 @@ extern kmem_cache_t *pgtable_cache[];
10 10
11#ifdef CONFIG_PPC_64K_PAGES 11#ifdef CONFIG_PPC_64K_PAGES
12#define PTE_CACHE_NUM 0 12#define PTE_CACHE_NUM 0
13#define PMD_CACHE_NUM 0 13#define PMD_CACHE_NUM 1
14#define PGD_CACHE_NUM 1 14#define PGD_CACHE_NUM 2
15#else 15#else
16#define PTE_CACHE_NUM 0 16#define PTE_CACHE_NUM 0
17#define PMD_CACHE_NUM 1 17#define PMD_CACHE_NUM 1
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
index 76bb0266d67c..ddfe186589fa 100644
--- a/include/asm-ppc64/prom.h
+++ b/include/asm-ppc64/prom.h
@@ -204,6 +204,8 @@ extern void of_detach_node(const struct device_node *);
204extern unsigned long prom_init(unsigned long, unsigned long, unsigned long, 204extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
205 unsigned long, unsigned long); 205 unsigned long, unsigned long);
206extern void finish_device_tree(void); 206extern void finish_device_tree(void);
207extern void unflatten_device_tree(void);
208extern void early_init_devtree(void *);
207extern int device_is_compatible(struct device_node *device, const char *); 209extern int device_is_compatible(struct device_node *device, const char *);
208extern int machine_is_compatible(const char *compat); 210extern int machine_is_compatible(const char *compat);
209extern unsigned char *get_property(struct device_node *node, const char *name, 211extern unsigned char *get_property(struct device_node *node, const char *name,
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h
deleted file mode 100644
index 432df7dd355d..000000000000
--- a/include/asm-ppc64/signal.h
+++ /dev/null
@@ -1,132 +0,0 @@
1#ifndef _ASMPPC64_SIGNAL_H
2#define _ASMPPC64_SIGNAL_H
3
4#include <linux/types.h>
5#include <linux/compiler.h>
6#include <asm/siginfo.h>
7
8/* Avoid too many header ordering problems. */
9struct siginfo;
10
11#define _NSIG 64
12#define _NSIG_BPW 64
13#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
14
15typedef unsigned long old_sigset_t; /* at least 32 bits */
16
17typedef struct {
18 unsigned long sig[_NSIG_WORDS];
19} sigset_t;
20
21#define SIGHUP 1
22#define SIGINT 2
23#define SIGQUIT 3
24#define SIGILL 4
25#define SIGTRAP 5
26#define SIGABRT 6
27#define SIGIOT 6
28#define SIGBUS 7
29#define SIGFPE 8
30#define SIGKILL 9
31#define SIGUSR1 10
32#define SIGSEGV 11
33#define SIGUSR2 12
34#define SIGPIPE 13
35#define SIGALRM 14
36#define SIGTERM 15
37#define SIGSTKFLT 16
38#define SIGCHLD 17
39#define SIGCONT 18
40#define SIGSTOP 19
41#define SIGTSTP 20
42#define SIGTTIN 21
43#define SIGTTOU 22
44#define SIGURG 23
45#define SIGXCPU 24
46#define SIGXFSZ 25
47#define SIGVTALRM 26
48#define SIGPROF 27
49#define SIGWINCH 28
50#define SIGIO 29
51#define SIGPOLL SIGIO
52/*
53#define SIGLOST 29
54*/
55#define SIGPWR 30
56#define SIGSYS 31
57#define SIGUNUSED 31
58
59/* These should not be considered constants from userland. */
60#define SIGRTMIN 32
61#define SIGRTMAX _NSIG
62
63/*
64 * SA_FLAGS values:
65 *
66 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2).
67 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
68 * SA_RESTART flag to get restarting signals (which were the default long ago)
69 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
70 * SA_RESETHAND clears the handler when the signal is delivered.
71 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
72 * SA_NODEFER prevents the current signal from being masked in the handler.
73 *
74 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
75 * Unix names RESETHAND and NODEFER respectively.
76 */
77#define SA_NOCLDSTOP 0x00000001u
78#define SA_NOCLDWAIT 0x00000002u
79#define SA_SIGINFO 0x00000004u
80#define SA_ONSTACK 0x08000000u
81#define SA_RESTART 0x10000000u
82#define SA_NODEFER 0x40000000u
83#define SA_RESETHAND 0x80000000u
84
85#define SA_NOMASK SA_NODEFER
86#define SA_ONESHOT SA_RESETHAND
87#define SA_INTERRUPT 0x20000000u /* dummy -- ignored */
88
89#define SA_RESTORER 0x04000000u
90
91/*
92 * sigaltstack controls
93 */
94#define SS_ONSTACK 1
95#define SS_DISABLE 2
96
97#define MINSIGSTKSZ 2048
98#define SIGSTKSZ 8192
99
100#include <asm-generic/signal.h>
101
102struct old_sigaction {
103 __sighandler_t sa_handler;
104 old_sigset_t sa_mask;
105 unsigned long sa_flags;
106 __sigrestore_t sa_restorer;
107};
108
109struct sigaction {
110 __sighandler_t sa_handler;
111 unsigned long sa_flags;
112 __sigrestore_t sa_restorer;
113 sigset_t sa_mask; /* mask last for extensibility */
114};
115
116struct k_sigaction {
117 struct sigaction sa;
118};
119
120typedef struct sigaltstack {
121 void __user *ss_sp;
122 int ss_flags;
123 size_t ss_size;
124} stack_t;
125
126struct pt_regs;
127struct timespec;
128extern int do_signal(sigset_t *oldset, struct pt_regs *regs);
129extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
130#define ptrace_signal_deliver(regs, cookie) do { } while (0)
131
132#endif /* _ASMPPC64_SIGNAL_H */
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h
index 0cdd66c9f4b7..bf9a6aba19c9 100644
--- a/include/asm-ppc64/system.h
+++ b/include/asm-ppc64/system.h
@@ -149,6 +149,8 @@ struct thread_struct;
149extern struct task_struct * _switch(struct thread_struct *prev, 149extern struct task_struct * _switch(struct thread_struct *prev,
150 struct thread_struct *next); 150 struct thread_struct *next);
151 151
152extern unsigned long klimit;
153
152extern int powersave_nap; /* set if nap mode can be used in idle loop */ 154extern int powersave_nap; /* set if nap mode can be used in idle loop */
153 155
154/* 156/*
diff --git a/include/asm-ppc64/systemcfg.h b/include/asm-ppc64/systemcfg.h
deleted file mode 100644
index 9b86b53129aa..000000000000
--- a/include/asm-ppc64/systemcfg.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _SYSTEMCFG_H
2#define _SYSTEMCFG_H
3
4/*
5 * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
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/* Change Activity:
14 * 2002/09/30 : bergner : Created
15 * End Change Activity
16 */
17
18/*
19 * If the major version changes we are incompatible.
20 * Minor version changes are a hint.
21 */
22#define SYSTEMCFG_MAJOR 1
23#define SYSTEMCFG_MINOR 1
24
25#ifndef __ASSEMBLY__
26
27#include <linux/unistd.h>
28
29#define SYSCALL_MAP_SIZE ((__NR_syscalls + 31) / 32)
30
31struct systemcfg {
32 __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
33 struct { /* Systemcfg version numbers */
34 __u32 major; /* Major number 0x10 */
35 __u32 minor; /* Minor number 0x14 */
36 } version;
37
38 __u32 platform; /* Platform flags 0x18 */
39 __u32 processor; /* Processor type 0x1C */
40 __u64 processorCount; /* # of physical processors 0x20 */
41 __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
42 __u64 tb_orig_stamp; /* Timebase at boot 0x30 */
43 __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
44 __u64 tb_to_xs; /* Inverse of TB to 2^20 0x40 */
45 __u64 stamp_xsec; /* 0x48 */
46 __u64 tb_update_count; /* Timebase atomicity ctr 0x50 */
47 __u32 tz_minuteswest; /* Minutes west of Greenwich 0x58 */
48 __u32 tz_dsttime; /* Type of dst correction 0x5C */
49 /* next four are no longer used except to be exported to /proc */
50 __u32 dcache_size; /* L1 d-cache size 0x60 */
51 __u32 dcache_line_size; /* L1 d-cache line size 0x64 */
52 __u32 icache_size; /* L1 i-cache size 0x68 */
53 __u32 icache_line_size; /* L1 i-cache line size 0x6C */
54 __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of available syscalls 0x70 */
55 __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of available syscalls */
56};
57
58#ifdef __KERNEL__
59extern struct systemcfg *systemcfg;
60#endif
61
62#endif /* __ASSEMBLY__ */
63
64#endif /* _SYSTEMCFG_H */
diff --git a/include/asm-ppc64/tce.h b/include/asm-ppc64/tce.h
deleted file mode 100644
index d40b6b42ab35..000000000000
--- a/include/asm-ppc64/tce.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
3 * Rewrite, cleanup:
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _ASM_TCE_H
22#define _ASM_TCE_H
23
24/*
25 * Tces come in two formats, one for the virtual bus and a different
26 * format for PCI
27 */
28#define TCE_VB 0
29#define TCE_PCI 1
30
31/* TCE page size is 4096 bytes (1 << 12) */
32
33#define TCE_SHIFT 12
34#define TCE_PAGE_SIZE (1 << TCE_SHIFT)
35#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT)
36
37
38/* tce_entry
39 * Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's
40 * abstracted so layout is irrelevant.
41 */
42union tce_entry {
43 unsigned long te_word;
44 struct {
45 unsigned int tb_cacheBits :6; /* Cache hash bits - not used */
46 unsigned int tb_rsvd :6;
47 unsigned long tb_rpn :40; /* Real page number */
48 unsigned int tb_valid :1; /* Tce is valid (vb only) */
49 unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */
50 unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */
51 unsigned int tb_pciwr :1; /* Write allowed (pci only) */
52 unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */
53 } te_bits;
54#define te_cacheBits te_bits.tb_cacheBits
55#define te_rpn te_bits.tb_rpn
56#define te_valid te_bits.tb_valid
57#define te_allio te_bits.tb_allio
58#define te_lpindex te_bits.tb_lpindex
59#define te_pciwr te_bits.tb_pciwr
60#define te_rdwr te_bits.tb_rdwr
61};
62
63
64#endif
diff --git a/include/asm-ppc64/udbg.h b/include/asm-ppc64/udbg.h
deleted file mode 100644
index e3b927991851..000000000000
--- a/include/asm-ppc64/udbg.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef __UDBG_HDR
2#define __UDBG_HDR
3
4#include <linux/compiler.h>
5#include <linux/init.h>
6
7/*
8 * c 2001 PPC 64 Team, IBM Corp
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16extern void (*udbg_putc)(unsigned char c);
17extern unsigned char (*udbg_getc)(void);
18extern int (*udbg_getc_poll)(void);
19
20extern void udbg_puts(const char *s);
21extern int udbg_write(const char *s, int n);
22extern int udbg_read(char *buf, int buflen);
23
24extern void register_early_udbg_console(void);
25extern void udbg_printf(const char *fmt, ...);
26
27extern void udbg_init_uart(void __iomem *comport, unsigned int speed);
28
29struct device_node;
30extern void udbg_init_scc(struct device_node *np);
31#endif
diff --git a/include/asm-ppc64/vdso.h b/include/asm-ppc64/vdso.h
deleted file mode 100644
index 85d8a7be25c4..000000000000
--- a/include/asm-ppc64/vdso.h
+++ /dev/null
@@ -1,83 +0,0 @@
1#ifndef __PPC64_VDSO_H__
2#define __PPC64_VDSO_H__
3
4#ifdef __KERNEL__
5
6/* Default link addresses for the vDSOs */
7#define VDSO32_LBASE 0x100000
8#define VDSO64_LBASE 0x100000
9
10/* Default map addresses */
11#define VDSO32_MBASE VDSO32_LBASE
12#define VDSO64_MBASE VDSO64_LBASE
13
14#define VDSO_VERSION_STRING LINUX_2.6.12
15
16/* Define if 64 bits VDSO has procedure descriptors */
17#undef VDS64_HAS_DESCRIPTORS
18
19#ifndef __ASSEMBLY__
20
21extern unsigned int vdso64_pages;
22extern unsigned int vdso32_pages;
23
24/* Offsets relative to thread->vdso_base */
25extern unsigned long vdso64_rt_sigtramp;
26extern unsigned long vdso32_sigtramp;
27extern unsigned long vdso32_rt_sigtramp;
28
29extern void vdso_init(void);
30
31#else /* __ASSEMBLY__ */
32
33#ifdef __VDSO64__
34#ifdef VDS64_HAS_DESCRIPTORS
35#define V_FUNCTION_BEGIN(name) \
36 .globl name; \
37 .section ".opd","a"; \
38 .align 3; \
39 name: \
40 .quad .name,.TOC.@tocbase,0; \
41 .previous; \
42 .globl .name; \
43 .type .name,@function; \
44 .name: \
45
46#define V_FUNCTION_END(name) \
47 .size .name,.-.name;
48
49#define V_LOCAL_FUNC(name) (.name)
50
51#else /* VDS64_HAS_DESCRIPTORS */
52
53#define V_FUNCTION_BEGIN(name) \
54 .globl name; \
55 name: \
56
57#define V_FUNCTION_END(name) \
58 .size name,.-name;
59
60#define V_LOCAL_FUNC(name) (name)
61
62#endif /* VDS64_HAS_DESCRIPTORS */
63#endif /* __VDSO64__ */
64
65#ifdef __VDSO32__
66
67#define V_FUNCTION_BEGIN(name) \
68 .globl name; \
69 .type name,@function; \
70 name: \
71
72#define V_FUNCTION_END(name) \
73 .size name,.-name;
74
75#define V_LOCAL_FUNC(name) (name)
76
77#endif /* __VDSO32__ */
78
79#endif /* __ASSEMBLY__ */
80
81#endif /* __KERNEL__ */
82
83#endif /* __PPC64_VDSO_H__ */