Re: [PATCH] resource/x86: add sticky resource type

From: Ingo Molnar
Date: Thu Aug 28 2008 - 04:22:05 EST



* Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:

> Ingo suggest to use sticky resource type to record fixed resource. so
> could check that BAR and avoid update it after request_resource
> failed.
>
> and we could remove tricky code about insert some resource with
> late_initcall.

very nice patch! I've split your patch into two, and applied the
kernel/resource.c and include/linux/ioresource.h core bits to the
tip/core/resources topic branch - see the first patch below. (i renamed
the new API to check_sticky_resource())

Then i've merged this topic branch into irq/sparseirq and applied the
x86 bits that use this new facility to irq/sparseirq [on which it has
many dependencies, io_apic.c and apic.c got unified, etc.]. See the
second patch below.

Especially the second patch shows how much fragile resource code we are
able to remove this way:

5 files changed, 22 insertions(+), 138 deletions(-)

nice work.

Does anyone have any suggestions of how to improve this some more? (or
do it differently)

Ingo

----------------------->