Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: [PATCH 01/14] ACPI: Write _OSC bit field definitions in hex
Date: Fri, 06 Sep 2013 11:13:32 -0600	[thread overview]
Message-ID: <20130906171332.11482.45745.stgit@bhelgaas-glaptop> (raw)
In-Reply-To: <20130906171010.11482.34235.stgit@bhelgaas-glaptop>

Update _OSC definition comments to correspond to the 1-based spec wording
(DWORD 1, etc.)  Write _OSC field #defines as hex to make clear that they
are bits in a 32-bit DWORD, not arbitrary values.  No functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 include/linux/acpi.h |   54 +++++++++++++++++++++++++-------------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index a5db4ae..285de6f 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -304,39 +304,39 @@ struct acpi_osc_context {
 #define OSC_SUPPORT_TYPE 		1
 #define OSC_CONTROL_TYPE		2
 
-/* _OSC DW0 Definition */
-#define OSC_QUERY_ENABLE		1
-#define OSC_REQUEST_ERROR		2
-#define OSC_INVALID_UUID_ERROR		4
-#define OSC_INVALID_REVISION_ERROR	8
-#define OSC_CAPABILITIES_MASK_ERROR	16
+/* _OSC Capabilities DWORD 1: Query/Control and Error Returns (generic) */
+#define OSC_QUERY_ENABLE			0x00000001  /* input */
+#define OSC_REQUEST_ERROR			0x00000002  /* return */
+#define OSC_INVALID_UUID_ERROR			0x00000004  /* return */
+#define OSC_INVALID_REVISION_ERROR		0x00000008  /* return */
+#define OSC_CAPABILITIES_MASK_ERROR		0x00000010  /* return */
 
 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
 
-/* platform-wide _OSC bits */
-#define OSC_SB_PAD_SUPPORT		1
-#define OSC_SB_PPC_OST_SUPPORT		2
-#define OSC_SB_PR3_SUPPORT		4
-#define OSC_SB_HOTPLUG_OST_SUPPORT	8
-#define OSC_SB_APEI_SUPPORT		16
+/* Platform-Wide Capabilities _OSC: Capabilities DWORD 2: Support Field */
+#define OSC_SB_PAD_SUPPORT			0x00000001
+#define OSC_SB_PPC_OST_SUPPORT			0x00000002
+#define OSC_SB_PR3_SUPPORT			0x00000004
+#define OSC_SB_HOTPLUG_OST_SUPPORT		0x00000008
+#define OSC_SB_APEI_SUPPORT			0x00000010
+#define OSC_SB_CPC_SUPPORT			0x00000020
 
 extern bool osc_sb_apei_support_acked;
 
-/* PCI defined _OSC bits */
-/* _OSC DW1 Definition (OS Support Fields) */
-#define OSC_EXT_PCI_CONFIG_SUPPORT		1
-#define OSC_ACTIVE_STATE_PWR_SUPPORT 		2
-#define OSC_CLOCK_PWR_CAPABILITY_SUPPORT	4
-#define OSC_PCI_SEGMENT_GROUPS_SUPPORT		8
-#define OSC_MSI_SUPPORT				16
-#define OSC_PCI_SUPPORT_MASKS			0x1f
-
-/* _OSC DW1 Definition (OS Control Fields) */
-#define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL	1
-#define OSC_SHPC_NATIVE_HP_CONTROL 		2
-#define OSC_PCI_EXPRESS_PME_CONTROL		4
-#define OSC_PCI_EXPRESS_AER_CONTROL		8
-#define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL	16
+/* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */
+#define OSC_EXT_PCI_CONFIG_SUPPORT		0x00000001
+#define OSC_ACTIVE_STATE_PWR_SUPPORT 		0x00000002
+#define OSC_CLOCK_PWR_CAPABILITY_SUPPORT	0x00000004
+#define OSC_PCI_SEGMENT_GROUPS_SUPPORT		0x00000008
+#define OSC_MSI_SUPPORT				0x00000010
+#define OSC_PCI_SUPPORT_MASKS			0x0000001f
+
+/* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */
+#define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL	0x00000001
+#define OSC_SHPC_NATIVE_HP_CONTROL 		0x00000002
+#define OSC_PCI_EXPRESS_PME_CONTROL		0x00000004
+#define OSC_PCI_EXPRESS_AER_CONTROL		0x00000008
+#define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL	0x00000010
 
 #define OSC_PCI_CONTROL_MASKS 	(OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | 	\
 				OSC_SHPC_NATIVE_HP_CONTROL | 		\


  reply	other threads:[~2013-09-06 17:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 17:13 [PATCH 00/14] _OSC simplification Bjorn Helgaas
2013-09-06 17:13 ` Bjorn Helgaas [this message]
2013-09-06 17:13 ` [PATCH 02/14] ACPI: Rename OSC_QUERY_TYPE to OSC_QUERY_DWORD Bjorn Helgaas
2013-09-06 17:13 ` [PATCH 03/14] ACPI: Tidy acpi_run_osc() declarations Bjorn Helgaas
2013-09-06 17:13 ` [PATCH 04/14] ACPI: Remove unused OSC_PCI_NATIVE_HOTPLUG Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 05/14] ACPI: Write OSC_PCI_CONTROL_MASKS like OSC_PCI_SUPPORT_MASKS Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 06/14] PCI/ACPI: Name _OSC #defines more consistently Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 07/14] PCI/ACPI: Drop unnecessary _OSC existence tests Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 08/14] PCI/ACPI: Move _OSC stuff from acpi_pci_root_add() to negotiate_os_control() Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 09/14] PCI/ACPI: Split _OSC "support" and "control" flags into separate variables Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 10/14] PCI/ACPI: Run _OSC only once for OSPM feature support Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 11/14] PCI/ACPI: Skip _OSC control tests if _OSC support call failed Bjorn Helgaas
2013-09-06 17:14 ` [PATCH 12/14] PCI/ACPI: Separate out _OSC "PCIe port services disabled" path Bjorn Helgaas
2013-09-06 17:15 ` [PATCH 13/14] PCI/ACPI: Separate out _OSC "we don't support enough services" path Bjorn Helgaas
2013-09-06 17:15 ` [PATCH 14/14] PCI/ACPI: Decode _OSC bitmasks symbolically Bjorn Helgaas
2013-09-07  0:01 ` [PATCH 00/14] _OSC simplification Rafael J. Wysocki
2013-09-07 13:59   ` Bjorn Helgaas
2013-09-07 22:05     ` Rafael J. Wysocki
2013-09-25  6:52     ` Robert Hancock
2013-09-07  0:08 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130906171332.11482.45745.stgit@bhelgaas-glaptop \
    --to=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox