All of lore.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] fix location of zap_low_mappings
@ 2003-06-06  9:57 Jasper Spaans
  2003-06-06 11:34 ` William Lee Irwin III
  0 siblings, 1 reply; 4+ messages in thread
From: Jasper Spaans @ 2003-06-06  9:57 UTC (permalink / raw)
  To: linux-kernel

Hello list,

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?

[not Cc:-ed to the trivial patch monkey, as I'm not sure whether pgtable.h
 is the right place to put this]

Bye,
Jasper

Index: linux-2.5/include/asm-i386/pgtable.h
===================================================================
RCS file: /home/cvs/linux-2.5/include/asm-i386/pgtable.h,v
retrieving revision 1.33
diff -u -r1.33 pgtable.h
--- l/include/asm-i386/pgtable.h	4 May 2003 01:50:19 -0000	1.33
+++ l/include/asm-i386/pgtable.h	6 Jun 2003 08:40:18 -0000
@@ -23,6 +23,7 @@
 
 extern pgd_t swapper_pg_dir[1024];
 extern void paging_init(void);
+extern void zap_low_mappings (void);
 
 /*
  * ZERO_PAGE is a global shared page that is always zero: used
Index: l/include/asm-i386//smp.h
===================================================================
RCS file: /home/cvs/linux-2.5/include/asm-i386/smp.h,v
retrieving revision 1.24
diff -u -r1.24 smp.h
--- l/include/asm-i386/smp.h	4 Jun 2003 00:16:47 -0000	1.24
+++ l/include/asm-i386/smp.h	6 Jun 2003 08:40:18 -0000
@@ -43,7 +43,6 @@
 extern void smp_send_reschedule(int cpu);
 extern void smp_invalidate_rcv(void);		/* Process an NMI */
 extern void (*mtrr_hook) (void);
-extern void zap_low_mappings (void);
 
 #define MAX_APICID 256
 

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

``Got no clue? Too bad for you.''

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix location of zap_low_mappings
  2003-06-06  9:57 [TRIVIAL] fix location of zap_low_mappings Jasper Spaans
@ 2003-06-06 11:34 ` William Lee Irwin III
  2003-06-06 14:33   ` Jasper Spaans
  0 siblings, 1 reply; 4+ messages in thread
From: William Lee Irwin III @ 2003-06-06 11:34 UTC (permalink / raw)
  To: Jasper Spaans; +Cc: linux-kernel

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?
> [not Cc:-ed to the trivial patch monkey, as I'm not sure whether pgtable.h
>  is the right place to put this]

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().


-- wli

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix location of zap_low_mappings
  2003-06-06 11:34 ` William Lee Irwin III
@ 2003-06-06 14:33   ` Jasper Spaans
  2003-06-06 14:43     ` William Lee Irwin III
  0 siblings, 1 reply; 4+ messages in thread
From: Jasper Spaans @ 2003-06-06 14:33 UTC (permalink / raw)
  To: William Lee Irwin III, linux-kernel

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.''

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix location of zap_low_mappings
  2003-06-06 14:33   ` Jasper Spaans
@ 2003-06-06 14:43     ` William Lee Irwin III
  0 siblings, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2003-06-06 14:43 UTC (permalink / raw)
  To: Jasper Spaans; +Cc: linux-kernel

On Fri, Jun 06, 2003 at 04:34:43AM -0700, William Lee Irwin III wrote:
>> 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().

On Fri, Jun 06, 2003 at 04:33:35PM +0200, Jasper Spaans wrote:
> That wouldn't seem right to me:

Yeah. That suggestion was totally bogus. Fine as-is then.

-- wli

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-06 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06  9:57 [TRIVIAL] fix location of zap_low_mappings Jasper Spaans
2003-06-06 11:34 ` William Lee Irwin III
2003-06-06 14:33   ` Jasper Spaans
2003-06-06 14:43     ` William Lee Irwin III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.