lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121119210528.GJ17774@intel.com>
Date:	Mon, 19 Nov 2012 23:05:28 +0200
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jean Delvare <khali@...ux-fr.org>, ben-linux@...ff.org,
	w.sang@...gutronix.de, linux-kernel@...r.kernel.org,
	lenb@...nel.org, rafael.j.wysocki@...el.com,
	broonie@...nsource.wolfsonmicro.com, grant.likely@...retlab.ca,
	linus.walleij@...aro.org, mathias.nyman@...ux.intel.com,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH 2/2] ACPI / platform: Initialize ACPI handles of platform
 devices in advance

On Mon, Nov 19, 2012 at 09:44:21PM +0100, Rafael J. Wysocki wrote:
> So, we want to have acpi_handle (or acpi_node) in addition to of_node in struct
> device (to be used in the analogous way plus for the execution of AML methods),
> but we don't want all users of device.h to have to include ACPI headers
> where the acpi_handle data type is defined.  For this reason, we're using
> (void *) as its data type now, which let's say I'm not really happy with.
> 
> I've been thinking about that for quite a while, though, and I'm not really
> sure what to do about that.  Perhaps we could define something like
> 
> struct acpi_dev_node {
> #ifdef CONFIG_ACPI
> 	void *handle;
> #endif
> };
> 
> in device.h and use that as "struct acpi_dev_node acpi_node;" in struct device.
> Then, we could add the following macro
> 
> #ifdef CONFIG_ACPI
> #define ACPI_HANDLE(dev)	((dev)->acpi_node.handle)
> #else
> #define ACPI_HANDLE(dev)	(NULL)
> #endif
> 
> and redefine DEVICE_ACPI_HANDLE(dev) as ((acpi_handle)ACPI_HANDLE(dev)).
> 
> Then, the $subject patch would add "struct acpi_dev_node acpi_node;" to
> struct platform_device_info and use ACPI_HANDLE(dev) instead of accessing
> the struct device's field directly.

In addition to struct platform_device_info, we are also going to add
similar to struct i2c_board_info. There already is of_node pointer so I was
thinking to add acpi_handle like you did for platform_device. Type of that
pointer of course needs to be figured out :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ