Re: [patch] ACPI: reduce code size, clean up, fix validator message

From: Michal Piotrowski
Date: Thu Jun 22 2006 - 10:30:11 EST


Hi Ingo,

On 22/06/06, Ingo Molnar <mingo@xxxxxxx> wrote:

* Andrew Morton <akpm@xxxxxxxx> wrote:

> > It complains about this only the 1st time, even though
> > this same code sequence runs for every (subsequent) ACPI interrupt.

that is because the lock validator turns itself off after the first
complaint.

> Yes, lockdep uses the callsite of spin_lock_init() to detect the
> "type" of a lock.
>
> But the ACPI obfuscation layers use the same spin_lock_init() site to
> initialise two not-the-same locks, so lockdep decides those two locks
> are of the same "type" and gets confused.
>
> We had earlier decided to remove that ACPI code which kmallocs a
> single spinlock. When that's done, lockdep will become unconfused.
>
> AFACIT it's all used for just two statically allocated locks anwyay.

Ok, great! Find below the (tested) cleanup that also fixes the validator
problem.

Problem fixed, thanks.


(if ACPI wants to turn this into platform-independent code it should be
a build-time and type-correct translation layer that understands things
like DEFINE_SPINLOCK as well.)

Ingo


Regards,
Michal

--
Michal K. K. Piotrowski
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)
-
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/