[PATCH] rpadlpar changes for DLPAR VIO devices -- please review

Hollis Blanchard hollisb at us.ibm.com
Thu Feb 26 04:59:42 EST 2004

On Feb 25, 2004, at 11:40 AM, Linda Xie wrote:

> Hollis Blanchard wrote:
>> On Feb 24, 2004, at 3:44 PM, Linda Xie wrote:
>>> +    if (strstr(drc_name, "-V"))
>>> +        dn = find_php_slot_vio_node(drc_name);
>>> +    else
>>> +        dn = find_php_slot_pci_node(drc_name);
>> I'm not sure this is safe as a canonical test. Maybe
>> sprintf("%s-V%i-D%i", ...)? Is this namespace defined and documented
>> somewhere? I just don't feel comfortable with a two-character test
>> determining it one way or the other.
> I agreed [ event with sprintf("%s-V%i-D%i", ...)]. Because  the format
>  can be
> changed by FW at anytime,  It looks like we have to search OFDT twice
> (the worst case) for a given
> drc-name:
> Call  find_php_slot_vio_node(drc_name) first, if return value is NULL,
> then
> call find_php_slot_pci_node(drc_name).

I had trouble understanding that first part, but I agree that it makes
sense to search both for vdevice and pci devices for a given location
code, rather than try to parse the location code yourself.

Hollis Blanchard
IBM Linux Technology Center

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list