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 branches 'perf-fixes-for-linus', 'x86-fixes-for-linus' and 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf timechart: Fix max number of cpus
perf timechart: Fix black idle boxes in the title
perf hists: Print number of samples, not the period sum

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Use u32 instead of long to set reset vector back to 0

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clockevents: Prevent oneshot mode when broadcast device is periodic

+30 -10
+1 -1
arch/x86/include/asm/smpboot_hooks.h
··· 34 34 */ 35 35 CMOS_WRITE(0, 0xf); 36 36 37 - *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0; 37 + *((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0; 38 38 } 39 39 40 40 static inline void __init smpboot_setup_io_apic(void)
+10
kernel/time/tick-broadcast.c
··· 600 600 return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT; 601 601 } 602 602 603 + /* 604 + * Check whether the broadcast device supports oneshot. 605 + */ 606 + bool tick_broadcast_oneshot_available(void) 607 + { 608 + struct clock_event_device *bc = tick_broadcast_device.evtdev; 609 + 610 + return bc ? bc->features & CLOCK_EVT_FEAT_ONESHOT : false; 611 + } 612 + 603 613 #endif
+5 -1
kernel/time/tick-common.c
··· 51 51 { 52 52 struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev); 53 53 54 - return dev && (dev->features & CLOCK_EVT_FEAT_ONESHOT); 54 + if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT)) 55 + return 0; 56 + if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) 57 + return 1; 58 + return tick_broadcast_oneshot_available(); 55 59 } 56 60 57 61 /*
+3
kernel/time/tick-internal.h
··· 36 36 extern int tick_resume_broadcast_oneshot(struct clock_event_device *bc); 37 37 extern int tick_broadcast_oneshot_active(void); 38 38 extern void tick_check_oneshot_broadcast(int cpu); 39 + bool tick_broadcast_oneshot_available(void); 39 40 # else /* BROADCAST */ 40 41 static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) 41 42 { ··· 47 46 static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { } 48 47 static inline int tick_broadcast_oneshot_active(void) { return 0; } 49 48 static inline void tick_check_oneshot_broadcast(int cpu) { } 49 + static inline bool tick_broadcast_oneshot_available(void) { return true; } 50 50 # endif /* !BROADCAST */ 51 51 52 52 #else /* !ONESHOT */ ··· 78 76 return 0; 79 77 } 80 78 static inline int tick_broadcast_oneshot_active(void) { return 0; } 79 + static inline bool tick_broadcast_oneshot_available(void) { return false; } 81 80 #endif /* !TICK_ONESHOT */ 82 81 83 82 /*
+3 -3
tools/perf/builtin-timechart.c
··· 264 264 c->start_time = start; 265 265 if (p->start_time == 0 || p->start_time > start) 266 266 p->start_time = start; 267 - 268 - if (cpu > numcpus) 269 - numcpus = cpu; 270 267 } 271 268 272 269 #define MAX_CPUS 4096 ··· 507 510 508 511 if (!event_str) 509 512 return 0; 513 + 514 + if (sample->cpu > numcpus) 515 + numcpus = sample->cpu; 510 516 511 517 if (strcmp(event_str, "power:cpu_idle") == 0) { 512 518 struct power_processor_entry *ppe = (void *)te;
+5 -2
tools/perf/util/hist.c
··· 585 585 { 586 586 struct sort_entry *se; 587 587 u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us; 588 + u64 nr_events; 588 589 const char *sep = symbol_conf.field_sep; 589 590 int ret; 590 591 ··· 594 593 595 594 if (pair_hists) { 596 595 period = self->pair ? self->pair->period : 0; 596 + nr_events = self->pair ? self->pair->nr_events : 0; 597 597 total = pair_hists->stats.total_period; 598 598 period_sys = self->pair ? self->pair->period_sys : 0; 599 599 period_us = self->pair ? self->pair->period_us : 0; ··· 602 600 period_guest_us = self->pair ? self->pair->period_guest_us : 0; 603 601 } else { 604 602 period = self->period; 603 + nr_events = self->nr_events; 605 604 total = session_total; 606 605 period_sys = self->period_sys; 607 606 period_us = self->period_us; ··· 643 640 644 641 if (symbol_conf.show_nr_samples) { 645 642 if (sep) 646 - ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); 643 + ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); 647 644 else 648 - ret += snprintf(s + ret, size - ret, "%11" PRIu64, period); 645 + ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); 649 646 } 650 647 651 648 if (pair_hists) {
+3 -3
tools/perf/util/svghelper.c
··· 456 456 return; 457 457 458 458 svg_legenda_box(0, "Running", "sample"); 459 - svg_legenda_box(100, "Idle","rect.c1"); 460 - svg_legenda_box(200, "Deeper Idle", "rect.c3"); 461 - svg_legenda_box(350, "Deepest Idle", "rect.c6"); 459 + svg_legenda_box(100, "Idle","c1"); 460 + svg_legenda_box(200, "Deeper Idle", "c3"); 461 + svg_legenda_box(350, "Deepest Idle", "c6"); 462 462 svg_legenda_box(550, "Sleeping", "process2"); 463 463 svg_legenda_box(650, "Waiting for cpu", "waiting"); 464 464 svg_legenda_box(800, "Blocked on IO", "blocked");