Linux MIPS Architecture development
 help / color / mirror / Atom feed
* patch for 2.6.14-rc1 for sb1
@ 2005-09-23  0:24 Peter 'p2' De Schrijver
  0 siblings, 0 replies; only message in thread
From: Peter 'p2' De Schrijver @ 2005-09-23  0:24 UTC (permalink / raw)
  To: linux-mips


[-- Attachment #1.1: Type: text/plain, Size: 243 bytes --]

Hi,

Attached is a patch which makes 2.6.14-rc1 work on the sb1 core. It's
nothing more then a rehash of some patches posted here earlier to make
recent 2.6 kernels work on sb1.=20

Thanks,

Peter (p2).

-- 
goa is a state of mind

[-- Attachment #1.2: patch-sb1 --]
[-- Type: text/plain, Size: 2308 bytes --]

diff -urN -x asm -x scripts -x config linux/arch/mips/kernel/cpu-probe.c linux-my/arch/mips/kernel/cpu-probe.c
--- linux/arch/mips/kernel/cpu-probe.c	2005-08-16 19:50:43.000000000 +0200
+++ linux-my/arch/mips/kernel/cpu-probe.c	2005-09-22 13:09:29.000000000 +0200
@@ -612,6 +612,8 @@
 	switch (c->processor_id & 0xff00) {
 	case PRID_IMP_SB1:
 		c->cputype = CPU_SB1;
+		c->options &= ~MIPS_CPU_4KTLB;
+		c->options |= MIPS_CPU_TLB;
 #ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
 		/* FPU in pass1 is known to have issues. */
 		c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
diff -urN -x asm -x scripts -x config linux/arch/mips/mm/cache.c linux-my/arch/mips/mm/cache.c
--- linux/arch/mips/mm/cache.c	2005-07-06 14:08:14.000000000 +0200
+++ linux-my/arch/mips/mm/cache.c	2005-09-22 13:28:21.000000000 +0200
@@ -122,6 +122,8 @@
     defined(CONFIG_CPU_MIPS64_R1) || defined(CONFIG_CPU_TX49XX) || \
     defined(CONFIG_CPU_RM7000) || defined(CONFIG_CPU_RM9000)
 		ld_mmu_r4xx0();
+#else
+		panic("Unknown CPU with r4k TLB");
 #endif
 	} else switch (current_cpu_data.cputype) {
 #ifdef CONFIG_CPU_R3000
diff -urN -x asm -x scripts -x config linux/arch/mips/sibyte/sb1250/irq.c linux-my/arch/mips/sibyte/sb1250/irq.c
--- linux/arch/mips/sibyte/sb1250/irq.c	2005-07-11 12:03:30.000000000 +0200
+++ linux-my/arch/mips/sibyte/sb1250/irq.c	2005-09-22 13:26:21.000000000 +0200
@@ -53,7 +53,7 @@
 static unsigned int startup_sb1250_irq(unsigned int irq);
 static void ack_sb1250_irq(unsigned int irq);
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, unsigned long mask);
+static void sb1250_set_affinity(unsigned int irq, cpumask_t mask);
 #endif
 
 #ifdef CONFIG_SIBYTE_HAS_LDT
@@ -117,23 +117,16 @@
 }
 
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, unsigned long mask)
+static void sb1250_set_affinity(unsigned int irq, cpumask_t mask)
 {
 	int i = 0, old_cpu, cpu, int_on;
 	u64 cur_ints;
 	irq_desc_t *desc = irq_desc + irq;
 	unsigned long flags;
 
-	while (mask) {
-		if (mask & 1) {
-			mask >>= 1;
-			break;
-		}
-		mask >>= 1;
-		i++;
-	}
+	i = first_cpu(mask);
 
-	if (mask) {
+	if (cpus_weight(mask) > 1) {
 		printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
 		return;
 	}

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-23  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23  0:24 patch for 2.6.14-rc1 for sb1 Peter 'p2' De Schrijver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox