From: Richard Henderson <rth@twiddle.net>


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/alpha/kernel/smp.c     |   43 ------------------------------------
 25-akpm/arch/alpha/kernel/srmcons.c |   27 ++++++++--------------
 2 files changed, 10 insertions(+), 60 deletions(-)

diff -puN arch/alpha/kernel/smp.c~alpha-elimitate-two-warnings-from-gcc4 arch/alpha/kernel/smp.c
--- 25/arch/alpha/kernel/smp.c~alpha-elimitate-two-warnings-from-gcc4	2005-03-20 20:31:39.000000000 -0800
+++ 25-akpm/arch/alpha/kernel/smp.c	2005-03-20 20:31:39.000000000 -0800
@@ -175,48 +175,6 @@ smp_callin(void)
 	cpu_idle();
 }
 
-
-/*
- * 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 (int cpuid)
-{
-	struct percpu_struct *cpu;
-	unsigned long on_chip_cache;	/* kB */
-	unsigned long freq;		/* Hz */
-	unsigned long bandwidth = 350;	/* MB/s */
-
-	cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset
-				      + cpuid * hwrpb->processor_size);
-	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:
-	default:
-		on_chip_cache = 64 + 64;
-		break;
-	}
-
-	freq = hwrpb->cycle_freq ? : est_cycle_freq;
-}
-
 /* Wait until hwrpb->txrdy is clear for cpu.  Return -1 on timeout.  */
 static int __init
 wait_for_txrdy (unsigned long cpumask)
@@ -517,7 +475,6 @@ smp_prepare_cpus(unsigned int max_cpus)
 	current_thread_info()->cpu = boot_cpuid;
 
 	smp_store_cpu_info(boot_cpuid);
-	smp_tune_scheduling(boot_cpuid);
 	smp_setup_percpu_timer(boot_cpuid);
 
 	/* Nothing to do on a UP box, or when told not to.  */
diff -puN arch/alpha/kernel/srmcons.c~alpha-elimitate-two-warnings-from-gcc4 arch/alpha/kernel/srmcons.c
--- 25/arch/alpha/kernel/srmcons.c~alpha-elimitate-two-warnings-from-gcc4	2005-03-20 20:31:39.000000000 -0800
+++ 25-akpm/arch/alpha/kernel/srmcons.c	2005-03-20 20:31:39.000000000 -0800
@@ -164,29 +164,22 @@ srmcons_get_private_struct(struct srmcon
 	unsigned long flags;
 	int retval = 0;
 
-	spin_lock_irqsave(&srmconsp_lock, flags);
-
-	do {
-		if (srmconsp != NULL) {
-			*ps = srmconsp;
-			break;
-		}
+	if (srmconsp == NULL) {
+		spin_lock_irqsave(&srmconsp_lock, flags);
 
 		srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
-		if (srmconsp == NULL) {
+		if (srmconsp == NULL)
 			retval = -ENOMEM;
-			break;
+		else {
+			srmconsp->tty = NULL;
+			spin_lock_init(&srmconsp->lock);
+			init_timer(&srmconsp->timer);
 		}
 
-		srmconsp->tty = NULL;
-		spin_lock_init(&srmconsp->lock);
-		init_timer(&srmconsp->timer);
-
-		*ps = srmconsp;
-	} while(0);
-
-	spin_unlock_irqrestore(&srmconsp_lock, flags);
+		spin_unlock_irqrestore(&srmconsp_lock, flags);
+	}
 
+	*ps = srmconsp;
 	return retval;
 }
 
_