Re: [PATCH] Simplify net/flow.c

From: Rusty Russell
Date: Sat Jan 24 2004 - 00:09:24 EST


In message <20040122195104.31cc2496.akpm@xxxxxxxx> you write:
> It doesn't link if CONFIG_SMP=n. semaphore `cpucontrol', used in
> flow_cache_flush() is defined in kernel/cpu.c which is not included in
> uniprocessor builds.
>
> Here's one possible fix.

....

> /* Don't want cpus going down or up during this, also protects
> * against multiple callers. */
> - down(&cpucontrol);
> + down_cpucontrol();

OK. Although I think I prefer to have down_cpucontrol() defined under
#ifdef CONFIG_HOTPLUG_CPU, and revert to using a normal sem here as
well to cover the CONFIG_HOTPLUG_CPU=n CONFIG_SMP=y case. But I will
produce an additional patch with the hotplug cpu patches.

Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/