Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure

@@ -3,11 +3,11 @@
  * Module Name: evevent - Fixed Event handling and dispatch
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -46,10 +46,12 @@
 #include "acevents.h"
 
 #define _COMPONENT          ACPI_EVENTS
         ACPI_MODULE_NAME    ("evevent")
 
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
 /* Local prototypes */
 
 static ACPI_STATUS
 AcpiEvFixedEventInitialize (
     void);

@@ -79,10 +81,17 @@
 
 
     ACPI_FUNCTION_TRACE (EvInitializeEvents);
 
 
+    /* If Hardware Reduced flag is set, there are no fixed events */
+
+    if (AcpiGbl_ReducedHardware)
+    {
+        return_ACPI_STATUS (AE_OK);
+    }
+
     /*
      * Initialize the Fixed and General Purpose Events. This is done prior to
      * enabling SCIs to prevent interrupts from occurring before the handlers
      * are installed.
      */

@@ -126,10 +135,17 @@
 
 
     ACPI_FUNCTION_TRACE (EvInstallXruptHandlers);
 
 
+    /* If Hardware Reduced flag is set, there is no ACPI h/w */
+
+    if (AcpiGbl_ReducedHardware)
+    {
+        return_ACPI_STATUS (AE_OK);
+    }
+
     /* Install the SCI handler */
 
     Status = AcpiEvInstallSciHandler ();
     if (ACPI_FAILURE (Status))
     {

@@ -273,10 +289,12 @@
  *
  * RETURN:      INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
  *
  * DESCRIPTION: Clears the status bit for the requested event, calls the
  *              handler that previously registered for the event.
+ *              NOTE: If there is no handler for the event, the event is
+ *              disabled to prevent further interrupts.
  *
  ******************************************************************************/
 
 static UINT32
 AcpiEvFixedEventDispatch (

@@ -291,22 +309,22 @@
     (void) AcpiWriteBitRegister (
             AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
             ACPI_CLEAR_STATUS);
 
     /*
-     * Make sure we've got a handler. If not, report an error. The event is
-     * disabled to prevent further interrupts.
+     * Make sure that a handler exists. If not, report an error
+     * and disable the event to prevent further interrupts.
      */
-    if (NULL == AcpiGbl_FixedEventHandlers[Event].Handler)
+    if (!AcpiGbl_FixedEventHandlers[Event].Handler)
     {
         (void) AcpiWriteBitRegister (
                 AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
                 ACPI_DISABLE_EVENT);
 
         ACPI_ERROR ((AE_INFO,
-            "No installed handler for fixed event [0x%08X]",
-            Event));
+            "No installed handler for fixed event - %s (%u), disabling",
+            AcpiUtGetEventName (Event), Event));
 
         return (ACPI_INTERRUPT_NOT_HANDLED);
     }
 
     /* Invoke the Fixed Event handler */

@@ -313,6 +331,6 @@
 
     return ((AcpiGbl_FixedEventHandlers[Event].Handler)(
                 AcpiGbl_FixedEventHandlers[Event].Context));
 }
 
-
+#endif /* !ACPI_REDUCED_HARDWARE */