Author: pluto                        Date: Wed Jun 22 17:23:21 2005 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- new acpi patch for 2.6.11.

---- Files affected:
SOURCES:
   acpi-20050408-2.6.12.diff (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/acpi-20050408-2.6.12.diff
diff -u /dev/null SOURCES/acpi-20050408-2.6.12.diff:1.1.2.1
--- /dev/null   Wed Jun 22 19:23:21 2005
+++ SOURCES/acpi-20050408-2.6.12.diff   Wed Jun 22 19:23:16 2005
@@ -0,0 +1,22761 @@
+diff -Nru a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
+--- a/arch/i386/kernel/acpi/wakeup.S   2005-04-19 01:34:14 -04:00
++++ b/arch/i386/kernel/acpi/wakeup.S   2005-04-19 01:34:14 -04:00
+@@ -74,8 +74,9 @@
+       movw    %ax,%fs
+       movw    $0x0e00 + 'i', %fs:(0x12)
+       
+-      # need a gdt
+-      lgdt    real_save_gdt - wakeup_code
++      # need a gdt -- use lgdtl to force 32-bit operands, in case
++      # the GDT is located past 16 megabytes.
++      lgdtl   real_save_gdt - wakeup_code
+ 
+       movl    real_save_cr0 - wakeup_code, %eax
+       movl    %eax, %cr0
+diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
+--- a/drivers/acpi/Kconfig     2005-04-19 01:34:14 -04:00
++++ b/drivers/acpi/Kconfig     2005-04-19 01:34:14 -04:00
+@@ -49,7 +49,6 @@
+ 
+ config ACPI_INTERPRETER
+       bool
+-      depends on !IA64_SGI_SN
+       default y
+ 
+ if ACPI_INTERPRETER
+@@ -80,6 +79,14 @@
+       depends on ACPI_SLEEP && PROC_FS
+       default y
+ 
++config ACPI_SLEEP_PROC_SLEEP
++      bool "/proc/acpi/sleep (deprecated)"
++      depends on ACPI_SLEEP_PROC_FS
++      default n
++      ---help---
++        Create /proc/acpi/sleep
++        Deprecated by /sys/power/state
++
+ config ACPI_AC
+       tristate "AC Adapter"
+       depends on X86
+@@ -100,7 +107,6 @@
+ 
+ config ACPI_BUTTON
+       tristate "Button"
+-      depends on !IA64_SGI_SN
+       default m
+       help
+         This driver registers for events based on buttons, such as the
+@@ -112,7 +118,6 @@
+ config ACPI_VIDEO
+       tristate "Video"
+       depends on EXPERIMENTAL
+-      depends on !IA64_SGI_SN
+       default m
+       help
+         This driver implement the ACPI Extensions For Display Adapters
+@@ -125,7 +130,6 @@
+ 
+ config ACPI_FAN
+       tristate "Fan"
+-      depends on !IA64_SGI_SN
+       default m
+       help
+         This driver adds support for ACPI fan devices, allowing user-mode 
+@@ -133,7 +137,6 @@
+ 
+ config ACPI_PROCESSOR
+       tristate "Processor"
+-      depends on !IA64_SGI_SN
+       default m
+       help
+         This driver installs ACPI as the idle handler for Linux, and uses
+@@ -143,7 +146,6 @@
+ config ACPI_HOTPLUG_CPU
+       bool "Processor Hotplug (EXPERIMENTAL)"
+       depends on ACPI_PROCESSOR && HOTPLUG_CPU && EXPERIMENTAL
+-      depends on !IA64_SGI_SN
+       select ACPI_CONTAINER
+       default n
+        ---help---
+@@ -263,7 +265,6 @@
+ 
+ config ACPI_DEBUG
+       bool "Debug Statements"
+-      depends on !IA64_SGI_SN
+       default n
+       help
+         The ACPI driver can optionally report errors with a great deal
+@@ -272,7 +273,6 @@
+ 
+ config ACPI_BUS
+       bool
+-      depends on !IA64_SGI_SN
+       default y
+ 
+ config ACPI_EC
+@@ -286,17 +286,14 @@
+ 
+ config ACPI_POWER
+       bool
+-      depends on !IA64_SGI_SN
+       default y
+ 
+ config ACPI_PCI
+       bool
+-      depends on !IA64_SGI_SN
+       default PCI
+ 
+ config ACPI_SYSTEM
+       bool
+-      depends on !IA64_SGI_SN
+       default y
+       help
+         This driver will enable your system to shut down using ACPI, and
+@@ -328,8 +325,13 @@
+       depends on EXPERIMENTAL
+       default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU || ACPI_HOTPLUG_IO)
+        ---help---
+-              This is the ACPI generic container driver which supports
+-              ACPI0004, PNP0A05 and PNP0A06 devices
++        This allows _physical_ insertion and removal of CPUs and memory.
++        This can be useful, for example, on NUMA machines that support
++        ACPI based physical hotplug of nodes, or non-NUMA machines that
++        support physical cpu/memory hot-plug.
++
++        If one selects "m", this driver can be loaded with
++        "modprobe acpi_container".
+ 
+ config ACPI_HOTPLUG_MEMORY
+       tristate "Memory Hotplug"
+diff -Nru a/drivers/acpi/button.c b/drivers/acpi/button.c
+--- a/drivers/acpi/button.c    2005-04-19 01:34:14 -04:00
++++ b/drivers/acpi/button.c    2005-04-19 01:34:14 -04:00
+@@ -26,9 +26,6 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+-#include <linux/types.h>
+-#include <linux/proc_fs.h>
+-#include <linux/seq_file.h>
+ #include <acpi/acpi_bus.h>
+ #include <acpi/acpi_drivers.h>
+ 
+@@ -36,9 +33,6 @@
+ #define ACPI_BUTTON_COMPONENT         0x00080000
+ #define ACPI_BUTTON_DRIVER_NAME               "ACPI Button Driver"
+ #define ACPI_BUTTON_CLASS             "button"
+-#define ACPI_BUTTON_FILE_INFO         "info"
+-#define ACPI_BUTTON_FILE_STATE                "state"
+-#define ACPI_BUTTON_TYPE_UNKNOWN      0x00
+ #define ACPI_BUTTON_NOTIFY_STATUS     0x80
+ 
+ #define ACPI_BUTTON_SUBCLASS_POWER    "power"
+@@ -70,8 +64,6 @@
+ 
+ static int acpi_button_add (struct acpi_device *device);
+ static int acpi_button_remove (struct acpi_device *device, int type);
+-static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
+-static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
+ 
+ static struct acpi_driver acpi_button_driver = {
+       .name =         ACPI_BUTTON_DRIVER_NAME,
+@@ -90,191 +82,6 @@
+       unsigned long           pushed;
+ };
+ 
+-static struct file_operations acpi_button_info_fops = {
+-      .open           = acpi_button_info_open_fs,
+-      .read           = seq_read,
+-      .llseek         = seq_lseek,
+-      .release        = single_release,
+-};
+-
+-static struct file_operations acpi_button_state_fops = {
+-      .open           = acpi_button_state_open_fs,
+-      .read           = seq_read,
+-      .llseek         = seq_lseek,
+-      .release        = single_release,
+-};
+-/* --------------------------------------------------------------------------
+-                              FS Interface (/proc)
+-   -------------------------------------------------------------------------- 
*/
+-
+-static struct proc_dir_entry  *acpi_button_dir;
+-
+-static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
+-{
+-      struct acpi_button      *button = (struct acpi_button *) seq->private;
+-
+-      ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
+-
+-      if (!button || !button->device)
+-              return_VALUE(0);
+-
+-      seq_printf(seq, "type:                    %s\n", 
+-              acpi_device_name(button->device));
+-
+-      return_VALUE(0);
+-}
+-
+-static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
+-{
+-      return single_open(file, acpi_button_info_seq_show, PDE(inode)->data);
+-}
+-      
+-static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
+-{
+-      struct acpi_button      *button = (struct acpi_button *) seq->private;
+-      acpi_status             status;
+-      unsigned long           state;
+-
+-      ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
+-
+-      if (!button || !button->device)
+-              return_VALUE(0);
+-
+-      status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
+-      if (ACPI_FAILURE(status)) {
+-              seq_printf(seq, "state:      unsupported\n");
+-      }
+-      else{
+-              seq_printf(seq, "state:      %s\n", (state ? "open" : 
"closed")); 
+-      }
+-
+-      return_VALUE(0);
+-}
+-
+-static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
+-{
+-      return single_open(file, acpi_button_state_seq_show, PDE(inode)->data);
+-}
+-
+-static int
+-acpi_button_add_fs (
+-      struct acpi_device      *device)
+-{
+-      struct proc_dir_entry   *entry = NULL;
+-      struct acpi_button      *button = NULL;
+-
+-      ACPI_FUNCTION_TRACE("acpi_button_add_fs");
+-
+-      if (!device || !acpi_driver_data(device))
+-              return_VALUE(-EINVAL);
+-
+-      button = acpi_driver_data(device);
+-
+-      switch (button->type) {
+-      case ACPI_BUTTON_TYPE_POWER:
+-      case ACPI_BUTTON_TYPE_POWERF:
+-                      entry = proc_mkdir(ACPI_BUTTON_SUBCLASS_POWER, 
+-                              acpi_button_dir);
+-              break;
+-      case ACPI_BUTTON_TYPE_SLEEP:
+-      case ACPI_BUTTON_TYPE_SLEEPF:
+-                      entry = proc_mkdir(ACPI_BUTTON_SUBCLASS_SLEEP, 
+-                              acpi_button_dir);
+-              break;
+-      case ACPI_BUTTON_TYPE_LID:
+-                      entry = proc_mkdir(ACPI_BUTTON_SUBCLASS_LID, 
+-                              acpi_button_dir);
+-              break;
+-      }
+-
+-      if (!entry)
+-              return_VALUE(-ENODEV);
+-      entry->owner = THIS_MODULE;
+-
+-      acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry);
+-      if (!acpi_device_dir(device))
+-              return_VALUE(-ENODEV);
+-      acpi_device_dir(device)->owner = THIS_MODULE;
+-
+-      /* 'info' [R] */
+-      entry = create_proc_entry(ACPI_BUTTON_FILE_INFO,
+-              S_IRUGO, acpi_device_dir(device));
+-      if (!entry)
+-              ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+-                      "Unable to create '%s' fs entry\n",
+-                      ACPI_BUTTON_FILE_INFO));
+-      else {
+-              entry->proc_fops = &acpi_button_info_fops;
+-              entry->data = acpi_driver_data(device);
+-              entry->owner = THIS_MODULE;
+-      }
+-
+-      /* show lid state [R] */
+-      if (button->type == ACPI_BUTTON_TYPE_LID) {
+-              entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
+-                      S_IRUGO, acpi_device_dir(device));
+-              if (!entry)
+-                      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+-                              "Unable to create '%s' fs entry\n",
+-                              ACPI_BUTTON_FILE_INFO));
+-              else {
+-                      entry->proc_fops = &acpi_button_state_fops;
+-                      entry->data = acpi_driver_data(device);
+-                      entry->owner = THIS_MODULE;
+-              }
+-      }
+-
+-      return_VALUE(0);
+-}
+-
+-
+-static int
+-acpi_button_remove_fs (
+-      struct acpi_device      *device)
+-{
+-      struct acpi_button      *button = NULL;
+-
+-      ACPI_FUNCTION_TRACE("acpi_button_remove_fs");
+-
+-      button = acpi_driver_data(device);
+-      if (acpi_device_dir(device)) {
+-              if (button->type == ACPI_BUTTON_TYPE_LID)
+-                      remove_proc_entry(ACPI_BUTTON_FILE_STATE,
+-                                           acpi_device_dir(device));
+-              remove_proc_entry(ACPI_BUTTON_FILE_INFO,
+-                                   acpi_device_dir(device));
+-
+-              remove_proc_entry(acpi_device_bid(device),
+-                                   acpi_device_dir(device)->parent);
+-
+-
+-              switch (button->type) {
+-                      case ACPI_BUTTON_TYPE_POWER:
+-                      case ACPI_BUTTON_TYPE_POWERF:
+-                              remove_proc_entry(ACPI_BUTTON_SUBCLASS_POWER, 
+-                                      acpi_button_dir);
+-                              break;
+-                      case ACPI_BUTTON_TYPE_SLEEP:
+-                      case ACPI_BUTTON_TYPE_SLEEPF:
+-                              remove_proc_entry(ACPI_BUTTON_SUBCLASS_SLEEP, 
+-                                      acpi_button_dir);
+-                              break;
+-                      case ACPI_BUTTON_TYPE_LID:
+-                              remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID, 
+-                                      acpi_button_dir);
+-                              break;
+-              }
+-              acpi_device_dir(device) = NULL;
+-      }
+-
+-      return_VALUE(0);
+-}
+-
+-
+-/* --------------------------------------------------------------------------
+-                                Driver Interface
+-   -------------------------------------------------------------------------- 
*/
+-
+ static void
+ acpi_button_notify (
+       acpi_handle             handle,
+@@ -310,8 +117,7 @@
+       
+       ACPI_FUNCTION_TRACE("acpi_button_notify_fixed");
+ 
+-      if (!button)
+-              return_ACPI_STATUS(AE_BAD_PARAMETER);
++      BUG_ON(!button);
+ 
+       acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button);
+ 
+@@ -327,10 +133,6 @@
+       acpi_status             status = AE_OK;
+       struct acpi_button      *button = NULL;
+ 
+-      static struct acpi_device *power_button;
+-      static struct acpi_device *sleep_button;
+-      static struct acpi_device *lid_button;
+-
+       ACPI_FUNCTION_TRACE("acpi_button_add");
+ 
+       if (!device)
+@@ -391,42 +193,6 @@
+               goto end;
+       }
+ 
+-      /*
+-       * Ensure only one button of each type is used.
+-       */
+-      switch (button->type) {
+-      case ACPI_BUTTON_TYPE_POWER:
+-      case ACPI_BUTTON_TYPE_POWERF:
+-              if (!power_button)
+-                      power_button = device;
+-              else {
+-                      kfree(button);
+-                      return_VALUE(-ENODEV);
+-              }
+-              break;
+-      case ACPI_BUTTON_TYPE_SLEEP:
+-      case ACPI_BUTTON_TYPE_SLEEPF:
+-              if (!sleep_button)
+-                      sleep_button = device;
+-              else {
+-                      kfree(button);
+-                      return_VALUE(-ENODEV);
+-              }
+-              break;
+-      case ACPI_BUTTON_TYPE_LID:
+-              if (!lid_button)
+-                      lid_button = device;
+-              else {
+-                      kfree(button);
+-                      return_VALUE(-ENODEV);
+-              }
+-              break;
+-      }
+-
+-      result = acpi_button_add_fs(device);
+-      if (result)
+-              goto end;
+-
+       switch (button->type) {
+       case ACPI_BUTTON_TYPE_POWERF:
+               status = acpi_install_fixed_event_handler (
+@@ -470,7 +236,6 @@
+ 
+ end:
+       if (result) {
+-              acpi_button_remove_fs(device);
+               kfree(button);
+       }
+ 
+@@ -511,8 +276,6 @@
+               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+                       "Error removing notify handler\n"));
+ 
+-      acpi_button_remove_fs(device);  
+-
+       kfree(button);
+ 
+       return_VALUE(0);
+@@ -526,21 +289,14 @@
+ 
+       ACPI_FUNCTION_TRACE("acpi_button_init");
+ 
+-      acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir);
+-      if (!acpi_button_dir)
+-              return_VALUE(-ENODEV);
+-      acpi_button_dir->owner = THIS_MODULE;
+-
+       result = acpi_bus_register_driver(&acpi_button_driver);
+       if (result < 0) {
+-              remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
+               return_VALUE(-ENODEV);
+       }
+ 
+       return_VALUE(0);
+ }
+ 
+-
+ static void __exit
+ acpi_button_exit (void)
+ {
+@@ -548,11 +304,8 @@
+ 
+       acpi_bus_unregister_driver(&acpi_button_driver);
+ 
+-      remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
+-
+       return_VOID;
+ }
+-
+ 
+ module_init(acpi_button_init);
+ module_exit(acpi_button_exit);
+diff -Nru a/drivers/acpi/dispatcher/dsfield.c 
b/drivers/acpi/dispatcher/dsfield.c
+--- a/drivers/acpi/dispatcher/dsfield.c        2005-04-19 01:34:14 -04:00
++++ b/drivers/acpi/dispatcher/dsfield.c        2005-04-19 01:34:14 -04:00
+@@ -53,13 +53,20 @@
+ #define _COMPONENT          ACPI_DISPATCHER
+        ACPI_MODULE_NAME    ("dsfield")
+ 
++/* Local prototypes */
++
++static acpi_status
++acpi_ds_get_field_names (
++      struct acpi_create_field_info   *info,
++      struct acpi_walk_state          *walk_state,
++      union acpi_parse_object         *arg);
++
+ 
+ 
/*******************************************************************************
+  *
+  * FUNCTION:    acpi_ds_create_buffer_field
+  *
+- * PARAMETERS:  Opcode              - The opcode to be executed
+- *              Operands            - List of operands for the opcode
++ * PARAMETERS:  Op                  - Current parse op (create_xXField)
+  *              walk_state          - Current state
+  *
+  * RETURN:      Status
+@@ -70,7 +77,7 @@
+  *              create_word_field_op,
+  *              create_dword_field_op,
+  *              create_qword_field_op,
+- *              create_field_op     (all of which define fields in buffers)
++ *              create_field_op     (all of which define a field in a buffer)
+  *
+  
******************************************************************************/
+ 
+@@ -119,7 +126,8 @@
+                       flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE;
+               }
+               else {
+-                      flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | 
ACPI_NS_ERROR_IF_FOUND;
++                      flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
++                                      ACPI_NS_ERROR_IF_FOUND;
+               }
+ 
+               /*
+@@ -134,16 +142,16 @@
+               }
+       }
+ 
+-      /* We could put the returned object (Node) on the object stack for 
later, but
+-       * for now, we will put it in the "op" object that the parser uses, so 
we
+-       * can get it again at the end of this scope
++      /* We could put the returned object (Node) on the object stack for 
later,
++       * but for now, we will put it in the "op" object that the parser uses,
++       * so we can get it again at the end of this scope
+        */
+       op->common.node = node;
+ 
+       /*
+-       * If there is no object attached to the node, this node was just 
created and
+-       * we need to create the field object.  Otherwise, this was a lookup of 
an
+-       * existing node and we don't want to create the field object again.
++       * If there is no object attached to the node, this node was just 
created
++       * and we need to create the field object.  Otherwise, this was a lookup
++       * of an existing node and we don't want to create the field object 
again.
+        */
+       obj_desc = acpi_ns_get_attached_object (node);
+       if (obj_desc) {
+@@ -205,7 +213,7 @@
+  *
+  
******************************************************************************/
+ 
+-acpi_status
++static acpi_status
+ acpi_ds_get_field_names (
+       struct acpi_create_field_info   *info,
+       struct acpi_walk_state          *walk_state,
+@@ -238,7 +246,8 @@
+                                        + (acpi_integer) 
arg->common.value.size;
+ 
+                       if (position > ACPI_UINT32_MAX) {
+-                              ACPI_REPORT_ERROR (("Bit offset within field 
too large (> 0xFFFFFFFF)\n"));
++                              ACPI_REPORT_ERROR ((
++                                      "Bit offset within field too large (> 
0xFFFFFFFF)\n"));
+                               return_ACPI_STATUS (AE_SUPPORT);
+                       }
+ 
+@@ -250,12 +259,15 @@
+ 
+                       /*
+                        * Get a new access_type and access_attribute -- to be 
used for all
+-                       * field units that follow, until field end or another 
access_as keyword.
++                       * field units that follow, until field end or another 
access_as
++                       * keyword.
+                        *
+-                       * In field_flags, preserve the flag bits other than 
the ACCESS_TYPE bits
++                       * In field_flags, preserve the flag bits other than the
++                       * ACCESS_TYPE bits
+                        */
+-                      info->field_flags = (u8) ((info->field_flags & 
~(AML_FIELD_ACCESS_TYPE_MASK)) |
+-                                        ((u8) ((u32) 
arg->common.value.integer >> 8)));
++                      info->field_flags = (u8)
++                              ((info->field_flags & 
~(AML_FIELD_ACCESS_TYPE_MASK)) |
++                              ((u8) ((u32) arg->common.value.integer >> 8)));
+ 
+                       info->attribute = (u8) (arg->common.value.integer);
+                       break;
+@@ -267,7 +279,8 @@
+ 
+                       status = acpi_ns_lookup (walk_state->scope_info,
+                                         (char *) &arg->named.name,
+-                                        info->field_type, ACPI_IMODE_EXECUTE, 
ACPI_NS_DONT_OPEN_SCOPE,
++                                        info->field_type, ACPI_IMODE_EXECUTE,
++                                        ACPI_NS_DONT_OPEN_SCOPE,
+                                         walk_state, &info->field_node);
+                       if (ACPI_FAILURE (status)) {
+                               ACPI_REPORT_NSERROR ((char *) &arg->named.name, 
status);
+@@ -295,8 +308,9 @@
+                                        + (acpi_integer) 
arg->common.value.size;
+ 
+                       if (position > ACPI_UINT32_MAX) {
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to