1 From: Russ Anderson <rja@sgi.com>
2 Subject: Add UV bios calls to allocate and free watchlists.
5 Add UV bios calls to allocate and free watchlists.
8 Signed-off-by: Russ Anderson <rja@sgi.com>
9 Acked-by: Bernhard Walle <bwalle@suse.de>
12 arch/x86/kernel/bios_uv.c | 33 +++++++++++++++++++++++++++++++++
13 include/asm-x86/uv/bios.h | 17 ++++++++++++++++-
14 2 files changed, 49 insertions(+), 1 deletion(-)
16 --- a/arch/x86/kernel/bios_uv.c
17 +++ b/arch/x86/kernel/bios_uv.c
18 @@ -100,6 +100,39 @@ s64 uv_bios_get_sn_info(int fc, int *uvt
23 +uv_bios_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size,
24 + unsigned long *intr_mmr_offset)
26 + union uv_watchlist_u size_blade;
31 + addr = (unsigned long)mq;
32 + size_blade.size = mq_size;
33 + size_blade.blade = blade;
36 + * bios returns watchlist number or negative error number.
38 + ret = (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_ALLOC, addr,
39 + size_blade.val, (u64)intr_mmr_offset,
40 + (u64)&watchlist, 0);
41 + if (ret < BIOS_STATUS_SUCCESS)
46 +EXPORT_SYMBOL_GPL(uv_bios_mq_watchlist_alloc);
49 +uv_bios_mq_watchlist_free(int blade, int watchlist_num)
51 + return (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_FREE,
52 + blade, watchlist_num, 0, 0, 0);
54 +EXPORT_SYMBOL_GPL(uv_bios_mq_watchlist_free);
56 s64 uv_bios_freq_base(u64 clock_type, u64 *ticks_per_second)
58 --- a/include/asm-x86/uv/bios.h
59 +++ b/include/asm-x86/uv/bios.h
66 + UV_BIOS_WATCHLIST_ALLOC,
67 + UV_BIOS_WATCHLIST_FREE
71 @@ -71,6 +73,15 @@ union partition_info_u {
75 +union uv_watchlist_u {
85 * bios calls have 6 parameters
87 @@ -80,9 +91,13 @@ extern s64 uv_bios_call_reentrant(enum u
89 extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *);
90 extern s64 uv_bios_freq_base(u64, u64 *);
91 +extern int uv_bios_mq_watchlist_alloc(int, void *, unsigned int,
93 +extern int uv_bios_mq_watchlist_free(int, int);
95 extern void uv_bios_init(void);
97 +extern unsigned long sn_rtc_cycles_per_second;
99 extern long sn_partition_id;
100 extern long sn_coherency_id;