Re: [patch 2/4] PNP: replace pnp_resource_table with dynamically allocated resources

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rene Herman <rene.herman@...>
Cc: Len Brown <lenb@...>, <linux-acpi@...>, <linux-kernel@...>, Adam Belay <ambx1@...>, Adam M Belay <abelay@...>, Li Shaohua <shaohua.li@...>, Matthieu Castet <castet.matthieu@...>, Thomas Renninger <trenn@...>, Jaroslav Kysela <perex@...>, Andrew Morton <akpm@...>, Takashi Iwai <tiwai@...>
Date: Monday, May 19, 2008 - 7:41 pm

On Monday 19 May 2008 05:14:07 pm Rene Herman wrote:

My reasoning was that all AUTO entries should be at the end of the
list, so deleting them should not change the order of other entries.

I don't think there's a way to create a non-AUTO entry that follows
an AUTO one.  We add non-AUTO resources in:
  - isapnp_get_resources()
  - pnpbios_parse_allocated_resource_data()
  - pnpacpi_parse_allocated_resource()
  - pnp_set_current_resources() (sysfs interface)
and in all those cases, we use pnp_init_resources() first, which
clears out all existing resources.

We add AUTO resources in pnp_assign_{port,mem,etc}(), and those bail
out early if there's already a resource at the specified index.

All this is certainly not obvious from the code and it took me a
long time to convince myself of it, so I could easily be mistaken.

Bjorn

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 2/4] PNP: replace pnp_resource_table with dynamic..., Bjorn Helgaas, (Mon May 19, 7:41 pm)