PERFORCE change 51489 for review
Robert Watson
rwatson at FreeBSD.org
Tue Apr 20 17:41:00 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=51489
Change 51489 by rwatson at rwatson_paprika on 2004/04/20 17:40:45
Integrate netperf_socket:
- More ACPI madness.
Affected files ...
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#15 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_cpu.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#9 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#15 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.139 2004/04/16 16:27:37 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.140 2004/04/21 00:36:15 njl Exp $
*/
#include "opt_acpi.h"
@@ -1372,6 +1372,21 @@
}
}
+/* Find the difference between two PM tick counts. */
+uint32_t
+acpi_TimerDelta(uint32_t end, uint32_t start)
+{
+ uint32_t delta;
+
+ if (end >= start)
+ delta = end - start;
+ else if (AcpiGbl_FADT->TmrValExt == 0)
+ delta = (((0x00FFFFFF - start) + end + 1) & 0x00FFFFFF);
+ else
+ delta = ((0xFFFFFFFF - start) + end + 1);
+ return (delta);
+}
+
/*
* Allocate a buffer with a preset data size.
*/
==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_cpu.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.33 2004/04/09 18:14:32 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.34 2004/04/21 00:36:15 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -160,7 +160,6 @@
static void acpi_cpu_throttle_set(uint32_t speed);
static void acpi_cpu_idle(void);
static void acpi_cpu_c1(void);
-static void acpi_pm_ticksub(uint32_t *end, const uint32_t *start);
static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context);
static int acpi_cpu_quirks(struct acpi_cpu_softc *sc);
static int acpi_cpu_throttle_sysctl(SYSCTL_HANDLER_ARGS);
@@ -875,7 +874,7 @@
}
/* Find the actual time asleep in microseconds, minus overhead. */
- acpi_pm_ticksub(&end_time, &start_time);
+ end_time = acpi_TimerDelta(end_time, start_time);
asleep = PM_USEC(end_time) - cx_next->trans_lat;
/* Record statistics */
@@ -915,18 +914,6 @@
#endif
}
-/* Find the difference between two PM tick counts. */
-static void
-acpi_pm_ticksub(uint32_t *end, const uint32_t *start)
-{
- if (*end >= *start)
- *end = *end - *start;
- else if (AcpiGbl_FADT->TmrValExt == 0)
- *end = (((0x00FFFFFF - *start) + *end + 1) & 0x00FFFFFF);
- else
- *end = ((0xFFFFFFFF - *start) + *end + 1);
-}
-
/*
* Re-evaluate the _PSS and _CST objects when we are notified that they
* have changed.
==== //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#9 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.61 2004/04/14 03:39:08 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.62 2004/04/21 00:36:15 njl Exp $
*/
#include "bus_if.h"
@@ -233,6 +233,7 @@
extern BOOLEAN acpi_MatchHid(device_t dev, char *hid);
extern ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path,
ACPI_HANDLE *result);
+extern uint32_t acpi_TimerDelta(uint32_t end, uint32_t start);
extern ACPI_BUFFER *acpi_AllocBuffer(int size);
extern ACPI_STATUS acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp,
UINT32 *number);
More information about the p4-projects
mailing list