Sfoglia il codice sorgente

parisc: Fix automatic selection of cr16 clocksource

Commit 54b66800907 (parisc: Add native high-resolution sched_clock()
implementation) added support to use the CPU-internal cr16 counters as reliable
clocksource with the help of HAVE_UNSTABLE_SCHED_CLOCK.

Sadly the commit missed to remove the hack which prevented cr16 to become the
default clocksource even on SMP systems.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 4.7+
Helge Deller 9 anni fa
parent
commit
ae141830b1
2 ha cambiato i file con 0 aggiunte e 20 eliminazioni
  1. 0 8
      arch/parisc/kernel/processor.c
  2. 0 12
      arch/parisc/kernel/time.c

+ 0 - 8
arch/parisc/kernel/processor.c

@@ -51,8 +51,6 @@ EXPORT_SYMBOL(_parisc_requires_coherency);
 
 
 DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
 DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
 
 
-extern int update_cr16_clocksource(void);	/* from time.c */
-
 /*
 /*
 **  	PARISC CPU driver - claim "device" and initialize CPU data structures.
 **  	PARISC CPU driver - claim "device" and initialize CPU data structures.
 **
 **
@@ -228,12 +226,6 @@ static int processor_probe(struct parisc_device *dev)
 	}
 	}
 #endif
 #endif
 
 
-	/* If we've registered more than one cpu,
-	 * we'll use the jiffies clocksource since cr16
-	 * is not synchronized between CPUs.
-	 */
-	update_cr16_clocksource();
-
 	return 0;
 	return 0;
 }
 }
 
 

+ 0 - 12
arch/parisc/kernel/time.c

@@ -221,18 +221,6 @@ static struct clocksource clocksource_cr16 = {
 	.flags			= CLOCK_SOURCE_IS_CONTINUOUS,
 	.flags			= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 };
 
 
-int update_cr16_clocksource(void)
-{
-	/* since the cr16 cycle counters are not synchronized across CPUs,
-	   we'll check if we should switch to a safe clocksource: */
-	if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) {
-		clocksource_change_rating(&clocksource_cr16, 0);
-		return 1;
-	}
-
-	return 0;
-}
-
 void __init start_cpu_itimer(void)
 void __init start_cpu_itimer(void)
 {
 {
 	unsigned int cpu = smp_processor_id();
 	unsigned int cpu = smp_processor_id();