Re: [patch 00/37] PNP resource_table cleanups, v2

!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@...>, Li Shaohua <shaohua.li@...>, Matthieu Castet <castet.matthieu@...>, Thomas Renninger <trenn@...>, Jaroslav Kysela <perex@...>, Andrew Morton <akpm@...>
Date: Wednesday, April 2, 2008 - 5:35 pm

On Tuesday 01 April 2008 05:43:30 pm Rene Herman wrote:

Thanks again for your detailed review and for fixing my ISAPNP
mistakes.  That was a lot of code to go through.


I copied that from acpi_ex_eisa_id_to_string(), but I agree that
"'A' - 1" is much clearer, so I changed it.


Yes, I wonder about that, too.  Including that bit would mean that
the first character of PNP IDs could include characters at offsets
0x20-0x3f, i.e., "`a..z{|}~" and DEL.  I poked around and found
some IDs that seem to depend on that, e.g., "nEC8241" in the 8250_pnp
serial driver.

I changed this to include six bits for the first character, and
masked off the top bit in PNPBIOS.  I think that should preserve
the previous behavior; see what you think.


Thanks for pointing that out.  I changed it to use hex_asc() so bisection
should work.


I changed it to "len == 0", thanks.


Also changed to "len == 0".


One would expect that "mem.write_protect == 1" would mean read-only.
Unfortunately, I'm too lazy to un-obfuscate the ACPI CA logic that
deals with mem.write_protect, since it seems to be all table-driven.
In the absence of understanding, I tried to preserve the existing
behavior.  I think I did, i.e., if "write_protect == ACPI_READ_WRITE_MEMORY",
we add in IORESOURCE_MEM_WRITEABLE, otherwise do nothing.  If I
goofed that up, let me know.

I have an ISA question here, too: previously isapnp_read_resources()
set only res.start for IO and MMIO resources and left res.end unset
(should be zero, I think).  I don't think ISA tells you the size, so
I assumed "1", but I don't know if that's the right thing to do.  My
reasoning was "zero is obviously wrong, two could be too big and
generate bogus conflicts, so one is the only possible choice."


No good reason; I think I was just being lazy and making the code
shorter.  I changed them all to static inlines.  (After making this
change, I did trip over a use of pnp_mem_flags() as an lvalue, so I
added a patch that removed that usage.)

I also made the _len() functions inlines and restructured the logic in
both _len() and _valid() functions.  I couldn't stand the thought of all
those extra list traversals in there :-)  I'd appreciate a double-check
of that.


Fixed, thanks.

I'll add in a couple more patches to (finally) remove the fixed-size
pnp_resource_table and post a v3 in a day or two.

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

Messages in current thread:
[patch 00/37] PNP resource_table cleanups, v2, Bjorn Helgaas, (Tue Apr 1, 11:16 am)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Tue Apr 1, 7:43 pm)
Re: [patch 00/37] PNP resource_table cleanups, v2, Bjorn Helgaas, (Wed Apr 2, 5:35 pm)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Thu Apr 3, 11:54 am)
Re: [patch 00/37] PNP resource_table cleanups, v2, Bjorn Helgaas, (Thu May 1, 4:47 pm)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Sun May 4, 10:14 am)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Sun May 4, 10:19 am)
Re: [patch 00/37] PNP resource_table cleanups, v2, Bjorn Helgaas, (Mon May 5, 10:48 am)
Re: [patch 00/37] PNP resource_table cleanups, v2, Bjorn Helgaas, (Thu Apr 3, 12:43 pm)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Thu Apr 3, 1:12 pm)
Re: [patch 00/37] PNP resource_table cleanups, v2, Rene Herman, (Thu Apr 3, 3:29 pm)