Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Ben Herrenschmidt:
"Here is not quite a handful of powerpc fixes for rc3.

The windfarm fix is a regression fix (though not a new one), the PMU
interrupt rename is not a fix per-se but has been submitted a long
time ago and I kept forgetting to put it in (it puts us back in sync
with x86), the other perf bit is just about putting an API/ABI bit
definition in the right place for userspace to consume, and finally,
we have a fix for the VPHN (Virtual Partition Home Node) feature
(notification that the hypervisor is moving nodes around) which could
cause lockups so we may as well fix it now"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/windfarm: Fix noisy slots-fan on Xserve (rm31)
powerpc: VPHN topology change updates all siblings
powerpc/perf: Export PERF_EVENT_CONFIG_EBB_SHIFT to userspace
powerpc: Rename PMU interrupts from CNT to PMI

+81 -33
+1 -5
arch/powerpc/include/asm/perf_event_server.h
··· 12 12 #include <linux/types.h> 13 13 #include <asm/hw_irq.h> 14 14 #include <linux/device.h> 15 + #include <uapi/asm/perf_event.h> 15 16 16 17 #define MAX_HWEVENTS 8 17 18 #define MAX_EVENT_ALTERNATIVES 8 ··· 69 68 #define PPMU_LIMITED_PMC_OK 1 /* can put this on a limited PMC */ 70 69 #define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */ 71 70 #define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */ 72 - 73 - /* 74 - * We use the event config bit 63 as a flag to request EBB. 75 - */ 76 - #define EVENT_CONFIG_EBB_SHIFT 63 77 71 78 72 extern int register_power_pmu(struct power_pmu *); 79 73
+4
arch/powerpc/include/asm/smp.h
··· 145 145 #define smp_setup_cpu_maps() 146 146 static inline void inhibit_secondary_onlining(void) {} 147 147 static inline void uninhibit_secondary_onlining(void) {} 148 + static inline const struct cpumask *cpu_sibling_mask(int cpu) 149 + { 150 + return cpumask_of(cpu); 151 + } 148 152 149 153 #endif /* CONFIG_SMP */ 150 154
+1
arch/powerpc/include/uapi/asm/Kbuild
··· 20 20 header-y += msgbuf.h 21 21 header-y += nvram.h 22 22 header-y += param.h 23 + header-y += perf_event.h 23 24 header-y += poll.h 24 25 header-y += posix_types.h 25 26 header-y += ps3fb.h
+18
arch/powerpc/include/uapi/asm/perf_event.h
··· 1 + /* 2 + * Copyright 2013 Michael Ellerman, IBM Corp. 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * as published by the Free Software Foundation; version 2 of the 7 + * License. 8 + */ 9 + 10 + #ifndef _UAPI_ASM_POWERPC_PERF_EVENT_H 11 + #define _UAPI_ASM_POWERPC_PERF_EVENT_H 12 + 13 + /* 14 + * We use bit 63 of perf_event_attr.config as a flag to request EBB. 15 + */ 16 + #define PERF_EVENT_CONFIG_EBB_SHIFT 63 17 + 18 + #endif /* _UAPI_ASM_POWERPC_PERF_EVENT_H */
+1 -1
arch/powerpc/kernel/irq.c
··· 362 362 seq_printf(p, "%10u ", per_cpu(irq_stat, j).spurious_irqs); 363 363 seq_printf(p, " Spurious interrupts\n"); 364 364 365 - seq_printf(p, "%*s: ", prec, "CNT"); 365 + seq_printf(p, "%*s: ", prec, "PMI"); 366 366 for_each_online_cpu(j) 367 367 seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs); 368 368 seq_printf(p, " Performance monitoring interrupts\n");
+43 -14
arch/powerpc/mm/numa.c
··· 27 27 #include <linux/seq_file.h> 28 28 #include <linux/uaccess.h> 29 29 #include <linux/slab.h> 30 + #include <asm/cputhreads.h> 30 31 #include <asm/sparsemem.h> 31 32 #include <asm/prom.h> 32 33 #include <asm/smp.h> ··· 1319 1318 } 1320 1319 } 1321 1320 if (changed) { 1322 - cpumask_set_cpu(cpu, changes); 1321 + cpumask_or(changes, changes, cpu_sibling_mask(cpu)); 1322 + cpu = cpu_last_thread_sibling(cpu); 1323 1323 } 1324 1324 } 1325 1325 ··· 1428 1426 if (!data) 1429 1427 return -EINVAL; 1430 1428 1431 - cpu = get_cpu(); 1429 + cpu = smp_processor_id(); 1432 1430 1433 1431 for (update = data; update; update = update->next) { 1434 1432 if (cpu != update->cpu) ··· 1448 1446 */ 1449 1447 int arch_update_cpu_topology(void) 1450 1448 { 1451 - unsigned int cpu, changed = 0; 1449 + unsigned int cpu, sibling, changed = 0; 1452 1450 struct topology_update_data *updates, *ud; 1453 1451 unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; 1454 1452 cpumask_t updated_cpus; 1455 1453 struct device *dev; 1456 - int weight, i = 0; 1454 + int weight, new_nid, i = 0; 1457 1455 1458 1456 weight = cpumask_weight(&cpu_associativity_changes_mask); 1459 1457 if (!weight) ··· 1466 1464 cpumask_clear(&updated_cpus); 1467 1465 1468 1466 for_each_cpu(cpu, &cpu_associativity_changes_mask) { 1469 - ud = &updates[i++]; 1470 - ud->cpu = cpu; 1467 + /* 1468 + * If siblings aren't flagged for changes, updates list 1469 + * will be too short. Skip on this update and set for next 1470 + * update. 1471 + */ 1472 + if (!cpumask_subset(cpu_sibling_mask(cpu), 1473 + &cpu_associativity_changes_mask)) { 1474 + pr_info("Sibling bits not set for associativity " 1475 + "change, cpu%d\n", cpu); 1476 + cpumask_or(&cpu_associativity_changes_mask, 1477 + &cpu_associativity_changes_mask, 1478 + cpu_sibling_mask(cpu)); 1479 + cpu = cpu_last_thread_sibling(cpu); 1480 + continue; 1481 + } 1482 + 1483 + /* Use associativity from first thread for all siblings */ 1471 1484 vphn_get_associativity(cpu, associativity); 1472 - ud->new_nid = associativity_to_nid(associativity); 1485 + new_nid = associativity_to_nid(associativity); 1486 + if (new_nid < 0 || !node_online(new_nid)) 1487 + new_nid = first_online_node; 1473 1488 1474 - if (ud->new_nid < 0 || !node_online(ud->new_nid)) 1475 - ud->new_nid = first_online_node; 1489 + if (new_nid == numa_cpu_lookup_table[cpu]) { 1490 + cpumask_andnot(&cpu_associativity_changes_mask, 1491 + &cpu_associativity_changes_mask, 1492 + cpu_sibling_mask(cpu)); 1493 + cpu = cpu_last_thread_sibling(cpu); 1494 + continue; 1495 + } 1476 1496 1477 - ud->old_nid = numa_cpu_lookup_table[cpu]; 1478 - cpumask_set_cpu(cpu, &updated_cpus); 1479 - 1480 - if (i < weight) 1481 - ud->next = &updates[i]; 1497 + for_each_cpu(sibling, cpu_sibling_mask(cpu)) { 1498 + ud = &updates[i++]; 1499 + ud->cpu = sibling; 1500 + ud->new_nid = new_nid; 1501 + ud->old_nid = numa_cpu_lookup_table[sibling]; 1502 + cpumask_set_cpu(sibling, &updated_cpus); 1503 + if (i < weight) 1504 + ud->next = &updates[i]; 1505 + } 1506 + cpu = cpu_last_thread_sibling(cpu); 1482 1507 } 1483 1508 1484 1509 stop_machine(update_cpu_topology, &updates[0], &updated_cpus);
+1 -1
arch/powerpc/perf/core-book3s.c
··· 484 484 * use bit 63 of the event code for something else if they wish. 485 485 */ 486 486 return (ppmu->flags & PPMU_EBB) && 487 - ((event->attr.config >> EVENT_CONFIG_EBB_SHIFT) & 1); 487 + ((event->attr.config >> PERF_EVENT_CONFIG_EBB_SHIFT) & 1); 488 488 } 489 489 490 490 static int ebb_event_check(struct perf_event *event)
+3 -3
arch/powerpc/perf/power8-pmu.c
··· 118 118 (EVENT_UNIT_MASK << EVENT_UNIT_SHIFT) | \ 119 119 (EVENT_COMBINE_MASK << EVENT_COMBINE_SHIFT) | \ 120 120 (EVENT_MARKED_MASK << EVENT_MARKED_SHIFT) | \ 121 - (EVENT_EBB_MASK << EVENT_CONFIG_EBB_SHIFT) | \ 121 + (EVENT_EBB_MASK << PERF_EVENT_CONFIG_EBB_SHIFT) | \ 122 122 EVENT_PSEL_MASK) 123 123 124 124 /* MMCRA IFM bits - POWER8 */ ··· 233 233 pmc = (event >> EVENT_PMC_SHIFT) & EVENT_PMC_MASK; 234 234 unit = (event >> EVENT_UNIT_SHIFT) & EVENT_UNIT_MASK; 235 235 cache = (event >> EVENT_CACHE_SEL_SHIFT) & EVENT_CACHE_SEL_MASK; 236 - ebb = (event >> EVENT_CONFIG_EBB_SHIFT) & EVENT_EBB_MASK; 236 + ebb = (event >> PERF_EVENT_CONFIG_EBB_SHIFT) & EVENT_EBB_MASK; 237 237 238 238 /* Clear the EBB bit in the event, so event checks work below */ 239 - event &= ~(EVENT_EBB_MASK << EVENT_CONFIG_EBB_SHIFT); 239 + event &= ~(EVENT_EBB_MASK << PERF_EVENT_CONFIG_EBB_SHIFT); 240 240 241 241 if (pmc) { 242 242 if (pmc > 6)
+9 -9
drivers/macintosh/windfarm_rm31.c
··· 439 439 440 440 /* Slots fan */ 441 441 static const struct wf_pid_param slots_param = { 442 - .interval = 5, 443 - .history_len = 2, 444 - .gd = 30 << 20, 445 - .gp = 5 << 20, 446 - .gr = 0, 447 - .itarget = 40 << 16, 448 - .additive = 1, 449 - .min = 300, 450 - .max = 4000, 442 + .interval = 1, 443 + .history_len = 20, 444 + .gd = 0, 445 + .gp = 0, 446 + .gr = 0x00100000, 447 + .itarget = 3200000, 448 + .additive = 0, 449 + .min = 20, 450 + .max = 100, 451 451 }; 452 452 453 453 static void slots_fan_tick(void)