Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393193 > unrolled thread

[PATCH v3 0/7] ACPI / osi: Fix several issues in _OSI handling

Started byLv Zheng <lv.zheng@intel.com>
First post2016-05-03 10:50 +0200
Last post2016-05-06 01:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 0/7] ACPI / osi: Fix several issues in _OSI handling Lv Zheng <lv.zheng@intel.com> - 2016-05-03 10:50 +0200
    [PATCH v3 2/7] ACPI / osi: Cleanup _OSI("Linux") related code before introducing new support Lv Zheng <lv.zheng@intel.com> - 2016-05-03 10:50 +0200
    [PATCH v3 3/7] ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=! Lv Zheng <lv.zheng@intel.com> - 2016-05-03 11:00 +0200
    Re: [PATCH v3 0/7] ACPI / osi: Fix several issues in _OSI handling "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-05-06 01:40 +0200

#1393193 — [PATCH v3 0/7] ACPI / osi: Fix several issues in _OSI handling

FromLv Zheng <lv.zheng@intel.com>
Date2016-05-03 10:50 +0200
Subject[PATCH v3 0/7] ACPI / osi: Fix several issues in _OSI handling
Message-ID<ruEbL-4H5-5@gated-at.bofh.it>
This patchset cleans up _OSI handling code and fixes several issues in it.

In the v2 version, as one fix has been changed to be a stable material,
patches originally put before it need to be rebased. The necessary changes
that are required by this fix are still kept before the fix patch, and the
unnecessary changes that are not required by this fix are moved after the
fix patch. So that the back porting of the stable materials could be
easier. The coding style in the stable materials is kept wrong to be
consistent to the coding style used by the old code, so checkpatch.pl may
report warnings on the stable materials.
In the v3 version, SOB blocks are updated with the tester's information.
Some pr_xxx(PREFIX) related wrong stuffs are corrected. One bool cleanup
patch is split out.

Chen Yu (1):
  ACPI / osi: Fix default _OSI(Darwin) support

Lv Zheng (6):
  ACPI / osi: Fix an issue that acpi_osi=!* cannot disable ACPICA
    internal strings
  ACPI / osi: Cleanup _OSI("Linux") related code before introducing new
    support
  ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=!
  ACPI / osi: Cleanup OSI handling code to use bool
  ACPI / osi: Cleanup coding style issues before creating a separate
    OSI source file
  ACPI / osi: Collect _OSI handling into one single file

 Documentation/kernel-parameters.txt |    2 +
 drivers/acpi/Makefile               |    2 +-
 drivers/acpi/blacklist.c            |  196 +------------
 drivers/acpi/internal.h             |    2 +
 drivers/acpi/osi.c                  |  522 +++++++++++++++++++++++++++++++++++
 drivers/acpi/osl.c                  |  225 +--------------
 include/linux/acpi.h                |    1 -
 7 files changed, 533 insertions(+), 417 deletions(-)
 create mode 100644 drivers/acpi/osi.c

-- 
1.7.10

[toc] | [next] | [standalone]


#1393194 — [PATCH v3 2/7] ACPI / osi: Cleanup _OSI("Linux") related code before introducing new support

FromLv Zheng <lv.zheng@intel.com>
Date2016-05-03 10:50 +0200
Subject[PATCH v3 2/7] ACPI / osi: Cleanup _OSI("Linux") related code before introducing new support
Message-ID<ruEbM-4H5-27@gated-at.bofh.it>
In reply to#1393193
This patch cleans up OSI code in osl.c to make osi_linux work for OSI
strings other than "Linux", so it can be re-used for other purposes.

Reported-and-tested-by: Lukas Wunner <lukas@wunner.de>
Tested-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/osl.c |   42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index d7d84a8..cd9667f 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -131,12 +131,12 @@ static void __init acpi_osi_setup_late(void);
  * or boot with "acpi_osi=Linux"
  */
 
-static struct osi_linux {
-	unsigned int	enable:1;
-	unsigned int	dmi:1;
-	unsigned int	cmdline:1;
+static struct acpi_osi_config {
+	unsigned int	linux_enable:1;
+	unsigned int	linux_dmi:1;
+	unsigned int	linux_cmdline:1;
 	u8		default_disabling;
-} osi_linux = {0, 0, 0, 0};
+} osi_config = {0, 0, 0, 0};
 
 static u32 acpi_osi_handler(acpi_string interface, u32 supported)
 {
@@ -144,9 +144,9 @@ static u32 acpi_osi_handler(acpi_string interface, u32 supported)
 
 		printk_once(KERN_NOTICE FW_BUG PREFIX
 			"BIOS _OSI(Linux) query %s%s\n",
-			osi_linux.enable ? "honored" : "ignored",
-			osi_linux.cmdline ? " via cmdline" :
-			osi_linux.dmi ? " via DMI" : "");
+			osi_config.linux_enable ? "honored" : "ignored",
+			osi_config.linux_cmdline ? " via cmdline" :
+			osi_config.linux_dmi ? " via DMI" : "");
 	}
 
 	if (!strcmp("Darwin", interface)) {
@@ -1478,12 +1478,12 @@ void __init acpi_osi_setup(char *str)
 		str++;
 		if (*str == '\0') {
 			/* Do not override acpi_osi=!* */
-			if (!osi_linux.default_disabling)
-				osi_linux.default_disabling =
+			if (!osi_config.default_disabling)
+				osi_config.default_disabling =
 					ACPI_DISABLE_ALL_VENDOR_STRINGS;
 			return;
 		} else if (*str == '*') {
-			osi_linux.default_disabling = ACPI_DISABLE_ALL_STRINGS;
+			osi_config.default_disabling = ACPI_DISABLE_ALL_STRINGS;
 			for (i = 0; i < OSI_STRING_ENTRIES_MAX; i++) {
 				osi = &osi_setup_entries[i];
 				osi->enable = false;
@@ -1508,10 +1508,10 @@ void __init acpi_osi_setup(char *str)
 
 static void __init set_osi_linux(unsigned int enable)
 {
-	if (osi_linux.enable != enable)
-		osi_linux.enable = enable;
+	if (osi_config.linux_enable != enable)
+		osi_config.linux_enable = enable;
 
-	if (osi_linux.enable)
+	if (osi_config.linux_enable)
 		acpi_osi_setup("Linux");
 	else
 		acpi_osi_setup("!Linux");
@@ -1521,8 +1521,9 @@ static void __init set_osi_linux(unsigned int enable)
 
 static void __init acpi_cmdline_osi_linux(unsigned int enable)
 {
-	osi_linux.cmdline = 1;	/* cmdline set the default and override DMI */
-	osi_linux.dmi = 0;
+	/* cmdline set the default and override DMI */
+	osi_config.linux_cmdline = 1;
+	osi_config.linux_dmi = 0;
 	set_osi_linux(enable);
 
 	return;
@@ -1535,7 +1536,8 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d)
 	if (enable == -1)
 		return;
 
-	osi_linux.dmi = 1;	/* DMI knows that this box asks OSI(Linux) */
+	/* DMI knows that this box asks OSI(Linux) */
+	osi_config.linux_dmi = 1;
 	set_osi_linux(enable);
 
 	return;
@@ -1555,12 +1557,12 @@ static void __init acpi_osi_setup_late(void)
 	int i;
 	acpi_status status;
 
-	if (osi_linux.default_disabling) {
-		status = acpi_update_interfaces(osi_linux.default_disabling);
+	if (osi_config.default_disabling) {
+		status = acpi_update_interfaces(osi_config.default_disabling);
 
 		if (ACPI_SUCCESS(status))
 			printk(KERN_INFO PREFIX "Disabled all _OSI OS vendors%s\n",
-				osi_linux.default_disabling ==
+				osi_config.default_disabling ==
 				ACPI_DISABLE_ALL_STRINGS ?
 				" and feature groups" : "");
 	}
-- 
1.7.10

[toc] | [prev] | [next] | [standalone]


#1393207 — [PATCH v3 3/7] ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=!

FromLv Zheng <lv.zheng@intel.com>
Date2016-05-03 11:00 +0200
Subject[PATCH v3 3/7] ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=!
Message-ID<ruElt-4O7-33@gated-at.bofh.it>
In reply to#1393193
This patch introduces acpi_osi=!! so that quirks may use it to revert
acpi_osi=!.

Reported-and-tested-by: Lukas Wunner <lukas@wunner.de>
Tested-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 Documentation/kernel-parameters.txt |    2 ++
 drivers/acpi/osl.c                  |    3 +++
 2 files changed, 5 insertions(+)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 0b3de80..c48f387 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -312,6 +312,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			acpi_osi=!*		# remove all strings
 			acpi_osi=!		# disable all built-in OS vendor
 						  strings
+			acpi_osi=!!		# enable all built-in OS vendor
+						  strings
 			acpi_osi=		# disable all strings
 
 			'acpi_osi=!' can be used in combination with single or
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index cd9667f..fbedea7 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1489,6 +1489,9 @@ void __init acpi_osi_setup(char *str)
 				osi->enable = false;
 			}
 			return;
+		} else if (*str == '!') {
+			osi_config.default_disabling = 0;
+			return;
 		}
 		enable = false;
 	}
-- 
1.7.10

[toc] | [prev] | [next] | [standalone]


#1395486

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2016-05-06 01:40 +0200
Message-ID<rvB2b-1pC-25@gated-at.bofh.it>
In reply to#1393193
On Tuesday, May 03, 2016 04:48:11 PM Lv Zheng wrote:
> This patchset cleans up _OSI handling code and fixes several issues in it.
> 
> In the v2 version, as one fix has been changed to be a stable material,
> patches originally put before it need to be rebased. The necessary changes
> that are required by this fix are still kept before the fix patch, and the
> unnecessary changes that are not required by this fix are moved after the
> fix patch. So that the back porting of the stable materials could be
> easier. The coding style in the stable materials is kept wrong to be
> consistent to the coding style used by the old code, so checkpatch.pl may
> report warnings on the stable materials.
> In the v3 version, SOB blocks are updated with the tester's information.
> Some pr_xxx(PREFIX) related wrong stuffs are corrected. One bool cleanup
> patch is split out.
> 
> Chen Yu (1):
>   ACPI / osi: Fix default _OSI(Darwin) support
> 
> Lv Zheng (6):
>   ACPI / osi: Fix an issue that acpi_osi=!* cannot disable ACPICA
>     internal strings
>   ACPI / osi: Cleanup _OSI("Linux") related code before introducing new
>     support
>   ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=!
>   ACPI / osi: Cleanup OSI handling code to use bool
>   ACPI / osi: Cleanup coding style issues before creating a separate
>     OSI source file
>   ACPI / osi: Collect _OSI handling into one single file
> 
>  Documentation/kernel-parameters.txt |    2 +
>  drivers/acpi/Makefile               |    2 +-
>  drivers/acpi/blacklist.c            |  196 +------------
>  drivers/acpi/internal.h             |    2 +
>  drivers/acpi/osi.c                  |  522 +++++++++++++++++++++++++++++++++++
>  drivers/acpi/osl.c                  |  225 +--------------
>  include/linux/acpi.h                |    1 -
>  7 files changed, 533 insertions(+), 417 deletions(-)
>  create mode 100644 drivers/acpi/osi.c

All [1-7/7] applied, thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web