]>
Commit | Line | Data |
---|---|---|
8f69975d BS |
1 | From: Bernhard Walle <bwalle@suse.de> |
2 | Subject: Add UV watchlist support | |
3 | References: bnc#442455 | |
4 | ||
5 | Add UV watchlist support. | |
6 | ||
7 | This is used by SGI xp drivers (drivers/misc/sgi-xp). | |
8 | ||
9 | Signed-off-by: Russ Anderson <rja@sgi.com> | |
10 | ||
11 | --- | |
12 | ||
13 | arch/ia64/include/asm/sn/sn_sal.h | 45 ++++++++++++++++++++++++++++++++++++++ | |
14 | 1 file changed, 45 insertions(+) | |
15 | ||
16 | Index: linux/arch/ia64/include/asm/sn/sn_sal.h | |
17 | =================================================================== | |
18 | --- linux.orig/arch/ia64/include/asm/sn/sn_sal.h 2008-11-05 09:21:48.690243174 -0600 | |
19 | +++ linux/arch/ia64/include/asm/sn/sn_sal.h 2008-11-05 09:22:01.847928152 -0600 | |
20 | @@ -90,6 +90,8 @@ | |
21 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | |
22 | ||
23 | #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 | |
24 | +#define SN_SAL_WATCHLIST_ALLOC 0x02000070 | |
25 | +#define SN_SAL_WATCHLIST_FREE 0x02000071 | |
26 | ||
27 | /* | |
28 | * Service-specific constants | |
29 | @@ -1183,6 +1185,49 @@ ia64_sn_kernel_launch_event(void) | |
30 | { | |
31 | struct ia64_sal_retval rv; | |
32 | SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0); | |
33 | + return rv.status; | |
34 | +} | |
35 | + | |
36 | +union sn_watchlist_u { | |
37 | + u64 val; | |
38 | + struct { | |
39 | + u64 blade : 16, | |
40 | + size : 32, | |
41 | + filler : 16; | |
42 | + }; | |
43 | +}; | |
44 | + | |
45 | +static inline int | |
46 | +sn_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size, | |
47 | + unsigned long *intr_mmr_offset) | |
48 | +{ | |
49 | + struct ia64_sal_retval rv; | |
50 | + unsigned long addr; | |
51 | + union sn_watchlist_u size_blade; | |
52 | + int watchlist; | |
53 | + | |
54 | + addr = (unsigned long)mq; | |
55 | + size_blade.size = mq_size; | |
56 | + size_blade.blade = blade; | |
57 | + | |
58 | + /* | |
59 | + * bios returns watchlist number or negative error number. | |
60 | + */ | |
61 | + ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_ALLOC, addr, | |
62 | + size_blade.val, (u64)intr_mmr_offset, | |
63 | + (u64)&watchlist, 0, 0, 0); | |
64 | + if (rv.status < 0) | |
65 | + return rv.status; | |
66 | + | |
67 | + return watchlist; | |
68 | +} | |
69 | + | |
70 | +static inline int | |
71 | +sn_mq_watchlist_free(int blade, int watchlist_num) | |
72 | +{ | |
73 | + struct ia64_sal_retval rv; | |
74 | + ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_FREE, blade, | |
75 | + watchlist_num, 0, 0, 0, 0, 0); | |
76 | return rv.status; | |
77 | } | |
78 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |