Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Do not try to disable ACPI if we can not enter to legacy...
details: https://anonhg.NetBSD.org/src/rev/1549f28804bd
branches: trunk
changeset: 756919:1549f28804bd
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sat Aug 07 20:07:25 2010 +0000
description:
Do not try to disable ACPI if we can not enter to legacy mode. While it is
safe to call AcpiDisable() even if a system operates only in ACPI mode, this
leads to unpleasantly verbose error messages in ACPICA.
diffstat:
sys/arch/amd64/amd64/machdep.c | 6 +++---
sys/arch/i386/i386/machdep.c | 6 +++---
sys/dev/acpi/acpi.c | 12 ++++++++++--
sys/dev/acpi/acpivar.h | 3 ++-
4 files changed, 18 insertions(+), 9 deletions(-)
diffs (104 lines):
diff -r c2c280042172 -r 1549f28804bd sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Sat Aug 07 19:47:34 2010 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Sat Aug 07 20:07:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.147 2010/07/31 18:38:32 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.147 2010/07/31 18:38:32 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $");
/* #define XENDEBUG_LOW */
@@ -709,7 +709,7 @@
if (howto & RB_HALT) {
#if NACPICA > 0
- AcpiDisable();
+ acpi_disable();
#endif
printf("\n");
diff -r c2c280042172 -r 1549f28804bd sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Sat Aug 07 19:47:34 2010 +0000
+++ b/sys/arch/i386/i386/machdep.c Sat Aug 07 20:07:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.691 2010/07/24 00:45:54 jym Exp $ */
+/* $NetBSD: machdep.c,v 1.692 2010/08/07 20:07:26 jruoho Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.691 2010/07/24 00:45:54 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.692 2010/08/07 20:07:26 jruoho Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -942,7 +942,7 @@
if (howto & RB_HALT) {
#if NACPICA > 0
- AcpiDisable();
+ acpi_disable();
#endif
printf("\n");
diff -r c2c280042172 -r 1549f28804bd sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Sat Aug 07 19:47:34 2010 +0000
+++ b/sys/dev/acpi/acpi.c Sat Aug 07 20:07:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.213 2010/08/07 17:12:55 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.214 2010/08/07 20:07:25 jruoho Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.213 2010/08/07 17:12:55 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.214 2010/08/07 20:07:25 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -363,6 +363,14 @@
return 0;
}
+void
+acpi_disable(void)
+{
+
+ if (AcpiGbl_FADT.SmiCommand != 0)
+ AcpiDisable();
+}
+
int
acpi_check(device_t parent, const char *ifattr)
{
diff -r c2c280042172 -r 1549f28804bd sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h Sat Aug 07 19:47:34 2010 +0000
+++ b/sys/dev/acpi/acpivar.h Sat Aug 07 20:07:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpivar.h,v 1.60 2010/08/07 09:41:19 jruoho Exp $ */
+/* $NetBSD: acpivar.h,v 1.61 2010/08/07 20:07:25 jruoho Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -266,6 +266,7 @@
extern const struct acpi_resource_parse_ops acpi_resource_parse_ops_default;
int acpi_probe(void);
+void acpi_disable(void);
int acpi_check(device_t, const char *);
ACPI_PHYSICAL_ADDRESS acpi_OsGetRootPointer(void);
Home |
Main Index |
Thread Index |
Old Index