Re: Question of " 202317a : ACPI / scan: Add acpi_device objects for all device nodes in the namespace" commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, September 03, 2014 11:14:02 AM Yasuaki Ishimatsu wrote:
> Hi Rafael,

Hi,

> Thank you for your explanation.
> 
> (2014/09/03 6:29), Rafael J. Wysocki wrote:
> > On Tuesday, September 02, 2014 10:53:09 AM Yasuaki Ishimatsu wrote:
> >> Hi Rafael,
> >
> > Hi,
> >
> >> Why is _SUN method decoded and the sun sysfs created even if _STA reports
> >> that the device is not present and not functional?
> >
> > sun sysfs is created for stuff that has _SUN.  It should be empty for devices
> > that aren't present, though, apparently.
> >
> >> By this commit, "202317a : ACPI / scan: Add acpi_device objects for all
> >> device nodes in the namespace", all device nodes in the namespace are
> >> shown under /sys/bus/acpi/devices direcotry even if the devices are not
> >> present and not functional.
> >>
> >> But ACPI specification says against return value information of _STA:
> >> A device can only decode its hardware resources if both bits 0 and 1 are set.
> >> If the device is not present (bit 0 cleared) or not enabled (bit 1 cleared),
> >> then the device must not decode its resources.
> >
> > But _SUN is not about hardware resources, is it?
> 
> I think so. But ACPI spec does not define what the hardware resources are.
> So someone says _SUN is about hardware resrouces.

Well, that is a very far fetched interpretation that I can't see any kind of
support for in the spec or elsewhere.

Nevertheless, it is not required that the return value of _SUN be the same
every time it is evaluated, so caching it is questionable.

> >
> >> In my understanding, when the device is not present and not functional,
> >> _SUN of the device must not be decoded. Is my understanding worng?
> >
> > If my understanding of the _INI section of the spec is correct, you have a
> > point, but the dependency is rather indirect as far as I can say.  If the
> > device is not present, we are not supposed to execute _INI for it and _SUN
> > can only be executed after _INI.
> 
> I know the spec. According to the _INI section of the spec, it says:
> 
> "If the _STA method indicates that the device is not present and is not
> functional, OSPM will not run the _INI and will not examine the children
> of the device for _INI methods."
> 
> In my understanding, if a device has both _SUN and _INI method, and _STA
> method indicates that the deviceis not present and is not functional,
> _SUN method cannot be executed.
> 
> If a device has _SUN method and does not have _INI method, and _STA
> method indicates that the deviceis not present and is not functional,
> can we execute _SUN method?

I'd think so.  I don't see anything preventing us from doing that in the spec.

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux