Re: [rfc] [patch] consolidate/clean up spinlock.h files

From: Roman Zippel
Date: Fri Jun 03 2005 - 06:57:47 EST


Hi,

On Fri, 3 Jun 2005, Ingo Molnar wrote:

> yes, that's what i'm working towards - separating type from
> implementation on the arch level was the first step needed. I already
> had it at such a state yesterday (complete separation of type
> definitions, API definitions and asm implementation - it needed the
> initializers in the asm/spinlock_types.h file, but otherwise it was
> straightforward), but undid it in the last minute because sched.c and
> kernel_lock.c used some intermediate/raw primitives, leading to ugly
> dependencies. I'll re-try this angle today and repost the patch.

Some time ago I posted these patches: http://www.xs4all.nl/~zippel/task_patches/
They basically only move the type definitions into separate header files,
but would basically allow a much better cleanup of e.g. the spinlock
header file. Right now it's an ifdef jungle with lots of duplicated code.
In the end I'd like to see a single set of spinlock functions, which are
either inlined or instantiated in kernel/spinlock.c. But for the macros to
become inline functions, we need to cleanup the header dependencies, so
that we get: spinlock implementation -> preempt/irq implementation ->
task/thread definitions -> spinlock definitions.
In this context I'm a little concerned whether your up/smp separation
really works out. A proper cleanup needs changes outside the spinlock
code and not just splitting the existing header into smaller headers.

bye, Roman
-
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/