aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/bios_uv.c
diff options
context:
space:
mode:
authorRuss Anderson <rja@sgi.com>2008-10-03 12:59:33 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:13 -0400
commit922402f15a85f7a064926eb1db68cc52bc4d4a91 (patch)
tree8e76ac0210479f4babffd71d349d6bcb1e495e16 /arch/x86/kernel/bios_uv.c
parent7f5942329e0787087a5e4dced838cee711ac2b58 (diff)
x86: Add UV partition call v4
Add a bios call to return partitioning related info. Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/bios_uv.c')
-rw-r--r--arch/x86/kernel/bios_uv.c44
1 files changed, 39 insertions, 5 deletions
diff --git a/arch/x86/kernel/bios_uv.c b/arch/x86/kernel/bios_uv.c
index 5481eb59f783..f0dfe6f17e7e 100644
--- a/arch/x86/kernel/bios_uv.c
+++ b/arch/x86/kernel/bios_uv.c
@@ -23,6 +23,7 @@
23#include <asm/efi.h> 23#include <asm/efi.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <asm/uv/bios.h> 25#include <asm/uv/bios.h>
26#include <asm/uv/uv_hub.h>
26 27
27struct uv_systab uv_systab; 28struct uv_systab uv_systab;
28 29
@@ -65,14 +66,47 @@ s64 uv_bios_call_reentrant(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
65 return ret; 66 return ret;
66} 67}
67 68
68long 69
69x86_bios_freq_base(unsigned long clock_type, unsigned long *ticks_per_second, 70long sn_partition_id;
70 unsigned long *drift_info) 71EXPORT_SYMBOL_GPL(sn_partition_id);
72long uv_coherency_id;
73EXPORT_SYMBOL_GPL(uv_coherency_id);
74long uv_region_size;
75EXPORT_SYMBOL_GPL(uv_region_size);
76int uv_type;
77
78
79s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher,
80 long *region)
81{
82 s64 ret;
83 u64 v0, v1;
84 union partition_info_u part;
85
86 ret = uv_bios_call_irqsave(UV_BIOS_GET_SN_INFO, fc,
87 (u64)(&v0), (u64)(&v1), 0, 0);
88 if (ret != BIOS_STATUS_SUCCESS)
89 return ret;
90
91 part.val = v0;
92 if (uvtype)
93 *uvtype = part.hub_version;
94 if (partid)
95 *partid = part.partition_id;
96 if (coher)
97 *coher = part.coherence_id;
98 if (region)
99 *region = part.region_size;
100 return ret;
101}
102
103
104s64 uv_bios_freq_base(u64 clock_type, u64 *ticks_per_second)
71{ 105{
72 return uv_bios_call(UV_BIOS_FREQ_BASE, clock_type, 106 return uv_bios_call(UV_BIOS_FREQ_BASE, clock_type,
73 (u64)ticks_per_second, 0, 0, 0); 107 (u64)ticks_per_second, 0, 0, 0);
74} 108}
75EXPORT_SYMBOL_GPL(x86_bios_freq_base); 109EXPORT_SYMBOL_GPL(uv_bios_freq_base);
76 110
77 111
78#ifdef CONFIG_EFI 112#ifdef CONFIG_EFI