diff options
author | Dave Jones <davej@redhat.com> | 2005-06-25 17:54:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:25 -0400 |
commit | 821fe94727e72d63e1abd1bc0b044c72dfad9fb6 (patch) | |
tree | 1d7639b7dfe4d7007745c1100c955332e9e03bd0 /arch/ia64 | |
parent | 7e0fa31dbf5968ce1e94f73c04a9402170432ecf (diff) |
[PATCH] gcc4 compile fix for recent ia64 xpc changes
Gcc4 doesn't like volatile casts as lvalues. Make the structure members
volatile instead.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/sn/kernel/xpc.h | 12 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_channel.c | 12 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_partition.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/arch/ia64/sn/kernel/xpc.h b/arch/ia64/sn/kernel/xpc.h index 1a0aed8490d1..d0ee635daf2e 100644 --- a/arch/ia64/sn/kernel/xpc.h +++ b/arch/ia64/sn/kernel/xpc.h | |||
@@ -87,7 +87,7 @@ struct xpc_rsvd_page { | |||
87 | u8 partid; /* partition ID from SAL */ | 87 | u8 partid; /* partition ID from SAL */ |
88 | u8 version; | 88 | u8 version; |
89 | u8 pad[6]; /* pad to u64 align */ | 89 | u8 pad[6]; /* pad to u64 align */ |
90 | u64 vars_pa; | 90 | volatile u64 vars_pa; |
91 | u64 part_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; | 91 | u64 part_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; |
92 | u64 mach_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; | 92 | u64 mach_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; |
93 | }; | 93 | }; |
@@ -138,7 +138,7 @@ struct xpc_vars { | |||
138 | * occupies half a cacheline. | 138 | * occupies half a cacheline. |
139 | */ | 139 | */ |
140 | struct xpc_vars_part { | 140 | struct xpc_vars_part { |
141 | u64 magic; | 141 | volatile u64 magic; |
142 | 142 | ||
143 | u64 openclose_args_pa; /* physical address of open and close args */ | 143 | u64 openclose_args_pa; /* physical address of open and close args */ |
144 | u64 GPs_pa; /* physical address of Get/Put values */ | 144 | u64 GPs_pa; /* physical address of Get/Put values */ |
@@ -185,8 +185,8 @@ struct xpc_vars_part { | |||
185 | * Define a Get/Put value pair (pointers) used with a message queue. | 185 | * Define a Get/Put value pair (pointers) used with a message queue. |
186 | */ | 186 | */ |
187 | struct xpc_gp { | 187 | struct xpc_gp { |
188 | s64 get; /* Get value */ | 188 | volatile s64 get; /* Get value */ |
189 | s64 put; /* Put value */ | 189 | volatile s64 put; /* Put value */ |
190 | }; | 190 | }; |
191 | 191 | ||
192 | #define XPC_GP_SIZE \ | 192 | #define XPC_GP_SIZE \ |
@@ -231,7 +231,7 @@ struct xpc_openclose_args { | |||
231 | */ | 231 | */ |
232 | struct xpc_notify { | 232 | struct xpc_notify { |
233 | struct semaphore sema; /* notify semaphore */ | 233 | struct semaphore sema; /* notify semaphore */ |
234 | u8 type; /* type of notification */ | 234 | volatile u8 type; /* type of notification */ |
235 | 235 | ||
236 | /* the following two fields are only used if type == XPC_N_CALL */ | 236 | /* the following two fields are only used if type == XPC_N_CALL */ |
237 | xpc_notify_func func; /* user's notify function */ | 237 | xpc_notify_func func; /* user's notify function */ |
@@ -439,7 +439,7 @@ struct xpc_partition { | |||
439 | 439 | ||
440 | /* XPC infrastructure referencing and teardown control */ | 440 | /* XPC infrastructure referencing and teardown control */ |
441 | 441 | ||
442 | u8 setup_state; /* infrastructure setup state */ | 442 | volatile u8 setup_state; /* infrastructure setup state */ |
443 | wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ | 443 | wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ |
444 | atomic_t references; /* #of references to infrastructure */ | 444 | atomic_t references; /* #of references to infrastructure */ |
445 | 445 | ||
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 0bf6fbcc46d2..6d02dac8056f 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -209,7 +209,7 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
209 | * With the setting of the partition setup_state to XPC_P_SETUP, we're | 209 | * With the setting of the partition setup_state to XPC_P_SETUP, we're |
210 | * declaring that this partition is ready to go. | 210 | * declaring that this partition is ready to go. |
211 | */ | 211 | */ |
212 | (volatile u8) part->setup_state = XPC_P_SETUP; | 212 | part->setup_state = XPC_P_SETUP; |
213 | 213 | ||
214 | 214 | ||
215 | /* | 215 | /* |
@@ -227,7 +227,7 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
227 | xpc_vars_part[partid].IPI_phys_cpuid = | 227 | xpc_vars_part[partid].IPI_phys_cpuid = |
228 | cpu_physical_id(smp_processor_id()); | 228 | cpu_physical_id(smp_processor_id()); |
229 | xpc_vars_part[partid].nchannels = part->nchannels; | 229 | xpc_vars_part[partid].nchannels = part->nchannels; |
230 | (volatile u64) xpc_vars_part[partid].magic = XPC_VP_MAGIC1; | 230 | xpc_vars_part[partid].magic = XPC_VP_MAGIC1; |
231 | 231 | ||
232 | return xpcSuccess; | 232 | return xpcSuccess; |
233 | } | 233 | } |
@@ -355,7 +355,7 @@ xpc_pull_remote_vars_part(struct xpc_partition *part) | |||
355 | 355 | ||
356 | /* let the other side know that we've pulled their variables */ | 356 | /* let the other side know that we've pulled their variables */ |
357 | 357 | ||
358 | (volatile u64) xpc_vars_part[partid].magic = XPC_VP_MAGIC2; | 358 | xpc_vars_part[partid].magic = XPC_VP_MAGIC2; |
359 | } | 359 | } |
360 | 360 | ||
361 | if (pulled_entry->magic == XPC_VP_MAGIC1) { | 361 | if (pulled_entry->magic == XPC_VP_MAGIC1) { |
@@ -1183,7 +1183,7 @@ xpc_process_msg_IPI(struct xpc_partition *part, int ch_number) | |||
1183 | */ | 1183 | */ |
1184 | xpc_clear_local_msgqueue_flags(ch); | 1184 | xpc_clear_local_msgqueue_flags(ch); |
1185 | 1185 | ||
1186 | (volatile s64) ch->w_remote_GP.get = ch->remote_GP.get; | 1186 | ch->w_remote_GP.get = ch->remote_GP.get; |
1187 | 1187 | ||
1188 | dev_dbg(xpc_chan, "w_remote_GP.get changed to %ld, partid=%d, " | 1188 | dev_dbg(xpc_chan, "w_remote_GP.get changed to %ld, partid=%d, " |
1189 | "channel=%d\n", ch->w_remote_GP.get, ch->partid, | 1189 | "channel=%d\n", ch->w_remote_GP.get, ch->partid, |
@@ -1211,7 +1211,7 @@ xpc_process_msg_IPI(struct xpc_partition *part, int ch_number) | |||
1211 | */ | 1211 | */ |
1212 | xpc_clear_remote_msgqueue_flags(ch); | 1212 | xpc_clear_remote_msgqueue_flags(ch); |
1213 | 1213 | ||
1214 | (volatile s64) ch->w_remote_GP.put = ch->remote_GP.put; | 1214 | ch->w_remote_GP.put = ch->remote_GP.put; |
1215 | 1215 | ||
1216 | dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, " | 1216 | dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, " |
1217 | "channel=%d\n", ch->w_remote_GP.put, ch->partid, | 1217 | "channel=%d\n", ch->w_remote_GP.put, ch->partid, |
@@ -1875,7 +1875,7 @@ xpc_send_msg(struct xpc_channel *ch, struct xpc_msg *msg, u8 notify_type, | |||
1875 | notify = &ch->notify_queue[msg_number % ch->local_nentries]; | 1875 | notify = &ch->notify_queue[msg_number % ch->local_nentries]; |
1876 | notify->func = func; | 1876 | notify->func = func; |
1877 | notify->key = key; | 1877 | notify->key = key; |
1878 | (volatile u8) notify->type = notify_type; | 1878 | notify->type = notify_type; |
1879 | 1879 | ||
1880 | // >>> is a mb() needed here? | 1880 | // >>> is a mb() needed here? |
1881 | 1881 | ||
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c index cd7ed73f0e7a..578265ea9e67 100644 --- a/arch/ia64/sn/kernel/xpc_partition.c +++ b/arch/ia64/sn/kernel/xpc_partition.c | |||
@@ -253,7 +253,7 @@ xpc_rsvd_page_init(void) | |||
253 | * This signifies to the remote partition that our reserved | 253 | * This signifies to the remote partition that our reserved |
254 | * page is initialized. | 254 | * page is initialized. |
255 | */ | 255 | */ |
256 | (volatile u64) rp->vars_pa = __pa(xpc_vars); | 256 | rp->vars_pa = __pa(xpc_vars); |
257 | 257 | ||
258 | return rp; | 258 | return rp; |
259 | } | 259 | } |