Merge linux-2.6 into linux-acpi-2.6 test
Len Brown [Sat, 3 Sep 2005 06:44:09 +0000 (02:44 -0400)]
1  2 
arch/ia64/Kconfig
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
drivers/serial/Kconfig

diff --combined arch/ia64/Kconfig
@@@ -60,7 -60,6 +60,7 @@@ choic
  
  config IA64_GENERIC
        bool "generic"
 +      select ACPI
        select NUMA
        select ACPI_NUMA
        select VIRTUAL_MEM_MAP
@@@ -341,7 -340,6 +341,7 @@@ config IA64_PALINF
  
  config ACPI_DEALLOCATE_IRQ
        bool
 +      depends on ACPI
        depends on IOSAPIC && EXPERIMENTAL
        default y
  
@@@ -353,10 -351,44 +353,16 @@@ endmen
  
  menu "Power management and ACPI"
  
 -config PM
 -      bool "Power Management support"
 -      depends on !IA64_HP_SIM
 -      default y
 -      help
 -        "Power Management" means that parts of your computer are shut
 -        off or put into a power conserving "sleep" mode if they are not
 -        being used.  There are two competing standards for doing this: APM
 -        and ACPI.  If you want to use either one, say Y here and then also
 -        to the requisite support below.
 -
 -        Power Management is most important for battery powered laptop
 -        computers; if you have a laptop, check out the Linux Laptop home
 -        page on the WWW at <http://www.linux-on-laptops.com/> and the
 -        Battery Powered Linux mini-HOWTO, available from
 -        <http://www.tldp.org/docs.html#howto>.
 -
 -        Note that, even if you say N here, Linux on the x86 architecture
 -        will issue the hlt instruction if nothing is to be done, thereby
 -        sending the processor to sleep and saving power.
 -
 -config ACPI
 -      bool
 -      depends on !IA64_HP_SIM
 -      default y
 -
 -if !IA64_HP_SIM
 +source "kernel/power/Kconfig"
  
  source "drivers/acpi/Kconfig"
  
 -endif
 -
+ if PM
+ source "arch/ia64/kernel/cpufreq/Kconfig"
+ endif
  endmenu
  
  if !IA64_HP_SIM
@@@ -5,7 -5,7 +5,7 @@@
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
   *
-  * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
+  * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
   */
  
  #include <linux/irq.h>
@@@ -23,7 -23,7 +23,7 @@@ static void force_interrupt(int irq)
  static void register_intr_pda(struct sn_irq_info *sn_irq_info);
  static void unregister_intr_pda(struct sn_irq_info *sn_irq_info);
  
 -extern int sn_force_interrupt_flag;
 +int sn_force_interrupt_flag = 1;
  extern int sn_ioif_inited;
  static struct list_head **sn_irq_lh;
  static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */
@@@ -76,16 -76,14 +76,14 @@@ static void sn_enable_irq(unsigned int 
  
  static void sn_ack_irq(unsigned int irq)
  {
-       uint64_t event_occurred, mask = 0;
-       int nasid;
+       u64 event_occurred, mask = 0;
  
        irq = irq & 0xff;
-       nasid = get_nasid();
        event_occurred =
-           HUB_L((uint64_t *) GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED));
+           HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED));
        mask = event_occurred & SH_ALL_INT_MASK;
-       HUB_S((uint64_t *) GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED_ALIAS),
-                mask);
+       HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS),
+             mask);
        __set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);
  
        move_irq(irq);
  
  static void sn_end_irq(unsigned int irq)
  {
-       int nasid;
        int ivec;
-       uint64_t event_occurred;
+       u64 event_occurred;
  
        ivec = irq & 0xff;
        if (ivec == SGI_UART_VECTOR) {
-               nasid = get_nasid();
-               event_occurred = HUB_L((uint64_t *) GLOBAL_MMR_ADDR
-                                      (nasid, SH_EVENT_OCCURRED));
+               event_occurred = HUB_L((u64*)LOCAL_MMR_ADDR (SH_EVENT_OCCURRED));
                /* If the UART bit is set here, we may have received an
                 * interrupt from the UART that the driver missed.  To
                 * make sure, we IPI ourselves to force us to look again.
@@@ -132,6 -127,7 +127,7 @@@ static void sn_set_affinity_irq(unsigne
                int local_widget, status;
                nasid_t local_nasid;
                struct sn_irq_info *new_irq_info;
+               struct sn_pcibus_provider *pci_provider;
  
                new_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_ATOMIC);
                if (new_irq_info == NULL)
                new_irq_info->irq_cpuid = cpuid;
                register_intr_pda(new_irq_info);
  
-               if (IS_PCI_BRIDGE_ASIC(new_irq_info->irq_bridge_type))
-                       pcibr_change_devices_irq(new_irq_info);
+               pci_provider = sn_pci_provider[new_irq_info->irq_bridge_type];
+               if (pci_provider && pci_provider->target_interrupt)
+                       (pci_provider->target_interrupt)(new_irq_info);
  
                spin_lock(&sn_irq_info_lock);
                list_replace_rcu(&sn_irq_info->list, &new_irq_info->list);
@@@ -317,6 -314,16 +314,16 @@@ void sn_irq_unfixup(struct pci_dev *pci
        pci_dev_put(pci_dev);
  }
  
+ static inline void
+ sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info)
+ {
+       struct sn_pcibus_provider *pci_provider;
+       pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type];
+       if (pci_provider && pci_provider->force_interrupt)
+               (*pci_provider->force_interrupt)(sn_irq_info);
+ }
  static void force_interrupt(int irq)
  {
        struct sn_irq_info *sn_irq_info;
                return;
  
        rcu_read_lock();
-       list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[irq], list) {
-               if (IS_PCI_BRIDGE_ASIC(sn_irq_info->irq_bridge_type) &&
-                   (sn_irq_info->irq_bridge != NULL))
-                       pcibr_force_interrupt(sn_irq_info);
-       }
+       list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[irq], list)
+               sn_call_force_intr_provider(sn_irq_info);
        rcu_read_unlock();
  }
  
@@@ -351,6 -356,14 +356,14 @@@ static void sn_check_intr(int irq, stru
        struct pcidev_info *pcidev_info;
        struct pcibus_info *pcibus_info;
  
+       /*
+        * Bridge types attached to TIO (anything but PIC) do not need this WAR
+        * since they do not target Shub II interrupt registers.  If that
+        * ever changes, this check needs to accomodate.
+        */
+       if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC)
+               return;
        pcidev_info = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
        if (!pcidev_info)
                return;
                break;
        }
        if (!test_bit(irr_bit, &irr_reg)) {
-               if (!test_bit(irq, pda->sn_soft_irr)) {
-                       if (!test_bit(irq, pda->sn_in_service_ivecs)) {
-                               regval &= 0xff;
-                               if (sn_irq_info->irq_int_bit & regval &
-                                   sn_irq_info->irq_last_intr) {
-                                       regval &=
-                                           ~(sn_irq_info->
-                                             irq_int_bit & regval);
-                                       pcibr_force_interrupt(sn_irq_info);
-                               }
+               if (!test_bit(irq, pda->sn_in_service_ivecs)) {
+                       regval &= 0xff;
+                       if (sn_irq_info->irq_int_bit & regval &
+                           sn_irq_info->irq_last_intr) {
+                               regval &= ~(sn_irq_info->irq_int_bit & regval);
+                               sn_call_force_intr_provider(sn_irq_info);
                        }
                }
        }
@@@ -404,13 -413,7 +413,7 @@@ void sn_lb_int_war_check(void
        rcu_read_lock();
        for (i = pda->sn_first_irq; i <= pda->sn_last_irq; i++) {
                list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[i], list) {
-                       /*
-                        * Only call for PCI bridges that are fully
-                        * initialized.
-                        */
-                       if (IS_PCI_BRIDGE_ASIC(sn_irq_info->irq_bridge_type) &&
-                           (sn_irq_info->irq_bridge != NULL))
-                               sn_check_intr(i, sn_irq_info);
+                       sn_check_intr(i, sn_irq_info);
                }
        }
        rcu_read_unlock();
@@@ -3,7 -3,7 +3,7 @@@
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
   *
-  * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved.
+  * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
   */
  #include <linux/config.h>
  #include <asm/uaccess.h>
@@@ -15,7 -15,7 +15,7 @@@
  
  static int partition_id_show(struct seq_file *s, void *p)
  {
-       seq_printf(s, "%d\n", sn_local_partid());
+       seq_printf(s, "%d\n", sn_partition_id);
        return 0;
  }
  
@@@ -52,7 -52,7 +52,7 @@@ static int licenseID_open(struct inode 
   * the bridge chip.  The hardware will then send an interrupt message if the
   * interrupt line is active.  This mimics a level sensitive interrupt.
   */
 -int sn_force_interrupt_flag = 1;
 +extern int sn_force_interrupt_flag;
  
  static int sn_force_interrupt_show(struct seq_file *s, void *p)
  {
diff --combined drivers/serial/Kconfig
@@@ -80,7 -80,7 +80,7 @@@ config SERIAL_8250_C
  config SERIAL_8250_ACPI
        bool "8250/16550 device discovery via ACPI namespace"
        default y if IA64
 -      depends on ACPI_BUS && SERIAL_8250
 +      depends on ACPI && SERIAL_8250
        ---help---
          If you wish to enable serial port discovery via the ACPI
          namespace, say Y here.  If unsure, say N.
@@@ -830,7 -830,7 +830,7 @@@ config SERIAL_M32R_PLDSI
  
  config SERIAL_TXX9
        bool "TMPTX39XX/49XX SIO support"
-       depends HAS_TXX9_SERIAL
+       depends HAS_TXX9_SERIAL && BROKEN
        select SERIAL_CORE
        default y