Add UV partition call
PATCH 3/4 Add UV partition call
[PATCH 3/4] Add UV partition call
Add a bios call to return partitioning related info.
Signed-off-by Russ Anderson <[email protected]>
--- arch/x86/kernel/bios_uv.c | 44 ++++++++++++++++++++++++++++++++++----- arch/x86/kernel/genx2apic_uv_x.c | 14 +++++++----- include/asm-x86/uv/bios.h | 22 ++++++++++++++++--- 3 files changed, 66 insertions(+), 14 deletions(-)
arch/x86/kernel/genx2apic_uv_x.c +8 -6
@@ -342,12 +342,12 @@ static __init void map_mmioh_high(int mastatic __init void uv_rtc_init (void ) { -long status, ticks_per_sec, drift; +long status; +u64 ticks_per_sec; - status = -x86_bios_freq_base (BIOS_FREQ_BASE_REALTIME_CLOCK , &ticks_per_sec, - &drift); -if (status !=0 || ticks_per_sec <100000 ) { + status =uv_bios_freq_base (BIOS_FREQ_BASE_REALTIME_CLOCK , + &ticks_per_sec); +if (status !=BIOS_STATUS_SUCCESS || ticks_per_sec <100000 ) {printk (KERN_WARNING "unable to determine platform RTC clock frequency, " "guessing.\n" );
@@ -428,6 +428,8 @@ void __init uv_system_init(void) gnode_upper = (((unsigned long )node_id.s.node_id) & ~((1 << n_val) -1 )) << m_val; +uv_bios_get_sn_info (0 , &uv_type, &sn_partition_id, + &uv_coherency_id, &uv_region_size);uv_rtc_init ();for_each_present_cpu (cpu) {
@@ -449,7 +451,7 @@ void __init uv_system_init(void)uv_cpu_hub_info (cpu)->gpa_mask = (1 << (m_val + n_val)) -1 ;uv_cpu_hub_info (cpu)->gnode_upper = gnode_upper;uv_cpu_hub_info (cpu)->global_mmr_base = mmr_base; -uv_cpu_hub_info (cpu)->coherency_domain_number =0 ;/* ZZZ */ +uv_cpu_hub_info (cpu)->coherency_domain_number = uv_coherency_id; uv_node_to_blade[nid] = blade; uv_cpu_to_blade[cpu] = blade; max_pnode =max (pnode, max_pnode);
include/asm-x86/uv/bios.h +19 -3
@@ -51,6 +51,16 @@ enum { BIOS_FREQ_BASE_REALTIME_CLOCK = 2 }; +union partition_info_u { +u64 val; +struct { +u64 hub_version :8 , + partition_id :16 , + coherence_id :16 , + region_size :24 ; + }; +}; +/* * bios calls have 6 parameters */
@@ -58,9 +68,15 @@ extern s64 uv_bios_call(enum uv_bios_cmdextern s64 uv_bios_call_irqsave (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 );extern s64 uv_bios_call_reentrant (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 ); +extern s64 uv_bios_get_sn_info (int ,int *,long *,long *,long *); +extern s64 uv_bios_freq_base (u64 ,u64 *); + + +extern int uv_type; +extern long sn_partition_id; +extern long uv_coherency_id; +extern long uv_region_size; +#define partition_coherence_id () (uv_coherency_id) -extern long -x86_bios_freq_base (unsigned long which,unsigned long *ticks_per_second, -unsigned long *drift_info);#endif /* ASM_X86__UV__BIOS_H */
arch/x86/kernel/bios_uv.c +39 -5
56 lines not on this page · raw message
Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead SGI - Silicon Graphics Inc [email protected]