]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'release' and 'stats' into release
authorLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:13:36 +0000 (03:13 -0500)
committerLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:13:36 +0000 (03:13 -0500)
1  2 
drivers/acpi/events/evgpe.c
drivers/acpi/osl.c
include/linux/acpi.h

index 31cb8cd8cabeda504dacc71c90e39be334b82598,4bd9e2291bd9e37c71b241dd6db560d687158861..0dadd2adc8001a109669b4ae62c673da60f4747b
@@@ -270,18 -270,18 +270,18 @@@ acpi_status acpi_ev_disable_gpe(struct 
        case ACPI_GPE_TYPE_WAKE_RUN:
                ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED);
  
 -              /*lint -fallthrough */
 +              /* fallthrough */
  
        case ACPI_GPE_TYPE_RUNTIME:
  
                /* Disable the requested runtime GPE */
  
                ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);
 -              status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
 -              break;
 +
 +              /* fallthrough */
  
        default:
 -              return_ACPI_STATUS(AE_BAD_PARAMETER);
 +              acpi_hw_write_gpe_enable_reg(gpe_event_info);
        }
  
        return_ACPI_STATUS(AE_OK);
@@@ -501,7 -501,6 +501,7 @@@ u32 acpi_ev_gpe_detect(struct acpi_gpe_
   *              an interrupt handler.
   *
   ******************************************************************************/
 +static void acpi_ev_asynch_enable_gpe(void *context);
  
  static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
  {
                                         method_node)));
                }
        }
 +      /* Defer enabling of GPE until all notify handlers are done */
 +      acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_asynch_enable_gpe,
 +                              gpe_event_info);
 +      return_VOID;
 +}
  
 -      if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
 +static void acpi_ev_asynch_enable_gpe(void *context)
 +{
 +      struct acpi_gpe_event_info *gpe_event_info = context;
 +      acpi_status status;
 +      if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
            ACPI_GPE_LEVEL_TRIGGERED) {
                /*
                 * GPE is level-triggered, we clear the GPE status bit after
                 * handling the event.
                 */
 -              status = acpi_hw_clear_gpe(&local_gpe_event_info);
 +              status = acpi_hw_clear_gpe(gpe_event_info);
                if (ACPI_FAILURE(status)) {
                        return_VOID;
                }
        }
  
        /* Enable this GPE */
 -
 -      (void)acpi_hw_write_gpe_enable_reg(&local_gpe_event_info);
 +      (void)acpi_hw_write_gpe_enable_reg(gpe_event_info);
        return_VOID;
  }
  
@@@ -627,7 -618,7 +627,7 @@@ acpi_ev_gpe_dispatch(struct acpi_gpe_ev
  
        ACPI_FUNCTION_TRACE(ev_gpe_dispatch);
  
-       acpi_gpe_count++;
+       acpi_os_gpe_count(gpe_number);
  
        /*
         * If edge-triggered, clear the GPE status bit now.  Note that
diff --combined drivers/acpi/osl.c
index 0c41db3075a591a76931e36d0afa6699e240bc75,1087efeca9b1a1dbce96a89540264d5e37824c9e..3b8aef3aefe59188f644ea80293c5e488553b644
@@@ -120,7 -120,7 +120,7 @@@ static char osi_additional_string[OSI_S
   */
  #define OSI_LINUX_ENABLE 0
  
 -struct osi_linux {
 +static struct osi_linux {
        unsigned int    enable:1;
        unsigned int    dmi:1;
        unsigned int    cmdline:1;
@@@ -250,16 -250,11 +250,16 @@@ acpi_physical_address __init acpi_os_ge
                               "System description tables not found\n");
                        return 0;
                }
 -      } else
 -              return acpi_find_rsdp();
 +      } else {
 +              acpi_physical_address pa = 0;
 +
 +              acpi_find_root_pointer(&pa);
 +              return pa;
 +      }
  }
  
 -void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 +void __iomem *__init_refok
 +acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
  {
        if (phys > ULONG_MAX) {
                printk(KERN_ERR PREFIX "Cannot map memory that high\n");
@@@ -337,7 -332,15 +337,15 @@@ acpi_os_table_override(struct acpi_tabl
  
  static irqreturn_t acpi_irq(int irq, void *dev_id)
  {
-       return (*acpi_irq_handler) (acpi_irq_context) ? IRQ_HANDLED : IRQ_NONE;
+       u32 handled;
+       handled = (*acpi_irq_handler) (acpi_irq_context);
+       if (handled) {
+               acpi_irq_handled++;
+               return IRQ_HANDLED;
+       } else
+               return IRQ_NONE;
  }
  
  acpi_status
@@@ -346,6 -349,8 +354,8 @@@ acpi_os_install_interrupt_handler(u32 g
  {
        unsigned int irq;
  
+       acpi_irq_stats_init();
        /*
         * Ignore the GSI from the core, and use the value in our copy of the
         * FADT. It may not be the same if an interrupt source override exists
@@@ -666,6 -671,25 +676,6 @@@ static void acpi_os_execute_deferred(st
        dpc->function(dpc->context);
        kfree(dpc);
  
 -      /* Yield cpu to notify thread */
 -      cond_resched();
 -
 -      return;
 -}
 -
 -static void acpi_os_execute_notify(struct work_struct *work)
 -{
 -      struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
 -
 -      if (!dpc) {
 -              printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
 -              return;
 -      }
 -
 -      dpc->function(dpc->context);
 -
 -      kfree(dpc);
 -
        return;
  }
  
@@@ -689,7 -713,7 +699,7 @@@ acpi_status acpi_os_execute(acpi_execut
  {
        acpi_status status = AE_OK;
        struct acpi_os_dpc *dpc;
 -
 +      struct workqueue_struct *queue;
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
                          "Scheduling function [%p(%p)] for deferred execution.\n",
                          function, context));
        dpc->function = function;
        dpc->context = context;
  
 -      if (type == OSL_NOTIFY_HANDLER) {
 -              INIT_WORK(&dpc->work, acpi_os_execute_notify);
 -              if (!queue_work(kacpi_notify_wq, &dpc->work)) {
 -                      status = AE_ERROR;
 -                      kfree(dpc);
 -              }
 -      } else {
 -              INIT_WORK(&dpc->work, acpi_os_execute_deferred);
 -              if (!queue_work(kacpid_wq, &dpc->work)) {
 -                      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
 -                                "Call to queue_work() failed.\n"));
 -                      status = AE_ERROR;
 -                      kfree(dpc);
 -              }
 +      INIT_WORK(&dpc->work, acpi_os_execute_deferred);
 +      queue = (type == OSL_NOTIFY_HANDLER) ? kacpi_notify_wq : kacpid_wq;
 +      if (!queue_work(queue, &dpc->work)) {
 +              ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
 +                        "Call to queue_work() failed.\n"));
 +              status = AE_ERROR;
 +              kfree(dpc);
        }
        return_ACPI_STATUS(status);
  }
@@@ -1192,24 -1223,24 +1202,24 @@@ acpi_status acpi_os_release_object(acpi
   *
   *    Returns 0 on success
   */
 -int acpi_dmi_dump(void)
 +static int acpi_dmi_dump(void)
  {
  
        if (!dmi_available)
                return -1;
  
        printk(KERN_NOTICE PREFIX "DMI System Vendor: %s\n",
 -              dmi_get_slot(DMI_SYS_VENDOR));
 +              dmi_get_system_info(DMI_SYS_VENDOR));
        printk(KERN_NOTICE PREFIX "DMI Product Name: %s\n",
 -              dmi_get_slot(DMI_PRODUCT_NAME));
 +              dmi_get_system_info(DMI_PRODUCT_NAME));
        printk(KERN_NOTICE PREFIX "DMI Product Version: %s\n",
 -              dmi_get_slot(DMI_PRODUCT_VERSION));
 +              dmi_get_system_info(DMI_PRODUCT_VERSION));
        printk(KERN_NOTICE PREFIX "DMI Board Name: %s\n",
 -              dmi_get_slot(DMI_BOARD_NAME));
 +              dmi_get_system_info(DMI_BOARD_NAME));
        printk(KERN_NOTICE PREFIX "DMI BIOS Vendor: %s\n",
 -              dmi_get_slot(DMI_BIOS_VENDOR));
 +              dmi_get_system_info(DMI_BIOS_VENDOR));
        printk(KERN_NOTICE PREFIX "DMI BIOS Date: %s\n",
 -              dmi_get_slot(DMI_BIOS_DATE));
 +              dmi_get_system_info(DMI_BIOS_DATE));
  
        return 0;
  }
diff --combined include/linux/acpi.h
index de09704d3dd2e38bd561fbe66f9356c01062809b,cb911f3e40f5fe39dc8c4c915aa6c6f071bf33b1..cf13bec517b7b9a3d3f18b4d2ed4920a9c17665d
@@@ -80,6 -80,7 +80,6 @@@ typedef int (*acpi_table_handler) (stru
  typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
  
  char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
 -unsigned long acpi_find_rsdp (void);
  int acpi_boot_init (void);
  int acpi_boot_table_init (void);
  int acpi_numa_init (void);
@@@ -114,7 -115,9 +114,9 @@@ int acpi_unmap_lsapic(int cpu)
  
  int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
  int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
+ void acpi_irq_stats_init(void);
  
+ extern u32 acpi_irq_handled;
  extern int acpi_mp_config;
  
  extern struct acpi_mcfg_allocation *pci_mmcfg_config;