mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c
PATCH 1/1 mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c
If CONFIG_ZONE_DMA is ever undefined, ZONE_DMA will also not be defined, and setup.c won't compile. This wraps it with an #ifdef.
arch/i386/kernel/setup.c +2 -0
@@ -371,8 +371,10 @@ void __init zone_sizes_init(void) {unsigned long max_zone_pfns[MAX_NR_ZONES ];memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); +#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =virt_to_phys ((char *)MAX_DMA_ADDRESS ) >>PAGE_SHIFT ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM max_zone_pfns[ZONE_HIGHMEM ] = highend_pfn;
Andrew Morton
maintainerQuoted 3 lines · On Tue, 06 Mar 2007 18:52:59 -0500 Andres Salomon <[email protected]> wrote:
If
CONFIG_ZONE_DMAis ever undefined,ZONE_DMAwill also not be defined, andsetup.cwon't compile. This wraps it with an #ifdef.
I guess if anyone tries to disable ZONE_DMA on i386 they'll pretty quickly discover that. But I don't think we need to "fix" it yet?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Tue, 06 Mar 2007 18:52:59 -0500 Andres Salomon <[email protected]> wrote:
If
CONFIG_ZONE_DMAis ever undefined,ZONE_DMAwill also not be defined, andsetup.cwon't compile. This wraps it with an #ifdef.I guess if anyone tries to disable
ZONE_DMAon i386 they'll pretty quickly discover that. But I don't think we need to "fix" it yet?
CONFIG_ZONE_DMA isn't even optional on i386, so I'm curious how you could hit this compile failure.
Dave
Signature · 7 lines
http://www.codemonkey.org.uk -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Dave Jones
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Tue, 06 Mar 2007 18:52:59 -0500 Andres Salomon <[email protected]> wrote:
If
CONFIG_ZONE_DMAis ever undefined,ZONE_DMAwill also not be defined, andsetup.cwon't compile. This wraps it with an #ifdef.I guess if anyone tries to disable
ZONE_DMAon i386 they'll pretty quickly discover that. But I don't think we need to "fix" it yet?
Oh, it's certainly not urgent. I sent it simply for correctness reasons.
It would've been nice to see the ZONE_DMA removal patches just #define ZONE_DMA regardless, and include less #ifdefs scattered about; but at this point, I'd just as soon prefer to see a proper way to allocate things based on address constraints (as discussed in
http://www.gelato.unsw.edu.au/archives/linux-ia64/0609/19036.html).
Quoted 4 lines
CONFIG_ZONE_DMAisn't even optional on i386, so I'm curious how you could hit this compile failure.
Why, with custom code of course ;)
Quoted 5 lines · Andres Salomon
It would've been nice to see the
ZONE_DMAremoval patches just #defineZONE_DMAregardless, and include less #ifdefs scattered about; but at this point, I'd just as soon prefer to see a proper way to allocate things based on address constraints (as discussed in
http://www.gelato.unsw.edu.au/archives/linux-ia64/0609/19036.html).
Would you be willing to work on that? I can sent you a bunch of unfinished patches if you have the time.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Christoph Lameter
Quoted 5 lines · Andres Salomon
It would've been nice to see the
ZONE_DMAremoval patches just #defineZONE_DMAregardless, and include less #ifdefs scattered about; but at this point, I'd just as soon prefer to see a proper way to allocate things based on address constraints (as discussed in
http://www.gelato.unsw.edu.au/archives/linux-ia64/0609/19036.html).Would you be willing to work on that? I can sent you a bunch of unfinished patches if you have the time.
Sure, I'd be willing to work on it. Whether or not I have the time is questionable, but it wouldn't hurt to send them..