[PATCH] ARM: zynq: wfi exit on same cpu is valid

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Jun 4 10:10:17 EDT 2013


On Tue, Jun 04, 2013 at 01:58:31PM +0200, Daniel Lezcano wrote:
> On 06/04/2013 01:39 PM, Amit Kucheria wrote:
> > I'm curious why it is called pen_release. :) Is there some historical
> > link to some HW lines?
> 
> I tried to figure out the same but I did not found any information on
> that. I assumed the name could be referring to a simplified mutual
> exclusion algorithm from the 'Dining philosophers problem' [1] where the
> fork is a pen.

Where it comes from is the original ARM SMP patches from early 2000, which
everyone has blindly copied with no thought about what they're doing.  This
is why I'm totally against any consolidation of this code, because I'm of
the opinion that _no one_ other than the ARM Ltd development platforms
should be using it.

"pen" means "holding pen".  It comes about because early on in the SMP
development, ARM SMP platforms had four CPUs, and it was only possible to
release all three secondary CPUs from the boot loader simultaneously to
a common piece of code.

As the kernel was not able to serialize the release of each CPU, ARM Ltd
worked around this problem by having all the CPUs jump to assembly code
which "holds" the CPUs which we didn't want to boot yet, and the CPUs
are released one at a time by setting pen_release to the hardware CPU
number.

Modern platforms either have just one secondary CPU, or they have a way
to control the reset/power to the secondary CPU.  This makes the holding
pen entirely redundant, and such platforms should _not_ make use of any
kind of holding pen.



More information about the linux-arm-kernel mailing list