From d14bbdd07b626516259ae31123acce3f5ae13046 Mon Sep 17 00:00:00 2001 From: Russ Anderson Date: Mon, 3 Nov 2008 13:29:41 -0800 Subject: [PATCH] --- yaml --- r: 118587 b: refs/heads/master c: 7576f684494e927b901eee25a44ce52c82f9f60e h: refs/heads/master i: 118585: fcb184cca74c1d1e639093fed60342badbd19767 118583: 3c997b6b253544999a818835ea306d7ca9672779 v: v3 --- [refs] | 2 +- trunk/arch/ia64/include/asm/sn/sn_sal.h | 45 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c035d2d8ee09..b5189553ab86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ac8d3fb22b593d39d161dcd716af0f1f7546837 +refs/heads/master: 7576f684494e927b901eee25a44ce52c82f9f60e diff --git a/trunk/arch/ia64/include/asm/sn/sn_sal.h b/trunk/arch/ia64/include/asm/sn/sn_sal.h index 57e649d388b8..e310fc0135dc 100644 --- a/trunk/arch/ia64/include/asm/sn/sn_sal.h +++ b/trunk/arch/ia64/include/asm/sn/sn_sal.h @@ -90,6 +90,8 @@ #define SN_SAL_SET_CPU_NUMBER 0x02000068 #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 +#define SN_SAL_WATCHLIST_ALLOC 0x02000070 +#define SN_SAL_WATCHLIST_FREE 0x02000071 /* * Service-specific constants @@ -1185,4 +1187,47 @@ ia64_sn_kernel_launch_event(void) SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0); return rv.status; } + +union sn_watchlist_u { + u64 val; + struct { + u64 blade : 16, + size : 32, + filler : 16; + }; +}; + +static inline int +sn_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size, + unsigned long *intr_mmr_offset) +{ + struct ia64_sal_retval rv; + unsigned long addr; + union sn_watchlist_u size_blade; + int watchlist; + + addr = (unsigned long)mq; + size_blade.size = mq_size; + size_blade.blade = blade; + + /* + * bios returns watchlist number or negative error number. + */ + ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_ALLOC, addr, + size_blade.val, (u64)intr_mmr_offset, + (u64)&watchlist, 0, 0, 0); + if (rv.status < 0) + return rv.status; + + return watchlist; +} + +static inline int +sn_mq_watchlist_free(int blade, int watchlist_num) +{ + struct ia64_sal_retval rv; + ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_FREE, blade, + watchlist_num, 0, 0, 0, 0, 0); + return rv.status; +} #endif /* _ASM_IA64_SN_SN_SAL_H */