r1416 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches

Joshua Kwan joshk@haydn.debian.org
Sat, 28 Aug 2004 20:47:35 -0600


Author: joshk
Date: 2004-08-27 23:12:56 -0600 (Fri, 27 Aug 2004)
New Revision: 1416

Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc64-sunsab-fix.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/rules
Log:
more stuff i forgot to commit from this end


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-28 05:11:52 UTC (rev 1415)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-28 05:12:56 UTC (rev 1416)
@@ -5,20 +5,21 @@
       bug causing every other character in kernel messages to be omitted.
     - sparc64-syslog-register.dpatch: Fix a critical typo that
       caused the 32-bit syslog wrapper to halt the entire system.
-    (Joshua Kwan)
 
   * sparc32: Export enough ksyms for our modules to work. (Joshua Kwan)
 
   * Drop patch modular-xfrm4_tunnel, which caused far more trouble than it
-    was worth. (Joshua Kwan)
+    was worth.
 
   * Switch to the 2.4.x patch-series system. Drop build-dependency on dpatch.
-    (Joshua Kwan)
 
-  * Add myself to Uploaders. (Joshua Kwan)
-  
- -- Sven Luther <luther@debian.org>  Sat, 28 Aug 2004 00:01:15 +0200
+  * Add myself to Uploaders.
 
+  * Build kernel-tree package before kernel-doc, because it takes a _long_
+    time.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Fri, 27 Aug 2004 16:36:39 -0700
+
 kernel-source-2.6.8 (2.6.8-4) unstable; urgency=high
 
   * Added patch by Alex Clausen to stop spurious mouse button events

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc64-sunsab-fix.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc64-sunsab-fix.dpatch	2004-08-28 05:11:52 UTC (rev 1415)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc64-sunsab-fix.dpatch	2004-08-28 05:12:56 UTC (rev 1416)
@@ -1,31 +1,21 @@
-#!/bin/sh -e
-# DP: sunsab serial fixes from David Miller.
-
-. $(dirname $0)/DPATCH
-
-Return-Path: <davem@redhat.com>
+Return-Path: <davem@davemloft.net>
 X-Original-To: joshk@triplehelix.org
 Delivered-To: joshk@triplehelix.org
-Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31])
-	by triplehelix.org (Postfix) with ESMTP id 0500F2A9542
-	for <joshk@triplehelix.org>; Thu, 26 Aug 2004 18:11:06 -0700 (PDT)
-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
-	by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7R1B5S0003909;
-	Thu, 26 Aug 2004 21:11:05 -0400
-Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1])
-	by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7R1B5316504;
-	Thu, 26 Aug 2004 21:11:05 -0400
-Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1])
-	by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i7R1B0WQ028230;
-	Thu, 26 Aug 2004 21:11:00 -0400
-Date: Thu, 26 Aug 2004 18:10:59 -0700
-From: "David S. Miller" <davem@redhat.com>
+Received: from cheetah.davemloft.net (adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105])
+	by triplehelix.org (Postfix) with ESMTP id CF8EC2A9542
+	for <joshk@triplehelix.org>; Fri, 27 Aug 2004 17:04:29 -0700 (PDT)
+Received: from localhost
+	([127.0.0.1] helo=cheetah.davemloft.net ident=davem)
+	by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian))
+	id 1C0qhm-0000eg-00; Fri, 27 Aug 2004 17:04:26 -0700
+Date: Fri, 27 Aug 2004 17:04:26 -0700
+From: "David S. Miller" <davem@davemloft.net>
 To: Joshua Kwan <joshk@triplehelix.org>
 Cc: rmitchell@eds.com, sparclinux@vger.kernel.org,
-	debian-sparc@debian.org
+	debian-sparc@lists.debian.org
 Subject: Re: [PATCH] SunSAB console problems in 2.6.x
-Message-Id: <20040826181059.140d7f3f.davem@redhat.com>
-In-Reply-To: <412E8395.7040709@triplehelix.org>
+Message-Id: <20040827170426.34525fc6.davem@davemloft.net>
+In-Reply-To: <412FCB3D.3040600@triplehelix.org>
 References: <20040825233247.237c1fb1.davem@redhat.com>
 	<412D9FFE.9060206@eds.com>
 	<20040826132310.GH2333@phunnypharm.org>
@@ -33,35 +23,234 @@
 	<20040826170136.GB10029@phunnypharm.org>
 	<20040826131946.35ae3d97.davem@redhat.com>
 	<412E8395.7040709@triplehelix.org>
+	<20040826181059.140d7f3f.davem@redhat.com>
+	<412ECE75.6010000@triplehelix.org>
+	<20040827162449.1b25a6e5.davem@redhat.com>
+	<412FCB3D.3040600@triplehelix.org>
 X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu)
 X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP
 Mime-Version: 1.0
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 X-CRM114-Version: 20040816.BlameClockworkOrange-auto.3 (regex: TRE 0.6.8) MF-A10FFB4C 
-X-CRM114-Status: Good  ( pR: 106.6244 )
+X-CRM114-Status: Good  ( pR: 163.1370 )
 
-On Thu, 26 Aug 2004 17:43:01 -0700
+On Fri, 27 Aug 2004 17:01:01 -0700
 Joshua Kwan <joshk@triplehelix.org> wrote:
 
-> David S. Miller wrote:
-> > 2) Once userland starts up, the userland messages print out fine
-> >    but are kernel messages still garbled?
+> > -	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o
+> > +	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o delay.o
+> >  
+> >  lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
+> >  lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
 > 
-> Right now I can say yes to this.
+> You forgot delay.c.
 
-Hmmm, does this fix things?
+Sorry, I'm a retard.
 
-===== drivers/serial/sunsab.c 1.35 vs edited =====
---- 1.35/drivers/serial/sunsab.c	2004-08-26 15:38:22 -07:00
-+++ edited/drivers/serial/sunsab.c	2004-08-26 17:54:26 -07:00
-@@ -83,7 +83,7 @@
+This patch should be better.
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/27 16:12:23-07:00 davem@nuts.davemloft.net 
+#   [SPARC64]: Fix delay with HZ==1000.
+#   
+#   When I moved sparc64 over to HZ==1000 this added some
+#   problems to the udelay() handling.  Specifically, with
+#   slower cpus we could now get underflows to zero for
+#   things like udelay(1) due to the order of multiplies
+#   and shifts.
+#   
+#   Fix this, and move it out to arch/sparc64/lib/delay.c
+#   so it is easier to tinker with this in the future and
+#   also to optimize away one of the multiplies for the
+#   constant delay case just like other platforms do.
+#   
+#   Signed-off-by: David S. Miller <davem@davemloft.net>
+# 
+# include/asm-sparc64/delay.h
+#   2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +21 -46
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/Makefile
+#   2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +1 -1
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/kernel/sparc64_ksyms.c
+#   2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +6 -0
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/delay.c
+#   2004/08/27 16:10:01-07:00 davem@nuts.davemloft.net +49 -0
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/delay.c
+#   2004/08/27 16:10:01-07:00 davem@nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/delay.c
+# 
+diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
+--- a/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-27 16:48:00 -07:00
++++ b/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-27 16:48:00 -07:00
+@@ -372,6 +372,12 @@
+ EXPORT_SYMBOL_NOVERS(memmove);
+ EXPORT_SYMBOL_NOVERS(strncmp);
  
- static __inline__ void sunsab_tec_wait(struct uart_sunsab_port *up)
- {
--	int timeout = up->tec_timeout;
-+	int timeout = SAB82532_MAX_TEC_TIMEOUT /*up->tec_timeout*/;
++/* Delay routines. */
++EXPORT_SYMBOL(__udelay);
++EXPORT_SYMBOL(__ndelay);
++EXPORT_SYMBOL(__const_udelay);
++EXPORT_SYMBOL(__delay);
++
+ void VISenter(void);
+ /* RAID code needs this */
+ EXPORT_SYMBOL_NOVERS(VISenter);
+diff -Nru a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile
+--- a/arch/sparc64/lib/Makefile	2004-08-27 16:48:00 -07:00
++++ b/arch/sparc64/lib/Makefile	2004-08-27 16:48:00 -07:00
+@@ -12,7 +12,7 @@
+ 	 U1memcpy.o U1copy_from_user.o U1copy_to_user.o \
+ 	 U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o \
+ 	 copy_in_user.o user_fixup.o memmove.o \
+-	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o
++	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o delay.o
  
- 	while ((readb(&up->regs->r.star) & SAB82532_STAR_TEC) && --timeout)
- 		udelay(1);
+ lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
+ lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+diff -Nru a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/delay.c	2004-08-27 16:48:00 -07:00
+@@ -0,0 +1,49 @@
++/* delay.c: Delay loops for sparc64
++ *
++ * Copyright (C) 2004 David S. Miller <davem@redhat.com>
++ *
++ * Based heavily upon x86 variant which is:
++ *	Copyright (C) 1993 Linus Torvalds
++ *	Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
++ */
++
++#include <linux/delay.h>
++
++void __delay(unsigned long loops)
++{
++	__asm__ __volatile__(
++"	b,pt	%%xcc, 1f\n"
++"	 cmp	%0, 0\n"
++"	.align	32\n"
++"1:\n"
++"	bne,pt	%%xcc, 1b\n"
++"	 subcc	%0, 1, %0\n"
++	: "=&r" (loops)
++	: "0" (loops)
++	: "cc");
++}
++
++/* We used to multiply by HZ after shifting down by 32 bits
++ * but that runs into problems for higher values of HZ and
++ * slow cpus.
++ */
++void __const_udelay(unsigned long n)
++{
++	n *= 4;
++
++	n *= (cpu_data(smp_processor_id()).udelay_val * (HZ/4));
++	n >>= 32;
++
++	__delay(n + 1);
++}
++
++void __udelay(unsigned long n)
++{
++	__const_udelay(n * 0x10c7UL);
++}
++
++
++void __ndelay(unsigned long n)
++{
++	__const_udelay(n * 0x5UL);
++}
+diff -Nru a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h
+--- a/include/asm-sparc64/delay.h	2004-08-27 16:48:00 -07:00
++++ b/include/asm-sparc64/delay.h	2004-08-27 16:48:00 -07:00
+@@ -1,7 +1,11 @@
+-/* $Id: delay.h,v 1.13 2002/02/02 03:33:48 kanoj Exp $
+- * delay.h: Linux delay routines on the V9.
++/* delay.h: Linux delay routines on sparc64.
+  *
+- * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu).
++ * Copyright (C) 1996, 2004 David S. Miller (davem@davemloft.net).
++ *
++ * Based heavily upon x86 variant which is:
++ * Copyright (C) 1993 Linus Torvalds
++ *
++ * Delay routines calling functions in arch/sparc64/lib/delay.c
+  */
+ 
+ #ifndef __SPARC64_DELAY_H
+@@ -13,50 +17,21 @@
+ 
+ #ifndef __ASSEMBLY__
+ 
+-static __inline__ void __delay(unsigned long loops)
+-{
+-	__asm__ __volatile__(
+-"	b,pt	%%xcc, 1f\n"
+-"	 cmp	%0, 0\n"
+-"	.align	32\n"
+-"1:\n"
+-"	bne,pt	%%xcc, 1b\n"
+-"	 subcc	%0, 1, %0\n"
+-	: "=&r" (loops)
+-	: "0" (loops)
+-	: "cc");
+-}
+-
+-static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
+-{
+-	usecs *= 0x00000000000010c6UL;		/* 2**32 / 1000000 */
+-
+-	__asm__ __volatile__(
+-"	mulx	%1, %2, %0\n"
+-"	srlx	%0, 32, %0\n"
+-	: "=r" (usecs)
+-	: "r" (usecs), "r" (lps));
+-
+-	__delay(usecs * HZ);
+-}
+-
+-extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps)
+-{
+-	usecs *= 0x0000000000000005UL;		/* 2**32 / 10000 */
+-
+-	__asm__ __volatile__(
+-"	mulx	%1, %2, %0\n"
+-"	srlx	%0, 32, %0\n"
+-	: "=r" (usecs)
+-	: "r" (usecs), "r" (lps));
+-
+-	__delay(usecs * HZ);
+-}
+-
+-#define __udelay_val cpu_data(smp_processor_id()).udelay_val
++extern void __bad_udelay(void);
++extern void __bad_ndelay(void);
+ 
+-#define udelay(usecs) __udelay((usecs),__udelay_val)
+-#define ndelay(usecs) __ndelay((usecs),__udelay_val)
++extern void __udelay(unsigned long usecs);
++extern void __ndelay(unsigned long nsecs);
++extern void __const_udelay(unsigned long usecs);
++extern void __delay(unsigned long loops);
++
++#define udelay(n) (__builtin_constant_p(n) ? \
++	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
++	__udelay(n))
++	
++#define ndelay(n) (__builtin_constant_p(n) ? \
++	((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
++	__ndelay(n))
+ 
+ #endif /* !__ASSEMBLY__ */
+ 
 

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/rules
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/rules	2004-08-28 05:11:52 UTC (rev 1415)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/rules	2004-08-28 05:12:56 UTC (rev 1416)
@@ -78,16 +78,18 @@
 # Patch kernel with the Debian patch!
 	home=$(patch_home)/debian sh $(patch_home)/apply/debian
 	make-kpkg kernel-source
-	make-kpkg kernel-doc
-# Clean up after yourself
-	home=$(patch_home)/debian sh $(patch_home)/apply/debian $(upstream)
 
+# kernel-doc takes a LONG time, so build kernel-tree first for immediate use
 	dh_installdocs -pkernel-tree-$(upstream)
 	dh_installchangelogs -pkernel-tree-$(upstream)
 	dh_compress -pkernel-tree-$(upstream)
 	dh_installdeb -pkernel-tree-$(upstream)
 	dh_gencontrol -pkernel-tree-$(upstream)
 	dh_builddeb -pkernel-tree-$(upstream)
+	
+	make-kpkg kernel-doc
+# Clean up after yourself
+	home=$(patch_home)/debian sh $(patch_home)/apply/debian $(upstream)	
 
 # Build architecture-dependent files here.
 binary-arch: