svn commit: r298377 - head/sys/dev/acpica

Jung-uk Kim jkim at FreeBSD.org
Wed Apr 20 21:21:49 UTC 2016


Author: jkim
Date: Wed Apr 20 21:21:47 2016
New Revision: 298377
URL: https://svnweb.freebsd.org/changeset/base/298377

Log:
  Remove query flag from acpi_EvaluateOSC().  This function does not support
  return buffer (yet).

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_cpu.c
  head/sys/dev/acpica/acpi_pcib_acpi.c
  head/sys/dev/acpica/acpivar.h

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Wed Apr 20 21:15:55 2016	(r298376)
+++ head/sys/dev/acpica/acpi.c	Wed Apr 20 21:21:47 2016	(r298377)
@@ -2482,7 +2482,7 @@ acpi_AppendBufferResource(ACPI_BUFFER *b
 
 ACPI_STATUS
 acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, int revision, int count,
-    uint32_t *caps, bool query)
+    uint32_t *caps)
 {
 	ACPI_OBJECT arg[4];
 	ACPI_OBJECT_LIST arglist;
@@ -2499,7 +2499,6 @@ acpi_EvaluateOSC(ACPI_HANDLE handle, uin
 	arg[3].Type = ACPI_TYPE_BUFFER;
 	arg[3].Buffer.Length = count * sizeof(uint32_t);
 	arg[3].Buffer.Pointer = (uint8_t *)caps;
-	caps[0] = query ? 1 : 0;
 	return (AcpiEvaluateObject(handle, "_OSC", &arglist, NULL));
 }
 

Modified: head/sys/dev/acpica/acpi_cpu.c
==============================================================================
--- head/sys/dev/acpica/acpi_cpu.c	Wed Apr 20 21:15:55 2016	(r298376)
+++ head/sys/dev/acpica/acpi_cpu.c	Wed Apr 20 21:21:47 2016	(r298377)
@@ -391,9 +391,9 @@ acpi_cpu_attach(device_t dev)
      * Intel Processor Vendor-Specific ACPI Interface Specification.
      */
     if (sc->cpu_features) {
+	cap_set[0] = 0;
 	cap_set[1] = sc->cpu_features;
-	status = acpi_EvaluateOSC(sc->cpu_handle, cpu_oscuuid, 1, 2, cap_set,
-	    false);
+	status = acpi_EvaluateOSC(sc->cpu_handle, cpu_oscuuid, 1, 2, cap_set);
 	if (ACPI_SUCCESS(status)) {
 	    if (cap_set[0] != 0)
 		device_printf(dev, "_OSC returned status %#x\n", cap_set[0]);

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 20 21:15:55 2016	(r298376)
+++ head/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 20 21:21:47 2016	(r298377)
@@ -306,6 +306,9 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s
 		0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
 	};
 
+	/* Query Support Flag */
+	cap_set[0] = 0;
+
 	/* Support Field: Extended PCI Config Space, MSI */
 	cap_set[1] = 0x11;
 
@@ -313,7 +316,7 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s
 	cap_set[2] = 0;
 
 	status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1,
-	    nitems(cap_set), cap_set, false);
+	    nitems(cap_set), cap_set);
 	if (ACPI_FAILURE(status)) {
 		if (status == AE_NOT_FOUND)
 			return;

Modified: head/sys/dev/acpica/acpivar.h
==============================================================================
--- head/sys/dev/acpica/acpivar.h	Wed Apr 20 21:15:55 2016	(r298376)
+++ head/sys/dev/acpica/acpivar.h	Wed Apr 20 21:21:47 2016	(r298377)
@@ -336,7 +336,7 @@ ACPI_STATUS	acpi_FindIndexedResource(ACP
 ACPI_STATUS	acpi_AppendBufferResource(ACPI_BUFFER *buf,
 		    ACPI_RESOURCE *res);
 ACPI_STATUS	acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid,
-		    int revision, int count, uint32_t *caps, bool query);
+		    int revision, int count, uint32_t *caps);
 ACPI_STATUS	acpi_OverrideInterruptLevel(UINT32 InterruptNumber);
 ACPI_STATUS	acpi_SetIntrModel(int model);
 int		acpi_ReqSleepState(struct acpi_softc *sc, int state);


More information about the svn-src-all mailing list