diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-06-17 10:19:39 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-06-17 10:19:38 -0700 |
| commit | 4e933027e6848a194b03aa35c26bc20fe06205e9 (patch) | |
| tree | ab1dda795bb590c589a5af45f0692b3b6f3c3931 /arch/powerpc/mm/numa.c | |
| parent | c176a066dfd36e31ebaf2796a12b2c523e7083dc (diff) | |
| parent | 5ef154a26639ad07ed3ebdaea1dabe29065982b0 (diff) | |
Merge "Merge android-4.4.181 (bd858d7) into msm-4.4"
Diffstat (limited to 'arch/powerpc/mm/numa.c')
| -rw-r--r-- | arch/powerpc/mm/numa.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bb3df222ae71..215bff2b8470 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1611,6 +1611,9 @@ int start_topology_update(void) { int rc = 0; + if (!topology_updates_enabled) + return 0; + if (firmware_has_feature(FW_FEATURE_PRRN)) { if (!prrn_enabled) { prrn_enabled = 1; @@ -1640,6 +1643,9 @@ int stop_topology_update(void) { int rc = 0; + if (!topology_updates_enabled) + return 0; + if (prrn_enabled) { prrn_enabled = 0; #ifdef CONFIG_SMP @@ -1685,11 +1691,13 @@ static ssize_t topology_write(struct file *file, const char __user *buf, kbuf[read_len] = '\0'; - if (!strncmp(kbuf, "on", 2)) + if (!strncmp(kbuf, "on", 2)) { + topology_updates_enabled = true; start_topology_update(); - else if (!strncmp(kbuf, "off", 3)) + } else if (!strncmp(kbuf, "off", 3)) { stop_topology_update(); - else + topology_updates_enabled = false; + } else return -EINVAL; return count; @@ -1704,9 +1712,7 @@ static const struct file_operations topology_ops = { static int topology_update_init(void) { - /* Do not poll for changes if disabled at boot */ - if (topology_updates_enabled) - start_topology_update(); + start_topology_update(); if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops)) return -ENOMEM; |
