]> err.no Git - linux-2.6/blobdiff - arch/powerpc/kernel/time.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfi...
[linux-2.6] / arch / powerpc / kernel / time.c
index 46a24de36fec4bd93acd1fd09983380cf57e5abc..2c8564d54e4d009a67527463d1aa2a8c7f3f9d6f 100644 (file)
@@ -631,7 +631,8 @@ void timer_interrupt(struct pt_regs * regs)
        calculate_steal_time();
 
 #ifdef CONFIG_PPC_ISERIES
-       get_lppaca()->int_dword.fields.decr_int = 0;
+       if (firmware_has_feature(FW_FEATURE_ISERIES))
+               get_lppaca()->int_dword.fields.decr_int = 0;
 #endif
 
        while ((ticks = tb_ticks_since(per_cpu(last_jiffy, cpu)))
@@ -674,7 +675,7 @@ void timer_interrupt(struct pt_regs * regs)
        set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
-       if (hvlpevent_is_pending())
+       if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
                process_hvlpevents();
 #endif
 
@@ -710,30 +711,15 @@ 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;
        u64 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_possible_cpu(i) {
                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;
-               }
+               per_cpu(last_jiffy, i) = previous_tb;
        }
 }
 #endif
@@ -774,7 +760,7 @@ int do_settimeofday(struct timespec *tv)
         * settimeofday to perform this operation.
         */
 #ifdef CONFIG_PPC_ISERIES
-       if (first_settimeofday) {
+       if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
                iSeries_tb_recal();
                first_settimeofday = 0;
        }
@@ -833,7 +819,7 @@ static int __init get_freq(char *name, int cells, unsigned long *val)
        cpu = of_find_node_by_type(NULL, "cpu");
 
        if (cpu) {
-               fp = get_property(cpu, name, NULL);
+               fp = of_get_property(cpu, name, NULL);
                if (fp) {
                        found = 1;
                        *val = of_read_ulong(fp, cells);