2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-06 16:00:44 -07:00
|
|
|
|
2005-10-29 19:07:23 +01:00
|
|
|
|
2010-06-08 07:48:20 -06:00
|
|
|
|
2014-04-23 17:57:41 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-10-30 15:03:48 -08:00
|
|
|
|
2009-08-20 20:25:32 +02:00
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
2012-10-31 22:45:02 +01:00
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
2014-06-02 19:42:58 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-13 17:54:41 +01:00
|
|
|
|
2012-08-06 01:45:11 +02:00
|
|
|
|
2005-10-13 17:54:41 +01:00
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-10-30 01:36:48 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-06-10 01:52:57 -05:00
|
|
|
|
|
|
|
|
|
2011-07-27 12:11:25 -07:00
|
|
|
|
2011-06-10 01:52:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-29 18:04:53 +01:00
|
|
|
|
2013-03-26 10:35:16 +01:00
|
|
|
|
|
|
|
|
|
2011-06-10 01:52:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-29 23:26:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 17:57:41 -05:00
|
|
|
|
2014-06-17 15:51:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 17:57:41 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-19 17:52:27 +00:00
|
|
|
|
2012-10-29 23:26:56 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2009-04-27 02:38:16 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-23 17:10:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-11-13 17:47:13 +01:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-04-27 02:38:16 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-05-20 13:42:02 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-06-17 15:51:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-20 13:42:02 +03:00
|
|
|
|
|
|
|
|
|
2006-01-19 17:52:27 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
driver core/platform: remove unused implicit padding in platform_object
Up to 7 bytes are wasted at the end of struct platform_object
in the form of padding after name field: unfortunately this
padding is not used when allocating the memory to hold the
name.
This patch converts name array from name[1] to C99 flexible
array name[] (equivalent to name[0]) so that no padding is
required by the presence of this field. Memory allocation
is updated to take care of allocating an additional byte for
the NUL terminating character.
Built on Fedora 20, using GCC 4.8, for ARM, i386, SPARC64 and
x86_64 architectures, the data structure layout can be reported
with following command:
$ pahole drivers/base/platform.o \
--recursive \
--class_name device,pdev_archdata,platform_device,platform_object
Please find below some comparisons of structure layout for arm,
i386, sparc64 and x86_64 architecture before and after the patch.
--- obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.290960701 +0200
+++ obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.851988347 +0200
@@ -81,10 +81,9 @@
/* XXX last struct has 4 bytes of padding */
/* --- cacheline 6 boundary (384 bytes) was 8 bytes ago --- */
- char name[1]; /* 392 1 */
+ char name[0]; /* 392 0 */
- /* size: 400, cachelines: 7, members: 2 */
- /* padding: 7 */
+ /* size: 392, cachelines: 7, members: 2 */
/* paddings: 1, sum paddings: 4 */
- /* last cacheline: 16 bytes */
+ /* last cacheline: 8 bytes */
};
--- obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.305960691 +0200
+++ obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.875988332 +0200
@@ -73,9 +73,8 @@
struct platform_object {
struct platform_device pdev; /* 0 396 */
/* --- cacheline 6 boundary (384 bytes) was 12 bytes ago --- */
- char name[1]; /* 396 1 */
+ char name[0]; /* 396 0 */
- /* size: 400, cachelines: 7, members: 2 */
- /* padding: 3 */
- /* last cacheline: 16 bytes */
+ /* size: 396, cachelines: 7, members: 2 */
+ /* last cacheline: 12 bytes */
};
--- obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.406960625 +0200
+++ obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.971988269 +0200
@@ -94,9 +94,8 @@
struct platform_object {
struct platform_device pdev; /* 0 2208 */
/* --- cacheline 34 boundary (2176 bytes) was 32 bytes ago --- */
- char name[1]; /* 2208 1 */
+ char name[0]; /* 2208 0 */
- /* size: 2216, cachelines: 35, members: 2 */
- /* padding: 7 */
- /* last cacheline: 40 bytes */
+ /* size: 2208, cachelines: 35, members: 2 */
+ /* last cacheline: 32 bytes */
};
--- obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.432960608 +0200
+++ obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:21.000988250 +0200
@@ -84,9 +84,8 @@
struct platform_object {
struct platform_device pdev; /* 0 720 */
/* --- cacheline 11 boundary (704 bytes) was 16 bytes ago --- */
- char name[1]; /* 720 1 */
+ char name[0]; /* 720 0 */
- /* size: 728, cachelines: 12, members: 2 */
- /* padding: 7 */
- /* last cacheline: 24 bytes */
+ /* size: 720, cachelines: 12, members: 2 */
+ /* last cacheline: 16 bytes */
};
Changes from v5 [1]:
- dropped dma_mask allocation changes and only kept padding
removal changes (name array length set to 0).
Changes from v4 [2]:
[by Emil Goode <emilgoode@gmail.com>:]
- Split v4 of the patch into two separate patches.
- Generated new object file size and data structure layout info.
- Updated the changelog message.
Changes from v3 [3]:
- fixed commit message so that git am doesn't fail.
Changes from v2 [4]:
- move 'dma_mask' to platform_object so that it's always
allocated and won't leak on release; remove all previously
added support functions.
- use C99 flexible array member for 'name' to remove padding
at the end of platform_object.
Changes from v1 [5]:
- remove unneeded kfree() from error path
- add reference to author/commit adding allocation of dmamask
Changes from v0 [6]:
- small rewrite to squeeze the patch to a bare minimal
[1] http://lkml.kernel.org/r/1401122483-31603-2-git-send-email-emilgoode@gmail.com
http://lkml.kernel.org/r/1401122483-31603-1-git-send-email-emilgoode@gmail.com
http://lkml.kernel.org/r/1401122483-31603-3-git-send-email-emilgoode@gmail.com
[2] http://lkml.kernel.org/r/1390817152-30898-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3541871/
[3] http://lkml.kernel.org/r/1390771138-28348-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3540081/
[4] http://lkml.kernel.org/r/1389683909-17495-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3484411/
[5] http://lkml.kernel.org/r/1389649085-7365-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3480961/
[6] http://lkml.kernel.org/r/1386886207-2735-1-git-send-email-ydroneaud@opteya.com
Cc: Emil Goode <emilgoode@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Olof Johansson <olof@lixom.net>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-30 22:02:47 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-02-14 14:18:53 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2010-10-20 11:45:13 -06:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-08 00:43:01 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2014-06-02 19:42:58 -05:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-14 14:18:53 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2007-09-09 12:54:16 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
driver core/platform: remove unused implicit padding in platform_object
Up to 7 bytes are wasted at the end of struct platform_object
in the form of padding after name field: unfortunately this
padding is not used when allocating the memory to hold the
name.
This patch converts name array from name[1] to C99 flexible
array name[] (equivalent to name[0]) so that no padding is
required by the presence of this field. Memory allocation
is updated to take care of allocating an additional byte for
the NUL terminating character.
Built on Fedora 20, using GCC 4.8, for ARM, i386, SPARC64 and
x86_64 architectures, the data structure layout can be reported
with following command:
$ pahole drivers/base/platform.o \
--recursive \
--class_name device,pdev_archdata,platform_device,platform_object
Please find below some comparisons of structure layout for arm,
i386, sparc64 and x86_64 architecture before and after the patch.
--- obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.290960701 +0200
+++ obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.851988347 +0200
@@ -81,10 +81,9 @@
/* XXX last struct has 4 bytes of padding */
/* --- cacheline 6 boundary (384 bytes) was 8 bytes ago --- */
- char name[1]; /* 392 1 */
+ char name[0]; /* 392 0 */
- /* size: 400, cachelines: 7, members: 2 */
- /* padding: 7 */
+ /* size: 392, cachelines: 7, members: 2 */
/* paddings: 1, sum paddings: 4 */
- /* last cacheline: 16 bytes */
+ /* last cacheline: 8 bytes */
};
--- obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.305960691 +0200
+++ obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.875988332 +0200
@@ -73,9 +73,8 @@
struct platform_object {
struct platform_device pdev; /* 0 396 */
/* --- cacheline 6 boundary (384 bytes) was 12 bytes ago --- */
- char name[1]; /* 396 1 */
+ char name[0]; /* 396 0 */
- /* size: 400, cachelines: 7, members: 2 */
- /* padding: 3 */
- /* last cacheline: 16 bytes */
+ /* size: 396, cachelines: 7, members: 2 */
+ /* last cacheline: 12 bytes */
};
--- obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.406960625 +0200
+++ obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.971988269 +0200
@@ -94,9 +94,8 @@
struct platform_object {
struct platform_device pdev; /* 0 2208 */
/* --- cacheline 34 boundary (2176 bytes) was 32 bytes ago --- */
- char name[1]; /* 2208 1 */
+ char name[0]; /* 2208 0 */
- /* size: 2216, cachelines: 35, members: 2 */
- /* padding: 7 */
- /* last cacheline: 40 bytes */
+ /* size: 2208, cachelines: 35, members: 2 */
+ /* last cacheline: 32 bytes */
};
--- obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.432960608 +0200
+++ obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:21.000988250 +0200
@@ -84,9 +84,8 @@
struct platform_object {
struct platform_device pdev; /* 0 720 */
/* --- cacheline 11 boundary (704 bytes) was 16 bytes ago --- */
- char name[1]; /* 720 1 */
+ char name[0]; /* 720 0 */
- /* size: 728, cachelines: 12, members: 2 */
- /* padding: 7 */
- /* last cacheline: 24 bytes */
+ /* size: 720, cachelines: 12, members: 2 */
+ /* last cacheline: 16 bytes */
};
Changes from v5 [1]:
- dropped dma_mask allocation changes and only kept padding
removal changes (name array length set to 0).
Changes from v4 [2]:
[by Emil Goode <emilgoode@gmail.com>:]
- Split v4 of the patch into two separate patches.
- Generated new object file size and data structure layout info.
- Updated the changelog message.
Changes from v3 [3]:
- fixed commit message so that git am doesn't fail.
Changes from v2 [4]:
- move 'dma_mask' to platform_object so that it's always
allocated and won't leak on release; remove all previously
added support functions.
- use C99 flexible array member for 'name' to remove padding
at the end of platform_object.
Changes from v1 [5]:
- remove unneeded kfree() from error path
- add reference to author/commit adding allocation of dmamask
Changes from v0 [6]:
- small rewrite to squeeze the patch to a bare minimal
[1] http://lkml.kernel.org/r/1401122483-31603-2-git-send-email-emilgoode@gmail.com
http://lkml.kernel.org/r/1401122483-31603-1-git-send-email-emilgoode@gmail.com
http://lkml.kernel.org/r/1401122483-31603-3-git-send-email-emilgoode@gmail.com
[2] http://lkml.kernel.org/r/1390817152-30898-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3541871/
[3] http://lkml.kernel.org/r/1390771138-28348-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3540081/
[4] http://lkml.kernel.org/r/1389683909-17495-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3484411/
[5] http://lkml.kernel.org/r/1389649085-7365-1-git-send-email-ydroneaud@opteya.com
https://patchwork.kernel.org/patch/3480961/
[6] http://lkml.kernel.org/r/1386886207-2735-1-git-send-email-ydroneaud@opteya.com
Cc: Emil Goode <emilgoode@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Olof Johansson <olof@lixom.net>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-30 22:02:47 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-10 01:52:57 -05:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-14 14:18:53 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2009-01-28 21:01:02 +01:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:44 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:44 +02:00
|
|
|
|
2011-04-20 09:44:45 +02:00
|
|
|
|
2011-04-20 09:44:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-14 14:18:53 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:42 +02:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2011-04-20 09:44:42 +02:00
|
|
|
|
2011-04-20 09:44:43 +02:00
|
|
|
|
2011-04-20 09:44:42 +02:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
2008-10-30 01:36:48 +01:00
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
2009-06-02 15:39:55 -07:00
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-30 01:36:48 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-28 10:15:39 -06:00
|
|
|
|
2013-03-26 10:35:16 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-30 01:36:48 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-06 08:15:26 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-02 20:55:54 +02:00
|
|
|
|
|
|
|
|
|
2012-07-27 22:14:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
|
|
|
|
|
2008-10-15 22:05:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
2011-06-10 01:52:57 -05:00
|
|
|
|
2005-11-05 21:19:33 +00:00
|
|
|
|
|
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:27 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2010-06-21 16:11:44 +02:00
|
|
|
|
|
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2010-03-11 18:11:45 +02:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2011-12-08 22:53:29 +01:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2010-06-21 16:11:44 +02:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
|
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2010-06-21 16:11:44 +02:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node
Modify struct acpi_dev_node to contain a pointer to struct acpi_device
associated with the given device object (that is, its ACPI companion
device) instead of an ACPI handle corresponding to it. Introduce two
new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
ACPI_HANDLE() macro to take the above changes into account.
Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
use ACPI_COMPANION_SET() instead. For some of them who used to
pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
introduce a helper routine acpi_preset_companion() doing an
equivalent thing.
The main motivation for doing this is that there are things
represented by struct acpi_device objects that don't have valid
ACPI handles (so called fixed ACPI hardware features, such as
power and sleep buttons) and we would like to create platform
device objects for them and "glue" them to their ACPI companions
in the usual way (which currently is impossible due to the
lack of valid ACPI handles). However, there are more reasons
why it may be useful.
First, struct acpi_device pointers allow of much better type checking
than void pointers which are ACPI handles, so it should be more
difficult to write buggy code using modified struct acpi_dev_node
and the new macros. Second, the change should help to reduce (over
time) the number of places in which the result of ACPI_HANDLE() is
passed to acpi_bus_get_device() in order to obtain a pointer to the
struct acpi_device associated with the given "physical" device,
because now that pointer is returned by ACPI_COMPANION() directly.
Finally, the change should make it easier to write generic code that
will build both for CONFIG_ACPI set and unset without adding explicit
compiler directives to it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
2013-11-11 22:41:56 +01:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-07 17:31:54 +04:00
|
|
|
|
|
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
|
|
|
|
|
2010-09-07 17:31:54 +04:00
|
|
|
|
|
|
|
|
|
2010-06-21 16:11:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node
Modify struct acpi_dev_node to contain a pointer to struct acpi_device
associated with the given device object (that is, its ACPI companion
device) instead of an ACPI handle corresponding to it. Introduce two
new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
ACPI_HANDLE() macro to take the above changes into account.
Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
use ACPI_COMPANION_SET() instead. For some of them who used to
pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
introduce a helper routine acpi_preset_companion() doing an
equivalent thing.
The main motivation for doing this is that there are things
represented by struct acpi_device objects that don't have valid
ACPI handles (so called fixed ACPI hardware features, such as
power and sleep buttons) and we would like to create platform
device objects for them and "glue" them to their ACPI companions
in the usual way (which currently is impossible due to the
lack of valid ACPI handles). However, there are more reasons
why it may be useful.
First, struct acpi_device pointers allow of much better type checking
than void pointers which are ACPI handles, so it should be more
difficult to write buggy code using modified struct acpi_dev_node
and the new macros. Second, the change should help to reduce (over
time) the number of places in which the result of ACPI_HANDLE() is
passed to acpi_bus_get_device() in order to obtain a pointer to the
struct acpi_device associated with the given "physical" device,
because now that pointer is returned by ACPI_COMPANION() directly.
Finally, the change should make it easier to write generic code that
will build both for CONFIG_ACPI set and unset without adding explicit
compiler directives to it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
2013-11-11 22:41:56 +01:00
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-21 16:11:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-25 11:16:00 +02:00
|
|
|
|
2008-09-22 14:41:40 -07:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-13 22:00:43 -06:00
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
|
|
|
|
|
2014-02-13 22:00:43 -06:00
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
|
|
|
|
|
2013-09-23 16:27:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
2014-02-13 22:00:43 -06:00
|
|
|
|
2012-11-26 10:04:53 +01:00
|
|
|
|
|
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-13 22:00:43 -06:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-25 12:40:50 +08:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2013-07-14 17:43:06 -07:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
2013-05-25 12:40:50 +08:00
|
|
|
|
|
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
2013-05-25 12:40:50 +08:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-04 22:13:33 +02:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
2013-05-25 12:40:50 +08:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
2010-02-14 14:18:53 +00:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2005-11-09 17:23:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-23 16:27:26 +02:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-23 16:27:26 +02:00
|
|
|
|
2013-03-26 10:35:15 +01:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-04 14:56:36 -08:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-23 16:27:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-12 20:17:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-12 20:17:41 -07:00
|
|
|
|
|
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-06 17:12:41 -07:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
2007-11-28 15:59:15 -08:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
2010-08-06 17:12:41 -07:00
|
|
|
|
2006-11-16 23:28:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-12-29 20:11:20 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-11 18:11:45 +02:00
|
|
|
|
|
|
|
|
|
2009-12-29 20:11:20 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-07 17:31:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-29 20:11:20 -08:00
|
|
|
|
2010-09-07 17:31:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-29 20:11:20 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
|
|
|
|
|
ACPI: fix module autoloading for ACPI enumerated devices
ACPI enumerated devices has ACPI style _HID and _CID strings,
all of these strings can be used for both driver loading and matching.
Currently, in Platform, I2C and SPI bus, the ACPI style driver matching
is supported by invoking acpi_driver_match_device() in bus .match() callback.
But, the module autoloading is still broken.
For example, there is any ACPI device with _HID "INTABCD" that is
enumerated to platform bus, and we have a driver that can probe it.
The driver exports its module_alias as "acpi:INTABCD" use the following code
static const struct acpi_device_id xxx_acpi_match[] = {
{ "INTABCD", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, xxx_acpi_match);
But, unfortunately, the device' modalias is shown as "platform:INTABCD:00",
please refer to modalias_show() and platform_uevent() in
drivers/base/platform.c.
This results in that the driver will not be loaded automatically when the
device node is created, because their modalias do not match.
This also applies to I2C and SPI bus.
With this patch, the device' modalias will be shown as "acpi:INTABCD" as well.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-14 16:46:37 +08:00
|
|
|
|
|
|
|
|
|
2014-01-14 16:46:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACPI: fix module autoloading for ACPI enumerated devices
ACPI enumerated devices has ACPI style _HID and _CID strings,
all of these strings can be used for both driver loading and matching.
Currently, in Platform, I2C and SPI bus, the ACPI style driver matching
is supported by invoking acpi_driver_match_device() in bus .match() callback.
But, the module autoloading is still broken.
For example, there is any ACPI device with _HID "INTABCD" that is
enumerated to platform bus, and we have a driver that can probe it.
The driver exports its module_alias as "acpi:INTABCD" use the following code
static const struct acpi_device_id xxx_acpi_match[] = {
{ "INTABCD", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, xxx_acpi_match);
But, unfortunately, the device' modalias is shown as "platform:INTABCD:00",
please refer to modalias_show() and platform_uevent() in
drivers/base/platform.c.
This results in that the driver will not be loaded automatically when the
device node is created, because their modalias do not match.
This also applies to I2C and SPI bus.
With this patch, the device' modalias will be shown as "acpi:INTABCD" as well.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-14 16:46:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 14:24:37 -07:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
2014-06-02 19:42:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 14:24:37 -07:00
|
|
|
|
|
|
|
|
|
2014-06-02 19:42:58 -05:00
|
|
|
|
2013-08-23 14:24:37 -07:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
2013-08-23 14:24:37 -07:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
2007-08-14 15:15:12 +02:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:21 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-26 10:35:16 +01:00
|
|
|
|
2010-06-08 07:48:21 -06:00
|
|
|
|
|
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
ACPI: fix module autoloading for ACPI enumerated devices
ACPI enumerated devices has ACPI style _HID and _CID strings,
all of these strings can be used for both driver loading and matching.
Currently, in Platform, I2C and SPI bus, the ACPI style driver matching
is supported by invoking acpi_driver_match_device() in bus .match() callback.
But, the module autoloading is still broken.
For example, there is any ACPI device with _HID "INTABCD" that is
enumerated to platform bus, and we have a driver that can probe it.
The driver exports its module_alias as "acpi:INTABCD" use the following code
static const struct acpi_device_id xxx_acpi_match[] = {
{ "INTABCD", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, xxx_acpi_match);
But, unfortunately, the device' modalias is shown as "platform:INTABCD:00",
please refer to modalias_show() and platform_uevent() in
drivers/base/platform.c.
This results in that the driver will not be loaded automatically when the
device node is created, because their modalias do not match.
This also applies to I2C and SPI bus.
With this patch, the device' modalias will be shown as "acpi:INTABCD" as well.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-14 16:46:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-04 11:52:40 +08:00
|
|
|
|
2011-08-15 16:51:22 +02:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-04 11:52:40 +08:00
|
|
|
|
2010-01-26 09:35:00 +01:00
|
|
|
|
2009-02-04 11:52:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 22:50:12 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-01-31 22:47:44 +08:00
|
|
|
|
2009-02-04 11:52:40 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-06-02 19:42:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-31 22:45:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:20 -06:00
|
|
|
|
2009-02-04 11:52:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-30 01:36:48 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-04 22:13:33 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-06-04 22:13:33 +02:00
|
|
|
|
|
|
|
|
|
2006-09-03 13:16:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-04 22:13:33 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-06-04 22:13:33 +02:00
|
|
|
|
|
|
|
|
|
2005-10-28 09:52:56 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2009-08-20 20:25:32 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 22:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 22:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
2011-04-11 22:54:42 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 22:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 22:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 22:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
2009-07-22 00:37:25 +02:00
|
|
|
|
2011-04-29 00:36:32 +02:00
|
|
|
|
|
|
|
|
|
2011-04-29 00:36:05 +02:00
|
|
|
|
2008-05-21 01:40:43 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-08-23 14:24:37 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-29 10:37:33 -07:00
|
|
|
|
2009-08-20 20:25:32 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-10 01:36:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-27 10:35:08 +01:00
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
2006-11-27 10:35:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 11:57:56 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-04-21 07:22:53 -07:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-27 17:38:51 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-27 17:38:51 +09:00
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
2009-11-27 17:38:51 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-06 01:45:11 +02:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-04-21 07:22:53 -07:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
2013-08-17 20:42:25 +08:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-04-21 07:22:53 -07:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
2013-08-17 20:42:25 +08:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-26 10:35:16 +01:00
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-09 06:57:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-13 17:56:56 +09:00
|
|
|
|
2010-03-09 06:57:53 +00:00
|
|
|
|
2010-03-29 15:51:35 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-09 06:57:53 +00:00
|
|
|
|
2010-03-29 15:51:35 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-09 06:57:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-29 15:51:35 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
2013-03-26 10:35:16 +01:00
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-10 20:50:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-30 14:37:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|