Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f233dee authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branches 'perf-fixes-for-linus', 'x86-fixes-for-linus' and...

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
	 */
	 */
	CMOS_WRITE(0, 0xf);
	CMOS_WRITE(0, 0xf);


	*((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
	*((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0;
}
}


static inline void __init smpboot_setup_io_apic(void)
static inline void __init smpboot_setup_io_apic(void)
+10 −0
Original line number Original line Diff line number Diff line
@@ -600,4 +600,14 @@ int tick_broadcast_oneshot_active(void)
	return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT;
	return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT;
}
}


/*
 * Check whether the broadcast device supports oneshot.
 */
bool tick_broadcast_oneshot_available(void)
{
	struct clock_event_device *bc = tick_broadcast_device.evtdev;

	return bc ? bc->features & CLOCK_EVT_FEAT_ONESHOT : false;
}

#endif
#endif
+5 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,11 @@ int tick_is_oneshot_available(void)
{
{
	struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev);
	struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev);


	return dev && (dev->features & CLOCK_EVT_FEAT_ONESHOT);
	if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT))
		return 0;
	if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
		return 1;
	return tick_broadcast_oneshot_available();
}
}


/*
/*
+3 −0
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@ extern void tick_shutdown_broadcast_oneshot(unsigned int *cpup);
extern int tick_resume_broadcast_oneshot(struct clock_event_device *bc);
extern int tick_resume_broadcast_oneshot(struct clock_event_device *bc);
extern int tick_broadcast_oneshot_active(void);
extern int tick_broadcast_oneshot_active(void);
extern void tick_check_oneshot_broadcast(int cpu);
extern void tick_check_oneshot_broadcast(int cpu);
bool tick_broadcast_oneshot_available(void);
# else /* BROADCAST */
# else /* BROADCAST */
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
{
{
@@ -46,6 +47,7 @@ static inline void tick_broadcast_switch_to_oneshot(void) { }
static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { }
static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { }
static inline int tick_broadcast_oneshot_active(void) { return 0; }
static inline int tick_broadcast_oneshot_active(void) { return 0; }
static inline void tick_check_oneshot_broadcast(int cpu) { }
static inline void tick_check_oneshot_broadcast(int cpu) { }
static inline bool tick_broadcast_oneshot_available(void) { return true; }
# endif /* !BROADCAST */
# endif /* !BROADCAST */


#else /* !ONESHOT */
#else /* !ONESHOT */
@@ -76,6 +78,7 @@ static inline int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
	return 0;
	return 0;
}
}
static inline int tick_broadcast_oneshot_active(void) { return 0; }
static inline int tick_broadcast_oneshot_active(void) { return 0; }
static inline bool tick_broadcast_oneshot_available(void) { return false; }
#endif /* !TICK_ONESHOT */
#endif /* !TICK_ONESHOT */


/*
/*
+3 −3
Original line number Original line Diff line number Diff line
@@ -264,9 +264,6 @@ pid_put_sample(int pid, int type, unsigned int cpu, u64 start, u64 end)
		c->start_time = start;
		c->start_time = start;
	if (p->start_time == 0 || p->start_time > start)
	if (p->start_time == 0 || p->start_time > start)
		p->start_time = start;
		p->start_time = start;

	if (cpu > numcpus)
		numcpus = cpu;
}
}


#define MAX_CPUS 4096
#define MAX_CPUS 4096
@@ -511,6 +508,9 @@ static int process_sample_event(event_t *event __used,
		if (!event_str)
		if (!event_str)
			return 0;
			return 0;


		if (sample->cpu > numcpus)
			numcpus = sample->cpu;

		if (strcmp(event_str, "power:cpu_idle") == 0) {
		if (strcmp(event_str, "power:cpu_idle") == 0) {
			struct power_processor_entry *ppe = (void *)te;
			struct power_processor_entry *ppe = (void *)te;
			if (ppe->state == (u32)PWR_EVENT_EXIT)
			if (ppe->state == (u32)PWR_EVENT_EXIT)
Loading