RE: [PATCH 1/5] ACPICA: Add acpi_dev_present

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

 




> -----Original Message-----
> From: Hanjun Guo [mailto:guohanjun@xxxxxxxxxx]
> Sent: Monday, November 23, 2015 8:41 PM
> To: Lukas Wunner; Moore, Robert
> Cc: Rafael J. Wysocki; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx;
> platform-driver-x86@xxxxxxxxxxxxxxx; Darren Hart; Corentin Chary; Lee,
> Chun-Yi; alsa-devel@xxxxxxxxxxxxxxxx; Takashi Iwai; Hui Wang; Mark Brown;
> Zheng, Lv; David Box
> Subject: Re: [PATCH 1/5] ACPICA: Add acpi_dev_present
> 
> On 2015/11/24 7:32, Lukas Wunner wrote:
> > Hi Robert,
> >
> > On Mon, Nov 23, 2015 at 10:22:27PM +0000, Moore, Robert wrote:
> >>>> acpi_dev_present
> >> Do you really want to be walking the ACPICA namespace for every call?
> > That's what the drivers currently do. Typically this is called only
> > once on initialization by the driver's ->probe callback.
> >
> > What did you have in mind instead, cache the result? Or store the HIDs
> > in the namespace in a hash that can be queried faster?
> 
> Will those drivers be loaded before the acpi namespace is scanned? if not,
> I think those IDs already cached, in acpi_init_device_object(),


I was thinking about something like this. Traversing the namespace over and over is truly brute force.



> 
> INIT_LIST_HEAD(&device->pnp.ids);
> ...
> acpi_set_pnp_ids(handle, &device->pnp, type);
> 
> please see API acpi_device_hid(), so I think you can introduce a API with
> acpi_device and HID passed as arguments in scan.c
> 
> Thanks
> Hanjun

--
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