linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about tboot_wait_for_aps()
@ 2012-07-24 15:58 Paul E. McKenney
  0 siblings, 0 replies; only message in thread
From: Paul E. McKenney @ 2012-07-24 15:58 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: linux-kernel, x86

Hello!

While taking another pass through the CPU_DYING notifiers, I came upon
the following:

	static int tboot_wait_for_aps(int num_aps)
	{
		unsigned long timeout;

		timeout = AP_WAIT_TIMEOUT*HZ;
		while (atomic_read((atomic_t *)&tboot->num_in_wfs) != num_aps &&
		       timeout) {
			mdelay(1);
			timeout--;
		}

		if (timeout)
			pr_warning("tboot wait for APs timeout\n");

		return !(atomic_read((atomic_t *)&tboot->num_in_wfs) == num_aps);
	}

Questions:

1.	Why AP_WAIT_TIMEOUT*HZ?  Given the mdelay(), shouldn't this
	instead be AP_WAIT_TIMEOUT*1000?  The definition of AP_WAIT_TIMEOUT
	indicates that it is in seconds.

2.	Who changes ->num_in_wfs?  Any other CPUs are in stop_machine(),
	plus I don't see any assignments to this field.  Does the boot
	firmware run again to make this change, sort of like SMIs?

I guess that the good news is that I don't seen anything that cares about
stop_machine().  ;-)

							Thanx, Paul


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-24 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 15:58 Question about tboot_wait_for_aps() Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).