]> err.no Git - linux-2.6/blobdiff - drivers/acpi/namespace/nsinit.c
Merge branch 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6] / drivers / acpi / namespace / nsinit.c
index aec8488c001951b514b290784883e4e045ca7d72..c4ab615f77fea6a133f2f1cf9865217e9d02b0d5 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -45,6 +45,7 @@
 #include <acpi/acnamesp.h>
 #include <acpi/acdispat.h>
 #include <acpi/acinterp.h>
+#include <linux/nmi.h>
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsinit")
@@ -537,7 +538,15 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
        info->parameter_type = ACPI_PARAM_ARGS;
        info->flags = ACPI_IGNORE_RETURN_VALUE;
 
+       /*
+        * Some hardware relies on this being executed as atomically
+        * as possible (without an NMI being received in the middle of
+        * this) - so disable NMIs and initialize the device:
+        */
+       acpi_nmi_disable();
        status = acpi_ns_evaluate(info);
+       acpi_nmi_enable();
+
        if (ACPI_SUCCESS(status)) {
                walk_info->num_INI++;