Subject: Re: CVS commit: src/sys/arch
To: Simon Burge <simonb@wasabisystems.com>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: source-changes
Date: 11/05/2005 07:01:55
I think there was part of the conversation here that I missed.  My 
comments below.

Simon Burge wrote:

>Izumi Tsutsui wrote:
>
>  
>
>>In article <20051105134332.56FDC23572@thoreau.thistledown.com.au>
>>simonb@wasabisystems.com wrote:
>>
>>    
>>
>>>mips/wired_map.c is only added to the source list if the
>>>ENABLE_MIPS3_WIRED_MAP option is enabled - it's not automatically
>>>included.
>>>      
>>>
>>Yes, I know, but any user could specify options ENABLE_MIPS3_WIRED_MAP
>>in his config file and it would cause an error. I thought we had to
>>move definition of mips/wired_map.c to MD files.* or to have
>>MD <machine/wired_map.h> on all ports to prevent it.
>>    
>>
>
>I suspect anyone enabling ENABLE_MIPS3_WIRED_MAP will know the
>ramifications of doing that, and if they get an error they'll
>know what to do :-)
>  
>
One would certainly hope so.  Changing kernel options without having any 
idea of what they do whatsoever seems like a bad idea to me. :-)  
Actually, there are other options that can cause this problem -- for 
example PCI_NETBSD_CONFIGURE will cause breakage if defined but lacking 
e.g. pci_conf_interrupt() in the MD header.

>I think we either want a wired_map(9), or at least a few
>comments in mips/wired_map.c saying what is expected to exist
>in <machine/wired_map.h>.  I'm also not 100% sure if we should
>provide defaults for MIPS3_NWIRED_ENTRY (should that be called
>MIPS3_NWIRED_ENTRIES?) and MIPS3_WIRED_SIZE in <mips/wired_map.h>
>or whether we specify that these constants have to be defined
>in <machine/wired_map.h>.
>  
>
I like having reasonable defaults defined in the global, with a 
mechanism to override them.  I think this is what we have now.  (The 
exception would be if there is no reasonable default.)

And these are upper limits, so they do no damage if they are set too large.

>>But yes, maybe just I'm a paranoia 8-) and I don't have objection
>>to remove them if you want.
>>    
>>
>
>I think it's cleaner to only have them if they're used, similar to say
><machine/pci_machdep.h> which only exists for some MIPS ports.  I'll
>remove them (but not tonight - too late already!).
>  
>
If you're referring to the macros above, I'd vote to leave them in.  But 
I don't feel very strongly about it, either.

Btw, Simon, I will be sending diffs to enable PCI on the Au1500 shortly.

I also have support for the Au1550 to commit, but there are a lot of 
files for that. :-)

    -- Garrett

>Simon.
>--
>Simon Burge                            <simonb@wasabisystems.com>
>NetBSD Support and Service:         http://www.wasabisystems.com/
>  
>