public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.9-mm1-V0.2
@ 2004-10-25 22:00 Remi Colinet
  2004-10-25 22:19 ` 2.6.9-mm1-V0.2 Remi Colinet
  0 siblings, 1 reply; 2+ messages in thread
From: Remi Colinet @ 2004-10-25 22:00 UTC (permalink / raw)
  To: mingo, linux-kernel

Hi ,

Patch needed, when CONFIG_HOTPLUG_CPU is enabled, in order to fix a 
compile error.

--- mm/swap.c.orig      2004-10-22 22:31:58.000000000 +0200
+++ mm/swap.c   2004-10-22 23:10:44.202728352 +0200
@@ -423,12 +423,12 @@
#ifdef CONFIG_HOTPLUG_CPU
static void lru_drain_cache(unsigned int cpu)
{
-       struct pagevec *pvec = &per_cpu(lru_add_pvecs, cpu);
+       struct pagevec *pvec = &per_cpu_var_locked(lru_add_pvecs, cpu);

       /* CPU is dead, so no locking needed. */
       if (pagevec_count(pvec))
               __pagevec_lru_add(pvec);
-       pvec = &per_cpu(lru_add_active_pvecs, cpu);
+       pvec = &per_cpu_var_locked(lru_add_active_pvecs, cpu);
       if (pagevec_count(pvec))
               __pagevec_lru_add_active(pvec);
}

Otherwise, I get :

  CC      mm/swap.o
mm/swap.c: In function `lru_drain_cache':
mm/swap.c:426: `per_cpu__lru_add_pvecs' undeclared (first use in this 
function)
mm/swap.c:426: (Each undeclared identifier is reported only once
mm/swap.c:426: for each function it appears in.)
mm/swap.c:426: warning: type defaults to `int' in declaration of `type name'
mm/swap.c:426: invalid type argument of `unary *'
mm/swap.c:431: `per_cpu__lru_add_active_pvecs' undeclared (first use in 
this function)
mm/swap.c:431: warning: type defaults to `int' in declaration of `type name'
mm/swap.c:431: invalid type argument of `unary *'
make[1]: *** [mm/swap.o] Error 1
make: *** [mm] Error 2

Hope this help,
Remi

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

* Re: 2.6.9-mm1-V0.2
  2004-10-25 22:00 2.6.9-mm1-V0.2 Remi Colinet
@ 2004-10-25 22:19 ` Remi Colinet
  0 siblings, 0 replies; 2+ messages in thread
From: Remi Colinet @ 2004-10-25 22:19 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

Remi Colinet wrote:

> Hi ,
>
> Patch needed, when CONFIG_HOTPLUG_CPU is enabled, in order to fix a 
> compile error.
>
> --- mm/swap.c.orig      2004-10-22 22:31:58.000000000 +0200
> +++ mm/swap.c   2004-10-22 23:10:44.202728352 +0200
> @@ -423,12 +423,12 @@
> #ifdef CONFIG_HOTPLUG_CPU
> static void lru_drain_cache(unsigned int cpu)
> {
> -       struct pagevec *pvec = &per_cpu(lru_add_pvecs, cpu);
> +       struct pagevec *pvec = &per_cpu_var_locked(lru_add_pvecs, cpu);
>
>       /* CPU is dead, so no locking needed. */
>       if (pagevec_count(pvec))
>               __pagevec_lru_add(pvec);
> -       pvec = &per_cpu(lru_add_active_pvecs, cpu);
> +       pvec = &per_cpu_var_locked(lru_add_active_pvecs, cpu);
>       if (pagevec_count(pvec))
>               __pagevec_lru_add_active(pvec);
> }
>
> Otherwise, I get :
>
>  CC      mm/swap.o
> mm/swap.c: In function `lru_drain_cache':
> mm/swap.c:426: `per_cpu__lru_add_pvecs' undeclared (first use in this 
> function)
> mm/swap.c:426: (Each undeclared identifier is reported only once
> mm/swap.c:426: for each function it appears in.)
> mm/swap.c:426: warning: type defaults to `int' in declaration of `type 
> name'
> mm/swap.c:426: invalid type argument of `unary *'
> mm/swap.c:431: `per_cpu__lru_add_active_pvecs' undeclared (first use 
> in this function)
> mm/swap.c:431: warning: type defaults to `int' in declaration of `type 
> name'
> mm/swap.c:431: invalid type argument of `unary *'
> make[1]: *** [mm/swap.o] Error 1
> make: *** [mm] Error 2

This patch is also needed when CONFIG_HOTPLUG_CPU is enabled 
(fork.c:line 1412, uses takeover_tasklets)

--- kernel/softirq.c.orig       2004-10-26 00:04:51.000000000 +0200
+++ kernel/softirq.c    2004-10-26 00:05:03.000000000 +0200
@@ -464,7 +464,7 @@
        BUG();
 }
 
-static void takeover_tasklets(unsigned int cpu)
+void takeover_tasklets(unsigned int cpu)
 {
        struct tasklet_struct **i;
 

Remi

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

end of thread, other threads:[~2004-10-26  4:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 22:00 2.6.9-mm1-V0.2 Remi Colinet
2004-10-25 22:19 ` 2.6.9-mm1-V0.2 Remi Colinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox