[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I've yet to get a 2.4 kernel to work on my DS20



On Thu, 12 Jul 2001, Edgar Denny wrote:

> Thankyou very much.

Here you go...it's against 2.4.5, but it should easily apply to any 2.4
kernel...

Index: arch/alpha/kernel/smp.c
===================================================================
RCS file: /home/CVSROOT/linux-24/arch/alpha/kernel/smp.c,v
retrieving revision 1.1.1.3
diff -u -b -r1.1.1.3 smp.c
--- arch/alpha/kernel/smp.c	1 Jun 2001 17:40:18 -0000	1.1.1.3
+++ arch/alpha/kernel/smp.c	28 Jun 2001 14:47:53 -0000
@@ -72,7 +72,6 @@
 int smp_num_probed;		/* Internal processor count */
 int smp_num_cpus = 1;		/* Number that came online.  */
 int smp_threads_ready;		/* True once the per process idle is forked. */
-cycles_t cacheflush_time;
 
 int __cpu_number_map[NR_CPUS];
 int __cpu_logical_map[NR_CPUS];
@@ -205,62 +204,6 @@
 
 
 /*
- * Rough estimation for SMP scheduling, this is the number of cycles it
- * takes for a fully memory-limited process to flush the SMP-local cache.
- *
- * We are not told how much cache there is, so we have to guess.
- */
-static void __init
-smp_tune_scheduling (void)
-{
-	struct percpu_struct *cpu;
-	unsigned long on_chip_cache;
-	unsigned long freq;
-
-	cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
-	switch (cpu->type)
-	{
-	case EV45_CPU:
-		on_chip_cache = 16 + 16;
-		break;
-
-	case EV5_CPU:
-	case EV56_CPU:
-		on_chip_cache = 8 + 8 + 96;
-		break;
-
-	case PCA56_CPU:
-		on_chip_cache = 16 + 8;
-		break;
-
-	case EV6_CPU:
-	case EV67_CPU:
-		on_chip_cache = 64 + 64;
-		break;
-
-	default:
-		on_chip_cache = 8 + 8;
-		break;
-	}
-
-	freq = hwrpb->cycle_freq ? : est_cycle_freq;
-
-#if 0
-	/* Magic estimation stolen from x86 port.  */
-	cacheflush_time = freq / 1024L * on_chip_cache / 5000L;
-
-        printk("Using heuristic of %d cycles.\n",
-               cacheflush_time);
-#else
-	/* Magic value to force potential preemption of other CPUs.  */
-	cacheflush_time = INT_MAX;
-
-        printk("Using heuristic of %d cycles.\n",
-               cacheflush_time);
-#endif
-}
-
-/*
  * Send a message to a secondary's console.  "START" is one such
  * interesting message.  ;-)
  */
@@ -599,7 +542,6 @@
 	current->processor = boot_cpuid;
 
 	smp_store_cpu_info(boot_cpuid);
-	smp_tune_scheduling();
 	smp_setup_percpu_timer(boot_cpuid);
 
 	init_idle();



Reply to: