mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 01:36:52 +09:00
x86/UV2: Fix BAU destination timeout initialization
commit d059f9fa84 upstream.
Move the call to enable_timeouts() forward so that
BAU_MISC_CONTROL is initialized before using it in
calculate_destination_timeout().
Fix the calculation of a BAU destination timeout
for UV2 (in calculate_destination_timeout()).
Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6c8e76e158
commit
415b95df64
@@ -1575,14 +1575,14 @@ static int calculate_destination_timeout(void)
|
||||
ts_ns = base * mult1 * mult2;
|
||||
ret = ts_ns / 1000;
|
||||
} else {
|
||||
/* 4 bits 0/1 for 10/80us, 3 bits of multiplier */
|
||||
mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL);
|
||||
/* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */
|
||||
mmr_image = uv_read_local_mmr(UVH_LB_BAU_MISC_CONTROL);
|
||||
mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT;
|
||||
if (mmr_image & (1L << UV2_ACK_UNITS_SHFT))
|
||||
mult1 = 80;
|
||||
base = 80;
|
||||
else
|
||||
mult1 = 10;
|
||||
base = mmr_image & UV2_ACK_MASK;
|
||||
base = 10;
|
||||
mult1 = mmr_image & UV2_ACK_MASK;
|
||||
ret = mult1 * base;
|
||||
}
|
||||
return ret;
|
||||
@@ -1820,6 +1820,8 @@ static int __init uv_bau_init(void)
|
||||
uv_base_pnode = uv_blade_to_pnode(uvhub);
|
||||
}
|
||||
|
||||
enable_timeouts();
|
||||
|
||||
if (init_per_cpu(nuvhubs, uv_base_pnode)) {
|
||||
nobau = 1;
|
||||
return 0;
|
||||
@@ -1830,7 +1832,6 @@ static int __init uv_bau_init(void)
|
||||
if (uv_blade_nr_possible_cpus(uvhub))
|
||||
init_uvhub(uvhub, vector, uv_base_pnode);
|
||||
|
||||
enable_timeouts();
|
||||
alloc_intr_gate(vector, uv_bau_message_intr1);
|
||||
|
||||
for_each_possible_blade(uvhub) {
|
||||
|
||||
Reference in New Issue
Block a user