aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/iommu.h19
-rw-r--r--include/asm-powerpc/iseries/hv_call.h4
-rw-r--r--include/asm-powerpc/iseries/hv_call_event.h134
-rw-r--r--include/asm-powerpc/iseries/hv_call_sc.h1
-rw-r--r--include/asm-powerpc/iseries/hv_lp_config.h1
-rw-r--r--include/asm-powerpc/iseries/hv_lp_event.h42
-rw-r--r--include/asm-powerpc/iseries/hv_types.h1
-rw-r--r--include/asm-powerpc/iseries/iseries_io.h14
-rw-r--r--include/asm-powerpc/iseries/it_exp_vpd_panel.h1
-rw-r--r--include/asm-powerpc/iseries/it_lp_naca.h22
-rw-r--r--include/asm-powerpc/iseries/it_lp_queue.h1
-rw-r--r--include/asm-powerpc/iseries/it_lp_reg_save.h3
-rw-r--r--include/asm-powerpc/iseries/lpar_map.h1
-rw-r--r--include/asm-powerpc/iseries/mf.h1
-rw-r--r--include/asm-powerpc/iseries/vio.h1
-rw-r--r--include/asm-powerpc/pci-bridge.h2
-rw-r--r--include/asm-powerpc/system.h8
-rw-r--r--include/asm-ppc/system.h12
18 files changed, 111 insertions, 157 deletions
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h
index 8a8393e50774..d5677cbec200 100644
--- a/include/asm-powerpc/iommu.h
+++ b/include/asm-powerpc/iommu.h
@@ -64,25 +64,6 @@ extern void iommu_free_table(struct device_node *dn);
64 64
65#endif /* CONFIG_PPC_MULTIPLATFORM */ 65#endif /* CONFIG_PPC_MULTIPLATFORM */
66 66
67#ifdef CONFIG_PPC_PSERIES
68
69/* Creates table for an individual device node */
70extern void iommu_devnode_init_pSeries(struct device_node *dn);
71
72#endif /* CONFIG_PPC_PSERIES */
73
74#ifdef CONFIG_PPC_ISERIES
75
76/* Creates table for an individual device node */
77extern void iommu_devnode_init_iSeries(struct device_node *dn);
78/* Get table parameters from HV */
79extern void iommu_table_getparms_iSeries(unsigned long busno,
80 unsigned char slotno,
81 unsigned char virtbus,
82 struct iommu_table* tbl);
83
84#endif /* CONFIG_PPC_ISERIES */
85
86/* Initializes an iommu_table based in values set in the passed-in 67/* Initializes an iommu_table based in values set in the passed-in
87 * structure 68 * structure
88 */ 69 */
diff --git a/include/asm-powerpc/iseries/hv_call.h b/include/asm-powerpc/iseries/hv_call.h
index e9f831c9a5e5..162d653ad51f 100644
--- a/include/asm-powerpc/iseries/hv_call.h
+++ b/include/asm-powerpc/iseries/hv_call.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvCall.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -15,8 +14,7 @@
15 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 17 *
19/*
20 * This file contains the "hypervisor call" interface which is used to 18 * This file contains the "hypervisor call" interface which is used to
21 * drive the hypervisor from the OS. 19 * drive the hypervisor from the OS.
22 */ 20 */
diff --git a/include/asm-powerpc/iseries/hv_call_event.h b/include/asm-powerpc/iseries/hv_call_event.h
index 46763a30590a..4cec4762076d 100644
--- a/include/asm-powerpc/iseries/hv_call_event.h
+++ b/include/asm-powerpc/iseries/hv_call_event.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvCallEvent.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -15,8 +14,7 @@
15 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 17 *
19/*
20 * This file contains the "hypervisor call" interface which is used to 18 * This file contains the "hypervisor call" interface which is used to
21 * drive the hypervisor from the OS. 19 * drive the hypervisor from the OS.
22 */ 20 */
@@ -33,32 +31,9 @@ typedef u8 HvLpEvent_Type;
33typedef u8 HvLpEvent_AckInd; 31typedef u8 HvLpEvent_AckInd;
34typedef u8 HvLpEvent_AckType; 32typedef u8 HvLpEvent_AckType;
35 33
36struct HvCallEvent_PackedParms {
37 u8 xAckType:1;
38 u8 xAckInd:1;
39 u8 xRsvd:1;
40 u8 xTargetLp:5;
41 u8 xType;
42 u16 xSubtype;
43 HvLpInstanceId xSourceInstId;
44 HvLpInstanceId xTargetInstId;
45};
46
47typedef u8 HvLpDma_Direction; 34typedef u8 HvLpDma_Direction;
48typedef u8 HvLpDma_AddressType; 35typedef u8 HvLpDma_AddressType;
49 36
50struct HvCallEvent_PackedDmaParms {
51 u8 xDirection:1;
52 u8 xLocalAddrType:1;
53 u8 xRemoteAddrType:1;
54 u8 xRsvd1:5;
55 HvLpIndex xRemoteLp;
56 u8 xType;
57 u8 xRsvd2;
58 HvLpInstanceId xLocalInstId;
59 HvLpInstanceId xRemoteInstId;
60};
61
62typedef u64 HvLpEvent_Rc; 37typedef u64 HvLpEvent_Rc;
63typedef u64 HvLpDma_Rc; 38typedef u64 HvLpDma_Rc;
64 39
@@ -92,11 +67,8 @@ static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
92static inline void HvCallEvent_setLpEventStack(u8 queueIndex, 67static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
93 char *eventStackAddr, u32 eventStackSize) 68 char *eventStackAddr, u32 eventStackSize)
94{ 69{
95 u64 abs_addr; 70 HvCall3(HvCallEventSetLpEventStack, queueIndex,
96 71 virt_to_abs(eventStackAddr), eventStackSize);
97 abs_addr = virt_to_abs(eventStackAddr);
98 HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
99 eventStackSize);
100} 72}
101 73
102static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex, 74static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
@@ -108,14 +80,7 @@ static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
108 80
109static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event) 81static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event)
110{ 82{
111 u64 abs_addr; 83 return HvCall1(HvCallEventSignalLpEvent, virt_to_abs(event));
112
113#ifdef DEBUG_SENDEVENT
114 printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
115 (unsigned long)event);
116#endif
117 abs_addr = virt_to_abs(event);
118 return HvCall1(HvCallEventSignalLpEvent, abs_addr);
119} 84}
120 85
121static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp, 86static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
@@ -127,17 +92,21 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
127{ 92{
128 /* Pack the misc bits into a single Dword to pass to PLIC */ 93 /* Pack the misc bits into a single Dword to pass to PLIC */
129 union { 94 union {
130 struct HvCallEvent_PackedParms parms; 95 struct {
96 u8 ack_and_target;
97 u8 type;
98 u16 subtype;
99 HvLpInstanceId src_inst;
100 HvLpInstanceId target_inst;
101 } parms;
131 u64 dword; 102 u64 dword;
132 } packed; 103 } packed;
133 packed.parms.xAckType = ackType; 104
134 packed.parms.xAckInd = ackInd; 105 packed.parms.ack_and_target = (ackType << 7) | (ackInd << 6) | targetLp;
135 packed.parms.xRsvd = 0; 106 packed.parms.type = type;
136 packed.parms.xTargetLp = targetLp; 107 packed.parms.subtype = subtype;
137 packed.parms.xType = type; 108 packed.parms.src_inst = sourceInstanceId;
138 packed.parms.xSubtype = subtype; 109 packed.parms.target_inst = targetInstanceId;
139 packed.parms.xSourceInstId = sourceInstanceId;
140 packed.parms.xTargetInstId = targetInstanceId;
141 110
142 return HvCall7(HvCallEventSignalLpEventParms, packed.dword, 111 return HvCall7(HvCallEventSignalLpEventParms, packed.dword,
143 correlationToken, eventData1, eventData2, 112 correlationToken, eventData1, eventData2,
@@ -146,18 +115,12 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
146 115
147static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event) 116static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event)
148{ 117{
149 u64 abs_addr; 118 return HvCall1(HvCallEventAckLpEvent, virt_to_abs(event));
150
151 abs_addr = virt_to_abs(event);
152 return HvCall1(HvCallEventAckLpEvent, abs_addr);
153} 119}
154 120
155static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event) 121static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event)
156{ 122{
157 u64 abs_addr; 123 return HvCall1(HvCallEventCancelLpEvent, virt_to_abs(event));
158
159 abs_addr = virt_to_abs(event);
160 return HvCall1(HvCallEventCancelLpEvent, abs_addr);
161} 124}
162 125
163static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId( 126static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId(
@@ -195,59 +158,34 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
195{ 158{
196 /* Pack the misc bits into a single Dword to pass to PLIC */ 159 /* Pack the misc bits into a single Dword to pass to PLIC */
197 union { 160 union {
198 struct HvCallEvent_PackedDmaParms parms; 161 struct {
162 u8 flags;
163 HvLpIndex remote;
164 u8 type;
165 u8 reserved;
166 HvLpInstanceId local_inst;
167 HvLpInstanceId remote_inst;
168 } parms;
199 u64 dword; 169 u64 dword;
200 } packed; 170 } packed;
201 171
202 packed.parms.xDirection = direction; 172 packed.parms.flags = (direction << 7) |
203 packed.parms.xLocalAddrType = localAddressType; 173 (localAddressType << 6) | (remoteAddressType << 5);
204 packed.parms.xRemoteAddrType = remoteAddressType; 174 packed.parms.remote = remoteLp;
205 packed.parms.xRsvd1 = 0; 175 packed.parms.type = type;
206 packed.parms.xRemoteLp = remoteLp; 176 packed.parms.reserved = 0;
207 packed.parms.xType = type; 177 packed.parms.local_inst = localInstanceId;
208 packed.parms.xRsvd2 = 0; 178 packed.parms.remote_inst = remoteInstanceId;
209 packed.parms.xLocalInstId = localInstanceId;
210 packed.parms.xRemoteInstId = remoteInstanceId;
211 179
212 return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList, 180 return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList,
213 remoteBufList, transferLength); 181 remoteBufList, transferLength);
214} 182}
215 183
216static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
217 HvLpIndex remoteLp, HvLpDma_Direction direction,
218 HvLpInstanceId localInstanceId,
219 HvLpInstanceId remoteInstanceId,
220 HvLpDma_AddressType localAddressType,
221 HvLpDma_AddressType remoteAddressType,
222 u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
223{
224 /* Pack the misc bits into a single Dword to pass to PLIC */
225 union {
226 struct HvCallEvent_PackedDmaParms parms;
227 u64 dword;
228 } packed;
229
230 packed.parms.xDirection = direction;
231 packed.parms.xLocalAddrType = localAddressType;
232 packed.parms.xRemoteAddrType = remoteAddressType;
233 packed.parms.xRsvd1 = 0;
234 packed.parms.xRemoteLp = remoteLp;
235 packed.parms.xType = type;
236 packed.parms.xRsvd2 = 0;
237 packed.parms.xLocalInstId = localInstanceId;
238 packed.parms.xRemoteInstId = remoteInstanceId;
239
240 return (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, packed.dword,
241 localAddrOrTce, remoteAddrOrTce, transferLength);
242}
243
244static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote, 184static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
245 u32 length, HvLpDma_Direction dir) 185 u32 length, HvLpDma_Direction dir)
246{ 186{
247 u64 abs_addr; 187 return HvCall4(HvCallEventDmaToSp, virt_to_abs(local), remote,
248 188 length, dir);
249 abs_addr = virt_to_abs(local);
250 return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir);
251} 189}
252 190
253#endif /* _ASM_POWERPC_ISERIES_HV_CALL_EVENT_H */ 191#endif /* _ASM_POWERPC_ISERIES_HV_CALL_EVENT_H */
diff --git a/include/asm-powerpc/iseries/hv_call_sc.h b/include/asm-powerpc/iseries/hv_call_sc.h
index dec7e9d9ab78..f5d210959250 100644
--- a/include/asm-powerpc/iseries/hv_call_sc.h
+++ b/include/asm-powerpc/iseries/hv_call_sc.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvCallSc.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/hv_lp_config.h b/include/asm-powerpc/iseries/hv_lp_config.h
index bc00f036bca0..df8b20739719 100644
--- a/include/asm-powerpc/iseries/hv_lp_config.h
+++ b/include/asm-powerpc/iseries/hv_lp_config.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvLpConfig.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/hv_lp_event.h b/include/asm-powerpc/iseries/hv_lp_event.h
index 499ab1ad0185..4065a4de4935 100644
--- a/include/asm-powerpc/iseries/hv_lp_event.h
+++ b/include/asm-powerpc/iseries/hv_lp_event.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvLpEvent.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -32,17 +31,8 @@
32 * partitions through PLIC. 31 * partitions through PLIC.
33 */ 32 */
34 33
35struct HvEventFlags {
36 u8 xValid:1; /* Indicates a valid request x00-x00 */
37 u8 xRsvd1:4; /* Reserved ... */
38 u8 xAckType:1; /* Immediate or deferred ... */
39 u8 xAckInd:1; /* Indicates if ACK required ... */
40 u8 xFunction:1; /* Interrupt or Acknowledge ... */
41};
42
43
44struct HvLpEvent { 34struct HvLpEvent {
45 struct HvEventFlags xFlags; /* Event flags x00-x00 */ 35 u8 flags; /* Event flags x00-x00 */
46 u8 xType; /* Type of message x01-x01 */ 36 u8 xType; /* Type of message x01-x01 */
47 u16 xSubtype; /* Subtype for event x02-x03 */ 37 u16 xSubtype; /* Subtype for event x02-x03 */
48 u8 xSourceLp; /* Source LP x04-x04 */ 38 u8 xSourceLp; /* Source LP x04-x04 */
@@ -126,6 +116,11 @@ extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
126#define HvLpEvent_AckType_ImmediateAck 0 116#define HvLpEvent_AckType_ImmediateAck 0
127#define HvLpEvent_AckType_DeferredAck 1 117#define HvLpEvent_AckType_DeferredAck 1
128 118
119#define HV_LP_EVENT_INT 0x01
120#define HV_LP_EVENT_DO_ACK 0x02
121#define HV_LP_EVENT_DEFERRED_ACK 0x04
122#define HV_LP_EVENT_VALID 0x80
123
129#define HvLpDma_Direction_LocalToRemote 0 124#define HvLpDma_Direction_LocalToRemote 0
130#define HvLpDma_Direction_RemoteToLocal 1 125#define HvLpDma_Direction_RemoteToLocal 1
131 126
@@ -139,4 +134,29 @@ extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
139#define HvLpDma_Rc_InvalidAddress 4 134#define HvLpDma_Rc_InvalidAddress 4
140#define HvLpDma_Rc_InvalidLength 5 135#define HvLpDma_Rc_InvalidLength 5
141 136
137static inline int hvlpevent_is_valid(struct HvLpEvent *h)
138{
139 return h->flags & HV_LP_EVENT_VALID;
140}
141
142static inline void hvlpevent_invalidate(struct HvLpEvent *h)
143{
144 h->flags &= ~ HV_LP_EVENT_VALID;
145}
146
147static inline int hvlpevent_is_int(struct HvLpEvent *h)
148{
149 return h->flags & HV_LP_EVENT_INT;
150}
151
152static inline int hvlpevent_is_ack(struct HvLpEvent *h)
153{
154 return !hvlpevent_is_int(h);
155}
156
157static inline int hvlpevent_need_ack(struct HvLpEvent *h)
158{
159 return h->flags & HV_LP_EVENT_DO_ACK;
160}
161
142#endif /* _ASM_POWERPC_ISERIES_HV_LP_EVENT_H */ 162#endif /* _ASM_POWERPC_ISERIES_HV_LP_EVENT_H */
diff --git a/include/asm-powerpc/iseries/hv_types.h b/include/asm-powerpc/iseries/hv_types.h
index c38f7e3d01dc..c3e6d2a1d1c3 100644
--- a/include/asm-powerpc/iseries/hv_types.h
+++ b/include/asm-powerpc/iseries/hv_types.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * HvTypes.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/iseries_io.h b/include/asm-powerpc/iseries/iseries_io.h
index 56b2113ff0f5..496aa852b617 100644
--- a/include/asm-powerpc/iseries/iseries_io.h
+++ b/include/asm-powerpc/iseries/iseries_io.h
@@ -6,7 +6,7 @@
6#ifdef CONFIG_PPC_ISERIES 6#ifdef CONFIG_PPC_ISERIES
7#include <linux/types.h> 7#include <linux/types.h>
8/* 8/*
9 * File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000. 9 * Created by Allan Trautman on Thu Dec 28 2000.
10 * 10 *
11 * Remaps the io.h for the iSeries Io 11 * Remaps the io.h for the iSeries Io
12 * Copyright (C) 2000 Allan H Trautman, IBM Corporation 12 * Copyright (C) 2000 Allan H Trautman, IBM Corporation
@@ -32,6 +32,7 @@
32 * End Change Activity 32 * End Change Activity
33 */ 33 */
34 34
35#ifdef CONFIG_PCI
35extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); 36extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
36extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); 37extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
37extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); 38extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress);
@@ -44,6 +45,17 @@ extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source,
44 size_t n); 45 size_t n);
45extern void iSeries_memcpy_fromio(void *dest, 46extern void iSeries_memcpy_fromio(void *dest,
46 const volatile void __iomem *source, size_t n); 47 const volatile void __iomem *source, size_t n);
48#else
49static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
50{
51 return 0xff;
52}
53
54static inline void iSeries_Write_Byte(u8 IoData,
55 volatile void __iomem *IoAddress)
56{
57}
58#endif /* CONFIG_PCI */
47 59
48#endif /* CONFIG_PPC_ISERIES */ 60#endif /* CONFIG_PPC_ISERIES */
49#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */ 61#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */
diff --git a/include/asm-powerpc/iseries/it_exp_vpd_panel.h b/include/asm-powerpc/iseries/it_exp_vpd_panel.h
index 66a17a230c52..304a609ae21a 100644
--- a/include/asm-powerpc/iseries/it_exp_vpd_panel.h
+++ b/include/asm-powerpc/iseries/it_exp_vpd_panel.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * ItExtVpdPanel.h
3 * Copyright (C) 2002 Dave Boutcher IBM Corporation 2 * Copyright (C) 2002 Dave Boutcher IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/it_lp_naca.h b/include/asm-powerpc/iseries/it_lp_naca.h
index c3ef1de45d82..4fdcf052927f 100644
--- a/include/asm-powerpc/iseries/it_lp_naca.h
+++ b/include/asm-powerpc/iseries/it_lp_naca.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * ItLpNaca.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -37,17 +36,13 @@ struct ItLpNaca {
37 u8 xLpIndex; // LP Index x0B-x0B 36 u8 xLpIndex; // LP Index x0B-x0B
38 u16 xMaxLpQueues; // Number of allocated queues x0C-x0D 37 u16 xMaxLpQueues; // Number of allocated queues x0C-x0D
39 u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F 38 u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F
40 u8 xPirEnvironMode:8; // Piranha or hardware x10-x10 39 u8 xPirEnvironMode; // Piranha or hardware x10-x10
41 u8 xPirConsoleMode:8; // Piranha console indicator x11-x11 40 u8 xPirConsoleMode; // Piranha console indicator x11-x11
42 u8 xPirDasdMode:8; // Piranha dasd indicator x12-x12 41 u8 xPirDasdMode; // Piranha dasd indicator x12-x12
43 u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17 42 u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17
44 u8 xLparInstalled:1; // Is LPAR installed on system x18-x1F 43 u8 flags; // flags, see below x18-x1F
45 u8 xSysPartitioned:1; // Is the system partitioned ... 44 u8 xSpVpdFormat; // VPD areas are in CSP format ...
46 u8 xHwSyncedTBs:1; // Hardware synced TBs ... 45 u8 xIntProcRatio; // Ratio of int procs to procs ...
47 u8 xIntProcUtilHmt:1; // Utilize HMT for interrupts ...
48 u8 xRsvd1_1:4; // Reserved ...
49 u8 xSpVpdFormat:8; // VPD areas are in CSP format ...
50 u8 xIntProcRatio:8; // Ratio of int procs to procs ...
51 u8 xRsvd1_2[5]; // Reserved ... 46 u8 xRsvd1_2[5]; // Reserved ...
52 u16 xRsvd1_3; // Reserved x20-x21 47 u16 xRsvd1_3; // Reserved x20-x21
53 u16 xPlicVrmIndex; // VRM index of PLIC x22-x23 48 u16 xPlicVrmIndex; // VRM index of PLIC x22-x23
@@ -77,4 +72,9 @@ struct ItLpNaca {
77 72
78extern struct ItLpNaca itLpNaca; 73extern struct ItLpNaca itLpNaca;
79 74
75#define ITLPNACA_LPAR 0x80 /* Is LPAR installed on the system */
76#define ITLPNACA_PARTITIONED 0x40 /* Is the system partitioned */
77#define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */
78#define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */
79
80#endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */ 80#endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */
diff --git a/include/asm-powerpc/iseries/it_lp_queue.h b/include/asm-powerpc/iseries/it_lp_queue.h
index a60d03afbf95..b7c6fc12cce2 100644
--- a/include/asm-powerpc/iseries/it_lp_queue.h
+++ b/include/asm-powerpc/iseries/it_lp_queue.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * ItLpQueue.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/it_lp_reg_save.h b/include/asm-powerpc/iseries/it_lp_reg_save.h
index 81824e1bb767..5403b756f654 100644
--- a/include/asm-powerpc/iseries/it_lp_reg_save.h
+++ b/include/asm-powerpc/iseries/it_lp_reg_save.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * ItLpRegSave.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -83,4 +82,4 @@ struct ItLpRegSave {
83 82
84extern struct ItLpRegSave iseries_reg_save[]; 83extern struct ItLpRegSave iseries_reg_save[];
85 84
86#endif /* _ITLPREGSAVE_H */ 85#endif /* _ASM_POWERPC_ISERIES_IT_LP_REG_SAVE_H */
diff --git a/include/asm-powerpc/iseries/lpar_map.h b/include/asm-powerpc/iseries/lpar_map.h
index 84fc321615bf..2ec384d66abb 100644
--- a/include/asm-powerpc/iseries/lpar_map.h
+++ b/include/asm-powerpc/iseries/lpar_map.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * LparMap.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/include/asm-powerpc/iseries/mf.h b/include/asm-powerpc/iseries/mf.h
index e7bd57a03fb1..857e5202fc78 100644
--- a/include/asm-powerpc/iseries/mf.h
+++ b/include/asm-powerpc/iseries/mf.h
@@ -1,5 +1,4 @@
1/* 1/*
2 * mf.h
3 * Copyright (C) 2001 Troy D. Armstrong IBM Corporation 2 * Copyright (C) 2001 Troy D. Armstrong IBM Corporation
4 * Copyright (C) 2004 Stephen Rothwell IBM Corporation 3 * Copyright (C) 2004 Stephen Rothwell IBM Corporation
5 * 4 *
diff --git a/include/asm-powerpc/iseries/vio.h b/include/asm-powerpc/iseries/vio.h
index 7e3a469420dd..72a97d37aac3 100644
--- a/include/asm-powerpc/iseries/vio.h
+++ b/include/asm-powerpc/iseries/vio.h
@@ -1,5 +1,4 @@
1/* -*- linux-c -*- 1/* -*- linux-c -*-
2 * drivers/char/vio.h
3 * 2 *
4 * iSeries Virtual I/O Message Path header 3 * iSeries Virtual I/O Message Path header
5 * 4 *
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index b0d816fe2e27..38de92d41a14 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -142,8 +142,6 @@ void pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus);
142 142
143extern int pcibios_remove_root_bus(struct pci_controller *phb); 143extern int pcibios_remove_root_bus(struct pci_controller *phb);
144 144
145extern void phbs_remap_io(void);
146
147static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) 145static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
148{ 146{
149 struct device_node *busdn = bus->sysdata; 147 struct device_node *busdn = bus->sysdata;
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index 1be629b4fb97..9b822afa7d0e 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -133,6 +133,14 @@ extern int fix_alignment(struct pt_regs *);
133extern void cvt_fd(float *from, double *to, struct thread_struct *thread); 133extern void cvt_fd(float *from, double *to, struct thread_struct *thread);
134extern void cvt_df(double *from, float *to, struct thread_struct *thread); 134extern void cvt_df(double *from, float *to, struct thread_struct *thread);
135 135
136#ifndef CONFIG_SMP
137extern void discard_lazy_cpu_state(void);
138#else
139static inline void discard_lazy_cpu_state(void)
140{
141}
142#endif
143
136#ifdef CONFIG_ALTIVEC 144#ifdef CONFIG_ALTIVEC
137extern void flush_altivec_to_thread(struct task_struct *); 145extern void flush_altivec_to_thread(struct task_struct *);
138#else 146#else
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
index 212dca66fcac..fb49c0c49ea1 100644
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -4,7 +4,6 @@
4#ifndef __PPC_SYSTEM_H 4#ifndef __PPC_SYSTEM_H
5#define __PPC_SYSTEM_H 5#define __PPC_SYSTEM_H
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9 8
10#include <asm/atomic.h> 9#include <asm/atomic.h>
@@ -39,7 +38,7 @@
39#ifdef CONFIG_SMP 38#ifdef CONFIG_SMP
40#define smp_mb() mb() 39#define smp_mb() mb()
41#define smp_rmb() rmb() 40#define smp_rmb() rmb()
42#define smp_wmb() wmb() 41#define smp_wmb() __asm__ __volatile__ ("eieio" : : : "memory")
43#define smp_read_barrier_depends() read_barrier_depends() 42#define smp_read_barrier_depends() read_barrier_depends()
44#else 43#else
45#define smp_mb() barrier() 44#define smp_mb() barrier()
@@ -74,6 +73,7 @@ extern void chrp_nvram_init(void);
74extern void read_rtc_time(void); 73extern void read_rtc_time(void);
75extern void pmac_find_display(void); 74extern void pmac_find_display(void);
76extern void giveup_fpu(struct task_struct *); 75extern void giveup_fpu(struct task_struct *);
76extern void disable_kernel_fp(void);
77extern void enable_kernel_fp(void); 77extern void enable_kernel_fp(void);
78extern void flush_fp_to_thread(struct task_struct *); 78extern void flush_fp_to_thread(struct task_struct *);
79extern void enable_kernel_altivec(void); 79extern void enable_kernel_altivec(void);
@@ -86,6 +86,14 @@ extern int fix_alignment(struct pt_regs *);
86extern void cvt_fd(float *from, double *to, struct thread_struct *thread); 86extern void cvt_fd(float *from, double *to, struct thread_struct *thread);
87extern void cvt_df(double *from, float *to, struct thread_struct *thread); 87extern void cvt_df(double *from, float *to, struct thread_struct *thread);
88 88
89#ifndef CONFIG_SMP
90extern void discard_lazy_cpu_state(void);
91#else
92static inline void discard_lazy_cpu_state(void)
93{
94}
95#endif
96
89#ifdef CONFIG_ALTIVEC 97#ifdef CONFIG_ALTIVEC
90extern void flush_altivec_to_thread(struct task_struct *); 98extern void flush_altivec_to_thread(struct task_struct *);
91#else 99#else