[parisc-linux] [PATCH] PDC cleanup and encapsulation

Matthew Wilcox matthew@wil.cx
Thu, 5 Apr 2001 01:01:18 +0100


On Wed, Apr 04, 2001 at 04:04:22PM -0700, Bjorn Helgaas wrote:
> CONFIG_PA20 =>
> 	PA2.0 architecture, in either narrow or wide mode.
> 	Defined iff CONFIG_PA8X00 selected, not directly user-configurable.

Correct.  I test this rather than CONFIG_PA8X00 because it's conceivable
we might want to split PA8000/8200 support from 8500/8600.  Or something.

> CONFIG_PARISC64 =>
> 	Only possible when CONFIG_PA20 selected
> 	Build 64-bit kernel by using $(CROSS_COMPILE) = hppa64-linux.
> 	cpp predefines __LP64__.

Right.

> So is there a reason for testing __LP64__ rather than CONFIG_PARISC64 in 
> the code?  There are a zillion tests for the former and none for the 
> latter, even though the latter seems more direct and obvious.

Well.. it requires that you remember to include <linux/config.h>.

> It seems to me that __LP64__ is overloaded for several things.  
> Fundamentally, it is a property of the kernel, i.e., it is compiled to run 
> in wide mode.  But we also use it to decide whether to use PDC PAT, which 
> seems like a slightly different question.  If you run a narrow kernel on a 
> C3000, the firmware still supports PDC PAT (although I suppose we would 
> have to do some work to call it in wide mode).

Not quite true, C3k has 64-bit PDC, but it is not PAT.

-- 
Revolutions do not require corporate support.