From 7c96bf6f2666d769016cf5207f60f192c2840361 Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Sun, 9 Jul 2006 13:19:44 +0000 Subject: [PATCH] * [mips,mipsel] Fix sb1 interrupt handlers. * [mips,mipsel] Fix devfs-induced build failure in sb1250 serial driver. * [mips] SGI ip22 RTC was broken, fixed thanks to Julien Blache. svn path=/dists/trunk/linux-2.6/; revision=6974 --- debian/changelog | 5 ++ .../mips-bcm1480-inthandler-typo.patch | 18 +++++ debian/patches/mips-ip22-rtcfix.patch | 16 +++++ debian/patches/mips-sb1-inthandler.patch | 72 +++++++++++++++++++ debian/patches/mips-sb1250-duart.patch | 14 ++++ debian/patches/series/3 | 4 ++ 6 files changed, 129 insertions(+) create mode 100644 debian/patches/mips-bcm1480-inthandler-typo.patch create mode 100644 debian/patches/mips-ip22-rtcfix.patch create mode 100644 debian/patches/mips-sb1-inthandler.patch create mode 100644 debian/patches/mips-sb1250-duart.patch diff --git a/debian/changelog b/debian/changelog index ef2956e88..c2142929f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -50,6 +50,11 @@ linux-2.6 (2.6.17-3) UNRELEASED; urgency=low flavours if upstream resolved the issue - but that never happened. Note that this is a measurable performance penalty on non-SMP systems. + [ Thiemo Seufer ] + * [mips,mipsel] Fix sb1 interrupt handlers. + * [mips,mipsel] Fix devfs-induced build failure in sb1250 serial driver. + * [mips] SGI ip22 RTC was broken, fixed thanks to Julien Blache. + -- dann frazier Sat, 8 Jul 2006 21:31:04 -0600 linux-2.6 (2.6.17-2) unstable; urgency=low diff --git a/debian/patches/mips-bcm1480-inthandler-typo.patch b/debian/patches/mips-bcm1480-inthandler-typo.patch new file mode 100644 index 000000000..ed3ba01f6 --- /dev/null +++ b/debian/patches/mips-bcm1480-inthandler-typo.patch @@ -0,0 +1,18 @@ +This fixes a fatal typo which crept in the rewritten interrupt handler. + +Signed-off-by: Thiemo Seufer + +--- a/arch/mips/sibyte/bcm1480/irq.c ++++ b/arch/mips/sibyte/bcm1480/irq.c +@@ -533,7 +533,7 @@ #endif + mask_l = __raw_readq( + IOADDR(base + R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L)); + +- if (!mask_h) { ++ if (mask_h) { + if (mask_h ^ 1) + do_IRQ(63 - dclz(mask_h), regs); + else + + + diff --git a/debian/patches/mips-ip22-rtcfix.patch b/debian/patches/mips-ip22-rtcfix.patch new file mode 100644 index 000000000..c0a3ed3a9 --- /dev/null +++ b/debian/patches/mips-ip22-rtcfix.patch @@ -0,0 +1,16 @@ +This patch fixes a typo in arch/mips/sgi-ip22/ip22-time.c, leading to +the incorrect year being set into the RTC chip. + +Signed-off-by: Julien BLACHE + +--- a/arch/mips/sgi-ip22/ip22-time.c 2006-07-08 22:17:02.000000000 +0000 ++++ b/arch/mips/sgi-ip22/ip22-time.c 2006-07-08 22:17:29.000000000 +0000 +@@ -76,7 +76,7 @@ + save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff; + hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE; + +- hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec); ++ hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year); + hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon); + hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday); + hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour); diff --git a/debian/patches/mips-sb1-inthandler.patch b/debian/patches/mips-sb1-inthandler.patch new file mode 100644 index 000000000..b3761120e --- /dev/null +++ b/debian/patches/mips-sb1-inthandler.patch @@ -0,0 +1,72 @@ +This patch restores the behaviour of the old (assembly-written) +interrupt handler, the handler is left as soon as a single interrupt +cause is handled. + +Signed-off-by: Thiemo Seufer + +diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c +index 0eb0b10..ed325f0 100644 +--- a/arch/mips/sibyte/bcm1480/irq.c ++++ b/arch/mips/sibyte/bcm1480/irq.c +@@ -502,22 +502,23 @@ #endif + #ifdef CONFIG_SIBYTE_BCM1480_PROF + if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ + sbprof_cpu_intr(exception_epc(regs)); ++ else + #endif + + if (pending & CAUSEF_IP4) + bcm1480_timer_interrupt(regs); + + #ifdef CONFIG_SMP +- if (pending & CAUSEF_IP3) ++ else if (pending & CAUSEF_IP3) + bcm1480_mailbox_interrupt(regs); + #endif + + #ifdef CONFIG_KGDB +- if (pending & CAUSEF_IP6) ++ else if (pending & CAUSEF_IP6) + bcm1480_kgdb_interrupt(regs); /* KGDB (uart 1) */ + #endif + +- if (pending & CAUSEF_IP2) { ++ else if (pending & CAUSEF_IP2) { + unsigned long long mask_h, mask_l; + unsigned long base; + +diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c +index 8d49cb5..1de71ad 100644 +--- a/arch/mips/sibyte/sb1250/irq.c ++++ b/arch/mips/sibyte/sb1250/irq.c +@@ -460,25 +460,25 @@ #endif + pending = read_c0_cause(); + + #ifdef CONFIG_SIBYTE_SB1250_PROF +- if (pending & CAUSEF_IP7) { /* Cpu performance counter interrupt */ ++ if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ + sbprof_cpu_intr(exception_epc(regs)); +- } ++ else + #endif + + if (pending & CAUSEF_IP4) + sb1250_timer_interrupt(regs); + + #ifdef CONFIG_SMP +- if (pending & CAUSEF_IP3) ++ else if (pending & CAUSEF_IP3) + sb1250_mailbox_interrupt(regs); + #endif + + #ifdef CONFIG_KGDB +- if (pending & CAUSEF_IP6) /* KGDB (uart 1) */ ++ else if (pending & CAUSEF_IP6) /* KGDB (uart 1) */ + sb1250_kgdb_interrupt(regs); + #endif + +- if (pending & CAUSEF_IP2) { ++ else if (pending & CAUSEF_IP2) { + unsigned long long mask; + + /* diff --git a/debian/patches/mips-sb1250-duart.patch b/debian/patches/mips-sb1250-duart.patch new file mode 100644 index 000000000..6a9f2baba --- /dev/null +++ b/debian/patches/mips-sb1250-duart.patch @@ -0,0 +1,14 @@ +This fixes a build failure caused by the devfs removal. + +Signed-off-by: Thiemo Seufer + +--- a/drivers/char/sb1250_duart.c ++++ b/drivers/char/sb1250_duart.c +@@ -763,7 +763,6 @@ static int __init sb1250_duart_init(void + + sb1250_duart_driver->owner = THIS_MODULE; + sb1250_duart_driver->name = "ttyS"; +- sb1250_duart_driver->devfs_name = "tts/"; + sb1250_duart_driver->major = TTY_MAJOR; + sb1250_duart_driver->minor_start = SB1250_DUART_MINOR_BASE; + sb1250_duart_driver->type = TTY_DRIVER_TYPE_SERIAL; diff --git a/debian/patches/series/3 b/debian/patches/series/3 index 1b7d8a1a4..fb03f5dfd 100644 --- a/debian/patches/series/3 +++ b/debian/patches/series/3 @@ -3,3 +3,7 @@ + 2.6.17.3 + fs-asfs.patch + 2.6.17.4 ++ mips-ip22-rtcfix.patch ++ mips-sb1-inthandler.patch ++ mips-bcm1480-inthandler-typo.patch ++ mips-sb1250-duart.patch