aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 13:24:52 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 13:24:52 -0500
commit21511abd0a248a3f225d3b611cfabb93124605a7 (patch)
treeeb490f94322f3c76169ea7e5ec09524f275f390e /include/asm-ia64
parent39ce941ec15032c0efc3632b9f00a6b2365e1870 (diff)
parente1b0d4ba46b42909d11ea152a6b56ee76f062ca3 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] make pfm_get_task work with virtual pids [IA64] honor notify_die() returning NOTIFY_STOP [IA64] remove dead code: __cpu_{down,die} from !HOTPLUG_CPU [IA64] Appoint kvm/ia64 Maintainers [IA64] ia64_set_psr should use srlz.i [IA64] Export three symbols for module use [IA64] mca style cleanup [IA64] sn_hwperf semaphore to mutex [IA64] generalize attribute of fsyscall_gtod_data [IA64] efi.c Add /* never reached */ annotation [IA64] efi.c Spelling/punctuation fixes [IA64] Make efi.c mostly fit in 80 columns [IA64] aliasing-test: fix gcc warnings on non-ia64 [IA64] Slim-down __clear_bit_unlock [IA64] Fix the order of atomic operations in restore_previous_kprobes on ia64 [IA64] constify function pointer tables [IA64] fix userspace compile error in gcc_intrin.h
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/bitops.h50
-rw-r--r--include/asm-ia64/gcc_intrin.h2
-rw-r--r--include/asm-ia64/mca.h6
-rw-r--r--include/asm-ia64/mca_asm.h3
-rw-r--r--include/asm-ia64/processor.h2
-rw-r--r--include/asm-ia64/sal.h14
6 files changed, 39 insertions, 38 deletions
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h
index a1b9719f5fbb..953d3df9dd22 100644
--- a/include/asm-ia64/bitops.h
+++ b/include/asm-ia64/bitops.h
@@ -122,38 +122,40 @@ clear_bit_unlock (int nr, volatile void *addr)
122} 122}
123 123
124/** 124/**
125 * __clear_bit_unlock - Non-atomically clear a bit with release 125 * __clear_bit_unlock - Non-atomically clears a bit in memory with release
126 * @nr: Bit to clear
127 * @addr: Address to start counting from
126 * 128 *
127 * This is like clear_bit_unlock, but the implementation uses a store 129 * Similarly to clear_bit_unlock, the implementation uses a store
128 * with release semantics. See also __raw_spin_unlock(). 130 * with release semantics. See also __raw_spin_unlock().
129 */ 131 */
130static __inline__ void 132static __inline__ void
131__clear_bit_unlock(int nr, volatile void *addr) 133__clear_bit_unlock(int nr, void *addr)
132{ 134{
133 __u32 mask, new; 135 __u32 * const m = (__u32 *) addr + (nr >> 5);
134 volatile __u32 *m; 136 __u32 const new = *m & ~(1 << (nr & 31));
135 137
136 m = (volatile __u32 *)addr + (nr >> 5);
137 mask = ~(1 << (nr & 31));
138 new = *m & mask;
139 barrier();
140 ia64_st4_rel_nta(m, new); 138 ia64_st4_rel_nta(m, new);
141} 139}
142 140
143/** 141/**
144 * __clear_bit - Clears a bit in memory (non-atomic version) 142 * __clear_bit - Clears a bit in memory (non-atomic version)
143 * @nr: the bit to clear
144 * @addr: the address to start counting from
145 *
146 * Unlike clear_bit(), this function is non-atomic and may be reordered.
147 * If it's called on the same region of memory simultaneously, the effect
148 * may be that only one operation succeeds.
145 */ 149 */
146static __inline__ void 150static __inline__ void
147__clear_bit (int nr, volatile void *addr) 151__clear_bit (int nr, volatile void *addr)
148{ 152{
149 volatile __u32 *p = (__u32 *) addr + (nr >> 5); 153 *((__u32 *) addr + (nr >> 5)) &= ~(1 << (nr & 31));
150 __u32 m = 1 << (nr & 31);
151 *p &= ~m;
152} 154}
153 155
154/** 156/**
155 * change_bit - Toggle a bit in memory 157 * change_bit - Toggle a bit in memory
156 * @nr: Bit to clear 158 * @nr: Bit to toggle
157 * @addr: Address to start counting from 159 * @addr: Address to start counting from
158 * 160 *
159 * change_bit() is atomic and may not be reordered. 161 * change_bit() is atomic and may not be reordered.
@@ -178,7 +180,7 @@ change_bit (int nr, volatile void *addr)
178 180
179/** 181/**
180 * __change_bit - Toggle a bit in memory 182 * __change_bit - Toggle a bit in memory
181 * @nr: the bit to set 183 * @nr: the bit to toggle
182 * @addr: the address to start counting from 184 * @addr: the address to start counting from
183 * 185 *
184 * Unlike change_bit(), this function is non-atomic and may be reordered. 186 * Unlike change_bit(), this function is non-atomic and may be reordered.
@@ -197,7 +199,7 @@ __change_bit (int nr, volatile void *addr)
197 * @addr: Address to count from 199 * @addr: Address to count from
198 * 200 *
199 * This operation is atomic and cannot be reordered. 201 * This operation is atomic and cannot be reordered.
200 * It also implies a memory barrier. 202 * It also implies the acquisition side of the memory barrier.
201 */ 203 */
202static __inline__ int 204static __inline__ int
203test_and_set_bit (int nr, volatile void *addr) 205test_and_set_bit (int nr, volatile void *addr)
@@ -247,11 +249,11 @@ __test_and_set_bit (int nr, volatile void *addr)
247 249
248/** 250/**
249 * test_and_clear_bit - Clear a bit and return its old value 251 * test_and_clear_bit - Clear a bit and return its old value
250 * @nr: Bit to set 252 * @nr: Bit to clear
251 * @addr: Address to count from 253 * @addr: Address to count from
252 * 254 *
253 * This operation is atomic and cannot be reordered. 255 * This operation is atomic and cannot be reordered.
254 * It also implies a memory barrier. 256 * It also implies the acquisition side of the memory barrier.
255 */ 257 */
256static __inline__ int 258static __inline__ int
257test_and_clear_bit (int nr, volatile void *addr) 259test_and_clear_bit (int nr, volatile void *addr)
@@ -272,7 +274,7 @@ test_and_clear_bit (int nr, volatile void *addr)
272 274
273/** 275/**
274 * __test_and_clear_bit - Clear a bit and return its old value 276 * __test_and_clear_bit - Clear a bit and return its old value
275 * @nr: Bit to set 277 * @nr: Bit to clear
276 * @addr: Address to count from 278 * @addr: Address to count from
277 * 279 *
278 * This operation is non-atomic and can be reordered. 280 * This operation is non-atomic and can be reordered.
@@ -292,11 +294,11 @@ __test_and_clear_bit(int nr, volatile void * addr)
292 294
293/** 295/**
294 * test_and_change_bit - Change a bit and return its old value 296 * test_and_change_bit - Change a bit and return its old value
295 * @nr: Bit to set 297 * @nr: Bit to change
296 * @addr: Address to count from 298 * @addr: Address to count from
297 * 299 *
298 * This operation is atomic and cannot be reordered. 300 * This operation is atomic and cannot be reordered.
299 * It also implies a memory barrier. 301 * It also implies the acquisition side of the memory barrier.
300 */ 302 */
301static __inline__ int 303static __inline__ int
302test_and_change_bit (int nr, volatile void *addr) 304test_and_change_bit (int nr, volatile void *addr)
@@ -315,8 +317,12 @@ test_and_change_bit (int nr, volatile void *addr)
315 return (old & bit) != 0; 317 return (old & bit) != 0;
316} 318}
317 319
318/* 320/**
319 * WARNING: non atomic version. 321 * __test_and_change_bit - Change a bit and return its old value
322 * @nr: Bit to change
323 * @addr: Address to count from
324 *
325 * This operation is non-atomic and can be reordered.
320 */ 326 */
321static __inline__ int 327static __inline__ int
322__test_and_change_bit (int nr, void *addr) 328__test_and_change_bit (int nr, void *addr)
diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h
index 5b6665c754c9..de2ed2cbdd84 100644
--- a/include/asm-ia64/gcc_intrin.h
+++ b/include/asm-ia64/gcc_intrin.h
@@ -24,7 +24,9 @@
24extern void ia64_bad_param_for_setreg (void); 24extern void ia64_bad_param_for_setreg (void);
25extern void ia64_bad_param_for_getreg (void); 25extern void ia64_bad_param_for_getreg (void);
26 26
27#ifdef __KERNEL__
27register unsigned long ia64_r13 asm ("r13") __used; 28register unsigned long ia64_r13 asm ("r13") __used;
29#endif
28 30
29#define ia64_setreg(regnum, val) \ 31#define ia64_setreg(regnum, val) \
30({ \ 32({ \
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h
index 823553bf12e6..f1663aa94a52 100644
--- a/include/asm-ia64/mca.h
+++ b/include/asm-ia64/mca.h
@@ -3,9 +3,9 @@
3 * Purpose: Machine check handling specific defines 3 * Purpose: Machine check handling specific defines
4 * 4 *
5 * Copyright (C) 1999, 2004 Silicon Graphics, Inc. 5 * Copyright (C) 1999, 2004 Silicon Graphics, Inc.
6 * Copyright (C) Vijay Chander (vijay@engr.sgi.com) 6 * Copyright (C) Vijay Chander <vijay@engr.sgi.com>
7 * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com) 7 * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com>
8 * Copyright (C) Russ Anderson (rja@sgi.com) 8 * Copyright (C) Russ Anderson <rja@sgi.com>
9 */ 9 */
10 10
11#ifndef _ASM_IA64_MCA_H 11#ifndef _ASM_IA64_MCA_H
diff --git a/include/asm-ia64/mca_asm.h b/include/asm-ia64/mca_asm.h
index 76203f9a8718..dd2a5b134390 100644
--- a/include/asm-ia64/mca_asm.h
+++ b/include/asm-ia64/mca_asm.h
@@ -1,8 +1,9 @@
1/* 1/*
2 * File: mca_asm.h 2 * File: mca_asm.h
3 * Purpose: Machine check handling specific defines
3 * 4 *
4 * Copyright (C) 1999 Silicon Graphics, Inc. 5 * Copyright (C) 1999 Silicon Graphics, Inc.
5 * Copyright (C) Vijay Chander (vijay@engr.sgi.com) 6 * Copyright (C) Vijay Chander <vijay@engr.sgi.com>
6 * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com> 7 * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com>
7 * Copyright (C) 2000 Hewlett-Packard Co. 8 * Copyright (C) 2000 Hewlett-Packard Co.
8 * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com> 9 * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 666385b68820..741f7ecb986a 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -473,7 +473,7 @@ ia64_set_psr (__u64 psr)
473{ 473{
474 ia64_stop(); 474 ia64_stop();
475 ia64_setreg(_IA64_REG_PSR_L, psr); 475 ia64_setreg(_IA64_REG_PSR_L, psr);
476 ia64_srlz_d(); 476 ia64_srlz_i();
477} 477}
478 478
479/* 479/*
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 1f5412d6f9bb..2251118894ae 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -649,17 +649,6 @@ typedef struct err_rec {
649 * Now define a couple of inline functions for improved type checking 649 * Now define a couple of inline functions for improved type checking
650 * and convenience. 650 * and convenience.
651 */ 651 */
652static inline long
653ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second,
654 unsigned long *drift_info)
655{
656 struct ia64_sal_retval isrv;
657
658 SAL_CALL(isrv, SAL_FREQ_BASE, which, 0, 0, 0, 0, 0, 0);
659 *ticks_per_second = isrv.v0;
660 *drift_info = isrv.v1;
661 return isrv.status;
662}
663 652
664extern s64 ia64_sal_cache_flush (u64 cache_type); 653extern s64 ia64_sal_cache_flush (u64 cache_type);
665extern void __init check_sal_cache_flush (void); 654extern void __init check_sal_cache_flush (void);
@@ -841,6 +830,9 @@ extern int ia64_sal_oemcall_nolock(struct ia64_sal_retval *, u64, u64, u64,
841 u64, u64, u64, u64, u64); 830 u64, u64, u64, u64, u64);
842extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64, 831extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64,
843 u64, u64, u64, u64, u64); 832 u64, u64, u64, u64, u64);
833extern long
834ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second,
835 unsigned long *drift_info);
844#ifdef CONFIG_HOTPLUG_CPU 836#ifdef CONFIG_HOTPLUG_CPU
845/* 837/*
846 * System Abstraction Layer Specification 838 * System Abstraction Layer Specification