Merge ../linux-2.6
authorPaul Mackerras <paulus@samba.org>
Fri, 17 Mar 2006 01:01:19 +0000 (12:01 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 17 Mar 2006 01:01:19 +0000 (12:01 +1100)
1  2 
arch/powerpc/Kconfig
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/kernel/rtas_pci.c
arch/powerpc/kernel/time.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/setup.c

diff --combined arch/powerpc/Kconfig
index fec07a12c6cd1daddf9f458da7dae23b4c861231,dfba81719dec066b66078a37e48878622cb025fd..fae42da7468d0b82b1c6f3ab911d3ec3e05c1414
@@@ -127,12 -127,6 +127,12 @@@ config PPC_83x
        select 83xx
        select PPC_FPU
  
 +config PPC_85xx
 +      bool "Freescale 85xx"
 +      select E500
 +      select FSL_SOC
 +      select 85xx
 +
  config 40x
        bool "AMCC 40x"
  
@@@ -145,6 -139,8 +145,6 @@@ config 8x
  config E200
        bool "Freescale e200"
  
 -config E500
 -      bool "Freescale e500"
  endchoice
  
  config POWER4_ONLY
@@@ -172,13 -168,6 +172,13 @@@ config 6x
  config 83xx
        bool
  
 +# this is temp to handle compat with arch=ppc
 +config 85xx
 +      bool
 +
 +config E500
 +      bool
 +
  config PPC_FPU
        bool
        default y if PPC64
@@@ -228,7 -217,6 +228,7 @@@ config ALTIVE
  config SPE
        bool "SPE Support"
        depends on E200 || E500
 +      default y
        ---help---
          This option enables kernel support for the Signal Processing
          Extensions (SPE) to the PowerPC processor. The kernel currently
@@@ -250,21 -238,6 +250,21 @@@ config PPC_STD_MMU_3
        def_bool y
        depends on PPC_STD_MMU && PPC32
  
 +config VIRT_CPU_ACCOUNTING
 +      bool "Deterministic task and CPU time accounting"
 +      depends on PPC64
 +      default y
 +      help
 +        Select this option to enable more accurate task and CPU time
 +        accounting.  This is done by reading a CPU counter on each
 +        kernel entry and exit and on transitions within the kernel
 +        between system, softirq and hardirq state, so there is a
 +        small performance impact.  This also enables accounting of
 +        stolen time on logically-partitioned systems running on
 +        IBM POWER5-based machines.
 +
 +        If in doubt, say Y here.
 +
  config SMP
        depends on PPC_STD_MMU
        bool "Symmetric multi-processing support"
@@@ -607,7 -580,7 +607,7 @@@ config KEXE
          strongly in flux, so no good recommendation can be made.
  
  config CRASH_DUMP
-       bool "kernel crash dumps (EXPERIMENTAL)"
+       bool "Build a kdump crash kernel (EXPERIMENTAL)"
        depends on PPC_MULTIPLATFORM && PPC64 && EXPERIMENTAL
        help
          Build a kernel suitable for use as a kdump capture kernel.
@@@ -761,12 -734,13 +761,12 @@@ config GENERIC_ISA_DM
  
  config PPC_I8259
        bool
 -      default y if 85xx
        default n
  
  config PPC_INDIRECT_PCI
        bool
        depends on PCI
 -      default y if 40x || 44x || 85xx
 +      default y if 40x || 44x
        default n
  
  config EISA
@@@ -783,8 -757,8 +783,8 @@@ config MC
        bool
  
  config PCI
 -      bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
 -      default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx
 +      bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
 +      default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx
        default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
        default PCI_QSPAN if !4xx && !CPM2 && 8xx
        help
index af32922db65b8ffe55e6275b87d73c7fe159288b,63ecbec05202c1170b1c7b9f0aecaa9189e3cd20..dfa5398ab3c8d68edfd2c65602f71d3858b161e8
@@@ -57,6 -57,7 +57,6 @@@ extern void machine_check_exception(str
  extern void alignment_exception(struct pt_regs *regs);
  extern void program_check_exception(struct pt_regs *regs);
  extern void single_step_exception(struct pt_regs *regs);
 -extern int pmac_newworld;
  extern int sys_sigreturn(struct pt_regs *regs);
  
  EXPORT_SYMBOL(clear_pages);
@@@ -109,15 -110,6 +109,6 @@@ EXPORT_SYMBOL(_insw_ns)
  EXPORT_SYMBOL(_outsw_ns);
  EXPORT_SYMBOL(_insl_ns);
  EXPORT_SYMBOL(_outsl_ns);
- EXPORT_SYMBOL(ioremap);
- #ifdef CONFIG_44x
- EXPORT_SYMBOL(ioremap64);
- #endif
- EXPORT_SYMBOL(__ioremap);
- EXPORT_SYMBOL(iounmap);
- #ifdef CONFIG_PPC32
- EXPORT_SYMBOL(ioremap_bot);   /* aka VMALLOC_END */
- #endif
  
  #if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE))
  EXPORT_SYMBOL(ppc_ide_md);
@@@ -160,7 -152,6 +151,6 @@@ EXPORT_SYMBOL(__flush_icache_range)
  EXPORT_SYMBOL(flush_dcache_range);
  
  #ifdef CONFIG_SMP
- EXPORT_SYMBOL(smp_call_function);
  #ifdef CONFIG_PPC32
  EXPORT_SYMBOL(smp_hw_index);
  #endif
index 03afb79e27e525fac449e7ce6e5107abd7911c75,7442775ef2a1dd864a01b515d79b611bd075fcaf..57b539a03fa963833661855b6c6b40b73c17d727
@@@ -1,4 -1,6 +1,4 @@@
  /*
 - * arch/ppc64/kernel/rtas_pci.c
 - *
   * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
   * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
   *
@@@ -278,8 -280,7 +278,7 @@@ static int phb_set_bus_ranges(struct de
        return 0;
  }
  
- static int __devinit setup_phb(struct device_node *dev,
-                              struct pci_controller *phb)
+ int __devinit setup_phb(struct device_node *dev, struct pci_controller *phb)
  {
        if (is_python(dev))
                python_countermeasures(dev);
@@@ -357,27 -358,6 +356,6 @@@ unsigned long __init find_and_init_phbs
        return 0;
  }
  
- struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
- {
-       struct pci_controller *phb;
-       int primary;
-       primary = list_empty(&hose_list);
-       phb = pcibios_alloc_controller(dn);
-       if (!phb)
-               return NULL;
-       setup_phb(dn, phb);
-       pci_process_bridge_OF_ranges(phb, dn, primary);
-       pci_setup_phb_io_dynamic(phb, primary);
-       pci_devs_phb_init_dynamic(phb);
-       scan_phb(phb);
-       return phb;
- }
- EXPORT_SYMBOL(init_phb_dynamic);
  /* RPA-specific bits for removing PHBs */
  int pcibios_remove_root_bus(struct pci_controller *phb)
  {
index 4f20a5f15d4921b1592ffdf0cf3875e33cfd9499,86f7e3d154d8a11065e16064d4dc083fa99d115c..4a27218a086cb018bd5a6c31d8cfdf96b5434c98
@@@ -51,7 -51,6 +51,7 @@@
  #include <linux/percpu.h>
  #include <linux/rtc.h>
  #include <linux/jiffies.h>
 +#include <linux/posix-timers.h>
  
  #include <asm/io.h>
  #include <asm/processor.h>
@@@ -99,7 -98,6 +99,7 @@@ unsigned long tb_ticks_per_jiffy
  unsigned long tb_ticks_per_usec = 100; /* sane default */
  EXPORT_SYMBOL(tb_ticks_per_usec);
  unsigned long tb_ticks_per_sec;
 +EXPORT_SYMBOL(tb_ticks_per_sec);      /* for cputime_t conversions */
  u64 tb_to_xs;
  unsigned tb_to_us;
  
@@@ -137,224 -135,6 +137,224 @@@ unsigned long tb_last_stamp
   */
  DEFINE_PER_CPU(unsigned long, last_jiffy);
  
 +#ifdef CONFIG_VIRT_CPU_ACCOUNTING
 +/*
 + * Factors for converting from cputime_t (timebase ticks) to
 + * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds).
 + * These are all stored as 0.64 fixed-point binary fractions.
 + */
 +u64 __cputime_jiffies_factor;
 +EXPORT_SYMBOL(__cputime_jiffies_factor);
 +u64 __cputime_msec_factor;
 +EXPORT_SYMBOL(__cputime_msec_factor);
 +u64 __cputime_sec_factor;
 +EXPORT_SYMBOL(__cputime_sec_factor);
 +u64 __cputime_clockt_factor;
 +EXPORT_SYMBOL(__cputime_clockt_factor);
 +
 +static void calc_cputime_factors(void)
 +{
 +      struct div_result res;
 +
 +      div128_by_32(HZ, 0, tb_ticks_per_sec, &res);
 +      __cputime_jiffies_factor = res.result_low;
 +      div128_by_32(1000, 0, tb_ticks_per_sec, &res);
 +      __cputime_msec_factor = res.result_low;
 +      div128_by_32(1, 0, tb_ticks_per_sec, &res);
 +      __cputime_sec_factor = res.result_low;
 +      div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res);
 +      __cputime_clockt_factor = res.result_low;
 +}
 +
 +/*
 + * Read the PURR on systems that have it, otherwise the timebase.
 + */
 +static u64 read_purr(void)
 +{
 +      if (cpu_has_feature(CPU_FTR_PURR))
 +              return mfspr(SPRN_PURR);
 +      return mftb();
 +}
 +
 +/*
 + * Account time for a transition between system, hard irq
 + * or soft irq state.
 + */
 +void account_system_vtime(struct task_struct *tsk)
 +{
 +      u64 now, delta;
 +      unsigned long flags;
 +
 +      local_irq_save(flags);
 +      now = read_purr();
 +      delta = now - get_paca()->startpurr;
 +      get_paca()->startpurr = now;
 +      if (!in_interrupt()) {
 +              delta += get_paca()->system_time;
 +              get_paca()->system_time = 0;
 +      }
 +      account_system_time(tsk, 0, delta);
 +      local_irq_restore(flags);
 +}
 +
 +/*
 + * Transfer the user and system times accumulated in the paca
 + * by the exception entry and exit code to the generic process
 + * user and system time records.
 + * Must be called with interrupts disabled.
 + */
 +void account_process_vtime(struct task_struct *tsk)
 +{
 +      cputime_t utime;
 +
 +      utime = get_paca()->user_time;
 +      get_paca()->user_time = 0;
 +      account_user_time(tsk, utime);
 +}
 +
 +static void account_process_time(struct pt_regs *regs)
 +{
 +      int cpu = smp_processor_id();
 +
 +      account_process_vtime(current);
 +      run_local_timers();
 +      if (rcu_pending(cpu))
 +              rcu_check_callbacks(cpu, user_mode(regs));
 +      scheduler_tick();
 +      run_posix_cpu_timers(current);
 +}
 +
 +#ifdef CONFIG_PPC_SPLPAR
 +/*
 + * Stuff for accounting stolen time.
 + */
 +struct cpu_purr_data {
 +      int     initialized;                    /* thread is running */
 +      u64     tb0;                    /* timebase at origin time */
 +      u64     purr0;                  /* PURR at origin time */
 +      u64     tb;                     /* last TB value read */
 +      u64     purr;                   /* last PURR value read */
 +      u64     stolen;                 /* stolen time so far */
 +      spinlock_t lock;
 +};
 +
 +static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data);
 +
 +static void snapshot_tb_and_purr(void *data)
 +{
 +      struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
 +
 +      p->tb0 = mftb();
 +      p->purr0 = mfspr(SPRN_PURR);
 +      p->tb = p->tb0;
 +      p->purr = 0;
 +      wmb();
 +      p->initialized = 1;
 +}
 +
 +/*
 + * Called during boot when all cpus have come up.
 + */
 +void snapshot_timebases(void)
 +{
 +      int cpu;
 +
 +      if (!cpu_has_feature(CPU_FTR_PURR))
 +              return;
 +      for_each_cpu(cpu)
 +              spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock);
 +      on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1);
 +}
 +
 +void calculate_steal_time(void)
 +{
 +      u64 tb, purr, t0;
 +      s64 stolen;
 +      struct cpu_purr_data *p0, *pme, *phim;
 +      int cpu;
 +
 +      if (!cpu_has_feature(CPU_FTR_PURR))
 +              return;
 +      cpu = smp_processor_id();
 +      pme = &per_cpu(cpu_purr_data, cpu);
 +      if (!pme->initialized)
 +              return;         /* this can happen in early boot */
 +      p0 = &per_cpu(cpu_purr_data, cpu & ~1);
 +      phim = &per_cpu(cpu_purr_data, cpu ^ 1);
 +      spin_lock(&p0->lock);
 +      tb = mftb();
 +      purr = mfspr(SPRN_PURR) - pme->purr0;
 +      if (!phim->initialized || !cpu_online(cpu ^ 1)) {
 +              stolen = (tb - pme->tb) - (purr - pme->purr);
 +      } else {
 +              t0 = pme->tb0;
 +              if (phim->tb0 < t0)
 +                      t0 = phim->tb0;
 +              stolen = phim->tb - t0 - phim->purr - purr - p0->stolen;
 +      }
 +      if (stolen > 0) {
 +              account_steal_time(current, stolen);
 +              p0->stolen += stolen;
 +      }
 +      pme->tb = tb;
 +      pme->purr = purr;
 +      spin_unlock(&p0->lock);
 +}
 +
 +/*
 + * Must be called before the cpu is added to the online map when
 + * a cpu is being brought up at runtime.
 + */
 +static void snapshot_purr(void)
 +{
 +      int cpu;
 +      u64 purr;
 +      struct cpu_purr_data *p0, *pme, *phim;
 +      unsigned long flags;
 +
 +      if (!cpu_has_feature(CPU_FTR_PURR))
 +              return;
 +      cpu = smp_processor_id();
 +      pme = &per_cpu(cpu_purr_data, cpu);
 +      p0 = &per_cpu(cpu_purr_data, cpu & ~1);
 +      phim = &per_cpu(cpu_purr_data, cpu ^ 1);
 +      spin_lock_irqsave(&p0->lock, flags);
 +      pme->tb = pme->tb0 = mftb();
 +      purr = mfspr(SPRN_PURR);
 +      if (!phim->initialized) {
 +              pme->purr = 0;
 +              pme->purr0 = purr;
 +      } else {
 +              /* set p->purr and p->purr0 for no change in p0->stolen */
 +              pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen;
 +              pme->purr0 = purr - pme->purr;
 +      }
 +      pme->initialized = 1;
 +      spin_unlock_irqrestore(&p0->lock, flags);
 +}
 +
 +#endif /* CONFIG_PPC_SPLPAR */
 +
 +#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
 +#define calc_cputime_factors()
 +#define account_process_time(regs)    update_process_times(user_mode(regs))
 +#define calculate_steal_time()                do { } while (0)
 +#endif
 +
 +#if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR))
 +#define snapshot_purr()                       do { } while (0)
 +#endif
 +
 +/*
 + * Called when a cpu comes up after the system has finished booting,
 + * i.e. as a result of a hotplug cpu action.
 + */
 +void snapshot_timebase(void)
 +{
 +      __get_cpu_var(last_jiffy) = get_tb();
 +      snapshot_purr();
 +}
 +
  void __delay(unsigned long loops)
  {
        unsigned long start;
@@@ -503,9 -283,9 +503,9 @@@ static inline void update_gtod(u64 new_
         * the two values of tb_update_count match and are even then the
         * tb_to_xs and stamp_xsec values are consistent.  If not, then it
         * loops back and reads them again until this criteria is met.
+        * We expect the caller to have done the first increment of
+        * vdso_data->tb_update_count already.
         */
-       ++(vdso_data->tb_update_count);
-       smp_wmb();
        vdso_data->tb_orig_stamp = new_tb_stamp;
        vdso_data->stamp_xsec = new_stamp_xsec;
        vdso_data->tb_to_xs = new_tb_to_xs;
@@@ -530,20 -310,15 +530,15 @@@ static __inline__ void timer_recalc_off
        unsigned long offset;
        u64 new_stamp_xsec;
        u64 tlen, t2x;
+       u64 tb, xsec_old, xsec_new;
+       struct gettimeofday_vars *varp;
  
        if (__USE_RTC())
                return;
        tlen = current_tick_length();
        offset = cur_tb - do_gtod.varp->tb_orig_stamp;
-       if (tlen == last_tick_len && offset < 0x80000000u) {
-               /* check that we're still in sync; if not, resync */
-               struct timeval tv;
-               __do_gettimeofday(&tv, cur_tb);
-               if (tv.tv_sec <= xtime.tv_sec &&
-                   (tv.tv_sec < xtime.tv_sec ||
-                    tv.tv_usec * 1000 <= xtime.tv_nsec))
-                       return;
-       }
+       if (tlen == last_tick_len && offset < 0x80000000u)
+               return;
        if (tlen != last_tick_len) {
                t2x = mulhdu(tlen << TICKLEN_SHIFT, ticklen_to_xs);
                last_tick_len = tlen;
        new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
        do_div(new_stamp_xsec, 1000000000);
        new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
+       ++vdso_data->tb_update_count;
+       smp_mb();
+       /*
+        * Make sure time doesn't go backwards for userspace gettimeofday.
+        */
+       tb = get_tb();
+       varp = do_gtod.varp;
+       xsec_old = mulhdu(tb - varp->tb_orig_stamp, varp->tb_to_xs)
+               + varp->stamp_xsec;
+       xsec_new = mulhdu(tb - cur_tb, t2x) + new_stamp_xsec;
+       if (xsec_new < xsec_old)
+               new_stamp_xsec += xsec_old - xsec_new;
        update_gtod(cur_tb, new_stamp_xsec, t2x);
  }
  
@@@ -602,7 -392,6 +612,7 @@@ static void iSeries_tb_recal(void
                                                new_tb_ticks_per_jiffy, sign, tick_diff );
                                tb_ticks_per_jiffy = new_tb_ticks_per_jiffy;
                                tb_ticks_per_sec   = new_tb_ticks_per_sec;
 +                              calc_cputime_factors();
                                div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres );
                                do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
                                tb_to_xs = divres.result_low;
@@@ -651,7 -440,6 +661,7 @@@ void timer_interrupt(struct pt_regs * r
        irq_enter();
  
        profile_tick(CPU_PROFILING, regs);
 +      calculate_steal_time();
  
  #ifdef CONFIG_PPC_ISERIES
        get_lppaca()->int_dword.fields.decr_int = 0;
                 * is the case.
                 */
                if (!cpu_is_offline(cpu))
 -                      update_process_times(user_mode(regs));
 +                      account_process_time(regs);
  
                /*
                 * No need to check whether cpu is offline here; boot_cpuid
@@@ -730,27 -518,13 +740,27 @@@ void wakeup_decrementer(void
  void __init smp_space_timers(unsigned int max_cpus)
  {
        int i;
 +      unsigned long half = tb_ticks_per_jiffy / 2;
        unsigned long offset = tb_ticks_per_jiffy / max_cpus;
        unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid);
  
        /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
        previous_tb -= tb_ticks_per_jiffy;
 +      /*
 +       * The stolen time calculation for POWER5 shared-processor LPAR
 +       * systems works better if the two threads' timebase interrupts
 +       * are staggered by half a jiffy with respect to each other.
 +       */
        for_each_cpu(i) {
 -              if (i != boot_cpuid) {
 +              if (i == boot_cpuid)
 +                      continue;
 +              if (i == (boot_cpuid ^ 1))
 +                      per_cpu(last_jiffy, i) =
 +                              per_cpu(last_jiffy, boot_cpuid) - half;
 +              else if (i & 1)
 +                      per_cpu(last_jiffy, i) =
 +                              per_cpu(last_jiffy, i ^ 1) + half;
 +              else {
                        previous_tb += offset;
                        per_cpu(last_jiffy, i) = previous_tb;
                }
@@@ -800,6 -574,10 +810,10 @@@ int do_settimeofday(struct timespec *tv
        }
  #endif
  
+       /* Make userspace gettimeofday spin until we're done. */
+       ++vdso_data->tb_update_count;
+       smp_mb();
        /*
         * Subtract off the number of nanoseconds since the
         * beginning of the last tick.
@@@ -942,7 -720,6 +956,7 @@@ void __init time_init(void
        tb_ticks_per_sec = ppc_tb_freq;
        tb_ticks_per_usec = ppc_tb_freq / 1000000;
        tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
 +      calc_cputime_factors();
  
        /*
         * Calculate the length of each tick in ns.  It will not be
         * It is computed as:
         * ticklen_to_xs = 2^N / (tb_ticks_per_jiffy * 1e9)
         * where N = 64 + 20 - TICKLEN_SCALE - TICKLEN_SHIFT
-        * so as to give the result as a 0.64 fixed-point fraction.
+        * which turns out to be N = 51 - SHIFT_HZ.
+        * This gives the result as a 0.64 fixed-point fraction.
+        * That value is reduced by an offset amounting to 1 xsec per
+        * 2^31 timebase ticks to avoid problems with time going backwards
+        * by 1 xsec when we do timer_recalc_offset due to losing the
+        * fractional xsec.  That offset is equal to ppc_tb_freq/2^51
+        * since there are 2^20 xsec in a second.
         */
-       div128_by_32(1ULL << (64 + 20 - TICKLEN_SCALE - TICKLEN_SHIFT), 0,
-                    tb_ticks_per_jiffy, &res);
+       div128_by_32((1ULL << 51) - ppc_tb_freq, 0,
+                    tb_ticks_per_jiffy << SHIFT_HZ, &res);
        div128_by_32(res.result_high, res.result_low, NSEC_PER_SEC, &res);
        ticklen_to_xs = res.result_low;
  
index c8b4a2b115a9fdf258890fdc32777f54c4dbec65,bbe794891a2076c22dc7b361b79b95451b0b6f1a..e49eddd5042d0d0847b89b0d14bf63a31564d58a
@@@ -1,4 -1,6 +1,4 @@@
  /*
 - *  arch/ppc/platforms/pmac_feature.c
 - *
   *  Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au)
   *                          Ben. Herrenschmidt (benh@kernel.crashing.org)
   *
@@@ -2489,9 -2491,7 +2489,7 @@@ found
                        pmac_mb.model_id = PMAC_TYPE_COMET;
                iounmap(mach_id_ptr);
        }
- #endif /* CONFIG_POWER4 */
  
- #ifdef CONFIG_6xx
        /* Set default value of powersave_nap on machines that support it.
         * It appears that uninorth rev 3 has a problem with it, we don't
         * enable it on those. In theory, the flush-on-lock property is
         * NAP mode
         */
        powersave_lowspeed = 1;
- #endif /* CONFIG_6xx */
- #ifdef CONFIG_POWER4
+ #else /* CONFIG_POWER4 */
        powersave_nap = 1;
- #endif
+ #endif  /* CONFIG_POWER4 */
        /* Check for "mobile" machine */
        if (model && (strncmp(model, "PowerBook", 9) == 0
                   || strncmp(model, "iBook", 5) == 0))
index 97c54e19c1b5501e2da2479e83f396a8b219baf6,29c2946f1c77e5f00dfb68fd686221d37b7f36f4..385aab90c4d264bfa3a4353d6144c8dbf86cafb7
@@@ -86,10 -86,11 +86,10 @@@ int ppc_override_l2cr = 0
  int ppc_override_l2cr_value;
  int has_l2cache = 0;
  
 -int pmac_newworld = 1;
 +int pmac_newworld;
  
  static int current_root_goodness = -1;
  
 -extern int pmac_newworld;
  extern struct machdep_calls pmac_md;
  
  #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
@@@ -307,10 -308,9 +307,10 @@@ static void __init pmac_setup_arch(void
        for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
                if (get_property(ic, "interrupt-controller", NULL))
                        break;
 -      pmac_newworld = (ic != NULL);
 -      if (ic)
 +      if (ic) {
 +              pmac_newworld = 1;
                of_node_put(ic);
 +      }
  
        /* Lookup PCI hosts */
        pmac_pci_init();
@@@ -621,10 -621,6 +621,6 @@@ static void __init pmac_init_early(void
        /* Probe motherboard chipset */
        pmac_feature_init();
  
-       /* We can NAP */
-       powersave_nap = 1;
-       printk(KERN_INFO "Using native/NAP idle loop\n");
        /* Initialize debug stuff */
        udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
        udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
This page took 0.042978 seconds and 5 git commands to generate.