diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-11 02:59:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 02:59:21 -0400 |
commit | cf206bffbb7542df54043fad9898113172af99d8 (patch) | |
tree | c7e7ca9a93443b888f98a0c07e74751a1aa3c947 /include/asm-ia64/rse.h | |
parent | c1955a3d4762e7a9bf84035eb3c4886a900f0d15 (diff) | |
parent | 796aadeb1b2db9b5d463946766c5bbfd7717158c (diff) |
Merge branch 'linus' into sched/clock
Diffstat (limited to 'include/asm-ia64/rse.h')
-rw-r--r-- | include/asm-ia64/rse.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/include/asm-ia64/rse.h b/include/asm-ia64/rse.h deleted file mode 100644 index 02830a3b0196..000000000000 --- a/include/asm-ia64/rse.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #ifndef _ASM_IA64_RSE_H | ||
2 | #define _ASM_IA64_RSE_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1998, 1999 Hewlett-Packard Co | ||
6 | * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com> | ||
7 | * | ||
8 | * Register stack engine related helper functions. This file may be | ||
9 | * used in applications, so be careful about the name-space and give | ||
10 | * some consideration to non-GNU C compilers (though __inline__ is | ||
11 | * fine). | ||
12 | */ | ||
13 | |||
14 | static __inline__ unsigned long | ||
15 | ia64_rse_slot_num (unsigned long *addr) | ||
16 | { | ||
17 | return (((unsigned long) addr) >> 3) & 0x3f; | ||
18 | } | ||
19 | |||
20 | /* | ||
21 | * Return TRUE if ADDR is the address of an RNAT slot. | ||
22 | */ | ||
23 | static __inline__ unsigned long | ||
24 | ia64_rse_is_rnat_slot (unsigned long *addr) | ||
25 | { | ||
26 | return ia64_rse_slot_num(addr) == 0x3f; | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | * Returns the address of the RNAT slot that covers the slot at | ||
31 | * address SLOT_ADDR. | ||
32 | */ | ||
33 | static __inline__ unsigned long * | ||
34 | ia64_rse_rnat_addr (unsigned long *slot_addr) | ||
35 | { | ||
36 | return (unsigned long *) ((unsigned long) slot_addr | (0x3f << 3)); | ||
37 | } | ||
38 | |||
39 | /* | ||
40 | * Calculate the number of registers in the dirty partition starting at BSPSTORE and | ||
41 | * ending at BSP. This isn't simply (BSP-BSPSTORE)/8 because every 64th slot stores | ||
42 | * ar.rnat. | ||
43 | */ | ||
44 | static __inline__ unsigned long | ||
45 | ia64_rse_num_regs (unsigned long *bspstore, unsigned long *bsp) | ||
46 | { | ||
47 | unsigned long slots = (bsp - bspstore); | ||
48 | |||
49 | return slots - (ia64_rse_slot_num(bspstore) + slots)/0x40; | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * The inverse of the above: given bspstore and the number of | ||
54 | * registers, calculate ar.bsp. | ||
55 | */ | ||
56 | static __inline__ unsigned long * | ||
57 | ia64_rse_skip_regs (unsigned long *addr, long num_regs) | ||
58 | { | ||
59 | long delta = ia64_rse_slot_num(addr) + num_regs; | ||
60 | |||
61 | if (num_regs < 0) | ||
62 | delta -= 0x3e; | ||
63 | return addr + num_regs + delta/0x3f; | ||
64 | } | ||
65 | |||
66 | #endif /* _ASM_IA64_RSE_H */ | ||