x86, UV: Disable BAU on network congestion
[pandora-kernel.git] / arch / x86 / kernel / tlb_uv.c
index 7fea555..dc6a683 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <linux/seq_file.h>
 #include <linux/proc_fs.h>
+#include <linux/debugfs.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
@@ -30,11 +31,37 @@ struct msg_desc {
        struct bau_payload_queue_entry *va_queue_last;
 };
 
-#define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD        0x000000000bUL
-
-static int uv_bau_max_concurrent __read_mostly;
-
+/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */
+static int timeout_base_ns[] = {
+               20,
+               160,
+               1280,
+               10240,
+               81920,
+               655360,
+               5242880,
+               167772160
+};
+static int timeout_us;
 static int nobau;
+static int baudisabled;
+static spinlock_t disable_lock;
+static cycles_t congested_cycles;
+
+/* tunables: */
+static int max_bau_concurrent = MAX_BAU_CONCURRENT;
+static int max_bau_concurrent_constant = MAX_BAU_CONCURRENT;
+static int plugged_delay = PLUGGED_DELAY;
+static int plugsb4reset = PLUGSB4RESET;
+static int timeoutsb4reset = TIMEOUTSB4RESET;
+static int ipi_reset_limit = IPI_RESET_LIMIT;
+static int complete_threshold = COMPLETE_THRESHOLD;
+static int congested_response_us = CONGESTED_RESPONSE_US;
+static int congested_reps = CONGESTED_REPS;
+static int congested_period = CONGESTED_PERIOD;
+static struct dentry *tunables_dir;
+static struct dentry *tunables_file;
+
 static int __init setup_nobau(char *arg)
 {
        nobau = 1;
@@ -423,7 +450,8 @@ static int uv_wait_completion(struct bau_desc *bau_desc,
                         * pending.  In that case hardware returns the
                         * ERROR that looks like a destination timeout.
                         */
-                       if (cycles_2_us(ttime - bcp->send_message) < BIOS_TO) {
+                       if (cycles_2_us(ttime - bcp->send_message) <
+                                                       timeout_us) {
                                bcp->conseccompletes = 0;
                                return FLUSH_RETRY_PLUGGED;
                        }
@@ -494,6 +522,35 @@ static inline int atomic_inc_unless_ge(spinlock_t *lock, atomic_t *v, int u)
        return 1;
 }
 
+/*
+ * Completions are taking a very long time due to a congested numalink
+ * network.
+ */
+static void
+disable_for_congestion(struct bau_control *bcp, struct ptc_stats *stat)
+{
+       int tcpu;
+       struct bau_control *tbcp;
+
+       /* let only one cpu do this disabling */
+       spin_lock(&disable_lock);
+       if (!baudisabled && bcp->period_requests &&
+           ((bcp->period_time / bcp->period_requests) > congested_cycles)) {
+               /* it becomes this cpu's job to turn on the use of the
+                  BAU again */
+               baudisabled = 1;
+               bcp->set_bau_off = 1;
+               bcp->set_bau_on_time = get_cycles() +
+                       sec_2_cycles(bcp->congested_period);
+               stat->s_bau_disabled++;
+               for_each_present_cpu(tcpu) {
+                       tbcp = &per_cpu(bau_control, tcpu);
+                               tbcp->baudisabled = 1;
+               }
+       }
+       spin_unlock(&disable_lock);
+}
+
 /**
  * uv_flush_send_and_wait
  *
@@ -525,23 +582,24 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
        unsigned long index;
        cycles_t time1;
        cycles_t time2;
+       cycles_t elapsed;
        struct ptc_stats *stat = &per_cpu(ptcstats, bcp->cpu);
        struct bau_control *smaster = bcp->socket_master;
        struct bau_control *hmaster = bcp->uvhub_master;
 
        /*
-        * Spin here while there are hmaster->max_concurrent or more active
+        * Spin here while there are hmaster->max_bau_concurrent or more active
         * descriptors. This is the per-uvhub 'throttle'.
         */
        if (!atomic_inc_unless_ge(&hmaster->uvhub_lock,
                        &hmaster->active_descriptor_count,
-                       hmaster->max_concurrent)) {
+                       hmaster->max_bau_concurrent)) {
                stat->s_throttles++;
                do {
                        cpu_relax();
                } while (!atomic_inc_unless_ge(&hmaster->uvhub_lock,
                        &hmaster->active_descriptor_count,
-                       hmaster->max_concurrent));
+                       hmaster->max_bau_concurrent));
        }
 
        while (hmaster->uvhub_quiesce)
@@ -595,9 +653,9 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
                         * that case hardware immediately returns the ERROR
                         * that looks like a destination timeout.
                         */
-                       udelay(TIMEOUT_DELAY);
+                       udelay(bcp->plugged_delay);
                        bcp->plugged_tries++;
-                       if (bcp->plugged_tries >= PLUGSB4RESET) {
+                       if (bcp->plugged_tries >= bcp->plugsb4reset) {
                                bcp->plugged_tries = 0;
                                quiesce_local_uvhub(hmaster);
                                spin_lock(&hmaster->queue_lock);
@@ -609,10 +667,10 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
                                stat->s_resets_plug++;
                        }
                } else if (completion_status == FLUSH_RETRY_TIMEOUT) {
-                       hmaster->max_concurrent = 1;
+                       hmaster->max_bau_concurrent = 1;
                        bcp->timeout_tries++;
                        udelay(TIMEOUT_DELAY);
-                       if (bcp->timeout_tries >= TIMEOUTSB4RESET) {
+                       if (bcp->timeout_tries >= bcp->timeoutsb4reset) {
                                bcp->timeout_tries = 0;
                                quiesce_local_uvhub(hmaster);
                                spin_lock(&hmaster->queue_lock);
@@ -624,7 +682,7 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
                                stat->s_resets_timeout++;
                        }
                }
-               if (bcp->ipi_attempts >= 3) {
+               if (bcp->ipi_attempts >= bcp->ipi_reset_limit) {
                        bcp->ipi_attempts = 0;
                        completion_status = FLUSH_GIVEUP;
                        break;
@@ -634,9 +692,14 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
                 (completion_status == FLUSH_RETRY_TIMEOUT));
        time2 = get_cycles();
 
-       if ((completion_status == FLUSH_COMPLETE) && (bcp->conseccompletes > 5)
-           && (hmaster->max_concurrent < hmaster->max_concurrent_constant))
-                       hmaster->max_concurrent++;
+       bcp->plugged_tries = 0;
+       bcp->timeout_tries = 0;
+
+       if ((completion_status == FLUSH_COMPLETE) &&
+           (bcp->conseccompletes > bcp->complete_threshold) &&
+           (hmaster->max_bau_concurrent <
+                                       hmaster->max_bau_concurrent_constant))
+                       hmaster->max_bau_concurrent++;
 
        /*
         * hold any cpu not timing out here; no other cpu currently held by
@@ -647,9 +710,18 @@ const struct cpumask *uv_flush_send_and_wait(struct bau_desc *bau_desc,
        atomic_dec(&hmaster->active_descriptor_count);
 
        /* guard against cycles wrap */
-       if (time2 > time1)
-               stat->s_time += (time2 - time1);
-       else
+       if (time2 > time1) {
+               elapsed = time2 - time1;
+               stat->s_time += elapsed;
+               if ((completion_status == FLUSH_COMPLETE) && (try == 1)) {
+                       bcp->period_requests++;
+                       bcp->period_time += elapsed;
+                       if ((elapsed > congested_cycles) &&
+                           (bcp->period_requests > bcp->congested_reps)) {
+                               disable_for_congestion(bcp, stat);
+                       }
+               }
+       } else
                stat->s_requestor--; /* don't count this one */
        if (completion_status == FLUSH_COMPLETE && try > 1)
                stat->s_retriesok++;
@@ -715,11 +787,33 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
        struct cpumask *flush_mask;
        struct ptc_stats *stat;
        struct bau_control *bcp;
+       struct bau_control *tbcp;
 
+       /* kernel was booted 'nobau' */
        if (nobau)
                return cpumask;
 
        bcp = &per_cpu(bau_control, cpu);
+       stat = &per_cpu(ptcstats, cpu);
+
+       /* bau was disabled due to slow response */
+       if (bcp->baudisabled) {
+               /* the cpu that disabled it must re-enable it */
+               if (bcp->set_bau_off) {
+                       if (get_cycles() >= bcp->set_bau_on_time) {
+                               stat->s_bau_reenabled++;
+                               baudisabled = 0;
+                               for_each_present_cpu(tcpu) {
+                                       tbcp = &per_cpu(bau_control, tcpu);
+                                       tbcp->baudisabled = 0;
+                                       tbcp->period_requests = 0;
+                                       tbcp->period_time = 0;
+                               }
+                       }
+               }
+               return cpumask;
+       }
+
        /*
         * Each sending cpu has a per-cpu mask which it fills from the caller's
         * cpu mask.  Only remote cpus are converted to uvhubs and copied.
@@ -759,7 +853,6 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
                else
                        return NULL;
        }
-       stat = &per_cpu(ptcstats, cpu);
        stat->s_requestor++;
        stat->s_ntargcpu += remotes;
        remotes = bau_uvhub_weight(&bau_desc->distribution);
@@ -908,12 +1001,12 @@ static void uv_ptc_seq_stop(struct seq_file *file, void *data)
 }
 
 static inline unsigned long long
-millisec_2_cycles(unsigned long millisec)
+microsec_2_cycles(unsigned long microsec)
 {
        unsigned long ns;
        unsigned long long cyc;
 
-       ns = millisec * 1000;
+       ns = microsec * 1000;
        cyc = (ns << CYC2NS_SCALE_FACTOR)/(per_cpu(cyc2ns, smp_processor_id()));
        return cyc;
 }
@@ -939,7 +1032,9 @@ static int uv_ptc_seq_show(struct seq_file *file, void *data)
                seq_printf(file,
                        "sw_ack recv rtime all ");
                seq_printf(file,
-                       "one mult none retry canc nocan reset rcan\n");
+                       "one mult none retry canc nocan reset rcan ");
+               seq_printf(file,
+                       "disable enable\n");
        }
        if (cpu < num_possible_cpus() && cpu_online(cpu)) {
                stat = &per_cpu(ptcstats, cpu);
@@ -956,9 +1051,10 @@ static int uv_ptc_seq_show(struct seq_file *file, void *data)
                           stat->s_resets_plug, stat->s_resets_timeout,
                           stat->s_giveup, stat->s_stimeout,
                           stat->s_busy, stat->s_throttles);
+
                /* destination side statistics */
                seq_printf(file,
-                          "%lx %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n",
+                          "%lx %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld ",
                           uv_read_global_mmr64(uv_cpu_to_pnode(cpu),
                                        UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE),
                           stat->d_requestee, cycles_2_us(stat->d_time),
@@ -966,15 +1062,36 @@ static int uv_ptc_seq_show(struct seq_file *file, void *data)
                           stat->d_nomsg, stat->d_retries, stat->d_canceled,
                           stat->d_nocanceled, stat->d_resets,
                           stat->d_rcanceled);
+               seq_printf(file, "%ld %ld\n",
+                       stat->s_bau_disabled, stat->s_bau_reenabled);
        }
 
        return 0;
 }
 
+/*
+ * Display the tunables thru debugfs
+ */
+static ssize_t tunables_read(struct file *file, char __user *userbuf,
+                                               size_t count, loff_t *ppos)
+{
+       char buf[300];
+       int ret;
+
+       ret = snprintf(buf, 300, "%s %s %s\n%d %d %d %d %d %d %d %d %d\n",
+               "max_bau_concurrent plugged_delay plugsb4reset",
+               "timeoutsb4reset ipi_reset_limit complete_threshold",
+               "congested_response_us congested_reps congested_period",
+               max_bau_concurrent, plugged_delay, plugsb4reset,
+               timeoutsb4reset, ipi_reset_limit, complete_threshold,
+               congested_response_us, congested_reps, congested_period);
+
+       return simple_read_from_buffer(userbuf, count, ppos, buf, ret);
+}
+
 /*
  * -1: resetf the statistics
  *  0: display meaning of the statistics
- * >0: maximum concurrent active descriptors per uvhub (throttle)
  */
 static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
                                 size_t count, loff_t *data)
@@ -983,7 +1100,6 @@ static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
        long input_arg;
        char optstr[64];
        struct ptc_stats *stat;
-       struct bau_control *bcp;
 
        if (count == 0 || count > sizeof(optstr))
                return -EINVAL;
@@ -1059,29 +1175,158 @@ static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
                "reset:    number of ipi-style reset requests processed\n");
                printk(KERN_DEBUG
                "rcan:     number messages canceled by reset requests\n");
+               printk(KERN_DEBUG
+               "disable:  number times use of the BAU was disabled\n");
+               printk(KERN_DEBUG
+               "enable:   number times use of the BAU was re-enabled\n");
        } else if (input_arg == -1) {
                for_each_present_cpu(cpu) {
                        stat = &per_cpu(ptcstats, cpu);
                        memset(stat, 0, sizeof(struct ptc_stats));
                }
-       } else {
-               uv_bau_max_concurrent = input_arg;
-               bcp = &per_cpu(bau_control, smp_processor_id());
-               if (uv_bau_max_concurrent < 1 ||
-                   uv_bau_max_concurrent > bcp->cpus_in_uvhub) {
-                       printk(KERN_DEBUG
-                               "Error: BAU max concurrent %d; %d is invalid\n",
-                               bcp->max_concurrent, uv_bau_max_concurrent);
-                       return -EINVAL;
-               }
-               printk(KERN_DEBUG "Set BAU max concurrent:%d\n",
-                      uv_bau_max_concurrent);
-               for_each_present_cpu(cpu) {
-                       bcp = &per_cpu(bau_control, cpu);
-                       bcp->max_concurrent = uv_bau_max_concurrent;
+       }
+
+       return count;
+}
+
+static int local_atoi(const char *name)
+{
+       int val = 0;
+
+       for (;; name++) {
+               switch (*name) {
+               case '0' ... '9':
+                       val = 10*val+(*name-'0');
+                       break;
+               default:
+                       return val;
                }
        }
+}
+
+/*
+ * set the tunables
+ * 0 values reset them to defaults
+ */
+static ssize_t tunables_write(struct file *file, const char __user *user,
+                                size_t count, loff_t *data)
+{
+       int cpu;
+       int cnt = 0;
+       int val;
+       char *p;
+       char *q;
+       char instr[64];
+       struct bau_control *bcp;
+
+       if (count == 0 || count > sizeof(instr)-1)
+               return -EINVAL;
+       if (copy_from_user(instr, user, count))
+               return -EFAULT;
+
+       instr[count] = '\0';
+       /* count the fields */
+       p = instr + strspn(instr, WHITESPACE);
+       q = p;
+       for (; *p; p = q + strspn(q, WHITESPACE)) {
+               q = p + strcspn(p, WHITESPACE);
+               cnt++;
+               if (q == p)
+                       break;
+       }
+       if (cnt != 9) {
+               printk(KERN_INFO "bau tunable error: should be 9 numbers\n");
+               return -EINVAL;
+       }
 
+       p = instr + strspn(instr, WHITESPACE);
+       q = p;
+       for (cnt = 0; *p; p = q + strspn(q, WHITESPACE), cnt++) {
+               q = p + strcspn(p, WHITESPACE);
+               val = local_atoi(p);
+               switch (cnt) {
+               case 0:
+                       if (val == 0) {
+                               max_bau_concurrent = MAX_BAU_CONCURRENT;
+                               max_bau_concurrent_constant =
+                                                       MAX_BAU_CONCURRENT;
+                               continue;
+                       }
+                       bcp = &per_cpu(bau_control, smp_processor_id());
+                       if (val < 1 || val > bcp->cpus_in_uvhub) {
+                               printk(KERN_DEBUG
+                               "Error: BAU max concurrent %d is invalid\n",
+                               val);
+                               return -EINVAL;
+                       }
+                       max_bau_concurrent = val;
+                       max_bau_concurrent_constant = val;
+                       continue;
+               case 1:
+                       if (val == 0)
+                               plugged_delay = PLUGGED_DELAY;
+                       else
+                               plugged_delay = val;
+                       continue;
+               case 2:
+                       if (val == 0)
+                               plugsb4reset = PLUGSB4RESET;
+                       else
+                               plugsb4reset = val;
+                       continue;
+               case 3:
+                       if (val == 0)
+                               timeoutsb4reset = TIMEOUTSB4RESET;
+                       else
+                               timeoutsb4reset = val;
+                       continue;
+               case 4:
+                       if (val == 0)
+                               ipi_reset_limit = IPI_RESET_LIMIT;
+                       else
+                               ipi_reset_limit = val;
+                       continue;
+               case 5:
+                       if (val == 0)
+                               complete_threshold = COMPLETE_THRESHOLD;
+                       else
+                               complete_threshold = val;
+                       continue;
+               case 6:
+                       if (val == 0)
+                               congested_response_us = CONGESTED_RESPONSE_US;
+                       else
+                               congested_response_us = val;
+                       continue;
+               case 7:
+                       if (val == 0)
+                               congested_reps = CONGESTED_REPS;
+                       else
+                               congested_reps = val;
+                       continue;
+               case 8:
+                       if (val == 0)
+                               congested_period = CONGESTED_PERIOD;
+                       else
+                               congested_period = val;
+                       continue;
+               }
+               if (q == p)
+                       break;
+       }
+       for_each_present_cpu(cpu) {
+               bcp = &per_cpu(bau_control, cpu);
+               bcp->max_bau_concurrent = max_bau_concurrent;
+               bcp->max_bau_concurrent_constant = max_bau_concurrent;
+               bcp->plugged_delay = plugged_delay;
+               bcp->plugsb4reset = plugsb4reset;
+               bcp->timeoutsb4reset = timeoutsb4reset;
+               bcp->ipi_reset_limit = ipi_reset_limit;
+               bcp->complete_threshold = complete_threshold;
+               bcp->congested_response_us = congested_response_us;
+               bcp->congested_reps = congested_reps;
+               bcp->congested_period = congested_period;
+       }
        return count;
 }
 
@@ -1097,6 +1342,11 @@ static int uv_ptc_proc_open(struct inode *inode, struct file *file)
        return seq_open(file, &uv_ptc_seq_ops);
 }
 
+static int tunables_open(struct inode *inode, struct file *file)
+{
+       return 0;
+}
+
 static const struct file_operations proc_uv_ptc_operations = {
        .open           = uv_ptc_proc_open,
        .read           = seq_read,
@@ -1105,6 +1355,12 @@ static const struct file_operations proc_uv_ptc_operations = {
        .release        = seq_release,
 };
 
+static const struct file_operations tunables_fops = {
+       .open           = tunables_open,
+       .read           = tunables_read,
+       .write          = tunables_write,
+};
+
 static int __init uv_ptc_init(void)
 {
        struct proc_dir_entry *proc_uv_ptc;
@@ -1119,6 +1375,20 @@ static int __init uv_ptc_init(void)
                       UV_PTC_BASENAME);
                return -EINVAL;
        }
+
+       tunables_dir = debugfs_create_dir(UV_BAU_TUNABLES_DIR, NULL);
+       if (!tunables_dir) {
+               printk(KERN_ERR "unable to create debugfs directory %s\n",
+                      UV_BAU_TUNABLES_DIR);
+               return -EINVAL;
+       }
+       tunables_file = debugfs_create_file(UV_BAU_TUNABLES_FILE, 0600,
+                       tunables_dir, NULL, &tunables_fops);
+       if (!tunables_file) {
+               printk(KERN_ERR "unable to create debugfs file %s\n",
+                      UV_BAU_TUNABLES_FILE);
+               return -EINVAL;
+       }
        return 0;
 }
 
@@ -1258,6 +1528,33 @@ static void __init uv_init_uvhub(int uvhub, int vector)
                                      ((apicid << 32) | vector));
 }
 
+/*
+ * We will set BAU_MISC_CONTROL with a timeout period.
+ * But the BIOS has set UVH_AGING_PRESCALE_SEL and UVH_TRANSACTION_TIMEOUT.
+ * So the destination timeout period has be be calculated from them.
+ */
+static int
+calculate_destination_timeout(void)
+{
+       unsigned long mmr_image;
+       int mult1;
+       int mult2;
+       int index;
+       int base;
+       int ret;
+       unsigned long ts_ns;
+
+       mult1 = UV_INTD_SOFT_ACK_TIMEOUT_PERIOD & BAU_MISC_CONTROL_MULT_MASK;
+       mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL);
+       index = (mmr_image >> BAU_URGENCY_7_SHIFT) & BAU_URGENCY_7_MASK;
+       mmr_image = uv_read_local_mmr(UVH_TRANSACTION_TIMEOUT);
+       mult2 = (mmr_image >> BAU_TRANS_SHIFT) & BAU_TRANS_MASK;
+       base = timeout_base_ns[index];
+       ts_ns = base * mult1 * mult2;
+       ret = ts_ns / 1000;
+       return ret;
+}
+
 /*
  * initialize the bau_control structure for each cpu
  */
@@ -1286,6 +1583,8 @@ static void uv_init_per_cpu(int nuvhubs)
        };
        struct uvhub_desc *uvhub_descs;
 
+       timeout_us = calculate_destination_timeout();
+
        uvhub_descs = (struct uvhub_desc *)
                kmalloc(nuvhubs * sizeof(struct uvhub_desc), GFP_KERNEL);
        memset(uvhub_descs, 0, nuvhubs * sizeof(struct uvhub_desc));
@@ -1293,15 +1592,12 @@ static void uv_init_per_cpu(int nuvhubs)
                bcp = &per_cpu(bau_control, cpu);
                memset(bcp, 0, sizeof(struct bau_control));
                spin_lock_init(&bcp->masks_lock);
-               bcp->max_concurrent = uv_bau_max_concurrent;
                pnode = uv_cpu_hub_info(cpu)->pnode;
                uvhub = uv_cpu_hub_info(cpu)->numa_blade_id;
                bdp = &uvhub_descs[uvhub];
                bdp->num_cpus++;
                bdp->uvhub = uvhub;
                bdp->pnode = pnode;
-               /* time interval to catch a hardware stay-busy bug */
-               bcp->timeout_interval = millisec_2_cycles(3);
                /* kludge: assume uv_hub.h is constant */
                socket = (cpu_physical_id(cpu)>>5)&1;
                if (socket >= bdp->num_sockets)
@@ -1337,6 +1633,22 @@ static void uv_init_per_cpu(int nuvhubs)
                }
        }
        kfree(uvhub_descs);
+       for_each_present_cpu(cpu) {
+               bcp = &per_cpu(bau_control, cpu);
+               bcp->baudisabled = 0;
+               /* time interval to catch a hardware stay-busy bug */
+               bcp->timeout_interval = microsec_2_cycles(2*timeout_us);
+               bcp->max_bau_concurrent = max_bau_concurrent;
+               bcp->max_bau_concurrent_constant = max_bau_concurrent;
+               bcp->plugged_delay = plugged_delay;
+               bcp->plugsb4reset = plugsb4reset;
+               bcp->timeoutsb4reset = timeoutsb4reset;
+               bcp->ipi_reset_limit = ipi_reset_limit;
+               bcp->complete_threshold = complete_threshold;
+               bcp->congested_response_us = congested_response_us;
+               bcp->congested_reps = congested_reps;
+               bcp->congested_period = congested_period;
+       }
 }
 
 /*
@@ -1361,10 +1673,12 @@ static int __init uv_bau_init(void)
                zalloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu),
                                       GFP_KERNEL, cpu_to_node(cur_cpu));
 
-       uv_bau_max_concurrent = MAX_BAU_CONCURRENT;
+       max_bau_concurrent = MAX_BAU_CONCURRENT;
        uv_nshift = uv_hub_info->m_val;
        uv_mmask = (1UL << uv_hub_info->m_val) - 1;
        nuvhubs = uv_num_possible_blades();
+       spin_lock_init(&disable_lock);
+       congested_cycles = microsec_2_cycles(congested_response_us);
 
        uv_init_per_cpu(nuvhubs);
 
@@ -1394,4 +1708,4 @@ static int __init uv_bau_init(void)
        return 0;
 }
 core_initcall(uv_bau_init);
-core_initcall(uv_ptc_init);
+fs_initcall(uv_ptc_init);