Re: [TRIVIAL] fix location of zap_low_mappings

From: Jasper Spaans (jasper@vs19.net)
Date: Fri Jun 06 2003 - 09:33:35 EST


On Fri, Jun 06, 2003 at 04:34:43AM -0700, William Lee Irwin III wrote:
> On Fri, Jun 06, 2003 at 11:57:49AM +0200, Jasper Spaans wrote:
> > When compiling current BK 2.5, I get a warning about zap_low_mappings not
> > being declared. Moving it from smp.h to pgtable.h fixes this (and doesn't
> > break my setup).
> > Does anyone object to this fix?

> It's basically not supposed to be visible on UP. Perhaps a better
> approach would be declare it in pgtable.h as you did, stub out the UP
> case with an empty function, and un-#ifdef it from mem_init().

That wouldn't seem right to me:

* in the UP-case, it is explicitly called in mem_init() [mm/init.c]:

void __init mem_init(void)
{
[...]
#ifndef CONFIG_SMP
        zap_low_mappings();
#endif
}

* in the SMP-case, this call is delayed until
  smp_cpus_done() [kernel/smpboot.c]

These two cases are fine however, as the UP-case defines it in mm/init.c,
and the SMP-case has CONFIG_SMP enabled and includes <smp.h>; the warning
comes from this function being called from acpi_restore_state_mem()
[kernel/acpi/sleep.c]) in the UP-case, in which case it isn't declared in
<smp.h>.

Bye,

Jasper

-- 
Jasper Spaans
http://jsp.vs19.net/contact/

``Got no clue? Too bad for you.'' - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:30 EST