r3884 - / sarge sarge/kernel sarge/kernel/alpha sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8 sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8 sarge/kernel/amd64 sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8 sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8 sarge/kernel/hppa sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8 sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8 sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8 sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8 sarge/kernel/i386 sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8 sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8 sarge/kernel/ia64 sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8 sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8 sarge/kernel/m68k sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8 sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/kernel-image-2.6.8-m68k-2.6.8 sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8 sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/kernel-patch-2.6.8-m68k-2.6.8 sarge/kernel/powerpc sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8 sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8 sarge/kernel/s390 sarge/kernel/s390/kernel-image-2.6.8-s390 sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390 sarge/kernel/source sarge/kernel/source/kernel-source-2.6.8-2.6.8 sarge/kernel/source/kernel-source-2.6.8-2.6.8/kernel-source-2.6.8-2.6.8 sarge/kernel/sparc sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8 sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8 sarge/kernel-2.4 trunk/kernel/alpha trunk/kernel/amd64 trunk/kernel/hppa trunk/kernel/i386 trunk/kernel/ia64 trunk/kernel/m68k trunk/kernel/powerpc trunk/kernel/s390 trunk/kernel/source trunk/kernel/sparc trunk/kernel-2.4/powerpc/branch

Simon Horman horms at costa.debian.org
Mon Aug 15 10:21:57 UTC 2005


Author: horms
Date: 2005-08-15 10:21:55 +0000 (Mon, 15 Aug 2005)
New Revision: 3884

Added:
   sarge/
   sarge/kernel-2.4/
   sarge/kernel-2.4/alpha/
   sarge/kernel-2.4/hppa/
   sarge/kernel-2.4/i386/
   sarge/kernel-2.4/ia64/
   sarge/kernel-2.4/mips/
   sarge/kernel-2.4/powerpc/
   sarge/kernel-2.4/source/
   sarge/kernel-2.4/sparc/
   sarge/kernel/
   sarge/kernel/alpha/
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/
   sarge/kernel/amd64/
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/
   sarge/kernel/hppa/
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/
   sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/
   sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8/
   sarge/kernel/i386/
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/
   sarge/kernel/ia64/
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/
   sarge/kernel/m68k/
   sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/
   sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/kernel-image-2.6.8-m68k-2.6.8/
   sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/
   sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/kernel-patch-2.6.8-m68k-2.6.8/
   sarge/kernel/powerpc/
   sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/
   sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/
   sarge/kernel/s390/
   sarge/kernel/s390/kernel-image-2.6.8-s390/
   sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/
   sarge/kernel/source/
   sarge/kernel/source/kernel-source-2.6.8-2.6.8/
   sarge/kernel/source/kernel-source-2.6.8-2.6.8/kernel-source-2.6.8-2.6.8/
   sarge/kernel/sparc/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/
Removed:
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/bin/
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/config/
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/debian/
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/header-install
   sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/post-install
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/bin/
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/config/
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/debian/
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/header-install
   sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/post-install
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/bin/
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/config/
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/debian/
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/header-install
   sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/post-install
   sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8/debian/
   sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8/hppa_2.6.8.diff
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/bin/
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/config/
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/debian/
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/header-install
   sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/post-install
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/bin/
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/config/
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/debian/
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/header-install
   sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/post-install
   sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/kernel-image-2.6.8-m68k-2.6.8/debian/
   sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/kernel-patch-2.6.8-m68k-2.6.8/debian/
   sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/kernel-patch-2.6.8-m68k-2.6.8/m68k/
   sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/config/
   sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/debian/
   sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/header-install
   sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/config/
   sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/debian/
   sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/diffs/
   sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/post-install
   sarge/kernel/source/kernel-source-2.6.8-2.6.8/kernel-source-2.6.8-2.6.8/debian/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/bin/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/config/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/debian/
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/header-install
   sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/post-install
   trunk/kernel-2.4/powerpc/branch/old/
   trunk/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/
   trunk/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/
   trunk/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/
   trunk/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/
   trunk/kernel/i386/kernel-image-2.6.8-i386-2.6.8/
   trunk/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/
   trunk/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/
   trunk/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/
   trunk/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/
   trunk/kernel/s390/kernel-image-2.6.8-s390/
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/
Log:
Move 2.6.8 and 2.4.27 into sarge branch

Copied: sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8 (from rev 3882, trunk/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8)

Copied: sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8 (from rev 3882, trunk/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8)

Deleted: sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/header-install
===================================================================
--- trunk/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-cd $DEBIAN_SRCTOP
-{
-	find . -path './scripts/*' -prune -o \
-		-path './Documentation/*' -prune -o \
-		-path './debian/*' -prune -o \
-		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-	echo arch/$DEB_HOST_ARCH/kernel/asm-offsets.s
-} | cpio -pd --preserve-modification-time $OLDPWD
-cd - > /dev/null
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | $DEB_HOST_ARCH)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/post-install
===================================================================
--- trunk/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/alpha/kernel-image-2.6.8-alpha-2.6.8/kernel-image-2.6.8-alpha-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-
-suffix=${version#*$debnum-}
-prefix=${version%.*}
-
-
-prefix=$DEBIAN_UPSTREAM_VERSION$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory=$dir
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-$DEB_HOST_ARCH \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a \
-	! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-
-debhelper_post $pkg
-
-
-cd $IMAGE_TOP/lib/modules/$version
-mkdir boot initrd
-ln kernel/drivers/video/tgafb.ko initrd
-#ln kernel/security/capability.ko boot

Copied: sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8 (from rev 3882, trunk/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8)

Copied: sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8 (from rev 3882, trunk/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8)

Deleted: sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/header-install
===================================================================
--- trunk/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-cd $DEBIAN_SRCTOP
-{
-	find . -path './scripts/*' -prune -o \
-		-path './Documentation/*' -prune -o \
-		-path './debian/*' -prune -o \
-		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-	echo arch/x86_64/kernel/asm-offsets.s
-} | cpio -pd --preserve-modification-time $OLDPWD
-cd - > /dev/null
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | x86_64)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/post-install
===================================================================
--- trunk/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/amd64/kernel-image-2.6.8-amd64-2.6.8/kernel-image-2.6.8-amd64-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,68 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-
-suffix=${version#*$debnum-}
-prefix=$DEBIAN_UPSTREAM_VERSION$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory=$dir
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-x86_64 \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a \
-	! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-
-debhelper_post $pkg
-
-
-cd $IMAGE_TOP/lib/modules/$version
-mkdir boot initrd
-ln kernel/drivers/video/vesafb.ko initrd
-# ln kernel/security/capability.ko boot

Copied: sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8 (from rev 3882, trunk/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8)

Copied: sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8 (from rev 3882, trunk/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8)

Deleted: sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/header-install
===================================================================
--- trunk/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-cd $DEBIAN_SRCTOP
-{
-	find . -path './scripts/*' -prune -o \
-		-path './Documentation/*' -prune -o \
-		-path './debian/*' -prune -o \
-		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-	echo arch/$DEB_HOST_ARCH/kernel/asm-offsets.s
-} | cpio -pd --preserve-modification-time $OLDPWD
-cd - > /dev/null
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | parisc)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/post-install
===================================================================
--- trunk/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/hppa/kernel-image-2.6.8-hppa-2.6.8/kernel-image-2.6.8-hppa-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-prefix=$DEBIAN_UPSTREAM_VERSION$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory=$dir
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-$DEB_HOST_ARCH \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a \
-	! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-
-debhelper_post $pkg
-
-
-cd $IMAGE_TOP/lib/modules/$version
-mkdir boot initrd

Copied: sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8 (from rev 3882, trunk/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8)

Copied: sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8 (from rev 3882, trunk/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8)

Deleted: sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8/hppa_2.6.8.diff
===================================================================
--- trunk/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/hppa_2.6.8.diff	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/hppa/kernel-patch-2.6.8-hppa-2.6.8/kernel-patch-2.6.8-hppa-2.6.8/hppa_2.6.8.diff	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,12806 +0,0 @@
-Index: debian-kernel-hppa-2.6.8/arch/parisc/configs/a500_defconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/configs/a500_defconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/configs/a500_defconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -11,7 +11,6 @@
- #
- CONFIG_EXPERIMENTAL=y
- # CONFIG_CLEAN_COMPILE is not set
--# CONFIG_STANDALONE is not set
- CONFIG_BROKEN=y
- CONFIG_BROKEN_ON_SMP=y
- 
-@@ -31,6 +30,7 @@
- CONFIG_EMBEDDED=y
- CONFIG_KALLSYMS=y
- CONFIG_KALLSYMS_ALL=y
-+# CONFIG_KALLSYMS_EXTRA_PASS is not set
- CONFIG_FUTEX=y
- CONFIG_EPOLL=y
- CONFIG_IOSCHED_NOOP=y
-@@ -48,6 +48,7 @@
- CONFIG_OBSOLETE_MODPARM=y
- # CONFIG_MODVERSIONS is not set
- CONFIG_KMOD=y
-+CONFIG_STOP_MACHINE=y
- 
- #
- # Processor type and features
-@@ -61,9 +62,12 @@
- CONFIG_PREFETCH=y
- CONFIG_PARISC64=y
- CONFIG_64BIT=y
--# CONFIG_SMP is not set
-+CONFIG_SMP=y
-+CONFIG_HOTPLUG_CPU=y
-+# CONFIG_DISCONTIGMEM is not set
- # CONFIG_PREEMPT is not set
- CONFIG_COMPAT=y
-+CONFIG_NR_CPUS=4
- 
- #
- # Bus options (PCI, PCMCIA, EISA, GSC, ISA)
-@@ -86,6 +90,7 @@
- CONFIG_PCMCIA_DEBUG=y
- CONFIG_YENTA=m
- CONFIG_CARDBUS=y
-+# CONFIG_PD6729 is not set
- # CONFIG_I82092 is not set
- # CONFIG_TCIC is not set
- 
-@@ -107,6 +112,8 @@
- #
- # Generic Driver Options
- #
-+# CONFIG_STANDALONE is not set
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
- # CONFIG_FW_LOADER is not set
- CONFIG_DEBUG_DRIVER=y
- 
-@@ -135,7 +142,7 @@
- CONFIG_BLK_DEV_LOOP=y
- # CONFIG_BLK_DEV_CRYPTOLOOP is not set
- # CONFIG_BLK_DEV_NBD is not set
--# CONFIG_BLK_DEV_CARMEL is not set
-+# CONFIG_BLK_DEV_SX8 is not set
- CONFIG_BLK_DEV_RAM=y
- CONFIG_BLK_DEV_RAM_SIZE=6144
- CONFIG_BLK_DEV_INITRD=y
-@@ -165,7 +172,6 @@
- # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
- #
- CONFIG_SCSI_MULTI_LUN=y
--CONFIG_SCSI_REPORT_LUNS=y
- # CONFIG_SCSI_CONSTANTS is not set
- # CONFIG_SCSI_LOGGING is not set
- 
-@@ -179,6 +185,7 @@
- # SCSI low-level drivers
- #
- # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-+# CONFIG_SCSI_3W_9XXX is not set
- # CONFIG_SCSI_ACARD is not set
- # CONFIG_SCSI_AACRAID is not set
- # CONFIG_SCSI_AIC7XXX is not set
-@@ -353,6 +360,8 @@
- # CONFIG_IP_NF_COMPAT_IPFWADM is not set
- CONFIG_IP_NF_TARGET_NOTRACK=m
- CONFIG_IP_NF_RAW=m
-+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-+# CONFIG_IP_NF_MATCH_REALM is not set
- CONFIG_XFRM=y
- CONFIG_XFRM_USER=m
- 
-@@ -379,6 +388,7 @@
- # QoS and/or fair queueing
- #
- # CONFIG_NET_SCHED is not set
-+# CONFIG_NET_CLS_ROUTE is not set
- 
- #
- # Network testing
-@@ -452,6 +462,7 @@
- # CONFIG_SUNDANCE is not set
- CONFIG_VIA_RHINE=m
- CONFIG_VIA_RHINE_MMIO=y
-+# CONFIG_VIA_VELOCITY is not set
- 
- #
- # Ethernet (1000 Mbit)
-@@ -501,7 +512,6 @@
- #
- # Wireless 802.11b ISA/PCI cards support
- #
--# CONFIG_AIRO is not set
- CONFIG_HERMES=m
- CONFIG_PLX_HERMES=m
- CONFIG_TMD_HERMES=m
-@@ -644,7 +654,6 @@
- #
- # Ftape, the floppy tape device driver
- #
--# CONFIG_FTAPE is not set
- # CONFIG_AGP is not set
- # CONFIG_DRM is not set
- 
-@@ -661,6 +670,11 @@
- # CONFIG_I2C is not set
- 
- #
-+# Dallas's 1-wire bus
-+#
-+# CONFIG_W1 is not set
-+
-+#
- # Misc devices
- #
- 
-@@ -734,6 +748,7 @@
- CONFIG_JOLIET=y
- # CONFIG_ZISOFS is not set
- CONFIG_UDF_FS=m
-+CONFIG_UDF_NLS=y
- 
- #
- # DOS/FAT/NT Filesystems
-@@ -741,6 +756,8 @@
- CONFIG_FAT_FS=m
- CONFIG_MSDOS_FS=m
- CONFIG_VFAT_FS=m
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
- # CONFIG_NTFS_FS is not set
- 
- #
-@@ -795,6 +812,9 @@
- CONFIG_SMB_NLS_DEFAULT=y
- CONFIG_SMB_NLS_REMOTE="cp437"
- CONFIG_CIFS=m
-+# CONFIG_CIFS_STATS is not set
-+# CONFIG_CIFS_XATTR is not set
-+# CONFIG_CIFS_POSIX is not set
- # CONFIG_NCP_FS is not set
- # CONFIG_CODA_FS is not set
- # CONFIG_AFS_FS is not set
-@@ -833,6 +853,7 @@
- # CONFIG_NLS_ISO8859_8 is not set
- # CONFIG_NLS_CODEPAGE_1250 is not set
- # CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
- CONFIG_NLS_ISO8859_1=m
- CONFIG_NLS_ISO8859_2=m
- CONFIG_NLS_ISO8859_3=m
-@@ -860,6 +881,8 @@
- CONFIG_DEBUG_KERNEL=y
- # CONFIG_DEBUG_SLAB is not set
- CONFIG_MAGIC_SYSRQ=y
-+# CONFIG_DEBUG_SPINLOCK is not set
-+# CONFIG_DEBUG_RWLOCK is not set
- # CONFIG_FRAME_POINTER is not set
- # CONFIG_DEBUG_INFO is not set
- 
-@@ -886,7 +909,9 @@
- CONFIG_CRYPTO_AES=m
- CONFIG_CRYPTO_CAST5=m
- CONFIG_CRYPTO_CAST6=m
-+# CONFIG_CRYPTO_TEA is not set
- # CONFIG_CRYPTO_ARC4 is not set
-+# CONFIG_CRYPTO_KHAZAD is not set
- CONFIG_CRYPTO_DEFLATE=m
- # CONFIG_CRYPTO_MICHAEL_MIC is not set
- CONFIG_CRYPTO_CRC32C=m
-@@ -895,6 +920,7 @@
- #
- # Library routines
- #
-+CONFIG_CRC_CCITT=m
- CONFIG_CRC32=y
- CONFIG_LIBCRC32C=m
- CONFIG_ZLIB_INFLATE=m
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/cache.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/cache.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/cache.c	2005-03-24 01:16:08.000000000 -0500
-@@ -33,6 +33,17 @@
- int icache_stride;
- EXPORT_SYMBOL(dcache_stride);
- 
-+
-+#if defined(CONFIG_SMP)
-+/* On some machines (e.g. ones with the Merced bus), there can be
-+ * only a single PxTLB broadcast at a time; this must be guaranteed
-+ * by software.  We put a spinlock around all TLB flushes  to
-+ * ensure this.
-+ */
-+spinlock_t pa_tlb_lock = SPIN_LOCK_UNLOCKED;
-+EXPORT_SYMBOL(pa_tlb_lock);
-+#endif
-+
- struct pdc_cache_info cache_info;
- #ifndef CONFIG_PA20
- static struct pdc_btlb_info btlb_info;
-@@ -307,3 +318,13 @@
- EXPORT_SYMBOL(flush_kernel_dcache_page);
- EXPORT_SYMBOL(flush_data_cache_local);
- EXPORT_SYMBOL(flush_kernel_icache_range_asm);
-+
-+void clear_user_page_asm(void *page, unsigned long vaddr)
-+{
-+	/* This function is implemented in assembly in pacache.S */
-+	extern void __clear_user_page_asm(void *page, unsigned long vaddr);
-+
-+	purge_tlb_start();
-+	__clear_user_page_asm(page, vaddr);
-+	purge_tlb_end();
-+}
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/entry.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/entry.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/entry.S	2005-03-24 01:16:08.000000000 -0500
-@@ -440,8 +440,17 @@
- 	mfctl		%cr25,\reg
- 	.endm
- 
--	/* Only allow faults on different spaces from the
--	 * currently active one if we're the kernel */
-+	/* 
-+		space_check(spc,tmp,fault)
-+
-+		spc - The space we saw the fault with.
-+		tmp - The place to store the current space.
-+		fault - Function to call on failure.
-+
-+		Only allow faults on different spaces from the
-+		currently active one if we're the kernel 
-+
-+	*/
- 	.macro		space_check	spc,tmp,fault
- 	mfsp		%sr7,\tmp
- 	or,COND(<>)	%r0,\spc,%r0	/* user may execute gateway page
-@@ -774,7 +783,7 @@
- #ifdef __LP64__
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #endif
--	bl	do_fork, %r2
-+	BL	do_fork, %r2
- 	copy	%r1, %r24		/* pt_regs */
- 
- 	/* Parent Returns here */
-@@ -827,7 +836,7 @@
- #ifdef __LP64__
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #endif
--	bl	sys_execve, %r2
-+	BL	sys_execve, %r2
- 	copy	%r16, %r26
- 
- 	cmpib,=,n 0,%r28,intr_return    /* forward */
-@@ -939,6 +948,7 @@
- 	STREG   %r19,PT_SR7(%r16)
- 
- intr_return:
-+	/* NOTE: Need to enable interrupts incase we schedule. */
- 	ssm     PSW_SM_I, %r0
- 
- 	/* Check for software interrupts */
-@@ -982,6 +992,8 @@
- 	ldo             PT_FR31(%r29),%r1
- 	rest_fp         %r1
- 	rest_general    %r29
-+
-+	/* Create a "relied upon translation" PA 2.0 Arch. F-5 */
- 	ssm		0,%r0
- 	nop
- 	nop
-@@ -992,8 +1004,15 @@
- 	nop
- 	tophys_r1       %r29
- 	rsm             (PSW_SM_Q|PSW_SM_P|PSW_SM_D|PSW_SM_I),%r0
-+
-+	/* Restore space id's and special cr's from PT_REGS
-+	 * structure pointed to by r29 */
- 	rest_specials	%r29
-+
-+	/* Important: Note that rest_stack restores r29
-+	 * last (we are using it)! It also restores r1 and r30. */
- 	rest_stack
-+
- 	rfi
- 	nop
- 	nop
-@@ -1036,7 +1055,14 @@
- 
- 	.import do_signal,code
- intr_do_signal:
--	/* Only do signals if we are returning to user space */
-+	/* 
-+		This check is critical to having LWS
-+		working. The IASQ is zero on the gateway
-+		page and we cannot deliver any signals until
-+		we get off the gateway page.
-+
-+		Only do signals if we are returning to user space 
-+	*/
- 	LDREG	PT_IASQ0(%r16), %r20
- 	CMPIB= 0,%r20,intr_restore /* backward */
- 	nop
-@@ -1050,7 +1076,7 @@
- 	ldo	-16(%r30),%r29			/* Reference param save area */
- #endif
- 
--	bl	do_signal,%r2
-+	BL	do_signal,%r2
- 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
- 
- 	b	intr_restore
-@@ -1443,15 +1469,20 @@
- 	 * of the instruction. Since we don't insert a translation
- 	 * we can get a lot of faults during a flush loop, so it makes
- 	 * sense to try to do it here with minimum overhead. We only
--	 * emulate fdc,fic & pdc instructions whose base and index
--	 * registers are not shadowed. We defer everything else to the
--	 * "slow" path.
-+	 * emulate fdc,fic,pdc,probew,prober instructions whose base 
-+	 * and index registers are not shadowed. We defer everything 
-+	 * else to the "slow" path.
- 	 */
- 
- 	mfctl           %cr19,%r9 /* Get iir */
-+
-+	/* PA 2.0 Arch Ref. Book pg 382 has a good description of the insn bits.
-+	   Checks for fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw */
-+
-+	/* Checks for fdc,fdce,pdc,"fic,4f" only */
- 	ldi             0x280,%r16
- 	and             %r9,%r16,%r17
--	cmpb,<>,n       %r16,%r17,nadtlb_fault /* Not fdc,fic,pdc */
-+	cmpb,<>,n       %r16,%r17,nadtlb_probe_check
- 	bb,>=,n         %r9,26,nadtlb_nullify  /* m bit not set, just nullify */
- 	BL		get_register,%r25
- 	extrw,u         %r9,15,5,%r8           /* Get index register # */
-@@ -1472,6 +1503,32 @@
- 	rfir
- 	nop
- 
-+	/* 
-+		When there is no translation for the probe address then we
-+		must nullify the insn and return zero in the target regsiter.
-+		This will indicate to the calling code that it does not have 
-+		write/read privileges to this address.
-+
-+		This should technically work for prober and probew in PA 1.1,
-+		and also probe,r and probe,w in PA 2.0
-+
-+		WARNING: USE ONLY NON-SHADOW REGISTERS WITH PROBE INSN!
-+		THE SLOW-PATH EMULATION HAS NOT BEEN WRITTEN YET.
-+
-+	*/
-+nadtlb_probe_check:
-+	ldi             0x80,%r16
-+	and             %r9,%r16,%r17
-+	cmpb,<>,n       %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/
-+	BL              get_register,%r25      /* Find the target register */
-+	extrw,u         %r9,31,5,%r8           /* Get target register */
-+	CMPIB=,n        -1,%r1,nadtlb_fault    /* have to use slow path */
-+	BL		set_register,%r25
-+	copy            %r0,%r1                /* Write zero to target register */
-+	b nadtlb_nullify                       /* Nullify return insn */
-+	nop
-+
-+
- #ifdef __LP64__
- itlb_miss_20w:
- 
-@@ -1762,7 +1819,7 @@
- 
- 	LDREG	PT_GR30(%r1),%r25
- 	copy	%r1,%r24
--	bl	sys_clone,%r2
-+	BL	sys_clone,%r2
- 	ldi	SIGCHLD,%r26
- 
- 	LDREG	-RP_OFFSET-FRAME_SIZE(%r30),%r2
-@@ -1782,7 +1839,7 @@
- 
- 	/* Set the return value for the child */
- child_return:
--	bl	schedule_tail, %r2
-+	BL	schedule_tail, %r2
- 	nop
- 
- 	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30), %r1
-@@ -1807,7 +1864,7 @@
- 
- 	STREG	%r2,PT_GR19(%r1)	/* save for child */
- 	STREG	%r30,PT_GR21(%r1)
--	bl	sys_clone,%r2
-+	BL	sys_clone,%r2
- 	copy	%r1,%r24
- 
- 	b	wrapper_exit
-@@ -1830,7 +1887,7 @@
- 	STREG	%r2,PT_GR19(%r1)	/* save for child */
- 	STREG	%r30,PT_GR21(%r1)
- 
--	bl	sys_vfork,%r2
-+	BL	sys_vfork,%r2
- 	copy	%r1,%r26
- 
- 	b	wrapper_exit
-@@ -1893,10 +1950,10 @@
- 	STREG	%r2, -RP_OFFSET(%r30)
- #ifdef __LP64__
- 	ldo	FRAME_SIZE(%r30), %r30
--	bl	sys_rt_sigreturn,%r2
-+	BL	sys_rt_sigreturn,%r2
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #else
--	bl	sys_rt_sigreturn,%r2
-+	BL	sys_rt_sigreturn,%r2
- 	ldo	FRAME_SIZE(%r30), %r30
- #endif
- 
-@@ -1924,7 +1981,7 @@
- 	STREG	%r2, -RP_OFFSET(%r30)
- #ifdef __LP64__
- 	ldo	FRAME_SIZE(%r30), %r30
--	bl	do_sigaltstack,%r2
-+	b,l	do_sigaltstack,%r2
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #else
- 	bl	do_sigaltstack,%r2
-@@ -1944,7 +2001,7 @@
- 	LDREG	TASK_PT_GR30(%r24),%r24
- 	STREG	%r2, -RP_OFFSET(%r30)
- 	ldo	FRAME_SIZE(%r30), %r30
--	bl	do_sigaltstack32,%r2
-+	b,l	do_sigaltstack32,%r2
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- 
- 	ldo	-FRAME_SIZE(%r30), %r30
-@@ -1962,7 +2019,7 @@
- 	STREG	%r2, -RP_OFFSET(%r30)
- #ifdef __LP64__
- 	ldo	FRAME_SIZE(%r30), %r30
--	bl	sys_rt_sigsuspend,%r2
-+	b,l	sys_rt_sigsuspend,%r2
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #else
- 	bl	sys_rt_sigsuspend,%r2
-@@ -1981,9 +2038,11 @@
- 
- 	.export syscall_exit
- syscall_exit:
-+
- 	/* NOTE: HP-UX syscalls also come through here
--	   after hpux_syscall_exit fixes up return
--	   values. */
-+	 * after hpux_syscall_exit fixes up return
-+	 * values. */
-+
- 	/* NOTE: Not all syscalls exit this way.  rt_sigreturn will exit
- 	 * via syscall_exit_rfi if the signal was received while the process
- 	 * was running.
-@@ -2082,11 +2141,15 @@
- 	LDREG	TASK_PT_GR29(%r1),%r29
- 	LDREG	TASK_PT_GR31(%r1),%r31	   /* restore syscall rp */
- 
-+	/* NOTE: We use rsm/ssm pair to make this operation atomic */
- 	rsm     PSW_SM_I, %r0
- 	LDREG   TASK_PT_GR30(%r1),%r30             /* restore user sp */
- 	mfsp	%sr3,%r1			   /* Get users space id */
- 	mtsp    %r1,%sr7                           /* Restore sr7 */
- 	ssm     PSW_SM_I, %r0
-+
-+	/* Set sr2 to zero for userspace syscalls to work. */
-+	mtsp	%r0,%sr2 
- 	mtsp	%r1,%sr4			   /* Restore sr4 */
- 	mtsp	%r1,%sr5			   /* Restore sr5 */
- 	mtsp	%r1,%sr6			   /* Restore sr6 */
-@@ -2154,12 +2217,18 @@
- 	bb,<	%r2,30,pt_regs_ok		   /* Branch if D set */
- 	ldo	TASK_REGS(%r1),%r25
- 	reg_save %r25				   /* Save r3 to r18 */
-+
-+	/* Save the current sr */
- 	mfsp	%sr0,%r2
- 	STREG	%r2,TASK_PT_SR0(%r1)
-+
-+	/* Save the scratch sr */
- 	mfsp	%sr1,%r2
- 	STREG	%r2,TASK_PT_SR1(%r1)
--	mfsp	%sr2,%r2
--	STREG	%r2,TASK_PT_SR2(%r1)
-+
-+	/* sr2 should be set to zero for userspace syscalls */
-+	STREG	%r0,TASK_PT_SR2(%r1)
-+
- pt_regs_ok:
- 	LDREG	TASK_PT_GR31(%r1),%r2
- 	depi	3,31,2,%r2			   /* ensure return to user mode. */
-@@ -2174,12 +2243,15 @@
- syscall_do_softirq:
- 	bl      do_softirq,%r2
- 	nop
-+	/* NOTE: We enable I-bit incase we schedule later,
-+	 * and we might be going back to userspace if we were
-+	 * traced. */
- 	b       syscall_check_resched
- 	ssm     PSW_SM_I, %r0  /* do_softirq returns with I bit off */
- 
- 	.import schedule,code
- syscall_do_resched:
--	bl	schedule,%r2
-+	BL	schedule,%r2
- #ifdef __LP64__
- 	ldo	-16(%r30),%r29		/* Reference param save area */
- #else
-@@ -2203,7 +2275,7 @@
- #ifdef __LP64__
- 	ldo	-16(%r30),%r29			/* Reference param save area */
- #endif
--	bl	do_signal,%r2
-+	BL	do_signal,%r2
- 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
- 
- 	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/firmware.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/firmware.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/firmware.c	2005-03-24 01:16:08.000000000 -0500
-@@ -1276,7 +1276,7 @@
- long real64_call(unsigned long fn, ...)
- {
- 	va_list args;
--	extern struct wide_stack real64_stack __attribute__ ((alias ("real_stack")));
-+	extern struct wide_stack real64_stack;
- 	extern unsigned long real64_call_asm(unsigned long *,
- 					     unsigned long *, 
- 					     unsigned long);
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/head.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/head.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/head.S	2005-03-24 01:16:08.000000000 -0500
-@@ -1,12 +1,13 @@
--/*
-- *
-- * This file is subject to the terms and conditions of the GNU General Public
-+/* This file is subject to the terms and conditions of the GNU General Public
-  * License.  See the file "COPYING" in the main directory of this archive
-  * for more details.
-  *
-  * Copyright (C) 1999 by Helge Deller
-  * Copyright 1999 SuSE GmbH (Philipp Rumpf)
-  * Copyright 1999 Philipp Rumpf (prumpf at tux.org)
-+ * Copyright 2000 Hewlett Packard (Paul Bame, bame at puffin.external.hp.com)
-+ * Copyright (C) 2001 Grant Grundler (Hewlett Packard)
-+ * Copyright (C) 2004 Kyle McMartin <kyle at debian.org>
-  *
-  * Initial Version 04-23-1999 by Helge Deller <deller at gmx.de>
-  */
-@@ -15,12 +16,12 @@
- 
- #include <asm/offsets.h>
- #include <asm/psw.h>
--
-+#include <asm/pdc.h>
-+	
- #include <asm/assembly.h>
- #include <asm/pgtable.h>
- 
--
--	.level 1.1
-+	.level	LEVEL
- 
- 	.data
- 
-@@ -32,12 +33,13 @@
- 	.word 0 /* arg3 */
- 
- 	.text
--	.align	4	
-+	.align	4
- 	.import init_thread_union,data
-+	.import fault_vector_20,code    /* IVA parisc 2.0 32 bit */
-+#ifndef __LP64__
-+        .import fault_vector_11,code    /* IVA parisc 1.1 32 bit */
- 	.import	$global$		/* forward declaration */
--	.import fault_vector_11,code	/* IVA parisc 1.1 32 bit */
--	.import fault_vector_20,code	/* IVA parisc 2.0 32 bit */
--
-+#endif /*!LP64*/
- 	.export stext
- 	.export _stext,data		/* Kernel want it this way! */
- _stext:
-@@ -56,82 +58,103 @@
- 	.import __bss_start,data
- 	.import __bss_stop,data
- 
--	ldil            L%PA(__bss_start),%r3
--	ldo             R%PA(__bss_start)(%r3),%r3
--	ldil            L%PA(__bss_stop),%r4
--	ldo             R%PA(__bss_stop)(%r4),%r4
-+	load32		PA(__bss_start),%r3
-+	load32		PA(__bss_stop),%r4
- $bss_loop:
- 	cmpb,<<,n       %r3,%r4,$bss_loop
- 	stw,ma          %r0,4(%r3)
- 
- 	/* Save away the arguments the boot loader passed in (32 bit args) */
--
--	ldil            L%PA(boot_args),%r1
--	ldo             R%PA(boot_args)(%r1),%r1
-+	load32		PA(boot_args),%r1
- 	stw,ma          %arg0,4(%r1)
- 	stw,ma          %arg1,4(%r1)
- 	stw,ma          %arg2,4(%r1)
- 	stw,ma          %arg3,4(%r1)
- 
- 	/* Initialize startup VM. Just map first 8 MB of memory */
--	ldil		L%PA(pg0),%r1
--	ldo		R%PA(pg0)(%r1),%r1
--	shr		%r1,PxD_VALUE_SHIFT,%r3
--	ldo		(PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3
-+	load32		PA(pg0),%r1
- 
--	ldil		L%PA(swapper_pg_dir),%r4
--	ldo		R%PA(swapper_pg_dir)(%r4),%r4
-+#ifdef __LP64__
-+	load32		PA(pmd0),%r5
-+	shrd            %r5,PxD_VALUE_SHIFT,%r3	
-+#else
-+	shr		%r1,PxD_VALUE_SHIFT,%r3
-+#endif
-+        ldo             (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3	
-+	
-+	load32		PA(swapper_pg_dir),%r4
- 	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
- 	mtctl		%r4,%cr25	/* Initialize user root pointer */
-+
-+#ifdef __LP64__
-+	stw		%r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4)
-+	shrd		%r1,PxD_VALUE_SHIFT,%r3
-+	ldo		(PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3
-+	ldo		ASM_PMD_ENTRY*ASM_PMD_ENTRY_SIZE(%r5),%r5
-+#else
-+        ldo             ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4
-+#endif
- 	ldi		ASM_PT_INITIAL,%r1
--	ldo		ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4
-+
- 1:
-+#ifdef __LP64__
-+	stw             %r3,0(%r5)
-+#else
- 	stw             %r3,0(%r4)
-+#endif
-+	
- 	ldo		(ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3
- 	addib,>		-1,%r1,1b
-+
-+#ifdef __LP64__
-+	ldo		ASM_PMD_ENTRY_SIZE(%r5),%r5
-+#else
- 	ldo		ASM_PGD_ENTRY_SIZE(%r4),%r4
-+#endif
- 
- 	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */
--	ldil		L%PA(pg0),%r1
--	ldo		R%PA(pg0)(%r1),%r1
-+	load32		PA(pg0),%r1
-+
- $pgt_fill_loop:
--	stwm		%r3,ASM_PTE_ENTRY_SIZE(%r1)
-+	STREGM          %r3,ASM_PTE_ENTRY_SIZE(%r1)
- 	ldo		ASM_PAGE_SIZE(%r3),%r3
- 	bb,>=		%r3,31-KERNEL_INITIAL_ORDER,$pgt_fill_loop
- 	nop
- 
--
- 	/* Load the return address...er...crash 'n burn */
- 	copy		%r0,%r2
- 
- 	/* And the RFI Target address too */
--	ldil            L%start_kernel,%r11
--	ldo             R%start_kernel(%r11),%r11
-+	load32		start_kernel,%r11
- 
- 	/* And the initial task pointer */
--
--	ldil            L%init_thread_union,%r6
--	ldo             R%init_thread_union(%r6),%r6
-+	load32		init_thread_union,%r6
- 	mtctl           %r6,%cr30
- 
- 	/* And the stack pointer too */
--
- 	ldo             THREAD_SZ_ALGN(%r6),%sp
-+#ifdef __LP64__
-+	tophys_r1	%sp
-+#endif
- 
- 	/* And the interrupt stack */
--
--	ldil            L%interrupt_stack,%r6
--	ldo             R%interrupt_stack(%r6),%r6
-+	load32		interrupt_stack,%r6
- 	mtctl           %r6,%cr31
- 
-+#ifdef __LP64__
-+#define MEM_PDC_LO 0x388
-+#define MEM_PDC_HI 0x35C
-+	ldw             MEM_PDC_LO(%r0),%r3
-+	ldw             MEM_PDC_HI(%r0),%r6
-+	depd            %r6, 31, 32, %r3        /* move to upper word */
-+#endif
- #ifdef CONFIG_SMP
- 	/* Set the smp rendevous address into page zero.
- 	** It would be safer to do this in init_smp_config() but
- 	** it's just way easier to deal with here because
- 	** of 64-bit function ptrs and the address is local to this file.
- 	*/
--	ldil		L%PA(smp_slave_stext),%r10
--	ldo		R%PA(smp_slave_stext)(%r10),%r10
-+	load32		PA(smp_slave_stext),%r10
- 	stw		%r10,0x10(%r0)	/* MEM_RENDEZ */
- 	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI - assume addr < 4GB */
- 
-@@ -141,10 +164,16 @@
- 	/*
- 	** Code Common to both Monarch and Slave processors.
- 	** Entry:
-+	**
-+	**  1.1:	
- 	**    %r11 must contain RFI target address.
- 	**    %r25/%r26 args to pass to target function
- 	**    %r2  in case rfi target decides it didn't like something
- 	**
-+	**  2.0w:
-+	**    %r3  PDCE_PROC address
-+	**    %r11 RFI target address
-+	**
- 	** Caller must init: SR4-7, %sp, %r10, %cr24/25, 
- 	*/
- common_stext:
-@@ -154,8 +183,41 @@
- 	/* Clear PDC entry point - we won't use it */
- 	stw		%r0,0x10(%r0)	/* MEM_RENDEZ */
- 	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI */
--#endif
-+#endif /*CONFIG_SMP*/
- 
-+#ifdef __LP64__
-+	/* Save the rfi target address */
-+	ldd             TI_TASK-THREAD_SZ_ALGN(%sp), %r10
-+	tophys_r1       %r10
-+	std             %r11,  TASK_PT_GR11(%r10)
-+	/* Switch to wide mode Superdome doesn't support narrow PDC
-+	** calls.
-+	*/
-+1:	mfia            %rp             /* clear upper part of pcoq */
-+	ldo             2f-1b(%rp),%rp
-+	depdi           0,31,32,%rp
-+	bv              (%rp)
-+	ssm             PSW_SM_W,%r0
-+
-+        /* Set Wide mode as the "Default" (eg for traps)
-+        ** First trap occurs *right* after (or part of) rfi for slave CPUs.
-+        ** Someday, palo might not do this for the Monarch either.
-+        */
-+2:
-+	ldo             PDC_PSW(%r0),%arg0              /* 21 */
-+	ldo             PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */
-+	ldo             PDC_PSW_WIDE_BIT(%r0),%arg2     /* 2 */
-+	load32          PA(stext_pdc_ret), %rp
-+	bv              (%r3)
-+	copy            %r0,%arg3
-+
-+stext_pdc_ret:
-+	/* restore rfi target address*/
-+	ldd             TI_TASK-THREAD_SZ_ALGN(%sp), %r10
-+	tophys_r1       %r10
-+	ldd             TASK_PT_GR11(%r10), %r11
-+#endif
-+	
- 	/* PARANOID: clear user scratch/user space SR's */
- 	mtsp	%r0,%sr0
- 	mtsp	%r0,%sr1
-@@ -168,17 +230,21 @@
- 	mtctl	%r0,%cr12
- 	mtctl	%r0,%cr13
- 
-+#ifdef __LP64__
-+	/* Prepare to RFI! Man all the cannons! */
-+	tovirt_r1       %sp
-+#endif
-+	
- 	/* Initialize the global data pointer */
--	ldil		L%$global$,%dp
--	ldo		R%$global$(%dp),%dp
-+	loadgp
- 
--	/*
--	 * Set up our interrupt table.  HPMCs might not work after this! 
-+	/* Set up our interrupt table.  HPMCs might not work after this! 
- 	 *
- 	 * We need to install the correct iva for PA1.1 or PA2.0. The
- 	 * following short sequence of instructions can determine this
- 	 * (without being illegal on a PA1.1 machine).
- 	 */
-+#ifndef __LP64__
- 	ldi		32,%r10
- 	mtctl		%r10,%cr11
- 	.level 2.0
-@@ -190,14 +256,39 @@
- 	ldo		R%PA(fault_vector_11)(%r10),%r10
- 
- $is_pa20:
--	ldil		L%PA(fault_vector_20),%r10
--	ldo		R%PA(fault_vector_20)(%r10),%r10
-+	.level		LEVEL /* restore 1.1 || 2.0w */
-+#endif /*!LP64*/
-+	load32		PA(fault_vector_20),%r10
- 
- $install_iva:
- 	mtctl		%r10,%cr14
- 
--	/* Disable Q bit so we can load the iia queue */
--	rsm            PSW_SM_Q,%r0
-+#ifdef __LP64__
-+	b		aligned_rfi
-+	nop
-+
-+	.align          256
-+aligned_rfi:
-+	ssm             0,0
-+	nop             /* 1 */
-+	nop             /* 2 */
-+	nop             /* 3 */
-+	nop             /* 4 */
-+	nop             /* 5 */
-+	nop             /* 6 */
-+	nop             /* 7 */
-+	nop             /* 8 */
-+#endif
-+
-+#ifdef __LP64__ /* move to psw.h? */
-+#define		PSW_BITS	PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R
-+#else
-+#define		PSW_BITS	PSW_SM_Q
-+#endif
-+
-+$rfi:	
-+	/* turn off troublesome PSW bits */
-+	rsm		PSW_BITS,%r0
- 
- 	/* kernel PSW:
- 	 *  - no interruptions except HPMC and TOC (which are handled by PDC)
-@@ -205,8 +296,7 @@
- 	 *  - big-endian
- 	 *  - virtually mapped
- 	 */
--	ldil		L%KERNEL_PSW,%r10
--	ldo		R%KERNEL_PSW(%r10),%r10
-+	load32		KERNEL_PSW,%r10
- 	mtctl		%r10,%ipsw
- 
- 	/* Set the space pointers for the post-RFI world
-@@ -232,6 +322,7 @@
- 	.import smp_init_current_idle_task,data
- 	.import	smp_callin,code
- 
-+#ifndef __LP64__
- smp_callin_rtn:
-         .proc
- 	.callinfo
-@@ -239,9 +330,9 @@
- 	nop
- 	nop
-         .procend
-+#endif /*!LP64*/
- 
- /***************************************************************************
--*
- * smp_slave_stext is executed by all non-monarch Processors when the Monarch
- * pokes the slave CPUs in smp.c:smp_boot_cpus().
- *
-@@ -249,8 +340,6 @@
- * mode. Once all available/eligible CPUs are in virtual mode, all are
- * released and start out by executing their own idle task.
- *****************************************************************************/
--
--
- smp_slave_stext:
-         .proc
- 	.callinfo
-@@ -264,28 +353,31 @@
- 	mtsp	   %r0,%sr7
- 
- 	/*  Initialize the SP - monarch sets up smp_init_current_idle_task */
--	ldil		L%PA(smp_init_current_idle_task),%sp
--	ldo		R%PA(smp_init_current_idle_task)(%sp),%sp
--	ldw		0(%sp),%sp	/* load task address */
-+	load32		PA(smp_init_current_idle_task),%sp
-+	LDREG		0(%sp),%sp	/* load task address */
- 	tophys_r1	%sp
--	ldw		TASK_THREAD_INFO(%sp), %sp
-+	LDREG		TASK_THREAD_INFO(%sp),%sp
- 	mtctl           %sp,%cr30       /* store in cr30 */
--	addil		L%THREAD_SZ_ALGN,%sp	/* stack is above task */
--	ldo		R%THREAD_SZ_ALGN(%r1),%sp
-+	ldo             THREAD_SZ_ALGN(%sp),%sp
-+#ifdef __LP64__
-+	tophys_r1       %sp
-+#endif
- 
- 	/* point CPU to kernel page tables */
--	ldil		L%PA(swapper_pg_dir),%r4
--	ldo		R%PA(swapper_pg_dir)(%r4),%r4
-+	load32		PA(swapper_pg_dir),%r4
- 	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
- 	mtctl		%r4,%cr25	/* Initialize user root pointer */
- 
-+#ifdef __LP64__
-+	/* Setup PDCE_PROC entry */
-+	copy            %arg0,%r3
-+#else
- 	/* Load RFI *return* address in case smp_callin bails */
--	ldil		L%smp_callin_rtn,%r2
--	ldo		R%smp_callin_rtn(%r2),%r2
--
-+	load32		smp_callin_rtn,%r2
-+#endif
-+	
- 	/* Load RFI target address.  */
--	ldil		L%smp_callin,%r11
--	ldo		R%smp_callin(%r11),%r11
-+	load32		smp_callin,%r11
- 	
- 	/* ok...common code can handle the rest */
- 	b		common_stext
-@@ -293,7 +385,7 @@
- 
- 	.procend
- #endif /* CONFIG_SMP */
--
-+#ifndef __LP64__
- 	.data
- 
- 	.align	4
-@@ -303,3 +395,4 @@
- 	.size	$global$,4
- $global$:	
- 	.word 0
-+#endif /*!LP64*/
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -3,7 +3,6 @@
- #
- 
- head-y			:= head.o
--head-$(CONFIG_PARISC64)	:= head64.o
- extra-y			:= init_task.o $(head-y) vmlinux.lds.s
- 
- AFLAGS_entry.o	:= -traditional
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/pacache.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/pacache.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/pacache.S	2005-03-24 01:16:08.000000000 -0500
-@@ -68,7 +68,7 @@
- 	 * consolidated.
- 	 */
- 
--	rsm     PSW_SM_I,%r19      /* relied upon translation! */
-+	rsm     PSW_SM_I,%r19	/* relied upon translation! PA 2.0 Arch. F-5 */
- 	nop
- 	nop
- 	nop
-@@ -475,9 +475,9 @@
- 	.procend
- #endif
- 
--	.export clear_user_page_asm,code
-+	.export __clear_user_page_asm,code
- 
--clear_user_page_asm:
-+__clear_user_page_asm:
- 	.proc
- 	.callinfo NO_CALLS
- 	.entry
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/pci-dma.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/pci-dma.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/pci-dma.c	2005-03-24 01:16:08.000000000 -0500
-@@ -104,7 +104,9 @@
- 		if (!pte_none(*pte))
- 			printk(KERN_ERR "map_pte_uncached: page already exists\n");
- 		set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC));
-+		purge_tlb_start();
- 		pdtlb_kernel(orig_vaddr);
-+		purge_tlb_end();
- 		vaddr += PAGE_SIZE;
- 		orig_vaddr += PAGE_SIZE;
- 		(*paddr_ptr) += PAGE_SIZE;
-@@ -179,7 +181,9 @@
- 	do {
- 		pte_t page = *pte;
- 		pte_clear(pte);
-+		purge_tlb_start();
- 		pdtlb_kernel(orig_vaddr);
-+		purge_tlb_end();
- 		vaddr += PAGE_SIZE;
- 		orig_vaddr += PAGE_SIZE;
- 		pte++;
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/pdc_cons.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/pdc_cons.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/pdc_cons.c	2005-03-24 01:16:08.000000000 -0500
-@@ -71,6 +71,19 @@
- 	pdc_iodc_outc(c);
- }
- 
-+void pdc_printf(const char *fmt, ...)
-+{
-+	va_list args;
-+	char buf[1024];
-+	int i, len;
-+
-+	va_start(args, fmt);
-+	len = vscnprintf(buf, sizeof(buf), fmt, args);
-+	va_end(args);
-+
-+	for (i = 0; i < len; i++)
-+		pdc_iodc_outc(buf[i]);
-+}
- 
- int pdc_console_poll_key(struct console *co)
- {
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/perf_asm.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/perf_asm.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/perf_asm.S	2005-03-24 01:16:08.000000000 -0500
-@@ -1,18 +1,19 @@
- 
- /*    low-level asm for "intrigue" (PA8500-8700 CPU perf counters)
-- *
-+ * 
-  *    Copyright (C) 2001 Randolph Chung <tausq at parisc-linux.org>
-- *
-+ *    Copyright (C) 2001 Hewlett-Packard (Grant Grundler)
-+ * 
-  *    This program is free software; you can redistribute it and/or modify
-  *    it under the terms of the GNU General Public License as published by
-  *    the Free Software Foundation; either version 2 of the License, or
-  *    (at your option) any later version.
-- *
-+ * 
-  *    This program is distributed in the hope that it will be useful,
-  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  *    GNU General Public License for more details.
-- *
-+ * 
-  *    You should have received a copy of the GNU General Public License
-  *    along with this program; if not, write to the Free Software
-  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-@@ -48,7 +49,7 @@
- 	.proc
- 	.callinfo  frame=0,NO_CALLS
- 	.entry
--	
-+
- 	ldi     0x20,%r25                ; load up perfmon bit
- 	mfctl   ccr,%r26                 ; get coprocessor register
- 	or      %r25,%r26,%r26             ; set bit
-@@ -87,35 +88,35 @@
- 	.exit
- 	.procend
- 
--;************************************************************************
--;*																		*
--;* Name: perf_rdr_shift_in_W												*
--;*																		*
--;* Description:															*
--;*	This routine shifts data in from the RDR in arg0 and returns		*
--;*	the result in ret0.  If the RDR is <= 64 bits in length, it			*
--;*	is shifted shifted backup immediately.  This is to compensate		*
--;*	for RDR10 which has bits that preclude PDC stack operations			*
--;*	when they are in the wrong state.									*
--;*																		*
--;* Arguments:															*
--;*	arg0 : rdr to be read												*
--;*	arg1 : bit length of rdr											*
--;*																		*
--;* Returns:																*
--;*	ret0 = next 64 bits of rdr data from staging register				*
--;*																		*
--;* Register usage:														*
--;*	arg0 : rdr to be read												*
--;*	arg1 : bit length of rdr											*
--;*	%r24  - original DR2 value											*
--;*	%r1   - scratch														*
--;*  %r29  - scratch														*
--;*																		*
--;* Returns:																*
--;*	ret0 = RDR data (right justified)									*
--;*																		*
--;************************************************************************
-+;***********************************************************************
-+;*
-+;* Name: perf_rdr_shift_in_W
-+;*
-+;* Description:
-+;*	This routine shifts data in from the RDR in arg0 and returns
-+;*	the result in ret0.  If the RDR is <= 64 bits in length, it
-+;*	is shifted shifted backup immediately.  This is to compensate
-+;*	for RDR10 which has bits that preclude PDC stack operations
-+;*	when they are in the wrong state.
-+;*
-+;* Arguments:
-+;*	arg0 : rdr to be read
-+;*	arg1 : bit length of rdr
-+;*
-+;* Returns:
-+;*	ret0 = next 64 bits of rdr data from staging register
-+;*
-+;* Register usage:
-+;*	arg0 : rdr to be read
-+;*	arg1 : bit length of rdr
-+;*	%r24  - original DR2 value
-+;*	%r1   - scratch
-+;*  %r29  - scratch
-+;*
-+;* Returns:
-+;*	ret0 = RDR data (right justified)
-+;*
-+;***********************************************************************
- 
- 	.export perf_rdr_shift_in_W,code
- perf_rdr_shift_in_W:
-@@ -138,7 +139,7 @@
- 	nop
- 	nop
- 	nop
--	nop	
-+	nop
- 
- ;
- ; Cacheline start (32-byte cacheline)
-@@ -146,11 +147,11 @@
- 	nop
- 	nop
- 	nop
--	extrd,u		arg1,63,6,%r1    ; setup shift amount based on bits to move 
-+	extrd,u		arg1,63,6,%r1	; setup shift amount by bits to move 
- 
- 	mtsar		%r1
- 	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
--	blr  		%r1,%r0		    ; branch to 8-instruction sequence
-+	blr  		%r1,%r0		; branch to 8-instruction sequence
- 	nop
- 
- ;
-@@ -160,19 +161,19 @@
- 	;
- 	; RDR 0 sequence
- 	;
--	SFDIAG		(0)		
-+	SFDIAG		(0)
- 	ssm		    0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
--	MTDIAG_1	(1)					; mtdiag %dr1, %r1 
-+	MTDIAG_1	(1)			; mtdiag %dr1, %r1 
- 	STDIAG		(0)
- 	ssm		    0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 1 sequence
- 	;
--	sync			
-+	sync
- 	ssm		    0,0
- 	SFDIAG		(1)
- 	ssm		    0,0
-@@ -180,11 +181,11 @@
- 	ssm		    0,0
- 	b,n         perf_rdr_shift_in_W_leave
- 	nop
--	
-+
- 	;
- 	; RDR 2 read sequence
- 	;
--	SFDIAG		(2)		
-+	SFDIAG		(2)
- 	ssm		    0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
-@@ -192,7 +193,7 @@
- 	STDIAG		(2)
- 	ssm		    0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 3 read sequence
- 	;
-@@ -208,39 +209,39 @@
- 	;
- 	; RDR 4 read sequence
- 	;
--	sync				
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(4)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	; 
- 	; RDR 5 read sequence
- 	;
--	sync	
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(5)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 6 read sequence
- 	;
--	sync	
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(6)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 7 read sequence
- 	;
-@@ -281,26 +282,26 @@
- 	; RDR 10 read sequence
- 	;
- 	SFDIAG		(10)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(10)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 11 read sequence
- 	;
- 	SFDIAG		(11)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(11)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 12 read sequence
- 	;
-@@ -317,77 +318,77 @@
- 	; RDR 13 read sequence
- 	;
- 	sync
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(13)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 14 read sequence
- 	;
--	SFDIAG		(14)	
--	ssm			0,0
-+	SFDIAG		(14)
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(14)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 15 read sequence
- 	;
--	sync				; RDR 15 read sequence
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(15)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
- 	nop
--	
-+
- 	;
- 	; RDR 16 read sequence
- 	;
--	sync				; RDR 16 read sequence
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(16)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 17 read sequence
- 	;
--	SFDIAG		(17)	
--	ssm			0,0
-+	SFDIAG		(17)
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(17)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 18 read sequence
- 	;
--	SFDIAG		(18)	
--	ssm			0,0
-+	SFDIAG		(18)
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(18)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
--;
--; RDR 19 read sequence
--;
-+
-+	;
-+	; RDR 19 read sequence
-+	;
- 	b,n         perf_rdr_shift_in_W_leave
- 	nop
- 	nop
-@@ -401,144 +402,144 @@
- 	; RDR 20 read sequence
- 	;
- 	sync
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(20)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 21 read sequence
- 	;
- 	sync
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(21)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 22 read sequence
- 	;
- 	sync
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(22)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 23 read sequence
- 	;
--	sync		
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(23)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 24 read sequence
- 	;
--	sync	
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(24)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 25 read sequence
- 	;
- 	sync
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(25)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 26 read sequence
- 	;
--	SFDIAG		(26)		
--	ssm			0,0
-+	SFDIAG		(26)
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(26)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 27 read sequence
- 	;
- 	SFDIAG		(27)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(27)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 28 read sequence
- 	;
--	sync				
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(28)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 29 read sequence
- 	;
--	sync		
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(29)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_W_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	;
- 	; RDR 30 read sequence
- 	;
- 	SFDIAG		(30)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(30)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_W_leave
--	
-+
- 	;
- 	; RDR 31 read sequence
- 	;
--	sync		
--	ssm			0,0
-+	sync
-+	ssm		0,0
- 	SFDIAG		(31)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	;
-@@ -552,28 +553,28 @@
- 	.procend
- 
- 
--;************************************************************************
--;*																		*
--;* Name: perf_rdr_shift_out_W												*
--;*																		*
--;* Description:															*
--;*	This routine moves data to the RDR's.  The double-word that			*
--;*	arg1 points to is loaded and moved into the staging register.		*
--;*	Then the STDIAG instruction for the RDR # in arg0 is called			*
--;*	to move the data to the RDR.										*
--;*																		*
--;* Arguments:															*
--;*	arg0 = rdr number													*
--;*	arg1 = 64-bit value to write										*
--;*	%r24 - DR2 | DR2_SLOW_RET											*
--;*	%r23 - original DR2 value											*
--;*																		*
--;* Returns:																*
--;*	None																*
--;*																		*
--;* Register usage:														*
--;*																		*
--;************************************************************************
-+;***********************************************************************
-+;*
-+;* Name: perf_rdr_shift_out_W
-+;*
-+;* Description:
-+;*	This routine moves data to the RDR's.  The double-word that
-+;*	arg1 points to is loaded and moved into the staging register.
-+;*	Then the STDIAG instruction for the RDR # in arg0 is called
-+;*	to move the data to the RDR.
-+;*
-+;* Arguments:
-+;*	arg0 = rdr number
-+;*	arg1 = 64-bit value to write
-+;*	%r24 - DR2 | DR2_SLOW_RET
-+;*	%r23 - original DR2 value
-+;*
-+;* Returns:
-+;*	None
-+;*
-+;* Register usage:
-+;*
-+;***********************************************************************
- 
- 	.export perf_rdr_shift_out_W,code
- perf_rdr_shift_out_W:
-@@ -587,24 +588,23 @@
- 
- 	depdi,z		1,DR2_SLOW_RET,1,%r24
- 	MFDIAG_2	(23)
--	or		     %r24,%r23,%r24
--	MTDIAG_2	(24)			; set DR2_SLOW_RET
--
--	MTDIAG_1	(25)			; data to the staging register
-+	or		%r24,%r23,%r24
-+	MTDIAG_2	(24)		; set DR2_SLOW_RET
-+	MTDIAG_1	(25)		; data to the staging register
- 	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
--	blr		    %r1,%r0		    ; branch to 8-instruction sequence
-+	blr		    %r1,%r0	; branch to 8-instruction sequence
- 	nop
- 
- 	;
- 	; RDR 0 write sequence
- 	;
- 	sync				; RDR 0 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(0)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_W_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	;
-@@ -718,7 +718,7 @@
- 	;
- 	; RDR 10 write sequence
- 	;
--	sync	
-+	sync
- 	ssm		0,0
- 	STDIAG		(10)
- 	STDIAG		(26)
-@@ -862,7 +862,7 @@
- 	;
- 	; RDR 22 write sequence
- 	;
--	sync	
-+	sync
- 	ssm		0,0
- 	STDIAG		(22)
- 	ssm		0,0
-@@ -910,7 +910,7 @@
- 	;
- 	; RDR 26 write sequence
- 	;
--	sync	
-+	sync
- 	ssm		0,0
- 	STDIAG		(10)
- 	STDIAG		(26)
-@@ -958,7 +958,7 @@
- 	;
- 	; RDR 30 write sequence
- 	;
--	sync	
-+	sync
- 	ssm		0,0
- 	STDIAG		(30)
- 	ssm		0,0
-@@ -970,7 +970,7 @@
- 	;
- 	; RDR 31 write sequence
- 	;
--	sync				
-+	sync
- 	ssm		0,0
- 	STDIAG		(31)
- 	ssm		0,0
-@@ -986,34 +986,32 @@
- 	.procend
- 
- 
--;**************************** CHRIS ***********************************
--
--;************************************************************************
--;*																		*
--;* Name: rdr_shift_in_U													*
--;*																		*
--;* Description:															*
--;*	This routine shifts data in from the RDR in arg0 and returns		*
--;*	the result in ret0.  If the RDR is <= 64 bits in length, it			*
--;*	is shifted shifted backup immediately.  This is to compensate		*
--;*	for RDR10 which has bits that preclude PDC stack operations			*
--;*	when they are in the wrong state.									*
--;*																		*
--;* Arguments:															*
--;*	arg0 : rdr to be read												*
--;*	arg1 : bit length of rdr											*
--;*																		*
--;* Returns:																*
--;*	ret0 = next 64 bits of rdr data from staging register				*
--;*																		*
--;* Register usage:														*
--;*	arg0 : rdr to be read						                        *
--;*	arg1 : bit length of rdr					                        *
--;*	%r24 - original DR2 value											*
--;*	%r23 - DR2 | DR2_SLOW_RET											*
--;*	%r1  - scratch														*
--;*																		*
--;************************************************************************
-+;***********************************************************************
-+;*
-+;* Name: rdr_shift_in_U
-+;*
-+;* Description:
-+;*	This routine shifts data in from the RDR in arg0 and returns
-+;*	the result in ret0.  If the RDR is <= 64 bits in length, it
-+;*	is shifted shifted backup immediately.  This is to compensate
-+;*	for RDR10 which has bits that preclude PDC stack operations
-+;*	when they are in the wrong state.
-+;*
-+;* Arguments:
-+;*	arg0 : rdr to be read
-+;*	arg1 : bit length of rdr
-+;*
-+;* Returns:
-+;*	ret0 = next 64 bits of rdr data from staging register
-+;*
-+;* Register usage:
-+;*	arg0 : rdr to be read						                        
-+;*	arg1 : bit length of rdr					                        
-+;*	%r24 - original DR2 value
-+;*	%r23 - DR2 | DR2_SLOW_RET
-+;*	%r1  - scratch
-+;*
-+;***********************************************************************
- 
- 	.export perf_rdr_shift_in_U,code
- perf_rdr_shift_in_U:
-@@ -1053,75 +1051,75 @@
- ; Start of next 32-byte cacheline
- ;
- 	SFDIAG		(0)		; RDR 0 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(0)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(1)		; RDR 1 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(1)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	sync				; RDR 2 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(4)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 3 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(3)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 4 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(4)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 5 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(5)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 6 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(6)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 7 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(7)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	b,n         perf_rdr_shift_in_U_leave
-@@ -1134,95 +1132,95 @@
- 	nop
- 
- 	SFDIAG		(9)		; RDR 9 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(9)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
- 
- 	SFDIAG		(10)		; RDR 10 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(10)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(11)		; RDR 11 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(11)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(12)		; RDR 12 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(12)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
- 
- 	SFDIAG		(13)		; RDR 13 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(13)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(14)		; RDR 14 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(14)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(15)		; RDR 15 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(15)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	sync				; RDR 16 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(16)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	SFDIAG		(17)		; RDR 17 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(17)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(18)		; RDR 18 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(18)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	b,n         perf_rdr_shift_in_U_leave
- 	nop
- 	nop
-@@ -1233,86 +1231,86 @@
- 	nop
- 
- 	sync				; RDR 20 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(20)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 21 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(21)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 22 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(22)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 23 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(23)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 24 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(24)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	sync				; RDR 25 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(25)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	SFDIAG		(26)		; RDR 26 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(26)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(27)		; RDR 27 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(27)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	sync				; RDR 28 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	SFDIAG		(28)
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	b,n         perf_rdr_shift_in_U_leave
--	ssm			0,0
-+	ssm		0,0
- 	nop
--	
-+
- 	b,n         perf_rdr_shift_in_U_leave
- 	nop
- 	nop
-@@ -1321,23 +1319,23 @@
- 	nop
- 	nop
- 	nop
--	
-+
- 	SFDIAG		(30)		; RDR 30 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(30)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
--	
-+
- 	SFDIAG		(31)		; RDR 31 read sequence
--	ssm			0,0
-+	ssm		0,0
- 	MFDIAG_1	(28)
- 	shrpd		ret0,%r0,%sar,%r1
- 	MTDIAG_1	(1)
- 	STDIAG		(31)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_in_U_leave
- 	nop
- 
-@@ -1347,30 +1345,30 @@
- 	MTDIAG_2	(24)			; restore DR2
- 	.procend
- 
--;************************************************************************
--;*																		*
--;* Name: rdr_shift_out_U												*
--;*																		*
--;* Description:															*
--;*	This routine moves data to the RDR's.  The double-word that			*
--;*	arg1 points to is loaded and moved into the staging register.		*
--;*	Then the STDIAG instruction for the RDR # in arg0 is called			*
--;*	to move the data to the RDR.										*
--;*																		*
--;* Arguments:															*
--;*	arg0 = rdr target													*
--;*	arg1 = buffer pointer												*
--;*																		*
--;* Returns:																*
--;*	None																*
--;*																		*
--;* Register usage:														*
--;*	arg0 = rdr target													*
--;*	arg1 = buffer pointer												*
--;*	%r24 - DR2 | DR2_SLOW_RET											*
--;*	%r23 - original DR2 value											*
--;*																		*
--;************************************************************************
-+;***********************************************************************
-+;*
-+;* Name: rdr_shift_out_U
-+;*
-+;* Description:
-+;*	This routine moves data to the RDR's.  The double-word that
-+;*	arg1 points to is loaded and moved into the staging register.
-+;*	Then the STDIAG instruction for the RDR # in arg0 is called
-+;*	to move the data to the RDR.
-+;*
-+;* Arguments:
-+;*	arg0 = rdr target
-+;*	arg1 = buffer pointer
-+;*
-+;* Returns:
-+;*	None
-+;*
-+;* Register usage:
-+;*	arg0 = rdr target
-+;*	arg1 = buffer pointer
-+;*	%r24 - DR2 | DR2_SLOW_RET
-+;*	%r23 - original DR2 value
-+;*
-+;***********************************************************************
- 
- 	.export perf_rdr_shift_out_U,code
- perf_rdr_shift_out_U:
-@@ -1386,11 +1384,11 @@
- 	depdi,z		1,DR2_SLOW_RET,1,%r24
- 	MFDIAG_2	(23)
- 	or		%r24,%r23,%r24
--	MTDIAG_2	(24)			; set DR2_SLOW_RET
-+	MTDIAG_2	(24)		; set DR2_SLOW_RET
- 
--	MTDIAG_1	(25)			; data to the staging register
--	shladd		 arg0,2,%r0,%r1	; %r1 = 4 * RDR number
--	blr		    %r1,%r0		    ; branch to 8-instruction sequence
-+	MTDIAG_1	(25)		; data to the staging register
-+	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
-+	blr		%r1,%r0		; branch to 8-instruction sequence
- 	nop
- 
- ;
-@@ -1398,291 +1396,291 @@
- ;
- 
- 	sync				; RDR 0 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(0)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 1 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(1)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 2 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(2)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 3 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(3)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 4 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(4)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 5 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(5)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 6 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(6)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 7 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(7)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 8 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(8)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 9 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(9)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 10 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(10)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 11 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(11)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 12 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(12)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 13 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(13)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 14 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(14)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 15 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(15)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 16 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(16)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 17 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(17)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 18 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(18)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 19 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(19)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 20 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(20)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 21 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(21)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 22 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(22)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 23 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(23)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 24 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(24)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 25 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(25)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 26 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(26)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 27 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(27)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 28 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(28)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 29 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(29)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 30 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(30)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- 	sync				; RDR 31 write sequence
--	ssm			0,0
-+	ssm		0,0
- 	STDIAG		(31)
--	ssm			0,0
-+	ssm		0,0
- 	b,n         perf_rdr_shift_out_U_leave
- 	nop
--	ssm			0,0
-+	ssm		0,0
- 	nop
- 
- perf_rdr_shift_out_U_leave:
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/perf_images.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/perf_images.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/perf_images.h	2005-03-24 01:16:08.000000000 -0500
-@@ -2,6 +2,7 @@
-  *    Imagine for use with the Onyx (PCX-U) CPU interface 
-  *
-  *    Copyright (C) 2001 Randolph Chung <tausq at parisc-linux.org>
-+ *    Copyright (C) 2001 Hewlett-Packard (Grant Grundler)
-  *
-  *    This program is free software; you can redistribute it and/or modify
-  *    it under the terms of the GNU General Public License as published by
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/real2.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/real2.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/real2.S	2005-03-24 01:16:08.000000000 -0500
-@@ -149,7 +149,7 @@
- rfi_virt2real:
- 	/* switch to real mode... */
- 	ssm		0,0		/* See "relied upon translation" */
--	nop				/* comment in interruption.S */
-+	nop				/* PA 2.0 Arch. F-5 */
- 	nop
- 	nop
- 	nop
-@@ -186,7 +186,7 @@
- 	.align 128
- rfi_real2virt:
- 	ssm		0,0		/* See "relied upon translation" */
--	nop				/* comment in interruption.S */
-+	nop				/* PA 2.0 Arch. F-5 */
- 	nop
- 	nop
- 	nop
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/smp.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/smp.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/smp.c	2005-03-24 01:16:08.000000000 -0500
-@@ -333,6 +333,7 @@
- 	struct smp_call_struct data;
- 	unsigned long timeout;
- 	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
-+	int retries = 0;
- 
- 	if (num_online_cpus() < 2)
- 		return 0;
-@@ -365,21 +366,22 @@
- 	/*  Send a message to all other CPUs and wait for them to respond  */
- 	send_IPI_allbutself(IPI_CALL_FUNC);
- 
-+ retry:
- 	/*  Wait for response  */
- 	timeout = jiffies + HZ;
- 	while ( (atomic_read (&data.unstarted_count) > 0) &&
- 		time_before (jiffies, timeout) )
- 		barrier ();
- 
-+	if (atomic_read (&data.unstarted_count) > 0) {
-+		printk(KERN_CRIT "SMP CALL FUNCTION TIMED OUT! (cpu=%d), try %d\n",
-+		      smp_processor_id(), ++retries);
-+		goto retry;
-+	}
- 	/* We either got one or timed out. Release the lock */
- 
- 	mb();
- 	smp_call_function_data = NULL;
--	if (atomic_read (&data.unstarted_count) > 0) {
--		printk(KERN_CRIT "SMP CALL FUNCTION TIMED OUT! (cpu=%d)\n",
--		      smp_processor_id());
--		return -ETIMEDOUT;
--	}
- 
- 	while (wait && atomic_read (&data.unfinished_count) > 0)
- 			barrier ();
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/syscall.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/syscall.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/syscall.S	2005-03-24 01:16:08.000000000 -0500
-@@ -16,6 +16,14 @@
- #include <asm/assembly.h>
- #include <asm/processor.h>
- 
-+	/* We fill the empty parts of the gateway page with
-+ 	 * something that will kill the kernel or a
-+ 	 * userspace application.
-+	 */
-+#define KILL_INSN	break	0,0
-+
-+#include <linux/config.h> /* for CONFIG_SMP */
-+
- #ifdef __LP64__
- 	.level          2.0w
- #else
-@@ -38,21 +46,41 @@
- 	.align 4096
- linux_gateway_page:
- 
--	.rept 56
--	break   0,0
-+        /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */
-+	.rept 44
-+	KILL_INSN
- 	.endr
- 
-+	/* ADDRESS 0xb0 to 0xb4, lws uses 1 insns for entry */
-+	/* Light-weight-syscall entry must always be located at 0xb0 */
-+	/* WARNING: Keep this number updated with table size changes */
-+#define __NR_lws_entries (2)
-+
-+lws_entry:
-+	/* Unconditional branch to lws_start, located on the 
-+	   same gateway page */
-+	b,n	lws_start
-+
-+	/* Fill from 0xb4 to 0xe0 */
-+	.rept 11
-+	KILL_INSN
-+	.endr
-+
-+	/* This function MUST be located at 0xe0 for glibc's threading 
-+	mechanism to work. DO NOT MOVE THIS CODE EVER! */
- set_thread_pointer:
- 	gate	.+8, %r0		/* increase privilege */
- 	depi	3, 31, 2, %r31		/* Ensure we return into user mode. */
- 	be	0(%sr7,%r31)		/* return to user space */
- 	mtctl	%r26, %cr27		/* move arg0 to the control register */
- 
-+	/* Increase the chance of trapping if random jumps occur to this
-+	address, fill from 0xf0 to 0x100 */
- 	.rept 4
--	break   0,0
-+	KILL_INSN
- 	.endr
- 
--/* This address must remain fixed, or user binaries go splat. */
-+/* This address must remain fixed at 0x100 for glibc's syscalls to work */
- 	.align 256
- linux_gateway_entry:
- 	gate	.+8, %r0			/* become privileged */
-@@ -157,6 +185,7 @@
- 
- 	/* Are we being ptraced? */
- 	mfctl	%cr30, %r1
-+	LDREG	TI_TASK(%r1),%r1
- 	LDREG	TASK_PTRACE(%r1), %r1
- 	bb,<,n	%r1,31,.Ltracesys
- 	
-@@ -177,11 +206,8 @@
- 	comiclr,>>=	__NR_Linux_syscalls, %r20, %r0
- 	b,n	.Lsyscall_nosys
- 	
--#ifdef __LP64__
--	ldd,s   %r20(%r19), %r19
--#else
--	ldwx,s  %r20(%r19), %r19
--#endif
-+	LDREGX  %r20(%r19), %r19
-+
- 	/* If this is a sys_rt_sigreturn call, and the signal was received
- 	 * when not in_syscall, then we want to return via syscall_exit_rfi,
- 	 * not syscall_exit.  Signal no. in r20, in_syscall in r25 (see
-@@ -291,11 +317,8 @@
- 	comiclr,>>=	__NR_Linux_syscalls, %r20, %r0
- 	b,n	.Lsyscall_nosys
- 
--#ifdef __LP64__
--	ldd,s   %r20(%r19), %r19
--#else
--	ldwx,s  %r20(%r19), %r19
--#endif
-+	LDREGX  %r20(%r19), %r19
-+
- 	/* If this is a sys_rt_sigreturn call, and the signal was received
- 	 * when not in_syscall, then we want to return via syscall_exit_rfi,
- 	 * not syscall_exit.  Signal no. in r20, in_syscall in r25 (see
-@@ -344,12 +367,295 @@
- 	ldil	L%syscall_exit_rfi,%r1
- 	be,n	R%syscall_exit_rfi(%sr7,%r1)
- 
-+
-+	/*********************************************************
-+		Light-weight-syscall code
-+
-+		r20 - lws number
-+		r26,r25,r24,r23,r22 - Input registers
-+		r28 - Function return register
-+		r21 - Error code.
-+
-+		Scracth: Any of the above that aren't being
-+		currently used, including r1. 
-+
-+		Return pointer: r31 (Not usable)
-+
-+		Error codes returned by entry path:
-+
-+		ENOSYS - r20 was an invalid LWS number.
-+
-+	*********************************************************/
-+lws_start:
-+	/* Gate and ensure we return to userspace */
-+	gate	.+8, %r0
-+	depi	3, 31, 2, %r31	/* Ensure we return to userspace */
-+
-+#ifdef __LP64__
-+	/* FIXME: If we are a 64-bit kernel just
-+	 *        turn this on unconditionally.
-+	 */
-+	ssm	PSW_SM_W, %r1
-+	extrd,u	%r1,PSW_W_BIT,1,%r1
-+	/* sp must be aligned on 4, so deposit the W bit setting into
-+	 * the bottom of sp temporarily */
-+	or,ev	%r1,%r30,%r30
-+
-+	/* Clip LWS number to a 32-bit value always */
-+	depdi	0, 31, 32, %r20
-+#endif	
-+
-+        /* Is the lws entry number valid? */
-+	comiclr,>>=	__NR_lws_entries, %r20, %r0
-+	b,n	lws_exit_nosys
-+
-+	/* WARNING: Trashing sr2 and sr3 */
-+	mfsp	%sr7,%r1			/* get userspace into sr3 */
-+	mtsp	%r1,%sr3
-+	mtsp	%r0,%sr2			/* get kernel space into sr2 */
-+
-+	/* Load table start */
-+	ldil	L%lws_table, %r1
-+	ldo	R%lws_table(%r1), %r28	/* Scratch use of r28 */
-+	LDREGX	%r20(%sr2,r28), %r21	/* Scratch use of r21 */
-+
-+	/* Jump to lws, lws table pointers already relocated */
-+	be,n	0(%sr2,%r21)
-+
-+lws_exit_nosys:
-+	ldo	-ENOSYS(%r0),%r21		   /* set errno */
-+	/* Fall through: Return to userspace */
-+
-+lws_exit:
-+#ifdef __LP64__
-+	/* decide whether to reset the wide mode bit
-+	 *
-+	 * For a syscall, the W bit is stored in the lowest bit
-+	 * of sp.  Extract it and reset W if it is zero */
-+	extrd,u,*<>	%r30,63,1,%r1
-+	rsm	PSW_SM_W, %r0
-+	/* now reset the lowest bit of sp if it was set */
-+	xor	%r30,%r1,%r30
-+#endif
-+	be,n	0(%sr3, %r31)
-+
-+
-+	
-+	/***************************************************
-+		Implementing CAS as an atomic operation:
-+
-+		%r26 - Address to examine
-+		%r25 - Old value to check (old)
-+		%r24 - New value to set (new)
-+		%r28 - Return prev through this register.
-+		%r21 - Kernel error code
-+
-+		If debugging is DISabled:
-+
-+		%r21 has the following meanings:
-+
-+		EAGAIN - CAS is busy, ldcw failed, try again.
-+		EFAULT - Read or write failed.		
-+
-+		If debugging is enabled:
-+
-+		EDEADLOCK - CAS called recursively.
-+		EAGAIN && r28 == 1 - CAS is busy. Lock contended.
-+		EAGAIN && r28 == 2 - CAS is busy. ldcw failed.
-+		EFAULT - Read or write failed.
-+
-+		Scratch: r20, r28, r1
-+
-+	****************************************************/
-+
-+	/* Do not enable LWS debugging */
-+#define ENABLE_LWS_DEBUG 0 
-+
-+	/* ELF64 Process entry path */
-+lws_compare_and_swap64:
-+#ifdef __LP64__
-+	b,n	lws_compare_and_swap
-+#else
-+	/* If we are not a 64-bit kernel, then we don't
-+	 * implement having 64-bit input registers
-+	 */
-+	b,n	lws_exit_nosys
-+#endif
-+
-+	/* ELF32 Process entry path */
-+lws_compare_and_swap32:
-+#ifdef __LP64__
-+	/* Clip all the input registers */
-+	depdi	0, 31, 32, %r26
-+	depdi	0, 31, 32, %r25
-+	depdi	0, 31, 32, %r24
-+#endif
-+
-+lws_compare_and_swap:
-+#ifdef CONFIG_SMP
-+	/* Load start of lock table */
-+	ldil	L%lws_lock_start, %r20
-+	ldo	R%lws_lock_start(%r20), %r28
-+
-+	/* Extract four bits from r26 and hash lock (Bits 4-7) */
-+	extru  %r26, 27, 4, %r20
-+
-+	/* Find lock to use, the hash is either one of 0 to
-+	   15, multiplied by 16 (keep it 16-byte aligned)
-+	   and add to the lock table offset. */
-+	shlw	%r20, 4, %r20
-+	add	%r20, %r28, %r20
-+
-+# ifdef ENABLE_LWS_DEBUG
-+	/*	
-+		DEBUG, check for deadlock! 
-+		If the thread register values are the same
-+		then we were the one that locked it last and
-+		this is a recurisve call that will deadlock.
-+		We *must* giveup this call and fail.
-+	*/
-+	ldw	4(%sr2,%r20), %r28			/* Load thread register */
-+	mfctl	%cr27, %r21				/* Get current thread register */
-+	cmpb,<>,n	%r21, %r28, cas_lock		/* Called recursive? */
-+	b	lws_exit				/* Return error! */
-+	ldo	-EDEADLOCK(%r0), %r21
-+cas_lock:
-+	/* FIXME: This check is required! */
-+	cmpb,=,n	%r0, %r28, cas_nocontend	/* Is nobody using it? */
-+	ldo	1(%r0), %r28				/* 1st case */
-+	b	lws_exit				/* Contended... */
-+	ldo	-EAGAIN(%r0), %r21			/* Spin in userspace */
-+cas_nocontend:
-+# endif
-+/* ENABLE_LWS_DEBUG */
-+
-+	ldcw	0(%sr2,%r20), %r28			/* Try to acquire the lock */
-+	cmpb,<>,n	%r0, %r28, cas_action		/* Did we get it? */
-+cas_wouldblock:
-+	ldo	2(%r0), %r28				/* 2nd case */
-+	b	lws_exit				/* Contended... */
-+	ldo	-EAGAIN(%r0), %r21			/* Spin in userspace */
-+#endif
-+/* CONFIG_SMP */
-+
-+	/*
-+		prev = *addr;
-+		if ( prev == old )
-+		  *addr = new;
-+		return prev;
-+	*/
-+
-+	/* NOTES:
-+		This all works becuse intr_do_signal
-+		and schedule both check the return iasq
-+		and see that we are on the kernel page
-+		so this process is never scheduled off
-+		or is ever sent any signal of any sort,
-+		thus it is wholly atomic from usrspaces
-+		perspective
-+	*/
-+cas_action:
-+#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG
-+	/* DEBUG */
-+	mfctl	%cr27, %r1
-+	stw	%r1, 4(%sr2,%r20)
-+#endif
-+	/* The load and store could fail */
-+1:	ldw	0(%sr3,%r26), %r28
-+	sub,<>	%r28, %r25, %r0
-+2:	stw	%r24, 0(%sr3,%r26)
-+#ifdef CONFIG_SMP
-+	/* Free lock */
-+	stw	%r20, 0(%sr2,%r20)
-+# ifdef ENABLE_LWS_DEBUG
-+	/* Clear thread register indicator */
-+	stw	%r0, 4(%sr2,%r20)
-+# endif
-+#endif
-+	/* Return to userspace, set no error */
-+	b	lws_exit
-+	copy	%r0, %r21
-+	nop	/* Add some visual space in objdump */
-+	nop
-+	nop
-+	nop
-+3:		
-+	/* Error occured on load or store */
-+#ifdef CONFIG_SMP
-+	/* Free lock */
-+	stw	%r20, 0(%sr2,%r20)
-+# ifdef ENABLE_LWS_DEBUG
-+	stw	%r0, 4(%sr2,%r20)
-+# endif
-+#endif
-+	b	lws_exit
-+	ldo	-EFAULT(%r0),%r21	/* set errno */
-+	nop
-+	nop
-+	nop
-+	nop
-+
-+	/* Two exception table entries, one for the load,
-+	   the other for the store. Either return -EFAULT */
-+	.section __ex_table,"aw"
-+#ifdef __LP64__
-+	/* Pad the address calculation */
-+	.word	0,(2b - linux_gateway_page)
-+	.dword	(3b - 2b) 
-+#else
-+	.word	2b - linux_gateway_page
-+	.word	(3b - 2b) 
-+#endif
-+	.previous
-+
-+	.section __ex_table,"aw"
-+#ifdef __LP64__
-+	/* Pad the address calculation */
-+	.word	0,(1b - linux_gateway_page)
-+	.dword	(3b - 1b) 
-+#else
-+	.word	1b - linux_gateway_page
-+	.word	(3b - 1b) 
-+#endif
-+	.previous
-+
-+end_compare_and_swap:
-+
-+	/* Make sure nothing else is placed on this page */
-+	.align 4096
-+	.export end_linux_gateway_page
-+end_linux_gateway_page:
-+
-+	/* Relocate symbols assuming linux_gateway_page is mapped
-+	   to virtual address 0x0 */
-+#ifdef __LP64__
-+	/* FIXME: The code will always be on the gateay page
-+		  and thus it will be on the first 4k, the
-+		  assembler seems to think that the final
-+		  subtraction result is only a word in
-+		  length, so we pad the value.
-+	*/
-+#define LWS_ENTRY(_name_) .word 0,(lws_##_name_ - linux_gateway_page)
-+#else
-+#define LWS_ENTRY(_name_) .word  (lws_##_name_ - linux_gateway_page)
-+#endif
-+
-+	.align 4096
-+	/* Light-weight-syscall table */
-+	/* Start of lws table. */
-+	.export lws_table
-+.Llws_table:
-+lws_table:
-+	LWS_ENTRY(compare_and_swap32)	/* 0 - ELF32 Atomic compare and swap */
-+	LWS_ENTRY(compare_and_swap64)	/* 1 - ELF64 Atomic compare and swap */
-+	/* End of lws table */
-+
- 	.align 4096
- 	.export sys_call_table
- .Lsys_call_table:
- sys_call_table:
- #include "syscall_table.S"
--.end
-+
- #ifdef __LP64__
- 	.align 4096
- 	.export sys_call_table64
-@@ -359,10 +665,29 @@
- #include "syscall_table.S"
- #endif
- 
-+#ifdef CONFIG_SMP
-+	/*
-+		All light-weight-syscall atomic operations 
-+		will use this set of locks 
-+	*/
-+	.section .data
-+	.align 4096
-+	.export lws_lock_start
-+.Llws_lock_start:
-+lws_lock_start:
-+	/* lws locks */
-+	.align 16
-+	.rept 16
-+	/* Keep locks aligned at 16-bytes */
-+	.word 1
-+	.word 0 
-+	.word 0
-+	.word 0
-+	.endr
-+	.previous
-+#endif
-+/* CONFIG_SMP for lws_lock_start */
- 
--	/* Make sure nothing else is placed on this page */
-+.end
- 
--	.align 4096
--	.export end_linux_gateway_page
--end_linux_gateway_page:
- 
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/syscall_table.S
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/syscall_table.S	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/syscall_table.S	2005-03-24 01:16:08.000000000 -0500
-@@ -334,12 +334,12 @@
- 	ENTRY_SAME(epoll_ctl)		/* 225 */
- 	ENTRY_SAME(epoll_wait)
-  	ENTRY_SAME(remap_file_pages)
--  ENTRY_SAME(semtimedop)
--  ENTRY_SAME(mq_open)
--  ENTRY_SAME(mq_unlink)   /* 230 */
--  ENTRY_SAME(mq_timedsend)
--  ENTRY_SAME(mq_timedreceive)
--  ENTRY_SAME(mq_notify)
--  ENTRY_SAME(mq_getsetattr)
--  /* Nothing yet */       /* 235 */
-+	ENTRY_SAME(semtimedop)
-+	ENTRY_SAME(mq_open)
-+	ENTRY_SAME(mq_unlink)   /* 230 */
-+	ENTRY_SAME(mq_timedsend)
-+	ENTRY_SAME(mq_timedreceive)
-+	ENTRY_SAME(mq_notify)
-+	ENTRY_SAME(mq_getsetattr)
-+	/* Nothing yet */       /* 235 */
- 
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/traps.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/traps.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/traps.c	2005-03-24 01:16:08.000000000 -0500
-@@ -135,32 +135,19 @@
- 
- EXPORT_SYMBOL(dump_stack);
- 
--void show_stack(struct task_struct *task, unsigned long *s)
-+static void do_show_stack(struct unwind_frame_info *info)
- {
- 	int i = 1;
--	struct unwind_frame_info info;
--
--	if (!task) {
--		unsigned long sp, ip, rp;
--
--HERE:
--		asm volatile ("copy %%r30, %0" : "=r"(sp));
--		ip = (unsigned long)&&HERE;
--		rp = (unsigned long)__builtin_return_address(0);
--		unwind_frame_init(&info, current, sp, ip, rp);
--	} else {
--		unwind_frame_init_from_blocked_task(&info, task);
--	}
- 
- 	printk("Backtrace:\n");
- 	while (i <= 16) {
--		if (unwind_once(&info) < 0 || info.ip == 0)
-+		if (unwind_once(info) < 0 || info->ip == 0)
- 			break;
- 
--		if (__kernel_text_address(info.ip)) {
--			printk(" [<" RFMT ">] ", info.ip);
-+		if (__kernel_text_address(info->ip)) {
-+			printk(" [<" RFMT ">] ", info->ip);
- #ifdef CONFIG_KALLSYMS
--			print_symbol("%s\n", info.ip);
-+			print_symbol("%s\n", info->ip);
- #else
- 			if ((i & 0x03) == 0)
- 				printk("\n");
-@@ -171,6 +158,25 @@
- 	printk("\n");
- }
- 
-+void show_stack(struct task_struct *task, unsigned long *s)
-+{
-+	struct unwind_frame_info info;
-+
-+	if (!task) {
-+		unsigned long sp, ip, rp;
-+
-+HERE:
-+		asm volatile ("copy %%r30, %0" : "=r"(sp));
-+		ip = (unsigned long)&&HERE;
-+		rp = (unsigned long)__builtin_return_address(0);
-+		unwind_frame_init(&info, current, sp, ip, rp);
-+	} else {
-+		unwind_frame_init_from_blocked_task(&info, task);
-+	}
-+
-+	do_show_stack(&info);
-+}
-+
- void die_if_kernel(char *str, struct pt_regs *regs, long err)
- {
- 	if (user_mode(regs)) {
-@@ -373,9 +379,9 @@
- 
- 
- /*
-- * This routine handles page faults.  It determines the address,
-- * and the problem, and then passes it off to one of the appropriate
-- * routines.
-+ * This routine is called as a last resort when everything else
-+ * has gone clearly wrong. We get called for faults in kernel space,
-+ * and HPMC's.
-  */
- void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset)
- {
-@@ -407,7 +413,12 @@
- 
- 	}
- 	    
--	show_stack(NULL, (unsigned long *)regs->gr[30]);
-+	{
-+		/* show_stack(NULL, (unsigned long *)regs->gr[30]); */
-+		struct unwind_frame_info info;
-+		unwind_frame_init(&info, current, regs->gr[30], regs->iaoq[0], regs->gr[2]);
-+		do_show_stack(&info);
-+	}
- 
- 	printk("\n");
- 	printk(KERN_CRIT "%s: Code=%d regs=%p (Addr=" RFMT ")\n",
-@@ -421,9 +432,16 @@
- 	 * system will shut down immediately right here. */
- 	pdc_soft_power_button(0);
- 	
--	/* Gutter the processor! */
--	for(;;)
--	    ;
-+	/* Call kernel panic() so reboot timeouts work properly 
-+	 * FIXME: This function should be on the list of
-+	 * panic notifiers, and we should call panic
-+	 * directly from the location that we wish. 
-+	 * e.g. We should not call panic from
-+	 * parisc_terminate, but rather the oter way around.
-+	 * This hack works, prints the panic message twice,
-+	 * and it enables reboot timers!
-+	 */
-+	panic(msg);
- }
- 
- void handle_interruption(int code, struct pt_regs *regs)
-@@ -437,6 +455,36 @@
- 	else
- 	    local_irq_enable();
- 
-+	/* Security check:
-+	 * If the priority level is still user, and the
-+	 * faulting space is not equal to the active space
-+	 * then the user is attempting something in a space
-+	 * that does not belong to them. Kill the process.
-+	 *
-+	 * This is normally the situation when the user
-+	 * attempts to jump into the kernel space at the
-+	 * wrong offset, be it at the gateway page or a
-+	 * random location.
-+	 *
-+	 * We cannot normally signal the process because it
-+	 * could *be* on the gateway page, and processes
-+	 * executing on the gateway page can't have signals
-+	 * delivered.
-+	 * 
-+	 * We merely readjust the address into the users
-+	 * space, at a destination address of zero, and
-+	 * allow processing to continue.
-+	 */
-+	if (((unsigned long)regs->iaoq[0] & 3) &&
-+	    ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { 
-+	  	/* Kill the user process later */
-+	  	regs->iaoq[0] = 0 | 3;
-+		regs->iaoq[1] = regs->iaoq[0] + 4;
-+	 	regs->iasq[0] = regs->iasq[0] = regs->sr[7];
-+		regs->gr[0] &= ~PSW_B;
-+		return;
-+	}
-+	
- #if 0
- 	printk(KERN_CRIT "Interruption # %d\n", code);
- #endif
-@@ -461,7 +509,7 @@
- 	case  3:
- 		/* Recovery counter trap */
- 		regs->gr[0] &= ~PSW_R;
--		if (regs->iasq[0])
-+		if (user_space(regs))
- 			handle_gdb_break(regs, TRAP_TRACE);
- 		/* else this must be the start of a syscall - just let it run */
- 		return;
-@@ -565,9 +613,16 @@
- 		/* Fall through */
- 	case 17:
- 		/* Non-access data TLB miss fault/Non-access data page fault */
--		/* TODO: Still need to add slow path emulation code here */
--		/* TODO: Understand what is meant by the TODO listed
--		         above this one. (Carlos) */
-+		/* FIXME: 
-+		 	 Still need to add slow path emulation code here!
-+		         If the insn used a non-shadow register, then the tlb
-+			 handlers could not have their side-effect (e.g. probe
-+			 writing to a target register) emulated since rfir would
-+			 erase the changes to said register. Instead we have to
-+			 setup everything, call this function we are in, and emulate
-+			 by hand. Technically we need to emulate:
-+			 fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw
-+		*/			  
- 		fault_address = regs->ior;
- 		fault_space = regs->isr;
- 		break;
-@@ -598,7 +653,7 @@
- 	case 25:
- 		/* Taken branch trap */
- 		regs->gr[0] &= ~PSW_T;
--		if (regs->iasq[0])
-+		if (user_space(regs))
- 			handle_gdb_break(regs, TRAP_BRANCH);
- 		/* else this must be the start of a syscall - just let it
- 		 * run.
-@@ -677,7 +732,7 @@
- 	}
- 
- 	if (user_mode(regs)) {
--	    if ((fault_space>>SPACEID_SHIFT) != (regs->sr[7] >> SPACEID_SHIFT)) {
-+	    if ((fault_space >> SPACEID_SHIFT) != (regs->sr[7] >> SPACEID_SHIFT)) {
- #ifdef PRINT_USER_FAULTS
- 		if (fault_space == 0)
- 			printk(KERN_DEBUG "User Fault on Kernel Space ");
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/unaligned.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/unaligned.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/unaligned.c	2005-03-24 01:16:08.000000000 -0500
-@@ -559,7 +559,7 @@
- 
- 	if (regs->isr != regs->sr[7])
- 	{
--		printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT "\n",
-+		printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT ")\n",
- 			regs->isr, regs->sr[7]);
- 
- 		/* don't kill him though, since he has appropriate access to the page, or we
-Index: debian-kernel-hppa-2.6.8/arch/parisc/kernel/unwind.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/kernel/unwind.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/kernel/unwind.c	2005-03-24 01:16:08.000000000 -0500
-@@ -12,8 +12,10 @@
- #include <linux/kernel.h>
- #include <linux/init.h>
- #include <linux/slab.h>
-+#include <linux/kallsyms.h>
- 
- #include <asm/uaccess.h>
-+#include <asm/assembly.h>
- 
- #include <asm/unwind.h>
- 
-@@ -43,22 +45,24 @@
- 	const struct unwind_table_entry *e = 0;
- 	unsigned long lo, hi, mid;
- 
--	for (lo = 0, hi = table->length; lo < hi; )
--	{
--		mid = (lo + hi) / 2;
-+	lo = 0; 
-+	hi = table->length - 1; 
-+	
-+	while (lo <= hi) {
-+		mid = (hi - lo) / 2 + lo;
- 		e = &table->table[mid];
- 		if (addr < e->region_start)
--			hi = mid;
-+			hi = mid - 1;
- 		else if (addr > e->region_end)
- 			lo = mid + 1;
- 		else
--			break;
-+			return e;
- 	}
- 
--	return e;
-+	return NULL;
- }
- 
--static inline const struct unwind_table_entry *
-+static const struct unwind_table_entry *
- find_unwind_entry(unsigned long addr)
- {
- 	struct unwind_table *table = unwind_tables;
-@@ -68,8 +72,7 @@
- 	    addr <= kernel_unwind_table.end)
- 		e = find_unwind_entry_in_table(&kernel_unwind_table, addr);
- 	else
--		for (; table; table = table->next)
--		{
-+		for (; table; table = table->next) {
- 			if (addr >= table->start && 
- 			    addr <= table->end)
- 				e = find_unwind_entry_in_table(table, addr);
-@@ -99,6 +102,11 @@
- 	table->next = NULL;
- 
- 	for (; start <= end; start++) {
-+		if (start < end && 
-+		    start->region_end > (start+1)->region_start) {
-+			printk("WARNING: Out of order unwind entry! %p and %p\n", start, start+1);
-+		}
-+
- 		start->region_start += base_addr;
- 		start->region_end += base_addr;
- 	}
-@@ -170,12 +178,40 @@
- 	int looking_for_rp, rpoffset = 0;
- 
- 	e = find_unwind_entry(info->ip);
--	if (!e) {
-+	if (e == NULL) {
- 		unsigned long sp;
- 		extern char _stext[], _etext[];
- 
- 		dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip);
- 
-+#ifdef CONFIG_KALLSYMS
-+		/* Handle some frequent special cases.... */
-+		{
-+			char symname[KSYM_NAME_LEN+1];
-+			char *modname;
-+			unsigned long symsize, offset;
-+
-+			kallsyms_lookup(info->ip, &symsize, &offset,
-+					&modname, symname);
-+
-+			dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname);
-+
-+			if (strcmp(symname, "_switch_to_ret") == 0) {
-+				info->prev_sp = info->sp - CALLEE_SAVE_FRAME_SIZE;
-+				info->prev_ip = *(unsigned long *)(info->prev_sp - RP_OFFSET);
-+				dbg("_switch_to_ret @ %lx - setting "
-+				    "prev_sp=%lx prev_ip=%lx\n", 
-+				    info->ip, info->prev_sp, 
-+				    info->prev_ip);
-+				return;
-+			} else if (strcmp(symname, "ret_from_kernel_thread") == 0 ||
-+				   strcmp(symname, "syscall_exit") == 0) {
-+				info->prev_ip = info->prev_sp = 0;
-+				return;
-+			}
-+		}
-+#endif
-+
- 		/* Since we are doing the unwinding blind, we don't know if
- 		   we are adjusting the stack correctly or extracting the rp
- 		   correctly. The rp is checked to see if it belongs to the
-@@ -185,30 +221,33 @@
- 		   modules. */
- 		sp = info->sp & ~63;
- 		do {
--			info->prev_sp = sp - 64;
--
--			/* FIXME: what happens if we unwind too far so that 
--			   sp no longer falls in a mapped kernel page? */
--#ifndef __LP64__
--			info->prev_ip = *(unsigned long *)(info->prev_sp - 20);
--#else
--			info->prev_ip = *(unsigned long *)(info->prev_sp - 16);
--#endif
-+			unsigned long tmp;
- 
-+			info->prev_sp = sp - 64;
-+			info->prev_ip = 0;
-+			if (get_user(tmp, (unsigned long *)(info->prev_sp - RP_OFFSET))) 
-+				break;
-+			info->prev_ip = tmp;
- 			sp = info->prev_sp;
- 		} while (info->prev_ip < (unsigned long)_stext ||
- 			 info->prev_ip > (unsigned long)_etext);
- 
--		dbg("analyzing func @ %lx with no unwind info, setting prev_sp=%lx prev_ip=%lx\n", info->ip, info->prev_sp, info->prev_ip);
--	} else {
-+		info->rp = 0;
- 
--		dbg("e->start = 0x%x, e->end = 0x%x, Save_SP = %d, Save_RP = %d size = %u\n",
--				e->region_start, e->region_end, e->Save_SP, e->Save_RP, e->Total_frame_size);
-+		dbg("analyzing func @ %lx with no unwind info, setting "
-+		    "prev_sp=%lx prev_ip=%lx\n", info->ip, 
-+		    info->prev_sp, info->prev_ip);
-+	} else {
-+		dbg("e->start = 0x%x, e->end = 0x%x, Save_SP = %d, "
-+		    "Save_RP = %d size = %u\n", e->region_start, 
-+		    e->region_end, e->Save_SP, e->Save_RP, 
-+		    e->Total_frame_size);
- 
- 		looking_for_rp = e->Save_RP;
- 
- 		for (npc = e->region_start; 
--		     (frame_size < (e->Total_frame_size << 3) || looking_for_rp) && 
-+		     (frame_size < (e->Total_frame_size << 3) || 
-+		      looking_for_rp) && 
- 		     npc < info->ip; 
- 		     npc += 4) {
- 
-@@ -219,22 +258,28 @@
- 				/* ldo X(sp), sp, or stwm X,D(sp) */
- 				frame_size += (insn & 0x1 ? -1 << 13 : 0) | 
- 					((insn & 0x3fff) >> 1);
--				dbg("analyzing func @ %lx, insn=%08x @ %lx, frame_size = %ld\n", info->ip, insn, npc, frame_size);
--			} else if ((insn & 0xffe00008) == 0x7ec00008) {
-+				dbg("analyzing func @ %lx, insn=%08x @ "
-+				    "%lx, frame_size = %ld\n", info->ip,
-+				    insn, npc, frame_size);
-+			} else if ((insn & 0xffe00008) == 0x73c00008) {
- 				/* std,ma X,D(sp) */
- 				frame_size += (insn & 0x1 ? -1 << 13 : 0) | 
- 					(((insn >> 4) & 0x3ff) << 3);
--				dbg("analyzing func @ %lx, insn=%08x @ %lx, frame_size = %ld\n", info->ip, insn, npc, frame_size);
-+				dbg("analyzing func @ %lx, insn=%08x @ "
-+				    "%lx, frame_size = %ld\n", info->ip,
-+				    insn, npc, frame_size);
- 			} else if (insn == 0x6bc23fd9) { 
- 				/* stw rp,-20(sp) */
- 				rpoffset = 20;
- 				looking_for_rp = 0;
--				dbg("analyzing func @ %lx, insn=stw rp,-20(sp) @ %lx\n", info->ip, npc);
-+				dbg("analyzing func @ %lx, insn=stw rp,"
-+				    "-20(sp) @ %lx\n", info->ip, npc);
- 			} else if (insn == 0x0fc212c1) {
- 				/* std rp,-16(sr0,sp) */
- 				rpoffset = 16;
- 				looking_for_rp = 0;
--				dbg("analyzing func @ %lx, insn=std rp,-16(sp) @ %lx\n", info->ip, npc);
-+				dbg("analyzing func @ %lx, insn=std rp,"
-+				    "-16(sp) @ %lx\n", info->ip, npc);
- 			}
- 		}
- 
-@@ -244,7 +289,9 @@
- 		info->prev_ip = info->rp;
- 		info->rp = 0;
- 
--		dbg("analyzing func @ %lx, setting prev_sp=%lx prev_ip=%lx\n", info->ip, info->prev_sp, info->prev_ip);
-+		dbg("analyzing func @ %lx, setting prev_sp=%lx "
-+		    "prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp, 
-+		    info->prev_ip, npc);
- 	}
- }
- 
-@@ -257,7 +304,8 @@
- 	info->ip = ip;
- 	info->rp = rp;
- 
--	dbg("(%d) Start unwind from sp=%08lx ip=%08lx\n", t ? (int)t->pid : 0, info->sp, info->ip);
-+	dbg("(%d) Start unwind from sp=%08lx ip=%08lx\n", 
-+	    t ? (int)t->pid : -1, info->sp, info->ip);
- }
- 
- void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, struct task_struct *t)
-@@ -285,7 +333,9 @@
- 	next_frame->prev_sp = 0;
- 	next_frame->prev_ip = 0;
- 
--	dbg("(%d) Continue unwind to sp=%08lx ip=%08lx\n", (int)next_frame->t->pid, next_frame->sp, next_frame->ip);
-+	dbg("(%d) Continue unwind to sp=%08lx ip=%08lx\n", 
-+	    next_frame->t ? (int)next_frame->t->pid : -1, 
-+	    next_frame->sp, next_frame->ip);
- 
- 	return 0;
- }
-Index: debian-kernel-hppa-2.6.8/arch/parisc/lib/bitops.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/lib/bitops.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/lib/bitops.c	2005-03-24 01:16:08.000000000 -0500
-@@ -13,8 +13,8 @@
- #include <asm/atomic.h>
- 
- #ifdef CONFIG_SMP
--atomic_lock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = {
--	[0 ... (ATOMIC_HASH_SIZE-1)]  = (atomic_lock_t) { { 1, 1, 1, 1 } }
-+spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = {
-+	[0 ... (ATOMIC_HASH_SIZE-1)]  = SPIN_LOCK_UNLOCKED
- };
- #endif
- 
-@@ -23,10 +23,10 @@
- {
- 	unsigned long temp, flags;
- 
--	atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_lock_irqsave(ptr, flags);
- 	temp = *ptr;
- 	*ptr = x;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_unlock_irqrestore(ptr, flags);
- 	return temp;
- }
- #endif
-@@ -36,10 +36,10 @@
- 	unsigned long flags;
- 	long temp;
- 
--	atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_lock_irqsave(ptr, flags);
- 	temp = (long) *ptr;	/* XXX - sign extension wanted? */
- 	*ptr = x;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_unlock_irqrestore(ptr, flags);
- 	return (unsigned long)temp;
- }
- 
-@@ -49,10 +49,10 @@
- 	unsigned long flags;
- 	long temp;
- 
--	atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_lock_irqsave(ptr, flags);
- 	temp = (long) *ptr;	/* XXX - sign extension wanted? */
- 	*ptr = x;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_unlock_irqrestore(ptr, flags);
- 	return (unsigned long)temp;
- }
- 
-@@ -63,10 +63,10 @@
- 	unsigned long flags;
- 	unsigned long prev;
- 
--	atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_lock_irqsave(ptr, flags);
- 	if ((prev = *ptr) == old)
- 		*ptr = new;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_unlock_irqrestore(ptr, flags);
- 	return prev;
- }
- #endif
-@@ -76,9 +76,9 @@
- 	unsigned long flags;
- 	unsigned int prev;
- 
--	atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_lock_irqsave(ptr, flags);
- 	if ((prev = *ptr) == old)
- 		*ptr = new;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
-+	_atomic_spin_unlock_irqrestore(ptr, flags);
- 	return (unsigned long)prev;
- }
-Index: debian-kernel-hppa-2.6.8/arch/parisc/lib/debuglocks.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/lib/debuglocks.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/lib/debuglocks.c	2005-03-24 01:16:08.000000000 -0500
-@@ -18,6 +18,11 @@
-  *    You should have received a copy of the GNU General Public License
-  *    along with this program; if not, write to the Free Software
-  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+ *
-+ *    We use pdc_printf() throughout the file for all output messages, to avoid
-+ *    losing messages because of disabled interrupts. Since we're using these
-+ *    messages for debugging purposes, it makes sense not to send them to the
-+ *    linux console.
-  */
- 
- 
-@@ -27,12 +32,14 @@
- #include <linux/spinlock.h>
- #include <asm/system.h>
- #include <asm/hardirq.h>	/* in_interrupt() */
-+#include <asm/pdc.h>
- 
- #undef INIT_STUCK
- #define INIT_STUCK 1L << 30
- 
- #ifdef CONFIG_DEBUG_SPINLOCK
- 
-+
- void _dbg_spin_lock(spinlock_t * lock, const char *base_file, int line_no)
- {
- 	volatile unsigned int *a;
-@@ -59,12 +66,14 @@
- 	 * <tausq> __ldcw() returns 1 if we get the lock; otherwise we
- 	 * 	spin until the value of the lock changes, or we time out.
- 	 */
-+	mb();
- 	a = __ldcw_align(lock);
- 	while (stuck && (__ldcw(a) == 0))
- 		while ((*a == 0) && --stuck);
-+	mb();
- 
- 	if (unlikely(stuck <= 0)) {
--		printk(KERN_WARNING
-+		pdc_printf(
- 			"%s:%d: spin_lock(%s/%p) stuck in %s at %p(%d)"
- 			" owned by %s:%d in %s at %p(%d)\n",
- 			base_file, line_no, lock->module, lock,
-@@ -84,7 +93,7 @@
- 	lock->bline = line_no;
- 
- 	if (unlikely(printed)) {
--		printk(KERN_WARNING
-+		pdc_printf(
- 			"%s:%d: spin_lock grabbed in %s at %p(%d) %ld ticks\n",
- 			base_file, line_no, current->comm, inline_pc,
- 			cpu, jiffies - started);
-@@ -94,21 +103,28 @@
- void _dbg_spin_unlock(spinlock_t * lock, const char *base_file, int line_no)
- {
- 	CHECK_LOCK(lock);
--	volatile unsigned int *a = __ldcw_align(lock);
-+	volatile unsigned int *a;
-+	mb();
-+	a = __ldcw_align(lock);
- 	if (unlikely((*a != 0) && lock->babble)) {
- 		lock->babble--;
--		printk(KERN_WARNING
-+		pdc_printf(
- 			"%s:%d: spin_unlock(%s:%p) not locked\n",
- 			base_file, line_no, lock->module, lock);
- 	}
- 	*a = 1;	
-+	mb();
- }
- 
- int _dbg_spin_trylock(spinlock_t * lock, const char *base_file, int line_no)
- {
- 	int ret;
--	volatile unsigned int *a = __ldcw_align(lock);
--	if ((ret = (__ldcw(a) != 0))) {
-+	volatile unsigned int *a;
-+	mb();
-+	a = __ldcw_align(lock);
-+	ret = (__ldcw(a) != 0);
-+	mb();
-+	if (ret) {
- 		lock->oncpu = smp_processor_id();
- 		lock->previous = __builtin_return_address(0);
- 		lock->task = current;
-@@ -150,7 +166,7 @@
- 	int cpu = smp_processor_id();
- 	
- 	if(unlikely(in_interrupt())) {	/* acquiring write lock in interrupt context, bad idea */
--		printk(KERN_WARNING "write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline);
-+		pdc_printf("write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline);
- 		BUG();
- 	}
- 
-@@ -167,7 +183,7 @@
- 		
- 		stuck--;
- 		if ((unlikely(stuck <= 0)) && (rw->counter < 0)) {
--			printk(KERN_WARNING
-+			pdc_printf(
- 				"%s:%d: write_lock stuck on writer"
- 				" in %s at %p(%d) %ld ticks\n",
- 				bfile, bline, current->comm, inline_pc,
-@@ -176,7 +192,7 @@
- 			printed = 1;
- 		}
- 		else if (unlikely(stuck <= 0)) {
--			printk(KERN_WARNING
-+			pdc_printf(
- 				"%s:%d: write_lock stuck on reader"
- 				" in %s at %p(%d) %ld ticks\n",
- 				bfile, bline, current->comm, inline_pc,
-@@ -194,7 +210,7 @@
- 	rw->counter = -1; /* remember we are locked */
- 
- 	if (unlikely(printed)) {
--		printk(KERN_WARNING
-+		pdc_printf(
- 			"%s:%d: write_lock grabbed in %s at %p(%d) %ld ticks\n",
- 			bfile, bline, current->comm, inline_pc,
- 			cpu, jiffies - started);
-@@ -215,7 +231,7 @@
- 
- 	rw->counter++;
- #if 0
--	printk(KERN_WARNING
-+	pdc_printf(
- 		"%s:%d: read_lock grabbed in %s at %p(%d) %ld ticks\n",
- 		bfile, bline, current->comm, inline_pc,
- 		cpu, jiffies - started);
-Index: debian-kernel-hppa-2.6.8/arch/parisc/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -52,7 +52,6 @@
- cflags-$(CONFIG_PA8X00)		+= -march=2.0 -mschedule=8000
- 
- head-y			:= arch/parisc/kernel/head.o 
--head-$(CONFIG_PARISC64)	:= arch/parisc/kernel/head64.o
- 
- CFLAGS	+= $(cflags-y)
- 
-Index: debian-kernel-hppa-2.6.8/arch/parisc/mm/init.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/arch/parisc/mm/init.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/arch/parisc/mm/init.c	2005-03-24 01:16:08.000000000 -0500
-@@ -750,7 +750,7 @@
- #if PTRS_PER_PMD == 1
- 	pmd = (pmd_t *)__pa(pg_dir);
- #else
--	pmd = (pmd_t *) (PAGE_MASK & pgd_val(*pg_dir));
-+	pmd = (pmd_t *) pgd_address(*pg_dir);
- 
- 	/*
- 	 * pmd is physical at this point
-@@ -761,7 +761,7 @@
- 		pmd = (pmd_t *) __pa(pmd);
- 	}
- 
--	pgd_val(*pg_dir) = _PAGE_TABLE | (unsigned long) pmd;
-+	__pgd_val_set(*pg_dir, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pmd);
- #endif
- 	/* now change pmd to kernel virtual addresses */
- 
-@@ -771,11 +771,11 @@
- 	 * pg_table is physical at this point
- 	 */
- 
--	pg_table = (pte_t *) (PAGE_MASK & pmd_val(*pmd));
-+	pg_table = (pte_t *) pmd_address(*pmd);
- 	if (!pg_table)
- 		pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL));
- 
--	pmd_val(*pmd) = _PAGE_TABLE | (unsigned long) pg_table;
-+	__pmd_val_set(*pmd, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pg_table);
- 
- 	/* now change pg_table to kernel virtual addresses */
- 
-Index: debian-kernel-hppa-2.6.8/Documentation/parisc/00-INDEX
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/Documentation/parisc/00-INDEX	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/Documentation/parisc/00-INDEX	2005-03-24 01:16:08.000000000 -0500
-@@ -2,9 +2,16 @@
- 	- this file.
- IODC.txt
- 	- Documentation IODC
-+	= Removed.
-+
- debugging
- 	- some debugging hints for real-mode code
- mm
- 	- Documentation on parisc mm status
-+	= Removed.
-+
- registers
- 	- current/planned usage of registers
-+
-+todo
-+	- The things we need to work on...
-Index: debian-kernel-hppa-2.6.8/Documentation/parisc/todo
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/Documentation/parisc/todo	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,83 @@
-+Status 2004-08-16 :
-+-------------------
-+ - Merged to 2.6.8.1, boots on 712, 715, C3000, and A500
-+   (AFAIK, probably every machine we used to support boots on this kernel.)
-+ - Changes to the 2.4 branch are pretty much non-existant,
-+   Matthew does a good job of merging from upstream though.
-+ - SMP compiles, and seems to work on certain boxes.
-+ - No preemptible support
-+
-+Todo:
-+-----
-+
-+ - 2004-08-16 (Carlos)
-+   Review the gettimeofday implementation, possibly use a
-+   light-weight-syscall and rely on cr16 and cpu speed for
-+   more accurate timing?
-+ - CPU hotplug: we cannot bring up cpus after init, and we don't know if we can
-+   shutdown cpus
-+ - task_struct/thread_info split -- task_struct should not be visible in
-+   entry.S, we need to move some items into thread_info -- this includes
-+   pt_regs and maybe some of the flags (ptrace, etc)
-+ - flush_tlb_kernel_range is horribly inefficient. this has been merged
-+   with the userspace tlb flush, but it has a magic constant that needs
-+   tuning
-+ - syscall signal return path needs work, we don't loop on signal
-+   delivery like other archs
-+ - parisc is the only arch that defines __kernel_clock_t as int instead
-+   of long, find out if we can use long (check compat_signals.c)
-+
-+ - REVIEW ALL THE TODO ENTRIES BELOW!
-+
-+ - the fix for do_fork needs checking
-+ - our PDC early debug console hacks need to be cleaned up somehow
-+ - ad1889 driver: only works with .wav;  Convert to ALSA (ggg, tausq, tbone)
-+ - ns87415 dma doesn't work reliably on suckyio-systems
-+ - (ab)use kmap/kunmap on 64-bit to eliminate flush_dcache calls.
-+ - cp_new_stat32 for sys_parisc32.c is inefficient; maybe it's better
-+   to fill in a tmp stat32 and just do copy_to_user in one go at the end?
-+ - investigate not putting in extable entries for put_kernel_asm; will
-+   probably reduce kernel size
-+ - fix HIL problem: ksoftirqd/0 eats 56% cpu (kernel 2.4 & kernel 2.5)
-+ - write floppy driver for lasi
-+ - write floppy driver for suckyio
-+ - spifi driver (rbrad)
-+ - write optimized versions of lcopy_{to,from}_user. Can we port the
-+   hpux versions?
-+ - NPTL kernel support (CLONE_*TID flags need to be correctly handled by 
-+   sys_clone() and friends)
-+ - fix ALSA harmony driver to reflect changes in ALSA architecture.
-+
-+
-+ Started and in progress:
-+ ------------------------
-+ - 2004-08-16 (Carlos)
-+   64-bit binutils needs to be fixed to get multiple stub
-+   section support.
-+
-+ - 2004-08-16 (Carlos)
-+   Working on light-weight-syscall to implement atomic
-+   compare and swap primitive.
-+
-+ - IRQ code (use arch-indep scheme & cpu-affinity support) (jejb, ggg, t-bone)
-+
-+ - REVIEW THE ENTRIES BELOW!
-+
-+ - Some options still need Kconfig help entries (see below!)
-+ - Look at Config.help too. (tbone, HIL -> helge?)
-+ - port hil_kbd.c to new input layer
-+ - port hil_ptr.c to new input layer
-+
-+ - 64-bit userspace (Leandro)
-+
-+
-+ CONFIG options without help:
-+ -----------------------------
-+ - REVIEW THESE ENTRIES!
-+
-+ _USB_OHCI_HCD (add parisc info?)
-+ _HP_SDC_RTC
-+ _HIL_MLC
-+ _HIL_KBD (to improve)
-+ _HIL_PTR (to improve)
-+
-Index: debian-kernel-hppa-2.6.8/drivers/char/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/char/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/char/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -689,7 +689,7 @@
- 
- config HW_RANDOM
- 	tristate "Intel/AMD/VIA HW Random Number Generator support"
--	depends on (X86 || IA64) && PCI
-+	depends on X86 && PCI
- 	---help---
- 	  This driver provides kernel-side support for the Random Number
- 	  Generator hardware found on Intel i8xx-based motherboards,
-Index: debian-kernel-hppa-2.6.8/drivers/ide/pci/ns87415.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/ide/pci/ns87415.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/ide/pci/ns87415.c	2005-03-24 01:16:08.000000000 -0500
-@@ -24,6 +24,9 @@
- #include <linux/init.h>
- 
- #include <asm/io.h>
-+#ifdef CONFIG_SUPERIO
-+#include <asm/superio.h>
-+#endif
- 
- static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0 };
- 
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/atkbd.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/keyboard/atkbd.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/atkbd.c	2005-03-24 01:16:08.000000000 -0500
-@@ -64,12 +64,13 @@
-  * are loadable via an userland utility.
-  */
- 
--#if defined(__hppa__)
--#include "hpps2atkbd.h"
--#else
--
- static unsigned char atkbd_set2_keycode[512] = {
- 
-+#if defined(__hppa__)   /* CHANGEME */
-+
-+#include "hpps2atkbd.h"	/* include the keyboard scancodes */
-+
-+#else
- 	  0, 67, 65, 63, 61, 59, 60, 88,  0, 68, 66, 64, 62, 15, 41,117,
- 	  0, 56, 42, 93, 29, 16,  2,  0,  0,  0, 44, 31, 30, 17,  3,  0,
- 	  0, 46, 45, 32, 18,  5,  4, 95,  0, 57, 47, 33, 20, 19,  6,183,
-@@ -89,9 +90,8 @@
- 	110,111,108,112,106,103,  0,119,  0,118,109,  0, 99,104,119,  0,
- 
- 	  0,  0,  0, 65, 99,
--};
--
- #endif
-+};
- 
- static unsigned char atkbd_set3_keycode[512] = {
- 
-@@ -218,8 +218,8 @@
- 	int scroll = 0, click = -1;
- 	int value;
- 
--#ifdef ATKBD_DEBUG
--	printk(KERN_DEBUG "atkbd.c: Received %02x flags %02x\n", data, flags);
-+#if 0 || defined(ATKBD_DEBUG)   /* CHANGEME */
-+	printk(KERN_ERR "atkbd.c: Received %02x flags %02x\n", data, flags);
- #endif
- 
- #if !defined(__i386__) && !defined (__x86_64__)
-@@ -352,6 +352,9 @@
- 					break;
- 			}
- 
-+#if 0  /* CHANGEME */
-+			printk(KERN_ERR "Reporting: %#x, emul=%d\n", code, atkbd->emul);
-+#endif
- 			atkbd_report_key(&atkbd->dev, regs, atkbd->keycode[code], value);
- 	}
- 
-@@ -521,7 +524,12 @@
-  * controller may confuse the keyboard need a full reset of the keyboard. On
-  * these systems the BIOS also usually doesn't do it for us.
-  */
--
-+/* XXX: I think this is wrong. We can't assume, that this definitively is a
-+        keyboard. Since we are still in probing phase, it could be a mouse or 
-+	anything else and just sending a ATKBD_CMD_RESET_BAT might confuse the
-+	device. IMHO those lines should be moved to the end of atkbd_probe().
-+	Helge Deller
-+ */
- 	if (atkbd_reset)
- 		if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))
- 			printk(KERN_WARNING "atkbd.c: keyboard reset failed on %s\n", atkbd->serio->phys);
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/hil_kbd.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/hil_kbd.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,372 @@
-+/*
-+ * Generic linux-input device driver for keyboard devices
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ */
-+
-+#include <linux/hil.h>
-+#include <linux/input.h>
-+#include <linux/serio.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/slab.h>
-+#include <linux/pci_ids.h>
-+
-+#define PREFIX "HIL KEYB: "
-+#define HIL_GENERIC_NAME "HIL keyboard"
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION(HIL_GENERIC_NAME " driver");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+#define HIL_KBD_MAX_LENGTH 16
-+
-+#define HIL_KBD_SET1_UPBIT 0x01
-+#define HIL_KBD_SET1_SHIFT 1
-+static unsigned int hil_kbd_set1[HIL_KEYCODES_SET1_TBLSIZE] = 
-+	{ HIL_KEYCODES_SET1 };
-+
-+#define HIL_KBD_SET2_UPBIT 0x01
-+#define HIL_KBD_SET2_SHIFT 1
-+/* Set2 is user defined */
-+
-+#define HIL_KBD_SET3_UPBIT 0x80
-+#define HIL_KBD_SET3_SHIFT 0
-+static unsigned int hil_kbd_set3[HIL_KEYCODES_SET3_TBLSIZE] =
-+	{ HIL_KEYCODES_SET3 };
-+
-+static char hil_language[][16] = { HIL_LOCALE_MAP };
-+
-+struct hil_kbd {
-+	struct input_dev dev;
-+	struct serio *serio;
-+
-+	/* Input buffer and index for packets from HIL bus. */
-+	hil_packet data[HIL_KBD_MAX_LENGTH];
-+	int idx4; /* four counts per packet */
-+
-+	/* Raw device info records from HIL bus, see hil.h for fields. */
-+	char	idd[HIL_KBD_MAX_LENGTH];	/* DID byte and IDD record */
-+	char	rsc[HIL_KBD_MAX_LENGTH];	/* RSC record */
-+	char	exd[HIL_KBD_MAX_LENGTH];	/* EXD record */
-+	char	rnm[HIL_KBD_MAX_LENGTH + 1];	/* RNM record + NULL term. */
-+
-+	/* Something to sleep around with. */
-+	struct semaphore sem;
-+};
-+
-+/* Process a complete packet after transfer from the HIL */
-+static void hil_kbd_process_record(struct hil_kbd *kbd)
-+{
-+	struct input_dev *dev = &kbd->dev;
-+	hil_packet *data = kbd->data;
-+	hil_packet p;
-+	int idx, i, cnt;
-+
-+	idx = kbd->idx4/4;
-+	p = data[idx - 1];
-+
-+	if ((p & ~HIL_CMDCT_POL) == 
-+	    (HIL_ERR_INT | HIL_PKT_CMD | HIL_CMD_POL)) goto report;
-+	if ((p & ~HIL_CMDCT_RPL) == 
-+	    (HIL_ERR_INT | HIL_PKT_CMD | HIL_CMD_RPL)) goto report;
-+
-+	/* Not a poll response.  See if we are loading config records. */
-+	switch (p & HIL_PKT_DATA_MASK) {
-+	case HIL_CMD_IDD:
-+		for (i = 0; i < idx; i++)
-+			kbd->idd[i] = kbd->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_KBD_MAX_LENGTH; i++)
-+			kbd->idd[i] = 0;
-+		break;
-+	case HIL_CMD_RSC:
-+		for (i = 0; i < idx; i++)
-+			kbd->rsc[i] = kbd->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_KBD_MAX_LENGTH; i++)
-+			kbd->rsc[i] = 0;
-+		break;
-+	case HIL_CMD_EXD:
-+		for (i = 0; i < idx; i++)
-+			kbd->exd[i] = kbd->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_KBD_MAX_LENGTH; i++)
-+			kbd->exd[i] = 0;
-+		break;
-+	case HIL_CMD_RNM:
-+		for (i = 0; i < idx; i++)
-+			kbd->rnm[i] = kbd->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_KBD_MAX_LENGTH + 1; i++)
-+			kbd->rnm[i] = '\0';
-+		break;
-+	default:
-+		/* These occur when device isn't present */
-+		if (p == (HIL_ERR_INT | HIL_PKT_CMD)) break; 
-+		/* Anything else we'd like to know about. */
-+		printk(KERN_WARNING PREFIX "Device sent unknown record %x\n", p);
-+		break;
-+	}
-+	goto out;
-+
-+ report:
-+	cnt = 1;
-+	switch (kbd->data[0] & HIL_POL_CHARTYPE_MASK) {
-+	case HIL_POL_CHARTYPE_NONE:
-+		break;
-+	case HIL_POL_CHARTYPE_ASCII:
-+		while (cnt < idx - 1)
-+			input_report_key(dev, kbd->data[cnt++] & 0x7f, 1);
-+		break;
-+	case HIL_POL_CHARTYPE_RSVD1:
-+	case HIL_POL_CHARTYPE_RSVD2:
-+	case HIL_POL_CHARTYPE_BINARY:
-+		while (cnt < idx - 1)
-+			input_report_key(dev, kbd->data[cnt++], 1);
-+		break;
-+	case HIL_POL_CHARTYPE_SET1:
-+		while (cnt < idx - 1) {
-+			unsigned int key;
-+			int up;
-+			key = kbd->data[cnt++];
-+			up = key & HIL_KBD_SET1_UPBIT;
-+			key &= (~HIL_KBD_SET1_UPBIT & 0xff);
-+			key = hil_kbd_set1[key >> HIL_KBD_SET1_SHIFT];
-+			if (key != KEY_RESERVED)
-+				input_report_key(dev, key, !up);
-+		}
-+		break;
-+	case HIL_POL_CHARTYPE_SET2:
-+		while (cnt < idx - 1) {
-+			unsigned int key;
-+			int up;
-+			key = kbd->data[cnt++];
-+			up = key & HIL_KBD_SET2_UPBIT;
-+			key &= (~HIL_KBD_SET1_UPBIT & 0xff);
-+			key = key >> HIL_KBD_SET2_SHIFT;
-+			if (key != KEY_RESERVED)
-+				input_report_key(dev, key, !up);
-+		}
-+		break;
-+	case HIL_POL_CHARTYPE_SET3:
-+		while (cnt < idx - 1) {
-+			unsigned int key;
-+			int up;
-+			key = kbd->data[cnt++];
-+			up = key & HIL_KBD_SET3_UPBIT;
-+			key &= (~HIL_KBD_SET1_UPBIT & 0xff);
-+			key = hil_kbd_set3[key >> HIL_KBD_SET3_SHIFT];
-+			if (key != KEY_RESERVED)
-+				input_report_key(dev, key, !up);
-+		}
-+		break;
-+	}
-+ out:
-+	kbd->idx4 = 0;
-+	up(&kbd->sem);
-+}
-+
-+static void hil_kbd_process_err(struct hil_kbd *kbd) {
-+	printk(KERN_WARNING PREFIX "errored HIL packet\n");
-+	kbd->idx4 = 0;
-+	up(&kbd->sem);
-+}
-+
-+static irqreturn_t hil_kbd_interrupt(struct serio *serio, 
-+	      unsigned char data, unsigned int flags, struct pt_regs *regs)
-+{
-+	struct hil_kbd *kbd;
-+	hil_packet packet;
-+	int idx;
-+
-+	kbd = (struct hil_kbd *)serio->private;
-+	if (kbd == NULL) {
-+		BUG();
-+		return IRQ_HANDLED;
-+	}
-+
-+	if (kbd->idx4 >= (HIL_KBD_MAX_LENGTH * sizeof(hil_packet))) {
-+		hil_kbd_process_err(kbd);
-+		return IRQ_HANDLED;
-+	}
-+	idx = kbd->idx4/4;
-+	if (!(kbd->idx4 % 4)) kbd->data[idx] = 0;
-+	packet = kbd->data[idx];
-+	packet |= ((hil_packet)data) << ((3 - (kbd->idx4 % 4)) * 8);
-+	kbd->data[idx] = packet;
-+
-+	/* Records of N 4-byte hil_packets must terminate with a command. */
-+	if ((++(kbd->idx4)) % 4) return IRQ_HANDLED;
-+	if ((packet & 0xffff0000) != HIL_ERR_INT) {
-+		hil_kbd_process_err(kbd);
-+		return IRQ_HANDLED;
-+	}
-+	if (packet & HIL_PKT_CMD) hil_kbd_process_record(kbd);
-+	return IRQ_HANDLED;
-+}
-+
-+static void hil_kbd_disconnect(struct serio *serio)
-+{
-+	struct hil_kbd *kbd;
-+
-+	kbd = (struct hil_kbd *)serio->private;
-+	if (kbd == NULL) {
-+		BUG();
-+		return;
-+	}
-+
-+	input_unregister_device(&kbd->dev);
-+	serio_close(serio);
-+	kfree(kbd);
-+}
-+
-+static void hil_kbd_connect(struct serio *serio, struct serio_dev *dev)
-+{
-+	struct hil_kbd	*kbd;
-+	uint8_t		did, *idd;
-+	int		i;
-+	
-+	if (serio->type != (SERIO_HIL_MLC | SERIO_HIL)) return;
-+
-+	if (!(kbd = kmalloc(sizeof(struct hil_kbd), GFP_KERNEL))) return;
-+	memset(kbd, 0, sizeof(struct hil_kbd));
-+
-+	if (serio_open(serio, dev)) goto bail0;
-+
-+	serio->private = kbd;
-+	kbd->serio = serio;
-+	kbd->dev.private = kbd;
-+
-+	init_MUTEX_LOCKED(&(kbd->sem));
-+
-+	/* Get device info.  MLC driver supplies devid/status/etc. */
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_IDD);
-+	down(&(kbd->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_RSC);
-+	down(&(kbd->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_RNM);
-+	down(&(kbd->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_EXD);
-+	down(&(kbd->sem));
-+
-+	up(&(kbd->sem));
-+
-+	did = kbd->idd[0];
-+	idd = kbd->idd + 1;
-+	switch (did & HIL_IDD_DID_TYPE_MASK) {
-+	case HIL_IDD_DID_TYPE_KB_INTEGRAL:
-+	case HIL_IDD_DID_TYPE_KB_ITF:
-+	case HIL_IDD_DID_TYPE_KB_RSVD:
-+	case HIL_IDD_DID_TYPE_CHAR:
-+		printk(KERN_INFO PREFIX "HIL keyboard found (did = 0x%02x, lang = %s)\n",
-+			did, hil_language[did & HIL_IDD_DID_TYPE_KB_LANG_MASK]);
-+		break;
-+	default:
-+		goto bail1;
-+	}
-+
-+	if(HIL_IDD_NUM_BUTTONS(idd) || HIL_IDD_NUM_AXES_PER_SET(*idd)) {
-+		printk(KERN_INFO PREFIX "keyboards only, no combo devices supported.\n");
-+		goto bail1;
-+	}
-+
-+
-+	kbd->dev.evbit[0]	= BIT(EV_KEY) | BIT(EV_REP);
-+	kbd->dev.ledbit[0]	= BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
-+	kbd->dev.keycodemax	= HIL_KEYCODES_SET1_TBLSIZE;
-+	kbd->dev.keycodesize	= sizeof(hil_kbd_set1[0]);
-+	kbd->dev.keycode	= hil_kbd_set1;
-+	kbd->dev.name		= strlen(kbd->rnm) ? kbd->rnm : HIL_GENERIC_NAME;
-+	kbd->dev.phys		= "hpkbd/input0";	/* XXX */
-+	kbd->dev.rep[REP_DELAY] = HZ/4; /* auto-repeat values */
-+	kbd->dev.rep[REP_PERIOD]= HZ/8;
-+
-+	kbd->dev.id.bustype	= BUS_HIL;
-+	kbd->dev.id.vendor	= PCI_VENDOR_ID_HP;
-+	kbd->dev.id.product	= 0x0001; /* TODO: get from kbd->rsc */
-+	kbd->dev.id.version	= 0x0100; /* TODO: get from kbd->rsc */
-+
-+	for (i = 0; i < 128; i++) {
-+		set_bit(hil_kbd_set1[i], kbd->dev.keybit);
-+		set_bit(hil_kbd_set3[i], kbd->dev.keybit);
-+	}
-+	clear_bit(0, kbd->dev.keybit);
-+
-+	input_register_device(&kbd->dev);
-+	printk(KERN_INFO "input: %s, ID: %d\n",
-+		kbd->dev.name, did);
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_EK1); /* Enable Keyswitch Autorepeat 1 */
-+	down(&(kbd->sem));
-+	up(&(kbd->sem));
-+
-+	return;
-+ bail1:
-+	serio_close(serio);
-+ bail0:
-+	kfree(kbd);
-+}
-+
-+
-+struct serio_dev hil_kbd_serio_dev = {
-+	.connect =	hil_kbd_connect,
-+	.disconnect =	hil_kbd_disconnect,
-+	.interrupt =	hil_kbd_interrupt
-+};
-+
-+static int __init hil_kbd_init(void)
-+{
-+	serio_register_device(&hil_kbd_serio_dev);
-+        return 0;
-+}
-+                
-+static void __exit hil_kbd_exit(void)
-+{
-+	serio_unregister_device(&hil_kbd_serio_dev);
-+}
-+                        
-+module_init(hil_kbd_init);
-+module_exit(hil_kbd_exit);
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/hilkbd.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/hilkbd.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,345 @@
-+/*
-+ *  linux/drivers/hil/hilkbd.c
-+ *
-+ *  Copyright (C) 1998 Philip Blundell <philb at gnu.org>
-+ *  Copyright (C) 1999 Matthew Wilcox <willy at bofh.ai>
-+ *  Copyright (C) 1999-2003 Helge Deller <deller at gmx.de>
-+ *
-+ *  Very basic HP Human Interface Loop (HIL) driver.
-+ *  This driver handles the keyboard on HP300 (m68k) and on some 
-+ *  HP700 (parisc) series machines.
-+ *
-+ * 
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License version 2.  See the file COPYING in the main directory of this
-+ * archive for more details.
-+ */
-+
-+#include <linux/pci_ids.h>
-+#include <linux/ioport.h>
-+#include <linux/module.h>
-+#include <linux/config.h>
-+#include <linux/errno.h>
-+#include <linux/input.h>
-+#include <linux/init.h>
-+#include <linux/irq.h>
-+#include <linux/hil.h>
-+#include <linux/spinlock.h>
-+
-+
-+MODULE_AUTHOR("Philip Blundell, Matthew Wilcox, Helge Deller");
-+MODULE_DESCRIPTION("HIL keyboard driver (basic functionality)");
-+MODULE_LICENSE("GPL v2");
-+
-+
-+#if defined(CONFIG_PARISC)
-+
-+ #include <asm/io.h>
-+ #include <asm/hardware.h>
-+ #include <asm/parisc-device.h>
-+ static unsigned long hil_base;	/* HPA for the HIL device */
-+ static unsigned int hil_irq;
-+ #define HILBASE		hil_base /* HPPA (parisc) port address */
-+ #define HIL_DATA		0x800
-+ #define HIL_CMD		0x801
-+ #define HIL_IRQ		hil_irq
-+ #define hil_readb(p)		gsc_readb(p)
-+ #define hil_writeb(v,p)	gsc_writeb((v),(p))
-+
-+#elif defined(CONFIG_HP300)
-+
-+ #define HILBASE		0xf0428000 /* HP300 (m86k) port address */
-+ #define HIL_DATA		0x1
-+ #define HIL_CMD		0x3
-+ #define HIL_IRQ		2
-+ #define hil_readb(p)		readb(p)
-+ #define hil_writeb(v,p)	writeb((v),(p))
-+
-+#else
-+#error "HIL is not supported on this platform"
-+#endif
-+
-+
-+ 
-+/* HIL helper functions */
-+ 
-+#define hil_busy()              (hil_readb(HILBASE + HIL_CMD) & HIL_BUSY)
-+#define hil_data_available()    (hil_readb(HILBASE + HIL_CMD) & HIL_DATA_RDY)
-+#define hil_status()            (hil_readb(HILBASE + HIL_CMD))
-+#define hil_command(x)          do { hil_writeb((x), HILBASE + HIL_CMD); } while (0)
-+#define hil_read_data()         (hil_readb(HILBASE + HIL_DATA))
-+#define hil_write_data(x)       do { hil_writeb((x), HILBASE + HIL_DATA); } while (0)
-+
-+/* HIL constants */
-+ 
-+#define	HIL_BUSY		0x02
-+#define	HIL_DATA_RDY		0x01
-+
-+#define	HIL_SETARD		0xA0		/* set auto-repeat delay */
-+#define	HIL_SETARR		0xA2		/* set auto-repeat rate */
-+#define	HIL_SETTONE		0xA3		/* set tone generator */
-+#define	HIL_CNMT		0xB2		/* clear nmi */
-+#define	HIL_INTON		0x5C		/* Turn on interrupts. */
-+#define	HIL_INTOFF		0x5D		/* Turn off interrupts. */
-+
-+#define	HIL_READKBDSADR	 	0xF9
-+#define	HIL_WRITEKBDSADR 	0xE9
-+
-+static unsigned int hphilkeyb_keycode[HIL_KEYCODES_SET1_TBLSIZE] = 
-+	{ HIL_KEYCODES_SET1 };
-+
-+/* HIL structure */
-+static struct {
-+	struct input_dev dev;
-+
-+	unsigned int curdev;
-+	
-+	unsigned char s;
-+	unsigned char c;
-+	int valid;
-+	
-+	unsigned char data[16];
-+	unsigned int ptr;
-+	spinlock_t lock;
-+
-+	void *dev_id;	/* native bus device */
-+} hil_dev;
-+
-+
-+static void poll_finished(void)
-+{
-+	int down;
-+	int key;
-+	unsigned char scode;
-+	
-+	switch (hil_dev.data[0]) {
-+	case 0x40:
-+		down = (hil_dev.data[1] & 1) == 0;
-+		scode = hil_dev.data[1] >> 1;
-+		key = hphilkeyb_keycode[scode];
-+		input_report_key(&hil_dev.dev, key, down);
-+		break;
-+	}
-+	hil_dev.curdev = 0;
-+}
-+
-+static inline void handle_status(unsigned char s, unsigned char c)
-+{
-+	if (c & 0x8) {
-+		/* End of block */
-+		if (c & 0x10)
-+			poll_finished();
-+	} else {
-+		if (c & 0x10) {
-+			if (hil_dev.curdev)
-+				poll_finished();  /* just in case */
-+			hil_dev.curdev = c & 7;
-+			hil_dev.ptr = 0;
-+		}
-+	}
-+}
-+
-+static inline void handle_data(unsigned char s, unsigned char c)
-+{
-+	if (hil_dev.curdev) {
-+		hil_dev.data[hil_dev.ptr++] = c;
-+		hil_dev.ptr &= 15;
-+	}
-+}
-+
-+
-+/* 
-+ * Handle HIL interrupts.
-+ */
-+static irqreturn_t hil_interrupt(int irq, void *handle, struct pt_regs *regs)
-+{
-+	unsigned char s, c;
-+	
-+	s = hil_status();
-+	c = hil_read_data();
-+
-+	switch (s >> 4) {
-+	case 0x5:
-+		handle_status(s, c);
-+		break;
-+	case 0x6:
-+		handle_data(s, c);
-+		break;
-+	case 0x4:
-+		hil_dev.s = s;
-+		hil_dev.c = c;
-+		mb();
-+		hil_dev.valid = 1;
-+		break;
-+	}
-+	return IRQ_HANDLED;
-+}
-+
-+/*
-+ * Send a command to the HIL
-+ */
-+
-+static void hil_do(unsigned char cmd, unsigned char *data, unsigned int len)
-+{
-+	unsigned long flags;
-+
-+	spin_lock_irqsave(&hil_dev.lock, flags);
-+	while (hil_busy())
-+		/* wait */;
-+	hil_command(cmd);
-+	while (len--) {
-+		while (hil_busy())
-+			/* wait */;
-+		hil_write_data(*(data++));
-+	}
-+	spin_unlock_irqrestore(&hil_dev.lock, flags);
-+}
-+
-+
-+/*
-+ * Initialise HIL. 
-+ */
-+
-+static int __init
-+hil_keyb_init(void)
-+{
-+	unsigned char c;
-+	unsigned int i, kbid;
-+	wait_queue_head_t hil_wait;
-+
-+	if (hil_dev.dev.id.bustype) {
-+		return -ENODEV; /* already initialized */
-+	}
-+	
-+#if defined(CONFIG_HP300)
-+	if (!hwreg_present((void *)(HILBASE + HIL_DATA)))
-+		return -ENODEV;
-+	
-+	request_region(HILBASE+HIL_DATA, 2, "hil");
-+#endif
-+	
-+	request_irq(HIL_IRQ, hil_interrupt, 0, "hil", hil_dev.dev_id);
-+
-+	/* Turn on interrupts */
-+	hil_do(HIL_INTON, NULL, 0);
-+
-+	/* Look for keyboards */
-+	hil_dev.valid = 0;	/* clear any pending data */
-+	hil_do(HIL_READKBDSADR, NULL, 0);
-+
-+	init_waitqueue_head(&hil_wait);
-+	wait_event_interruptible_timeout(hil_wait, hil_dev.valid, 3*HZ);
-+	if (!hil_dev.valid) {
-+		printk(KERN_WARNING "HIL: timed out, assuming no keyboard present.\n");
-+	}
-+
-+	c = hil_dev.c; 
-+	hil_dev.valid = 0;
-+	if (c == 0) {
-+		kbid = -1;
-+		printk(KERN_WARNING "HIL: no keyboard present.\n");
-+	} else {
-+		kbid = ffz(~c);
-+		/* printk(KERN_INFO "HIL: keyboard found at id %d\n", kbid); */
-+	}
-+
-+	/* set it to raw mode */
-+	c = 0;
-+	hil_do(HIL_WRITEKBDSADR, &c, 1);
-+	
-+	init_input_dev(&hil_dev.dev);
-+
-+	for (i = 0; i < HIL_KEYCODES_SET1_TBLSIZE; i++)
-+		if (hphilkeyb_keycode[i] != KEY_RESERVED)
-+			set_bit(hphilkeyb_keycode[i], hil_dev.dev.keybit);
-+
-+	hil_dev.dev.evbit[0]    = BIT(EV_KEY) | BIT(EV_REP);
-+	hil_dev.dev.ledbit[0]   = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
-+	hil_dev.dev.keycodemax  = HIL_KEYCODES_SET1_TBLSIZE;
-+        hil_dev.dev.keycodesize = sizeof(hphilkeyb_keycode[0]);
-+	hil_dev.dev.keycode     = hphilkeyb_keycode;
-+	hil_dev.dev.name 	= "HIL keyboard";
-+	hil_dev.dev.phys 	= "hpkbd/input0";
-+	hil_dev.dev.rep[REP_DELAY]  = HZ/4; /* auto-repeat values */
-+	hil_dev.dev.rep[REP_PERIOD] = HZ/8;
-+
-+	hil_dev.dev.id.bustype	= BUS_HIL;
-+	hil_dev.dev.id.vendor	= PCI_VENDOR_ID_HP;
-+	hil_dev.dev.id.product	= 0x0001;
-+	hil_dev.dev.id.version	= 0x0010;
-+
-+	input_register_device(&hil_dev.dev);
-+	printk(KERN_INFO "input: %s, ID %d at 0x%08lx (irq %d) found and attached\n",
-+		hil_dev.dev.name, kbid, HILBASE, HIL_IRQ);
-+
-+	return 0;
-+}
-+
-+#if defined(CONFIG_PARISC)
-+static int __init
-+hil_init_chip(struct parisc_device *dev)
-+{
-+	if (!dev->irq) {
-+		printk(KERN_WARNING "HIL: IRQ not found for HIL bus at 0x%08lx\n", dev->hpa);
-+		return -ENODEV;
-+	}
-+
-+	hil_base = dev->hpa;
-+	hil_irq  = dev->irq;
-+	hil_dev.dev_id = dev;
-+	
-+	printk(KERN_INFO "Found HIL bus at 0x%08lx, IRQ %d\n", hil_base, hil_irq);
-+
-+	return hil_keyb_init();
-+}
-+
-+static struct parisc_device_id hil_tbl[] = {
-+	{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00073 },
-+	{ 0, }
-+};
-+
-+MODULE_DEVICE_TABLE(parisc, hil_tbl);
-+
-+static struct parisc_driver hil_driver = {
-+	.name =		"HIL",
-+	.id_table =	hil_tbl,
-+	.probe =	hil_init_chip,
-+};
-+#endif /* CONFIG_PARISC */
-+
-+
-+
-+
-+
-+static int __init hil_init(void)
-+{
-+#if defined(CONFIG_PARISC)
-+	return register_parisc_driver(&hil_driver);
-+#else
-+	return hil_keyb_init();
-+#endif
-+}
-+
-+
-+static void __exit hil_exit(void)
-+{
-+	if (HIL_IRQ) {
-+		disable_irq(HIL_IRQ);
-+		free_irq(HIL_IRQ, hil_dev.dev_id);
-+	}
-+
-+	/* Turn off interrupts */
-+	hil_do(HIL_INTOFF, NULL, 0);
-+
-+	input_unregister_device(&hil_dev.dev);
-+
-+#if defined(CONFIG_PARISC)
-+	unregister_parisc_driver(&hil_driver);
-+#else
-+	release_region(HILBASE+HIL_DATA, 2);
-+#endif
-+}
-+
-+module_init(hil_init);
-+module_exit(hil_exit);
-+
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/hpps2atkbd.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/keyboard/hpps2atkbd.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/hpps2atkbd.h	2005-03-24 01:16:08.000000000 -0500
-@@ -50,10 +50,10 @@
- /* 60 */  KEY_DOWN,     C_61,          KEY_PAUSE,     KEY_UP,        KEY_DELETE,    KEY_END,      KEY_BACKSPACE, KEY_INSERT,
- /* 68 */  KEY_RESERVED, KEY_KP1,       KEY_RIGHT,     KEY_KP4,       KEY_KP7,       KEY_PAGEDOWN, KEY_HOME,      KEY_PAGEUP,
- /* 70 */  KEY_KP0,      KEY_KPDOT,     KEY_KP2,       KEY_KP5,       KEY_KP6,       KEY_KP8,      KEY_ESC,       KEY_NUMLOCK,
--/* 78 */  KEY_F11,      KEY_KPPLUS,    KEY_KP3,       KEY_KPMINUS,   KEY_KPASTERISK,KEY_KP9,      KEY_SCROLLLOCK,KEY_103RD,
-+/* 78 */  KEY_F11,      KEY_KPPLUS,    KEY_KP3,       KEY_KPMINUS,   KEY_KPASTERISK,KEY_KP9,      KEY_SCROLLLOCK,KEY_102ND,
- /* 80 */  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,
- /* 88 */  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,
--/* 90 */  KEY_RESERVED, KEY_RIGHTALT,  KEY_SYSRQ,     KEY_RESERVED,  KEY_RIGHTCTRL, KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,
-+/* 90 */  KEY_RESERVED, KEY_RIGHTALT,  255,           KEY_RESERVED,  KEY_RIGHTCTRL, KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,
- /* 98 */  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_CAPSLOCK, KEY_RESERVED,  KEY_LEFTMETA,
- /* a0 */  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED, KEY_RESERVED,  KEY_RIGHTMETA,
- /* a8 */  KEY_RESERVED, KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED,  KEY_RESERVED, KEY_RESERVED,  KEY_COMPOSE,
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/keyboard/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -96,3 +96,33 @@
- 
- 	  To compile this driver as a module, choose M here: the
- 	  module will be called amikbd.
-+
-+config KEYBOARD_HIL_OLD
-+	tristate "HP HIL keyboard support (simple driver)"
-+	depends on PARISC && INPUT && INPUT_KEYBOARD && !HIL_MLC
-+	default y
-+	help
-+	  The "Human Interface Loop" is a older, 8-channel USB-like
-+	  controller used in several Hewlett Packard models. This driver
-+	  was adapted from the one written for m68k/hp300, and implements
-+	  support for a keyboard attached to the HIL port, but not for
-+	  any other types of HIL input devices like mice or tablets.
-+	  However, it has been thoroughly tested and is stable.
-+
-+	  If you want full HIL support including support for multiple
-+	  keyboards, mices and tablets, you have to enable the
-+	  "HP System Device Controller i8042 Support" in the input/serio
-+	  submenu.
-+
-+config KEYBOARD_HIL
-+	tristate "HP HIL keyboard support"
-+	depends on PARISC && INPUT && INPUT_KEYBOARD
-+	default y
-+	select HP_SDC
-+ 	select HIL_MLC
-+	help
-+	  The "Human Interface Loop" is a older, 8-channel USB-like
-+	  controller used in several Hewlett Packard models.
-+	  This driver implements support for HIL-keyboards attached
-+	  to your machine, so normally you should say Y here.
-+
-Index: debian-kernel-hppa-2.6.8/drivers/input/keyboard/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/keyboard/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/keyboard/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -2,8 +2,6 @@
- # Makefile for the input core drivers.
- #
- 
--# Each configuration option enables a list of files.
--
- obj-$(CONFIG_KEYBOARD_ATKBD)		+= atkbd.o
- obj-$(CONFIG_KEYBOARD_MAPLE)		+= maple_keyb.o
- obj-$(CONFIG_KEYBOARD_SUNKBD)		+= sunkbd.o
-@@ -12,3 +10,5 @@
- obj-$(CONFIG_KEYBOARD_AMIGA)		+= amikbd.o
- obj-$(CONFIG_KEYBOARD_NEWTON)		+= newtonkbd.o
- obj-$(CONFIG_KEYBOARD_98KBD)		+= 98kbd.o
-+obj-$(CONFIG_KEYBOARD_HIL)		+= hil_kbd.o
-+obj-$(CONFIG_KEYBOARD_HIL_OLD)		+= hilkbd.o
-Index: debian-kernel-hppa-2.6.8/drivers/input/misc/hp_sdc_rtc.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/misc/hp_sdc_rtc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,726 @@
-+/*
-+ * HP i8042 SDC + MSM-58321 BBRTC driver.
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * System Device Controller Microprocessor Firmware Theory of Operation
-+ *      for Part Number 1820-4784 Revision B.  Dwg No. A-1820-4784-2
-+ * efirtc.c by Stephane Eranian/Hewlett Packard
-+ *
-+ */
-+
-+#include <linux/hp_sdc.h>
-+#include <linux/errno.h>
-+#include <linux/types.h>
-+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/time.h>
-+#include <linux/miscdevice.h>
-+#include <linux/proc_fs.h>
-+#include <linux/poll.h>
-+#include <linux/rtc.h>
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION("HP i8042 SDC + MSM-58321 RTC Driver");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+#define RTC_VERSION "1.10d"
-+
-+static unsigned long epoch = 2000;
-+
-+static struct semaphore i8042tregs;
-+
-+static hp_sdc_irqhook hp_sdc_rtc_isr;
-+
-+static struct fasync_struct *hp_sdc_rtc_async_queue;
-+
-+static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait);
-+
-+static loff_t hp_sdc_rtc_llseek(struct file *file, loff_t offset, int origin);
-+
-+static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
-+			       size_t count, loff_t *ppos);
-+
-+static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file,
-+			    unsigned int cmd, unsigned long arg);
-+
-+static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait);
-+
-+static int hp_sdc_rtc_open(struct inode *inode, struct file *file);
-+static int hp_sdc_rtc_release(struct inode *inode, struct file *file);
-+static int hp_sdc_rtc_fasync (int fd, struct file *filp, int on);
-+
-+static int hp_sdc_rtc_read_proc(char *page, char **start, off_t off,
-+				int count, int *eof, void *data);
-+
-+static void hp_sdc_rtc_isr (int irq, void *dev_id, 
-+			    uint8_t status, uint8_t data) 
-+{
-+	return;
-+}
-+
-+static int hp_sdc_rtc_do_read_bbrtc (struct rtc_time *rtctm)
-+{
-+	struct semaphore tsem;
-+	hp_sdc_transaction t;
-+	uint8_t tseq[91];
-+	int i;
-+	
-+	i = 0;
-+	while (i < 91) {
-+		tseq[i++] = HP_SDC_ACT_DATAREG |
-+			HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN;
-+		tseq[i++] = 0x01;			/* write i8042[0x70] */
-+	  	tseq[i]   = i / 7;			/* BBRTC reg address */
-+		i++;
-+		tseq[i++] = HP_SDC_CMD_DO_RTCR;		/* Trigger command   */
-+		tseq[i++] = 2;		/* expect 1 stat/dat pair back.   */
-+		i++; i++;               /* buffer for stat/dat pair       */
-+	}
-+	tseq[84] |= HP_SDC_ACT_SEMAPHORE;
-+	t.endidx =		91;
-+	t.seq =			tseq;
-+	t.act.semaphore =	&tsem;
-+	init_MUTEX_LOCKED(&tsem);
-+	
-+	if (hp_sdc_enqueue_transaction(&t)) return -1;
-+	
-+	down_interruptible(&tsem);  /* Put ourselves to sleep for results. */
-+	
-+	/* Check for nonpresence of BBRTC */
-+	if (!((tseq[83] | tseq[90] | tseq[69] | tseq[76] |
-+	       tseq[55] | tseq[62] | tseq[34] | tseq[41] |
-+	       tseq[20] | tseq[27] | tseq[6]  | tseq[13]) & 0x0f))
-+		return -1;
-+
-+	memset(rtctm, 0, sizeof(struct rtc_time));
-+	rtctm->tm_year = (tseq[83] & 0x0f) + (tseq[90] & 0x0f) * 10;
-+	rtctm->tm_mon  = (tseq[69] & 0x0f) + (tseq[76] & 0x0f) * 10;
-+	rtctm->tm_mday = (tseq[55] & 0x0f) + (tseq[62] & 0x0f) * 10;
-+	rtctm->tm_wday = (tseq[48] & 0x0f);
-+	rtctm->tm_hour = (tseq[34] & 0x0f) + (tseq[41] & 0x0f) * 10;
-+	rtctm->tm_min  = (tseq[20] & 0x0f) + (tseq[27] & 0x0f) * 10;
-+	rtctm->tm_sec  = (tseq[6]  & 0x0f) + (tseq[13] & 0x0f) * 10;
-+	
-+	return 0;
-+}
-+
-+static int hp_sdc_rtc_read_bbrtc (struct rtc_time *rtctm)
-+{
-+	struct rtc_time tm, tm_last;
-+	int i = 0;
-+
-+	/* MSM-58321 has no read latch, so must read twice and compare. */
-+
-+	if (hp_sdc_rtc_do_read_bbrtc(&tm_last)) return -1;
-+	if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1;
-+
-+	while (memcmp(&tm, &tm_last, sizeof(struct rtc_time))) {
-+		if (i++ > 4) return -1;
-+		memcpy(&tm_last, &tm, sizeof(struct rtc_time));
-+		if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1;
-+	}
-+
-+	memcpy(rtctm, &tm, sizeof(struct rtc_time));
-+
-+	return 0;
-+}
-+
-+
-+static int64_t hp_sdc_rtc_read_i8042timer (uint8_t loadcmd, int numreg)
-+{
-+	hp_sdc_transaction t;
-+	uint8_t tseq[26] = {
-+		HP_SDC_ACT_PRECMD | HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN,
-+		0,
-+		HP_SDC_CMD_READ_T1, 2, 0, 0,
-+		HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN, 
-+		HP_SDC_CMD_READ_T2, 2, 0, 0,
-+		HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN, 
-+		HP_SDC_CMD_READ_T3, 2, 0, 0,
-+		HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN, 
-+		HP_SDC_CMD_READ_T4, 2, 0, 0,
-+		HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN, 
-+		HP_SDC_CMD_READ_T5, 2, 0, 0
-+	};
-+
-+	t.endidx = numreg * 5;
-+
-+	tseq[1] = loadcmd;
-+	tseq[t.endidx - 4] |= HP_SDC_ACT_SEMAPHORE; /* numreg assumed > 1 */
-+
-+	t.seq =			tseq;
-+	t.act.semaphore =	&i8042tregs;
-+
-+	down_interruptible(&i8042tregs);  /* Sleep if output regs in use. */
-+
-+	if (hp_sdc_enqueue_transaction(&t)) return -1;
-+	
-+	down_interruptible(&i8042tregs);  /* Sleep until results come back. */
-+	up(&i8042tregs);
-+
-+	return (tseq[5] | 
-+		((uint64_t)(tseq[10]) << 8)  | ((uint64_t)(tseq[15]) << 16) |
-+		((uint64_t)(tseq[20]) << 24) | ((uint64_t)(tseq[25]) << 32));
-+}
-+
-+
-+/* Read the i8042 real-time clock */
-+static inline int hp_sdc_rtc_read_rt(struct timeval *res) {
-+	int64_t raw;
-+	uint32_t tenms; 
-+	unsigned int days;
-+
-+	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_RT, 5);
-+	if (raw < 0) return -1;
-+
-+	tenms = (uint32_t)raw & 0xffffff;
-+	days  = (unsigned int)(raw >> 24) & 0xffff;
-+
-+	res->tv_usec = (suseconds_t)(tenms % 100) * 10000;
-+	res->tv_sec =  (time_t)(tenms / 100) + days * 86400;
-+
-+	return 0;
-+}
-+
-+
-+/* Read the i8042 fast handshake timer */
-+static inline int hp_sdc_rtc_read_fhs(struct timeval *res) {
-+	uint64_t raw;
-+	unsigned int tenms;
-+
-+	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2);
-+	if (raw < 0) return -1;
-+
-+	tenms = (unsigned int)raw & 0xffff;
-+
-+	res->tv_usec = (suseconds_t)(tenms % 100) * 10000;
-+	res->tv_sec  = (time_t)(tenms / 100);
-+
-+	return 0;
-+}
-+
-+
-+/* Read the i8042 match timer (a.k.a. alarm) */
-+static inline int hp_sdc_rtc_read_mt(struct timeval *res) {
-+	int64_t raw;	
-+	uint32_t tenms; 
-+
-+	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_MT, 3);
-+	if (raw < 0) return -1;
-+
-+	tenms = (uint32_t)raw & 0xffffff;
-+
-+	res->tv_usec = (suseconds_t)(tenms % 100) * 10000;
-+	res->tv_sec  = (time_t)(tenms / 100);
-+
-+	return 0;
-+}
-+
-+
-+/* Read the i8042 delay timer */
-+static inline int hp_sdc_rtc_read_dt(struct timeval *res) {
-+	int64_t raw;
-+	uint32_t tenms;
-+
-+	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_DT, 3);
-+	if (raw < 0) return -1;
-+
-+	tenms = (uint32_t)raw & 0xffffff;
-+
-+	res->tv_usec = (suseconds_t)(tenms % 100) * 10000;
-+	res->tv_sec  = (time_t)(tenms / 100);
-+
-+	return 0;
-+}
-+
-+
-+/* Read the i8042 cycle timer (a.k.a. periodic) */
-+static inline int hp_sdc_rtc_read_ct(struct timeval *res) {
-+	int64_t raw;
-+	uint32_t tenms;
-+
-+	raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_CT, 3);
-+	if (raw < 0) return -1;
-+
-+	tenms = (uint32_t)raw & 0xffffff;
-+
-+	res->tv_usec = (suseconds_t)(tenms % 100) * 10000;
-+	res->tv_sec  = (time_t)(tenms / 100);
-+
-+	return 0;
-+}
-+
-+
-+/* Set the i8042 real-time clock */
-+static int hp_sdc_rtc_set_rt (struct timeval *setto)
-+{
-+	uint32_t tenms;
-+	unsigned int days;
-+	hp_sdc_transaction t;
-+	uint8_t tseq[11] = {
-+		HP_SDC_ACT_PRECMD | HP_SDC_ACT_DATAOUT,
-+		HP_SDC_CMD_SET_RTMS, 3, 0, 0, 0,
-+		HP_SDC_ACT_PRECMD | HP_SDC_ACT_DATAOUT,
-+		HP_SDC_CMD_SET_RTD, 2, 0, 0 
-+	};
-+
-+	t.endidx = 10;
-+
-+	if (0xffff < setto->tv_sec / 86400) return -1;
-+	days = setto->tv_sec / 86400;
-+	if (0xffff < setto->tv_usec / 1000000 / 86400) return -1;
-+	days += ((setto->tv_sec % 86400) + setto->tv_usec / 1000000) / 86400;
-+	if (days > 0xffff) return -1;
-+
-+	if (0xffffff < setto->tv_sec) return -1;
-+	tenms  = setto->tv_sec * 100;
-+	if (0xffffff < setto->tv_usec / 10000) return -1;
-+	tenms += setto->tv_usec / 10000;
-+	if (tenms > 0xffffff) return -1;
-+
-+	tseq[3] = (uint8_t)(tenms & 0xff);
-+	tseq[4] = (uint8_t)((tenms >> 8)  & 0xff);
-+	tseq[5] = (uint8_t)((tenms >> 16) & 0xff);
-+
-+	tseq[9] = (uint8_t)(days & 0xff);
-+	tseq[10] = (uint8_t)((days >> 8) & 0xff);
-+
-+	t.seq =	tseq;
-+
-+	if (hp_sdc_enqueue_transaction(&t)) return -1;
-+	return 0;
-+}
-+
-+/* Set the i8042 fast handshake timer */
-+static int hp_sdc_rtc_set_fhs (struct timeval *setto)
-+{
-+	uint32_t tenms;
-+	hp_sdc_transaction t;
-+	uint8_t tseq[5] = {
-+		HP_SDC_ACT_PRECMD | HP_SDC_ACT_DATAOUT,
-+		HP_SDC_CMD_SET_FHS, 2, 0, 0
-+	};
-+
-+	t.endidx = 4;
-+
-+	if (0xffff < setto->tv_sec) return -1;
-+	tenms  = setto->tv_sec * 100;
-+	if (0xffff < setto->tv_usec / 10000) return -1;
-+	tenms += setto->tv_usec / 10000;
-+	if (tenms > 0xffff) return -1;
-+
-+	tseq[3] = (uint8_t)(tenms & 0xff);
-+	tseq[4] = (uint8_t)((tenms >> 8)  & 0xff);
-+
-+	t.seq =	tseq;
-+
-+	if (hp_sdc_enqueue_transaction(&t)) return -1;
-+	return 0;
-+}
-+
-+
-+/* Set the i8042 match timer (a.k.a. alarm) */
-+#define hp_sdc_rtc_set_mt (setto) \
-+	hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_MT)
-+
-+/* Set the i8042 delay timer */
-+#define hp_sdc_rtc_set_dt (setto) \
-+	hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_DT)
-+
-+/* Set the i8042 cycle timer (a.k.a. periodic) */
-+#define hp_sdc_rtc_set_ct (setto) \
-+	hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_CT)
-+
-+/* Set one of the i8042 3-byte wide timers */
-+static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
-+{
-+	uint32_t tenms;
-+	hp_sdc_transaction t;
-+	uint8_t tseq[6] = {
-+		HP_SDC_ACT_PRECMD | HP_SDC_ACT_DATAOUT,
-+		0, 3, 0, 0, 0
-+	};
-+
-+	t.endidx = 6;
-+
-+	if (0xffffff < setto->tv_sec) return -1;
-+	tenms  = setto->tv_sec * 100;
-+	if (0xffffff < setto->tv_usec / 10000) return -1;
-+	tenms += setto->tv_usec / 10000;
-+	if (tenms > 0xffffff) return -1;
-+
-+	tseq[1] = setcmd;
-+	tseq[3] = (uint8_t)(tenms & 0xff);
-+	tseq[4] = (uint8_t)((tenms >> 8)  & 0xff);
-+	tseq[5] = (uint8_t)((tenms >> 16)  & 0xff);
-+
-+	t.seq =			tseq;
-+
-+	if (hp_sdc_enqueue_transaction(&t)) { 
-+		return -1;
-+	}
-+	return 0;
-+}
-+
-+static loff_t hp_sdc_rtc_llseek(struct file *file, loff_t offset, int origin)
-+{
-+        return -ESPIPE;
-+}
-+
-+static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
-+			       size_t count, loff_t *ppos) {
-+	ssize_t retval;
-+
-+        if (count < sizeof(unsigned long))
-+                return -EINVAL;
-+
-+	retval = put_user(68, (unsigned long *)buf);
-+	return retval;
-+}
-+
-+static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait)
-+{
-+        unsigned long l;
-+
-+	l = 0;
-+        if (l != 0)
-+                return POLLIN | POLLRDNORM;
-+        return 0;
-+}
-+
-+static int hp_sdc_rtc_open(struct inode *inode, struct file *file)
-+{
-+	MOD_INC_USE_COUNT;
-+        return 0;
-+}
-+
-+static int hp_sdc_rtc_release(struct inode *inode, struct file *file)
-+{
-+	/* Turn off interrupts? */
-+
-+        if (file->f_flags & FASYNC) {
-+                hp_sdc_rtc_fasync (-1, file, 0);
-+        }
-+
-+	MOD_DEC_USE_COUNT;
-+        return 0;
-+}
-+
-+static int hp_sdc_rtc_fasync (int fd, struct file *filp, int on)
-+{
-+        return fasync_helper (fd, filp, on, &hp_sdc_rtc_async_queue);
-+}
-+
-+static int hp_sdc_rtc_proc_output (char *buf)
-+{
-+#define YN(bit) ("no")
-+#define NY(bit) ("yes")
-+        char *p;
-+        struct rtc_time tm;
-+	struct timeval tv;
-+
-+	memset(&tm, 0, sizeof(struct rtc_time));
-+
-+	p = buf;
-+
-+	if (hp_sdc_rtc_read_bbrtc(&tm)) {
-+		p += sprintf(p, "BBRTC\t\t: READ FAILED!\n");
-+	} else {
-+		p += sprintf(p,
-+			     "rtc_time\t: %02d:%02d:%02d\n"
-+			     "rtc_date\t: %04d-%02d-%02d\n"
-+			     "rtc_epoch\t: %04lu\n",
-+			     tm.tm_hour, tm.tm_min, tm.tm_sec,
-+			     tm.tm_year + 1900, tm.tm_mon + 1, 
-+			     tm.tm_mday, epoch);
-+	}
-+
-+	if (hp_sdc_rtc_read_rt(&tv)) {
-+		p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
-+	} else {
-+		p += sprintf(p, "i8042 rtc\t: %d.%02d seconds\n", 
-+			     tv.tv_sec, tv.tv_usec/1000);
-+	}
-+
-+	if (hp_sdc_rtc_read_fhs(&tv)) {
-+		p += sprintf(p, "handshake\t: READ FAILED!\n");
-+	} else {
-+        	p += sprintf(p, "handshake\t: %d.%02d seconds\n", 
-+			     tv.tv_sec, tv.tv_usec/1000);
-+	}
-+
-+	if (hp_sdc_rtc_read_mt(&tv)) {
-+		p += sprintf(p, "alarm\t\t: READ FAILED!\n");
-+	} else {
-+		p += sprintf(p, "alarm\t\t: %d.%02d seconds\n", 
-+			     tv.tv_sec, tv.tv_usec/1000);
-+	}
-+
-+	if (hp_sdc_rtc_read_dt(&tv)) {
-+		p += sprintf(p, "delay\t\t: READ FAILED!\n");
-+	} else {
-+		p += sprintf(p, "delay\t\t: %d.%02d seconds\n", 
-+			     tv.tv_sec, tv.tv_usec/1000);
-+	}
-+
-+	if (hp_sdc_rtc_read_ct(&tv)) {
-+		p += sprintf(p, "periodic\t: READ FAILED!\n");
-+	} else {
-+		p += sprintf(p, "periodic\t: %d.%02d seconds\n", 
-+			     tv.tv_sec, tv.tv_usec/1000);
-+	}
-+
-+        p += sprintf(p,
-+                     "DST_enable\t: %s\n"
-+                     "BCD\t\t: %s\n"
-+                     "24hr\t\t: %s\n"
-+                     "square_wave\t: %s\n"
-+                     "alarm_IRQ\t: %s\n"
-+                     "update_IRQ\t: %s\n"
-+                     "periodic_IRQ\t: %s\n"
-+		     "periodic_freq\t: %ld\n"
-+                     "batt_status\t: %s\n",
-+                     YN(RTC_DST_EN),
-+                     NY(RTC_DM_BINARY),
-+                     YN(RTC_24H),
-+                     YN(RTC_SQWE),
-+                     YN(RTC_AIE),
-+                     YN(RTC_UIE),
-+                     YN(RTC_PIE),
-+                     1UL,
-+                     1 ? "okay" : "dead");
-+
-+        return  p - buf;
-+#undef YN
-+#undef NY
-+}
-+
-+static int hp_sdc_rtc_read_proc(char *page, char **start, off_t off,
-+                         int count, int *eof, void *data)
-+{
-+	int len = hp_sdc_rtc_proc_output (page);
-+        if (len <= off+count) *eof = 1;
-+        *start = page + off;
-+        len -= off;
-+        if (len>count) len = count;
-+        if (len<0) len = 0;
-+        return len;
-+}
-+
-+static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, 
-+			    unsigned int cmd, unsigned long arg)
-+{
-+#if 1
-+	return -EINVAL;
-+#else
-+	
-+        struct rtc_time wtime; 
-+	struct timeval ttime;
-+	int use_wtime = 0;
-+
-+	/* This needs major work. */
-+
-+        switch (cmd) {
-+
-+        case RTC_AIE_OFF:       /* Mask alarm int. enab. bit    */
-+        case RTC_AIE_ON:        /* Allow alarm interrupts.      */
-+	case RTC_PIE_OFF:       /* Mask periodic int. enab. bit */
-+        case RTC_PIE_ON:        /* Allow periodic ints          */
-+        case RTC_UIE_ON:        /* Allow ints for RTC updates.  */
-+        case RTC_UIE_OFF:       /* Allow ints for RTC updates.  */
-+        {
-+		/* We cannot mask individual user timers and we
-+		   cannot tell them apart when they occur, so it 
-+		   would be disingenuous to succeed these IOCTLs */
-+		return -EINVAL;
-+        }
-+        case RTC_ALM_READ:      /* Read the present alarm time */
-+        {
-+		if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT;
-+		if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
-+
-+		wtime.tm_hour = ttime.tv_sec / 3600;  ttime.tv_sec %= 3600;
-+		wtime.tm_min  = ttime.tv_sec / 60;    ttime.tv_sec %= 60;
-+		wtime.tm_sec  = ttime.tv_sec;
-+                
-+		break;
-+        }
-+        case RTC_IRQP_READ:     /* Read the periodic IRQ rate.  */
-+        {
-+                return put_user(hp_sdc_rtc_freq, (unsigned long *)arg);
-+        }
-+        case RTC_IRQP_SET:      /* Set periodic IRQ rate.       */
-+        {
-+                /* 
-+                 * The max we can do is 100Hz.
-+		 */
-+
-+                if ((arg < 1) || (arg > 100)) return -EINVAL;
-+		ttime.tv_sec = 0;
-+		ttime.tv_usec = 1000000 / arg;
-+		if (hp_sdc_rtc_set_ct(&ttime)) return -EFAULT;
-+		hp_sdc_rtc_freq = arg;
-+                return 0;
-+        }
-+        case RTC_ALM_SET:       /* Store a time into the alarm */
-+        {
-+                /*
-+                 * This expects a struct hp_sdc_rtc_time. Writing 0xff means
-+                 * "don't care" or "match all" for PC timers.  The HP SDC
-+		 * does not support that perk, but it could be emulated fairly
-+		 * easily.  Only the tm_hour, tm_min and tm_sec are used.
-+		 * We could do it with 10ms accuracy with the HP SDC, if the 
-+		 * rtc interface left us a way to do that.
-+                 */
-+                struct hp_sdc_rtc_time alm_tm;
-+
-+                if (copy_from_user(&alm_tm, (struct hp_sdc_rtc_time*)arg,
-+                                   sizeof(struct hp_sdc_rtc_time)))
-+                       return -EFAULT;
-+
-+                if (alm_tm.tm_hour > 23) return -EINVAL;
-+		if (alm_tm.tm_min  > 59) return -EINVAL;
-+		if (alm_tm.tm_sec  > 59) return -EINVAL;  
-+
-+		ttime.sec = alm_tm.tm_hour * 3600 + 
-+		  alm_tm.tm_min * 60 + alm_tm.tm_sec;
-+		ttime.usec = 0;
-+		if (hp_sdc_rtc_set_mt(&ttime)) return -EFAULT;
-+                return 0;
-+        }
-+        case RTC_RD_TIME:       /* Read the time/date from RTC  */
-+        {
-+		if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
-+                break;
-+        }
-+        case RTC_SET_TIME:      /* Set the RTC */
-+        {
-+                struct rtc_time hp_sdc_rtc_tm;
-+                unsigned char mon, day, hrs, min, sec, leap_yr;
-+                unsigned int yrs;
-+
-+                if (!capable(CAP_SYS_TIME))
-+                        return -EACCES;
-+		if (copy_from_user(&hp_sdc_rtc_tm, (struct rtc_time *)arg,
-+                                   sizeof(struct rtc_time)))
-+                        return -EFAULT;
-+
-+                yrs = hp_sdc_rtc_tm.tm_year + 1900;
-+                mon = hp_sdc_rtc_tm.tm_mon + 1;   /* tm_mon starts at zero */
-+                day = hp_sdc_rtc_tm.tm_mday;
-+                hrs = hp_sdc_rtc_tm.tm_hour;
-+                min = hp_sdc_rtc_tm.tm_min;
-+                sec = hp_sdc_rtc_tm.tm_sec;
-+
-+                if (yrs < 1970)
-+                        return -EINVAL;
-+
-+                leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
-+
-+                if ((mon > 12) || (day == 0))
-+                        return -EINVAL;
-+                if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
-+                        return -EINVAL;
-+		if ((hrs >= 24) || (min >= 60) || (sec >= 60))
-+                        return -EINVAL;
-+
-+                if ((yrs -= eH) > 255)    /* They are unsigned */
-+                        return -EINVAL;
-+
-+
-+                return 0;
-+        }
-+        case RTC_EPOCH_READ:    /* Read the epoch.      */
-+        {
-+                return put_user (epoch, (unsigned long *)arg);
-+        }
-+        case RTC_EPOCH_SET:     /* Set the epoch.       */
-+        {
-+                /* 
-+                 * There were no RTC clocks before 1900.
-+                 */
-+                if (arg < 1900)
-+		  return -EINVAL;
-+		if (!capable(CAP_SYS_TIME))
-+		  return -EACCES;
-+		
-+                epoch = arg;
-+                return 0;
-+        }
-+        default:
-+                return -EINVAL;
-+        }
-+        return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
-+#endif
-+}
-+
-+static struct file_operations hp_sdc_rtc_fops = {
-+        .owner =	THIS_MODULE,
-+        .llseek =	hp_sdc_rtc_llseek,
-+        .read =		hp_sdc_rtc_read,
-+        .poll =		hp_sdc_rtc_poll,
-+        .ioctl =	hp_sdc_rtc_ioctl,
-+        .open =		hp_sdc_rtc_open,
-+        .release =	hp_sdc_rtc_release,
-+        .fasync =	hp_sdc_rtc_fasync,
-+};
-+
-+static struct miscdevice hp_sdc_rtc_dev = {
-+        .minor =	RTC_MINOR,
-+        .name =		"rtc",
-+        .fops =		&hp_sdc_rtc_fops
-+};
-+
-+static int __init hp_sdc_rtc_init(void)
-+{
-+	int ret;
-+
-+	init_MUTEX(&i8042tregs);
-+
-+	if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
-+		return ret;
-+	misc_register(&hp_sdc_rtc_dev);
-+        create_proc_read_entry ("driver/rtc", 0, 0, 
-+				hp_sdc_rtc_read_proc, NULL);
-+
-+	printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded "
-+			 "(RTC v " RTC_VERSION ")\n");
-+
-+	return 0;
-+}
-+
-+static void __exit hp_sdc_rtc_exit(void)
-+{
-+	remove_proc_entry ("driver/rtc", NULL);
-+        misc_deregister(&hp_sdc_rtc_dev);
-+	hp_sdc_release_timer_irq(hp_sdc_rtc_isr);
-+        printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support unloaded\n");
-+}
-+
-+module_init(hp_sdc_rtc_init);
-+module_exit(hp_sdc_rtc_exit);
-Index: debian-kernel-hppa-2.6.8/drivers/input/misc/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/misc/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/misc/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -50,3 +50,11 @@
- 	  To compile this driver as a module, choose M here: the
- 	  module will be called uinput.
- 
-+config HP_SDC_RTC
-+	tristate "HP SDC Real Time Clock"
-+	depends on INPUT && INPUT_MISC && GSC
-+	select HP_SDC
-+	help
-+	  Say Y here if you want to support the built-in real time clock
-+	  of the HP SDC controller.
-+
-Index: debian-kernel-hppa-2.6.8/drivers/input/misc/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/misc/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/misc/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -9,3 +9,4 @@
- obj-$(CONFIG_INPUT_M68K_BEEP)		+= m68kspkr.o
- obj-$(CONFIG_INPUT_98SPKR)		+= 98spkr.o
- obj-$(CONFIG_INPUT_UINPUT)		+= uinput.o
-+obj-$(CONFIG_HP_SDC_RTC)		+= hp_sdc_rtc.o
-Index: debian-kernel-hppa-2.6.8/drivers/input/mouse/hil_ptr.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/mouse/hil_ptr.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,409 @@
-+/*
-+ * Generic linux-input device driver for axis-bearing devices
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ */
-+
-+#include <linux/hil.h>
-+#include <linux/input.h>
-+#include <linux/serio.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/slab.h>
-+#include <linux/pci_ids.h>
-+
-+#define PREFIX "HIL PTR: "
-+#define HIL_GENERIC_NAME "HIL pointer device"
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION(HIL_GENERIC_NAME " driver");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+
-+#define TABLET_SIMULATES_MOUSE	/* allow tablet to be used as mouse */
-+#undef  TABLET_AUTOADJUST	/* auto-adjust valid tablet ranges */
-+
-+
-+#define HIL_PTR_MAX_LENGTH 16
-+
-+struct hil_ptr {
-+	struct input_dev dev;
-+	struct serio *serio;
-+
-+	/* Input buffer and index for packets from HIL bus. */
-+	hil_packet data[HIL_PTR_MAX_LENGTH];
-+	int idx4; /* four counts per packet */
-+
-+	/* Raw device info records from HIL bus, see hil.h for fields. */
-+	char	idd[HIL_PTR_MAX_LENGTH];	/* DID byte and IDD record */
-+	char	rsc[HIL_PTR_MAX_LENGTH];	/* RSC record */
-+	char	exd[HIL_PTR_MAX_LENGTH];	/* EXD record */
-+	char	rnm[HIL_PTR_MAX_LENGTH + 1];	/* RNM record + NULL term. */
-+
-+	/* Extra device details not contained in struct input_dev. */
-+	unsigned int nbtn, naxes;
-+	unsigned int btnmap[7];
-+
-+	/* Something to sleep around with. */
-+	struct semaphore sem;
-+};
-+
-+/* Process a complete packet after transfer from the HIL */
-+static void hil_ptr_process_record(struct hil_ptr *ptr)
-+{
-+	struct input_dev *dev = &ptr->dev;
-+	hil_packet *data = ptr->data;
-+	hil_packet p;
-+	int idx, i, cnt, laxis;
-+	int ax16, absdev;
-+
-+	idx = ptr->idx4/4;
-+	p = data[idx - 1];
-+
-+	if ((p & ~HIL_CMDCT_POL) == 
-+	    (HIL_ERR_INT | HIL_PKT_CMD | HIL_CMD_POL)) goto report;
-+	if ((p & ~HIL_CMDCT_RPL) == 
-+	    (HIL_ERR_INT | HIL_PKT_CMD | HIL_CMD_RPL)) goto report;
-+
-+	/* Not a poll response.  See if we are loading config records. */
-+	switch (p & HIL_PKT_DATA_MASK) {
-+	case HIL_CMD_IDD:
-+		for (i = 0; i < idx; i++)
-+			ptr->idd[i] = ptr->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_PTR_MAX_LENGTH; i++)
-+			ptr->idd[i] = 0;
-+		break;
-+	case HIL_CMD_RSC:
-+		for (i = 0; i < idx; i++)
-+			ptr->rsc[i] = ptr->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_PTR_MAX_LENGTH; i++)
-+			ptr->rsc[i] = 0;
-+		break;
-+	case HIL_CMD_EXD:
-+		for (i = 0; i < idx; i++)
-+			ptr->exd[i] = ptr->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_PTR_MAX_LENGTH; i++)
-+			ptr->exd[i] = 0;
-+		break;
-+	case HIL_CMD_RNM:
-+		for (i = 0; i < idx; i++)
-+			ptr->rnm[i] = ptr->data[i] & HIL_PKT_DATA_MASK;
-+		for (; i < HIL_PTR_MAX_LENGTH + 1; i++)
-+			ptr->rnm[i] = '\0';
-+		break;
-+	default:
-+		/* These occur when device isn't present */
-+		if (p == (HIL_ERR_INT | HIL_PKT_CMD)) break; 
-+		/* Anything else we'd like to know about. */
-+		printk(KERN_WARNING PREFIX "Device sent unknown record %x\n", p);
-+		break;
-+	}
-+	goto out;
-+
-+ report:
-+	if ((p & HIL_CMDCT_POL) != idx - 1) {
-+		printk(KERN_WARNING PREFIX "Malformed poll packet %x (idx = %i)\n", p, idx);
-+		goto out;
-+	}
-+
-+	i = (ptr->data[0] & HIL_POL_AXIS_ALT) ? 3 : 0;
-+	laxis = ptr->data[0] & HIL_POL_NUM_AXES_MASK;
-+	laxis += i;
-+
-+	ax16 = ptr->idd[1] & HIL_IDD_HEADER_16BIT; /* 8 or 16bit resolution */
-+	absdev = ptr->idd[1] & HIL_IDD_HEADER_ABS; 
-+
-+	for (cnt = 1; i < laxis; i++) {
-+		unsigned int lo,hi,val;
-+		lo = ptr->data[cnt++] & HIL_PKT_DATA_MASK;
-+		hi = ax16 ? (ptr->data[cnt++] & HIL_PKT_DATA_MASK) : 0;
-+		if (absdev) {
-+			val = lo + (hi<<8);
-+#ifdef TABLET_AUTOADJUST
-+			if (val < ptr->dev.absmin[ABS_X + i])
-+				ptr->dev.absmin[ABS_X + i] = val;
-+			if (val > ptr->dev.absmax[ABS_X + i])
-+				ptr->dev.absmax[ABS_X + i] = val;
-+#endif
-+			if (i%3) val = ptr->dev.absmax[ABS_X + i] - val;
-+			input_report_abs(dev, ABS_X + i, val);
-+		} else {
-+			val = (int) (((int8_t)lo) | ((int8_t)hi<<8));
-+			if (i%3) val *= -1;
-+			input_report_rel(dev, REL_X + i, val);
-+		}
-+	}
-+
-+	while (cnt < idx - 1) {
-+		unsigned int btn;
-+		int up;
-+		btn = ptr->data[cnt++];
-+		up = btn & 1;
-+		btn &= 0xfe;
-+		if (btn == 0x8e) {
-+			continue; /* TODO: proximity == touch? */
-+		}
-+		else if ((btn > 0x8c) || (btn < 0x80)) continue;
-+		btn = (btn - 0x80) >> 1;
-+		btn = ptr->btnmap[btn];
-+		input_report_key(dev, btn, !up);
-+	}
-+	input_sync(dev);
-+ out:
-+	ptr->idx4 = 0;
-+	up(&ptr->sem);
-+}
-+
-+static void hil_ptr_process_err(struct hil_ptr *ptr) {
-+	printk(KERN_WARNING PREFIX "errored HIL packet\n");
-+	ptr->idx4 = 0;
-+	up(&ptr->sem);
-+	return;
-+}
-+
-+static irqreturn_t hil_ptr_interrupt(struct serio *serio, 
-+        unsigned char data, unsigned int flags, struct pt_regs *regs)
-+{
-+	struct hil_ptr *ptr;
-+	hil_packet packet;
-+	int idx;
-+
-+	ptr = (struct hil_ptr *)serio->private;
-+	if (ptr == NULL) {
-+		BUG();
-+		return IRQ_HANDLED;
-+	}
-+
-+	if (ptr->idx4 >= (HIL_PTR_MAX_LENGTH * sizeof(hil_packet))) {
-+		hil_ptr_process_err(ptr);
-+		return IRQ_HANDLED;
-+	}
-+	idx = ptr->idx4/4;
-+	if (!(ptr->idx4 % 4)) ptr->data[idx] = 0;
-+	packet = ptr->data[idx];
-+	packet |= ((hil_packet)data) << ((3 - (ptr->idx4 % 4)) * 8);
-+	ptr->data[idx] = packet;
-+
-+	/* Records of N 4-byte hil_packets must terminate with a command. */
-+	if ((++(ptr->idx4)) % 4) return IRQ_HANDLED;
-+	if ((packet & 0xffff0000) != HIL_ERR_INT) {
-+		hil_ptr_process_err(ptr);
-+		return IRQ_HANDLED;
-+	}
-+	if (packet & HIL_PKT_CMD) 
-+		hil_ptr_process_record(ptr);
-+	return IRQ_HANDLED;
-+}
-+
-+static void hil_ptr_disconnect(struct serio *serio)
-+{
-+	struct hil_ptr *ptr;
-+
-+	ptr = (struct hil_ptr *)serio->private;
-+	if (ptr == NULL) {
-+		BUG();
-+		return;
-+	}
-+
-+	input_unregister_device(&ptr->dev);
-+	serio_close(serio);
-+	kfree(ptr);
-+}
-+
-+static void hil_ptr_connect(struct serio *serio, struct serio_dev *dev)
-+{
-+	struct hil_ptr	*ptr;
-+	char		*txt;
-+	unsigned int	i, naxsets, btntype;
-+	uint8_t		did, *idd;
-+
-+	if (serio->type != (SERIO_HIL_MLC | SERIO_HIL)) return;
-+
-+	if (!(ptr = kmalloc(sizeof(struct hil_ptr), GFP_KERNEL))) return;
-+	memset(ptr, 0, sizeof(struct hil_ptr));
-+
-+	if (serio_open(serio, dev)) goto bail0;
-+
-+	serio->private = ptr;
-+	ptr->serio = serio;
-+	ptr->dev.private = ptr;
-+
-+	init_MUTEX_LOCKED(&(ptr->sem));
-+
-+	/* Get device info.  MLC driver supplies devid/status/etc. */
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_IDD);
-+	down(&(ptr->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_RSC);
-+	down(&(ptr->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_RNM);
-+	down(&(ptr->sem));
-+
-+	serio->write(serio, 0);
-+	serio->write(serio, 0);
-+	serio->write(serio, HIL_PKT_CMD >> 8);
-+	serio->write(serio, HIL_CMD_EXD);
-+	down(&(ptr->sem));
-+
-+	up(&(ptr->sem));
-+
-+	init_input_dev(&ptr->dev);
-+	did = ptr->idd[0];
-+	idd = ptr->idd + 1;
-+	txt = "unknown";
-+	if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_REL) {
-+		ptr->dev.evbit[0] = BIT(EV_REL);
-+		txt = "relative";
-+	}
-+
-+	if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_ABS) {
-+		ptr->dev.evbit[0] = BIT(EV_ABS);
-+		txt = "absolute";
-+	}
-+	if (!ptr->dev.evbit[0]) {
-+		goto bail1;
-+	}
-+
-+	ptr->nbtn = HIL_IDD_NUM_BUTTONS(idd);
-+	if (ptr->nbtn) ptr->dev.evbit[0] |= BIT(EV_KEY);
-+
-+	naxsets = HIL_IDD_NUM_AXSETS(*idd);
-+	ptr->naxes = HIL_IDD_NUM_AXES_PER_SET(*idd);
-+
-+	printk(KERN_INFO PREFIX "HIL pointer device found (did: 0x%02x, axis: %s)\n",
-+			did, txt);
-+	printk(KERN_INFO PREFIX "HIL pointer has %i buttons and %i sets of %i axes\n",
-+			ptr->nbtn, naxsets, ptr->naxes);
-+	
-+	btntype = BTN_MISC;
-+	if ((did & HIL_IDD_DID_ABS_TABLET_MASK) == HIL_IDD_DID_ABS_TABLET)
-+#ifdef TABLET_SIMULATES_MOUSE
-+		btntype = BTN_TOUCH;
-+#else
-+		btntype = BTN_DIGI;
-+#endif
-+	if ((did & HIL_IDD_DID_ABS_TSCREEN_MASK) == HIL_IDD_DID_ABS_TSCREEN)
-+		btntype = BTN_TOUCH;
-+		
-+	if ((did & HIL_IDD_DID_REL_MOUSE_MASK) == HIL_IDD_DID_REL_MOUSE)
-+		btntype = BTN_MOUSE;
-+
-+	for (i = 0; i < ptr->nbtn; i++) {
-+		set_bit(btntype | i, ptr->dev.keybit);
-+		ptr->btnmap[i] = btntype | i;
-+	}
-+
-+	if (btntype == BTN_MOUSE) {
-+		/* Swap buttons 2 and 3 */
-+		ptr->btnmap[1] = BTN_MIDDLE;
-+		ptr->btnmap[2] = BTN_RIGHT;
-+	}
-+
-+	if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_REL) {
-+		for (i = 0; i < ptr->naxes; i++) {
-+			set_bit(REL_X + i, ptr->dev.relbit);
-+		}
-+		for (i = 3; (i < ptr->naxes + 3) && (naxsets > 1); i++) {
-+			set_bit(REL_X + i, ptr->dev.relbit);
-+		}
-+	} else {
-+		for (i = 0; i < ptr->naxes; i++) {
-+	  		set_bit(ABS_X + i, ptr->dev.absbit);
-+			ptr->dev.absmin[ABS_X + i] = 0;
-+			ptr->dev.absmax[ABS_X + i] = 
-+				HIL_IDD_AXIS_MAX((ptr->idd + 1), i);
-+		}
-+		for (i = 3; (i < ptr->naxes + 3) && (naxsets > 1); i++) {
-+			set_bit(ABS_X + i, ptr->dev.absbit);
-+			ptr->dev.absmin[ABS_X + i] = 0;
-+			ptr->dev.absmax[ABS_X + i] = 
-+				HIL_IDD_AXIS_MAX((ptr->idd + 1), (i - 3));
-+		}
-+#ifdef TABLET_AUTOADJUST
-+		for (i = 0; i < ABS_MAX; i++) {
-+			int diff = ptr->dev.absmax[ABS_X + i] / 10;
-+			ptr->dev.absmin[ABS_X + i] += diff;
-+			ptr->dev.absmax[ABS_X + i] -= diff;
-+		}
-+#endif
-+	}
-+
-+	ptr->dev.name = strlen(ptr->rnm) ? ptr->rnm : HIL_GENERIC_NAME;
-+
-+	ptr->dev.id.bustype = BUS_HIL;
-+	ptr->dev.id.vendor = PCI_VENDOR_ID_HP;
-+	ptr->dev.id.product = 0x0001; /* TODO: get from ptr->rsc */
-+	ptr->dev.id.version = 0x0100; /* TODO: get from ptr->rsc */
-+
-+	input_register_device(&ptr->dev);
-+	printk(KERN_INFO "input: %s (%s), ID: %d\n",
-+                ptr->dev.name, 
-+		(btntype == BTN_MOUSE) ? "HIL mouse":"HIL tablet or touchpad",
-+		did);
-+
-+	return;
-+ bail1:
-+	serio_close(serio);
-+ bail0:
-+	kfree(ptr);
-+	return;
-+}
-+
-+
-+static struct serio_dev hil_ptr_serio_dev = {
-+	.connect =	hil_ptr_connect,
-+	.disconnect =	hil_ptr_disconnect,
-+	.interrupt =	hil_ptr_interrupt
-+};
-+
-+static int __init hil_ptr_init(void)
-+{
-+	serio_register_device(&hil_ptr_serio_dev);
-+        return 0;
-+}
-+                
-+static void __exit hil_ptr_exit(void)
-+{
-+	serio_unregister_device(&hil_ptr_serio_dev);
-+}
-+                        
-+module_init(hil_ptr_init);
-+module_exit(hil_ptr_exit);
-Index: debian-kernel-hppa-2.6.8/drivers/input/mouse/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/mouse/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/mouse/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -130,3 +130,11 @@
- 	  described in the source file). This driver should, in theory,
- 	  also work with the digitizer DEC produced, but it isn't tested
- 	  with that (I don't have the hardware yet).
-+
-+config MOUSE_HIL
-+	tristate "HIL pointers (mice etc)."
-+	depends on PARISC && INPUT_MOUSE
-+	select HP_SDC
-+	select HIL_MLC
-+	help
-+	  Say Y here to support HIL pointers.
-Index: debian-kernel-hppa-2.6.8/drivers/input/mouse/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/mouse/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/mouse/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -12,6 +12,7 @@
- obj-$(CONFIG_MOUSE_PC110PAD)	+= pc110pad.o
- obj-$(CONFIG_MOUSE_PS2)		+= psmouse.o
- obj-$(CONFIG_MOUSE_SERIAL)	+= sermouse.o
-+obj-$(CONFIG_MOUSE_HIL)		+= hil_ptr.o
- obj-$(CONFIG_MOUSE_VSXXXAA)	+= vsxxxaa.o
- 
- psmouse-objs  := psmouse-base.o logips2pp.o synaptics.o
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/gscps2.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/serio/gscps2.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/gscps2.c	2005-03-24 01:16:08.000000000 -0500
-@@ -38,7 +38,7 @@
- #include <asm/parisc-device.h>
- 
- MODULE_AUTHOR("Laurent Canet <canetl at esiee.fr>, Thibaut Varene <varenet at esiee.fr>, Helge Deller <deller at gmx.de>");
--MODULE_DESCRIPTION("HP GSC PS/2 port driver");
-+MODULE_DESCRIPTION("HP GSC PS2 port driver");
- MODULE_LICENSE("GPL");
- MODULE_DEVICE_TABLE(parisc, gscps2_device_tbl);
- 
-@@ -325,7 +325,7 @@
- 
- static struct serio gscps2_serio_port =
- {
--	.name =		"GSC PS/2",
-+	.name =		"GSC PS2",
- 	.idbus =	BUS_GSC,
- 	.idvendor =	PCI_VENDOR_ID_HP,
- 	.idproduct =	0x0001,
-@@ -447,7 +447,7 @@
- };
- 
- static struct parisc_driver parisc_ps2_driver = {
--	.name		= "GSC PS/2",
-+	.name		= "GSC PS2",
- 	.id_table	= gscps2_device_tbl,
- 	.probe		= gscps2_probe,
- 	.remove		= gscps2_remove,
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/hil_mlc.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/hil_mlc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,951 @@
-+/*
-+ * HIL MLC state machine and serio interface driver
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ *
-+ *	Driver theory of operation:
-+ *
-+ *	Some access methods and an ISR is defined by the sub-driver 
-+ *	(e.g. hp_sdc_mlc.c).  These methods are expected to provide a 
-+ *	few bits of logic in addition to raw access to the HIL MLC, 
-+ *	specifically, the ISR, which is entirely registered by the 
-+ *	sub-driver and invoked directly, must check for record 
-+ *	termination or packet match, at which point a semaphore must
-+ *	be cleared and then the hil_mlcs_tasklet must be scheduled.
-+ *
-+ *	The hil_mlcs_tasklet processes the state machine for all MLCs
-+ *	each time it runs, checking each MLC's progress at the current
-+ *	node in the state machine, and moving the MLC to subsequent nodes
-+ *	in the state machine when appropriate.  It will reschedule
-+ *	itself if output is pending.  (This rescheduling should be replaced
-+ *	at some point with a sub-driver-specific mechanism.)
-+ *
-+ *	A timer task prods the tasklet once per second to prevent 
-+ *	hangups when attached devices do not return expected data
-+ *	and to initiate probes of the loop for new devices.
-+ */
-+
-+#include <linux/hil_mlc.h>
-+#include <linux/errno.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/interrupt.h>
-+#include <linux/timer.h>
-+#include <linux/sched.h>
-+#include <linux/list.h>
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION("HIL MLC serio");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+EXPORT_SYMBOL(hil_mlc_register);
-+EXPORT_SYMBOL(hil_mlc_unregister);
-+
-+#define PREFIX "HIL MLC: "
-+
-+static LIST_HEAD(hil_mlcs);
-+static rwlock_t			hil_mlcs_lock = RW_LOCK_UNLOCKED;
-+static struct timer_list	hil_mlcs_kicker;
-+static int			hil_mlcs_probe;
-+
-+static void hil_mlcs_process(unsigned long unused);
-+DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);
-+
-+
-+/* #define HIL_MLC_DEBUG */
-+
-+/********************** Device info/instance management **********************/
-+
-+static void hil_mlc_clear_di_map (hil_mlc *mlc, int val) {
-+	int j;
-+	for (j = val; j < 7 ; j++) {
-+		mlc->di_map[j] = -1;
-+	}
-+}
-+
-+static void hil_mlc_clear_di_scratch (hil_mlc *mlc) {
-+	memset(&(mlc->di_scratch), 0, sizeof(mlc->di_scratch));
-+}
-+
-+static void hil_mlc_copy_di_scratch (hil_mlc *mlc, int idx) {
-+	memcpy(&(mlc->di[idx]), &(mlc->di_scratch), sizeof(mlc->di_scratch));
-+}
-+
-+static int hil_mlc_match_di_scratch (hil_mlc *mlc) {
-+	int idx;
-+
-+	for (idx = 0; idx < HIL_MLC_DEVMEM; idx++) {
-+		int j, found;
-+
-+		/* In-use slots are not eligible. */
-+		found = 0;
-+		for (j = 0; j < 7 ; j++) {
-+			if (mlc->di_map[j] == idx) found++;
-+		}
-+		if (found) continue;
-+		if (!memcmp(mlc->di + idx, 
-+			    &(mlc->di_scratch), 
-+			    sizeof(mlc->di_scratch))) break;
-+	}
-+	return((idx >= HIL_MLC_DEVMEM) ? -1 : idx);
-+}
-+
-+static int hil_mlc_find_free_di(hil_mlc *mlc) {
-+	int idx;
-+	/* TODO: Pick all-zero slots first, failing that, 
-+	 * randomize the slot picked among those eligible. 
-+	 */
-+	for (idx = 0; idx < HIL_MLC_DEVMEM; idx++) {
-+		int j, found;
-+		found = 0;
-+		for (j = 0; j < 7 ; j++) {
-+			if (mlc->di_map[j] == idx) found++;
-+		}
-+		if (!found) break;
-+	}
-+	return(idx); /* Note: It is guaranteed at least one above will match */
-+}
-+
-+static inline void hil_mlc_clean_serio_map(hil_mlc *mlc) {
-+	int idx;
-+	for (idx = 0; idx < HIL_MLC_DEVMEM; idx++) {
-+		int j, found;
-+		found = 0;
-+		for (j = 0; j < 7 ; j++) {
-+			if (mlc->di_map[j] == idx) found++;
-+		}
-+		if (!found) mlc->serio_map[idx].di_revmap = -1;
-+	}
-+}
-+
-+static void hil_mlc_send_polls(hil_mlc *mlc) {
-+	int did, i, cnt;
-+	struct serio *serio;
-+	struct serio_dev *dev;
-+
-+	i = cnt = 0;
-+	did = (mlc->ipacket[0] & HIL_PKT_ADDR_MASK) >> 8;
-+	serio = did ? &(mlc->serio[mlc->di_map[did - 1]]) : NULL;
-+	dev = (serio != NULL) ? serio->dev : NULL;
-+
-+	while (mlc->icount < 15 - i) {
-+		hil_packet p;
-+		p = mlc->ipacket[i];
-+		if (did != (p & HIL_PKT_ADDR_MASK) >> 8) {
-+			if (dev == NULL || dev->interrupt == NULL) goto skip;
-+
-+			dev->interrupt(serio, 0, 0, NULL);
-+			dev->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
-+			dev->interrupt(serio, HIL_PKT_CMD >> 8,  0, NULL);
-+			dev->interrupt(serio, HIL_CMD_POL + cnt, 0, NULL);
-+		skip:
-+			did = (p & HIL_PKT_ADDR_MASK) >> 8;
-+			serio = did ? &(mlc->serio[mlc->di_map[did-1]]) : NULL;
-+			dev = (serio != NULL) ? serio->dev : NULL;
-+			cnt = 0;
-+		}
-+		cnt++; i++;
-+		if (dev == NULL || dev->interrupt == NULL) continue;
-+		dev->interrupt(serio, (p >> 24), 0, NULL);
-+		dev->interrupt(serio, (p >> 16) & 0xff, 0, NULL);
-+		dev->interrupt(serio, (p >> 8) & ~HIL_PKT_ADDR_MASK, 0, NULL);
-+		dev->interrupt(serio, p & 0xff, 0, NULL);
-+	}
-+}
-+
-+/*************************** State engine *********************************/
-+
-+#define HILSEN_SCHED	0x000100	/* Schedule the tasklet		*/
-+#define HILSEN_BREAK	0x000200	/* Wait until next pass		*/
-+#define HILSEN_UP	0x000400	/* relative node#, decrement	*/
-+#define HILSEN_DOWN	0x000800	/* relative node#, increment	*/
-+#define HILSEN_FOLLOW	0x001000	/* use retval as next node#	*/
-+
-+#define HILSEN_MASK	0x0000ff
-+#define HILSEN_START	0
-+#define HILSEN_RESTART	1
-+#define HILSEN_DHR	9
-+#define HILSEN_DHR2	10
-+#define HILSEN_IFC	14
-+#define HILSEN_HEAL0	16
-+#define HILSEN_HEAL	18
-+#define HILSEN_ACF      21
-+#define HILSEN_ACF2	22
-+#define HILSEN_DISC0	25
-+#define HILSEN_DISC	27
-+#define HILSEN_MATCH	40
-+#define HILSEN_OPERATE	41
-+#define HILSEN_PROBE	44
-+#define HILSEN_DSR	52
-+#define HILSEN_REPOLL	55
-+#define HILSEN_IFCACF	58
-+#define HILSEN_END	60
-+
-+#define HILSEN_NEXT	(HILSEN_DOWN | 1)
-+#define HILSEN_SAME	(HILSEN_DOWN | 0)
-+#define HILSEN_LAST	(HILSEN_UP | 1)
-+
-+#define HILSEN_DOZE	(HILSEN_SAME | HILSEN_SCHED | HILSEN_BREAK)
-+#define HILSEN_SLEEP	(HILSEN_SAME | HILSEN_BREAK)
-+
-+static int hilse_match(hil_mlc *mlc, int unused) {
-+	int rc;
-+	rc = hil_mlc_match_di_scratch(mlc);
-+	if (rc == -1) {
-+		rc = hil_mlc_find_free_di(mlc);
-+		if (rc == -1) goto err;
-+#ifdef HIL_MLC_DEBUG
-+		printk(KERN_DEBUG PREFIX "new in slot %i\n", rc);
-+#endif
-+		hil_mlc_copy_di_scratch(mlc, rc);
-+		mlc->di_map[mlc->ddi] = rc;
-+		mlc->serio_map[rc].di_revmap = mlc->ddi;
-+		hil_mlc_clean_serio_map(mlc);
-+		serio_rescan(mlc->serio + rc);
-+		return -1;
-+	}
-+	mlc->di_map[mlc->ddi] = rc;
-+#ifdef HIL_MLC_DEBUG
-+	printk(KERN_DEBUG PREFIX "same in slot %i\n", rc);
-+#endif
-+	mlc->serio_map[rc].di_revmap = mlc->ddi;
-+	hil_mlc_clean_serio_map(mlc);
-+	return 0;
-+ err:
-+	printk(KERN_ERR PREFIX "Residual device slots exhausted, close some serios!\n");
-+	return 1;
-+}
-+
-+/* An LCV used to prevent runaway loops, forces 5 second sleep when reset. */
-+static int hilse_init_lcv(hil_mlc *mlc, int unused) {
-+	struct timeval tv;
-+
-+	do_gettimeofday(&tv);
-+
-+	if(mlc->lcv == 0) goto restart;  /* First init, no need to dally */
-+	if(tv.tv_sec - mlc->lcv_tv.tv_sec < 5) return -1;
-+ restart:
-+	mlc->lcv_tv = tv;
-+	mlc->lcv = 0;
-+	return 0;
-+}
-+
-+static int hilse_inc_lcv(hil_mlc *mlc, int lim) {
-+	if (mlc->lcv++ >= lim) return -1;
-+	return 0;
-+}
-+
-+#if 0
-+static int hilse_set_lcv(hil_mlc *mlc, int val) {
-+	mlc->lcv = val;
-+	return 0;
-+}
-+#endif
-+
-+/* Management of the discovered device index (zero based, -1 means no devs) */
-+static int hilse_set_ddi(hil_mlc *mlc, int val) {
-+	mlc->ddi = val;
-+	hil_mlc_clear_di_map(mlc, val + 1);
-+	return 0;
-+}
-+
-+static int hilse_dec_ddi(hil_mlc *mlc, int unused) {
-+	mlc->ddi--;
-+	if (mlc->ddi <= -1) { 
-+		mlc->ddi = -1;
-+		hil_mlc_clear_di_map(mlc, 0);
-+		return -1;
-+	}
-+	hil_mlc_clear_di_map(mlc, mlc->ddi + 1);
-+	return 0;
-+}
-+
-+static int hilse_inc_ddi(hil_mlc *mlc, int unused) {
-+	if (mlc->ddi >= 6) {
-+		BUG();
-+		return -1;
-+	}
-+	mlc->ddi++;
-+	return 0;
-+}
-+
-+static int hilse_take_idd(hil_mlc *mlc, int unused) {
-+	int i;
-+
-+	/* Help the state engine: 
-+	 * Is this a real IDD response or just an echo? 
-+	 *
-+	 * Real IDD response does not start with a command. 
-+	 */
-+	if (mlc->ipacket[0] & HIL_PKT_CMD) goto bail;
-+	/* Should have the command echoed further down. */
-+	for (i = 1; i < 16; i++) {
-+		if (((mlc->ipacket[i] & HIL_PKT_ADDR_MASK) == 
-+		     (mlc->ipacket[0] & HIL_PKT_ADDR_MASK)) &&
-+		    (mlc->ipacket[i] & HIL_PKT_CMD) && 
-+		    ((mlc->ipacket[i] & HIL_PKT_DATA_MASK) == HIL_CMD_IDD))
-+			break;
-+	}
-+	if (i > 15) goto bail;
-+	/* And the rest of the packets should still be clear. */
-+	while (++i < 16) {
-+		if (mlc->ipacket[i]) break;
-+	}
-+	if (i < 16) goto bail;
-+	for (i = 0; i < 16; i++) {
-+		mlc->di_scratch.idd[i] = 
-+			mlc->ipacket[i] & HIL_PKT_DATA_MASK;
-+	}
-+	/* Next step is to see if RSC supported */
-+	if (mlc->di_scratch.idd[1] & HIL_IDD_HEADER_RSC) 
-+		return HILSEN_NEXT;
-+	if (mlc->di_scratch.idd[1] & HIL_IDD_HEADER_EXD) 
-+		return HILSEN_DOWN | 4;
-+	return 0;
-+ bail:
-+	mlc->ddi--;
-+	return -1; /* This should send us off to ACF */
-+}
-+
-+static int hilse_take_rsc(hil_mlc *mlc, int unused) {
-+	int i;
-+
-+	for (i = 0; i < 16; i++) {
-+		mlc->di_scratch.rsc[i] = 
-+			mlc->ipacket[i] & HIL_PKT_DATA_MASK;
-+	}
-+	/* Next step is to see if EXD supported (IDD has already been read) */
-+	if (mlc->di_scratch.idd[1] & HIL_IDD_HEADER_EXD) 
-+		return HILSEN_NEXT;
-+	return 0;
-+}
-+
-+static int hilse_take_exd(hil_mlc *mlc, int unused) {
-+	int i;
-+
-+	for (i = 0; i < 16; i++) {
-+		mlc->di_scratch.exd[i] = 
-+			mlc->ipacket[i] & HIL_PKT_DATA_MASK;
-+	}
-+	/* Next step is to see if RNM supported. */
-+	if (mlc->di_scratch.exd[0] & HIL_EXD_HEADER_RNM) 
-+		return HILSEN_NEXT;
-+	return 0;
-+}
-+
-+static int hilse_take_rnm(hil_mlc *mlc, int unused) {
-+	int i;
-+
-+	for (i = 0; i < 16; i++) {
-+		mlc->di_scratch.rnm[i] = 
-+			mlc->ipacket[i] & HIL_PKT_DATA_MASK;
-+	}
-+	do {
-+	  char nam[17];
-+	  snprintf(nam, 16, "%s", mlc->di_scratch.rnm);
-+	  nam[16] = '\0';
-+	  printk(KERN_INFO PREFIX "Device name gotten: %s\n", nam);
-+	} while (0);
-+	return 0;
-+}
-+
-+static int hilse_operate(hil_mlc *mlc, int repoll) { 
-+
-+	if (mlc->opercnt == 0) hil_mlcs_probe = 0;
-+	mlc->opercnt = 1;
-+
-+	hil_mlc_send_polls(mlc);
-+
-+	if (!hil_mlcs_probe) return 0;
-+	hil_mlcs_probe = 0;
-+	mlc->opercnt = 0;
-+	return 1;
-+}
-+
-+#define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \
-+{ HILSE_FUNC,		{ func: &funct }, funct_arg, zero_rc, neg_rc, pos_rc },
-+#define OUT(pack) \
-+{ HILSE_OUT,		{ packet: pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 },
-+#define CTS \
-+{ HILSE_CTS,		{ packet: 0    }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 },
-+#define EXPECT(comp, to, got, got_wrong, timed_out) \
-+{ HILSE_EXPECT,		{ packet: comp }, to, got, got_wrong, timed_out },
-+#define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \
-+{ HILSE_EXPECT_LAST,	{ packet: comp }, to, got, got_wrong, timed_out },
-+#define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \
-+{ HILSE_EXPECT_DISC,	{ packet: comp }, to, got, got_wrong, timed_out },
-+#define IN(to, got, got_error, timed_out) \
-+{ HILSE_IN,		{ packet: 0    }, to, got, got_error, timed_out },
-+#define OUT_DISC(pack) \
-+{ HILSE_OUT_DISC,	{ packet: pack }, 0, 0, 0, 0 },
-+#define OUT_LAST(pack) \
-+{ HILSE_OUT_LAST,	{ packet: pack }, 0, 0, 0, 0 },
-+
-+struct hilse_node hil_mlc_se[HILSEN_END] = {
-+
-+	/* 0  HILSEN_START */
-+	FUNC(hilse_init_lcv, 0,	HILSEN_NEXT,	HILSEN_SLEEP,	0)
-+
-+	/* 1  HILSEN_RESTART */
-+	FUNC(hilse_inc_lcv, 10,	HILSEN_NEXT,	HILSEN_START,  0)
-+	OUT(HIL_CTRL_ONLY)			/* Disable APE */
-+	CTS
-+
-+#define TEST_PACKET(x) \
-+(HIL_PKT_CMD | (x << HIL_PKT_ADDR_SHIFT) | x << 4 | x)
-+
-+	OUT(HIL_DO_ALTER_CTRL | HIL_CTRL_TEST | TEST_PACKET(0x5))
-+	EXPECT(HIL_ERR_INT | TEST_PACKET(0x5),
-+	       2000,		HILSEN_NEXT,	HILSEN_RESTART,	HILSEN_RESTART)
-+	OUT(HIL_DO_ALTER_CTRL | HIL_CTRL_TEST | TEST_PACKET(0xa))
-+	EXPECT(HIL_ERR_INT | TEST_PACKET(0xa),
-+	       2000,		HILSEN_NEXT,	HILSEN_RESTART,	HILSEN_RESTART)
-+	OUT(HIL_CTRL_ONLY | 0)			/* Disable test mode */
-+	
-+	/* 9  HILSEN_DHR */
-+	FUNC(hilse_init_lcv, 0,	HILSEN_NEXT,	HILSEN_SLEEP,	0)
-+
-+	/* 10 HILSEN_DHR2 */
-+	FUNC(hilse_inc_lcv, 10,	HILSEN_NEXT,	HILSEN_START,	0)
-+	FUNC(hilse_set_ddi, -1,	HILSEN_NEXT,	0,		0)
-+	OUT(HIL_PKT_CMD | HIL_CMD_DHR)
-+	IN(300000,		HILSEN_DHR2,	HILSEN_DHR2,	HILSEN_NEXT)
-+
-+	/* 14 HILSEN_IFC */
-+  	OUT(HIL_PKT_CMD | HIL_CMD_IFC)
-+	EXPECT(HIL_PKT_CMD | HIL_CMD_IFC | HIL_ERR_INT,
-+	       20000,		HILSEN_DISC,	HILSEN_DHR2,	HILSEN_NEXT )
-+
-+	/* If devices are there, they weren't in PUP or other loopback mode.
-+	 * We're more concerned at this point with restoring operation
-+	 * to devices than discovering new ones, so we try to salvage
-+	 * the loop configuration by closing off the loop.
-+	 */
-+
-+	/* 16 HILSEN_HEAL0 */
-+	FUNC(hilse_dec_ddi, 0,	HILSEN_NEXT,	HILSEN_ACF,	0)
-+	FUNC(hilse_inc_ddi, 0,	HILSEN_NEXT,	0,		0)
-+
-+	/* 18 HILSEN_HEAL */
-+	OUT_LAST(HIL_CMD_ELB)
-+	EXPECT_LAST(HIL_CMD_ELB | HIL_ERR_INT, 
-+		    20000,	HILSEN_REPOLL,	HILSEN_DSR,	HILSEN_NEXT)
-+	FUNC(hilse_dec_ddi, 0,	HILSEN_HEAL,	HILSEN_NEXT,	0)
-+
-+	/* 21 HILSEN_ACF */
-+	FUNC(hilse_init_lcv, 0,	HILSEN_NEXT,	HILSEN_DOZE,	0)
-+
-+	/* 22 HILSEN_ACF2 */
-+	FUNC(hilse_inc_lcv, 10,	HILSEN_NEXT,	HILSEN_START,	0)
-+	OUT(HIL_PKT_CMD | HIL_CMD_ACF | 1)
-+	IN(20000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_NEXT)
-+
-+	/* 25 HILSEN_DISC0 */
-+	OUT_DISC(HIL_PKT_CMD | HIL_CMD_ELB)
-+	EXPECT_DISC(HIL_PKT_CMD | HIL_CMD_ELB | HIL_ERR_INT,
-+	       20000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_DSR)
-+
-+	/* Only enter here if response just received */
-+	/* 27 HILSEN_DISC */
-+	OUT_DISC(HIL_PKT_CMD | HIL_CMD_IDD)
-+	EXPECT_DISC(HIL_PKT_CMD | HIL_CMD_IDD | HIL_ERR_INT,
-+	       20000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_START)
-+	FUNC(hilse_inc_ddi,  0,	HILSEN_NEXT,	HILSEN_START,	0)
-+	FUNC(hilse_take_idd, 0,	HILSEN_MATCH,	HILSEN_IFCACF,	HILSEN_FOLLOW)
-+	OUT_LAST(HIL_PKT_CMD | HIL_CMD_RSC)
-+	EXPECT_LAST(HIL_PKT_CMD | HIL_CMD_RSC | HIL_ERR_INT,
-+	       30000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_DSR)
-+	FUNC(hilse_take_rsc, 0,	HILSEN_MATCH,	0,		HILSEN_FOLLOW)
-+	OUT_LAST(HIL_PKT_CMD | HIL_CMD_EXD)
-+	EXPECT_LAST(HIL_PKT_CMD | HIL_CMD_EXD | HIL_ERR_INT,
-+	       30000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_DSR)
-+	FUNC(hilse_take_exd, 0,	HILSEN_MATCH,	0,		HILSEN_FOLLOW)
-+	OUT_LAST(HIL_PKT_CMD | HIL_CMD_RNM)
-+	EXPECT_LAST(HIL_PKT_CMD | HIL_CMD_RNM | HIL_ERR_INT,
-+	       30000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_DSR)
-+	FUNC(hilse_take_rnm, 0, HILSEN_MATCH,	0,		0)
-+
-+	/* 40 HILSEN_MATCH */
-+	FUNC(hilse_match, 0,	HILSEN_NEXT,	HILSEN_NEXT,	/* TODO */ 0)
-+
-+	/* 41 HILSEN_OPERATE */
-+	OUT(HIL_PKT_CMD | HIL_CMD_POL)
-+	EXPECT(HIL_PKT_CMD | HIL_CMD_POL | HIL_ERR_INT,
-+	       20000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_NEXT)
-+	FUNC(hilse_operate, 0,	HILSEN_OPERATE,	HILSEN_IFC,	HILSEN_NEXT)
-+
-+	/* 44 HILSEN_PROBE */
-+	OUT_LAST(HIL_PKT_CMD | HIL_CMD_EPT)
-+	IN(10000, 		HILSEN_DISC,	HILSEN_DSR,	HILSEN_NEXT)
-+	OUT_DISC(HIL_PKT_CMD | HIL_CMD_ELB)
-+	IN(10000,		HILSEN_DISC,	HILSEN_DSR,	HILSEN_NEXT)
-+	OUT(HIL_PKT_CMD | HIL_CMD_ACF | 1)
-+	IN(10000,		HILSEN_DISC0,	HILSEN_DSR,	HILSEN_NEXT)
-+	OUT_LAST(HIL_PKT_CMD | HIL_CMD_ELB)
-+	IN(10000,		HILSEN_OPERATE,	HILSEN_DSR,	HILSEN_DSR)
-+
-+	/* 52 HILSEN_DSR */
-+	FUNC(hilse_set_ddi, -1,	HILSEN_NEXT,	0,		0)
-+	OUT(HIL_PKT_CMD | HIL_CMD_DSR)
-+	IN(20000, 		HILSEN_DHR,	HILSEN_DHR,	HILSEN_IFC)
-+
-+	/* 55 HILSEN_REPOLL */
-+	OUT(HIL_PKT_CMD | HIL_CMD_RPL)
-+	EXPECT(HIL_PKT_CMD | HIL_CMD_RPL | HIL_ERR_INT,
-+	       20000,		HILSEN_NEXT,	HILSEN_DSR,	HILSEN_NEXT)
-+	FUNC(hilse_operate, 1,	HILSEN_OPERATE,	HILSEN_IFC,	HILSEN_PROBE)
-+
-+	/* 58 HILSEN_IFCACF */
-+  	OUT(HIL_PKT_CMD | HIL_CMD_IFC)
-+	EXPECT(HIL_PKT_CMD | HIL_CMD_IFC | HIL_ERR_INT,
-+	       20000,		HILSEN_ACF2,	HILSEN_DHR2,	HILSEN_HEAL)
-+
-+	/* 60 HILSEN_END */
-+};
-+
-+static inline void hilse_setup_input(hil_mlc *mlc, struct hilse_node *node) {
-+
-+	switch (node->act) {
-+	case HILSE_EXPECT_DISC:
-+		mlc->imatch = node->object.packet;
-+		mlc->imatch |= ((mlc->ddi + 2) << HIL_PKT_ADDR_SHIFT);
-+		break;
-+	case HILSE_EXPECT_LAST:
-+		mlc->imatch = node->object.packet;
-+		mlc->imatch |= ((mlc->ddi + 1) << HIL_PKT_ADDR_SHIFT);
-+		break;
-+	case HILSE_EXPECT:
-+		mlc->imatch = node->object.packet;
-+		break;
-+	case HILSE_IN:
-+		mlc->imatch = 0;
-+		break;
-+	default:
-+		BUG();
-+	}
-+	mlc->istarted = 1;
-+	mlc->intimeout = node->arg;
-+	do_gettimeofday(&(mlc->instart));
-+	mlc->icount = 15;
-+	memset(mlc->ipacket, 0, 16 * sizeof(hil_packet));
-+	if (down_trylock(&(mlc->isem))) BUG();
-+
-+	return;
-+}
-+
-+#ifdef HIL_MLC_DEBUG
-+static int doze = 0;
-+static int seidx; /* For debug */
-+static int kick = 1;
-+#endif
-+
-+static int hilse_donode (hil_mlc *mlc) {
-+	struct hilse_node *node;
-+	int nextidx = 0;
-+	int sched_long = 0;
-+	unsigned long flags;
-+
-+#ifdef HIL_MLC_DEBUG
-+	if (mlc->seidx && (mlc->seidx != seidx)  && mlc->seidx != 41 && mlc->seidx != 42 && mlc->seidx != 43) {
-+	  printk(KERN_DEBUG PREFIX "z%i \n%s {%i}", doze, kick ? "K" : "", mlc->seidx);
-+		doze = 0;
-+	}
-+	kick = 0;
-+
-+	seidx = mlc->seidx;
-+#endif
-+	node = hil_mlc_se + mlc->seidx;
-+
-+	switch (node->act) {
-+		int rc;
-+		hil_packet pack;
-+
-+	case HILSE_FUNC:
-+		if (node->object.func == NULL) break;
-+		rc = node->object.func(mlc, node->arg);
-+		nextidx = (rc > 0) ? node->ugly : 
-+			((rc < 0) ? node->bad : node->good);
-+		if (nextidx == HILSEN_FOLLOW) nextidx = rc;
-+		break;
-+	case HILSE_EXPECT_LAST:
-+	case HILSE_EXPECT_DISC:
-+	case HILSE_EXPECT:
-+	case HILSE_IN:
-+		/* Already set up from previous HILSE_OUT_* */
-+		write_lock_irqsave(&(mlc->lock), flags);
-+		rc = mlc->in(mlc, node->arg);
-+		if (rc == 2)  {
-+			nextidx = HILSEN_DOZE;
-+			sched_long = 1;
-+			write_unlock_irqrestore(&(mlc->lock), flags);
-+			break;
-+		}
-+		if (rc == 1)		nextidx = node->ugly;
-+		else if (rc == 0)	nextidx = node->good;
-+		else			nextidx = node->bad;
-+		mlc->istarted = 0;
-+		write_unlock_irqrestore(&(mlc->lock), flags);
-+		break;
-+	case HILSE_OUT_LAST:
-+		write_lock_irqsave(&(mlc->lock), flags);
-+		pack = node->object.packet;
-+		pack |= ((mlc->ddi + 1) << HIL_PKT_ADDR_SHIFT);
-+		goto out;
-+	case HILSE_OUT_DISC:
-+		write_lock_irqsave(&(mlc->lock), flags);
-+		pack = node->object.packet;
-+		pack |= ((mlc->ddi + 2) << HIL_PKT_ADDR_SHIFT);
-+		goto out;
-+	case HILSE_OUT:
-+		write_lock_irqsave(&(mlc->lock), flags);
-+		pack = node->object.packet;
-+	out:
-+		if (mlc->istarted) goto out2;
-+		/* Prepare to receive input */
-+		if ((node + 1)->act & HILSE_IN)
-+			hilse_setup_input(mlc, node + 1);
-+
-+	out2:
-+		write_unlock_irqrestore(&(mlc->lock), flags);
-+
-+		if (down_trylock(&mlc->osem)) {
-+			nextidx = HILSEN_DOZE;
-+			break;
-+		}
-+		up(&mlc->osem);
-+
-+		write_lock_irqsave(&(mlc->lock), flags);
-+		if (!(mlc->ostarted)) {
-+			mlc->ostarted = 1;
-+			mlc->opacket = pack;
-+			mlc->out(mlc);
-+			nextidx = HILSEN_DOZE;
-+			write_unlock_irqrestore(&(mlc->lock), flags);
-+			break;
-+		}
-+		mlc->ostarted = 0;
-+		do_gettimeofday(&(mlc->instart));
-+		write_unlock_irqrestore(&(mlc->lock), flags);
-+		nextidx = HILSEN_NEXT;
-+		break;
-+	case HILSE_CTS:
-+		nextidx = mlc->cts(mlc) ? node->bad : node->good;
-+		break;
-+	default:
-+		BUG();
-+		nextidx = 0;
-+		break;
-+	}
-+
-+#ifdef HIL_MLC_DEBUG
-+	if (nextidx == HILSEN_DOZE) doze++;
-+#endif
-+
-+	while (nextidx & HILSEN_SCHED) {
-+		struct timeval tv;
-+
-+		if (!sched_long) goto sched;
-+
-+		do_gettimeofday(&tv);
-+		tv.tv_usec += 1000000 * (tv.tv_sec - mlc->instart.tv_sec);
-+		tv.tv_usec -= mlc->instart.tv_usec;
-+		if (tv.tv_usec >= mlc->intimeout) goto sched;
-+		tv.tv_usec = (mlc->intimeout - tv.tv_usec) * HZ / 1000000;
-+		if (!tv.tv_usec) goto sched;
-+		mod_timer(&hil_mlcs_kicker, jiffies + tv.tv_usec);
-+		break;
-+	sched:
-+		tasklet_schedule(&hil_mlcs_tasklet);
-+		break;
-+	} 
-+	if (nextidx & HILSEN_DOWN) mlc->seidx += nextidx & HILSEN_MASK;
-+	else if (nextidx & HILSEN_UP) mlc->seidx -= nextidx & HILSEN_MASK;
-+	else mlc->seidx = nextidx & HILSEN_MASK;
-+
-+	if (nextidx & HILSEN_BREAK)	return 1;
-+	return 0;
-+}
-+
-+/******************** tasklet context functions **************************/
-+static void hil_mlcs_process(unsigned long unused) {
-+	struct list_head *tmp;
-+
-+	read_lock(&hil_mlcs_lock);
-+	list_for_each(tmp, &hil_mlcs) {
-+		struct hil_mlc *mlc = list_entry(tmp, hil_mlc, list);
-+		while (hilse_donode(mlc) == 0) {
-+#ifdef HIL_MLC_DEBUG
-+		  if (mlc->seidx != 41 && 
-+		      mlc->seidx != 42 && 
-+		      mlc->seidx != 43) 
-+		    printk(KERN_DEBUG PREFIX " + ");
-+#endif
-+		};
-+	}
-+	read_unlock(&hil_mlcs_lock);
-+}
-+
-+/************************* Keepalive timer task *********************/
-+
-+void hil_mlcs_timer (unsigned long data) {
-+	hil_mlcs_probe = 1;
-+	tasklet_schedule(&hil_mlcs_tasklet);
-+	/* Re-insert the periodic task. */
-+	if (!timer_pending(&hil_mlcs_kicker))
-+		mod_timer(&hil_mlcs_kicker, jiffies + HZ);
-+}
-+
-+/******************** user/kernel context functions **********************/
-+
-+static int hil_mlc_serio_write(struct serio *serio, unsigned char c) {
-+	struct hil_mlc_serio_map *map;
-+	struct hil_mlc *mlc;
-+	struct serio_dev *dev;
-+	uint8_t *idx, *last;
-+
-+	map = serio->driver;
-+	if (map == NULL) {
-+		BUG();
-+		return -EIO;
-+	}
-+	mlc = map->mlc;
-+	if (mlc == NULL) {
-+		BUG();
-+		return -EIO;
-+	}
-+	mlc->serio_opacket[map->didx] |= 
-+		((hil_packet)c) << (8 * (3 - mlc->serio_oidx[map->didx]));
-+
-+	if (mlc->serio_oidx[map->didx] >= 3) {
-+		/* for now only commands */
-+		if (!(mlc->serio_opacket[map->didx] & HIL_PKT_CMD)) 
-+			return -EIO;
-+		switch (mlc->serio_opacket[map->didx] & HIL_PKT_DATA_MASK) {
-+		case HIL_CMD_IDD:
-+			idx = mlc->di[map->didx].idd;
-+			goto emu;
-+		case HIL_CMD_RSC:
-+			idx = mlc->di[map->didx].rsc;
-+			goto emu;
-+		case HIL_CMD_EXD:
-+			idx = mlc->di[map->didx].exd;
-+			goto emu;
-+		case HIL_CMD_RNM:
-+			idx = mlc->di[map->didx].rnm;
-+			goto emu;
-+		default:
-+			break;
-+		}
-+		mlc->serio_oidx[map->didx] = 0;
-+		mlc->serio_opacket[map->didx] = 0;
-+	}
-+
-+	mlc->serio_oidx[map->didx]++;
-+	return -EIO;
-+ emu:
-+	dev = serio->dev;
-+	if (dev == NULL) {
-+		BUG();
-+		return -EIO;
-+	}
-+	last = idx + 15;
-+	while ((last != idx) && (*last == 0)) last--;
-+
-+	while (idx != last) {
-+		dev->interrupt(serio, 0, 0, NULL);
-+		dev->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
-+		dev->interrupt(serio, 0, 0, NULL);
-+		dev->interrupt(serio, *idx, 0, NULL);
-+		idx++;
-+	}
-+	dev->interrupt(serio, 0, 0, NULL);
-+	dev->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
-+	dev->interrupt(serio, HIL_PKT_CMD >> 8, 0, NULL);
-+	dev->interrupt(serio, *idx, 0, NULL);
-+	
-+	mlc->serio_oidx[map->didx] = 0;
-+	mlc->serio_opacket[map->didx] = 0;
-+
-+	return 0;
-+}
-+
-+static int hil_mlc_serio_open(struct serio *serio) {
-+	struct hil_mlc_serio_map *map;
-+	struct hil_mlc *mlc;
-+
-+	if (serio->private != NULL) return -EBUSY;
-+
-+	map = serio->driver;
-+	if (map == NULL) {
-+		BUG();
-+		return -ENODEV;
-+	}
-+	mlc = map->mlc;
-+	if (mlc == NULL) {
-+		BUG();
-+		return -ENODEV;
-+	}
-+
-+	mlc->inc_use_count();
-+
-+	return 0;
-+}
-+
-+static void hil_mlc_serio_close(struct serio *serio) {
-+	struct hil_mlc_serio_map *map;
-+	struct hil_mlc *mlc;
-+
-+	map = serio->driver;
-+	if (map == NULL) {
-+		BUG();
-+		return;
-+	}
-+	mlc = map->mlc;
-+	if (mlc == NULL) {
-+		BUG();
-+		return;
-+	}
-+
-+	mlc->dec_use_count();
-+
-+	serio->private = NULL;
-+	serio->dev = NULL;
-+	/* TODO wake up interruptable */
-+}
-+
-+int hil_mlc_register(hil_mlc *mlc) {
-+	int i;
-+        unsigned long flags;
-+
-+	MOD_INC_USE_COUNT;
-+	if (mlc == NULL) {
-+		MOD_DEC_USE_COUNT;
-+		return -EINVAL;
-+	}
-+
-+	mlc->istarted = 0;
-+        mlc->ostarted = 0;
-+
-+        mlc->lock = RW_LOCK_UNLOCKED;
-+        init_MUTEX(&(mlc->osem));
-+
-+        init_MUTEX(&(mlc->isem));
-+        mlc->icount = -1;
-+        mlc->imatch = 0;
-+
-+	mlc->opercnt = 0;
-+
-+        init_MUTEX_LOCKED(&(mlc->csem));
-+
-+	hil_mlc_clear_di_scratch(mlc);
-+	hil_mlc_clear_di_map(mlc, 0);
-+	for (i = 0; i < HIL_MLC_DEVMEM; i++) {
-+		hil_mlc_copy_di_scratch(mlc, i);
-+		memset(&(mlc->serio[i]), 0, sizeof(mlc->serio[0]));
-+		mlc->serio[i].type		= SERIO_HIL | SERIO_HIL_MLC;
-+		mlc->serio[i].write		= hil_mlc_serio_write;
-+		mlc->serio[i].open		= hil_mlc_serio_open;
-+		mlc->serio[i].close		= hil_mlc_serio_close;
-+		mlc->serio[i].driver		= &(mlc->serio_map[i]);
-+		mlc->serio_map[i].mlc		= mlc;
-+		mlc->serio_map[i].didx		= i;
-+		mlc->serio_map[i].di_revmap	= -1;
-+		mlc->serio_opacket[i]		= 0;
-+		mlc->serio_oidx[i]		= 0;
-+		serio_register_port(&(mlc->serio[i]));
-+	}
-+
-+	mlc->tasklet = &hil_mlcs_tasklet;
-+
-+	write_lock_irqsave(&hil_mlcs_lock, flags);
-+	list_add_tail(&mlc->list, &hil_mlcs);
-+	mlc->seidx = HILSEN_START;
-+	write_unlock_irqrestore(&hil_mlcs_lock, flags);
-+
-+	tasklet_schedule(&hil_mlcs_tasklet);
-+	return 0;
-+}
-+
-+int hil_mlc_unregister(hil_mlc *mlc) {
-+	struct list_head *tmp;
-+        unsigned long flags;
-+	int i;
-+
-+	if (mlc == NULL)
-+		return -EINVAL;
-+
-+	write_lock_irqsave(&hil_mlcs_lock, flags);
-+	list_for_each(tmp, &hil_mlcs) {
-+		if (list_entry(tmp, hil_mlc, list) == mlc)
-+			goto found;
-+	}
-+
-+	/* not found in list */
-+	write_unlock_irqrestore(&hil_mlcs_lock, flags);
-+	tasklet_schedule(&hil_mlcs_tasklet);
-+	return -ENODEV;
-+
-+ found:
-+	list_del(tmp);
-+        write_unlock_irqrestore(&hil_mlcs_lock, flags);
-+	MOD_DEC_USE_COUNT;
-+
-+	for (i = 0; i < HIL_MLC_DEVMEM; i++)
-+		serio_unregister_port(&(mlc->serio[i]));
-+
-+	tasklet_schedule(&hil_mlcs_tasklet);
-+	return 0;
-+}
-+
-+/**************************** Module interface *************************/
-+
-+static int __init hil_mlc_init(void)
-+{
-+	init_timer(&hil_mlcs_kicker);
-+	hil_mlcs_kicker.expires = jiffies + HZ;
-+	hil_mlcs_kicker.function = &hil_mlcs_timer;
-+	add_timer(&hil_mlcs_kicker);
-+
-+	tasklet_enable(&hil_mlcs_tasklet);
-+
-+	return 0;
-+}
-+                
-+static void __exit hil_mlc_exit(void)
-+{
-+	del_timer(&hil_mlcs_kicker);
-+
-+	tasklet_disable(&hil_mlcs_tasklet);
-+	tasklet_kill(&hil_mlcs_tasklet);
-+}
-+                        
-+module_init(hil_mlc_init);
-+module_exit(hil_mlc_exit);
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/hp_sdc.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/hp_sdc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,1067 @@
-+/*
-+ * HP i8042-based System Device Controller driver.
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * System Device Controller Microprocessor Firmware Theory of Operation
-+ *      for Part Number 1820-4784 Revision B.  Dwg No. A-1820-4784-2
-+ * Helge Deller's original hilkbd.c port for PA-RISC.
-+ *
-+ *
-+ * Driver theory of operation:
-+ *
-+ * hp_sdc_put does all writing to the SDC.  ISR can run on a different 
-+ * CPU than hp_sdc_put, but only one CPU runs hp_sdc_put at a time 
-+ * (it cannot really benefit from SMP anyway.)  A tasket fit this perfectly.
-+ *
-+ * All data coming back from the SDC is sent via interrupt and can be read 
-+ * fully in the ISR, so there are no latency/throughput problems there.  
-+ * The problem is with output, due to the slow clock speed of the SDC 
-+ * compared to the CPU.  This should not be too horrible most of the time, 
-+ * but if used with HIL devices that support the multibyte transfer command, 
-+ * keeping outbound throughput flowing at the 6500KBps that the HIL is 
-+ * capable of is more than can be done at HZ=100.
-+ *
-+ * Busy polling for IBF clear wastes CPU cycles and bus cycles.  hp_sdc.ibf 
-+ * is set to 0 when the IBF flag in the status register has cleared.  ISR 
-+ * may do this, and may also access the parts of queued transactions related 
-+ * to reading data back from the SDC, but otherwise will not touch the 
-+ * hp_sdc state. Whenever a register is written hp_sdc.ibf is set to 1.
-+ *
-+ * The i8042 write index and the values in the 4-byte input buffer
-+ * starting at 0x70 are kept track of in hp_sdc.wi, and .r7[], respectively,
-+ * to minimize the amount of IO needed to the SDC.  However these values 
-+ * do not need to be locked since they are only ever accessed by hp_sdc_put.
-+ *
-+ * A timer task schedules the tasklet once per second just to make
-+ * sure it doesn't freeze up and to allow for bad reads to time out.
-+ */
-+
-+#include <linux/hp_sdc.h>
-+#include <linux/sched.h>
-+#include <linux/errno.h>
-+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/ioport.h>
-+#include <linux/time.h>
-+#include <linux/slab.h>
-+#include <linux/hil.h>
-+#include <asm/io.h>
-+#include <asm/system.h>
-+
-+/* Machine-specific abstraction */
-+
-+#if defined(__hppa__)
-+# include <asm/parisc-device.h>
-+# define sdc_readb(p)		gsc_readb(p)
-+# define sdc_writeb(v,p)	gsc_writeb((v),(p))
-+#elif defined(__mc68000__)
-+# include <asm/uaccess.h>
-+# define sdc_readb(p)		in_8(p)
-+# define sdc_writeb(v,p)	out_8((p),(v))
-+#else
-+# error "HIL is not supported on this platform"
-+#endif
-+
-+#define PREFIX "HP SDC: "
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION("HP i8042-based SDC Driver");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+EXPORT_SYMBOL(hp_sdc_request_timer_irq);
-+EXPORT_SYMBOL(hp_sdc_request_hil_irq);
-+EXPORT_SYMBOL(hp_sdc_request_cooked_irq);
-+
-+EXPORT_SYMBOL(hp_sdc_release_timer_irq);
-+EXPORT_SYMBOL(hp_sdc_release_hil_irq);
-+EXPORT_SYMBOL(hp_sdc_release_cooked_irq);
-+
-+EXPORT_SYMBOL(hp_sdc_enqueue_transaction);
-+EXPORT_SYMBOL(hp_sdc_dequeue_transaction);
-+
-+static hp_i8042_sdc	hp_sdc;	/* All driver state is kept in here. */
-+
-+/*************** primitives for use in any context *********************/
-+static inline uint8_t hp_sdc_status_in8 (void) {
-+	uint8_t status;
-+	unsigned long flags;
-+
-+	write_lock_irqsave(&hp_sdc.ibf_lock, flags);
-+	status = sdc_readb(hp_sdc.status_io);
-+	if (!(status & HP_SDC_STATUS_IBF)) hp_sdc.ibf = 0;
-+	write_unlock_irqrestore(&hp_sdc.ibf_lock, flags);
-+
-+	return status;
-+}
-+
-+static inline uint8_t hp_sdc_data_in8 (void) {
-+	return sdc_readb(hp_sdc.data_io); 
-+}
-+
-+static inline void hp_sdc_status_out8 (uint8_t val) {
-+	unsigned long flags;
-+
-+	write_lock_irqsave(&hp_sdc.ibf_lock, flags);
-+	hp_sdc.ibf = 1;
-+	if ((val & 0xf0) == 0xe0) hp_sdc.wi = 0xff;
-+	sdc_writeb(val, hp_sdc.status_io);
-+	write_unlock_irqrestore(&hp_sdc.ibf_lock, flags);
-+}
-+
-+static inline void hp_sdc_data_out8 (uint8_t val) {
-+	unsigned long flags;
-+
-+	write_lock_irqsave(&hp_sdc.ibf_lock, flags);
-+	hp_sdc.ibf = 1;
-+	sdc_writeb(val, hp_sdc.data_io);
-+	write_unlock_irqrestore(&hp_sdc.ibf_lock, flags);
-+}
-+
-+/*	Care must be taken to only invoke hp_sdc_spin_ibf when 
-+ *	absolutely needed, or in rarely invoked subroutines.  
-+ *	Not only does it waste CPU cycles, it also wastes bus cycles. 
-+ */
-+static inline void hp_sdc_spin_ibf(void) {
-+	unsigned long flags;
-+	rwlock_t *lock;
-+
-+	lock = &hp_sdc.ibf_lock;
-+
-+	read_lock_irqsave(lock, flags);
-+	if (!hp_sdc.ibf) {
-+		read_unlock_irqrestore(lock, flags);
-+		return;
-+	}
-+	read_unlock(lock);
-+	write_lock(lock);
-+	while (sdc_readb(hp_sdc.status_io) & HP_SDC_STATUS_IBF) {};
-+	hp_sdc.ibf = 0;
-+	write_unlock_irqrestore(lock, flags);
-+}
-+
-+
-+/************************ Interrupt context functions ************************/
-+static void hp_sdc_take (int irq, void *dev_id, uint8_t status, uint8_t data) {
-+	hp_sdc_transaction *curr;
-+
-+	read_lock(&hp_sdc.rtq_lock);
-+	if (hp_sdc.rcurr < 0) {
-+	  	read_unlock(&hp_sdc.rtq_lock);
-+		return;
-+	}
-+	curr = hp_sdc.tq[hp_sdc.rcurr];
-+	read_unlock(&hp_sdc.rtq_lock);
-+
-+	curr->seq[curr->idx++] = status;
-+	curr->seq[curr->idx++] = data;
-+	hp_sdc.rqty -= 2;
-+	do_gettimeofday(&hp_sdc.rtv);
-+
-+	if (hp_sdc.rqty <= 0) {
-+		/* All data has been gathered. */
-+		if(curr->seq[curr->actidx] & HP_SDC_ACT_SEMAPHORE) {
-+			if (curr->act.semaphore) up(curr->act.semaphore);
-+		}
-+		if(curr->seq[curr->actidx] & HP_SDC_ACT_CALLBACK) {
-+			if (curr->act.irqhook)
-+				curr->act.irqhook(irq, dev_id, status, data);
-+		}
-+		curr->actidx = curr->idx;
-+		curr->idx++;
-+		/* Return control of this transaction */
-+		write_lock(&hp_sdc.rtq_lock);
-+		hp_sdc.rcurr = -1; 
-+		hp_sdc.rqty = 0;
-+		write_unlock(&hp_sdc.rtq_lock);
-+		tasklet_schedule(&hp_sdc.task);
-+	}
-+}
-+
-+static irqreturn_t hp_sdc_isr(int irq, void *dev_id, struct pt_regs * regs) {
-+	uint8_t status, data;
-+
-+	status = hp_sdc_status_in8();
-+	/* Read data unconditionally to advance i8042. */
-+	data =   hp_sdc_data_in8();
-+
-+	/* For now we are ignoring these until we get the SDC to behave. */
-+	if (((status & 0xf1) == 0x51) && data == 0x82) {
-+	  return IRQ_HANDLED;
-+	}
-+
-+	switch(status & HP_SDC_STATUS_IRQMASK) {
-+	      case 0: /* This case is not documented. */
-+		break;
-+	      case HP_SDC_STATUS_USERTIMER:
-+	      case HP_SDC_STATUS_PERIODIC:
-+	      case HP_SDC_STATUS_TIMER:
-+		read_lock(&hp_sdc.hook_lock);
-+	      	if (hp_sdc.timer != NULL)
-+			hp_sdc.timer(irq, dev_id, status, data);
-+		read_unlock(&hp_sdc.hook_lock);
-+		break;
-+	      case HP_SDC_STATUS_REG:
-+		hp_sdc_take(irq, dev_id, status, data);
-+		break;
-+	      case HP_SDC_STATUS_HILCMD:
-+	      case HP_SDC_STATUS_HILDATA:
-+		read_lock(&hp_sdc.hook_lock);
-+		if (hp_sdc.hil != NULL)
-+			hp_sdc.hil(irq, dev_id, status, data);
-+		read_unlock(&hp_sdc.hook_lock);
-+		break;
-+	      case HP_SDC_STATUS_PUP:
-+		read_lock(&hp_sdc.hook_lock);
-+		if (hp_sdc.pup != NULL)
-+			hp_sdc.pup(irq, dev_id, status, data);
-+		else printk(KERN_INFO PREFIX "HP SDC reports successful PUP.\n");
-+		read_unlock(&hp_sdc.hook_lock);
-+		break;
-+	      default:
-+		read_lock(&hp_sdc.hook_lock);
-+		if (hp_sdc.cooked != NULL)
-+			hp_sdc.cooked(irq, dev_id, status, data);
-+		read_unlock(&hp_sdc.hook_lock);
-+		break;
-+	}
-+	return IRQ_HANDLED;
-+}
-+
-+
-+static irqreturn_t hp_sdc_nmisr(int irq, void *dev_id, struct pt_regs * regs) {
-+	int status;
-+	
-+	status = hp_sdc_status_in8();
-+	printk(KERN_WARNING PREFIX "NMI !\n");
-+
-+#if 0	
-+	if (status & HP_SDC_NMISTATUS_FHS) {
-+		read_lock(&hp_sdc.hook_lock);
-+	      	if (hp_sdc.timer != NULL)
-+			hp_sdc.timer(irq, dev_id, status, 0);
-+		read_unlock(&hp_sdc.hook_lock);
-+	}
-+	else {
-+		/* TODO: pass this on to the HIL handler, or do SAK here? */
-+		printk(KERN_WARNING PREFIX "HIL NMI\n");
-+	}
-+#endif
-+	return IRQ_HANDLED;
-+}
-+
-+
-+/***************** Kernel (tasklet) context functions ****************/
-+
-+unsigned long hp_sdc_put(void);
-+
-+static void hp_sdc_tasklet(unsigned long foo) {
-+
-+	write_lock_irq(&hp_sdc.rtq_lock);
-+	if (hp_sdc.rcurr >= 0) {
-+		struct timeval tv;
-+		do_gettimeofday(&tv);
-+		if (tv.tv_sec > hp_sdc.rtv.tv_sec) tv.tv_usec += 1000000;
-+		if (tv.tv_usec - hp_sdc.rtv.tv_usec > HP_SDC_MAX_REG_DELAY) {
-+			hp_sdc_transaction *curr;
-+			uint8_t tmp;
-+
-+			curr = hp_sdc.tq[hp_sdc.rcurr];
-+			/* If this turns out to be a normal failure mode
-+			 * we'll need to figure out a way to communicate
-+			 * it back to the application. and be less verbose.
-+			 */
-+			printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
-+			       tv.tv_usec - hp_sdc.rtv.tv_usec);
-+			curr->idx += hp_sdc.rqty;
-+			hp_sdc.rqty = 0;
-+			tmp = curr->seq[curr->actidx];
-+			curr->seq[curr->actidx] |= HP_SDC_ACT_DEAD;
-+			if(tmp & HP_SDC_ACT_SEMAPHORE) {
-+				if (curr->act.semaphore) 
-+					up(curr->act.semaphore);
-+			}
-+			if(tmp & HP_SDC_ACT_CALLBACK) {
-+				/* Note this means that irqhooks may be called
-+				 * in tasklet/bh context.
-+				 */
-+				if (curr->act.irqhook) 
-+					curr->act.irqhook(0, 0, 0, 0);
-+			}
-+			curr->actidx = curr->idx;
-+			curr->idx++;
-+			hp_sdc.rcurr = -1; 
-+		}
-+	}
-+	write_unlock_irq(&hp_sdc.rtq_lock);
-+	hp_sdc_put();
-+}
-+
-+unsigned long hp_sdc_put(void) {
-+	hp_sdc_transaction *curr;
-+	uint8_t act;
-+	int idx, curridx;
-+
-+	int limit = 0;
-+
-+	write_lock(&hp_sdc.lock);
-+
-+	/* If i8042 buffers are full, we cannot do anything that
-+	   requires output, so we skip to the administrativa. */
-+	if (hp_sdc.ibf) {
-+		hp_sdc_status_in8();
-+		if (hp_sdc.ibf) goto finish;
-+	}
-+
-+ anew:
-+	/* See if we are in the middle of a sequence. */
-+	if (hp_sdc.wcurr < 0) hp_sdc.wcurr = 0;
-+	read_lock_irq(&hp_sdc.rtq_lock);
-+	if (hp_sdc.rcurr == hp_sdc.wcurr) hp_sdc.wcurr++;
-+	read_unlock_irq(&hp_sdc.rtq_lock);
-+	if (hp_sdc.wcurr >= HP_SDC_QUEUE_LEN) hp_sdc.wcurr = 0;
-+	curridx = hp_sdc.wcurr;
-+
-+	if (hp_sdc.tq[curridx] != NULL) goto start;
-+
-+	while (++curridx != hp_sdc.wcurr) {
-+		if (curridx >= HP_SDC_QUEUE_LEN) {
-+			curridx = -1; /* Wrap to top */
-+			continue;
-+		}
-+		read_lock_irq(&hp_sdc.rtq_lock);
-+		if (hp_sdc.rcurr == curridx) {
-+			read_unlock_irq(&hp_sdc.rtq_lock);
-+			continue;
-+		}
-+		read_unlock_irq(&hp_sdc.rtq_lock);
-+		if (hp_sdc.tq[curridx] != NULL) break; /* Found one. */
-+	}
-+	if (curridx == hp_sdc.wcurr) { /* There's nothing queued to do. */
-+		curridx = -1;
-+	}
-+	hp_sdc.wcurr = curridx;
-+
-+ start:
-+
-+	/* Check to see if the interrupt mask needs to be set. */
-+	if (hp_sdc.set_im) {
-+		hp_sdc_status_out8(hp_sdc.im | HP_SDC_CMD_SET_IM);
-+		hp_sdc.set_im = 0;
-+		goto finish;
-+	}
-+
-+	if (hp_sdc.wcurr == -1) goto done;
-+
-+	curr = hp_sdc.tq[curridx];
-+	idx = curr->actidx;
-+
-+	if (curr->actidx >= curr->endidx) {
-+		hp_sdc.tq[curridx] = NULL;
-+		/* Interleave outbound data between the transactions. */
-+		hp_sdc.wcurr++;
-+		if (hp_sdc.wcurr >= HP_SDC_QUEUE_LEN) hp_sdc.wcurr = 0;
-+		goto finish;	
-+	}
-+
-+	act = curr->seq[idx];
-+	idx++;
-+
-+	if (curr->idx >= curr->endidx) {
-+		if (act & HP_SDC_ACT_DEALLOC) kfree(curr);
-+		hp_sdc.tq[curridx] = NULL;
-+		/* Interleave outbound data between the transactions. */
-+		hp_sdc.wcurr++;
-+		if (hp_sdc.wcurr >= HP_SDC_QUEUE_LEN) hp_sdc.wcurr = 0;
-+		goto finish;	
-+	}
-+
-+	while (act & HP_SDC_ACT_PRECMD) {
-+		if (curr->idx != idx) {
-+			idx++;
-+			act &= ~HP_SDC_ACT_PRECMD;
-+			break;
-+		}
-+		hp_sdc_status_out8(curr->seq[idx]);
-+		curr->idx++;
-+		/* act finished? */
-+		if ((act & HP_SDC_ACT_DURING) == HP_SDC_ACT_PRECMD)
-+		  goto actdone;
-+		/* skip quantity field if data-out sequence follows. */
-+		if (act & HP_SDC_ACT_DATAOUT) curr->idx++;
-+		goto finish;
-+	}
-+	if (act & HP_SDC_ACT_DATAOUT) {
-+		int qty;
-+
-+		qty = curr->seq[idx];
-+		idx++;
-+		if (curr->idx - idx < qty) {
-+			hp_sdc_data_out8(curr->seq[curr->idx]);
-+			curr->idx++;
-+			/* act finished? */
-+			if ((curr->idx - idx >= qty) && 
-+			    ((act & HP_SDC_ACT_DURING) == HP_SDC_ACT_DATAOUT))
-+				goto actdone;
-+			goto finish;
-+		}
-+		idx += qty;
-+		act &= ~HP_SDC_ACT_DATAOUT;
-+	}
-+	else while (act & HP_SDC_ACT_DATAREG) {
-+		int mask;
-+		uint8_t w7[4];
-+
-+		mask = curr->seq[idx];
-+		if (idx != curr->idx) {
-+			idx++;
-+			idx += !!(mask & 1);
-+			idx += !!(mask & 2);
-+			idx += !!(mask & 4);
-+			idx += !!(mask & 8);
-+			act &= ~HP_SDC_ACT_DATAREG;
-+			break;
-+		}
-+		
-+		w7[0] = (mask & 1) ? curr->seq[++idx] : hp_sdc.r7[0];
-+		w7[1] = (mask & 2) ? curr->seq[++idx] : hp_sdc.r7[1];
-+		w7[2] = (mask & 4) ? curr->seq[++idx] : hp_sdc.r7[2];
-+		w7[3] = (mask & 8) ? curr->seq[++idx] : hp_sdc.r7[3];
-+		
-+		if (hp_sdc.wi > 0x73 || hp_sdc.wi < 0x70 ||
-+		        w7[hp_sdc.wi-0x70] == hp_sdc.r7[hp_sdc.wi-0x70]) {
-+			int i = 0;
-+
-+			/* Need to point the write index register */	
-+			while ((i < 4) && w7[i] == hp_sdc.r7[i]) i++;
-+			if (i < 4) {
-+				hp_sdc_status_out8(HP_SDC_CMD_SET_D0 + i);
-+				hp_sdc.wi = 0x70 + i;
-+				goto finish;
-+			}
-+			idx++;
-+			if ((act & HP_SDC_ACT_DURING) == HP_SDC_ACT_DATAREG)
-+				goto actdone;
-+			curr->idx = idx;
-+			act &= ~HP_SDC_ACT_DATAREG;
-+			break;
-+		}
-+
-+		hp_sdc_data_out8(w7[hp_sdc.wi - 0x70]);
-+		hp_sdc.r7[hp_sdc.wi - 0x70] = w7[hp_sdc.wi - 0x70];
-+		hp_sdc.wi++; /* write index register autoincrements */
-+		{
-+			int i = 0;
-+
-+			while ((i < 4) && w7[i] == hp_sdc.r7[i]) i++;
-+			if (i >= 4) {
-+				curr->idx = idx + 1;
-+				if ((act & HP_SDC_ACT_DURING) == 
-+				    HP_SDC_ACT_DATAREG)
-+				        goto actdone;
-+			}
-+		}
-+		goto finish;
-+	}
-+	/* We don't go any further in the command if there is a pending read,
-+	   because we don't want interleaved results. */
-+	read_lock_irq(&hp_sdc.rtq_lock);
-+	if (hp_sdc.rcurr >= 0) {
-+		read_unlock_irq(&hp_sdc.rtq_lock);
-+		goto finish;
-+	}
-+	read_unlock_irq(&hp_sdc.rtq_lock);
-+
-+
-+	if (act & HP_SDC_ACT_POSTCMD) {
-+	  	uint8_t postcmd;
-+
-+		/* curr->idx should == idx at this point. */
-+		postcmd = curr->seq[idx];
-+		curr->idx++;
-+		if (act & HP_SDC_ACT_DATAIN) {
-+
-+			/* Start a new read */
-+	  		hp_sdc.rqty = curr->seq[curr->idx];
-+			do_gettimeofday(&hp_sdc.rtv);
-+			curr->idx++;
-+			/* Still need to lock here in case of spurious irq. */
-+			write_lock_irq(&hp_sdc.rtq_lock);
-+			hp_sdc.rcurr = curridx; 
-+			write_unlock_irq(&hp_sdc.rtq_lock);
-+			hp_sdc_status_out8(postcmd);
-+			goto finish;
-+		}
-+		hp_sdc_status_out8(postcmd);
-+		goto actdone;
-+	}
-+
-+actdone:
-+	if (act & HP_SDC_ACT_SEMAPHORE) {
-+		up(curr->act.semaphore);
-+	}
-+	else if (act & HP_SDC_ACT_CALLBACK) {
-+		curr->act.irqhook(0,0,0,0);
-+	}
-+	if (curr->idx >= curr->endidx) { /* This transaction is over. */
-+		if (act & HP_SDC_ACT_DEALLOC) kfree(curr);
-+		hp_sdc.tq[curridx] = NULL;
-+	}
-+	else {
-+		curr->actidx = idx + 1;
-+		curr->idx = idx + 2;
-+	}
-+	/* Interleave outbound data between the transactions. */
-+	hp_sdc.wcurr++;
-+	if (hp_sdc.wcurr >= HP_SDC_QUEUE_LEN) hp_sdc.wcurr = 0;
-+
-+ finish:
-+	/* If by some quirk IBF has cleared and our ISR has run to 
-+	   see that that has happened, do it all again. */
-+	if (!hp_sdc.ibf && limit++ < 20) goto anew;
-+
-+ done:
-+	if (hp_sdc.wcurr >= 0) tasklet_schedule(&hp_sdc.task);
-+	write_unlock(&hp_sdc.lock);
-+	return 0;
-+}
-+
-+/******* Functions called in either user or kernel context ****/
-+int hp_sdc_enqueue_transaction(hp_sdc_transaction *this) {
-+	unsigned long flags;
-+	int i;
-+
-+	if (this == NULL) {
-+		tasklet_schedule(&hp_sdc.task);
-+		return -EINVAL;
-+	};
-+
-+	write_lock_irqsave(&hp_sdc.lock, flags);
-+
-+	/* Can't have same transaction on queue twice */
-+	for (i=0; i < HP_SDC_QUEUE_LEN; i++)
-+		if (hp_sdc.tq[i] == this) goto fail;
-+
-+	this->actidx = 0;
-+	this->idx = 1;
-+
-+	/* Search for empty slot */
-+	for (i=0; i < HP_SDC_QUEUE_LEN; i++) {
-+		if (hp_sdc.tq[i] == NULL) {
-+			hp_sdc.tq[i] = this;
-+			write_unlock_irqrestore(&hp_sdc.lock, flags);
-+			tasklet_schedule(&hp_sdc.task);
-+			return 0;
-+		}
-+	}
-+	write_unlock_irqrestore(&hp_sdc.lock, flags);
-+	printk(KERN_WARNING PREFIX "No free slot to add transaction.\n");
-+	return -EBUSY;
-+
-+ fail:
-+	write_unlock_irqrestore(&hp_sdc.lock,flags);
-+	printk(KERN_WARNING PREFIX "Transaction add failed: transaction already queued?\n");
-+	return -EINVAL;
-+}
-+
-+int hp_sdc_dequeue_transaction(hp_sdc_transaction *this) {
-+	unsigned long flags;
-+	int i;
-+
-+	write_lock_irqsave(&hp_sdc.lock, flags);
-+
-+	/* TODO: don't remove it if it's not done. */
-+
-+	for (i=0; i < HP_SDC_QUEUE_LEN; i++)
-+		if (hp_sdc.tq[i] == this) hp_sdc.tq[i] = NULL;
-+
-+	write_unlock_irqrestore(&hp_sdc.lock, flags);
-+	return 0;
-+}
-+
-+
-+
-+/********************** User context functions **************************/
-+int hp_sdc_request_timer_irq(hp_sdc_irqhook *callback) {
-+
-+	MOD_INC_USE_COUNT;
-+	if (callback == NULL || hp_sdc.dev == NULL) {
-+		MOD_DEC_USE_COUNT;
-+		return -EINVAL;
-+	}
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if (hp_sdc.timer != NULL) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		MOD_DEC_USE_COUNT;
-+		return -EBUSY;
-+	}
-+
-+	hp_sdc.timer = callback;
-+	/* Enable interrupts from the timers */
-+	hp_sdc.im &= ~HP_SDC_IM_FH;
-+        hp_sdc.im &= ~HP_SDC_IM_PT;
-+	hp_sdc.im &= ~HP_SDC_IM_TIMERS;
-+	hp_sdc.set_im = 1;
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	return 0;
-+}
-+
-+int hp_sdc_request_hil_irq(hp_sdc_irqhook *callback) {
-+
-+	MOD_INC_USE_COUNT;
-+	if (callback == NULL || hp_sdc.dev == NULL) {
-+		MOD_DEC_USE_COUNT;
-+		return -EINVAL;
-+	}
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if (hp_sdc.hil != NULL) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		MOD_DEC_USE_COUNT;
-+		return -EBUSY;
-+	}
-+
-+	hp_sdc.hil = callback;
-+	hp_sdc.im &= ~(HP_SDC_IM_HIL | HP_SDC_IM_RESET);
-+	hp_sdc.set_im = 1;
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	return 0;
-+}
-+
-+int hp_sdc_request_cooked_irq(hp_sdc_irqhook *callback) {
-+
-+	MOD_INC_USE_COUNT;
-+	if (callback == NULL || hp_sdc.dev == NULL) {
-+		MOD_DEC_USE_COUNT;
-+		return -EINVAL;
-+	}
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if (hp_sdc.cooked != NULL) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		MOD_DEC_USE_COUNT;
-+		return -EBUSY;
-+	}
-+
-+	/* Enable interrupts from the HIL MLC */
-+	hp_sdc.cooked = callback;
-+	hp_sdc.im &= ~(HP_SDC_IM_HIL | HP_SDC_IM_RESET);
-+	hp_sdc.set_im = 1;
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	return 0;
-+}
-+
-+int hp_sdc_release_timer_irq(hp_sdc_irqhook *callback) {
-+
-+
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if ((callback != hp_sdc.timer) ||
-+	    (hp_sdc.timer == NULL)) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		return -EINVAL;
-+	}
-+
-+	/* Disable interrupts from the timers */
-+	hp_sdc.timer = NULL;
-+	hp_sdc.im |= HP_SDC_IM_TIMERS;
-+	hp_sdc.im |= HP_SDC_IM_FH;
-+	hp_sdc.im |= HP_SDC_IM_PT;
-+	hp_sdc.set_im = 1;
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	MOD_DEC_USE_COUNT;
-+	return 0;
-+}
-+
-+int hp_sdc_release_hil_irq(hp_sdc_irqhook *callback) {
-+
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if ((callback != hp_sdc.hil) ||
-+	    (hp_sdc.hil == NULL)) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		return -EINVAL;
-+	}
-+
-+	hp_sdc.hil = NULL;
-+	/* Disable interrupts from HIL only if there is no cooked driver. */
-+	if(hp_sdc.cooked == NULL) {
-+		hp_sdc.im |= (HP_SDC_IM_HIL | HP_SDC_IM_RESET);
-+		hp_sdc.set_im = 1;
-+	}
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	MOD_DEC_USE_COUNT;
-+	return 0;
-+}
-+
-+int hp_sdc_release_cooked_irq(hp_sdc_irqhook *callback) {
-+
-+	write_lock_irq(&hp_sdc.hook_lock);
-+	if ((callback != hp_sdc.cooked) ||
-+	    (hp_sdc.cooked == NULL)) {
-+		write_unlock_irq(&hp_sdc.hook_lock);
-+		return -EINVAL;
-+	}
-+
-+	hp_sdc.cooked = NULL;
-+	/* Disable interrupts from HIL only if there is no raw HIL driver. */
-+	if(hp_sdc.hil == NULL) {
-+		hp_sdc.im |= (HP_SDC_IM_HIL | HP_SDC_IM_RESET);
-+		hp_sdc.set_im = 1;
-+	}
-+	write_unlock_irq(&hp_sdc.hook_lock);
-+	tasklet_schedule(&hp_sdc.task);
-+
-+	MOD_DEC_USE_COUNT;
-+	return 0;
-+}
-+
-+/************************* Keepalive timer task *********************/
-+
-+void hp_sdc_kicker (unsigned long data) {
-+	tasklet_schedule(&hp_sdc.task);
-+	/* Re-insert the periodic task. */
-+	mod_timer(&hp_sdc.kicker, jiffies + HZ);
-+}
-+
-+/************************** Module Initialization ***************************/
-+
-+#if defined(__hppa__)
-+
-+static struct parisc_device_id hp_sdc_tbl[] = {
-+	{
-+		.hw_type =	HPHW_FIO, 
-+		.hversion_rev =	HVERSION_REV_ANY_ID,
-+		.hversion =	HVERSION_ANY_ID,
-+		.sversion =	0x73, 
-+	 },
-+	{ 0, }
-+};
-+
-+MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl);
-+
-+static int __init hp_sdc_init_hppa(struct parisc_device *d);
-+
-+static struct parisc_driver hp_sdc_driver = {
-+	.name =		"HP SDC",
-+	.id_table =	hp_sdc_tbl,
-+	.probe =	hp_sdc_init_hppa,
-+};
-+
-+#endif /* __hppa__ */
-+
-+static int __init hp_sdc_init(void)
-+{
-+	int i;
-+	char *errstr;
-+	hp_sdc_transaction t_sync;
-+	uint8_t ts_sync[6];
-+	struct semaphore s_sync;
-+
-+  	hp_sdc.lock		= RW_LOCK_UNLOCKED;
-+  	hp_sdc.ibf_lock		= RW_LOCK_UNLOCKED;
-+  	hp_sdc.rtq_lock		= RW_LOCK_UNLOCKED;
-+  	hp_sdc.hook_lock	= RW_LOCK_UNLOCKED;
-+
-+	hp_sdc.timer		= NULL;
-+	hp_sdc.hil		= NULL;
-+	hp_sdc.pup		= NULL;
-+	hp_sdc.cooked		= NULL;
-+	hp_sdc.im		= HP_SDC_IM_MASK;  /* Mask maskable irqs */
-+	hp_sdc.set_im		= 1;
-+	hp_sdc.wi		= 0xff;
-+	hp_sdc.r7[0]		= 0xff;
-+	hp_sdc.r7[1]		= 0xff;
-+	hp_sdc.r7[2]		= 0xff;
-+	hp_sdc.r7[3]		= 0xff;
-+	hp_sdc.ibf		= 1;
-+
-+	for (i = 0; i < HP_SDC_QUEUE_LEN; i++) hp_sdc.tq[i] = NULL;
-+	hp_sdc.wcurr		= -1;
-+        hp_sdc.rcurr		= -1;
-+	hp_sdc.rqty		= 0;
-+
-+	hp_sdc.dev_err = -ENODEV;
-+
-+	errstr = "IO not found for";
-+	if (!hp_sdc.base_io) goto err0;
-+
-+	errstr = "IRQ not found for";
-+	if (!hp_sdc.irq) goto err0;
-+
-+	hp_sdc.dev_err = -EBUSY;
-+
-+#if defined(__hppa__)
-+	errstr = "IO not available for";
-+        if (request_region(hp_sdc.data_io, 2, hp_sdc_driver.name)) goto err0;
-+#endif	
-+
-+	errstr = "IRQ not available for";
-+        if(request_irq(hp_sdc.irq, &hp_sdc_isr, 0, "HP SDC",
-+		       (void *) hp_sdc.base_io)) goto err1;
-+
-+	errstr = "NMI not available for";
-+	if (request_irq(hp_sdc.nmi, &hp_sdc_nmisr, 0, "HP SDC NMI", 
-+			(void *) hp_sdc.base_io)) goto err2;
-+
-+	printk(KERN_INFO PREFIX "HP SDC at 0x%p, IRQ %d (NMI IRQ %d)\n", 
-+	       (void *)hp_sdc.base_io, hp_sdc.irq, hp_sdc.nmi);
-+
-+	hp_sdc_status_in8();
-+	hp_sdc_data_in8();
-+
-+	tasklet_init(&hp_sdc.task, hp_sdc_tasklet, 0);
-+
-+	/* Sync the output buffer registers, thus scheduling hp_sdc_tasklet. */
-+	t_sync.actidx	= 0;
-+	t_sync.idx	= 1;
-+	t_sync.endidx	= 6;
-+	t_sync.seq	= ts_sync;
-+	ts_sync[0]	= HP_SDC_ACT_DATAREG | HP_SDC_ACT_SEMAPHORE;
-+	ts_sync[1]	= 0x0f;
-+	ts_sync[2] = ts_sync[3]	= ts_sync[4] = ts_sync[5] = 0;
-+	t_sync.act.semaphore = &s_sync;
-+	init_MUTEX_LOCKED(&s_sync);
-+	hp_sdc_enqueue_transaction(&t_sync);
-+	down(&s_sync); /* Wait for t_sync to complete */
-+
-+	/* Create the keepalive task */
-+	init_timer(&hp_sdc.kicker);
-+	hp_sdc.kicker.expires = jiffies + HZ;
-+	hp_sdc.kicker.function = &hp_sdc_kicker;
-+	add_timer(&hp_sdc.kicker);
-+
-+	hp_sdc.dev_err = 0;
-+	return 0;
-+ err2:
-+	free_irq(hp_sdc.irq, NULL);
-+ err1:
-+	release_region(hp_sdc.data_io, 2);
-+ err0:
-+	printk(KERN_WARNING PREFIX ": %s SDC IO=0x%p IRQ=0x%x NMI=0x%x\n", 
-+		errstr, (void *)hp_sdc.base_io, hp_sdc.irq, hp_sdc.nmi);
-+	hp_sdc.dev = NULL;
-+	return hp_sdc.dev_err;
-+}
-+
-+#if defined(__hppa__)
-+
-+static int __init hp_sdc_init_hppa(struct parisc_device *d)
-+{
-+	if (!d) return 1;
-+	if (hp_sdc.dev != NULL) return 1;	/* We only expect one SDC */
-+
-+	hp_sdc.dev		= d;
-+	hp_sdc.irq		= d->irq;
-+	/* TODO: Is NMI == IRQ - 1 all cases, or is there a way to query? */
-+	hp_sdc.nmi		= d->irq - 1;
-+	hp_sdc.base_io		= (unsigned long) d->hpa;
-+	hp_sdc.data_io		= (unsigned long) d->hpa + 0x800;
-+	hp_sdc.status_io	= (unsigned long) d->hpa + 0x801;
-+
-+	return hp_sdc_init();
-+}
-+
-+#endif /* __hppa__ */
-+
-+#if !defined(__mc68000__) /* Link error on m68k! */
-+static void __exit hp_sdc_exit(void)
-+#else
-+static void hp_sdc_exit(void)
-+#endif
-+{
-+	write_lock_irq(&hp_sdc.lock);
-+
-+	/* Turn off all maskable "sub-function" irq's. */
-+	hp_sdc_spin_ibf();
-+	sdc_writeb(HP_SDC_CMD_SET_IM | HP_SDC_IM_MASK, hp_sdc.status_io);
-+
-+	/* Wait until we know this has been processed by the i8042 */
-+	hp_sdc_spin_ibf();
-+
-+	free_irq(hp_sdc.nmi, NULL);
-+	free_irq(hp_sdc.irq, NULL);
-+	write_unlock_irq(&hp_sdc.lock);
-+
-+	del_timer(&hp_sdc.kicker);
-+
-+	tasklet_kill(&hp_sdc.task);
-+
-+/*        release_region(hp_sdc.data_io, 2); */
-+
-+#if defined(__hppa__)
-+	if (unregister_parisc_driver(&hp_sdc_driver)) 
-+		printk(KERN_WARNING PREFIX "Error unregistering HP SDC");
-+#endif
-+}
-+
-+static int __init hp_sdc_register(void)
-+{
-+	hp_sdc_transaction tq_init;
-+	uint8_t tq_init_seq[5];
-+	struct semaphore tq_init_sem;
-+#if defined(__mc68000__)
-+	mm_segment_t fs;
-+	unsigned char i;
-+#endif
-+	
-+	hp_sdc.dev = NULL;
-+	hp_sdc.dev_err = 0;
-+#if defined(__hppa__)
-+	if (register_parisc_driver(&hp_sdc_driver)) {
-+		printk(KERN_WARNING PREFIX "Error registering SDC with system bus tree.\n");
-+		return -ENODEV;
-+	}
-+#elif defined(__mc68000__)
-+	if (!MACH_IS_HP300)
-+	    return -ENODEV;
-+
-+	hp_sdc.irq	 = 1;
-+	hp_sdc.nmi	 = 7;
-+	hp_sdc.base_io	 = (unsigned long) 0xf0428000;
-+	hp_sdc.data_io	 = (unsigned long) hp_sdc.base_io + 1;
-+	hp_sdc.status_io = (unsigned long) hp_sdc.base_io + 3;
-+	fs = get_fs();
-+	set_fs(KERNEL_DS);
-+	if (!get_user(i, (unsigned char *)hp_sdc.data_io))
-+		hp_sdc.dev = (void *)1;
-+	set_fs(fs);
-+	hp_sdc.dev_err   = hp_sdc_init();
-+#endif
-+	if (hp_sdc.dev == NULL) {
-+		printk(KERN_WARNING PREFIX "No SDC found.\n");
-+		return hp_sdc.dev_err;
-+	}
-+
-+	init_MUTEX_LOCKED(&tq_init_sem);
-+
-+	tq_init.actidx		= 0;
-+	tq_init.idx		= 1;
-+	tq_init.endidx		= 5;
-+	tq_init.seq		= tq_init_seq;
-+	tq_init.act.semaphore	= &tq_init_sem;
-+
-+	tq_init_seq[0] = 
-+	  HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN | HP_SDC_ACT_SEMAPHORE;
-+	tq_init_seq[1] = HP_SDC_CMD_READ_KCC;
-+	tq_init_seq[2] = 1;
-+	tq_init_seq[3] = 0;
-+	tq_init_seq[4] = 0;
-+
-+	hp_sdc_enqueue_transaction(&tq_init);
-+
-+	down(&tq_init_sem);
-+	up(&tq_init_sem);
-+
-+	if ((tq_init_seq[0] & HP_SDC_ACT_DEAD) == HP_SDC_ACT_DEAD) {
-+		printk(KERN_WARNING PREFIX "Error reading config byte.\n");
-+		hp_sdc_exit();
-+		return -ENODEV;
-+	}
-+	hp_sdc.r11 = tq_init_seq[4];
-+	if (hp_sdc.r11 & HP_SDC_CFG_NEW) {
-+		char *str;
-+		printk(KERN_INFO PREFIX "New style SDC\n");
-+		tq_init_seq[1] = HP_SDC_CMD_READ_XTD;
-+		tq_init.actidx		= 0;
-+		tq_init.idx		= 1;
-+		down(&tq_init_sem);
-+		hp_sdc_enqueue_transaction(&tq_init);		
-+		down(&tq_init_sem);
-+		up(&tq_init_sem);
-+		if ((tq_init_seq[0] & HP_SDC_ACT_DEAD) == HP_SDC_ACT_DEAD) {
-+			printk(KERN_WARNING PREFIX "Error reading extended config byte.\n");
-+			return -ENODEV;
-+		}
-+		hp_sdc.r7e = tq_init_seq[4];
-+		HP_SDC_XTD_REV_STRINGS(hp_sdc.r7e & HP_SDC_XTD_REV, str)
-+		printk(KERN_INFO PREFIX "Revision: %s\n", str);
-+		if (hp_sdc.r7e & HP_SDC_XTD_BEEPER) {
-+			printk(KERN_INFO PREFIX "TI SN76494 beeper present\n");
-+		}
-+		if (hp_sdc.r7e & HP_SDC_XTD_BBRTC) {
-+			printk(KERN_INFO PREFIX "OKI MSM-58321 BBRTC present\n");
-+		}
-+		printk(KERN_INFO PREFIX "Spunking the self test register to force PUP "
-+		       "on next firmware reset.\n");
-+		tq_init_seq[0] = HP_SDC_ACT_PRECMD | 
-+			HP_SDC_ACT_DATAOUT | HP_SDC_ACT_SEMAPHORE;
-+		tq_init_seq[1] = HP_SDC_CMD_SET_STR;
-+		tq_init_seq[2] = 1;
-+		tq_init_seq[3] = 0;
-+		tq_init.actidx		= 0;
-+		tq_init.idx		= 1;
-+		tq_init.endidx		= 4;
-+		down(&tq_init_sem);
-+		hp_sdc_enqueue_transaction(&tq_init);		
-+		down(&tq_init_sem);
-+		up(&tq_init_sem);
-+	}
-+	else {
-+		printk(KERN_INFO PREFIX "Old style SDC (1820-%s).\n", 
-+		       (hp_sdc.r11 & HP_SDC_CFG_REV) ? "3300" : "2564/3087");
-+	}
-+
-+        return 0;
-+}
-+
-+module_init(hp_sdc_register);
-+module_exit(hp_sdc_exit);
-+
-+/* Timing notes:  These measurements taken on my 64MHz 7100-LC (715/64) 
-+ *                                              cycles cycles-adj    time
-+ * between two consecutive mfctl(16)'s:              4        n/a    63ns
-+ * hp_sdc_spin_ibf when idle:                      119        115   1.7us
-+ * gsc_writeb status register:                      83         79   1.2us
-+ * IBF to clear after sending SET_IM:             6204       6006    93us
-+ * IBF to clear after sending LOAD_RT:            4467       4352    68us  
-+ * IBF to clear after sending two LOAD_RTs:      18974      18859   295us
-+ * READ_T1, read status/data, IRQ, call handler: 35564        n/a   556us
-+ * cmd to ~IBF READ_T1 2nd time right after:   5158403        n/a    81ms
-+ * between IRQ received and ~IBF for above:    2578877        n/a    40ms
-+ *
-+ * Performance stats after a run of this module configuring HIL and
-+ * receiving a few mouse events:
-+ *
-+ * status in8  282508 cycles 7128 calls
-+ * status out8   8404 cycles  341 calls
-+ * data out8     1734 cycles   78 calls
-+ * isr         174324 cycles  617 calls (includes take)
-+ * take          1241 cycles    2 calls
-+ * put        1411504 cycles 6937 calls
-+ * task       1655209 cycles 6937 calls (includes put)
-+ *
-+ */
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/hp_sdc_mlc.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/hp_sdc_mlc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,370 @@
-+/*
-+ * Access to HP-HIL MLC through HP System Device Controller.
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ * System Device Controller Microprocessor Firmware Theory of Operation
-+ *      for Part Number 1820-4784 Revision B.  Dwg No. A-1820-4784-2
-+ *
-+ */
-+
-+#include <linux/hil_mlc.h>
-+#include <linux/hp_sdc.h>
-+#include <linux/errno.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/string.h>
-+
-+#define PREFIX "HP SDC MLC: "
-+
-+static hil_mlc hp_sdc_mlc;
-+
-+MODULE_AUTHOR("Brian S. Julin <bri at calyx.com>");
-+MODULE_DESCRIPTION("Glue for onboard HIL MLC in HP-PARISC machines");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+struct hp_sdc_mlc_priv_s {
-+	int emtestmode;
-+	hp_sdc_transaction trans;
-+	u8 tseq[16];
-+	int got5x;
-+} hp_sdc_mlc_priv;
-+
-+/************************* Interrupt context ******************************/
-+static void hp_sdc_mlc_isr (int irq, void *dev_id, 
-+			    uint8_t status, uint8_t data) {
-+  	int idx;
-+	hil_mlc *mlc = &hp_sdc_mlc;
-+
-+	write_lock(&(mlc->lock));
-+	if (mlc->icount < 0) {
-+		printk(KERN_WARNING PREFIX "HIL Overflow!\n");
-+		up(&mlc->isem);
-+		goto out;
-+	}
-+	idx = 15 - mlc->icount;
-+	if ((status & HP_SDC_STATUS_IRQMASK) == HP_SDC_STATUS_HILDATA) {
-+		mlc->ipacket[idx] |= data | HIL_ERR_INT;
-+		mlc->icount--;
-+		if (hp_sdc_mlc_priv.got5x) goto check;
-+		if (!idx) goto check;
-+		if ((mlc->ipacket[idx-1] & HIL_PKT_ADDR_MASK) !=
-+		    (mlc->ipacket[idx] & HIL_PKT_ADDR_MASK)) {
-+			mlc->ipacket[idx] &= ~HIL_PKT_ADDR_MASK;
-+			mlc->ipacket[idx] |= (mlc->ipacket[idx-1] 
-+						    & HIL_PKT_ADDR_MASK);
-+		}
-+		goto check;
-+	}
-+	/* We know status is 5X */
-+	if (data & HP_SDC_HIL_ISERR) goto err;
-+	mlc->ipacket[idx] = 
-+		(data & HP_SDC_HIL_R1MASK) << HIL_PKT_ADDR_SHIFT;
-+	hp_sdc_mlc_priv.got5x = 1;
-+	goto out;
-+
-+ check:
-+	hp_sdc_mlc_priv.got5x = 0;
-+	if (mlc->imatch == 0) goto done;
-+	if ((mlc->imatch == (HIL_ERR_INT | HIL_PKT_CMD | HIL_CMD_POL)) 
-+	    && (mlc->ipacket[idx] == (mlc->imatch | idx))) goto done;
-+	if (mlc->ipacket[idx] == mlc->imatch) goto done;
-+	goto out;
-+
-+ err:				
-+	printk(KERN_DEBUG PREFIX "err code %x\n", data);
-+	switch (data) {
-+	case HP_SDC_HIL_RC_DONE:
-+		printk(KERN_WARNING PREFIX "Bastard SDC reconfigured loop!\n");
-+		break;
-+	case HP_SDC_HIL_ERR:
-+		mlc->ipacket[idx] |= HIL_ERR_INT | HIL_ERR_PERR | 
-+		  HIL_ERR_FERR | HIL_ERR_FOF;
-+		break;
-+	case HP_SDC_HIL_TO:
-+		mlc->ipacket[idx] |= HIL_ERR_INT | HIL_ERR_LERR;
-+		break;
-+	case HP_SDC_HIL_RC:
-+		printk(KERN_WARNING PREFIX "Bastard SDC decided to reconfigure loop!\n");
-+		break;
-+	default:
-+		printk(KERN_WARNING PREFIX "Unkown HIL Error status (%x)!\n", data);
-+		break;
-+	}
-+	/* No more data will be coming due to an error. */
-+ done:
-+	tasklet_schedule(mlc->tasklet);
-+	up(&(mlc->isem));
-+ out:
-+	write_unlock(&(mlc->lock));
-+}
-+
-+
-+/******************** Tasklet or userspace context functions ****************/
-+
-+static int hp_sdc_mlc_in (hil_mlc *mlc, suseconds_t timeout) {
-+	unsigned long flags;
-+	struct hp_sdc_mlc_priv_s *priv;
-+	int rc = 2;
-+
-+	priv = mlc->priv;
-+
-+	write_lock_irqsave(&(mlc->lock), flags);
-+
-+	/* Try to down the semaphore */
-+	if (down_trylock(&(mlc->isem))) {
-+		struct timeval tv;
-+		if (priv->emtestmode) {
-+			mlc->ipacket[0] = 
-+				HIL_ERR_INT | (mlc->opacket & 
-+					       (HIL_PKT_CMD | 
-+						HIL_PKT_ADDR_MASK | 
-+						HIL_PKT_DATA_MASK));
-+			mlc->icount = 14;
-+			/* printk(KERN_DEBUG PREFIX ">[%x]\n", mlc->ipacket[0]); */
-+			goto wasup;
-+		}
-+		do_gettimeofday(&tv);
-+		tv.tv_usec += 1000000 * (tv.tv_sec - mlc->instart.tv_sec);
-+		if (tv.tv_usec - mlc->instart.tv_usec > mlc->intimeout) {
-+		  /*		  printk("!%i %i", 
-+				  tv.tv_usec - mlc->instart.tv_usec, 
-+				  mlc->intimeout);
-+		  */
-+			rc = 1;
-+			up(&(mlc->isem));
-+		}
-+		goto done;
-+	}
-+ wasup:
-+	up(&(mlc->isem));
-+	rc = 0;
-+	goto done;
-+ done:
-+	write_unlock_irqrestore(&(mlc->lock), flags);
-+	return rc;
-+}
-+
-+static int hp_sdc_mlc_cts (hil_mlc *mlc) {
-+	struct hp_sdc_mlc_priv_s *priv;
-+	unsigned long flags;
-+
-+	priv = mlc->priv;	
-+
-+	write_lock_irqsave(&(mlc->lock), flags);
-+
-+	/* Try to down the semaphores -- they should be up. */
-+	if (down_trylock(&(mlc->isem))) {
-+		BUG();
-+		goto busy;
-+	}
-+	if (down_trylock(&(mlc->osem))) {
-+	 	BUG();
-+		up(&(mlc->isem));
-+		goto busy;
-+	}
-+	up(&(mlc->isem));
-+	up(&(mlc->osem));
-+
-+	if (down_trylock(&(mlc->csem))) {
-+		if (priv->trans.act.semaphore != &(mlc->csem)) goto poll;
-+		goto busy;
-+	}
-+	if (!(priv->tseq[4] & HP_SDC_USE_LOOP)) goto done;
-+
-+ poll:
-+	priv->trans.act.semaphore = &(mlc->csem);
-+	priv->trans.actidx = 0;
-+	priv->trans.idx = 1;
-+	priv->trans.endidx = 5;
-+	priv->tseq[0] = 
-+		HP_SDC_ACT_POSTCMD | HP_SDC_ACT_DATAIN | HP_SDC_ACT_SEMAPHORE;
-+	priv->tseq[1] = HP_SDC_CMD_READ_USE;
-+	priv->tseq[2] = 1;
-+	priv->tseq[3] = 0;
-+	priv->tseq[4] = 0;
-+	hp_sdc_enqueue_transaction(&(priv->trans));
-+ busy:
-+	write_unlock_irqrestore(&(mlc->lock), flags);
-+	return 1;
-+ done:
-+	priv->trans.act.semaphore = &(mlc->osem);
-+	up(&(mlc->csem));
-+	write_unlock_irqrestore(&(mlc->lock), flags);
-+	return 0;
-+}
-+
-+static void hp_sdc_mlc_out (hil_mlc *mlc) {
-+	struct hp_sdc_mlc_priv_s *priv;
-+	unsigned long flags;
-+
-+	priv = mlc->priv;
-+
-+	write_lock_irqsave(&(mlc->lock), flags);
-+	
-+	/* Try to down the semaphore -- it should be up. */
-+	if (down_trylock(&(mlc->osem))) {
-+	 	BUG();
-+		goto done;
-+	}
-+
-+	if (mlc->opacket & HIL_DO_ALTER_CTRL) goto do_control;
-+
-+ do_data:
-+	if (priv->emtestmode) {
-+		up(&(mlc->osem));
-+		goto done;
-+	}
-+	/* Shouldn't be sending commands when loop may be busy */
-+	if (down_trylock(&(mlc->csem))) {
-+	 	BUG();
-+		goto done;
-+	}
-+	up(&(mlc->csem));
-+
-+	priv->trans.actidx = 0;
-+	priv->trans.idx = 1;
-+	priv->trans.act.semaphore = &(mlc->osem);
-+	priv->trans.endidx = 6;
-+	priv->tseq[0] = 
-+		HP_SDC_ACT_DATAREG | HP_SDC_ACT_POSTCMD | HP_SDC_ACT_SEMAPHORE;
-+	priv->tseq[1] = 0x7;
-+	priv->tseq[2] = 
-+		(mlc->opacket & 
-+		 (HIL_PKT_ADDR_MASK | HIL_PKT_CMD))
-+		   >> HIL_PKT_ADDR_SHIFT;
-+	priv->tseq[3] = 
-+		(mlc->opacket & HIL_PKT_DATA_MASK) 
-+		  >> HIL_PKT_DATA_SHIFT;
-+	priv->tseq[4] = 0;  /* No timeout */
-+	if (priv->tseq[3] == HIL_CMD_DHR) priv->tseq[4] = 1;
-+	priv->tseq[5] = HP_SDC_CMD_DO_HIL;
-+	goto enqueue;
-+
-+ do_control:
-+	priv->emtestmode = mlc->opacket & HIL_CTRL_TEST;
-+	if ((mlc->opacket & (HIL_CTRL_APE | HIL_CTRL_IPF)) == HIL_CTRL_APE) {
-+		BUG(); /* we cannot emulate this, it should not be used. */
-+	}
-+	if ((mlc->opacket & HIL_CTRL_ONLY) == HIL_CTRL_ONLY) goto control_only;
-+	if (mlc->opacket & HIL_CTRL_APE) { 
-+		BUG(); /* Should not send command/data after engaging APE */
-+		goto done;
-+	}
-+	/* Disengaging APE this way would not be valid either since 
-+	 * the loop must be allowed to idle.
-+	 *
-+	 * So, it works out that we really never actually send control 
-+	 * and data when using SDC, we just send the data. 
-+	 */
-+	goto do_data;
-+
-+ control_only:
-+	priv->trans.actidx = 0;
-+	priv->trans.idx = 1;
-+	priv->trans.act.semaphore = &(mlc->osem);
-+	priv->trans.endidx = 4;
-+	priv->tseq[0] = 
-+	  HP_SDC_ACT_PRECMD | HP_SDC_ACT_DATAOUT | HP_SDC_ACT_SEMAPHORE;
-+	priv->tseq[1] = HP_SDC_CMD_SET_LPC;
-+	priv->tseq[2] = 1;
-+	//	priv->tseq[3] = (mlc->ddc + 1) | HP_SDC_LPS_ACSUCC;
-+	priv->tseq[3] = 0;
-+	if (mlc->opacket & HIL_CTRL_APE) {
-+		priv->tseq[3] |= HP_SDC_LPC_APE_IPF;
-+		down_trylock(&(mlc->csem));
-+	} 
-+ enqueue:
-+	hp_sdc_enqueue_transaction(&(priv->trans));
-+ done:
-+	write_unlock_irqrestore(&(mlc->lock), flags);
-+}
-+
-+
-+static void hp_sdc_mlc_inc_use_count (void) {
-+	MOD_INC_USE_COUNT;
-+}
-+
-+static void hp_sdc_mlc_dec_use_count (void) {
-+	MOD_DEC_USE_COUNT;
-+}
-+
-+static int __init hp_sdc_mlc_init(void)
-+{
-+	hil_mlc *mlc = &hp_sdc_mlc;
-+
-+	printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n");
-+
-+	hp_sdc_mlc_priv.emtestmode = 0;
-+	hp_sdc_mlc_priv.trans.seq = hp_sdc_mlc_priv.tseq;
-+	hp_sdc_mlc_priv.trans.act.semaphore = &(mlc->osem);
-+	hp_sdc_mlc_priv.got5x = 0;
-+
-+	mlc->cts		= &hp_sdc_mlc_cts;
-+	mlc->in			= &hp_sdc_mlc_in;
-+	mlc->out		= &hp_sdc_mlc_out;
-+
-+	mlc->inc_use_count 	= &hp_sdc_mlc_inc_use_count;
-+	mlc->dec_use_count 	= &hp_sdc_mlc_dec_use_count;
-+
-+	if (hil_mlc_register(mlc)) {
-+		printk(KERN_WARNING PREFIX "Failed to register MLC structure with hil_mlc\n");
-+		goto err0;
-+	}
-+	mlc->priv		= &hp_sdc_mlc_priv;
-+
-+	if (hp_sdc_request_hil_irq(&hp_sdc_mlc_isr)) {
-+		printk(KERN_WARNING PREFIX "Request for raw HIL ISR hook denied\n");
-+		goto err1;
-+	}
-+	return 0;
-+ err1:
-+	if (hil_mlc_unregister(mlc)) {
-+		printk(KERN_ERR PREFIX "Failed to unregister MLC structure with hil_mlc.\n"
-+			"This is bad.  Could cause an oops.\n");
-+	}
-+ err0:
-+	return -EBUSY;
-+}
-+
-+static void __exit hp_sdc_mlc_exit(void)
-+{
-+	hil_mlc *mlc = &hp_sdc_mlc;
-+	if (hp_sdc_release_hil_irq(&hp_sdc_mlc_isr)) {
-+		printk(KERN_ERR PREFIX "Failed to release the raw HIL ISR hook.\n"
-+			"This is bad.  Could cause an oops.\n");
-+	}
-+	if (hil_mlc_unregister(mlc)) {
-+		printk(KERN_ERR PREFIX "Failed to unregister MLC structure with hil_mlc.\n"
-+			"This is bad.  Could cause an oops.\n");
-+	}
-+}
-+
-+module_init(hp_sdc_mlc_init);
-+module_exit(hp_sdc_mlc_exit);
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/serio/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -111,6 +111,32 @@
- 	  To compile this driver as a module, choose M here: the
- 	  module will be called gscps2.
- 
-+config HP_SDC
-+	tristate "HP System Device Controller i8042 Support"
-+	depends on GSC && SERIO
-+	default y
-+	---help---
-+	  This option enables supports for the the "System Device
-+	  Controller", an i8042 carrying microcode to manage a
-+	  few miscellanous devices on some Hewlett Packard systems.
-+	  The SDC itself contains a 10ms resolution timer/clock capable
-+	  of delivering interrupts on a periodic and one-shot basis.
-+	  The SDC may also be connected to a battery-backed real-time
-+	  clock, a basic audio waveform generator, and an HP-HIL Master
-+	  Link Controller serving up to seven input devices.
-+
-+	  By itself this option is rather useless, but enabling it will
-+	  enable selection of drivers for the abovementioned devices.
-+	  It is, however, incompatible with the old, reliable HIL keyboard
-+	  driver, and the new HIL driver is experimental, so if you plan
-+	  to use a HIL keyboard as your primary keyboard, you may wish
-+	  to keep using that driver until the new HIL drivers have had
-+	  more testing.
-+
-+config HIL_MLC
-+	tristate "HIL MLC Support (needed for HIL input devices)"
-+	depends on HP_SDC
-+
- config SERIO_PCIPS2
- 	tristate "PCI PS/2 keyboard and PS/2 mouse controller"
- 	depends on PCI && SERIO
-Index: debian-kernel-hppa-2.6.8/drivers/input/serio/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/input/serio/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/input/serio/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -2,8 +2,6 @@
- # Makefile for the input core drivers.
- #
- 
--# Each configuration option enables a list of files.
--
- obj-$(CONFIG_SERIO)		+= serio.o
- obj-$(CONFIG_SERIO_I8042)	+= i8042.o
- obj-$(CONFIG_SERIO_PARKBD)	+= parkbd.o
-@@ -15,5 +13,7 @@
- obj-$(CONFIG_SERIO_Q40KBD)	+= q40kbd.o
- obj-$(CONFIG_SERIO_98KBD)	+= 98kbd-io.o
- obj-$(CONFIG_SERIO_GSCPS2)	+= gscps2.o
-+obj-$(CONFIG_HP_SDC)		+= hp_sdc.o
-+obj-$(CONFIG_HIL_MLC)		+= hp_sdc_mlc.o hil_mlc.o
- obj-$(CONFIG_SERIO_PCIPS2)	+= pcips2.o
- obj-$(CONFIG_SERIO_MACEPS2)	+= maceps2.o
-Index: debian-kernel-hppa-2.6.8/drivers/net/tulip/media.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/net/tulip/media.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/net/tulip/media.c	2005-03-24 01:16:08.000000000 -0500
-@@ -43,8 +43,10 @@
- 
- /* MII transceiver control section.
-    Read and write the MII registers using software-generated serial
--   MDIO protocol.  See the MII specifications or DP83840A data sheet
--   for details. */
-+   MDIO protocol.
-+   See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions")
-+   or DP83840A data sheet for more details.
-+   */
- 
- int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
- {
-@@ -271,13 +273,29 @@
- 				int reset_length = p[2 + init_length];
- 				misc_info = (u16*)(reset_sequence + reset_length);
- 				if (startup) {
-+					int timeout = 10;	/* max 1 ms */
- 					outl(mtable->csr12dir | 0x100, ioaddr + CSR12);
- 					for (i = 0; i < reset_length; i++)
- 						outl(reset_sequence[i], ioaddr + CSR12);
-+
-+					/* flush posted writes */
-+					inl(ioaddr + CSR12);
-+
-+					/* Sect 3.10.3 in DP83840A.pdf (p39) */
-+					udelay(500);
-+
-+					/* Section 4.2 in DP83840A.pdf (p43) */
-+					/* and IEEE 802.3 "22.2.4.1.1 Reset" */
-+					while (timeout-- &&
-+						(tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
-+						udelay(100);
- 				}
- 				for (i = 0; i < init_length; i++)
- 					outl(init_sequence[i], ioaddr + CSR12);
-+
-+				inl(ioaddr + CSR12);	/* flush posted writes */
- 			}
-+
- 			tmp_info = get_u16(&misc_info[1]);
- 			if (tmp_info)
- 				tp->advertising[phy_num] = tmp_info | 1;
-Index: debian-kernel-hppa-2.6.8/drivers/parisc/ccio-dma.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/parisc/ccio-dma.c	2005-03-24 01:16:00.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/parisc/ccio-dma.c	2005-03-24 01:16:08.000000000 -0500
-@@ -262,8 +262,6 @@
- 	struct resource mmio_region[2]; /* The "routed" MMIO regions */
- };
- 
--/* Ratio of Host MEM to IOV Space size */
--static unsigned long ccio_mem_ratio = 4;
- static struct ioc *ioc_list;
- static int ioc_count;
- 
-@@ -559,7 +557,7 @@
- ccio_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba,
- 		   unsigned long hints)
- {
--	register unsigned long pa = (volatile unsigned long) vba;
-+	register unsigned long pa;
- 	register unsigned long ci; /* coherent index */
- 
- 	/* We currently only support kernel addresses */
-@@ -1242,6 +1240,21 @@
- #define CCIO_CHAINID_MASK	0xff
- #endif /* 0 */
- 
-+/* We *can't* support JAVA (T600). Venture there at your own risk. */
-+static struct parisc_device_id ccio_tbl[] = {
-+	{ HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */
-+	{ HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */
-+	{ 0, }
-+};
-+
-+static int ccio_probe(struct parisc_device *dev);
-+
-+static struct parisc_driver ccio_driver = {
-+	.name =		"U2:Uturn",
-+	.id_table =	ccio_tbl,
-+	.probe =	ccio_probe,
-+};
-+
- /**
-  * ccio_ioc_init - Initalize the I/O Controller
-  * @ioc: The I/O Controller.
-@@ -1253,9 +1266,9 @@
- static void
- ccio_ioc_init(struct ioc *ioc)
- {
--	int i, iov_order;
-+	int i;
-+	unsigned int iov_order;
- 	u32 iova_space_size;
--	unsigned long physmem;
- 
- 	/*
- 	** Determine IOVA Space size from memory size.
-@@ -1268,17 +1281,16 @@
- 	** Hot-Plug/Removal of PCI cards. (aka PCI OLARD).
- 	*/
- 
-+	iova_space_size = (u32) (num_physpages / count_parisc_driver(&ccio_driver));
-+
- 	/* limit IOVA space size to 1MB-1GB */
- 
--	physmem = num_physpages << PAGE_SHIFT;
--	if(physmem < (ccio_mem_ratio * 1024 * 1024)) {
--		iova_space_size = 1024 * 1024;
-+	if (iova_space_size < (1 << (20 - PAGE_SHIFT))) {
-+		iova_space_size =  1 << (20 - PAGE_SHIFT);
- #ifdef __LP64__
--	} else if(physmem > (ccio_mem_ratio * 512 * 1024 * 1024)) {
--		iova_space_size = 512 * 1024 * 1024;
-+	} else if (iova_space_size > (1 << (30 - PAGE_SHIFT))) {
-+		iova_space_size =  1 << (30 - PAGE_SHIFT);
- #endif
--	} else {
--		iova_space_size = (u32)(physmem / ccio_mem_ratio);
- 	}
- 
- 	/*
-@@ -1294,10 +1306,10 @@
- 	**   this is the case under linux."
- 	*/
- 
--	iov_order = get_order(iova_space_size) >> (IOVP_SHIFT - PAGE_SHIFT);
--	BUG_ON(iov_order > (30 - IOVP_SHIFT));   /* iova_space_size <= 1GB */
--	BUG_ON(iov_order < (20 - IOVP_SHIFT));   /* iova_space_size >= 1MB */
--	iova_space_size = 1 << (iov_order + IOVP_SHIFT);
-+	iov_order = get_order(iova_space_size << PAGE_SHIFT);
-+
-+	/* iova_space_size is now bytes, not pages */
-+	iova_space_size = 1 << (iov_order + PAGE_SHIFT);
- 
- 	ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64);
- 
-@@ -1306,9 +1318,12 @@
- 	/* Verify it's a power of two */
- 	BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT));
- 
--	DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits) PDIR size 0x%0x",
--		__FUNCTION__, ioc->ioc_hpa, physmem>>20, iova_space_size>>20,
--		 iov_order + PAGE_SHIFT, ioc->pdir_size);
-+	DBG_INIT("%s() hpa 0x%lx mem %luMB IOV %dMB (%d bits)\n",
-+			__FUNCTION__,
-+			ioc->ioc_hpa,
-+			(unsigned long) num_physpages >> (20 - PAGE_SHIFT),
-+			iova_space_size>>20,
-+			iov_order + PAGE_SHIFT);
- 
- 	ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, 
- 						 get_order(ioc->pdir_size));
-@@ -1562,19 +1577,6 @@
- 	return 0;
- }
- 
--/* We *can't* support JAVA (T600). Venture there at your own risk. */
--static struct parisc_device_id ccio_tbl[] = {
--	{ HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */
--	{ HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */
--	{ 0, }
--};
--
--static struct parisc_driver ccio_driver = {
--	.name =		"U2:Uturn",
--	.id_table =	ccio_tbl,
--	.probe =	ccio_probe,
--};
--
- /**
-  * ccio_init - ccio initalization procedure.
-  *
-Index: debian-kernel-hppa-2.6.8/drivers/parisc/power.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/parisc/power.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/parisc/power.c	2005-03-24 01:16:08.000000000 -0500
-@@ -54,9 +54,9 @@
- 
- 
- #ifdef DEBUG
--# define DPRINTK(x) printk x
-+# define DPRINTK(x...) printk(x)
- #else
--# define DPRINTK(x) do { } while (0)
-+# define DPRINTK(x...)
- #endif
- 
- 
-@@ -120,14 +120,14 @@
- static void process_shutdown(void)
- {
- 	if (shutdown_timer == 0)
--		DPRINTK((KERN_INFO "Shutdown requested...\n"));
-+		DPRINTK(KERN_INFO "Shutdown requested...\n");
- 
- 	shutdown_timer++;
- 	
- 	/* wait until the button was pressed for 1 second */
- 	if (shutdown_timer == HZ) {
- 		static char msg[] = "Shutting down...";
--		DPRINTK((KERN_INFO "%s\n", msg));
-+		DPRINTK(KERN_INFO "%s\n", msg);
- #ifdef CONFIG_CHASSIS_LCD_LED
- 		lcd_print(msg);
- #endif
-Index: debian-kernel-hppa-2.6.8/drivers/parisc/sba_iommu.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/parisc/sba_iommu.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/parisc/sba_iommu.c	2005-03-24 01:17:15.000000000 -0500
-@@ -1,8 +1,9 @@
- /*
- **  System Bus Adapter (SBA) I/O MMU manager
- **
--**	(c) Copyright 2000 Grant Grundler
--**	(c) Copyright 2000 Hewlett-Packard Company
-+**	(c) Copyright 2000-2004 Grant Grundler <grundler @ parisc-linux x org>
-+**	(c) Copyright 2004 Naresh Kumar Inna <knaresh at india x hp x com>
-+**	(c) Copyright 2000-2004 Hewlett-Packard Company
- **
- **	Portions (c) 1999 Dave S. Miller (from sparc64 I/O MMU code)
- **
-@@ -164,6 +165,8 @@
- #define IOC_CTRL_DE       (1 << 2) /* Dillon Enable */
- #define IOC_CTRL_RM       (1 << 8) /* Real Mode */
- #define IOC_CTRL_NC       (1 << 9) /* Non Coherent Mode */
-+#define IOC_CTRL_D4       (1 << 11) /* Disable 4-byte coalescing */
-+#define IOC_CTRL_DD       (1 << 13) /* Disable distr. LMMIO range coalescing */
- 
- #define MAX_IOC		2	/* per Ike. Pluto/Astro only have 1. */
- 
-@@ -298,9 +301,6 @@
- 
- static unsigned long ioc_needs_fdc = 0;
- 
--/* Ratio of Host MEM to IOV Space size */
--static unsigned long sba_mem_ratio = 8;
--
- /* global count of IOMMUs in the system */
- static unsigned int global_ioc_cnt = 0;
- 
-@@ -1524,8 +1524,7 @@
- 	extern void lba_set_iregs(struct parisc_device *, u32, u32);
- 
- 	u32 iova_space_size, iova_space_mask;
--	int pdir_size, iov_order;
--	unsigned long physmem;
-+	unsigned int pdir_size, iov_order;
- 	struct parisc_device *lba;
- 
- 	/*
-@@ -1542,16 +1541,15 @@
- 	** for DMA hints - ergo only 30 bits max.
- 	*/
- 
--	physmem = num_physpages << PAGE_SHIFT;
--	iova_space_size = (u32) (physmem/(sba_mem_ratio*global_ioc_cnt));
-+	iova_space_size = (u32) (num_physpages/global_ioc_cnt);
- 
- 	/* limit IOVA space size to 1MB-1GB */
--	if (iova_space_size < 1024*1024) {
--		iova_space_size = 1024*1024;
-+	if (iova_space_size < (1 << (20 - PAGE_SHIFT))) {
-+		iova_space_size = 1 << (20 - PAGE_SHIFT);
- 	}
- #ifdef __LP64__
--	else if (iova_space_size > 512*1024*1024) {
--		iova_space_size = 512*1024*1024;
-+	else if (iova_space_size > (1 << (30 - PAGE_SHIFT))) {
-+		iova_space_size = 1 << (30 - PAGE_SHIFT);
- 	}
- #endif
- 
-@@ -1560,21 +1558,19 @@
- 	** thus, pdir/res_map will also be log2().
- 	** PIRANHA BUG: Exception is when IO Pdir is 2MB (gets reduced)
- 	*/
--	iov_order = get_order(iova_space_size >> (IOVP_SHIFT-PAGE_SHIFT));
--	ASSERT(iov_order <= (30 - IOVP_SHIFT));   /* iova_space_size <= 1GB */
--	ASSERT(iov_order >= (20 - IOVP_SHIFT));   /* iova_space_size >= 1MB */
--	iova_space_size = 1 << (iov_order + IOVP_SHIFT);
--
--	ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64);
-+	iov_order = get_order(iova_space_size << PAGE_SHIFT);
- 
--	ASSERT(pdir_size < 4*1024*1024);   /* max pdir size == 2MB */
-+	/* iova_space_size is now bytes, not pages */
-+	iova_space_size = 1 << (iov_order + PAGE_SHIFT);
- 
--	/* Verify it's a power of two */
--	ASSERT((1 << get_order(pdir_size)) == (pdir_size >> PAGE_SHIFT));
-+	ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64);
- 
--	DBG_INIT("%s() hpa 0x%lx mem %dMB IOV %dMB (%d bits) PDIR size 0x%0x\n",
--		__FUNCTION__, ioc->ioc_hpa, (int) (physmem>>20),
--		iova_space_size>>20, iov_order + PAGE_SHIFT, pdir_size);
-+	DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n",
-+			__FUNCTION__,
-+			ioc->ioc_hpa,
-+			(unsigned long) num_physpages >> (20 - PAGE_SHIFT),
-+			iova_space_size>>20,
-+			iov_order + PAGE_SHIFT);	
- 
- 	ioc->pdir_base = sba_alloc_pdir(pdir_size);
- 
-@@ -1685,7 +1681,9 @@
- 		DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->",
- 			__FUNCTION__, sba_dev->sba_hpa, ioc_ctl);
- 		ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE);
--		ioc_ctl |= IOC_CTRL_TC;	/* Astro: firmware enables this */
-+		ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC;
-+			/* j6700 v1.6 firmware sets 0x294f */
-+			/* A500 firmware sets 0x4d */
- 
- 		WRITE_REG(ioc_ctl, sba_dev->sba_hpa+IOC_CTRL);
- 
-@@ -1730,6 +1728,16 @@
- 		/* flush out the writes */
- 		READ_REG(sba_dev->ioc[i].ioc_hpa + ROPE7_CTL);
- 
-+		DBG_INIT("	ioc[%d] ROPE_CFG 0x%Lx  ROPE_DBG 0x%Lx\n",
-+				i,
-+				READ_REG(sba_dev->ioc[i].ioc_hpa + 0x40),
-+				READ_REG(sba_dev->ioc[i].ioc_hpa + 0x50)
-+			);
-+		DBG_INIT("	STATUS_CONTROL 0x%Lx  FLUSH_CTRL 0x%Lx\n",
-+				READ_REG(sba_dev->ioc[i].ioc_hpa + 0x108),
-+				READ_REG(sba_dev->ioc[i].ioc_hpa + 0x400)
-+			);
-+
- 		if (IS_PLUTO(sba_dev->iodc)) {
- 			sba_ioc_init_pluto(sba_dev->dev, &(sba_dev->ioc[i]), i);
- 		} else {
-Index: debian-kernel-hppa-2.6.8/drivers/pcmcia/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/pcmcia/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/pcmcia/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -136,7 +136,7 @@
- 
- config PCMCIA_PROBE
- 	bool
--	default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X
-+	default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X && !PARISC
- 
- endmenu
- 
-Index: debian-kernel-hppa-2.6.8/drivers/pcmcia/rsrc_mgr.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/pcmcia/rsrc_mgr.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/pcmcia/rsrc_mgr.c	2005-03-24 01:16:08.000000000 -0500
-@@ -59,10 +59,12 @@
- 
- #define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0444)
- 
--INT_MODULE_PARM(probe_mem,	1);		/* memory probe? */
- #ifdef CONFIG_PCMCIA_PROBE
-+INT_MODULE_PARM(probe_mem,	1);		/* memory probe? */
- INT_MODULE_PARM(probe_io,	1);		/* IO port probe? */
- INT_MODULE_PARM(mem_limit,	0x10000);
-+#else
-+INT_MODULE_PARM(probe_mem,	0);		/* memory probe? */
- #endif
- 
- /*======================================================================
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/lasi700.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/lasi700.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/lasi700.c	2005-03-24 01:16:08.000000000 -0500
-@@ -110,7 +110,7 @@
- 
- 	host->irq = dev->irq;
- 	if (request_irq(dev->irq, NCR_700_intr, SA_SHIRQ,
--				dev->dev.bus_id, host)) {
-+				"lasi700", host)) {
- 		printk(KERN_ERR "%s: irq problem, detaching\n",
- 		       dev->dev.bus_id);
- 		goto out_put_host;
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym53c8xx.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym53c8xx.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym53c8xx.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-- *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM53C8XX_H
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_conf.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_conf.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_conf.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_CONF_H
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_defs.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_defs.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_defs.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-- *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_DEFS_H
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw1.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_fw1.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw1.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- /*
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw2.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_fw2.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw2.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- /*
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_fw.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw.c	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifdef __FreeBSD__
-@@ -411,7 +398,6 @@
- 		if (opcode == 0) {
- 			printf ("%s: ERROR0 IN SCRIPT at %d.\n",
- 				sym_name(np), (int) (cur-start));
--			MDELAY (10000);
- 			++cur;
- 			continue;
- 		};
-@@ -455,7 +441,6 @@
- 			if ((tmp1 ^ tmp2) & 3) {
- 				printf ("%s: ERROR1 IN SCRIPT at %d.\n",
- 					sym_name(np), (int) (cur-start));
--				MDELAY (10000);
- 			}
- 			/*
- 			 *  If PREFETCH feature not enabled, remove 
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_fw.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_fw.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-- *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef	SYM_FW_H
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_glue.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_glue.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_glue.c	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- #define SYM_GLUE_C
- 
-@@ -636,7 +623,6 @@
- 	switch (cp->cdb_buf[0]) {
- 	case 0x0A: case 0x2A: case 0xAA:
- 		panic("XXXXXXXXXXXXX WRITE NOT YET ALLOWED XXXXXXXXXXXXXX\n");
--		MDELAY(10000);
- 		break;
- 	default:
- 		break;
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_glue.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_glue.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_glue.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_GLUE_H
-@@ -89,7 +76,6 @@
- 
- #define SYM_OPT_HANDLE_DIR_UNKNOWN
- #define SYM_OPT_HANDLE_DEVICE_QUEUEING
--#define SYM_OPT_NVRAM_PRE_READ
- #define SYM_OPT_SNIFF_INQUIRY
- #define SYM_OPT_LIMIT_COMMAND_REORDERING
- #define	SYM_OPT_ANNOUNCE_TRANSFER_RATE
-@@ -108,10 +94,9 @@
- #define	printf(args...)		printk(args)
- 
- /*
-- *  Insert a delay in micro-seconds and milli-seconds.
-+ *  Insert a delay in micro-seconds
-  */
- #define sym_udelay(us)	udelay(us)
--#define sym_mdelay(ms)	mdelay(ms)
- 
- /*
-  *  A 'read barrier' flushes any data that have been prefetched 
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_hipd.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_hipd.c	2005-03-24 01:16:08.000000000 -0500
-@@ -3,6 +3,7 @@
-  * of PCI-SCSI IO processors.
-  *
-  * Copyright (C) 1999-2001  Gerard Roudier <groudier at free.fr>
-+ * Copyright (c) 2003-2004  Matthew Wilcox <matthew at wil.cx>
-  *
-  * This driver is derived from the Linux sym53c8xx driver.
-  * Copyright (C) 1998-2000  Gerard Roudier
-@@ -22,35 +23,22 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-- *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
--#define SYM_VERSION "2.1.18j"
-+#define SYM_VERSION "2.1.18k"
- #define SYM_DRIVER_NAME	"sym-" SYM_VERSION
- 
- #include "sym_glue.h"
-@@ -303,7 +291,6 @@
- 	}
- out:
- 	OUTB (nc_scntl1, 0);
--	/* MDELAY(100); */
- 	return retv;
- }
- 
-@@ -1921,7 +1908,7 @@
- 	if (np->features & (FE_ULTRA2|FE_ULTRA3)) {
- 		OUTONW (nc_sien, SBMC);
- 		if (reason == 0) {
--			MDELAY(100);
-+			mdelay(100);
- 			INW (nc_sist);
- 		}
- 		np->scsi_mode = INB (nc_stest4) & SMODE;
-@@ -5510,7 +5497,6 @@
- 		printf ("CCB=%lx STAT=%x/%x/%x DEV=%d/%d\n", (unsigned long)cp,
- 			cp->host_status, cp->ssss_status, cp->host_flags,
- 			cp->target, cp->lun);
--		MDELAY(100);
- 	}
- 
- 	/*
-@@ -5738,15 +5724,8 @@
- /*
-  *  Soft-attach the controller.
-  */
--#ifdef SYM_OPT_NVRAM_PRE_READ
- int sym_hcb_attach(hcb_p np, struct sym_fw *fw, struct sym_nvram *nvram)
--#else
--int sym_hcb_attach(hcb_p np, struct sym_fw *fw)
--#endif
- {
--#ifndef SYM_OPT_NVRAM_PRE_READ
--	struct sym_nvram nvram_buf, *nvram = &nvram_buf;
--#endif
- 	int i;
- 
- 	/*
-@@ -5773,13 +5752,6 @@
- 	sym_chip_reset (np);
- 
- 	/*
--	 *  Try to read the user set-up.
--	 */
--#ifndef SYM_OPT_NVRAM_PRE_READ
--	(void) sym_read_nvram(np, nvram);
--#endif
--
--	/*
- 	 *  Prepare controller and devices settings, according 
- 	 *  to chip features, user set-up and driver set-up.
- 	 */
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_hipd.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_hipd.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_hipd.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_HIPD_H
-@@ -1139,12 +1126,7 @@
- int sym_abort_ccb(hcb_p np, ccb_p cp, int timed_out);
- int sym_reset_scsi_target(hcb_p np, int target);
- void sym_hcb_free(hcb_p np);
--
--#ifdef SYM_OPT_NVRAM_PRE_READ
- int sym_hcb_attach(hcb_p np, struct sym_fw *fw, struct sym_nvram *nvram);
--#else
--int sym_hcb_attach(hcb_p np, struct sym_fw *fw);
--#endif
- 
- /*
-  *  Optionnaly, the driver may handle IO timeouts.
-@@ -1388,7 +1370,6 @@
- #define PRINT_ADDR	sym_print_addr
- #define PRINT_TARGET	sym_print_target
- #define PRINT_LUN	sym_print_lun
--#define MDELAY		sym_mdelay
- #define UDELAY		sym_udelay
- 
- #endif /* SYM_HIPD_H */
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_malloc.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_malloc.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_malloc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifdef __FreeBSD__
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_misc.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_misc.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_misc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifdef __FreeBSD__
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_misc.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_misc.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_misc.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_MISC_H
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_nvram.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_nvram.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_nvram.c	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #include "sym_glue.h"
-Index: debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_nvram.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/scsi/sym53c8xx_2/sym_nvram.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/scsi/sym53c8xx_2/sym_nvram.h	2005-03-24 01:16:08.000000000 -0500
-@@ -22,32 +22,19 @@
-  *
-  *-----------------------------------------------------------------------------
-  *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. The name of the author may not be used to endorse or promote products
-- *    derived from this software without specific prior written permission.
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-  *
-- * Where this Software is combined with software released under the terms of 
-- * the GNU Public License ("GPL") and the terms of the GPL would require the 
-- * combined work to also be released under the terms of the GPL, the terms
-- * and conditions of this License will apply in addition to those of the
-- * GPL with the exception of any terms or conditions of this License that
-- * conflict with, or are expressly prohibited by, the GPL.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-  *
-- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
- #ifndef SYM_NVRAM_H
-Index: debian-kernel-hppa-2.6.8/drivers/serial/8250.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/serial/8250.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/serial/8250.c	2005-03-24 01:16:08.000000000 -0500
-@@ -2023,8 +2023,18 @@
- 	.data		= &serial8250_reg,
- };
- 
-+#ifdef CONFIG_PARISC
-+int __init serial8250_console_init(void)
-+{
-+	static int serial8250_console_initialised;
-+	if (serial8250_console_initialised)
-+		return 0;
-+	serial8250_console_initialised = 1;
-+
-+#else
- static int __init serial8250_console_init(void)
- {
-+#endif /* CONFIG_PARISC */
- #ifdef CONFIG_PPC_MULTIPLATFORM
- 	if(_machine == _MACH_Pmac) {
- 		printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
-@@ -2035,7 +2045,9 @@
- 	register_console(&serial8250_console);
- 	return 0;
- }
-+#ifndef CONFIG_PARISC
- console_initcall(serial8250_console_init);
-+#endif /* !CONFIG_PARISC */
- 
- static int __init serial8250_late_console_init(void)
- {
-Index: debian-kernel-hppa-2.6.8/drivers/serial/8250_gsc.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/serial/8250_gsc.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/serial/8250_gsc.c	2005-03-24 01:16:08.000000000 -0500
-@@ -82,7 +82,11 @@
- 		kfree(serial);
- 		return -ENODEV;
- 	}
--
-+        
-+#ifdef CONFIG_SERIAL_8250_CONSOLE        
-+	serial8250_console_init();
-+#endif
-+        
- 	return 0;
- }
- 
-Index: debian-kernel-hppa-2.6.8/drivers/serial/8250_pci.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/serial/8250_pci.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/serial/8250_pci.c	2005-03-24 01:16:08.000000000 -0500
-@@ -2177,7 +2177,14 @@
- 
- static int __init serial8250_pci_init(void)
- {
--	return pci_module_init(&serial_pci_driver);
-+	int ret;
-+	ret = pci_module_init(&serial_pci_driver);
-+
-+#if defined(__hppa__) && defined(CONFIG_SERIAL_8250_CONSOLE)
-+	serial8250_console_init();
-+#endif
-+
-+	return ret;
- }
- 
- static void __exit serial8250_pci_exit(void)
-Index: debian-kernel-hppa-2.6.8/drivers/serial/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/serial/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/serial/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -450,7 +450,7 @@
- 
- config PDC_CONSOLE
- 	bool "PDC software console support"
--	depends on PARISC && !SERIAL_MUX
-+	depends on PARISC && !SERIAL_MUX && VT
- 	default n
- 	help
- 	  Saying Y here will enable the software based PDC console to be 
-Index: debian-kernel-hppa-2.6.8/drivers/serial/serial_core.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/serial/serial_core.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/serial/serial_core.c	2005-03-24 01:16:08.000000000 -0500
-@@ -231,7 +231,8 @@
- 	/*
- 	 * Ensure that the IRQ handler isn't running on another CPU.
- 	 */
--	synchronize_irq(port->irq);
-+	if (port->irq != SERIAL_IRQ_NONE)
-+		synchronize_irq(port->irq);
- 
- 	/*
- 	 * Free the transmit buffer page.
-@@ -1972,7 +1973,11 @@
- 		printk("MMIO 0x%lx", port->mapbase);
- 		break;
- 	}
--	printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
-+	if (port->irq == SERIAL_IRQ_NONE) {
-+		printk(" (polled) is a %s\n", uart_type(port));
-+	} else {
-+		printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
-+	}
- }
- 
- static void
-Index: debian-kernel-hppa-2.6.8/drivers/video/console/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/video/console/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/video/console/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -6,7 +6,7 @@
- 
- config VGA_CONSOLE
- 	bool "VGA text console" if EMBEDDED || !X86
--	depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K
-+	depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC
- 	default y
- 	help
- 	  Saying Y here will allow you to use Linux in text mode through a
-@@ -67,7 +67,7 @@
- #  bool 'IODC console' CONFIG_IODC_CONSOLE
- config STI_CONSOLE
-         tristate "STI text console" 
--        depends on PARISC
-+        depends on PARISC && FRAMEBUFFER_CONSOLE
-         default y
-         help
-           The STI console is the builtin display/keyboard on HP-PARISC
-Index: debian-kernel-hppa-2.6.8/drivers/video/stifb.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/drivers/video/stifb.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/drivers/video/stifb.c	2005-03-24 01:16:08.000000000 -0500
-@@ -1379,6 +1379,7 @@
- stifb_init(void)
- {
- 	struct sti_struct *sti;
-+	struct sti_struct *def_sti;
- 	int i;
- 	
- 	if (stifb_disabled) {
-@@ -1386,9 +1387,19 @@
- 		return -ENXIO;
- 	}
- 	
-+	def_sti = sti_get_rom(0);
-+	if (def_sti) {
-+		for (i = 1; i < MAX_STI_ROMS; i++) {
-+			sti = sti_get_rom(i);
-+			if (sti == def_sti && bpp > 0)
-+				stifb_force_bpp[i] = bpp;
-+		}
-+		stifb_init_fb(def_sti, stifb_force_bpp[i]);
-+	}
-+
- 	for (i = 1; i < MAX_STI_ROMS; i++) {
- 		sti = sti_get_rom(i);
--		if (!sti)
-+		if (!sti || sti==def_sti)
- 			break;
- 		if (bpp > 0)
- 			stifb_force_bpp[i] = bpp;
-Index: debian-kernel-hppa-2.6.8/fs/smbfs/inode.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/fs/smbfs/inode.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/fs/smbfs/inode.c	2005-03-24 01:16:08.000000000 -0500
-@@ -558,6 +558,7 @@
- 
- 	mnt->ttl = SMB_TTL_DEFAULT;
- 	if (ver == SMB_MOUNT_OLDVERSION) {
-+#ifdef CONFIG_UID16
- 		mnt->version = oldmnt->version;
- 
- 		SET_UID(mnt->uid, oldmnt->uid);
-@@ -567,6 +568,9 @@
- 		mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
- 
- 		mnt->flags = (oldmnt->file_mode >> 9);
-+#else
-+		goto out_bad_option;
-+#endif
- 	} else {
- 		if (parse_options(mnt, raw_data))
- 			goto out_bad_option;
-Index: debian-kernel-hppa-2.6.8/include/asm-generic/compat_signal.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/asm-generic/compat_signal.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,25 @@
-+#ifndef _ASM_GENERIC_COMPAT_SIGNAL_H
-+#define _ASM_GENERIC_COMPAT_SIGNAL_H
-+
-+#ifndef __ASSEMBLY__
-+#include <linux/compat.h>
-+
-+typedef compat_uptr_t compat_sighandler_t;
-+
-+typedef struct compat_sigaltstack {
-+	compat_uptr_t ss_sp;
-+	compat_int_t ss_flags;
-+	compat_size_t ss_size;
-+} compat_stack_t;
-+
-+/* Most things should be clean enough to redefine this at will, if care
-+   is taken to make libc match.  */
-+
-+struct compat_sigaction {
-+	compat_sighandler_t sa_handler;
-+	compat_uint_t sa_flags;
-+	compat_sigset_t sa_mask;		/* mask last for extensibility */
-+};
-+
-+#endif /* !__ASSEMBLY__ */
-+#endif /* !_ASM_GENERIC_COMPAT_SIGNAL_H */
-Index: debian-kernel-hppa-2.6.8/include/asm-ia64/compat.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-ia64/compat.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-ia64/compat.h	2005-03-24 01:16:08.000000000 -0500
-@@ -27,6 +27,7 @@
- typedef s32		compat_daddr_t;
- typedef u32		compat_caddr_t;
- typedef __kernel_fsid_t	compat_fsid_t;
-+typedef s32		compat_timer_t;
- 
- typedef s32		compat_int_t;
- typedef s32		compat_long_t;
-Index: debian-kernel-hppa-2.6.8/include/asm-ia64/compat_siginfo.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/asm-ia64/compat_siginfo.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,2 @@
-+/* We use the generic compat struct */
-+#include <asm-generic/compat_siginfo.h>
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/assembly.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/assembly.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/assembly.h	2005-03-24 01:16:08.000000000 -0500
-@@ -27,8 +27,10 @@
- #define LDREGX  ldd,s
- #define LDREGM	ldd,mb
- #define STREGM	std,ma
-+#define SHRREG  shrd
- #define RP_OFFSET	16
- #define FRAME_SIZE	128
-+#define CALLEE_SAVE_FRAME_SIZE	144
- #else
- #define LDREG	ldw
- #define STREG	stw
-@@ -37,12 +39,19 @@
- #define STREGM	stwm
- #define RP_OFFSET	20
- #define FRAME_SIZE	64
-+#define CALLEE_SAVE_FRAME_SIZE	128
- #endif
- 
- #ifdef CONFIG_PA20
- #define BL		b,l
-+# ifdef CONFIG_PARISC64
-+#  define LEVEL		2.0w
-+# else
-+#  define LEVEL		2.0
-+# endif
- #else
- #define BL		bl
-+#define LEVEL		1.1
- #endif
- 
- #ifdef __ASSEMBLY__
-@@ -292,7 +301,7 @@
- 
- #ifdef __LP64__
- 	.macro	callee_save
--	std,ma	  %r3,	144(%r30)
-+	std,ma	  %r3,	CALLEE_SAVE_FRAME_SIZE(%r30)
- 	mfctl	  %cr27, %r3
- 	std	  %r4,	-136(%r30)
- 	std	  %r5,	-128(%r30)
-@@ -330,13 +339,13 @@
- 	ldd	-128(%r30),    %r5
- 	ldd	-136(%r30),    %r4
- 	mtctl	%r3, %cr27
--	ldd,mb	-144(%r30),    %r3
-+	ldd,mb	-CALLEE_SAVE_FRAME_SIZE(%r30),    %r3
- 	.endm
- 
- #else /* ! __LP64__ */
- 
- 	.macro	callee_save
--	stw,ma	 %r3,	128(%r30)
-+	stw,ma	 %r3,	CALLEE_SAVE_FRAME_SIZE(%r30)
- 	mfctl	 %cr27, %r3
- 	stw	 %r4,	-124(%r30)
- 	stw	 %r5,	-120(%r30)
-@@ -374,7 +383,7 @@
- 	ldw	-120(%r30),   %r5
- 	ldw	-124(%r30),   %r4
- 	mtctl	%r3, %cr27
--	ldw,mb	-128(%r30),   %r3
-+	ldw,mb	-CALLEE_SAVE_FRAME_SIZE(%r30),   %r3
- 	.endm
- #endif /* ! __LP64__ */
- 
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/atomic.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/atomic.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/atomic.h	2005-03-24 01:16:08.000000000 -0500
-@@ -14,10 +14,9 @@
-  */
- 
- #ifdef CONFIG_SMP
-+#include <asm/spinlock.h>
- #include <asm/cache.h>		/* we use L1_CACHE_BYTES */
- 
--typedef spinlock_t atomic_lock_t;
--
- /* Use an array of spinlocks for our atomic_ts.
-  * Hash function to index into a different SPINLOCK.
-  * Since "a" is usually an address, use one spinlock per cacheline.
-@@ -25,44 +24,35 @@
- #  define ATOMIC_HASH_SIZE 4
- #  define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
- 
--extern atomic_lock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
-+extern spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
- 
--static inline void atomic_spin_lock(atomic_lock_t *a)
--{
--	while (__ldcw(a) == 0)
--		while (a->lock[0] == 0);
--}
-+/* Can't use _raw_spin_lock_irq because of #include problems, so
-+ * this is the substitute */
-+#define _atomic_spin_lock_irqsave(l,f) do {	\
-+	spinlock_t *s = ATOMIC_HASH(l);		\
-+	local_irq_save(f);			\
-+	_raw_spin_lock(s);			\
-+} while(0)
-+
-+#define _atomic_spin_unlock_irqrestore(l,f) do {	\
-+	spinlock_t *s = ATOMIC_HASH(l);			\
-+	_raw_spin_unlock(s);				\
-+	local_irq_restore(f);				\
-+} while(0)
- 
--static inline void atomic_spin_unlock(atomic_lock_t *a)
--{
--	a->lock[0] = 1;
--}
- 
- #else
--#  define ATOMIC_HASH_SIZE 1
--#  define ATOMIC_HASH(a)	(0)
--#  define atomic_spin_lock(x) (void)(x)
--#  define atomic_spin_unlock(x) do { } while(0)
-+#  define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
-+#  define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
- #endif
- 
--/* copied from <linux/spinlock.h> and modified */
--#define atomic_spin_lock_irqsave(lock, flags)	do { 	\
--	local_irq_save(flags);				\
--	atomic_spin_lock(lock); 			\
--} while (0)
--
--#define atomic_spin_unlock_irqrestore(lock, flags) do {	\
--	atomic_spin_unlock(lock);			\
--	local_irq_restore(flags);			\
--} while (0)
--
- /* Note that we need not lock read accesses - aligned word writes/reads
-  * are atomic, so a reader never sees unconsistent values.
-  *
-  * Cache-line alignment would conflict with, for example, linux/module.h
-  */
- 
--typedef struct { volatile long counter; } atomic_t;
-+typedef struct { volatile int counter; } atomic_t;
- 
- 
- /* This should get optimized out since it's never called.
-@@ -150,22 +140,22 @@
- {
- 	int ret;
- 	unsigned long flags;
--	atomic_spin_lock_irqsave(ATOMIC_HASH(v), flags);
-+	_atomic_spin_lock_irqsave(v, flags);
- 
- 	ret = (v->counter += i);
- 
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
-+	_atomic_spin_unlock_irqrestore(v, flags);
- 	return ret;
- }
- 
- static __inline__ void atomic_set(atomic_t *v, int i) 
- {
- 	unsigned long flags;
--	atomic_spin_lock_irqsave(ATOMIC_HASH(v), flags);
-+	_atomic_spin_lock_irqsave(v, flags);
- 
- 	v->counter = i;
- 
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
-+	_atomic_spin_unlock_irqrestore(v, flags);
- }
- 
- static __inline__ int atomic_read(const atomic_t *v)
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/bitops.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/bitops.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/bitops.h	2005-03-24 01:16:08.000000000 -0500
-@@ -38,9 +38,9 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	*addr |= mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- }
- 
- static __inline__ void __set_bit(int nr, volatile unsigned long * address)
-@@ -61,9 +61,9 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	*addr &= ~mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- }
- 
- static __inline__ void __clear_bit(unsigned long nr, volatile unsigned long * address)
-@@ -84,9 +84,9 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	*addr ^= mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- }
- 
- static __inline__ void __change_bit(int nr, volatile unsigned long * address)
-@@ -108,10 +108,10 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	oldbit = (*addr & mask) ? 1 : 0;
- 	*addr |= mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- 
- 	return oldbit;
- }
-@@ -139,10 +139,10 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	oldbit = (*addr & mask) ? 1 : 0;
- 	*addr &= ~mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- 
- 	return oldbit;
- }
-@@ -170,10 +170,10 @@
- 
- 	addr += (nr >> SHIFT_PER_LONG);
- 	mask = 1L << CHOP_SHIFTCOUNT(nr);
--	atomic_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_lock_irqsave(addr, flags);
- 	oldbit = (*addr & mask) ? 1 : 0;
- 	*addr ^= mask;
--	atomic_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
-+	_atomic_spin_unlock_irqrestore(addr, flags);
- 
- 	return oldbit;
- }
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/pci.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/pci.h	2005-03-24 01:16:00.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/pci.h	2005-03-24 01:16:08.000000000 -0500
-@@ -150,16 +150,25 @@
- #endif
- 
- /*
--** used by drivers/pci/pci.c:pci_do_scan_bus()
--**   0 == check if bridge is numbered before re-numbering.
--**   1 == pci_do_scan_bus() should automatically number all PCI-PCI bridges.
--**
--** REVISIT:
--**   To date, only alpha sets this to one. We'll need to set this
--**   to zero for legacy platforms and one for PAT platforms.
--*/
--#define pcibios_assign_all_busses()     (pdc_type == PDC_TYPE_PAT)
--#define pcibios_scan_all_fns(a, b)	0
-+ * pcibios_assign_all_busses() is used in drivers/pci/pci.c:pci_do_scan_bus()
-+ *   0 == check if bridge is numbered before re-numbering.
-+ *   1 == pci_do_scan_bus() should automatically number all PCI-PCI bridges.
-+ *
-+ *   We *should* set this to zero for "legacy" platforms and one
-+ *   for PAT platforms.
-+ *
-+ *   But legacy platforms also need to *re*-enumerate the busses below
-+ *   a Host Bus controller.  Adding a 4-port Tulip card under dino (bus 0)
-+ *   in a C200 resulted in the secondary bus being enumerated to 1.
-+ *   The second PCI host bus controller (cujo) had been enumerated by
-+ *   firmware as bus 1 and sysfs complained.
-+ *
-+ *   The firmware is correct since the second controller is a seperate
-+ *   PCI domain.  This problem could have been fixed by making dino
-+ *   support use seperate PCI domains but this is alot simpler/easier.
-+ */
-+#define pcibios_assign_all_busses()     (1)
-+#define pcibios_scan_all_fns(a, b)	(0)
- 
- #define PCIBIOS_MIN_IO          0x10
- #define PCIBIOS_MIN_MEM         0x1000 /* NBPG - but pci/setup-res.c dies */
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/pdc.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/pdc.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/pdc.h	2005-03-24 01:16:08.000000000 -0500
-@@ -754,6 +754,7 @@
- int pdc_iodc_getc(void);
- void pdc_iodc_putc(unsigned char c);
- void pdc_iodc_outc(unsigned char c);
-+void pdc_printf(const char *fmt, ...);
- 
- void pdc_emergency_unlock(void);
- int pdc_sti_call(unsigned long func, unsigned long flags,
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/posix_types.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/posix_types.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/posix_types.h	2005-03-24 01:16:08.000000000 -0500
-@@ -15,7 +15,7 @@
- typedef unsigned int		__kernel_uid_t;
- typedef unsigned int		__kernel_gid_t;
- typedef int			__kernel_suseconds_t;
--typedef int			__kernel_clock_t;
-+typedef long			__kernel_clock_t;
- typedef int			__kernel_timer_t;
- typedef int			__kernel_clockid_t;
- typedef int			__kernel_daddr_t;
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/ptrace.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/ptrace.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/ptrace.h	2005-03-24 01:16:08.000000000 -0500
-@@ -46,7 +46,8 @@
- #ifdef __KERNEL__
- 
- /* XXX should we use iaoq[1] or iaoq[0] ? */
--#define user_mode(regs)			(((regs)->iaoq[0] &  3) ? 1 : 0)
-+#define user_mode(regs)			(((regs)->iaoq[0] & 3) ? 1 : 0)
-+#define user_space(regs)		(((regs)->iasq[0] != 0) ? 1 : 0)
- #define instruction_pointer(regs)	((regs)->iaoq[0] & ~3)
- extern void show_regs(struct pt_regs *);
- #endif
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/spinlock.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/spinlock.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/spinlock.h	2005-03-24 01:16:08.000000000 -0500
-@@ -27,21 +27,35 @@
- 
- static inline void _raw_spin_lock(spinlock_t *x)
- {
--	volatile unsigned int *a = __ldcw_align(x);
-+	volatile unsigned int *a;
-+
-+	mb();
-+	a = __ldcw_align(x);
- 	while (__ldcw(a) == 0)
- 		while (*a == 0);
-+	mb();
- }
- 
- static inline void _raw_spin_unlock(spinlock_t *x)
- {
--	volatile unsigned int *a = __ldcw_align(x);
-+	volatile unsigned int *a;
-+	mb();
-+	a = __ldcw_align(x);
- 	*a = 1;
-+	mb();
- }
- 
- static inline int _raw_spin_trylock(spinlock_t *x)
- {
--	volatile unsigned int *a = __ldcw_align(x);
--	return __ldcw(a) != 0;
-+	volatile unsigned int *a;
-+	int ret;
-+
-+	mb();
-+	a = __ldcw_align(x);
-+        ret = __ldcw(a) != 0;
-+	mb();
-+
-+	return ret;
- }
- 	
- #define spin_lock_own(LOCK, LOCATION)	((void)0)
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/system.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/system.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/system.h	2005-03-24 01:16:08.000000000 -0500
-@@ -80,7 +80,7 @@
- #define mtctl(gr, cr) \
- 	__asm__ __volatile__("mtctl %0,%1" \
- 		: /* no outputs */ \
--		: "r" (gr), "i" (cr))
-+		: "r" (gr), "i" (cr) : "memory")
- 
- /* these are here to de-mystefy the calling code, and to provide hooks */
- /* which I needed for debugging EIEM problems -PB */
-@@ -102,7 +102,7 @@
- #define mtsp(gr, cr) \
- 	__asm__ __volatile__("mtsp %0,%1" \
- 		: /* no outputs */ \
--		: "r" (gr), "i" (cr))
-+		: "r" (gr), "i" (cr) : "memory")
- 
- 
- /*
-@@ -154,7 +154,7 @@
-    for the semaphore.  */
- #define __PA_LDCW_ALIGNMENT 16
- #define __ldcw_align(a) ({ \
--  unsigned long __ret = (unsigned long) a;                     		\
-+  unsigned long __ret = (unsigned long) &(a)->lock[0];        		\
-   __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) & ~(__PA_LDCW_ALIGNMENT - 1); \
-   (volatile unsigned int *) __ret;                                      \
- })
-@@ -184,4 +184,22 @@
- 
- #define KERNEL_START (0x10100000 - 0x1000)
- 
-+/* This is for the serialisation of PxTLB broadcasts.  At least on the
-+ * N class systems, only one PxTLB inter processor broadcast can be
-+ * active at any one time on the Merced bus.  This tlb purge
-+ * synchronisation is fairly lightweight and harmless so we activate
-+ * it on all SMP systems not just the N class. */
-+#ifdef CONFIG_SMP
-+extern spinlock_t pa_tlb_lock;
-+
-+#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
-+#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
-+
-+#else
-+
-+#define purge_tlb_start(x) do { } while(0)
-+#define purge_tlb_end(x) do { } while (0)
-+
-+#endif
-+
- #endif
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/thread_info.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/thread_info.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/thread_info.h	2005-03-24 01:16:08.000000000 -0500
-@@ -18,12 +18,15 @@
- 
- #define INIT_THREAD_INFO(tsk)			\
- {						\
--	task:		&tsk,			\
--	exec_domain:	&default_exec_domain,	\
--	flags:		0,			\
--	cpu:		0,			\
--	addr_limit:	KERNEL_DS,		\
--	preempt_count:	0,			\
-+	.task		= &tsk,			\
-+	.exec_domain	= &default_exec_domain,	\
-+	.flags		= 0,			\
-+	.cpu		= 0,			\
-+	.addr_limit	= KERNEL_DS,		\
-+	.preempt_count	= 0,			\
-+  	.restart_block	= {			\
-+		.fn = do_no_restart_syscall	\
-+	}					\
- }
- 
- #define init_thread_info        (init_thread_union.thread_info)
-Index: debian-kernel-hppa-2.6.8/include/asm-parisc/tlbflush.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/asm-parisc/tlbflush.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/asm-parisc/tlbflush.h	2005-03-24 01:16:08.000000000 -0500
-@@ -51,9 +51,12 @@
- {
- 	/* For one page, it's not worth testing the split_tlb variable */
- 
-+	mb();
- 	mtsp(vma->vm_mm->context,1);
-+	purge_tlb_start();
- 	pdtlb(addr);
- 	pitlb(addr);
-+	purge_tlb_end();
- }
- 
- static inline void flush_tlb_range(struct vm_area_struct *vma,
-@@ -61,6 +64,7 @@
- {
- 	unsigned long npages;
- 
-+	
- 	npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
- 	if (npages >= 512)  /* XXX arbitrary, should be tuned */
- 		flush_tlb_all();
-@@ -68,16 +72,20 @@
- 
- 		mtsp(vma->vm_mm->context,1);
- 		if (split_tlb) {
-+			purge_tlb_start();
- 			while (npages--) {
- 				pdtlb(start);
- 				pitlb(start);
- 				start += PAGE_SIZE;
- 			}
-+			purge_tlb_end();
- 		} else {
-+			purge_tlb_start();
- 			while (npages--) {
- 				pdtlb(start);
- 				start += PAGE_SIZE;
- 			}
-+			purge_tlb_end();
- 		}
- 	}
- }
-Index: debian-kernel-hppa-2.6.8/include/linux/compat.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/linux/compat.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/linux/compat.h	2005-03-24 01:16:08.000000000 -0500
-@@ -6,10 +6,16 @@
-  */
- #include <linux/config.h>
- 
--#ifdef CONFIG_COMPAT
-+#ifndef CONFIG_COMPAT
-+
-+/* Non-native task requiring compat... doesn't exist */
-+#define is_compat_task(x) 0
-+
-+#else
- 
- #include <linux/stat.h>
- #include <linux/param.h>	/* for HZ */
-+#include <linux/personality.h>  /* Conditional process compat */
- #include <linux/sem.h>
- 
- #include <asm/compat.h>
-@@ -18,6 +24,11 @@
- #define compat_jiffies_to_clock_t(x)	\
- 		(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
- 
-+/* Non-native task requiring compat */
-+#ifndef HAVE_ARCH_IS_COMPAT_TASK
-+#define is_compat_task(x) (personality(x->personality) == PER_LINUX32)
-+#endif
-+	
- struct compat_itimerspec { 
- 	struct compat_timespec it_interval;
- 	struct compat_timespec it_value;
-@@ -86,27 +97,6 @@
- 	char		d_name[256];
- };
- 
--typedef union compat_sigval {
--	compat_int_t	sival_int;
--	compat_uptr_t	sival_ptr;
--} compat_sigval_t;
--
--typedef struct compat_sigevent {
--	compat_sigval_t sigev_value;
--	compat_int_t sigev_signo;
--	compat_int_t sigev_notify;
--	union {
--		compat_int_t _pad[SIGEV_PAD_SIZE];
--		compat_int_t _tid;
--
--		struct {
--			compat_uptr_t _function;
--			compat_uptr_t _attribute;
--		} _sigev_thread;
--	} _sigev_un;
--} compat_sigevent_t;
--
--
- long compat_sys_semctl(int first, int second, int third, void __user *uptr);
- long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
- long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
-Index: debian-kernel-hppa-2.6.8/include/linux/compat_siginfo.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/linux/compat_siginfo.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,178 @@
-+#ifndef _ASM_GENERIC_COMPAT_SIGINFO_H
-+#define _ASM_GENERIC_COMPAT_SIGINFO_H
-+
-+#include <linux/config.h>
-+#include <linux/compat.h>
-+
-+#ifndef CONFIG_COMPAT
-+
-+/* No compatibility layer required, add empty definitions for the compiler */
-+
-+typedef struct compat_siginfo{
-+} compat_siginfo_t;
-+
-+static inline int compat_copy_siginfo_to_user(compat_siginfo_t __user *to, 
-+						struct siginfo *from)
-+{
-+	return -1;
-+}
-+
-+static inline int compat_copy_siginfo_from_user(struct siginfo *to,
-+                                                compat_siginfo_t __user *from)
-+{
-+        return -1;
-+}
-+
-+#else
-+
-+#include <linux/compiler.h>
-+#include <asm/siginfo.h>
-+
-+/* compat view of sigval_t */
-+typedef union compat_sigval {
-+	compat_int_t sival_int;
-+	compat_uptr_t sival_ptr;
-+} compat_sigval_t;
-+
-+/*
-+ * This is the size (including padding) of the part of the
-+ * struct siginfo that is before the union.
-+ */
-+#ifndef __ARCH_SI_COMPAT_PREAMBLE_SIZE
-+#define __ARCH_SI_COMPAT_PREAMBLE_SIZE	(3 * sizeof(compat_int_t))
-+#endif
-+
-+#define SI_COMPAT_MAX_SIZE	128
-+#ifndef SI_COMPAT_PAD_SIZE
-+#define SI_COMPAT_PAD_SIZE \
-+  ((SI_COMPAT_MAX_SIZE - __ARCH_SI_COMPAT_PREAMBLE_SIZE) / sizeof(compat_int_t))
-+#endif
-+
-+/* 32-bit view of si.uid_t */
-+#ifndef __ARCH_SI_COMPAT_UID_T
-+#define __ARCH_SI_COMPAT_UID_T compat_uid_t
-+#endif
-+
-+/* 32-bit view of si.band_t */
-+#ifndef __ARCH_SI_COMPAT_BAND_T
-+#define __ARCH_SI_COMPAT_BAND_T compat_int_t
-+#endif
-+
-+#ifndef HAVE_ARCH_COMPAT_SIGINFO_T
-+
-+/* Compat view of siginfo_t */
-+typedef struct compat_siginfo {
-+	compat_int_t si_signo;
-+	compat_int_t si_errno;
-+	compat_int_t si_code;
-+
-+	union {
-+		compat_int_t _pad[SI_COMPAT_PAD_SIZE];
-+
-+		/* kill() */
-+		struct {
-+			compat_pid_t _pid;	/* sender's pid */
-+			__ARCH_SI_COMPAT_UID_T _uid;	/* sender's uid */
-+		} _kill;
-+
-+		/* POSIX.1b timers */
-+		struct {
-+			compat_timer_t _tid;	/* timer id */
-+			compat_int_t _overrun;		/* overrun count */
-+			char _pad[sizeof(__ARCH_SI_COMPAT_UID_T) - sizeof(compat_int_t)];
-+			compat_sigval_t _sigval;	/* same as below */
-+			compat_int_t _sys_private;       /* not to be passed to user */
-+		} _timer;
-+
-+		/* POSIX.1b signals */
-+		struct {
-+			compat_pid_t _pid;		/* sender's pid */
-+			__ARCH_SI_COMPAT_UID_T _uid;	/* sender's uid */
-+			compat_sigval_t _sigval;
-+		} _rt;
-+
-+		/* SIGCHLD */
-+		struct {
-+			compat_pid_t _pid;		/* which child */
-+			__ARCH_SI_COMPAT_UID_T _uid;	/* sender's uid */
-+			compat_int_t _status;		/* exit code */
-+			compat_clock_t _utime;
-+			compat_clock_t _stime;
-+		} _sigchld;
-+
-+		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
-+		struct {
-+			compat_uptr_t _addr; /* faulting insn/memory ref. */
-+#ifdef __ARCH_SI_COMPAT_TRAPNO
-+			compat_int_t _trapno;	/* TRAP # which caused the signal */
-+#endif
-+		} _sigfault;
-+
-+		/* SIGPOLL */
-+		struct {
-+			__ARCH_SI_COMPAT_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
-+			compat_int_t _fd;
-+		} _sigpoll;
-+	} _sifields;
-+} compat_siginfo_t;
-+#endif /* !HAVE_ARCH_COMPAT_SIGINFO_T */
-+
-+#ifdef __ARCH_SI_COMPAT_TRAPNO
-+#define si_trapno	_sifields._sigfault._trapno
-+#endif
-+
-+/*
-+ * sigevent definitions
-+ * 
-+ * It seems likely that SIGEV_THREAD will have to be handled from 
-+ * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
-+ * thread manager then catches and does the appropriate nonsense.
-+ * However, everything is written out here so as to not get lost.
-+ */
-+
-+#define SIGEV_COMPAT_MAX_SIZE	64
-+#ifndef SIGEV_COMPAT_PAD_SIZE
-+#define SIGEV_COMPAT_PAD_SIZE	((SIGEV_COMPAT_MAX_SIZE/sizeof(int)) - 3)
-+#endif
-+
-+#ifndef HAVE_ARCH_COMPAT_SIGEVENT_T
-+
-+/* 32-bit view of sigevent_t */
-+typedef struct compat_sigevent {
-+	compat_sigval_t sigev_value;
-+	compat_int_t sigev_signo;
-+	compat_int_t sigev_notify;
-+	union {
-+		compat_int_t _pad[SIGEV_COMPAT_PAD_SIZE];
-+		compat_int_t _tid;
-+
-+		struct {
-+			compat_uptr_t _function;
-+			compat_uptr_t _attribute;	/* really pthread_attr_t */
-+		} _sigev_thread;
-+	} _sigev_un;
-+} compat_sigevent_t;
-+
-+#endif /* HAVE_ARCH_COMPAT_SIGEVENT_T */
-+
-+#ifndef HAVE_ARCH_COMPAT_COPY_SIGINFO
-+
-+#include <linux/string.h>
-+
-+static inline void compat_copy_siginfo(struct compat_siginfo *to, struct compat_siginfo *from)
-+{
-+	if (from->si_code < 0)
-+		memcpy(to, from, sizeof(*to));
-+	else
-+		/* _sigchld is currently the largest know union member */
-+		memcpy(to, from, __ARCH_SI_COMPAT_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
-+}
-+
-+#endif /* !HAVE_ARCH_COMPAT_COPY_SIGINFO */
-+
-+extern int compat_copy_siginfo_to_user(compat_siginfo_t __user *to, struct siginfo *from);
-+extern int compat_copy_siginfo_from_user(struct siginfo *to, compat_siginfo_t __user *from);
-+
-+#endif /* CONFIG_COMPAT */
-+#endif /* _ASM_GENERIC_COMPAT_SIGINFO_H */
-+
-Index: debian-kernel-hppa-2.6.8/include/linux/console.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/linux/console.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/linux/console.h	2005-03-24 01:16:08.000000000 -0500
-@@ -84,6 +84,7 @@
- #define CON_PRINTBUFFER	(1)
- #define CON_CONSDEV	(2) /* Last on the command line */
- #define CON_ENABLED	(4)
-+#define CON_BOOT	(8)
- 
- struct console
- {
-Index: debian-kernel-hppa-2.6.8/include/linux/hil.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/linux/hil.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,483 @@
-+#ifndef _HIL_H_
-+#define _HIL_H_
-+
-+/*
-+ * Hewlett Packard Human Interface Loop (HP-HIL) Protocol -- header.
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ * A note of thanks to HP for providing and shipping reference materials
-+ * free of charge to help in the development of HIL support for Linux.
-+ *
-+ */
-+
-+#include <asm/types.h>
-+
-+/* Physical constants relevant to raw loop/device timing. 
-+ */ 
-+
-+#define HIL_CLOCK		8MHZ
-+#define HIL_EK1_CLOCK		30HZ
-+#define HIL_EK2_CLOCK		60HZ
-+
-+#define HIL_TIMEOUT_DEV         5	/* ms */
-+#define HIL_TIMEOUT_DEVS	10	/* ms */
-+#define HIL_TIMEOUT_NORESP	10	/* ms */
-+#define HIL_TIMEOUT_DEVS_DATA	16	/* ms */
-+#define HIL_TIMEOUT_SELFTEST	200	/* ms */
-+
-+
-+/* Actual wire line coding.  These will only be useful if someone is 
-+ * implementing a software MLC to run HIL devices on a non-parisc machine.
-+ */
-+
-+#define HIL_WIRE_PACKET_LEN	15
-+enum hil_wire_bitpos {
-+	HIL_WIRE_START		= 0,
-+	HIL_WIRE_ADDR2,
-+	HIL_WIRE_ADDR1,
-+	HIL_WIRE_ADDR0,
-+	HIL_WIRE_COMMAND,
-+	HIL_WIRE_DATA7,
-+	HIL_WIRE_DATA6,
-+	HIL_WIRE_DATA5,
-+	HIL_WIRE_DATA4,
-+	HIL_WIRE_DATA3,
-+	HIL_WIRE_DATA2,
-+	HIL_WIRE_DATA1,
-+	HIL_WIRE_DATA0,
-+	HIL_WIRE_PARITY,
-+	HIL_WIRE_STOP
-+};
-+
-+/* HP documentation uses these bit positions to refer to commands;
-+ * we will call these "packets".
-+ */
-+enum hil_pkt_bitpos {
-+	HIL_PKT_CMD		= 0x00000800,
-+	HIL_PKT_ADDR2		= 0x00000400,
-+	HIL_PKT_ADDR1		= 0x00000200,
-+	HIL_PKT_ADDR0		= 0x00000100,
-+	HIL_PKT_ADDR_MASK	= 0x00000700,
-+	HIL_PKT_ADDR_SHIFT	= 8,
-+	HIL_PKT_DATA7		= 0x00000080,
-+	HIL_PKT_DATA6		= 0x00000040,
-+	HIL_PKT_DATA5		= 0x00000020,
-+	HIL_PKT_DATA4		= 0x00000010,
-+	HIL_PKT_DATA3		= 0x00000008,
-+	HIL_PKT_DATA2		= 0x00000004,
-+	HIL_PKT_DATA1		= 0x00000002,
-+	HIL_PKT_DATA0		= 0x00000001,
-+	HIL_PKT_DATA_MASK	= 0x000000FF,
-+	HIL_PKT_DATA_SHIFT	= 0
-+};
-+
-+/* The HIL MLC also has several error/status/control bits.  We extend the 
-+ * "packet" to include these when direct access to the MLC is available,
-+ * or emulate them in cases where they are not available. 
-+ *
-+ * This way the device driver knows that the underlying MLC driver
-+ * has had to deal with loop errors.
-+ */
-+enum hil_error_bitpos {
-+	HIL_ERR_OB	= 0x00000800, /* MLC is busy sending an auto-poll, 
-+					 or we have filled up the output 
-+					 buffer and must wait. */
-+	HIL_ERR_INT	= 0x00010000, /* A normal interrupt has occurred. */
-+	HIL_ERR_NMI	= 0x00020000, /* An NMI has occurred. */
-+	HIL_ERR_LERR	= 0x00040000, /* A poll didn't come back. */
-+	HIL_ERR_PERR	= 0x01000000, /* There was a Parity Error. */
-+	HIL_ERR_FERR	= 0x02000000, /* There was a Framing Error. */
-+	HIL_ERR_FOF	= 0x04000000  /* Input FIFO Overflowed. */
-+};
-+
-+enum hil_control_bitpos {
-+	HIL_CTRL_TEST	= 0x00010000,
-+	HIL_CTRL_IPF	= 0x00040000,
-+	HIL_CTRL_APE	= 0x02000000
-+};
-+
-+/* Bits 30,31 are unused, we use them to control write behavior. */
-+#define HIL_DO_ALTER_CTRL  0x40000000 /* Write MSW of packet to control 
-+                                          before writing LSW to loop */
-+#define HIL_CTRL_ONLY      0xc0000000 /* *Only* alter the control registers */
-+
-+/* This gives us a 32-bit "packet" 
-+ */
-+typedef u32 hil_packet;
-+
-+
-+/* HIL Loop commands 
-+ */
-+enum hil_command {
-+	HIL_CMD_IFC	= 0x00,	/* Interface Clear */
-+	HIL_CMD_EPT	= 0x01,	/* Enter Pass-Thru Mode */
-+	HIL_CMD_ELB	= 0x02,	/* Enter Loop-Back Mode */
-+	HIL_CMD_IDD	= 0x03,	/* Identify and Describe */
-+	HIL_CMD_DSR	= 0x04,	/* Device Soft Reset */
-+	HIL_CMD_PST	= 0x05,	/* Perform Self Test */
-+	HIL_CMD_RRG	= 0x06,	/* Read Register */
-+	HIL_CMD_WRG	= 0x07,	/* Write Register */
-+	HIL_CMD_ACF	= 0x08,	/* Auto Configure */
-+	HIL_CMDID_ACF	= 0x07,	/* Auto Configure bits with incremented ID */
-+	HIL_CMD_POL	= 0x10,	/* Poll */
-+	HIL_CMDCT_POL	= 0x0f,	/* Poll command bits with item count  */
-+	HIL_CMD_RPL	= 0x20,	/* RePoll */
-+	HIL_CMDCT_RPL	= 0x0f,	/* RePoll command bits with item count */
-+	HIL_CMD_RNM	= 0x30,	/* Report Name */
-+	HIL_CMD_RST	= 0x31,	/* Report Status */
-+	HIL_CMD_EXD	= 0x32,	/* Extended Describe */
-+	HIL_CMD_RSC	= 0x33,	/* Report Security Code */
-+
-+	/* 0x34 to 0x3c reserved for future use  */
-+
-+	HIL_CMD_DKA	= 0x3d,	/* Disable Keyswitch Autorepeat */
-+	HIL_CMD_EK1	= 0x3e,	/* Enable Keyswitch Autorepeat 1 */
-+	HIL_CMD_EK2	= 0x3f,	/* Enable Keyswitch Autorepeat 2 */
-+	HIL_CMD_PR1	= 0x40,	/* Prompt1 */  
-+	HIL_CMD_PR2	= 0x41,	/* Prompt2 */
-+	HIL_CMD_PR3	= 0x42,	/* Prompt3 */
-+	HIL_CMD_PR4	= 0x43,	/* Prompt4 */
-+	HIL_CMD_PR5	= 0x44,	/* Prompt5 */
-+	HIL_CMD_PR6	= 0x45,	/* Prompt6 */
-+	HIL_CMD_PR7	= 0x46,	/* Prompt7 */
-+	HIL_CMD_PRM	= 0x47,	/* Prompt (General Purpose) */
-+	HIL_CMD_AK1	= 0x48,	/* Acknowlege1 */  
-+	HIL_CMD_AK2	= 0x49,	/* Acknowlege2 */
-+	HIL_CMD_AK3	= 0x4a,	/* Acknowlege3 */
-+	HIL_CMD_AK4	= 0x4b,	/* Acknowlege4 */
-+	HIL_CMD_AK5	= 0x4c,	/* Acknowlege5 */
-+	HIL_CMD_AK6	= 0x4d,	/* Acknowlege6 */
-+	HIL_CMD_AK7	= 0x4e,	/* Acknowlege7 */
-+	HIL_CMD_ACK	= 0x4f,	/* Acknowlege (General Purpose) */
-+
-+	/* 0x50 to 0x78 reserved for future use  */
-+	/* 0x80 to 0xEF device-specific commands */
-+	/* 0xf0 to 0xf9 reserved for future use  */
-+
-+	HIL_CMD_RIO	= 0xfa,	/* Register I/O Error */
-+	HIL_CMD_SHR	= 0xfb,	/* System Hard Reset */
-+	HIL_CMD_TER	= 0xfc,	/* Transmission Error */
-+	HIL_CMD_CAE	= 0xfd,	/* Configuration Address Error */
-+	HIL_CMD_DHR	= 0xfe,	/* Device Hard Reset */
-+
-+	/* 0xff is prohibited from use. */
-+};
-+
-+
-+/* 
-+ * Response "records" to HIL commands
-+ */
-+
-+/* Device ID byte 
-+ */
-+#define HIL_IDD_DID_TYPE_MASK		0xe0	/* Primary type bits */
-+#define HIL_IDD_DID_TYPE_KB_INTEGRAL	0xa0	/* Integral keyboard */
-+#define HIL_IDD_DID_TYPE_KB_ITF		0xc0	/* ITD keyboard */
-+#define HIL_IDD_DID_TYPE_KB_RSVD	0xe0	/* Reserved keyboard type */
-+#define HIL_IDD_DID_TYPE_KB_LANG_MASK	0x1f	/* Keyboard locale bits */
-+#define HIL_IDD_DID_KBLANG_USE_ESD	0x00	/* Use ESD Locale instead */
-+#define HIL_IDD_DID_TYPE_ABS		0x80    /* Absolute Positioners */
-+#define HIL_IDD_DID_ABS_RSVD1_MASK	0xf8	/* Reserved */
-+#define HIL_IDD_DID_ABS_RSVD1		0x98
-+#define HIL_IDD_DID_ABS_TABLET_MASK	0xf8	/* Tablets and digitizers */
-+#define HIL_IDD_DID_ABS_TABLET		0x90
-+#define HIL_IDD_DID_ABS_TSCREEN_MASK	0xfc	/* Touch screens */
-+#define HIL_IDD_DID_ABS_TSCREEN		0x8c
-+#define HIL_IDD_DID_ABS_RSVD2_MASK	0xfc	/* Reserved */
-+#define HIL_IDD_DID_ABS_RSVD2		0x88
-+#define HIL_IDD_DID_ABS_RSVD3_MASK	0xfc	/* Reserved */
-+#define HIL_IDD_DID_ABS_RSVD3		0x80
-+#define HIL_IDD_DID_TYPE_REL		0x60    /* Relative Positioners */
-+#define HIL_IDD_DID_REL_RSVD1_MASK	0xf0	/* Reserved */
-+#define HIL_IDD_DID_REL_RSVD1		0x70
-+#define HIL_IDD_DID_REL_RSVD2_MASK	0xfc	/* Reserved */
-+#define HIL_IDD_DID_REL_RSVD2		0x6c
-+#define HIL_IDD_DID_REL_MOUSE_MASK	0xfc	/* Mouse */
-+#define HIL_IDD_DID_REL_MOUSE		0x68
-+#define HIL_IDD_DID_REL_QUAD_MASK	0xf8	/* Other Quadrature Devices */
-+#define HIL_IDD_DID_REL_QUAD		0x60
-+#define HIL_IDD_DID_TYPE_CHAR		0x40    /* Character Entry */
-+#define HIL_IDD_DID_CHAR_BARCODE_MASK	0xfc	/* Barcode Reader */
-+#define HIL_IDD_DID_CHAR_BARCODE	0x5c
-+#define HIL_IDD_DID_CHAR_RSVD1_MASK	0xfc	/* Reserved */
-+#define HIL_IDD_DID_CHAR_RSVD1		0x58
-+#define HIL_IDD_DID_CHAR_RSVD2_MASK	0xf8	/* Reserved */
-+#define HIL_IDD_DID_CHAR_RSVD2		0x50
-+#define HIL_IDD_DID_CHAR_RSVD3_MASK	0xf0	/* Reserved */
-+#define HIL_IDD_DID_CHAR_RSVD3		0x40
-+#define HIL_IDD_DID_TYPE_OTHER		0x20    /* Miscellaneous */
-+#define HIL_IDD_DID_OTHER_RSVD1_MASK	0xf0	/* Reserved */
-+#define HIL_IDD_DID_OTHER_RSVD1		0x30
-+#define HIL_IDD_DID_OTHER_BARCODE_MASK	0xfc	/* Tone Generator */
-+#define HIL_IDD_DID_OTHER_BARCODE	0x2c
-+#define HIL_IDD_DID_OTHER_RSVD2_MASK	0xfc	/* Reserved */
-+#define HIL_IDD_DID_OTHER_RSVD2		0x28
-+#define HIL_IDD_DID_OTHER_RSVD3_MASK	0xf8	/* Reserved */
-+#define HIL_IDD_DID_OTHER_RSVD3		0x20
-+#define HIL_IDD_DID_TYPE_KEYPAD		0x00	/* Vectra Keyboard */
-+
-+/* IDD record header 
-+ */
-+#define HIL_IDD_HEADER_AXSET_MASK	0x03    /* Number of axis in a set */
-+#define HIL_IDD_HEADER_RSC		0x04	/* Supports RSC command */
-+#define HIL_IDD_HEADER_EXD		0x08	/* Supports EXD command */
-+#define HIL_IDD_HEADER_IOD		0x10	/* IOD byte to follow */
-+#define HIL_IDD_HEADER_16BIT		0x20	/* 16 (vs. 8) bit resolution */
-+#define HIL_IDD_HEADER_ABS		0x40	/* Reports Absolute Position */
-+#define HIL_IDD_HEADER_2X_AXIS		0x80	/* Two sets of 1-3 axis */
-+
-+/* I/O Descriptor
-+ */
-+#define HIL_IDD_IOD_NBUTTON_MASK	0x07	/* Number of buttons */
-+#define HIL_IDD_IOD_PROXIMITY		0x08	/* Proximity in/out events */
-+#define HIL_IDD_IOD_PROMPT_MASK		0x70	/* Number of prompts/acks */
-+#define HIL_IDD_IOD_PROMPT_SHIFT	4
-+#define HIL_IDD_IOD_PROMPT		0x80	/* Generic prompt/ack */
-+
-+#define HIL_IDD_NUM_AXES_PER_SET(header_packet) \
-+((header_packet) & HIL_IDD_HEADER_AXSET_MASK)
-+
-+#define HIL_IDD_NUM_AXSETS(header_packet) \
-+(2 - !((header_packet) & HIL_IDD_HEADER_2X_AXIS))
-+
-+#define HIL_IDD_LEN(header_packet) \
-+((4 - !(header_packet & HIL_IDD_HEADER_IOD) -			\
-+  2 * !(HIL_IDD_NUM_AXES_PER_SET(header_packet))) +		\
-+  2 * HIL_IDD_NUM_AXES_PER_SET(header_packet) *			\
-+ !!((header_packet) & HIL_IDD_HEADER_ABS))
-+
-+/* The following HIL_IDD_* macros assume you have an array of 
-+ * packets and/or unpacked 8-bit data in the order that they 
-+ * were received.
-+ */
-+
-+#define HIL_IDD_AXIS_COUNTS_PER_M(header_ptr) \
-+(!(HIL_IDD_NUM_AXSETS(*(header_ptr))) ? -1 :			\
-+(((*(header_ptr + 1) & HIL_PKT_DATA_MASK) +			\
-+  ((*(header_ptr + 2) & HIL_PKT_DATA_MASK)) << 8)		\
-+* ((*(header_ptr) & HIL_IDD_HEADER_16BIT) ? 100 : 1)))
-+
-+#define HIL_IDD_AXIS_MAX(header_ptr, __axnum) \
-+((!(*(header_ptr) & HIL_IDD_HEADER_ABS) ||			\
-+  (HIL_IDD_NUM_AXES_PER_SET(*(header_ptr)) <= __axnum)) ? 0 :	\
-+ ((HIL_PKT_DATA_MASK & *((header_ptr) + 3 + 2 * __axnum)) +	\
-+  ((HIL_PKT_DATA_MASK & *((header_ptr) + 4 + 2 * __axnum)) << 8)))
-+
-+#define HIL_IDD_IOD(header_ptr) \
-+(*(header_ptr + HIL_IDD_LEN((*header_ptr)) - 1))
-+
-+#define HIL_IDD_HAS_GEN_PROMPT(header_ptr) \
-+((*header_ptr & HIL_IDD_HEADER_IOD) &&				\
-+ (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROMPT))
-+
-+#define HIL_IDD_HAS_GEN_PROXIMITY(header_ptr) \
-+((*header_ptr & HIL_IDD_HEADER_IOD) &&				\
-+ (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROXIMITY))
-+
-+#define HIL_IDD_NUM_BUTTONS(header_ptr) \
-+((*header_ptr & HIL_IDD_HEADER_IOD) ?				\
-+ (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NBUTTON_MASK) : 0)
-+
-+#define HIL_IDD_NUM_PROMPTS(header_ptr) \
-+((*header_ptr & HIL_IDD_HEADER_IOD) ?				\
-+ ((HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NPROMPT_MASK)		\
-+  >> HIL_IDD_IOD_PROMPT_SHIFT) : 0)
-+
-+/* The response to HIL EXD commands -- the "extended describe record" */
-+#define	HIL_EXD_HEADER_WRG		0x03	/* Supports type2 WRG */
-+#define HIL_EXD_HEADER_WRG_TYPE1	0x01	/* Supports type1 WRG */
-+#define	HIL_EXD_HEADER_WRG_TYPE2	0x02	/* Supports type2 WRG */
-+#define	HIL_EXD_HEADER_RRG		0x04	/* Supports RRG command */
-+#define	HIL_EXD_HEADER_RNM		0x10	/* Supports RNM command */
-+#define HIL_EXD_HEADER_RST		0x20	/* Supports RST command */
-+#define HIL_EXD_HEADER_LOCALE		0x40	/* Contains locale code */
-+
-+#define HIL_EXD_NUM_RRG(header_ptr) \
-+((*header_ptr & HIL_EXD_HEADER_RRG) ? \
-+ (*(header_ptr + 1) & HIL_PKT_DATA_MASK) : 0)
-+
-+#define HIL_EXD_NUM_WWG(header_ptr) \
-+((*header_ptr & HIL_EXD_HEADER_WRG) ?				\
-+ (*(header_ptr + 2 - !(*header_ptr & HIL_EXD_HEADER_RRG)) &	\
-+    HIL_PKT_DATA_MASK) : 0)
-+
-+#define HIL_EXD_LEN(header_ptr) \
-+(!!(*header_ptr & HIL_EXD_HEADER_RRG) +				\
-+ !!(*header_ptr & HIL_EXD_HEADER_WRG) +				\
-+ !!(*header_ptr & HIL_EXD_HEADER_LOCALE) +			\
-+ 2 * !!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) + 1)
-+
-+#define HIL_EXD_LOCALE(header_ptr) \
-+(!(*header_ptr & HIL_EXD_HEADER_LOCALE) ? -1 :			\
-+ (*(header_ptr + HIL_EXD_LEN(header_ptr) - 1) & HIL_PKT_DATA_MASK))
-+
-+#define HIL_EXD_WRG_TYPE2_LEN(header_ptr) \
-+(!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) ? -1	:			\
-+ (*(header_ptr + HIL_EXD_LEN(header_ptr) - 2 -                  	\
-+    !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) +	\
-+ ((*(header_ptr + HIL_EXD_LEN(header_ptr) - 1 -				\
-+     !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) << 8))
-+
-+/* Device locale codes. */ 
-+
-+/* Last defined locale code.  Everything above this is "Reserved",
-+   and note that this same table applies to the Device ID Byte where 
-+   keyboards may have a nationality code which is only 5 bits. */
-+#define HIL_LOCALE_MAX 0x1f
-+
-+/* Map to hopefully useful strings.  I was trying to make these look
-+   like locale.aliases strings do; maybe that isn't the right table to
-+   emulate.  In either case, I didn't have much to work on. */
-+#define HIL_LOCALE_MAP \
-+"",			/* 0x00 Reserved */		\
-+"",			/* 0x01 Reserved */		\
-+"",			/* 0x02 Reserved */		\
-+"swiss.french",		/* 0x03 Swiss/French */		\
-+"portuguese",		/* 0x04 Portuguese */		\
-+"arabic",		/* 0x05 Arabic */		\
-+"hebrew",		/* 0x06 Hebrew */		\
-+"english.canadian",	/* 0x07 Canadian English */	\
-+"turkish",		/* 0x08 Turkish */		\
-+"greek",		/* 0x09 Greek */		\
-+"thai",			/* 0x0a Thai (Thailand) */	\
-+"italian",		/* 0x0b Italian */		\
-+"korean",		/* 0x0c Hangul (Korea) */	\
-+"dutch",		/* 0x0d Dutch */		\
-+"swedish",		/* 0x0e Swedish */		\
-+"german",		/* 0x0f German */		\
-+"chinese",		/* 0x10 Chinese-PRC */		\
-+"chinese",		/* 0x11 Chinese-ROC */		\
-+"swiss.french",		/* 0x12 Swiss/French II */	\
-+"spanish",		/* 0x13 Spanish */		\
-+"swiss.german",		/* 0x14 Swiss/German II */	\
-+"flemish",		/* 0x15 Belgian (Flemish) */	\
-+"finnish",		/* 0x16 Finnish	*/		\
-+"english.uk",		/* 0x17 United Kingdom */	\
-+"french.canadian",	/* 0x18 French/Canadian */	\
-+"swiss.german",		/* 0x19 Swiss/German */		\
-+"norwegian",		/* 0x1a Norwegian */		\
-+"french",		/* 0x1b French */		\
-+"danish",		/* 0x1c Danish */		\
-+"japanese",		/* 0x1d Katakana */		\
-+"spanish",		/* 0x1e Latin American/Spanish*/\
-+"english.us"		/* 0x1f United States */	\
-+
-+
-+/* HIL keycodes */
-+#define HIL_KEYCODES_SET1_TBLSIZE 128
-+#define HIL_KEYCODES_SET1 	\
-+   KEY_5,		KEY_RESERVED,	KEY_RIGHTALT,	KEY_LEFTALT,	\
-+   KEY_RIGHTSHIFT,	KEY_LEFTSHIFT,	KEY_LEFTCTRL,	KEY_SYSRQ,	\
-+   KEY_KP4,		KEY_KP8,	KEY_KP5,	KEY_KP9,	\
-+   KEY_KP6,		KEY_KP7,	KEY_KPCOMMA,	KEY_KPENTER,	\
-+   KEY_KP1,		KEY_KPSLASH,	KEY_KP2,	KEY_KPPLUS,	\
-+   KEY_KP3,		KEY_KPASTERISK,	KEY_KP0,	KEY_KPMINUS,	\
-+   KEY_B,		KEY_V,		KEY_C,		KEY_X,		\
-+   KEY_Z,		KEY_RESERVED,	KEY_RESERVED,   KEY_ESC,	\
-+   KEY_6,		KEY_F10,	KEY_3,		KEY_F11,	\
-+   KEY_KPDOT,		KEY_F9,		KEY_TAB /*KP*/,	KEY_F12,	\
-+   KEY_H,		KEY_G,		KEY_F,		KEY_D,		\
-+   KEY_S,		KEY_A,		KEY_RESERVED,	KEY_CAPSLOCK,	\
-+   KEY_U,		KEY_Y,		KEY_T,		KEY_R,		\
-+   KEY_E,		KEY_W,		KEY_Q,		KEY_TAB,	\
-+   KEY_7,		KEY_6,		KEY_5,		KEY_4,		\
-+   KEY_3,		KEY_2,		KEY_1,		KEY_GRAVE,	\
-+   KEY_F13,		KEY_F14,	KEY_F15,	KEY_F16,	\
-+   KEY_F17,		KEY_F18,	KEY_F19,	KEY_F20,	\
-+   KEY_MENU,		KEY_F4,		KEY_F3,		KEY_F2,		\
-+   KEY_F1,		KEY_VOLUMEUP,	KEY_STOP,	KEY_SENDFILE,	\
-+   KEY_SYSRQ,		KEY_F5,		KEY_F6,		KEY_F7,		\
-+   KEY_F8,		KEY_VOLUMEDOWN,	KEY_DEL_EOL,	KEY_DEL_EOS,	\
-+   KEY_8,		KEY_9,		KEY_0,		KEY_MINUS,	\
-+   KEY_EQUAL,		KEY_BACKSPACE,	KEY_INS_LINE,	KEY_DEL_LINE,	\
-+   KEY_I,		KEY_O,		KEY_P,		KEY_LEFTBRACE,	\
-+   KEY_RIGHTBRACE,	KEY_BACKSLASH,	KEY_INSERT,	KEY_DELETE,	\
-+   KEY_J,		KEY_K,		KEY_L,		KEY_SEMICOLON,	\
-+   KEY_APOSTROPHE,	KEY_ENTER,	KEY_HOME,	KEY_PAGEUP,	\
-+   KEY_M,		KEY_COMMA,	KEY_DOT,	KEY_SLASH,	\
-+   KEY_RESERVED,	KEY_SELECT,	KEY_RESERVED,	KEY_PAGEDOWN,	\
-+   KEY_N,		KEY_SPACE,	KEY_NEXT,	KEY_RESERVED,	\
-+   KEY_LEFT,		KEY_DOWN,	KEY_UP,		KEY_RIGHT
-+
-+
-+#define HIL_KEYCODES_SET3_TBLSIZE 128
-+#define HIL_KEYCODES_SET3 	\
-+  KEY_RESERVED,	KEY_ESC,	KEY_1,		KEY_2,			\
-+  KEY_3,	KEY_4,		KEY_5,		KEY_6,			\
-+  KEY_7,	KEY_8,		KEY_9,		KEY_0,			\
-+  KEY_MINUS,	KEY_EQUAL,	KEY_BACKSPACE,	KEY_TAB,		\
-+  KEY_Q,	KEY_W,		KEY_E,		KEY_R,			\
-+  KEY_T,	KEY_Y,		KEY_U,		KEY_I,			\
-+  KEY_O,	KEY_P,		KEY_LEFTBRACE,	KEY_RIGHTBRACE,		\
-+  KEY_ENTER,	KEY_LEFTCTRL,	KEY_A,		KEY_S,			\
-+  KEY_D,	KEY_F,		KEY_G,		KEY_H,			\
-+  KEY_J,	KEY_K,		KEY_L,		KEY_SEMICOLON,		\
-+  KEY_APOSTROPHE,KEY_GRAVE,	KEY_LEFTSHIFT,	KEY_BACKSLASH,		\
-+  KEY_Z,	KEY_X,		KEY_C,		KEY_V,			\
-+  KEY_B,	KEY_N,		KEY_M,		KEY_COMMA,		\
-+  KEY_DOT,	KEY_SLASH,	KEY_RIGHTSHIFT,	KEY_KPASTERISK,		\
-+  KEY_LEFTALT,	KEY_SPACE,	KEY_CAPSLOCK,	KEY_F1,			\
-+  KEY_F2,	KEY_F3,		KEY_F4,		KEY_F5,			\
-+  KEY_F6,	KEY_F7,		KEY_F8,		KEY_F9,			\
-+  KEY_F10,	KEY_NUMLOCK,	KEY_SCROLLLOCK,	KEY_KP7,		\
-+  KEY_KP8,	KEY_KP9,	KEY_KPMINUS,	KEY_KP4,		\
-+  KEY_KP5,	KEY_KP6,	KEY_KPPLUS,	KEY_KP1,		\
-+  KEY_KP2,	KEY_KP3,	KEY_KP0,	KEY_KPDOT,		\
-+  KEY_SYSRQ,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,		\
-+  KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,		\
-+  KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,		\
-+  KEY_UP,	KEY_LEFT,	KEY_DOWN,	KEY_RIGHT,		\
-+  KEY_HOME,	KEY_PAGEUP,	KEY_END,	KEY_PAGEDOWN,		\
-+  KEY_INSERT,	KEY_DELETE,	KEY_102ND,	KEY_RESERVED,		\
-+  KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,		\
-+  KEY_F1,	KEY_F2,		KEY_F3,		KEY_F4,			\
-+  KEY_F5,	KEY_F6,		KEY_F7,		KEY_F8,			\
-+  KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,		\
-+  KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED,	KEY_RESERVED
-+
-+
-+/* Response to POL command, the "poll record header" */
-+
-+#define HIL_POL_NUM_AXES_MASK	0x03	/* Number of axis reported */
-+#define HIL_POL_CTS		0x04	/* Device ready to receive data */
-+#define HIL_POL_STATUS_PENDING	0x08	/* Device has status to report */
-+#define HIL_POL_CHARTYPE_MASK	0x70	/* Type of character data to follow */
-+#define HIL_POL_CHARTYPE_NONE	0x00	/* No character data to follow */
-+#define HIL_POL_CHARTYPE_RSVD1	0x10	/* Reserved Set 1 */
-+#define HIL_POL_CHARTYPE_ASCII	0x20	/* U.S. ASCII */
-+#define HIL_POL_CHARTYPE_BINARY	0x30	/* Binary data */
-+#define HIL_POL_CHARTYPE_SET1	0x40	/* Keycode Set 1 */
-+#define HIL_POL_CHARTYPE_RSVD2	0x50	/* Reserved Set 2 */
-+#define HIL_POL_CHARTYPE_SET2	0x60	/* Keycode Set 2 */
-+#define HIL_POL_CHARTYPE_SET3	0x70	/* Keycode Set 3 */
-+#define HIL_POL_AXIS_ALT	0x80	/* Data is from axis set 2 */
-+
-+
-+#endif /* _HIL_H_ */
-Index: debian-kernel-hppa-2.6.8/include/linux/hil_mlc.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/linux/hil_mlc.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,171 @@
-+/*
-+ * HP Human Interface Loop Master Link Controller driver.
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ */
-+
-+#include <linux/hil.h>
-+#include <linux/time.h>
-+#include <linux/interrupt.h>
-+#include <asm/semaphore.h>
-+#include <linux/serio.h>
-+#include <linux/list.h>
-+
-+typedef struct hil_mlc hil_mlc;
-+
-+/* The HIL has a complicated state engine.
-+ * We define the structure of nodes in the state engine here.
-+ */
-+enum hilse_act {
-+  	/* HILSE_OUT prepares to receive input if the next node
-+	 * is an IN or EXPECT, and then sends the given packet.
-+	 */
-+	HILSE_OUT = 0,
-+
-+  	/* HILSE_CTS checks if the loop is busy. */
-+	HILSE_CTS,
-+
-+	/* HILSE_OUT_LAST sends the given command packet to 
-+	 * the last configured/running device on the loop.
-+	 */
-+	HILSE_OUT_LAST,
-+
-+	/* HILSE_OUT_DISC sends the given command packet to
-+	 * the next device past the last configured/running one.
-+	 */
-+	HILSE_OUT_DISC,
-+
-+	/* HILSE_FUNC runs a callback function with given arguments.
-+	 * a positive return value causes the "ugly" branch to be taken.
-+	 */
-+	HILSE_FUNC,
-+
-+  	/* HILSE_IN simply expects any non-errored packet to arrive 
-+	 * within arg usecs.
-+	 */
-+	HILSE_IN		= 0x100,
-+
-+  	/* HILSE_EXPECT expects a particular packet to arrive 
-+	 * within arg usecs, any other packet is considered an error.
-+	 */
-+	HILSE_EXPECT,
-+
-+  	/* HILSE_EXPECT_LAST as above but dev field should be last 
-+	 * discovered/operational device.
-+	 */
-+	HILSE_EXPECT_LAST,
-+
-+  	/* HILSE_EXPECT_LAST as above but dev field should be first 
-+	 * undiscovered/inoperational device.
-+	 */
-+	HILSE_EXPECT_DISC
-+};
-+
-+typedef int	(hilse_func) (hil_mlc *mlc, int arg);
-+struct hilse_node {
-+	enum hilse_act		act;	/* How to process this node         */
-+	union {
-+		hilse_func	*func;	/* Function to call if HILSE_FUNC   */
-+		hil_packet	packet;	/* Packet to send or to compare     */
-+	} object;
-+	int			arg;	/* Timeout in usec or parm for func */
-+	int			good;	/* Node to jump to on success       */
-+	int			bad;	/* Node to jump to on error         */
-+	int			ugly;	/* Node to jump to on timeout       */
-+};
-+
-+/* Methods for back-end drivers, e.g. hp_sdc_mlc */
-+typedef int	(hil_mlc_cts) (hil_mlc *mlc);
-+typedef void	(hil_mlc_out) (hil_mlc *mlc);
-+typedef int	(hil_mlc_in)  (hil_mlc *mlc, suseconds_t timeout);
-+
-+struct hil_mlc_devinfo {
-+	uint8_t	idd[16];	/* Device ID Byte and Describe Record */
-+	uint8_t	rsc[16];	/* Security Code Header and Record */
-+	uint8_t	exd[16];	/* Extended Describe Record */
-+	uint8_t	rnm[16];	/* Device name as returned by RNM command */
-+};
-+
-+struct hil_mlc_serio_map {
-+	hil_mlc *mlc;
-+	int di_revmap;
-+	int didx;
-+};
-+
-+/* How many (possibly old/detached) devices the we try to keep track of */
-+#define HIL_MLC_DEVMEM 16
-+
-+struct hil_mlc {
-+	struct list_head	list;	/* hil_mlc is organized as linked list */
-+
-+	rwlock_t		lock;
-+
-+	void *priv; /* Data specific to a particular type of MLC */
-+
-+	int 			seidx;	/* Current node in state engine */
-+	int			istarted, ostarted;
-+
-+	hil_mlc_cts		*cts;
-+	struct semaphore	csem;   /* Raised when loop idle */
-+
-+	hil_mlc_out		*out;
-+	struct semaphore	osem;   /* Raised when outpacket dispatched */
-+	hil_packet		opacket;
-+
-+	hil_mlc_in		*in;
-+	struct semaphore	isem;   /* Raised when a packet arrives */
-+	hil_packet		ipacket[16];
-+	hil_packet		imatch;
-+	int			icount;
-+	struct timeval		instart;
-+	suseconds_t		intimeout;
-+
-+	int			ddi;	/* Last operational device id */
-+	int			lcv;	/* LCV to throttle loops */
-+	struct timeval		lcv_tv; /* Time loop was started */
-+
-+	int			di_map[7]; /* Maps below items to live devs */
-+	struct hil_mlc_devinfo	di[HIL_MLC_DEVMEM];
-+	struct serio		serio[HIL_MLC_DEVMEM];
-+	struct hil_mlc_serio_map serio_map[HIL_MLC_DEVMEM];
-+	hil_packet		serio_opacket[HIL_MLC_DEVMEM];
-+	int			serio_oidx[HIL_MLC_DEVMEM];
-+	struct hil_mlc_devinfo	di_scratch; /* Temporary area */
-+
-+	void			(*inc_use_count)(void);
-+	void			(*dec_use_count)(void);
-+
-+	int			opercnt;
-+
-+	struct tasklet_struct	*tasklet;
-+};
-+
-+int hil_mlc_register(hil_mlc *mlc);
-+int hil_mlc_unregister(hil_mlc *mlc);
-Index: debian-kernel-hppa-2.6.8/include/linux/hp_sdc.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/include/linux/hp_sdc.h	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,300 @@
-+/*
-+ * HP i8042 System Device Controller -- header
-+ *
-+ * Copyright (c) 2001 Brian S. Julin
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions, and the following disclaimer,
-+ *    without modification.
-+ * 2. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * Alternatively, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL").
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
-+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ *
-+ * References:
-+ * 
-+ * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
-+ *
-+ * System Device Controller Microprocessor Firmware Theory of Operation
-+ * 	for Part Number 1820-4784 Revision B.  Dwg No. A-1820-4784-2
-+ *
-+ */
-+
-+#ifndef _LINUX_HP_SDC_H
-+#define _LINUX_HP_SDC_H
-+
-+#include <linux/interrupt.h>
-+#include <linux/types.h>
-+#include <linux/time.h>
-+#include <linux/timer.h>
-+#if defined(__hppa__)
-+#include <asm/hardware.h>
-+#endif
-+
-+
-+/* No 4X status reads take longer than this (in usec).
-+ */
-+#define HP_SDC_MAX_REG_DELAY 20000
-+
-+typedef void (hp_sdc_irqhook) (int irq, void *dev_id, 
-+			       uint8_t status, uint8_t data);
-+
-+int hp_sdc_request_timer_irq(hp_sdc_irqhook *callback);
-+int hp_sdc_request_hil_irq(hp_sdc_irqhook *callback);
-+int hp_sdc_request_cooked_irq(hp_sdc_irqhook *callback);
-+int hp_sdc_release_timer_irq(hp_sdc_irqhook *callback);
-+int hp_sdc_release_hil_irq(hp_sdc_irqhook *callback);
-+int hp_sdc_release_cooked_irq(hp_sdc_irqhook *callback);
-+
-+typedef struct {
-+	int actidx;	/* Start of act.  Acts are atomic WRT I/O to SDC */
-+	int idx;	/* Index within the act */
-+	int endidx;	/* transaction is over and done if idx == endidx */
-+	uint8_t *seq;	/* commands/data for the transaction */
-+	union {
-+	  hp_sdc_irqhook   *irqhook;	/* Callback, isr or tasklet context */
-+	  struct semaphore *semaphore;	/* Semaphore to sleep on. */
-+	} act;
-+} hp_sdc_transaction;
-+int hp_sdc_enqueue_transaction(hp_sdc_transaction *this);
-+int hp_sdc_dequeue_transaction(hp_sdc_transaction *this);
-+
-+/* The HP_SDC_ACT* values are peculiar to this driver.
-+ * Nuance: never HP_SDC_ACT_DATAIN | HP_SDC_ACT_DEALLOC, use another
-+ * act to perform the dealloc.
-+ */
-+#define HP_SDC_ACT_PRECMD	0x01		/* Send a command first */
-+#define HP_SDC_ACT_DATAREG	0x02		/* Set data registers */
-+#define HP_SDC_ACT_DATAOUT	0x04		/* Send data bytes */
-+#define HP_SDC_ACT_POSTCMD      0x08            /* Send command after */
-+#define HP_SDC_ACT_DATAIN	0x10		/* Collect data after */
-+#define HP_SDC_ACT_DURING	0x1f
-+#define HP_SDC_ACT_SEMAPHORE    0x20            /* Raise semaphore after */
-+#define HP_SDC_ACT_CALLBACK	0x40		/* Pass data to IRQ handler */
-+#define HP_SDC_ACT_DEALLOC	0x80		/* Destroy transaction after */
-+#define HP_SDC_ACT_AFTER	0xe0
-+#define HP_SDC_ACT_DEAD		0x60		/* Act timed out. */
-+
-+/* Rest of the flags are straightforward representation of the SDC interface */
-+#define HP_SDC_STATUS_IBF	0x02	/* Input buffer full */
-+
-+#define HP_SDC_STATUS_IRQMASK	0xf0	/* Bits containing "level 1" irq */
-+#define HP_SDC_STATUS_PERIODIC  0x10    /* Periodic 10ms timer */
-+#define HP_SDC_STATUS_USERTIMER 0x20    /* "Special purpose" timer */
-+#define HP_SDC_STATUS_TIMER     0x30    /* Both PERIODIC and USERTIMER */
-+#define HP_SDC_STATUS_REG	0x40	/* Data from an i8042 register */
-+#define HP_SDC_STATUS_HILCMD    0x50	/* Command from HIL MLC */
-+#define HP_SDC_STATUS_HILDATA   0x60	/* Data from HIL MLC */
-+#define HP_SDC_STATUS_PUP	0x70	/* Sucessful power-up self test */
-+#define HP_SDC_STATUS_KCOOKED	0x80	/* Key from cooked kbd */
-+#define HP_SDC_STATUS_KRPG	0xc0	/* Key from Repeat Gen */
-+#define HP_SDC_STATUS_KMOD_SUP	0x10	/* Shift key is up */
-+#define HP_SDC_STATUS_KMOD_CUP	0x20	/* Control key is up */
-+
-+#define HP_SDC_NMISTATUS_FHS	0x40	/* NMI is a fast handshake irq */
-+
-+/* Internal i8042 registers (there are more, but they are not too useful). */
-+
-+#define HP_SDC_USE		0x02	/* Resource usage (including OB bit) */
-+#define HP_SDC_IM		0x04	/* Interrupt mask */
-+#define HP_SDC_CFG		0x11	/* Configuration register */
-+#define HP_SDC_KBLANGUAGE	0x12	/* Keyboard language */
-+
-+#define HP_SDC_D0		0x70	/* General purpose data buffer 0 */
-+#define HP_SDC_D1		0x71	/* General purpose data buffer 1 */
-+#define HP_SDC_D2		0x72	/* General purpose data buffer 2 */
-+#define HP_SDC_D3		0x73	/* General purpose data buffer 3 */
-+#define HP_SDC_VT1		0x74	/* Timer for voice 1 */
-+#define HP_SDC_VT2		0x75	/* Timer for voice 2 */
-+#define HP_SDC_VT3		0x76	/* Timer for voice 3 */
-+#define HP_SDC_VT4		0x77	/* Timer for voice 4 */
-+#define HP_SDC_KBN		0x78	/* Which HIL devs are Nimitz */
-+#define HP_SDC_KBC		0x79	/* Which HIL devs are cooked kbds */
-+#define HP_SDC_LPS		0x7a	/* i8042's view of HIL status */
-+#define HP_SDC_LPC		0x7b	/* i8042's view of HIL "control" */
-+#define HP_SDC_RSV  		0x7c	/* Reserved "for testing" */
-+#define HP_SDC_LPR		0x7d    /* i8042 count of HIL reconfigs */
-+#define HP_SDC_XTD		0x7e    /* "Extended Configuration" register */
-+#define HP_SDC_STR		0x7f    /* i8042 self-test result */
-+
-+/* Bitfields for above registers */
-+#define HP_SDC_USE_LOOP		0x04	/* Command is currently on the loop. */
-+
-+#define HP_SDC_IM_MASK          0x1f    /* these bits not part of cmd/status */
-+#define HP_SDC_IM_FH		0x10	/* Mask the fast handshake irq */
-+#define HP_SDC_IM_PT		0x08	/* Mask the periodic timer irq */
-+#define HP_SDC_IM_TIMERS	0x04	/* Mask the MT/DT/CT irq */
-+#define HP_SDC_IM_RESET		0x02	/* Mask the reset key irq */
-+#define HP_SDC_IM_HIL		0x01	/* Mask the HIL MLC irq */
-+
-+#define HP_SDC_CFG_ROLLOVER	0x08	/* WTF is "N-key rollover"? */
-+#define HP_SDC_CFG_KBD		0x10	/* There is a keyboard */
-+#define HP_SDC_CFG_NEW		0x20	/* Supports/uses HIL MLC */
-+#define HP_SDC_CFG_KBD_OLD	0x03	/* keyboard code for non-HIL */
-+#define HP_SDC_CFG_KBD_NEW	0x07	/* keyboard code from HIL autoconfig */
-+#define HP_SDC_CFG_REV		0x40	/* Code revision bit */
-+#define HP_SDC_CFG_IDPROM	0x80	/* IDPROM present in kbd (not HIL) */
-+
-+#define HP_SDC_LPS_NDEV		0x07	/* # devices autoconfigured on HIL */
-+#define HP_SDC_LPS_ACSUCC	0x08	/* loop autoconfigured successfully */
-+#define HP_SDC_LPS_ACFAIL	0x80	/* last loop autoconfigure failed */
-+
-+#define HP_SDC_LPC_APE_IPF	0x01	/* HIL MLC APE/IPF (autopoll) set */
-+#define HP_SDC_LPC_ARCONERR	0x02	/* i8042 autoreconfigs loop on err */
-+#define HP_SDC_LPC_ARCQUIET	0x03	/* i8042 doesn't report autoreconfigs*/
-+#define HP_SDC_LPC_COOK		0x10	/* i8042 cooks devices in _KBN */
-+#define HP_SDC_LPC_RC		0x80	/* causes autoreconfig */
-+
-+#define HP_SDC_XTD_REV		0x07	/* contains revision code */
-+#define HP_SDC_XTD_REV_STRINGS(val, str) \
-+switch (val) {						\
-+	case 0x1: str = "1820-3712"; break;		\
-+	case 0x2: str = "1820-4379"; break;		\
-+	case 0x3: str = "1820-4784"; break;		\
-+	default: str = "unknown";			\
-+};
-+#define HP_SDC_XTD_BEEPER	0x08	/* TI SN76494 beeper available */
-+#define HP_SDC_XTD_BBRTC	0x20	/* OKI MSM-58321 BBRTC present */
-+
-+#define HP_SDC_CMD_LOAD_RT	0x31	/* Load real time (from 8042) */
-+#define HP_SDC_CMD_LOAD_FHS	0x36	/* Load the fast handshake timer */
-+#define HP_SDC_CMD_LOAD_MT	0x38	/* Load the match timer */
-+#define HP_SDC_CMD_LOAD_DT	0x3B	/* Load the delay timer */
-+#define HP_SDC_CMD_LOAD_CT	0x3E	/* Load the cycle timer */
-+
-+#define HP_SDC_CMD_SET_IM	0x40    /* 010xxxxx == set irq mask */
-+
-+/* The documents provided do not explicitly state that all registers betweem 
-+ * 0x01 and 0x1f inclusive can be read by sending their register index as a 
-+ * command, but this is implied and appears to be the case.
-+ */
-+#define HP_SDC_CMD_READ_RAM	0x00	/* Load from i8042 RAM (autoinc) */
-+#define HP_SDC_CMD_READ_USE	0x02	/* Undocumented! Load from usage reg */
-+#define HP_SDC_CMD_READ_IM	0x04	/* Load current interrupt mask */
-+#define HP_SDC_CMD_READ_KCC	0x11	/* Load primary kbd config code */
-+#define HP_SDC_CMD_READ_KLC	0x12	/* Load primary kbd language code */
-+#define HP_SDC_CMD_READ_T1	0x13	/* Load timer output buffer byte 1 */
-+#define HP_SDC_CMD_READ_T2	0x14	/* Load timer output buffer byte 1 */
-+#define HP_SDC_CMD_READ_T3	0x15	/* Load timer output buffer byte 1 */
-+#define HP_SDC_CMD_READ_T4	0x16	/* Load timer output buffer byte 1 */
-+#define HP_SDC_CMD_READ_T5	0x17	/* Load timer output buffer byte 1 */
-+#define HP_SDC_CMD_READ_D0	0xf0	/* Load from i8042 RAM location 0x70 */
-+#define HP_SDC_CMD_READ_D1	0xf1	/* Load from i8042 RAM location 0x71 */
-+#define HP_SDC_CMD_READ_D2	0xf2	/* Load from i8042 RAM location 0x72 */
-+#define HP_SDC_CMD_READ_D3	0xf3	/* Load from i8042 RAM location 0x73 */
-+#define HP_SDC_CMD_READ_VT1	0xf4	/* Load from i8042 RAM location 0x74 */
-+#define HP_SDC_CMD_READ_VT2	0xf5	/* Load from i8042 RAM location 0x75 */
-+#define HP_SDC_CMD_READ_VT3	0xf6	/* Load from i8042 RAM location 0x76 */
-+#define HP_SDC_CMD_READ_VT4	0xf7	/* Load from i8042 RAM location 0x77 */
-+#define HP_SDC_CMD_READ_KBN	0xf8	/* Load from i8042 RAM location 0x78 */
-+#define HP_SDC_CMD_READ_KBC	0xf9	/* Load from i8042 RAM location 0x79 */
-+#define HP_SDC_CMD_READ_LPS	0xfa	/* Load from i8042 RAM location 0x7a */
-+#define HP_SDC_CMD_READ_LPC	0xfb	/* Load from i8042 RAM location 0x7b */
-+#define HP_SDC_CMD_READ_RSV	0xfc	/* Load from i8042 RAM location 0x7c */
-+#define HP_SDC_CMD_READ_LPR	0xfd	/* Load from i8042 RAM location 0x7d */
-+#define HP_SDC_CMD_READ_XTD	0xfe	/* Load from i8042 RAM location 0x7e */
-+#define HP_SDC_CMD_READ_STR	0xff	/* Load from i8042 RAM location 0x7f */
-+
-+#define HP_SDC_CMD_SET_ARD	0xA0	/* Set emulated autorepeat delay */
-+#define HP_SDC_CMD_SET_ARR	0xA2	/* Set emulated autorepeat rate */
-+#define HP_SDC_CMD_SET_BELL	0xA3	/* Set voice 3 params for "beep" cmd */
-+#define HP_SDC_CMD_SET_RPGR	0xA6	/* Set "RPG" irq rate (doesn't work) */
-+#define HP_SDC_CMD_SET_RTMS	0xAD	/* Set the RTC time (milliseconds) */
-+#define HP_SDC_CMD_SET_RTD	0xAF	/* Set the RTC time (days) */
-+#define HP_SDC_CMD_SET_FHS	0xB2	/* Set fast handshake timer */
-+#define HP_SDC_CMD_SET_MT	0xB4	/* Set match timer */
-+#define HP_SDC_CMD_SET_DT	0xB7	/* Set delay timer */
-+#define HP_SDC_CMD_SET_CT	0xBA	/* Set cycle timer */
-+#define HP_SDC_CMD_SET_RAMP	0xC1	/* Reset READ_RAM autoinc counter */
-+#define HP_SDC_CMD_SET_D0	0xe0	/* Load to i8042 RAM location 0x70 */
-+#define HP_SDC_CMD_SET_D1	0xe1	/* Load to i8042 RAM location 0x71 */
-+#define HP_SDC_CMD_SET_D2	0xe2	/* Load to i8042 RAM location 0x72 */
-+#define HP_SDC_CMD_SET_D3	0xe3	/* Load to i8042 RAM location 0x73 */
-+#define HP_SDC_CMD_SET_VT1	0xe4	/* Load to i8042 RAM location 0x74 */
-+#define HP_SDC_CMD_SET_VT2	0xe5	/* Load to i8042 RAM location 0x75 */
-+#define HP_SDC_CMD_SET_VT3	0xe6	/* Load to i8042 RAM location 0x76 */
-+#define HP_SDC_CMD_SET_VT4	0xe7	/* Load to i8042 RAM location 0x77 */
-+#define HP_SDC_CMD_SET_KBN	0xe8	/* Load to i8042 RAM location 0x78 */
-+#define HP_SDC_CMD_SET_KBC	0xe9	/* Load to i8042 RAM location 0x79 */
-+#define HP_SDC_CMD_SET_LPS	0xea	/* Load to i8042 RAM location 0x7a */
-+#define HP_SDC_CMD_SET_LPC	0xeb	/* Load to i8042 RAM location 0x7b */
-+#define HP_SDC_CMD_SET_RSV	0xec	/* Load to i8042 RAM location 0x7c */
-+#define HP_SDC_CMD_SET_LPR	0xed	/* Load to i8042 RAM location 0x7d */
-+#define HP_SDC_CMD_SET_XTD	0xee	/* Load to i8042 RAM location 0x7e */
-+#define HP_SDC_CMD_SET_STR	0xef	/* Load to i8042 RAM location 0x7f */
-+
-+#define HP_SDC_CMD_DO_RTCW	0xc2	/* i8042 RAM 0x70 --> RTC */
-+#define HP_SDC_CMD_DO_RTCR	0xc3	/* RTC[0x70 0:3] --> irq/status/data */
-+#define HP_SDC_CMD_DO_BEEP	0xc4	/* i8042 RAM 0x70-74  --> beeper,VT3 */
-+#define HP_SDC_CMD_DO_HIL	0xc5	/* i8042 RAM 0x70-73 --> 
-+					   HIL MLC R0,R1 i8042 HIL watchdog */
-+
-+/* Values used to (de)mangle input/output to/from the HIL MLC */
-+#define HP_SDC_DATA		0x40	/* Data from an 8042 register */
-+#define HP_SDC_HIL_CMD		0x50	/* Data from HIL MLC R1/8042 */
-+#define HP_SDC_HIL_R1MASK	0x0f	/* Contents of HIL MLC R1 0:3 */
-+#define HP_SDC_HIL_AUTO		0x10	/* Set if POL results from i8042 */   
-+#define HP_SDC_HIL_ISERR	0x80	/* Has meaning as in next 4 values */
-+#define HP_SDC_HIL_RC_DONE	0x80	/* i8042 auto-configured loop */
-+#define HP_SDC_HIL_ERR		0x81	/* HIL MLC R2 had a bit set */
-+#define HP_SDC_HIL_TO		0x82	/* i8042 HIL watchdog expired */
-+#define HP_SDC_HIL_RC		0x84	/* i8042 is auto-configuring loop */
-+#define HP_SDC_HIL_DAT		0x60	/* Data from HIL MLC R0 */
-+
-+
-+typedef struct {
-+	rwlock_t	ibf_lock;
-+	rwlock_t	lock;		/* user/tasklet lock */
-+	rwlock_t	rtq_lock;	/* isr/tasklet lock */
-+	rwlock_t	hook_lock;	/* isr/user lock for handler add/del */
-+
-+	unsigned int	irq, nmi;	/* Our IRQ lines */
-+	unsigned long	base_io, status_io, data_io; /* Our IO ports */
-+
-+	uint8_t		im;		/* Interrupt mask */
-+	int		set_im; 	/* Interrupt mask needs to be set. */
-+
-+	int		ibf;		/* Last known status of IBF flag */
-+	uint8_t		wi;		/* current i8042 write index */
-+	uint8_t		r7[4];          /* current i8042[0x70 - 0x74] values */
-+	uint8_t		r11, r7e;	/* Values from version/revision regs */
-+
-+	hp_sdc_irqhook	*timer, *reg, *hil, *pup, *cooked;
-+
-+#define HP_SDC_QUEUE_LEN 16
-+	hp_sdc_transaction *tq[HP_SDC_QUEUE_LEN]; /* All pending read/writes */
-+
-+	int		rcurr, rqty;	/* Current read transact in process */
-+	struct timeval	rtv;		/* Time when current read started */
-+	int		wcurr;		/* Current write transact in process */
-+
-+	int		dev_err;	/* carries status from registration */
-+#if defined(__hppa__)
-+	struct parisc_device	*dev;
-+#elif defined(__mc68000__)
-+	void		*dev;
-+#else
-+#error No support for device registration on this arch yet.
-+#endif
-+
-+	struct timer_list kicker;	/* Keeps below task alive */
-+	struct tasklet_struct	task;
-+
-+} hp_i8042_sdc;
-+
-+#endif /* _LINUX_HP_SDC_H */
-Index: debian-kernel-hppa-2.6.8/include/linux/input.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/linux/input.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/linux/input.h	2005-03-24 01:16:08.000000000 -0500
-@@ -586,6 +586,7 @@
- #define BUS_ADB			0x17
- #define BUS_I2C			0x18
- #define BUS_HOST		0x19
-+#define BUS_GSC			0x1A
- 
- /*
-  * Values describing the status of an effect
-Index: debian-kernel-hppa-2.6.8/include/linux/serial_core.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/linux/serial_core.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/linux/serial_core.h	2005-03-24 01:16:08.000000000 -0500
-@@ -89,6 +89,8 @@
- /* MPC52xx type numbers */
- #define PORT_MPC52xx	59
- 
-+#define SERIAL_IRQ_NONE -1
-+
- #ifdef __KERNEL__
- 
- #include <linux/config.h>
-Index: debian-kernel-hppa-2.6.8/include/linux/signal.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/include/linux/signal.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/include/linux/signal.h	2005-03-24 01:16:08.000000000 -0500
-@@ -220,6 +220,9 @@
- extern int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie);
- #endif
- 
-+int copy_siginfo_from_user(siginfo_t *to, siginfo_t __user *from);
-+int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from);
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _LINUX_SIGNAL_H */
-Index: debian-kernel-hppa-2.6.8/ipc/compat_mq.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/ipc/compat_mq.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/ipc/compat_mq.c	2005-03-24 01:16:08.000000000 -0500
-@@ -7,6 +7,7 @@
-  */
- 
- #include <linux/compat.h>
-+#include <linux/compat_siginfo.h>
- #include <linux/fs.h>
- #include <linux/kernel.h>
- #include <linux/mqueue.h>
-Index: debian-kernel-hppa-2.6.8/kernel/compat_signal.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ debian-kernel-hppa-2.6.8/kernel/compat_signal.c	2005-03-24 01:16:08.000000000 -0500
-@@ -0,0 +1,206 @@
-+/*
-+ *  Copyright (C) 2003 Carlos O'Donell
-+ * 
-+ *  2003-12-20  Carlos O'Donell
-+ *              Copied linux/kernel/compat_signal.c (copy_siginfo_to_user)
-+ *              and modified to use compat_siginfo_t for thunking down to
-+ *              32-bit userspace from a 64-bit kernel.
-+ *              
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or (at
-+ * your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
-+ * NON INFRINGEMENT.  See the GNU General Public License for more
-+ * details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-+ *
-+ */
-+
-+#include <linux/compat_siginfo.h>
-+#include <asm/errno.h>
-+#include <asm/uaccess.h>
-+#include <asm/siginfo.h>
-+
-+#ifndef HAVE_ARCH_COMPAT_COPY_SIGINFO_TO_USER
-+
-+int compat_copy_siginfo_to_user(compat_siginfo_t __user *to, siginfo_t *from)
-+{
-+	int err;
-+	compat_siginfo_t compat_from;	
-+
-+	if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
-+		return -EFAULT;
-+	
-+	/*
-+	 * If you change compat_siginfo_t structure *or* siginfo_t, 
-+	 * please be sure this code is fixed accordingly.
-+	 * It should never copy any pad contained in the structure
-+	 * to avoid security leaks, but must copy the generic
-+	 * 3 ints plus the relevant union member.
-+	 */
-+
-+	/* Convert structure, don't leak anything in the copy */
-+	memset(&compat_from,'\0',sizeof(compat_siginfo_t));
-+
-+        /* Always copy si_signo, si_errno, and si_code */
-+	compat_from.si_signo = (compat_int_t)(from->si_signo);
-+	compat_from.si_errno = (compat_int_t)(from->si_errno);
-+	compat_from.si_code = (compat_int_t)(from->si_code);
-+        
-+	err = __put_user(compat_from.si_signo, &to->si_signo);
-+	err |= __put_user(compat_from.si_errno, &to->si_errno);
-+	err |= __put_user(compat_from.si_code, &to->si_code);
-+
-+        /* siginfo_t came from userspace, so it is the right
-+         * size, no need for conversion
-+         */        
-+	if (from->si_code < 0) {
-+		return __copy_to_user(&to->_sifields._pad, 
-+                                      &from->_sifields._pad, 
-+                                      SI_COMPAT_PAD_SIZE)
-+			? -EFAULT : 0;
-+        }
-+	
-+	switch (from->si_code & __SI_MASK) {
-+	case __SI_KILL:
-+		compat_from.si_pid = (compat_pid_t)(from->si_pid);
-+		compat_from.si_uid = (__ARCH_SI_COMPAT_UID_T)(from->si_uid);
-+		err |= __put_user(compat_from.si_pid, &to->si_pid);
-+		err |= __put_user(compat_from.si_uid, &to->si_uid);
-+		break;
-+	case __SI_TIMER:
-+		compat_from.si_pid = (compat_timer_t)(from->si_tid);
-+		compat_from.si_overrun = (compat_int_t)(from->si_overrun);
-+		compat_from.si_ptr = (compat_uptr_t)((u64)(from->si_ptr) & 0xffffffffUL);
-+		err |= __put_user(compat_from.si_tid, &to->si_tid);
-+		err |= __put_user(compat_from.si_overrun, &to->si_overrun);
-+		err |= __put_user(compat_from.si_ptr, &to->si_ptr);
-+		break;
-+	case __SI_POLL:
-+		compat_from.si_band = (__ARCH_SI_COMPAT_BAND_T)(from->si_band);
-+		compat_from.si_fd = (compat_int_t)(from->si_fd);
-+		err |= __put_user(compat_from.si_band, &to->si_band);
-+		err |= __put_user(compat_from.si_fd, &to->si_fd);
-+		break;
-+	case __SI_FAULT:
-+		compat_from.si_addr = (compat_uptr_t)((u64)(from->si_addr) & 0xffffffffUL);
-+		err |= __put_user(compat_from.si_addr, &to->si_addr);
-+#ifdef __ARCH_SI_COMPAT_TRAPNO
-+		compat_from.si_trapno = (compat_int_t)(from->si_addr);
-+		err |= __put_user(compat_from.si_trapno, &to->si_trapno);
-+#endif
-+		break;
-+	case __SI_CHLD:
-+		compat_from.si_pid = (compat_pid_t)(from->si_pid);
-+		compat_from.si_uid = (__ARCH_SI_COMPAT_UID_T)(from->si_uid);
-+		compat_from.si_status = (compat_int_t)(from->si_status);
-+		compat_from.si_utime = (compat_clock_t)(from->si_utime);
-+		compat_from.si_stime = (compat_clock_t)(from->si_stime);
-+		err |= __put_user(compat_from.si_pid, &to->si_pid);
-+		err |= __put_user(compat_from.si_uid, &to->si_uid);
-+		err |= __put_user(compat_from.si_status, &to->si_status);
-+		err |= __put_user(compat_from.si_utime, &to->si_utime);
-+		err |= __put_user(compat_from.si_stime, &to->si_stime);
-+		break;
-+	case __SI_RT: /* This is not generated by the kernel as of now. */
-+	case __SI_MESGQ: /* But this is */
-+		compat_from.si_pid = (compat_pid_t)(from->si_pid);
-+		compat_from.si_uid = (__ARCH_SI_COMPAT_UID_T)(from->si_uid);
-+		compat_from.si_int = (compat_int_t)(from->si_int);
-+		compat_from.si_ptr = (compat_uptr_t)((u64)(from->si_ptr) & 0xffffffffUL);
-+		err |= __put_user(compat_from.si_pid, &to->si_pid);
-+		err |= __put_user(compat_from.si_uid, &to->si_uid);
-+		err |= __put_user(compat_from.si_int, &to->si_int);
-+		err |= __put_user(compat_from.si_ptr, &to->si_ptr);
-+		break;
-+	default: /* this is just in case for now ... */
-+		compat_from.si_pid = (compat_pid_t)(from->si_pid);
-+		compat_from.si_uid = (__ARCH_SI_COMPAT_UID_T)(from->si_uid);
-+		err |= __put_user(compat_from.si_pid, &to->si_pid);
-+		err |= __put_user(compat_from.si_uid, &to->si_uid);
-+		break;
-+	}
-+	return err;
-+}
-+
-+int compat_copy_siginfo_from_user(siginfo_t *to, compat_siginfo_t __user *from)
-+{
-+	int err;
-+        u64 scratch;
-+
-+	if (!access_ok (VERIFY_READ, from, sizeof(compat_siginfo_t)))
-+		return -EFAULT;
-+	
-+	/*
-+	 * If you change compat_siginfo_t structure *or* siginfo_t, 
-+	 * please be sure this code is fixed accordingly.
-+	 */
-+
-+        /* Always copy si_signo, si_errno, and si_code */
-+	err = __get_user(to->si_signo, &from->si_signo);
-+	err |= __get_user(to->si_errno, &from->si_errno);
-+	err |= __get_user(to->si_code, &from->si_code);
-+        
-+        /* siginfo_t came from userspace, so it is the right
-+         * size, no need for conversion
-+         */        
-+	if (to->si_code < 0) {
-+		return __copy_from_user(&to->_sifields._pad, 
-+                                        &from->_sifields._pad, 
-+                                        SI_COMPAT_PAD_SIZE)
-+			? -EFAULT : 0;
-+        }
-+	
-+	switch (to->si_code & __SI_MASK) {
-+	case __SI_KILL:
-+		err |= __get_user(to->si_pid, &from->si_pid);
-+		err |= __get_user(to->si_uid, &from->si_uid);
-+		break;
-+	case __SI_TIMER:
-+		err |= __get_user(to->si_tid, &from->si_tid);
-+		err |= __get_user(to->si_overrun, &from->si_overrun);
-+		err |= __get_user(scratch, &from->si_ptr);
-+                to->si_ptr = (u64*)scratch;                
-+		break;
-+	case __SI_POLL:
-+		err |= __get_user(to->si_band, &from->si_band);
-+		err |= __get_user(to->si_fd, &from->si_fd);
-+		break;
-+	case __SI_FAULT:
-+		err |= __get_user(scratch, &from->si_addr);
-+                to->si_addr = (u64*)scratch;
-+#ifdef __ARCH_SI_COMPAT_TRAPNO
-+		err |= __get_user(to->si_trapno, &from->si_trapno);
-+#endif
-+		break;
-+	case __SI_CHLD:
-+		err |= __get_user(to->si_pid, &from->si_pid);
-+		err |= __get_user(to->si_uid, &from->si_uid);
-+		err |= __get_user(to->si_status, &from->si_status);
-+		err |= __get_user(to->si_utime, &from->si_utime);
-+		err |= __get_user(to->si_stime, &from->si_stime);
-+		break;
-+	case __SI_RT: /* This is not generated by the kernel as of now. */
-+	case __SI_MESGQ: /* But this is */
-+		err |= __get_user(to->si_pid, &from->si_pid);
-+		err |= __get_user(to->si_uid, &from->si_uid);
-+		err |= __get_user(to->si_int, &from->si_int);
-+		err |= __get_user(scratch, &from->si_ptr);
-+                to->si_ptr = (u64*)scratch;
-+		break;
-+	default: /* this is just in case for now ... */
-+		err |= __get_user(to->si_pid, &from->si_pid);
-+		err |= __get_user(to->si_uid, &from->si_uid);
-+		break;
-+	}
-+	return err;
-+}
-+
-+#endif
-Index: debian-kernel-hppa-2.6.8/kernel/Makefile
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/kernel/Makefile	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/kernel/Makefile	2005-03-24 01:16:08.000000000 -0500
-@@ -17,7 +17,7 @@
- obj-$(CONFIG_KALLSYMS) += kallsyms.o
- obj-$(CONFIG_PM) += power/
- obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
--obj-$(CONFIG_COMPAT) += compat.o
-+obj-$(CONFIG_COMPAT) += compat.o compat_signal.o
- obj-$(CONFIG_IKCONFIG) += configs.o
- obj-$(CONFIG_IKCONFIG_PROC) += configs.o
- obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
-Index: debian-kernel-hppa-2.6.8/kernel/printk.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/kernel/printk.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/kernel/printk.c	2005-03-24 01:16:08.000000000 -0500
-@@ -91,8 +91,8 @@
-  * must be masked before subscripting
-  */
- static unsigned long log_start;	/* Index into log_buf: next char to be read by syslog() */
--static unsigned long con_start;	/* Index into log_buf: next char to be sent to consoles */
--static unsigned long log_end;	/* Index into log_buf: most-recently-written-char + 1 */
-+unsigned long con_start;	/* Index into log_buf: next char to be sent to consoles */
-+unsigned long log_end;	/* Index into log_buf: most-recently-written-char + 1 */
- static unsigned long logged_chars; /* Number of chars produced since last read+clear operation */
- 
- /*
-@@ -775,6 +775,11 @@
- 	if (!(console->flags & CON_ENABLED))
- 		return;
- 
-+	if (console_drivers && (console_drivers->flags & CON_BOOT)) {
-+		unregister_console(console_drivers);
-+		console->flags &= ~CON_PRINTBUFFER;
-+	}
-+
- 	/*
- 	 *	Put this console in the list - keep the
- 	 *	preferred driver at the head of the list.
-Index: debian-kernel-hppa-2.6.8/kernel/ptrace.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/kernel/ptrace.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/kernel/ptrace.c	2005-03-24 01:16:08.000000000 -0500
-@@ -290,7 +290,7 @@
- {
- 	if (child->last_siginfo == NULL)
- 		return -EINVAL;
--	if (copy_from_user(child->last_siginfo, data, sizeof (siginfo_t)) != 0)
-+	if (copy_siginfo_from_user(child->last_siginfo, data) != 0)
- 		return -EFAULT;
- 	return 0;
- }
-Index: debian-kernel-hppa-2.6.8/kernel/resource.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/kernel/resource.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/kernel/resource.c	2005-03-24 01:16:08.000000000 -0500
-@@ -179,6 +179,8 @@
- {
- 	struct resource *tmp, **p;
- 
-+	BUG_ON(old->child);
-+
- 	p = &old->parent->child;
- 	for (;;) {
- 		tmp = *p;
-Index: debian-kernel-hppa-2.6.8/kernel/signal.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/kernel/signal.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/kernel/signal.c	2005-03-24 01:16:08.000000000 -0500
-@@ -21,6 +21,7 @@
- #include <linux/binfmts.h>
- #include <linux/security.h>
- #include <linux/ptrace.h>
-+#include <linux/compat_siginfo.h>
- #include <asm/param.h>
- #include <asm/uaccess.h>
- #include <asm/unistd.h>
-@@ -2024,17 +2025,35 @@
- 	return do_sigpending(set, sigsetsize);
- }
- 
-+#ifndef HAVE_ARCH_COPY_SIGINFO_FROM_USER
-+
-+int copy_siginfo_from_user(siginfo_t *to, siginfo_t __user *from)
-+{
-+        if(is_compat_task(current))
-+                return compat_copy_siginfo_from_user(to,(compat_siginfo_t __user *)from);
-+  
-+        return copy_from_user(&to, from, sizeof(siginfo_t));
-+}
-+
-+#endif
-+
- #ifndef HAVE_ARCH_COPY_SIGINFO_TO_USER
- 
- int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from)
- {
- 	int err;
-+	
-+	/* Use compat_siginfo_t with 32-bit signals */
-+	if(is_compat_task(current)){
-+		return compat_copy_siginfo_to_user((compat_siginfo_t __user *)to,from);
-+	}
- 
- 	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
- 		return -EFAULT;
- 	if (from->si_code < 0)
- 		return __copy_to_user(to, from, sizeof(siginfo_t))
- 			? -EFAULT : 0;
-+	
- 	/*
- 	 * If you change siginfo_t structure, please be sure
- 	 * this code is fixed accordingly.
-@@ -2271,7 +2290,7 @@
- {
- 	siginfo_t info;
- 
--	if (copy_from_user(&info, uinfo, sizeof(siginfo_t)))
-+	if (copy_siginfo_from_user(&info, uinfo))
- 		return -EFAULT;
- 
- 	/* Not even root can pretend to send signals from the kernel.
-Index: debian-kernel-hppa-2.6.8/mm/shmem.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/mm/shmem.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/mm/shmem.c	2005-03-24 01:16:08.000000000 -0500
-@@ -410,7 +410,7 @@
- 	return freed;
- }
- 
--static void shmem_truncate(struct inode *inode)
-+/* static gcc-3.3 OPD bug - GGG */ void shmem_truncate(struct inode *inode)
- {
- 	struct shmem_inode_info *info = SHMEM_I(inode);
- 	unsigned long idx;
-Index: debian-kernel-hppa-2.6.8/sound/oss/ad1889.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/sound/oss/ad1889.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/sound/oss/ad1889.c	2005-03-24 01:16:08.000000000 -0500
-@@ -1,5 +1,5 @@
- /*
-- *  Copyright 2001 Randolph Chung <tausq at debian.org>
-+ *  Copyright 2001-2004 Randolph Chung <tausq at debian.org>
-  *
-  *  Analog Devices 1889 PCI audio driver (AD1819 AC97-compatible codec)
-  *
-@@ -61,6 +61,7 @@
- #define AD1889_WRITEL(dev,reg,val) writel((val), dev->regbase + reg)
- 
- //now 100ms
-+/* #define WAIT_10MS()	schedule_timeout(HZ/10) */
- #define WAIT_10MS()	do { int __i; for (__i = 0; __i < 100; __i++) udelay(1000); } while(0)
- 
- /* currently only support a single device */
-@@ -69,25 +70,43 @@
- /************************* helper routines ***************************** */
- static inline void ad1889_set_wav_rate(ad1889_dev_t *dev, int rate)
- {
-+	struct ac97_codec *ac97_codec = dev->ac97_codec;
-+
-+	DBG("Setting WAV rate to %d\n", rate);
- 	dev->state[AD_WAV_STATE].dmabuf.rate = rate;
- 	AD1889_WRITEW(dev, AD_DSWAS, rate);
-+
-+	/* Cycle the DAC to enable the new rate */
-+	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0x0200);
-+	WAIT_10MS();
-+	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0);
- }
- 
- static inline void ad1889_set_adc_rate(ad1889_dev_t *dev, int rate)
- {
-+	struct ac97_codec *ac97_codec = dev->ac97_codec;
-+
-+	DBG("Setting ADC rate to %d\n", rate);
- 	dev->state[AD_ADC_STATE].dmabuf.rate = rate;
- 	AD1889_WRITEW(dev, AD_DSRES, rate);
-+
-+	/* Cycle the ADC to enable the new rate */
-+	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0x0100);
-+	WAIT_10MS();
-+	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0);
- }
- 
- static inline void ad1889_set_wav_fmt(ad1889_dev_t *dev, int fmt)
- {
- 	u16 tmp;
- 
-+	DBG("Setting WAV format to 0x%x\n", fmt);
-+
- 	tmp = AD1889_READW(ad1889_dev, AD_DSWSMC);
--	if (fmt == AFMT_S16_LE) {
-+	if (fmt & AFMT_S16_LE) {
- 		//tmp |= 0x0100; /* set WA16 */
- 		tmp |= 0x0300; /* set WA16 stereo */
--	} else if (fmt == AFMT_U8) {
-+	} else if (fmt & AFMT_U8) {
- 		tmp &= ~0x0100; /* clear WA16 */
- 	} 
- 	AD1889_WRITEW(ad1889_dev, AD_DSWSMC, tmp);
-@@ -97,10 +116,12 @@
- {
- 	u16 tmp;
- 
-+	DBG("Setting ADC format to 0x%x\n", fmt);
-+
- 	tmp = AD1889_READW(ad1889_dev, AD_DSRAMC);
--	if (fmt == AFMT_S16_LE) {
-+	if (fmt & AFMT_S16_LE) {
- 		tmp |= 0x0100; /* set WA16 */
--	} else if (fmt == AFMT_U8) {
-+	} else if (fmt & AFMT_U8) {
- 		tmp &= ~0x0100; /* clear WA16 */
- 	} 
- 	AD1889_WRITEW(ad1889_dev, AD_DSRAMC, tmp);
-@@ -133,6 +154,9 @@
- 	dmabuf->dma_len = cnt;
- 	dmabuf->ready = 1;
- 
-+	DBG("Starting playback at 0x%p for %ld bytes\n", dmabuf->rawbuf +
-+	    dmabuf->rd_ptr, dmabuf->dma_len);
-+
-         /* load up the current register set */
- 	AD1889_WRITEL(ad1889_dev, AD_DMAWAVCC, cnt);
- 	AD1889_WRITEL(ad1889_dev, AD_DMAWAVICC, cnt);
-@@ -243,7 +267,7 @@
- 		dmabuf->dma_handle = 0;
- 		dmabuf->rd_ptr = dmabuf->wr_ptr = dmabuf->dma_len = 0UL;
- 		dmabuf->ready = 0;
--		dmabuf->rate = 44100;
-+		dmabuf->rate = 48000;
- 	}
- 	return dev;
- 
-@@ -472,7 +496,6 @@
- 		long cnt = count;
- 		unsigned long flags;
- 
--
- 		for (;;) {
- 			long used_bytes;
- 			long timeout;	/* max time for DMA in jiffies */
-@@ -498,17 +521,11 @@
- 			}
- 
- 			set_current_state(TASK_INTERRUPTIBLE);
--			if (!schedule_timeout(timeout + 1))
--				printk(KERN_WARNING "AD1889 timeout(%ld) r/w %lx/%lx len %lx\n",
--				    timeout+1,
--				    dmabuf->rd_ptr, dmabuf->wr_ptr,
--				    dmabuf->dma_len);
--
-+			schedule_timeout(timeout + 1);
- 			if (signal_pending(current)) {
- 				ret = -ERESTARTSYS;
- 				goto err2;
- 			}
--
- 		}
- 
- 		/* watch out for wrapping around static buffer */
-@@ -616,6 +633,8 @@
- 	audio_buf_info abinfo;
- 	int __user *p = (int __user *)arg;
- 
-+	DBG("ad1889_ioctl cmd 0x%x arg %lu\n", cmd, arg);
-+
- 	switch (cmd)
- 	{
- 	case OSS_GETVERSION:
-@@ -674,11 +693,15 @@
- 		if (get_user(val, p))
- 			return -EFAULT;
- 
--		if (file->f_mode & FMODE_READ) 
--			ad1889_set_adc_fmt(dev, val);
-+		if (val == 0) {
-+			if (file->f_mode & FMODE_READ) 
-+				ad1889_set_adc_fmt(dev, val);
- 
--		if (file->f_mode & FMODE_WRITE) 
--			ad1889_set_wav_fmt(dev, val);
-+			if (file->f_mode & FMODE_WRITE) 
-+				ad1889_set_wav_fmt(dev, val);
-+		} else {
-+			val = AFMT_S16_LE | AFMT_U8;
-+		}
- 
- 		return put_user(val, p);
- 
-@@ -758,7 +781,7 @@
- 	
- 	file->private_data = ad1889_dev;
- 
--	ad1889_set_wav_rate(ad1889_dev, 44100);
-+	ad1889_set_wav_rate(ad1889_dev, 48000);
- 	ad1889_set_wav_fmt(ad1889_dev, AFMT_S16_LE);
- 	AD1889_WRITEW(ad1889_dev, AD_DSWADA, 0x0404); /* attenuation */
- 	return nonseekable_open(inode, file);
-@@ -938,7 +961,6 @@
- 			ad1889_stop_wav(&dev->state[AD_WAV_STATE]);	/* clean up */
- 			ad1889_start_wav(&dev->state[AD_WAV_STATE]);	/* start new */
- 		}
--
- 	}
- 
- 	if ((stat & 0x2) && dev->state[AD_ADC_STATE].dmabuf.ready) { /* ADCI */
-@@ -952,18 +974,19 @@
- 
- static void ad1889_initcfg(ad1889_dev_t *dev)
- {
--	u16 tmp;
-+	u16 tmp16;
-+	u32 tmp32;
- 
- 	/* make sure the interrupt bits are setup the way we want */
--	tmp = AD1889_READW(dev, AD_DMAWAVCTRL);
--	tmp &= ~0x00ff; /* flat dma, no sg, mask out the intr bits */
--	tmp |= 0x0004;  /* intr on count, loop */
--	AD1889_WRITEW(dev, AD_DMAWAVCTRL, tmp);
-+	tmp32 = AD1889_READL(dev, AD_DMAWAVCTRL);
-+	tmp32 &= ~0xff; /* flat dma, no sg, mask out the intr bits */
-+	tmp32 |= 0x6;  /* intr on count, loop */
-+	AD1889_WRITEL(dev, AD_DMAWAVCTRL, tmp32);
- 
- 	/* unmute... */
--	tmp = AD1889_READW(dev, AD_DSWADA);
--	tmp &= ~0x8080;
--	AD1889_WRITEW(dev, AD_DSWADA, tmp);
-+	tmp16 = AD1889_READW(dev, AD_DSWADA);
-+	tmp16 &= ~0x8080;
-+	AD1889_WRITEW(dev, AD_DSWADA, tmp16);
- }
- 
- static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
-Index: debian-kernel-hppa-2.6.8/sound/oss/ad1889.h
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/sound/oss/ad1889.h	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/sound/oss/ad1889.h	2005-03-24 01:16:08.000000000 -0500
-@@ -34,9 +34,9 @@
- #define AD_DMAWAVICC	0x98	/* WAV interrupt current count */
- #define AD_DMAWAVIBC	0x9c	/* WAV interrupt base count */
- #define AD_DMARESCTRL	0xa0	/* RES PCI control/status */
--#define AD_DMAADCCTRL	0xa8	/* RES PCI control/status */
--#define AD_DMASYNCTRL	0xb0	/* RES PCI control/status */
--#define AD_DMAWAVCTRL	0xb8	/* RES PCI control/status */
-+#define AD_DMAADCCTRL	0xa8	/* ADC PCI control/status */
-+#define AD_DMASYNCTRL	0xb0	/* SYN PCI control/status */
-+#define AD_DMAWAVCTRL	0xb8	/* WAV PCI control/status */
- #define AD_DMADISR	0xc0	/* PCI DMA intr status */
- #define AD_DMACHSS	0xc4	/* PCI DMA channel stop status */
- 
-Index: debian-kernel-hppa-2.6.8/sound/oss/harmony.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/sound/oss/harmony.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/sound/oss/harmony.c	2005-03-24 01:16:08.000000000 -0500
-@@ -12,6 +12,7 @@
- 	Copyright 2000-2003 (c) Helge Deller <deller at gmx.de>
- 	Copyright 2001 (c) Matthieu Delahaye <delahaym at esiee.fr>
- 	Copyright 2001 (c) Jean-Christophe Vaugeois <vaugeoij at esiee.fr>
-+	Copyright 2004 (c) Stuart Brady <sdbrady at ntlworld.com>
- 
- 				
- TODO:
-@@ -124,9 +125,17 @@
- #define GAIN_RO_MASK    ( 0x3f << GAIN_RO_SHIFT) 
- 
- 
--#define MAX_OUTPUT_LEVEL (GAIN_RO_MASK >> GAIN_RO_SHIFT)
--#define MAX_INPUT_LEVEL  (GAIN_RI_MASK >> GAIN_RI_SHIFT)
--#define MAX_VOLUME_LEVEL (GAIN_MA_MASK >> GAIN_MA_SHIFT)
-+#define MAX_OUTPUT_LEVEL  (GAIN_RO_MASK >> GAIN_RO_SHIFT)
-+#define MAX_INPUT_LEVEL   (GAIN_RI_MASK >> GAIN_RI_SHIFT)
-+#define MAX_MONITOR_LEVEL (GAIN_MA_MASK >> GAIN_MA_SHIFT)
-+
-+#define MIXER_INTERNAL   SOUND_MIXER_LINE1
-+#define MIXER_LINEOUT    SOUND_MIXER_LINE2
-+#define MIXER_HEADPHONES SOUND_MIXER_LINE3
-+
-+#define MASK_INTERNAL   SOUND_MASK_LINE1
-+#define MASK_LINEOUT    SOUND_MASK_LINE2
-+#define MASK_HEADPHONES SOUND_MASK_LINE3
- 
- /*
-  * Channels Mask in mixer register
-@@ -543,6 +552,7 @@
- 	int count = 0;
- 	int frame_size;
- 	int buf_to_fill;
-+	int fresh_buffer;
- 
- 	if (!harmony.format_initialized) {
- 		if (harmony_format_auto_detect(buffer, total_count))
-@@ -564,12 +574,16 @@
- 		
- 		
- 		buf_to_fill = (harmony.first_filled_play+harmony.nb_filled_play); 
--		if (harmony.play_offset)
-+		if (harmony.play_offset) {
- 			buf_to_fill--;
-+			buf_to_fill += MAX_BUFS;
-+		}
- 		buf_to_fill %= MAX_BUFS;
--
-+		
-+		fresh_buffer = (harmony.play_offset == 0);
-+		
- 		/* Figure out the size of the frame */
--		if ((total_count-count) > HARMONY_BUF_SIZE - harmony.play_offset) {
-+		if ((total_count-count) >= HARMONY_BUF_SIZE - harmony.play_offset) {
- 			frame_size = HARMONY_BUF_SIZE - harmony.play_offset;
- 		} else {
- 			frame_size = total_count - count;
-@@ -587,7 +601,7 @@
- 		CHECK_WBACK_INV_OFFSET(played_buf, (HARMONY_BUF_SIZE*buf_to_fill + harmony.play_offset), 
- 				frame_size);
- 	
--		if (!harmony.play_offset)
-+		if (fresh_buffer)
- 			harmony.nb_filled_play++;
- 		
- 		count += frame_size;
-@@ -650,18 +664,17 @@
- 			switch (ival) {
- 			case AFMT_MU_LAW:	new_format = HARMONY_DF_8BIT_ULAW; break;
- 			case AFMT_A_LAW:	new_format = HARMONY_DF_8BIT_ALAW; break;
--			case AFMT_S16_LE:	/* fall through, but not really supported */
--			case AFMT_S16_BE:	new_format = HARMONY_DF_16BIT_LINEAR;
--						ival = AFMT_S16_BE;
--						break; 
-+			case AFMT_S16_BE:	new_format = HARMONY_DF_16BIT_LINEAR; break;
- 			default: {
- 				DPRINTK(KERN_WARNING PFX 
- 					"unsupported sound format 0x%04x requested.\n",
- 					ival);
--				return -EINVAL;
-+				ival = AFMT_S16_BE;
-+				return put_user(ival, (int *) arg);
- 			}
- 			}
- 			harmony_set_format(new_format);
-+			return 0;
- 		} else {
- 			switch (harmony.data_format) {
- 			case HARMONY_DF_8BIT_ULAW:	ival = AFMT_MU_LAW; break;
-@@ -669,8 +682,8 @@
- 			case HARMONY_DF_16BIT_LINEAR:	ival = AFMT_U16_BE; break;
- 			default: ival = 0;
- 			}
-+			return put_user(ival, (int *) arg);
- 		}
--		return put_user(ival, (int *) arg);
- 
- 	case SOUND_PCM_READ_RATE:
- 		ival = harmony.dac_rate;
-@@ -689,7 +702,17 @@
- 		if (ival != 0 && ival != 1)
- 			return -EINVAL;
- 		harmony_set_stereo(ival);
--		return put_user(ival, (int *) arg);
-+ 		return 0;
-+ 
-+ 	case SNDCTL_DSP_CHANNELS:
-+ 		if (get_user(ival, (int *) arg))
-+ 			return -EFAULT;
-+ 		if (ival != 1 && ival != 2) {
-+ 			ival = harmony.stereo_select == HARMONY_SS_MONO ? 1 : 2;
-+ 			return put_user(ival, (int *) arg);
-+ 		}
-+ 		harmony_set_stereo(ival-1);
-+ 		return 0;
- 
- 	case SNDCTL_DSP_GETBLKSIZE:
- 		ival = HARMONY_BUF_SIZE;
-@@ -887,7 +910,7 @@
- 	int right_level;
- 
- 	switch (channel) {
--		case SOUND_MIXER_OGAIN:
-+		case SOUND_MIXER_VOLUME:
- 			left_level  = (harmony.current_gain & GAIN_LO_MASK) >> GAIN_LO_SHIFT;
- 			right_level = (harmony.current_gain & GAIN_RO_MASK) >> GAIN_RO_SHIFT;
- 			left_level  = to_oss_level(MAX_OUTPUT_LEVEL - left_level, MAX_OUTPUT_LEVEL);
-@@ -901,10 +924,10 @@
- 			right_level= to_oss_level(right_level, MAX_INPUT_LEVEL);
- 			return (right_level << 8)+left_level;
- 			
--		case SOUND_MIXER_VOLUME:
-+		case SOUND_MIXER_MONITOR:
- 			left_level = (harmony.current_gain & GAIN_MA_MASK) >> GAIN_MA_SHIFT;
--			left_level = to_oss_level(MAX_VOLUME_LEVEL-left_level, MAX_VOLUME_LEVEL);
--			return left_level;
-+			left_level = to_oss_level(MAX_MONITOR_LEVEL-left_level, MAX_MONITOR_LEVEL);
-+			return (left_level << 8)+left_level;
- 	}
- 	return -EINVAL;
- }
-@@ -926,9 +949,11 @@
- 
- 	right_level = (value & 0x0000ff00) >> 8;
- 	left_level = value & 0x000000ff;
-+	if (right_level > 100) right_level = 100;
-+	if (left_level > 100) left_level = 100;
-   
- 	switch (channel) {
--		case SOUND_MIXER_OGAIN:
-+		case SOUND_MIXER_VOLUME:
- 			right_level = to_harmony_level(100-right_level, MAX_OUTPUT_LEVEL);
- 			left_level  = to_harmony_level(100-left_level, MAX_OUTPUT_LEVEL);
- 			new_right_level = to_oss_level(MAX_OUTPUT_LEVEL - right_level, MAX_OUTPUT_LEVEL);
-@@ -948,12 +973,12 @@
- 			harmony_mixer_set_gain();
- 			return (new_right_level << 8) + new_left_level;
- 	
--		case SOUND_MIXER_VOLUME:
--			left_level = to_harmony_level(100-left_level, MAX_VOLUME_LEVEL);
--			new_left_level = to_oss_level(MAX_VOLUME_LEVEL-left_level, MAX_VOLUME_LEVEL);
--			harmony.current_gain = (harmony.current_gain & ~GAIN_MA_MASK)| (left_level << GAIN_MA_SHIFT);
-+		case SOUND_MIXER_MONITOR:
-+			left_level = to_harmony_level(100-left_level, MAX_MONITOR_LEVEL);
-+			new_left_level = to_oss_level(MAX_MONITOR_LEVEL-left_level, MAX_MONITOR_LEVEL);
-+			harmony.current_gain = (harmony.current_gain & ~GAIN_MA_MASK) | (left_level << GAIN_MA_SHIFT);
- 			harmony_mixer_set_gain();
--			return new_left_level;
-+			return (new_left_level << 8) + new_left_level;
- 	}
- 
- 	return -EINVAL;
-@@ -986,11 +1011,15 @@
- {
- 	int new_input_line;
- 	int new_input_mask;
--
--	if ((recmask & SOUND_MASK_LINE)) {
-+	int current_input_line;
-+	
-+	current_input_line = (harmony.current_gain & GAIN_IS_MASK)
-+				    >> GAIN_IS_SHIFT;
-+	if ((current_input_line && ((recmask & SOUND_MASK_LINE) || !(recmask & SOUND_MASK_MIC))) ||
-+		(!current_input_line && ((recmask & SOUND_MASK_LINE) && !(recmask & SOUND_MASK_MIC)))) {
- 		new_input_line = 0;
- 		new_input_mask = SOUND_MASK_LINE;
--	} else  {
-+	} else {
- 		new_input_line = 1;
- 		new_input_mask = SOUND_MASK_MIC;
- 	}
-@@ -1009,9 +1038,9 @@
- {
- 	int outmask = 0;
- 	
--	if (harmony.current_gain & GAIN_HE_MASK) outmask |=SOUND_MASK_PHONEOUT;
--	if (harmony.current_gain & GAIN_LE_MASK) outmask |=SOUND_MASK_LINE;
--	if (harmony.current_gain & GAIN_SE_MASK) outmask |=SOUND_MASK_SPEAKER;
-+	if (harmony.current_gain & GAIN_SE_MASK) outmask |= MASK_INTERNAL;
-+	if (harmony.current_gain & GAIN_LE_MASK) outmask |= MASK_LINEOUT;
-+	if (harmony.current_gain & GAIN_HE_MASK) outmask |= MASK_HEADPHONES;
- 	
- 	return outmask;
- }
-@@ -1019,24 +1048,24 @@
- 
- static int harmony_mixer_set_outmask(int outmask)
- {
--	if (outmask & SOUND_MASK_PHONEOUT) 
--		harmony.current_gain |= GAIN_HE_MASK; 
-+	if (outmask & MASK_INTERNAL) 
-+		harmony.current_gain |= GAIN_SE_MASK;
- 	else 
--		harmony.current_gain &= ~GAIN_HE_MASK;
-+		harmony.current_gain &= ~GAIN_SE_MASK;
- 	
--	if (outmask & SOUND_MASK_LINE) 
-+	if (outmask & MASK_LINEOUT) 
- 		harmony.current_gain |= GAIN_LE_MASK;
- 	else 
- 		harmony.current_gain &= ~GAIN_LE_MASK;
- 	
--	if (outmask & SOUND_MASK_SPEAKER) 
--		harmony.current_gain |= GAIN_SE_MASK;
-+	if (outmask & MASK_HEADPHONES) 
-+		harmony.current_gain |= GAIN_HE_MASK; 
- 	else 
--		harmony.current_gain &= ~GAIN_SE_MASK;
-+		harmony.current_gain &= ~GAIN_HE_MASK;
- 	
- 	harmony_mixer_set_gain();
- 
--	return (outmask & (SOUND_MASK_PHONEOUT | SOUND_MASK_LINE | SOUND_MASK_SPEAKER));
-+	return (outmask & (MASK_INTERNAL | MASK_LINEOUT | MASK_HEADPHONES));
- }
- 
- /*
-@@ -1074,19 +1103,19 @@
- 		ret = SOUND_CAP_EXCL_INPUT;
- 		break;
- 	case MIXER_READ(SOUND_MIXER_STEREODEVS):
--		ret = SOUND_MASK_IGAIN | SOUND_MASK_OGAIN;
-+		ret = SOUND_MASK_VOLUME | SOUND_MASK_IGAIN;
- 		break;
- 		
- 	case MIXER_READ(SOUND_MIXER_RECMASK):
- 		ret = SOUND_MASK_MIC | SOUND_MASK_LINE;
- 		break;
- 	case MIXER_READ(SOUND_MIXER_DEVMASK):
--		ret = SOUND_MASK_OGAIN | SOUND_MASK_IGAIN |
--			SOUND_MASK_VOLUME;
-+		ret = SOUND_MASK_VOLUME | SOUND_MASK_IGAIN |
-+			SOUND_MASK_MONITOR;
- 		break;
- 	case MIXER_READ(SOUND_MIXER_OUTMASK):
--		ret = SOUND_MASK_SPEAKER | SOUND_MASK_LINE |
--			SOUND_MASK_PHONEOUT;
-+		ret = MASK_INTERNAL | MASK_LINEOUT |
-+			MASK_HEADPHONES;
- 		break;
- 		
- 	case MIXER_WRITE(SOUND_MIXER_RECSRC):
-@@ -1103,15 +1132,15 @@
- 		ret = harmony_mixer_get_outmask();
- 		break;
- 	
--	case MIXER_WRITE(SOUND_MIXER_OGAIN):
--	case MIXER_WRITE(SOUND_MIXER_IGAIN):
- 	case MIXER_WRITE(SOUND_MIXER_VOLUME):
-+	case MIXER_WRITE(SOUND_MIXER_IGAIN):
-+	case MIXER_WRITE(SOUND_MIXER_MONITOR):
- 		ret = harmony_mixer_set_level(cmd & 0xff, val);
- 		break;
- 
--	case MIXER_READ(SOUND_MIXER_OGAIN):
--	case MIXER_READ(SOUND_MIXER_IGAIN):
- 	case MIXER_READ(SOUND_MIXER_VOLUME):
-+	case MIXER_READ(SOUND_MIXER_IGAIN):
-+	case MIXER_READ(SOUND_MIXER_MONITOR):
- 		ret = harmony_mixer_get_level(cmd & 0xff);
- 		break;
- 
-@@ -1201,16 +1230,15 @@
- 		return -EBUSY;
- 	}
- 
--	harmony.dev = dev;
--
--	/* Set the HPA of harmony */
--	harmony.hpa = (struct harmony_hpa *)dev->hpa;
--
--	if (!harmony.dev->irq) {
-+	if (!dev->irq) {
- 		printk(KERN_ERR PFX "no irq found\n");
- 		return -ENODEV;
- 	}
- 
-+	/* Set the HPA of harmony */
-+	harmony.hpa = (struct harmony_hpa *)dev->hpa;
-+	harmony.dev = dev;
-+
- 	/* Grab the ID and revision from the device */
- 	id = gsc_readb(&harmony.hpa->id);
- 	if ((id | 1) != 0x15) {
-Index: debian-kernel-hppa-2.6.8/sound/oss/Kconfig
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/sound/oss/Kconfig	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/sound/oss/Kconfig	2005-03-24 01:16:08.000000000 -0500
-@@ -162,7 +162,10 @@
- 
- config SOUND_HARMONY
- 	tristate "PA Harmony audio driver"
--	depends on GSC_LASI && SOUND
-+	depends on GSC_LASI && SOUND_PRIME!=n
-+	help
-+	  Say 'Y' or 'M' to include support for Harmony soundchip
-+	  on HP 712, 715/new and many other GSC based machines.
- 
- config SOUND_SONICVIBES
- 	tristate "S3 SonicVibes"
-Index: debian-kernel-hppa-2.6.8/sound/parisc/harmony.c
-===================================================================
---- debian-kernel-hppa-2.6.8.orig/sound/parisc/harmony.c	2005-03-24 01:16:07.000000000 -0500
-+++ debian-kernel-hppa-2.6.8/sound/parisc/harmony.c	2005-03-24 01:16:08.000000000 -0500
-@@ -6,7 +6,7 @@
-  *
-  *	Harmony is found in HP 712s, 715/new and many other GSC based machines.
-  *	On older 715 machines you'll find the technically identical chip 
-- *	called 'Vivace'. Both Harmony and Vicace are supported by this driver.
-+ *	called 'Vivace'. Both Harmony and Vivace are supported by this driver.
-  *
-  *  this ALSA driver is based on OSS driver by:
-  *	Copyright 2000 (c) Linuxcare Canada, Alex deVries <alex at linuxcare.com>
-@@ -43,7 +43,7 @@
-  * to be recorded is put in RNXTADD. There is 2 read-only registers, PCURADD and 
-  * RCURADD that provides adress of current page.
-  * 
-- * Harmony has no way to controll full duplex or half duplex mode. It means
-+ * Harmony has no way to control full duplex or half duplex mode. It means
-  * that we always need to provide adresses of playback and capture data, even
-  * when this is not needed. That's why we statically alloc one graveyard
-  * buffer (to put recorded data in play-only mode) and a silence buffer.
-@@ -556,7 +556,7 @@
- 	harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate);
- 
- 	/* data format */
--	harmony->data_format = snd_harmony_set_data_format(haromny, runtime->format);
-+	harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format);
- 
- 	/* number of channels */
- 	if (runtime->channels == 2)
-@@ -587,7 +587,7 @@
- 	harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate);
- 	
- 	/* data format */
--	harmony->data_format = snd_harmony_set_data_format(haromny, runtime->format);
-+	harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format);
- 	
- 	/* number of channels */
- 	if (runtime->channels == 1)

Copied: sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8 (from rev 3882, trunk/kernel/i386/kernel-image-2.6.8-i386-2.6.8)

Copied: sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8 (from rev 3882, trunk/kernel/i386/kernel-image-2.6.8-i386-2.6.8)

Deleted: sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/header-install
===================================================================
--- trunk/kernel/i386/kernel-image-2.6.8-i386-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-# As of make-kpkg 9.002 these files are added automatically
-# This foo is to allow this package to build on Sarge
-# (kernel-package 8.135) and unstable, and to produce
-# packages with the same file layout as the original
-# sarge kernel-header packages.
-kpkg_version=`dpkg -p kernel-package | sed -ne 's/Version: //; T; p; q'`
-if dpkg --compare-versions "$kpkg_version" "<" "9.002"; then
-	cd $DEBIAN_SRCTOP
-	{
-		find . -path './scripts/*' -prune -o \
-			-path './Documentation/*' -prune -o \
-			-path './debian/*' -prune -o \
-			-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-		echo arch/$DEB_HOST_ARCH/kernel/asm-offsets.s
-	} | cpio -pd --preserve-modification-time $OLDPWD
-	cd - > /dev/null
-else
-	rm -r scripts
-fi
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | $DEB_HOST_ARCH)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/post-install
===================================================================
--- trunk/kernel/i386/kernel-image-2.6.8-i386-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/i386/kernel-image-2.6.8-i386-2.6.8/kernel-image-2.6.8-i386-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-
-suffix=${version#*$debnum-}
-prefix=$DEBIAN_UPSTREAM_VERSION$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory=$dir
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-$DEB_HOST_ARCH \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a \
-	! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-rm -f $top/lib/modules/$version/source
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/source
-
-debhelper_post $pkg
-
-
-cd $IMAGE_TOP/lib/modules/$version
-mkdir boot initrd
-ln kernel/drivers/video/vesafb.ko initrd
-ln kernel/security/capability.ko boot

Copied: sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8 (from rev 3882, trunk/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8)

Copied: sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8 (from rev 3882, trunk/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8)

Deleted: sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/header-install
===================================================================
--- trunk/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-cd $DEBIAN_SRCTOP
-{
-	find . -path './scripts/*' -prune -o \
-		-path './Documentation/*' -prune -o \
-		-path './debian/*' -prune -o \
-		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-	echo arch/$DEB_HOST_ARCH/kernel/asm-offsets.s
-	echo arch/$DEB_HOST_ARCH/module.lds
-	find arch/$DEB_HOST_ARCH/scripts -not -name unwcheck.py
-} | cpio -pd --preserve-modification-time $OLDPWD
-cd - > /dev/null
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | $DEB_HOST_ARCH)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/post-install
===================================================================
--- trunk/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/ia64/kernel-image-2.6.8-ia64-2.6.8/kernel-image-2.6.8-ia64-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-
-suffix=${version#*$debnum-}
-prefix=${version%.*}
-
-
-for pkg in \
-	kernel-headers-$prefix-$suffix kernel-image-$prefix-$suffix
-do
-	debhelper_pre $pkg
-	debhelper_post $pkg
-done
-
-
-prefix=$DEBIAN_UPSTREAM_VERSION$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory=$dir
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-$DEB_HOST_ARCH \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a \
-	! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-
-debhelper_post $pkg
-
-
-cd $IMAGE_TOP/lib/modules/$version
-mkdir boot initrd
-## not built on ia64
-# ln kernel/drivers/video/vesafb.ko initrd
-ln kernel/security/capability.ko boot

Copied: sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8 (from rev 3882, trunk/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8)

Copied: sarge/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8/kernel-image-2.6.8-m68k-2.6.8 (from rev 3882, trunk/kernel/m68k/kernel-image-2.6.8-m68k-2.6.8)

Copied: sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8 (from rev 3882, trunk/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8)

Copied: sarge/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8/kernel-patch-2.6.8-m68k-2.6.8 (from rev 3882, trunk/kernel/m68k/kernel-patch-2.6.8-m68k-2.6.8)

Copied: sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8 (from rev 3882, trunk/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8)

Copied: sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8 (from rev 3882, trunk/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8)

Deleted: sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/header-install
===================================================================
--- trunk/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/powerpc/kernel-patch-powerpc-2.6.8-2.6.8/kernel-patch-powerpc-2.6.8-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# As of make-kpkg 9.002 these files are added automatically
-# This foo is to allow this package to build on Sarge
-# (kernel-package 8.135) and unstable, and to produce
-# packages with the same file layout as the original
-# sarge kernel-header packages.
-kpkg_version=`dpkg -p kernel-package | sed -ne 's/Version: //; T; p; q'`
-if dpkg --compare-versions "$kpkg_version" "<" "9.002"; then
-	cd $KSOURCE
-	{
-		find . -path './scripts/*' -prune -o \
-			-path './Documentation/*' -prune -o \
-			-path './debian/*' -prune -o \
-			-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-		find . \( -type f -or -type l \) \
-			-path './scripts/*' ! -name '*.o'
-		echo arch/$DEB_HOST_ARCH/kernel/asm-offsets.s
-	} | cpio -pd --preserve-modification-time $OLDPWD
-	> $OLDPWD/scripts/Makefile
-	cd - > /dev/null
-fi
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | ppc)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Copied: sarge/kernel/s390/kernel-image-2.6.8-s390 (from rev 3882, trunk/kernel/s390/kernel-image-2.6.8-s390)

Copied: sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390 (from rev 3882, trunk/kernel/s390/kernel-image-2.6.8-s390)

Deleted: sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/post-install
===================================================================
--- trunk/kernel/s390/kernel-image-2.6.8-s390/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/s390/kernel-image-2.6.8-s390/kernel-image-2.6.8-s390/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-pkg=kernel-image-${version}${INT_SUBARCH}
-pkgsimple=kernel-image-${version}
-
-debhelper_pre $pkg
-debhelper_post $pkg

Copied: sarge/kernel/source/kernel-source-2.6.8-2.6.8 (from rev 3882, trunk/kernel/source/kernel-source-2.6.8-2.6.8)

Copied: sarge/kernel/source/kernel-source-2.6.8-2.6.8/kernel-source-2.6.8-2.6.8 (from rev 3882, trunk/kernel/source/kernel-source-2.6.8-2.6.8)


Property changes on: sarge/kernel/source/kernel-source-2.6.8-2.6.8/kernel-source-2.6.8-2.6.8
___________________________________________________________________
Name: svn:ignore
   + kernel
crypto
include
net
scripts
sound
CREDITS
README
init
lib
REPORTING-BUGS
security
fs
COPYING
mm
Documentation
usr
MAINTAINERS
ipc
arch
Makefile
drivers

version.Debian


Copied: sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8 (from rev 3882, trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8)

Copied: sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8 (from rev 3882, trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8)


Property changes on: sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8
___________________________________________________________________
Name: svn:ignore
   + kernel-source-2.6.8
build-*
header-install.out
*-stamp


Deleted: sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/header-install
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/header-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/header-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -e
-
-kbpkg=@kbpkg@
-
-cd $DEBIAN_SRCTOP
-{
-	find . -path './scripts/*' -prune -o \
-		-path './Documentation/*' -prune -o \
-		-path './debian/*' -prune -o \
-		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
-	echo arch/sparc/kernel/asm-offsets.s
-} | cpio -pd --preserve-modification-time $OLDPWD
-cd - > /dev/null
-ln -s ../$kbpkg/scripts .
-
-remove=
-cd include
-for i in asm-*; do
-	case ${i#asm-} in
-	generic | sparc | sparc64)
-		;;
-	*)
-		remove="$remove $i"
-		;;
-	esac
-done
-${remove:+rm -r $remove}

Deleted: sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/post-install
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/post-install	2005-08-15 09:53:25 UTC (rev 3882)
+++ sarge/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/kernel-image-2.6.8-sparc-2.6.8/post-install	2005-08-15 10:21:55 UTC (rev 3884)
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-set -e
-
-debhelper_pre() {
-	dh_clean -k --package="$1"
-	dh_installdirs --package="$1"
-}
-
-debhelper_post() {
-	dh_installdocs --package="$1"
-	dh_installchangelogs --package="$1"
-	dh_compress --package="$1"
-	dh_fixperms --package="$1"
-	dh_installdeb --package="$1"
-	dh_gencontrol --package="$1"
-	dh_md5sums --package="$1"
-	dh_builddeb --package="$1"
-}
-
-
-suffix=${version#*$debnum-}
-prefix=${version%%-*}$debnum
-pkg=kernel-headers-$version
-top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
-
-karch=${suffix%-smp}
-karch=${karch%32}
-
-debhelper_pre $pkg
-
-mkdir -p $dir/include/linux
-cp -a .config $dir
-echo $debnum-$suffix > $dir/.extraversion
-cp -a Module.symvers $dir
-
-find . -mindepth 1 -maxdepth 1 \
-	! -name debian -a ! -name Documentation -a ! -name include -a \
-	! -name '.*' -a \( \
-	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
-	xargs ln -s --target-directory="$dir"
-
-cd include
-find . -mindepth 1 -maxdepth 1 \
-	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-$karch \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
-	xargs ln -s --target-directory=$dir/include
-cp -a config $dir/include
-ln -sf asm-$karch $dir/include/asm
-find linux -mindepth 1 -maxdepth 1 \
-	! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
-	xargs ln -s --target-directory=$dir/include/linux
-cp -a linux/autoconf.h linux/compile.h \
-	linux/version.h $dir/include/linux
-cd ..
-
-mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
-
-debhelper_post $pkg
- 
-bpkg=kernel-build-$prefix
-top=$PWD/../debian/$bpkg
-
-[ -d $top/usr/src/$bpkg ] || mkdir -p $top/usr/src/$bpkg
-ln -s ../kernel-headers-$version $top/usr/src/$bpkg/$suffix




More information about the Kernel-svn-changes mailing list