|
@@ -37,7 +37,7 @@ static int timeout_base_ns[] = {
|
|
|
};
|
|
|
|
|
|
static int timeout_us;
|
|
|
-static int nobau;
|
|
|
+static bool nobau = true;
|
|
|
static int nobau_perm;
|
|
|
static cycles_t congested_cycles;
|
|
|
|
|
@@ -106,13 +106,28 @@ static char *stat_description[] = {
|
|
|
"enable: number times use of the BAU was re-enabled"
|
|
|
};
|
|
|
|
|
|
-static int __init
|
|
|
-setup_nobau(char *arg)
|
|
|
+static int __init setup_bau(char *arg)
|
|
|
{
|
|
|
- nobau = 1;
|
|
|
+ int result;
|
|
|
+
|
|
|
+ if (!arg)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ result = strtobool(arg, &nobau);
|
|
|
+ if (result)
|
|
|
+ return result;
|
|
|
+
|
|
|
+ /* we need to flip the logic here, so that bau=y sets nobau to false */
|
|
|
+ nobau = !nobau;
|
|
|
+
|
|
|
+ if (!nobau)
|
|
|
+ pr_info("UV BAU Enabled\n");
|
|
|
+ else
|
|
|
+ pr_info("UV BAU Disabled\n");
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
-early_param("nobau", setup_nobau);
|
|
|
+early_param("bau", setup_bau);
|
|
|
|
|
|
/* base pnode in this partition */
|
|
|
static int uv_base_pnode __read_mostly;
|
|
@@ -131,10 +146,10 @@ set_bau_on(void)
|
|
|
pr_info("BAU not initialized; cannot be turned on\n");
|
|
|
return;
|
|
|
}
|
|
|
- nobau = 0;
|
|
|
+ nobau = false;
|
|
|
for_each_present_cpu(cpu) {
|
|
|
bcp = &per_cpu(bau_control, cpu);
|
|
|
- bcp->nobau = 0;
|
|
|
+ bcp->nobau = false;
|
|
|
}
|
|
|
pr_info("BAU turned on\n");
|
|
|
return;
|
|
@@ -146,10 +161,10 @@ set_bau_off(void)
|
|
|
int cpu;
|
|
|
struct bau_control *bcp;
|
|
|
|
|
|
- nobau = 1;
|
|
|
+ nobau = true;
|
|
|
for_each_present_cpu(cpu) {
|
|
|
bcp = &per_cpu(bau_control, cpu);
|
|
|
- bcp->nobau = 1;
|
|
|
+ bcp->nobau = true;
|
|
|
}
|
|
|
pr_info("BAU turned off\n");
|
|
|
return;
|
|
@@ -1886,7 +1901,7 @@ static void __init init_per_cpu_tunables(void)
|
|
|
bcp = &per_cpu(bau_control, cpu);
|
|
|
bcp->baudisabled = 0;
|
|
|
if (nobau)
|
|
|
- bcp->nobau = 1;
|
|
|
+ bcp->nobau = true;
|
|
|
bcp->statp = &per_cpu(ptcstats, cpu);
|
|
|
/* time interval to catch a hardware stay-busy bug */
|
|
|
bcp->timeout_interval = usec_2_cycles(2*timeout_us);
|