diff options
author | Jack Steiner <steiner@sgi.com> | 2005-08-31 11:05:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-08-31 14:00:53 -0400 |
commit | a1cddb88920b915eaba10712ecfd0fc698b00a22 (patch) | |
tree | 1d20af805193ab9982a48cb4c828c0f6af034c6c /arch/ia64 | |
parent | d8971fcb702e24d1e22c77fd1772f182ffee87e3 (diff) |
[IA64-SGI] Add new vendor-specific SAL calls for:
- notifying the PROM of specific features that are supported by the OS.
This is used to enable PROM feature if and only if the corresponding
feature is implemented in the OS
- fetch feature sets that are supported by the current PROM. This allows
the OS to selectively enable features when the PROM support is available.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index 7c7fe441d623..981928f35a8c 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <asm/sn/clksupport.h> | 49 | #include <asm/sn/clksupport.h> |
50 | #include <asm/sn/sn_sal.h> | 50 | #include <asm/sn/sn_sal.h> |
51 | #include <asm/sn/geo.h> | 51 | #include <asm/sn/geo.h> |
52 | #include <asm/sn/sn_feature_sets.h> | ||
52 | #include "xtalk/xwidgetdev.h" | 53 | #include "xtalk/xwidgetdev.h" |
53 | #include "xtalk/hubdev.h" | 54 | #include "xtalk/hubdev.h" |
54 | #include <asm/sn/klconfig.h> | 55 | #include <asm/sn/klconfig.h> |
@@ -99,6 +100,7 @@ EXPORT_SYMBOL(sn_region_size); | |||
99 | int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ | 100 | int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ |
100 | 101 | ||
101 | short physical_node_map[MAX_PHYSNODE_ID]; | 102 | short physical_node_map[MAX_PHYSNODE_ID]; |
103 | static unsigned long sn_prom_features[MAX_PROM_FEATURE_SETS]; | ||
102 | 104 | ||
103 | EXPORT_SYMBOL(physical_node_map); | 105 | EXPORT_SYMBOL(physical_node_map); |
104 | 106 | ||
@@ -273,7 +275,10 @@ void __init sn_setup(char **cmdline_p) | |||
273 | u32 version = sn_sal_rev(); | 275 | u32 version = sn_sal_rev(); |
274 | extern void sn_cpu_init(void); | 276 | extern void sn_cpu_init(void); |
275 | 277 | ||
276 | ia64_sn_plat_set_error_handling_features(); | 278 | ia64_sn_plat_set_error_handling_features(); // obsolete |
279 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); | ||
280 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); | ||
281 | |||
277 | 282 | ||
278 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) | 283 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) |
279 | /* | 284 | /* |
@@ -316,16 +321,6 @@ void __init sn_setup(char **cmdline_p) | |||
316 | 321 | ||
317 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | 322 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); |
318 | 323 | ||
319 | /* | ||
320 | * Confirm the SAL we're running on is recent enough... | ||
321 | */ | ||
322 | if (version < SN_SAL_MIN_VERSION) { | ||
323 | printk(KERN_ERR "This kernel needs SGI SAL version >= " | ||
324 | "%x.%02x\n", SN_SAL_MIN_VERSION >> 8, | ||
325 | SN_SAL_MIN_VERSION & 0x00FF); | ||
326 | panic("PROM version too old\n"); | ||
327 | } | ||
328 | |||
329 | master_nasid = boot_get_nasid(); | 324 | master_nasid = boot_get_nasid(); |
330 | 325 | ||
331 | status = | 326 | status = |
@@ -481,6 +476,10 @@ void __init sn_cpu_init(void) | |||
481 | if (nodepdaindr[0] == NULL) | 476 | if (nodepdaindr[0] == NULL) |
482 | return; | 477 | return; |
483 | 478 | ||
479 | for (i = 0; i < MAX_PROM_FEATURE_SETS; i++) | ||
480 | if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0) | ||
481 | break; | ||
482 | |||
484 | cpuid = smp_processor_id(); | 483 | cpuid = smp_processor_id(); |
485 | cpuphyid = get_sapicid(); | 484 | cpuphyid = get_sapicid(); |
486 | 485 | ||
@@ -652,3 +651,12 @@ nasid_slice_to_cpuid(int nasid, int slice) | |||
652 | 651 | ||
653 | return -1; | 652 | return -1; |
654 | } | 653 | } |
654 | |||
655 | int sn_prom_feature_available(int id) | ||
656 | { | ||
657 | if (id >= BITS_PER_LONG * MAX_PROM_FEATURE_SETS) | ||
658 | return 0; | ||
659 | return test_bit(id, sn_prom_features); | ||
660 | } | ||
661 | EXPORT_SYMBOL(sn_prom_feature_available); | ||
662 | |||