[kernel] r7520 - in dists/trunk/linux-2.6/debian: . patches patches/series

Kyle McMartin kyle at costa.debian.org
Mon Sep 25 18:58:58 UTC 2006


Author: kyle
Date: Mon Sep 25 18:58:54 2006
New Revision: 7520

Added:
   dists/trunk/linux-2.6/debian/patches/hppa.patch
   dists/trunk/linux-2.6/debian/patches/series/2-extra
Modified:
   dists/trunk/linux-2.6/debian/changelog

Log:
Add 2.6.18-pa0 patchkit for hppa.


Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Mon Sep 25 18:58:54 2006
@@ -1,8 +1,12 @@
 linux-2.6 (2.6.18-2) UNRELEASED; urgency=low
 
+  [ Bastian Blank ]
   * hppa: Fix compiler dependencies. (closes: #389296)
 
- -- Bastian Blank <waldi at debian.org>  Mon, 25 Sep 2006 01:35:00 +0200
+  [ Kyle McMartin ]
+  * hppa: Add parisc patchset. 
+
+ -- Kyle McMartin <kyle at debian.org>  Mon, 25 Sep 2006 13:32:38 -0400
 
 linux-2.6 (2.6.18-1) unstable; urgency=low
 

Added: dists/trunk/linux-2.6/debian/patches/hppa.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/hppa.patch	Mon Sep 25 18:58:54 2006
@@ -0,0 +1,8053 @@
+diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
+index 6dd0ea8..d210123 100644
+--- a/arch/parisc/Kconfig
++++ b/arch/parisc/Kconfig
+@@ -127,7 +127,7 @@ config PA11
+ 
+ config PREFETCH
+ 	def_bool y
+-	depends on PA8X00
++	depends on PA8X00 || PA7200
+ 
+ config 64BIT
+ 	bool "64-bit kernel"
+diff --git a/arch/parisc/configs/712_defconfig b/arch/parisc/configs/712_defconfig
+index 41fd069..4ca8e8f 100644
+--- a/arch/parisc/configs/712_defconfig
++++ b/arch/parisc/configs/712_defconfig
+@@ -1,15 +1,19 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.16-pa6
+-# Sun Mar 26 19:59:51 2006
++# Linux kernel version: 2.6.18-rc1-pa1
++# Thu Jul 13 10:20:05 2006
+ #
+ CONFIG_PARISC=y
+ CONFIG_MMU=y
+ CONFIG_STACK_GROWSUP=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+ 
+ #
+ # Code maturity level options
+@@ -31,6 +35,7 @@ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
++# CONFIG_RELAY is not set
+ CONFIG_INITRAMFS_SOURCE=""
+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+ # CONFIG_EMBEDDED is not set
+@@ -42,14 +47,12 @@ CONFIG_PRINTK=y
+ CONFIG_BUG=y
+ CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
+ CONFIG_FUTEX=y
+ CONFIG_EPOLL=y
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
+ CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+ # CONFIG_SLOB is not set
+@@ -60,7 +63,6 @@ #
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ CONFIG_MODULE_FORCE_UNLOAD=y
+-CONFIG_OBSOLETE_MODPARM=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+@@ -68,6 +70,7 @@ CONFIG_KMOD=y
+ #
+ # Block layer
+ #
++# CONFIG_BLK_DEV_IO_TRACE is not set
+ 
+ #
+ # IO Schedulers
+@@ -91,6 +94,9 @@ # CONFIG_PA7200 is not set
+ # CONFIG_PA7300LC is not set
+ # CONFIG_PA8X00 is not set
+ CONFIG_PA11=y
++CONFIG_PARISC_PAGE_SIZE_4KB=y
++# CONFIG_PARISC_PAGE_SIZE_16KB is not set
++# CONFIG_PARISC_PAGE_SIZE_64KB is not set
+ # CONFIG_SMP is not set
+ CONFIG_ARCH_FLATMEM_ENABLE=y
+ # CONFIG_PREEMPT_NONE is not set
+@@ -108,6 +114,7 @@ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+ CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_RESOURCES_64BIT is not set
+ # CONFIG_HPUX is not set
+ 
+ #
+@@ -135,6 +142,7 @@ # PA-RISC specific drivers
+ #
+ CONFIG_CHASSIS_LCD_LED=y
+ # CONFIG_PDC_CHASSIS is not set
++CONFIG_PDC_CHASSIS_WARN=y
+ CONFIG_PDC_STABLE=y
+ 
+ #
+@@ -174,7 +182,10 @@ # CONFIG_SYN_COOKIES is not set
+ CONFIG_INET_AH=m
+ CONFIG_INET_ESP=m
+ # CONFIG_INET_IPCOMP is not set
+-CONFIG_INET_TUNNEL=m
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+ CONFIG_INET_DIAG=m
+ CONFIG_INET_TCP_DIAG=m
+ # CONFIG_TCP_CONG_ADVANCED is not set
+@@ -185,6 +196,9 @@ # IP: Virtual Server Configuration
+ #
+ # CONFIG_IP_VS is not set
+ # CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+ 
+@@ -208,6 +222,8 @@ # CONFIG_IP_NF_NETBIOS_NS is not set
+ CONFIG_IP_NF_TFTP=m
+ CONFIG_IP_NF_AMANDA=m
+ # CONFIG_IP_NF_PPTP is not set
++# CONFIG_IP_NF_H323 is not set
++# CONFIG_IP_NF_SIP is not set
+ CONFIG_IP_NF_QUEUE=m
+ 
+ #
+@@ -251,6 +267,7 @@ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
+ # CONFIG_IEEE80211 is not set
++CONFIG_WIRELESS_EXT=y
+ 
+ #
+ # Device Drivers
+@@ -263,6 +280,7 @@ # CONFIG_STANDALONE is not set
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+@@ -283,6 +301,7 @@ # CONFIG_PARPORT_PC_FIFO is not set
+ # CONFIG_PARPORT_PC_SUPERIO is not set
+ CONFIG_PARPORT_NOT_PC=y
+ CONFIG_PARPORT_GSC=y
++# CONFIG_PARPORT_AX88796 is not set
+ # CONFIG_PARPORT_1284 is not set
+ 
+ #
+@@ -363,8 +382,8 @@ CONFIG_MD_LINEAR=m
+ CONFIG_MD_RAID0=m
+ CONFIG_MD_RAID1=m
+ # CONFIG_MD_RAID10 is not set
+-# CONFIG_MD_RAID5 is not set
+-# CONFIG_MD_RAID6 is not set
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
+ # CONFIG_MD_MULTIPATH is not set
+ # CONFIG_MD_FAULTY is not set
+ # CONFIG_BLK_DEV_DM is not set
+@@ -420,12 +439,12 @@ #
+ # Wireless LAN (non-hamradio)
+ #
+ CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
+ 
+ #
+ # Obsolete Wireless cards support (pre-802.11)
+ #
+ # CONFIG_STRIP is not set
+-# CONFIG_ATMEL is not set
+ # CONFIG_HOSTAP is not set
+ 
+ #
+@@ -516,6 +535,7 @@ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+@@ -523,6 +543,7 @@ # Serial drivers
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_GSC=y
+ CONFIG_SERIAL_8250_NR_UARTS=17
+ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+ CONFIG_SERIAL_8250_EXTENDED=y
+@@ -555,6 +576,7 @@ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
+ CONFIG_GEN_RTC=y
+ CONFIG_GEN_RTC_X=y
+ # CONFIG_DTLK is not set
+@@ -586,7 +608,6 @@ # CONFIG_SPI_MASTER is not set
+ #
+ # Dallas's 1-wire bus
+ #
+-# CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+@@ -599,13 +620,10 @@ # Misc devices
+ #
+ 
+ #
+-# Multimedia Capabilities Port drivers
+-#
+-
+-#
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
+ 
+ #
+ # Digital Video Broadcasting Devices
+@@ -615,11 +633,13 @@ # CONFIG_DVB is not set
+ #
+ # Graphics support
+ #
++# CONFIG_FIRMWARE_EDID is not set
+ CONFIG_FB=y
+ CONFIG_FB_CFB_FILLRECT=y
+ CONFIG_FB_CFB_COPYAREA=y
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
+ CONFIG_FB_MODE_HELPERS=y
+ CONFIG_FB_TILEBLITTING=y
+ CONFIG_FB_STI=y
+@@ -673,9 +693,11 @@ # CONFIG_SND_SEQ_DUMMY is not set
+ CONFIG_SND_OSSEMUL=y
+ CONFIG_SND_MIXER_OSS=y
+ CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
+ CONFIG_SND_SEQUENCER_OSS=y
+ # CONFIG_SND_DYNAMIC_MINORS is not set
+ CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
+ # CONFIG_SND_VERBOSE_PRINTK is not set
+ # CONFIG_SND_DEBUG is not set
+ 
+@@ -703,6 +725,7 @@ # USB support
+ #
+ # CONFIG_USB_ARCH_HAS_HCD is not set
+ # CONFIG_USB_ARCH_HAS_OHCI is not set
++# CONFIG_USB_ARCH_HAS_EHCI is not set
+ 
+ #
+ # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+@@ -719,6 +742,19 @@ #
+ # CONFIG_MMC is not set
+ 
+ #
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
+ # InfiniBand support
+ #
+ 
+@@ -727,6 +763,24 @@ # EDAC - error detection and reporting (
+ #
+ 
+ #
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
+ # File systems
+ #
+ CONFIG_EXT2_FS=y
+@@ -744,7 +798,6 @@ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+ CONFIG_FS_POSIX_ACL=y
+ CONFIG_XFS_FS=m
+-CONFIG_XFS_EXPORT=y
+ # CONFIG_XFS_QUOTA is not set
+ # CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+@@ -753,6 +806,7 @@ # CONFIG_OCFS2_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+@@ -787,7 +841,6 @@ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
+ # CONFIG_CONFIGFS_FS is not set
+ 
+ #
+@@ -806,6 +859,8 @@ # CONFIG_HPFS_FS is not set
+ # CONFIG_QNX4FS_FS is not set
+ # CONFIG_SYSV_FS is not set
+ CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
+ 
+ #
+ # Network File Systems
+@@ -834,7 +889,9 @@ CONFIG_SMB_NLS_DEFAULT=y
+ CONFIG_SMB_NLS_REMOTE="cp437"
+ CONFIG_CIFS=m
+ # CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
+ # CONFIG_CIFS_XATTR is not set
++# CONFIG_CIFS_DEBUG2 is not set
+ # CONFIG_CIFS_EXPERIMENTAL is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+@@ -902,14 +959,19 @@ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+ CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
+ CONFIG_DEBUG_KERNEL=y
+ CONFIG_LOG_BUF_SHIFT=16
+ CONFIG_DETECT_SOFTLOCKUP=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
+-CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_INFO is not set
+ # CONFIG_DEBUG_FS is not set
+@@ -967,3 +1029,6 @@ CONFIG_CRC32=y
+ CONFIG_LIBCRC32C=m
+ CONFIG_ZLIB_INFLATE=m
+ CONFIG_ZLIB_DEFLATE=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_PLIST=y
+diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig
+index f3b812f..57c5b68 100644
+--- a/arch/parisc/configs/a500_defconfig
++++ b/arch/parisc/configs/a500_defconfig
+@@ -1,24 +1,25 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.14-rc5-pa1
+-# Fri Oct 21 23:04:54 2005
++# Linux kernel version: 2.6.18-rc1-pa1
++# Fri Jul  7 01:02:53 2006
+ #
+ CONFIG_PARISC=y
+ CONFIG_MMU=y
+ CONFIG_STACK_GROWSUP=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_TIME_LOW_RES=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
+-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+ 
+ #
+ # Code maturity level options
+ #
+ CONFIG_EXPERIMENTAL=y
+-# CONFIG_CLEAN_COMPILE is not set
+-CONFIG_BROKEN=y
+-CONFIG_BROKEN_ON_SMP=y
+ CONFIG_LOCK_KERNEL=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+ 
+@@ -33,29 +34,30 @@ CONFIG_POSIX_MQUEUE=y
+ # CONFIG_BSD_PROCESS_ACCT is not set
+ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+-CONFIG_HOTPLUG=y
+-CONFIG_KOBJECT_UEVENT=y
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
+ # CONFIG_CPUSETS is not set
++CONFIG_RELAY=y
+ CONFIG_INITRAMFS_SOURCE=""
+-CONFIG_EMBEDDED=y
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
+ CONFIG_KALLSYMS=y
+ CONFIG_KALLSYMS_ALL=y
+ # CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
+ CONFIG_PRINTK=y
+ CONFIG_BUG=y
++CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
+ CONFIG_FUTEX=y
+ CONFIG_EPOLL=y
+-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
+ 
+ #
+ # Loadable module support
+@@ -63,13 +65,30 @@ #
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ CONFIG_MODULE_FORCE_UNLOAD=y
+-CONFIG_OBSOLETE_MODPARM=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+ CONFIG_STOP_MACHINE=y
+ 
+ #
++# Block layer
++#
++# CONFIG_BLK_DEV_IO_TRACE is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++# CONFIG_DEFAULT_AS is not set
++# CONFIG_DEFAULT_DEADLINE is not set
++CONFIG_DEFAULT_CFQ=y
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="cfq"
++
++#
+ # Processor type and features
+ #
+ # CONFIG_PA7000 is not set
+@@ -80,9 +99,20 @@ CONFIG_PA8X00=y
+ CONFIG_PA20=y
+ CONFIG_PREFETCH=y
+ CONFIG_64BIT=y
++CONFIG_PARISC_PAGE_SIZE_4KB=y
++# CONFIG_PARISC_PAGE_SIZE_16KB is not set
++# CONFIG_PARISC_PAGE_SIZE_64KB is not set
+ CONFIG_SMP=y
+ CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+ CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
++CONFIG_NODES_SHIFT=3
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++# CONFIG_PREEMPT_BKL is not set
+ # CONFIG_HZ_100 is not set
+ CONFIG_HZ_250=y
+ # CONFIG_HZ_1000 is not set
+@@ -95,7 +125,8 @@ CONFIG_DISCONTIGMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ CONFIG_NEED_MULTIPLE_NODES=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+-# CONFIG_PREEMPT is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
+ CONFIG_COMPAT=y
+ CONFIG_NR_CPUS=8
+ 
+@@ -104,7 +135,6 @@ # Bus options (PCI, PCMCIA, EISA, GSC, I
+ #
+ # CONFIG_GSC is not set
+ CONFIG_PCI=y
+-CONFIG_PCI_LEGACY_PROC=y
+ # CONFIG_PCI_DEBUG is not set
+ CONFIG_PCI_LBA=y
+ CONFIG_IOSAPIC=y
+@@ -124,6 +154,11 @@ #
+ # PC-card bridges
+ #
+ CONFIG_YENTA=m
++CONFIG_YENTA_O2=y
++CONFIG_YENTA_RICOH=y
++CONFIG_YENTA_TI=y
++CONFIG_YENTA_ENE_TUNE=y
++CONFIG_YENTA_TOSHIBA=y
+ CONFIG_PD6729=m
+ CONFIG_I82092=m
+ CONFIG_PCCARD_NONSTATIC=m
+@@ -139,6 +174,7 @@ #
+ # CONFIG_SUPERIO is not set
+ # CONFIG_CHASSIS_LCD_LED is not set
+ CONFIG_PDC_CHASSIS=y
++CONFIG_PDC_CHASSIS_WARN=y
+ CONFIG_PDC_STABLE=y
+ 
+ #
+@@ -155,6 +191,7 @@ CONFIG_NET=y
+ #
+ # Networking options
+ #
++# CONFIG_NETDEBUG is not set
+ CONFIG_PACKET=y
+ CONFIG_PACKET_MMAP=y
+ CONFIG_UNIX=y
+@@ -177,7 +214,10 @@ # CONFIG_SYN_COOKIES is not set
+ CONFIG_INET_AH=m
+ CONFIG_INET_ESP=m
+ # CONFIG_INET_IPCOMP is not set
+-CONFIG_INET_TUNNEL=m
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
+ CONFIG_INET_DIAG=y
+ CONFIG_INET_TCP_DIAG=y
+ # CONFIG_TCP_CONG_ADVANCED is not set
+@@ -189,14 +229,51 @@ #
+ # CONFIG_IP_VS is not set
+ CONFIG_IPV6=m
+ # CONFIG_IPV6_PRIVACY is not set
++# CONFIG_IPV6_ROUTER_PREF is not set
+ CONFIG_INET6_AH=m
+ CONFIG_INET6_ESP=m
+ CONFIG_INET6_IPCOMP=m
++CONFIG_INET6_XFRM_TUNNEL=m
+ CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_IPV6_TUNNEL=m
++# CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+-# CONFIG_NETFILTER_NETLINK is not set
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=m
++CONFIG_NETFILTER_NETLINK_QUEUE=m
++CONFIG_NETFILTER_NETLINK_LOG=m
++CONFIG_NETFILTER_XTABLES=m
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
++# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
++# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
++CONFIG_NETFILTER_XT_MATCH_COMMENT=m
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_DCCP=m
++CONFIG_NETFILTER_XT_MATCH_ESP=m
++CONFIG_NETFILTER_XT_MATCH_HELPER=m
++CONFIG_NETFILTER_XT_MATCH_LENGTH=m
++CONFIG_NETFILTER_XT_MATCH_LIMIT=m
++CONFIG_NETFILTER_XT_MATCH_MAC=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
++CONFIG_NETFILTER_XT_MATCH_QUOTA=m
++CONFIG_NETFILTER_XT_MATCH_REALM=m
++CONFIG_NETFILTER_XT_MATCH_SCTP=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
++CONFIG_NETFILTER_XT_MATCH_STRING=m
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+ 
+ #
+ # IP: Netfilter Configuration
+@@ -205,47 +282,33 @@ CONFIG_IP_NF_CONNTRACK=m
+ # CONFIG_IP_NF_CT_ACCT is not set
+ CONFIG_IP_NF_CONNTRACK_MARK=y
+ # CONFIG_IP_NF_CONNTRACK_EVENTS is not set
++CONFIG_IP_NF_CONNTRACK_NETLINK=m
+ CONFIG_IP_NF_CT_PROTO_SCTP=m
+ CONFIG_IP_NF_FTP=m
+ CONFIG_IP_NF_IRC=m
+-# CONFIG_IP_NF_NETBIOS_NS is not set
++CONFIG_IP_NF_NETBIOS_NS=m
+ CONFIG_IP_NF_TFTP=m
+ CONFIG_IP_NF_AMANDA=m
+-# CONFIG_IP_NF_PPTP is not set
++CONFIG_IP_NF_PPTP=m
++CONFIG_IP_NF_H323=m
++CONFIG_IP_NF_SIP=m
+ CONFIG_IP_NF_QUEUE=m
+ CONFIG_IP_NF_IPTABLES=m
+-CONFIG_IP_NF_MATCH_LIMIT=m
+ CONFIG_IP_NF_MATCH_IPRANGE=m
+-CONFIG_IP_NF_MATCH_MAC=m
+-CONFIG_IP_NF_MATCH_PKTTYPE=m
+-CONFIG_IP_NF_MATCH_MARK=m
+-CONFIG_IP_NF_MATCH_MULTIPORT=m
+ CONFIG_IP_NF_MATCH_TOS=m
+ CONFIG_IP_NF_MATCH_RECENT=m
+ CONFIG_IP_NF_MATCH_ECN=m
+ CONFIG_IP_NF_MATCH_DSCP=m
+-CONFIG_IP_NF_MATCH_AH_ESP=m
+-CONFIG_IP_NF_MATCH_LENGTH=m
++CONFIG_IP_NF_MATCH_AH=m
+ CONFIG_IP_NF_MATCH_TTL=m
+-CONFIG_IP_NF_MATCH_TCPMSS=m
+-CONFIG_IP_NF_MATCH_HELPER=m
+-CONFIG_IP_NF_MATCH_STATE=m
+-CONFIG_IP_NF_MATCH_CONNTRACK=m
+ CONFIG_IP_NF_MATCH_OWNER=m
+-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+-# CONFIG_IP_NF_MATCH_REALM is not set
+-CONFIG_IP_NF_MATCH_SCTP=m
+-# CONFIG_IP_NF_MATCH_DCCP is not set
+-CONFIG_IP_NF_MATCH_COMMENT=m
+-CONFIG_IP_NF_MATCH_CONNMARK=m
++CONFIG_IP_NF_MATCH_ADDRTYPE=m
+ CONFIG_IP_NF_MATCH_HASHLIMIT=m
+-# CONFIG_IP_NF_MATCH_STRING is not set
+ CONFIG_IP_NF_FILTER=m
+ CONFIG_IP_NF_TARGET_REJECT=m
+ CONFIG_IP_NF_TARGET_LOG=m
+ CONFIG_IP_NF_TARGET_ULOG=m
+ CONFIG_IP_NF_TARGET_TCPMSS=m
+-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
+ CONFIG_IP_NF_NAT=m
+ CONFIG_IP_NF_NAT_NEEDED=y
+ CONFIG_IP_NF_TARGET_MASQUERADE=m
+@@ -257,17 +320,16 @@ CONFIG_IP_NF_NAT_IRC=m
+ CONFIG_IP_NF_NAT_FTP=m
+ CONFIG_IP_NF_NAT_TFTP=m
+ CONFIG_IP_NF_NAT_AMANDA=m
++CONFIG_IP_NF_NAT_PPTP=m
++CONFIG_IP_NF_NAT_H323=m
++CONFIG_IP_NF_NAT_SIP=m
+ CONFIG_IP_NF_MANGLE=m
+ CONFIG_IP_NF_TARGET_TOS=m
+ CONFIG_IP_NF_TARGET_ECN=m
+ CONFIG_IP_NF_TARGET_DSCP=m
+-CONFIG_IP_NF_TARGET_MARK=m
+-CONFIG_IP_NF_TARGET_CLASSIFY=m
+-# CONFIG_IP_NF_TARGET_TTL is not set
+-CONFIG_IP_NF_TARGET_CONNMARK=m
++CONFIG_IP_NF_TARGET_TTL=m
+ CONFIG_IP_NF_TARGET_CLUSTERIP=m
+ CONFIG_IP_NF_RAW=m
+-CONFIG_IP_NF_TARGET_NOTRACK=m
+ CONFIG_IP_NF_ARPTABLES=m
+ CONFIG_IP_NF_ARPFILTER=m
+ CONFIG_IP_NF_ARP_MANGLE=m
+@@ -275,28 +337,21 @@ CONFIG_IP_NF_ARP_MANGLE=m
+ #
+ # IPv6: Netfilter Configuration (EXPERIMENTAL)
+ #
+-# CONFIG_IP6_NF_QUEUE is not set
++CONFIG_IP6_NF_QUEUE=m
+ CONFIG_IP6_NF_IPTABLES=m
+-# CONFIG_IP6_NF_MATCH_LIMIT is not set
+-CONFIG_IP6_NF_MATCH_MAC=m
+ CONFIG_IP6_NF_MATCH_RT=m
+ CONFIG_IP6_NF_MATCH_OPTS=m
+ CONFIG_IP6_NF_MATCH_FRAG=m
+ CONFIG_IP6_NF_MATCH_HL=m
+-# CONFIG_IP6_NF_MATCH_MULTIPORT is not set
+-# CONFIG_IP6_NF_MATCH_OWNER is not set
+-# CONFIG_IP6_NF_MATCH_MARK is not set
++CONFIG_IP6_NF_MATCH_OWNER=m
+ CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+-# CONFIG_IP6_NF_MATCH_AHESP is not set
+-# CONFIG_IP6_NF_MATCH_LENGTH is not set
+-# CONFIG_IP6_NF_MATCH_EUI64 is not set
++CONFIG_IP6_NF_MATCH_AH=m
++CONFIG_IP6_NF_MATCH_EUI64=m
+ CONFIG_IP6_NF_FILTER=m
+ CONFIG_IP6_NF_TARGET_LOG=m
+ CONFIG_IP6_NF_TARGET_REJECT=m
+-# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
+ CONFIG_IP6_NF_MANGLE=m
+-# CONFIG_IP6_NF_TARGET_MARK is not set
+-# CONFIG_IP6_NF_TARGET_HL is not set
++CONFIG_IP6_NF_TARGET_HL=m
+ CONFIG_IP6_NF_RAW=m
+ 
+ #
+@@ -304,10 +359,12 @@ # DCCP Configuration (EXPERIMENTAL)
+ #
+ CONFIG_IP_DCCP=m
+ CONFIG_INET_DCCP_DIAG=m
++CONFIG_IP_DCCP_ACKVEC=y
+ 
+ #
+ # DCCP CCIDs Configuration (EXPERIMENTAL)
+ #
++CONFIG_IP_DCCP_CCID2=m
+ # CONFIG_IP_DCCP_CCID3 is not set
+ 
+ #
+@@ -319,6 +376,11 @@ #
+ # SCTP Configuration (EXPERIMENTAL)
+ #
+ # CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
+ # CONFIG_ATM is not set
+ # CONFIG_BRIDGE is not set
+ # CONFIG_VLAN_8021Q is not set
+@@ -332,8 +394,12 @@ # CONFIG_LAPB is not set
+ # CONFIG_NET_DIVERT is not set
+ # CONFIG_ECONET is not set
+ # CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
+ # CONFIG_NET_SCHED is not set
+-# CONFIG_NET_CLS_ROUTE is not set
++CONFIG_NET_CLS_ROUTE=y
+ 
+ #
+ # Network testing
+@@ -343,6 +409,7 @@ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
+ # CONFIG_IEEE80211 is not set
++CONFIG_WIRELESS_EXT=y
+ 
+ #
+ # Device Drivers
+@@ -355,6 +422,7 @@ # CONFIG_STANDALONE is not set
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+@@ -378,7 +446,6 @@ #
+ #
+ # Block devices
+ #
+-# CONFIG_BLK_DEV_FD is not set
+ # CONFIG_BLK_CPQ_DA is not set
+ # CONFIG_BLK_CPQ_CISS_DA is not set
+ # CONFIG_BLK_DEV_DAC960 is not set
+@@ -393,14 +460,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
+ CONFIG_BLK_DEV_RAM_SIZE=6144
+ CONFIG_BLK_DEV_INITRD=y
+ # CONFIG_CDROM_PKTCDVD is not set
+-
+-#
+-# IO Schedulers
+-#
+-CONFIG_IOSCHED_NOOP=y
+-CONFIG_IOSCHED_AS=y
+-CONFIG_IOSCHED_DEADLINE=y
+-CONFIG_IOSCHED_CFQ=y
+ # CONFIG_ATA_OVER_ETH is not set
+ 
+ #
+@@ -444,6 +503,7 @@ CONFIG_SCSI_SAS_ATTRS=m
+ #
+ # SCSI low-level drivers
+ #
++# CONFIG_ISCSI_TCP is not set
+ # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+ # CONFIG_SCSI_3W_9XXX is not set
+ # CONFIG_SCSI_ACARD is not set
+@@ -451,14 +511,12 @@ # CONFIG_SCSI_AACRAID is not set
+ # CONFIG_SCSI_AIC7XXX is not set
+ # CONFIG_SCSI_AIC7XXX_OLD is not set
+ # CONFIG_SCSI_AIC79XX is not set
+-# CONFIG_SCSI_ADVANSYS is not set
+ # CONFIG_MEGARAID_NEWGEN is not set
+ # CONFIG_MEGARAID_LEGACY is not set
+ # CONFIG_MEGARAID_SAS is not set
+ # CONFIG_SCSI_SATA is not set
+-# CONFIG_SCSI_CPQFCTS is not set
++# CONFIG_SCSI_HPTIOP is not set
+ # CONFIG_SCSI_DMX3191D is not set
+-# CONFIG_SCSI_EATA_PIO is not set
+ # CONFIG_SCSI_FUTURE_DOMAIN is not set
+ # CONFIG_SCSI_IPS is not set
+ # CONFIG_SCSI_INITIO is not set
+@@ -467,20 +525,10 @@ CONFIG_SCSI_SYM53C8XX_2=y
+ CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+ CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
++CONFIG_SCSI_SYM53C8XX_MMIO=y
+ # CONFIG_SCSI_IPR is not set
+-# CONFIG_SCSI_QLOGIC_ISP is not set
+-CONFIG_SCSI_QLOGIC_FC=m
+-# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
+ CONFIG_SCSI_QLOGIC_1280=m
+-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
+-CONFIG_SCSI_QLA2XXX=y
+-# CONFIG_SCSI_QLA21XX is not set
+-# CONFIG_SCSI_QLA22XX is not set
+-CONFIG_SCSI_QLA2300=m
+-CONFIG_SCSI_QLA2322=m
+-# CONFIG_SCSI_QLA6312 is not set
+-# CONFIG_SCSI_QLA24XX is not set
++# CONFIG_SCSI_QLA_FC is not set
+ # CONFIG_SCSI_LPFC is not set
+ # CONFIG_SCSI_DC395x is not set
+ # CONFIG_SCSI_DC390T is not set
+@@ -502,8 +550,8 @@ CONFIG_MD_LINEAR=y
+ CONFIG_MD_RAID0=y
+ CONFIG_MD_RAID1=y
+ # CONFIG_MD_RAID10 is not set
+-# CONFIG_MD_RAID5 is not set
+-# CONFIG_MD_RAID6 is not set
++CONFIG_MD_RAID456=y
++# CONFIG_MD_RAID5_RESHAPE is not set
+ # CONFIG_MD_MULTIPATH is not set
+ # CONFIG_MD_FAULTY is not set
+ # CONFIG_BLK_DEV_DM is not set
+@@ -573,7 +621,6 @@ # CONFIG_WINBOND_840 is not set
+ # CONFIG_DM9102 is not set
+ # CONFIG_ULI526X is not set
+ CONFIG_PCMCIA_XIRCOM=m
+-# CONFIG_PCMCIA_XIRTULIP is not set
+ CONFIG_HP100=m
+ CONFIG_NET_PCI=y
+ CONFIG_PCNET32=m
+@@ -609,6 +656,7 @@ # CONFIG_YELLOWFIN is not set
+ # CONFIG_R8169 is not set
+ # CONFIG_SIS190 is not set
+ # CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
+ # CONFIG_SK98LIN is not set
+ # CONFIG_VIA_VELOCITY is not set
+ CONFIG_TIGON3=m
+@@ -620,6 +668,7 @@ #
+ # CONFIG_CHELSIO_T1 is not set
+ # CONFIG_IXGB is not set
+ # CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
+ 
+ #
+ # Token Ring devices
+@@ -630,6 +679,7 @@ #
+ # Wireless LAN (non-hamradio)
+ #
+ CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
+ 
+ #
+ # Obsolete Wireless cards support (pre-802.11)
+@@ -646,6 +696,8 @@ CONFIG_PCMCIA_RAYCS=m
+ #
+ # Wireless 802.11b ISA/PCI cards support
+ #
++# CONFIG_IPW2100 is not set
++# CONFIG_IPW2200 is not set
+ CONFIG_HERMES=m
+ CONFIG_PLX_HERMES=m
+ CONFIG_TMD_HERMES=m
+@@ -694,6 +746,7 @@ CONFIG_PPP_ASYNC=m
+ CONFIG_PPP_SYNC_TTY=m
+ CONFIG_PPP_DEFLATE=m
+ CONFIG_PPP_BSDCOMP=m
++# CONFIG_PPP_MPPE is not set
+ # CONFIG_PPPOE is not set
+ # CONFIG_SLIP is not set
+ # CONFIG_NET_FC is not set
+@@ -720,7 +773,10 @@ CONFIG_INPUT=y
+ #
+ # Userland interfaces
+ #
+-# CONFIG_INPUT_MOUSEDEV is not set
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+ # CONFIG_INPUT_JOYDEV is not set
+ # CONFIG_INPUT_TSDEV is not set
+ # CONFIG_INPUT_EVDEV is not set
+@@ -747,6 +803,7 @@ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+@@ -754,8 +811,10 @@ # Serial drivers
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_PCI=y
+ CONFIG_SERIAL_8250_CS=m
+ CONFIG_SERIAL_8250_NR_UARTS=17
++CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+ CONFIG_SERIAL_8250_EXTENDED=y
+ CONFIG_SERIAL_8250_MANY_PORTS=y
+ CONFIG_SERIAL_8250_SHARE_IRQ=y
+@@ -765,7 +824,6 @@ # CONFIG_SERIAL_8250_RSA is not set
+ #
+ # Non-8250 serial port support
+ #
+-# CONFIG_SERIAL_MUX is not set
+ CONFIG_PDC_CONSOLE=y
+ CONFIG_SERIAL_CORE=y
+ CONFIG_SERIAL_CORE_CONSOLE=y
+@@ -782,6 +840,7 @@ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
+ CONFIG_GEN_RTC=y
+ CONFIG_GEN_RTC_X=y
+ # CONFIG_DTLK is not set
+@@ -797,6 +856,8 @@ #
+ # PCMCIA character devices
+ #
+ # CONFIG_SYNCLINK_CS is not set
++# CONFIG_CARDMAN_4000 is not set
++# CONFIG_CARDMAN_4040 is not set
+ CONFIG_RAW_DRIVER=y
+ CONFIG_MAX_RAW_DEVS=256
+ 
+@@ -804,6 +865,7 @@ #
+ # TPM devices
+ #
+ # CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
+ 
+ #
+ # I2C support
+@@ -811,9 +873,14 @@ #
+ # CONFIG_I2C is not set
+ 
+ #
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
+ # Dallas's 1-wire bus
+ #
+-# CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+@@ -826,13 +893,10 @@ # Misc devices
+ #
+ 
+ #
+-# Multimedia Capabilities Port drivers
+-#
+-
+-#
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
+ 
+ #
+ # Digital Video Broadcasting Devices
+@@ -842,6 +906,7 @@ # CONFIG_DVB is not set
+ #
+ # Graphics support
+ #
++# CONFIG_FIRMWARE_EDID is not set
+ # CONFIG_FB is not set
+ 
+ #
+@@ -862,9 +927,14 @@ # USB support
+ #
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
+ # CONFIG_USB is not set
+ 
+ #
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
+ # USB Gadget Support
+ #
+ # CONFIG_USB_GADGET is not set
+@@ -875,12 +945,43 @@ #
+ # CONFIG_MMC is not set
+ 
+ #
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
+ # InfiniBand support
+ #
+ # CONFIG_INFINIBAND is not set
+ 
+ #
+-# SN Devices
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
+ #
+ 
+ #
+@@ -901,14 +1002,16 @@ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+ CONFIG_FS_POSIX_ACL=y
+ CONFIG_XFS_FS=m
+-CONFIG_XFS_EXPORT=y
+ # CONFIG_XFS_QUOTA is not set
+ # CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
++CONFIG_OCFS2_FS=m
++CONFIG_OCFS2_DEBUG_MASKLOG=y
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+@@ -941,10 +1044,9 @@ CONFIG_PROC_FS=y
+ CONFIG_PROC_KCORE=y
+ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+-# CONFIG_HUGETLBFS is not set
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
++CONFIG_CONFIGFS_FS=m
+ 
+ #
+ # Miscellaneous filesystems
+@@ -963,6 +1065,7 @@ # CONFIG_QNX4FS_FS is not set
+ # CONFIG_SYSV_FS is not set
+ CONFIG_UFS_FS=m
+ # CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
+ 
+ #
+ # Network File Systems
+@@ -990,7 +1093,9 @@ CONFIG_SMB_NLS_DEFAULT=y
+ CONFIG_SMB_NLS_REMOTE="cp437"
+ CONFIG_CIFS=m
+ # CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
+ # CONFIG_CIFS_XATTR is not set
++# CONFIG_CIFS_DEBUG2 is not set
+ # CONFIG_CIFS_EXPERIMENTAL is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+@@ -1057,19 +1162,28 @@ #
+ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+-CONFIG_DEBUG_KERNEL=y
+ CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++CONFIG_DEBUG_KERNEL=y
+ CONFIG_LOG_BUF_SHIFT=16
+-CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_DETECT_SOFTLOCKUP is not set
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_INFO is not set
+-# CONFIG_DEBUG_IOREMAP is not set
+ # CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
+ # CONFIG_DEBUG_RWLOCK is not set
++# CONFIG_DEBUG_RODATA is not set
+ 
+ #
+ # Security options
+@@ -1096,7 +1210,7 @@ CONFIG_CRYPTO_BLOWFISH=m
+ # CONFIG_CRYPTO_TWOFISH is not set
+ # CONFIG_CRYPTO_SERPENT is not set
+ # CONFIG_CRYPTO_AES is not set
+-# CONFIG_CRYPTO_CAST5 is not set
++CONFIG_CRYPTO_CAST5=m
+ # CONFIG_CRYPTO_CAST6 is not set
+ # CONFIG_CRYPTO_TEA is not set
+ # CONFIG_CRYPTO_ARC4 is not set
+@@ -1120,3 +1234,8 @@ CONFIG_CRC32=y
+ CONFIG_LIBCRC32C=m
+ CONFIG_ZLIB_INFLATE=m
+ CONFIG_ZLIB_DEFLATE=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_TEXTSEARCH_BM=m
++CONFIG_TEXTSEARCH_FSM=m
++CONFIG_PLIST=y
+diff --git a/arch/parisc/configs/b180_defconfig b/arch/parisc/configs/b180_defconfig
+index 3509361..91cb36f 100644
+--- a/arch/parisc/configs/b180_defconfig
++++ b/arch/parisc/configs/b180_defconfig
+@@ -1,21 +1,24 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.16-rc1-pa0
+-# Tue Jan 17 08:21:01 2006
++# Linux kernel version: 2.6.18-rc1-pa1
++# Thu Jul 13 10:21:41 2006
+ #
+ CONFIG_PARISC=y
+ CONFIG_MMU=y
+ CONFIG_STACK_GROWSUP=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+ 
+ #
+ # Code maturity level options
+ #
+ # CONFIG_EXPERIMENTAL is not set
+-CONFIG_CLEAN_COMPILE=y
+ CONFIG_BROKEN_ON_SMP=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+ 
+@@ -31,6 +34,7 @@ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
++CONFIG_RELAY=y
+ CONFIG_INITRAMFS_SOURCE=""
+ # CONFIG_EMBEDDED is not set
+ CONFIG_KALLSYMS=y
+@@ -41,14 +45,12 @@ CONFIG_PRINTK=y
+ CONFIG_BUG=y
+ CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
+ CONFIG_FUTEX=y
+ CONFIG_EPOLL=y
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
+ CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+ # CONFIG_SLOB is not set
+@@ -58,7 +60,6 @@ # Loadable module support
+ #
+ CONFIG_MODULES=y
+ # CONFIG_MODULE_UNLOAD is not set
+-CONFIG_OBSOLETE_MODPARM=y
+ CONFIG_MODVERSIONS=y
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ # CONFIG_KMOD is not set
+@@ -66,6 +67,7 @@ # CONFIG_KMOD is not set
+ #
+ # Block layer
+ #
++# CONFIG_BLK_DEV_IO_TRACE is not set
+ 
+ #
+ # IO Schedulers
+@@ -89,7 +91,14 @@ # CONFIG_PA7200 is not set
+ # CONFIG_PA7300LC is not set
+ # CONFIG_PA8X00 is not set
+ CONFIG_PA11=y
++CONFIG_PARISC_PAGE_SIZE_4KB=y
++# CONFIG_PARISC_PAGE_SIZE_16KB is not set
++# CONFIG_PARISC_PAGE_SIZE_64KB is not set
+ # CONFIG_SMP is not set
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
+ # CONFIG_HZ_100 is not set
+ CONFIG_HZ_250=y
+ # CONFIG_HZ_1000 is not set
+@@ -98,7 +107,7 @@ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+ CONFIG_SPLIT_PTLOCK_CPUS=4096
+-# CONFIG_PREEMPT is not set
++# CONFIG_RESOURCES_64BIT is not set
+ # CONFIG_HPUX is not set
+ 
+ #
+@@ -113,7 +122,6 @@ CONFIG_EISA=y
+ CONFIG_EISA_NAMES=y
+ CONFIG_ISA=y
+ CONFIG_PCI=y
+-CONFIG_PCI_LEGACY_PROC=y
+ # CONFIG_PCI_DEBUG is not set
+ CONFIG_GSC_DINO=y
+ # CONFIG_PCI_LBA is not set
+@@ -132,6 +140,7 @@ # PA-RISC specific drivers
+ #
+ CONFIG_CHASSIS_LCD_LED=y
+ # CONFIG_PDC_CHASSIS is not set
++CONFIG_PDC_CHASSIS_WARN=y
+ CONFIG_PDC_STABLE=y
+ 
+ #
+@@ -148,6 +157,7 @@ CONFIG_NET=y
+ #
+ # Networking options
+ #
++# CONFIG_NETDEBUG is not set
+ CONFIG_PACKET=y
+ CONFIG_PACKET_MMAP=y
+ CONFIG_UNIX=y
+@@ -167,18 +177,26 @@ # CONFIG_SYN_COOKIES is not set
+ # CONFIG_INET_AH is not set
+ # CONFIG_INET_ESP is not set
+ # CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
+ # CONFIG_INET_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+ CONFIG_INET_DIAG=y
+ CONFIG_INET_TCP_DIAG=y
+ # CONFIG_TCP_CONG_ADVANCED is not set
+ CONFIG_TCP_CONG_BIC=y
+ CONFIG_IPV6=y
+ # CONFIG_IPV6_PRIVACY is not set
++# CONFIG_IPV6_ROUTER_PREF is not set
+ # CONFIG_INET6_AH is not set
+ # CONFIG_INET6_ESP is not set
+ # CONFIG_INET6_IPCOMP is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
+ # CONFIG_INET6_TUNNEL is not set
++# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+ # CONFIG_IPV6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
+ # CONFIG_NETFILTER is not set
+ # CONFIG_BRIDGE is not set
+ # CONFIG_VLAN_8021Q is not set
+@@ -200,6 +218,7 @@ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
+ # CONFIG_IEEE80211 is not set
++CONFIG_WIRELESS_EXT=y
+ 
+ #
+ # Device Drivers
+@@ -212,6 +231,7 @@ CONFIG_STANDALONE=y
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ # CONFIG_FW_LOADER is not set
+ # CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+@@ -231,6 +251,7 @@ CONFIG_PARPORT_PC=y
+ # CONFIG_PARPORT_SERIAL is not set
+ CONFIG_PARPORT_NOT_PC=y
+ CONFIG_PARPORT_GSC=y
++# CONFIG_PARPORT_AX88796 is not set
+ # CONFIG_PARPORT_1284 is not set
+ 
+ #
+@@ -251,10 +272,9 @@ CONFIG_BLK_DEV_CRYPTOLOOP=y
+ # CONFIG_BLK_DEV_NBD is not set
+ # CONFIG_BLK_DEV_SX8 is not set
+ # CONFIG_BLK_DEV_RAM is not set
+-CONFIG_BLK_DEV_RAM_COUNT=16
++# CONFIG_BLK_DEV_INITRD is not set
+ CONFIG_CDROM_PKTCDVD=m
+ CONFIG_CDROM_PKTCDVD_BUFFERS=8
+-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+ CONFIG_ATA_OVER_ETH=y
+ 
+ #
+@@ -314,6 +334,7 @@ # CONFIG_MEGARAID_NEWGEN is not set
+ # CONFIG_MEGARAID_LEGACY is not set
+ # CONFIG_MEGARAID_SAS is not set
+ # CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
+ # CONFIG_SCSI_DMX3191D is not set
+ # CONFIG_SCSI_DTC3280 is not set
+ # CONFIG_SCSI_FUTURE_DOMAIN is not set
+@@ -341,7 +362,6 @@ # CONFIG_SCSI_NCR53C8XX_PROFILE is not s
+ # CONFIG_SCSI_PAS16 is not set
+ # CONFIG_SCSI_PSI240I is not set
+ # CONFIG_SCSI_QLOGIC_FAS is not set
+-# CONFIG_SCSI_QLOGIC_FC is not set
+ # CONFIG_SCSI_QLOGIC_1280 is not set
+ # CONFIG_SCSI_QLA_FC is not set
+ # CONFIG_SCSI_LPFC is not set
+@@ -365,8 +385,7 @@ CONFIG_BLK_DEV_MD=y
+ CONFIG_MD_LINEAR=y
+ CONFIG_MD_RAID0=y
+ CONFIG_MD_RAID1=y
+-CONFIG_MD_RAID5=y
+-CONFIG_MD_RAID6=y
++CONFIG_MD_RAID456=y
+ # CONFIG_MD_MULTIPATH is not set
+ # CONFIG_MD_FAULTY is not set
+ # CONFIG_BLK_DEV_DM is not set
+@@ -448,6 +467,7 @@ # CONFIG_NS83820 is not set
+ # CONFIG_HAMACHI is not set
+ # CONFIG_R8169 is not set
+ # CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
+ # CONFIG_SK98LIN is not set
+ # CONFIG_TIGON3 is not set
+ # CONFIG_BNX2 is not set
+@@ -458,6 +478,7 @@ #
+ # CONFIG_CHELSIO_T1 is not set
+ # CONFIG_IXGB is not set
+ # CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
+ 
+ #
+ # Token Ring devices
+@@ -468,6 +489,7 @@ #
+ # Wireless LAN (non-hamradio)
+ #
+ CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
+ 
+ #
+ # Obsolete Wireless cards support (pre-802.11)
+@@ -479,6 +501,8 @@ # CONFIG_WAVELAN is not set
+ #
+ # Wireless 802.11b ISA/PCI cards support
+ #
++# CONFIG_IPW2100 is not set
++# CONFIG_IPW2200 is not set
+ # CONFIG_HERMES is not set
+ # CONFIG_ATMEL is not set
+ 
+@@ -579,6 +603,7 @@ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+@@ -586,6 +611,8 @@ # Serial drivers
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_GSC=y
++CONFIG_SERIAL_8250_PCI=y
+ CONFIG_SERIAL_8250_NR_UARTS=13
+ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+ CONFIG_SERIAL_8250_EXTENDED=y
+@@ -605,6 +632,7 @@ CONFIG_SERIAL_MUX=y
+ CONFIG_SERIAL_MUX_CONSOLE=y
+ CONFIG_SERIAL_CORE=y
+ CONFIG_SERIAL_CORE_CONSOLE=y
++# CONFIG_SERIAL_JSM is not set
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_LEGACY_PTYS=y
+ CONFIG_LEGACY_PTY_COUNT=256
+@@ -622,6 +650,7 @@ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
+ CONFIG_GEN_RTC=y
+ # CONFIG_GEN_RTC_X is not set
+ # CONFIG_DTLK is not set
+@@ -652,7 +681,6 @@ # CONFIG_SPI_MASTER is not set
+ #
+ # Dallas's 1-wire bus
+ #
+-# CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+@@ -665,13 +693,10 @@ # Misc devices
+ #
+ 
+ #
+-# Multimedia Capabilities Port drivers
+-#
+-
+-#
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
+ 
+ #
+ # Digital Video Broadcasting Devices
+@@ -681,11 +706,13 @@ # CONFIG_DVB is not set
+ #
+ # Graphics support
+ #
++# CONFIG_FIRMWARE_EDID is not set
+ CONFIG_FB=y
+ CONFIG_FB_CFB_FILLRECT=y
+ CONFIG_FB_CFB_COPYAREA=y
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
+ # CONFIG_FB_MODE_HELPERS is not set
+ # CONFIG_FB_TILEBLITTING is not set
+ # CONFIG_FB_CIRRUS is not set
+@@ -698,7 +725,6 @@ # CONFIG_FB_S1D13XXX is not set
+ # CONFIG_FB_NVIDIA is not set
+ # CONFIG_FB_RIVA is not set
+ # CONFIG_FB_MATROX is not set
+-# CONFIG_FB_RADEON_OLD is not set
+ # CONFIG_FB_RADEON is not set
+ # CONFIG_FB_ATY128 is not set
+ # CONFIG_FB_ATY is not set
+@@ -749,8 +775,11 @@ # CONFIG_SND_SEQ_DUMMY is not set
+ CONFIG_SND_OSSEMUL=y
+ CONFIG_SND_MIXER_OSS=y
+ CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
+ CONFIG_SND_SEQUENCER_OSS=y
++# CONFIG_SND_DYNAMIC_MINORS is not set
+ CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
+ # CONFIG_SND_VERBOSE_PRINTK is not set
+ # CONFIG_SND_DEBUG is not set
+ 
+@@ -767,6 +796,7 @@ #
+ # PCI devices
+ #
+ # CONFIG_SND_AD1889 is not set
++# CONFIG_SND_ALS300 is not set
+ # CONFIG_SND_ALI5451 is not set
+ # CONFIG_SND_ATIIXP is not set
+ # CONFIG_SND_ATIIXP_MODEM is not set
+@@ -791,6 +821,7 @@ # CONFIG_SND_HDSPM is not set
+ # CONFIG_SND_ICE1712 is not set
+ # CONFIG_SND_ICE1724 is not set
+ # CONFIG_SND_INTEL8X0 is not set
++# CONFIG_SND_INTEL8X0M is not set
+ # CONFIG_SND_KORG1212 is not set
+ # CONFIG_SND_MAESTRO3 is not set
+ # CONFIG_SND_MIXART is not set
+@@ -821,6 +852,7 @@ # USB support
+ #
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
+ # CONFIG_USB is not set
+ 
+ #
+@@ -838,12 +870,42 @@ #
+ # CONFIG_MMC is not set
+ 
+ #
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
+ # InfiniBand support
+ #
+ # CONFIG_INFINIBAND is not set
+ 
+ #
+-# SN Devices
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
+ #
+ 
+ #
+@@ -863,6 +925,7 @@ # CONFIG_XFS_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+@@ -893,7 +956,6 @@ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
+ 
+ #
+ # Miscellaneous filesystems
+@@ -925,6 +987,7 @@ CONFIG_SUNRPC=y
+ CONFIG_SMB_FS=y
+ # CONFIG_SMB_NLS_DEFAULT is not set
+ # CONFIG_CIFS is not set
++# CONFIG_CIFS_DEBUG2 is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+ 
+@@ -983,17 +1046,21 @@ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+ CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
+ CONFIG_DEBUG_KERNEL=y
+ CONFIG_LOG_BUF_SHIFT=16
+ CONFIG_DETECT_SOFTLOCKUP=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
+-# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_INFO is not set
+-# CONFIG_DEBUG_IOREMAP is not set
+ # CONFIG_DEBUG_FS is not set
+ # CONFIG_DEBUG_VM is not set
+ CONFIG_FORCED_INLINING=y
+@@ -1008,7 +1075,6 @@ CONFIG_SECURITY=y
+ # CONFIG_SECURITY_NETWORK is not set
+ CONFIG_SECURITY_CAPABILITIES=y
+ # CONFIG_SECURITY_SECLVL is not set
+-# CONFIG_SECURITY_SELINUX is not set
+ 
+ #
+ # Cryptographic options
+@@ -1050,3 +1116,4 @@ # CONFIG_CRC_CCITT is not set
+ # CONFIG_CRC16 is not set
+ CONFIG_CRC32=y
+ # CONFIG_LIBCRC32C is not set
++CONFIG_PLIST=y
+diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig
+index 782906b..e5a00dc 100644
+--- a/arch/parisc/configs/c3000_defconfig
++++ b/arch/parisc/configs/c3000_defconfig
+@@ -1,15 +1,19 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.16-pa6
+-# Sun Mar 26 20:03:29 2006
++# Linux kernel version: 2.6.18-rc1-pa1
++# Thu Jul 13 10:18:04 2006
+ #
+ CONFIG_PARISC=y
+ CONFIG_MMU=y
+ CONFIG_STACK_GROWSUP=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+ 
+ #
+ # Code maturity level options
+@@ -31,6 +35,7 @@ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
++CONFIG_RELAY=y
+ CONFIG_INITRAMFS_SOURCE=""
+ # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+ CONFIG_EMBEDDED=y
+@@ -42,14 +47,12 @@ CONFIG_PRINTK=y
+ CONFIG_BUG=y
+ CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
+ CONFIG_FUTEX=y
+ CONFIG_EPOLL=y
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
+ CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+ # CONFIG_SLOB is not set
+@@ -60,7 +63,6 @@ #
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ CONFIG_MODULE_FORCE_UNLOAD=y
+-CONFIG_OBSOLETE_MODPARM=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+@@ -68,6 +70,7 @@ CONFIG_KMOD=y
+ #
+ # Block layer
+ #
++# CONFIG_BLK_DEV_IO_TRACE is not set
+ 
+ #
+ # IO Schedulers
+@@ -93,6 +96,9 @@ CONFIG_PA8X00=y
+ CONFIG_PA20=y
+ CONFIG_PREFETCH=y
+ # CONFIG_64BIT is not set
++CONFIG_PARISC_PAGE_SIZE_4KB=y
++# CONFIG_PARISC_PAGE_SIZE_16KB is not set
++# CONFIG_PARISC_PAGE_SIZE_64KB is not set
+ # CONFIG_SMP is not set
+ CONFIG_ARCH_FLATMEM_ENABLE=y
+ # CONFIG_PREEMPT_NONE is not set
+@@ -110,6 +116,7 @@ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+ CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_RESOURCES_64BIT is not set
+ # CONFIG_HPUX is not set
+ 
+ #
+@@ -117,7 +124,6 @@ # Bus options (PCI, PCMCIA, EISA, GSC, I
+ #
+ # CONFIG_GSC is not set
+ CONFIG_PCI=y
+-CONFIG_PCI_LEGACY_PROC=y
+ # CONFIG_PCI_DEBUG is not set
+ CONFIG_PCI_LBA=y
+ CONFIG_IOSAPIC=y
+@@ -139,6 +145,7 @@ #
+ CONFIG_SUPERIO=y
+ CONFIG_CHASSIS_LCD_LED=y
+ # CONFIG_PDC_CHASSIS is not set
++CONFIG_PDC_CHASSIS_WARN=y
+ CONFIG_PDC_STABLE=y
+ 
+ #
+@@ -178,7 +185,10 @@ # CONFIG_SYN_COOKIES is not set
+ # CONFIG_INET_AH is not set
+ # CONFIG_INET_ESP is not set
+ # CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
+ # CONFIG_INET_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+ # CONFIG_INET_DIAG is not set
+ # CONFIG_TCP_CONG_ADVANCED is not set
+ CONFIG_TCP_CONG_BIC=y
+@@ -189,11 +199,16 @@ #
+ # CONFIG_IP_VS is not set
+ CONFIG_IPV6=m
+ # CONFIG_IPV6_PRIVACY is not set
++# CONFIG_IPV6_ROUTER_PREF is not set
+ # CONFIG_INET6_AH is not set
+ # CONFIG_INET6_ESP is not set
+ CONFIG_INET6_IPCOMP=m
++CONFIG_INET6_XFRM_TUNNEL=m
+ CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_IPV6_TUNNEL=m
++# CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ CONFIG_NETFILTER_DEBUG=y
+ 
+@@ -217,6 +232,8 @@ # CONFIG_IP_NF_NETBIOS_NS is not set
+ CONFIG_IP_NF_TFTP=m
+ CONFIG_IP_NF_AMANDA=m
+ # CONFIG_IP_NF_PPTP is not set
++# CONFIG_IP_NF_H323 is not set
++CONFIG_IP_NF_SIP=m
+ CONFIG_IP_NF_QUEUE=m
+ 
+ #
+@@ -276,6 +293,7 @@ # CONFIG_STANDALONE is not set
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+@@ -310,7 +328,7 @@ # CONFIG_BLK_DEV_NBD is not set
+ # CONFIG_BLK_DEV_SX8 is not set
+ # CONFIG_BLK_DEV_UB is not set
+ # CONFIG_BLK_DEV_RAM is not set
+-CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_INITRD=y
+ # CONFIG_CDROM_PKTCDVD is not set
+ # CONFIG_ATA_OVER_ETH is not set
+ 
+@@ -426,6 +444,7 @@ CONFIG_SCSI_ATA_PIIX=m
+ # CONFIG_SCSI_SATA_MV is not set
+ # CONFIG_SCSI_SATA_NV is not set
+ # CONFIG_SCSI_PDC_ADMA is not set
++# CONFIG_SCSI_HPTIOP is not set
+ # CONFIG_SCSI_SATA_QSTOR is not set
+ CONFIG_SCSI_SATA_PROMISE=m
+ # CONFIG_SCSI_SATA_SX4 is not set
+@@ -447,7 +466,6 @@ CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+ CONFIG_SCSI_SYM53C8XX_MMIO=y
+ # CONFIG_SCSI_IPR is not set
+-# CONFIG_SCSI_QLOGIC_FC is not set
+ # CONFIG_SCSI_QLOGIC_1280 is not set
+ # CONFIG_SCSI_QLA_FC is not set
+ # CONFIG_SCSI_LPFC is not set
+@@ -465,8 +483,7 @@ CONFIG_MD_LINEAR=y
+ CONFIG_MD_RAID0=y
+ CONFIG_MD_RAID1=y
+ # CONFIG_MD_RAID10 is not set
+-# CONFIG_MD_RAID5 is not set
+-# CONFIG_MD_RAID6 is not set
++# CONFIG_MD_RAID456 is not set
+ # CONFIG_MD_MULTIPATH is not set
+ # CONFIG_MD_FAULTY is not set
+ CONFIG_BLK_DEV_DM=m
+@@ -587,6 +604,7 @@ #
+ # CONFIG_CHELSIO_T1 is not set
+ # CONFIG_IXGB is not set
+ # CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
+ 
+ #
+ # Token Ring devices
+@@ -680,6 +698,7 @@ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+@@ -687,6 +706,7 @@ # Serial drivers
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_PCI=y
+ CONFIG_SERIAL_8250_NR_UARTS=13
+ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+ CONFIG_SERIAL_8250_EXTENDED=y
+@@ -715,6 +735,7 @@ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
+ CONFIG_GEN_RTC=y
+ CONFIG_GEN_RTC_X=y
+ # CONFIG_DTLK is not set
+@@ -748,7 +769,6 @@ # CONFIG_SPI_MASTER is not set
+ #
+ # Dallas's 1-wire bus
+ #
+-# CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+@@ -761,27 +781,27 @@ # Misc devices
+ #
+ 
+ #
+-# Multimedia Capabilities Port drivers
+-#
+-
+-#
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
+ 
+ #
+ # Digital Video Broadcasting Devices
+ #
+ # CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Graphics support
+ #
++# CONFIG_FIRMWARE_EDID is not set
+ CONFIG_FB=y
+ CONFIG_FB_CFB_FILLRECT=y
+ CONFIG_FB_CFB_COPYAREA=y
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
+ # CONFIG_FB_MODE_HELPERS is not set
+ # CONFIG_FB_TILEBLITTING is not set
+ # CONFIG_FB_CIRRUS is not set
+@@ -794,7 +814,6 @@ # CONFIG_FB_S1D13XXX is not set
+ # CONFIG_FB_NVIDIA is not set
+ # CONFIG_FB_RIVA is not set
+ # CONFIG_FB_MATROX is not set
+-# CONFIG_FB_RADEON_OLD is not set
+ # CONFIG_FB_RADEON is not set
+ # CONFIG_FB_ATY128 is not set
+ # CONFIG_FB_ATY is not set
+@@ -846,9 +865,11 @@ # CONFIG_SND_SEQ_DUMMY is not set
+ CONFIG_SND_OSSEMUL=y
+ CONFIG_SND_MIXER_OSS=y
+ CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
+ CONFIG_SND_SEQUENCER_OSS=y
+ # CONFIG_SND_DYNAMIC_MINORS is not set
+ CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
+ # CONFIG_SND_VERBOSE_PRINTK is not set
+ # CONFIG_SND_DEBUG is not set
+ 
+@@ -867,7 +888,7 @@ #
+ # PCI devices
+ #
+ CONFIG_SND_AD1889=y
+-# CONFIG_SND_AD1889_OPL3 is not set
++# CONFIG_SND_ALS300 is not set
+ # CONFIG_SND_ALI5451 is not set
+ # CONFIG_SND_ATIIXP is not set
+ # CONFIG_SND_ATIIXP_MODEM is not set
+@@ -880,6 +901,18 @@ # CONFIG_SND_CA0106 is not set
+ # CONFIG_SND_CMIPCI is not set
+ # CONFIG_SND_CS4281 is not set
+ # CONFIG_SND_CS46XX is not set
++# CONFIG_SND_DARLA20 is not set
++# CONFIG_SND_GINA20 is not set
++# CONFIG_SND_LAYLA20 is not set
++# CONFIG_SND_DARLA24 is not set
++# CONFIG_SND_GINA24 is not set
++# CONFIG_SND_LAYLA24 is not set
++# CONFIG_SND_MONA is not set
++# CONFIG_SND_MIA is not set
++# CONFIG_SND_ECHO3G is not set
++# CONFIG_SND_INDIGO is not set
++# CONFIG_SND_INDIGOIO is not set
++# CONFIG_SND_INDIGODJ is not set
+ # CONFIG_SND_EMU10K1 is not set
+ # CONFIG_SND_EMU10K1X is not set
+ # CONFIG_SND_ENS1370 is not set
+@@ -899,6 +932,7 @@ # CONFIG_SND_MAESTRO3 is not set
+ # CONFIG_SND_MIXART is not set
+ # CONFIG_SND_NM256 is not set
+ # CONFIG_SND_PCXHR is not set
++# CONFIG_SND_RIPTIDE is not set
+ # CONFIG_SND_RME32 is not set
+ # CONFIG_SND_RME96 is not set
+ # CONFIG_SND_RME9652 is not set
+@@ -924,6 +958,7 @@ # USB support
+ #
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
+ CONFIG_USB=y
+ CONFIG_USB_DEBUG=y
+ 
+@@ -949,7 +984,6 @@ # CONFIG_USB_SL811_HCD is not set
+ #
+ # USB Device Class drivers
+ #
+-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
+ # CONFIG_USB_ACM is not set
+ CONFIG_USB_PRINTER=m
+ 
+@@ -986,9 +1020,7 @@ # CONFIG_USB_WACOM is not set
+ # CONFIG_USB_ACECAD is not set
+ # CONFIG_USB_KBTAB is not set
+ # CONFIG_USB_POWERMATE is not set
+-# CONFIG_USB_MTOUCH is not set
+-# CONFIG_USB_ITMTOUCH is not set
+-# CONFIG_USB_EGALAX is not set
++# CONFIG_USB_TOUCHSCREEN is not set
+ # CONFIG_USB_YEALINK is not set
+ # CONFIG_USB_XPAD is not set
+ # CONFIG_USB_ATI_REMOTE is not set
+@@ -1003,15 +1035,6 @@ CONFIG_USB_MDC800=m
+ CONFIG_USB_MICROTEK=m
+ 
+ #
+-# USB Multimedia devices
+-#
+-# CONFIG_USB_DABUSB is not set
+-
+-#
+-# Video4Linux support is needed for USB Multimedia device support
+-#
+-
+-#
+ # USB Network Adapters
+ #
+ # CONFIG_USB_CATC is not set
+@@ -1040,10 +1063,12 @@ # CONFIG_USB_RIO500 is not set
+ CONFIG_USB_LEGOTOWER=m
+ # CONFIG_USB_LCD is not set
+ # CONFIG_USB_LED is not set
++# CONFIG_USB_CY7C63 is not set
+ # CONFIG_USB_CYTHERM is not set
+ # CONFIG_USB_PHIDGETKIT is not set
+ # CONFIG_USB_PHIDGETSERVO is not set
+ # CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
+ # CONFIG_USB_LD is not set
+ # CONFIG_USB_TEST is not set
+ 
+@@ -1062,6 +1087,19 @@ #
+ # CONFIG_MMC is not set
+ 
+ #
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
+ # InfiniBand support
+ #
+ # CONFIG_INFINIBAND is not set
+@@ -1071,6 +1109,24 @@ # EDAC - error detection and reporting (
+ #
+ 
+ #
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
+ # File systems
+ #
+ CONFIG_EXT2_FS=y
+@@ -1084,7 +1140,6 @@ # CONFIG_REISERFS_FS is not set
+ # CONFIG_JFS_FS is not set
+ # CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+-CONFIG_XFS_EXPORT=y
+ # CONFIG_XFS_QUOTA is not set
+ # CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+@@ -1093,6 +1148,7 @@ # CONFIG_OCFS2_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+@@ -1126,7 +1182,6 @@ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
+ # CONFIG_CONFIGFS_FS is not set
+ 
+ #
+@@ -1169,6 +1224,7 @@ # CONFIG_RPCSEC_GSS_KRB5 is not set
+ # CONFIG_RPCSEC_GSS_SPKM3 is not set
+ # CONFIG_SMB_FS is not set
+ # CONFIG_CIFS is not set
++# CONFIG_CIFS_DEBUG2 is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+ # CONFIG_AFS_FS is not set
+@@ -1235,14 +1291,19 @@ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+ CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
+ CONFIG_DEBUG_KERNEL=y
+ CONFIG_LOG_BUF_SHIFT=16
+ CONFIG_DETECT_SOFTLOCKUP=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
+-CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_INFO is not set
+ # CONFIG_DEBUG_FS is not set
+@@ -1299,3 +1360,6 @@ CONFIG_CRC32=y
+ CONFIG_LIBCRC32C=m
+ CONFIG_ZLIB_INFLATE=m
+ CONFIG_ZLIB_DEFLATE=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_PLIST=y
+diff --git a/arch/parisc/defconfig b/arch/parisc/defconfig
+index b38b58e..524f611 100644
+--- a/arch/parisc/defconfig
++++ b/arch/parisc/defconfig
+@@ -1,15 +1,19 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.16-pa10
+-# Sun Apr  2 15:26:38 2006
++# Linux kernel version: 2.6.18-rc1-pa1
++# Thu Jul 13 10:23:14 2006
+ #
+ CONFIG_PARISC=y
+ CONFIG_MMU=y
+ CONFIG_STACK_GROWSUP=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+ 
+ #
+ # Code maturity level options
+@@ -31,6 +35,7 @@ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
++CONFIG_RELAY=y
+ CONFIG_INITRAMFS_SOURCE=""
+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+ # CONFIG_EMBEDDED is not set
+@@ -42,14 +47,12 @@ CONFIG_PRINTK=y
+ CONFIG_BUG=y
+ CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
+ CONFIG_FUTEX=y
+ CONFIG_EPOLL=y
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
+ CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+ # CONFIG_SLOB is not set
+@@ -60,7 +63,6 @@ #
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ CONFIG_MODULE_FORCE_UNLOAD=y
+-CONFIG_OBSOLETE_MODPARM=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+@@ -68,6 +70,7 @@ CONFIG_KMOD=y
+ #
+ # Block layer
+ #
++# CONFIG_BLK_DEV_IO_TRACE is not set
+ 
+ #
+ # IO Schedulers
+@@ -111,6 +114,7 @@ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+ CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_RESOURCES_64BIT is not set
+ # CONFIG_HPUX is not set
+ 
+ #
+@@ -125,7 +129,6 @@ CONFIG_EISA=y
+ CONFIG_EISA_NAMES=y
+ # CONFIG_ISA is not set
+ CONFIG_PCI=y
+-CONFIG_PCI_LEGACY_PROC=y
+ # CONFIG_PCI_DEBUG is not set
+ CONFIG_GSC_DINO=y
+ CONFIG_PCI_LBA=y
+@@ -166,6 +169,7 @@ #
+ CONFIG_SUPERIO=y
+ CONFIG_CHASSIS_LCD_LED=y
+ CONFIG_PDC_CHASSIS=y
++CONFIG_PDC_CHASSIS_WARN=y
+ CONFIG_PDC_STABLE=y
+ 
+ #
+@@ -205,18 +209,26 @@ # CONFIG_SYN_COOKIES is not set
+ CONFIG_INET_AH=m
+ CONFIG_INET_ESP=m
+ # CONFIG_INET_IPCOMP is not set
+-CONFIG_INET_TUNNEL=m
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
+ CONFIG_INET_DIAG=m
+ CONFIG_INET_TCP_DIAG=m
+ # CONFIG_TCP_CONG_ADVANCED is not set
+ CONFIG_TCP_CONG_BIC=y
+ CONFIG_IPV6=y
+ # CONFIG_IPV6_PRIVACY is not set
++# CONFIG_IPV6_ROUTER_PREF is not set
+ CONFIG_INET6_AH=y
+ CONFIG_INET6_ESP=y
+ CONFIG_INET6_IPCOMP=y
++CONFIG_INET6_XFRM_TUNNEL=y
+ CONFIG_INET6_TUNNEL=y
++CONFIG_INET6_XFRM_MODE_TRANSPORT=y
++CONFIG_INET6_XFRM_MODE_TUNNEL=y
+ # CONFIG_IPV6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
+ # CONFIG_NETFILTER is not set
+ 
+ #
+@@ -260,6 +272,7 @@ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
+ # CONFIG_IEEE80211 is not set
++CONFIG_WIRELESS_EXT=y
+ 
+ #
+ # Device Drivers
+@@ -272,6 +285,7 @@ # CONFIG_STANDALONE is not set
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+@@ -294,6 +308,7 @@ # CONFIG_PARPORT_PC_SUPERIO is not set
+ CONFIG_PARPORT_PC_PCMCIA=m
+ CONFIG_PARPORT_NOT_PC=y
+ CONFIG_PARPORT_GSC=y
++# CONFIG_PARPORT_AX88796 is not set
+ CONFIG_PARPORT_1284=y
+ 
+ #
+@@ -429,6 +444,7 @@ # CONFIG_MEGARAID_NEWGEN is not set
+ # CONFIG_MEGARAID_LEGACY is not set
+ # CONFIG_MEGARAID_SAS is not set
+ # CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
+ # CONFIG_SCSI_DMX3191D is not set
+ # CONFIG_SCSI_FUTURE_DOMAIN is not set
+ # CONFIG_SCSI_IPS is not set
+@@ -449,7 +465,6 @@ CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
+ CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
+ CONFIG_SCSI_NCR53C8XX_SYNC=20
+ # CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+-# CONFIG_SCSI_QLOGIC_FC is not set
+ # CONFIG_SCSI_QLOGIC_1280 is not set
+ # CONFIG_SCSI_QLA_FC is not set
+ # CONFIG_SCSI_LPFC is not set
+@@ -477,8 +492,8 @@ CONFIG_MD_LINEAR=y
+ CONFIG_MD_RAID0=y
+ CONFIG_MD_RAID1=y
+ CONFIG_MD_RAID10=y
+-CONFIG_MD_RAID5=y
+-CONFIG_MD_RAID6=y
++CONFIG_MD_RAID456=y
++CONFIG_MD_RAID5_RESHAPE=y
+ # CONFIG_MD_MULTIPATH is not set
+ # CONFIG_MD_FAULTY is not set
+ CONFIG_BLK_DEV_DM=y
+@@ -604,6 +619,7 @@ #
+ # CONFIG_CHELSIO_T1 is not set
+ # CONFIG_IXGB is not set
+ # CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
+ 
+ #
+ # Token Ring devices
+@@ -614,6 +630,7 @@ #
+ # Wireless LAN (non-hamradio)
+ #
+ CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
+ 
+ #
+ # Obsolete Wireless cards support (pre-802.11)
+@@ -630,6 +647,8 @@ # CONFIG_PCMCIA_RAYCS is not set
+ #
+ # Wireless 802.11b ISA/PCI cards support
+ #
++# CONFIG_IPW2100 is not set
++# CONFIG_IPW2200 is not set
+ CONFIG_HERMES=y
+ # CONFIG_PLX_HERMES is not set
+ # CONFIG_TMD_HERMES is not set
+@@ -649,6 +668,7 @@ #
+ # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+ #
+ # CONFIG_PRISM54 is not set
++# CONFIG_USB_ZD1201 is not set
+ # CONFIG_HOSTAP is not set
+ CONFIG_NET_WIRELESS=y
+ 
+@@ -757,6 +777,7 @@ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+@@ -764,6 +785,8 @@ # Serial drivers
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_GSC=y
++CONFIG_SERIAL_8250_PCI=y
+ CONFIG_SERIAL_8250_CS=y
+ CONFIG_SERIAL_8250_NR_UARTS=17
+ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+@@ -798,6 +821,7 @@ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
+ CONFIG_GEN_RTC=y
+ CONFIG_GEN_RTC_X=y
+ # CONFIG_DTLK is not set
+@@ -837,7 +861,6 @@ # CONFIG_SPI_MASTER is not set
+ #
+ # Dallas's 1-wire bus
+ #
+-# CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+@@ -850,27 +873,27 @@ # Misc devices
+ #
+ 
+ #
+-# Multimedia Capabilities Port drivers
+-#
+-
+-#
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
+ 
+ #
+ # Digital Video Broadcasting Devices
+ #
+ # CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Graphics support
+ #
++# CONFIG_FIRMWARE_EDID is not set
+ CONFIG_FB=y
+ CONFIG_FB_CFB_FILLRECT=y
+ CONFIG_FB_CFB_COPYAREA=y
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
+ CONFIG_FB_MODE_HELPERS=y
+ CONFIG_FB_TILEBLITTING=y
+ # CONFIG_FB_CIRRUS is not set
+@@ -883,7 +906,6 @@ # CONFIG_FB_S1D13XXX is not set
+ # CONFIG_FB_NVIDIA is not set
+ # CONFIG_FB_RIVA is not set
+ # CONFIG_FB_MATROX is not set
+-# CONFIG_FB_RADEON_OLD is not set
+ # CONFIG_FB_RADEON is not set
+ # CONFIG_FB_ATY128 is not set
+ # CONFIG_FB_ATY is not set
+@@ -938,22 +960,22 @@ #
+ CONFIG_SND=y
+ CONFIG_SND_TIMER=y
+ CONFIG_SND_PCM=y
+-CONFIG_SND_HWDEP=y
+ CONFIG_SND_SEQUENCER=y
+ # CONFIG_SND_SEQ_DUMMY is not set
+ CONFIG_SND_OSSEMUL=y
+ CONFIG_SND_MIXER_OSS=y
+ CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
+ CONFIG_SND_SEQUENCER_OSS=y
+ CONFIG_SND_DYNAMIC_MINORS=y
+ CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
+ # CONFIG_SND_VERBOSE_PRINTK is not set
+ # CONFIG_SND_DEBUG is not set
+ 
+ #
+ # Generic devices
+ #
+-CONFIG_SND_OPL3_LIB=y
+ CONFIG_SND_AC97_CODEC=y
+ CONFIG_SND_AC97_BUS=y
+ # CONFIG_SND_DUMMY is not set
+@@ -966,7 +988,7 @@ #
+ # PCI devices
+ #
+ CONFIG_SND_AD1889=y
+-CONFIG_SND_AD1889_OPL3=y
++# CONFIG_SND_ALS300 is not set
+ # CONFIG_SND_ALI5451 is not set
+ # CONFIG_SND_ATIIXP is not set
+ # CONFIG_SND_ATIIXP_MODEM is not set
+@@ -979,6 +1001,18 @@ # CONFIG_SND_CA0106 is not set
+ # CONFIG_SND_CMIPCI is not set
+ # CONFIG_SND_CS4281 is not set
+ # CONFIG_SND_CS46XX is not set
++# CONFIG_SND_DARLA20 is not set
++# CONFIG_SND_GINA20 is not set
++# CONFIG_SND_LAYLA20 is not set
++# CONFIG_SND_DARLA24 is not set
++# CONFIG_SND_GINA24 is not set
++# CONFIG_SND_LAYLA24 is not set
++# CONFIG_SND_MONA is not set
++# CONFIG_SND_MIA is not set
++# CONFIG_SND_ECHO3G is not set
++# CONFIG_SND_INDIGO is not set
++# CONFIG_SND_INDIGOIO is not set
++# CONFIG_SND_INDIGODJ is not set
+ # CONFIG_SND_EMU10K1 is not set
+ # CONFIG_SND_EMU10K1X is not set
+ # CONFIG_SND_ENS1370 is not set
+@@ -998,6 +1032,7 @@ # CONFIG_SND_MAESTRO3 is not set
+ # CONFIG_SND_MIXART is not set
+ # CONFIG_SND_NM256 is not set
+ # CONFIG_SND_PCXHR is not set
++# CONFIG_SND_RIPTIDE is not set
+ # CONFIG_SND_RME32 is not set
+ # CONFIG_SND_RME96 is not set
+ # CONFIG_SND_RME9652 is not set
+@@ -1016,6 +1051,8 @@ # CONFIG_SND_USB_AUDIO is not set
+ #
+ # PCMCIA devices
+ #
++# CONFIG_SND_VXPOCKET is not set
++# CONFIG_SND_PDAUDIOCF is not set
+ 
+ #
+ # GSC devices
+@@ -1032,6 +1069,7 @@ # USB support
+ #
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
+ CONFIG_USB=y
+ # CONFIG_USB_DEBUG is not set
+ 
+@@ -1057,7 +1095,6 @@ # CONFIG_USB_SL811_HCD is not set
+ #
+ # USB Device Class drivers
+ #
+-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
+ # CONFIG_USB_ACM is not set
+ # CONFIG_USB_PRINTER is not set
+ 
+@@ -1084,9 +1121,7 @@ # CONFIG_USB_WACOM is not set
+ # CONFIG_USB_ACECAD is not set
+ # CONFIG_USB_KBTAB is not set
+ # CONFIG_USB_POWERMATE is not set
+-# CONFIG_USB_MTOUCH is not set
+-# CONFIG_USB_ITMTOUCH is not set
+-# CONFIG_USB_EGALAX is not set
++# CONFIG_USB_TOUCHSCREEN is not set
+ # CONFIG_USB_YEALINK is not set
+ # CONFIG_USB_XPAD is not set
+ # CONFIG_USB_ATI_REMOTE is not set
+@@ -1101,15 +1136,6 @@ # CONFIG_USB_MDC800 is not set
+ # CONFIG_USB_MICROTEK is not set
+ 
+ #
+-# USB Multimedia devices
+-#
+-# CONFIG_USB_DABUSB is not set
+-
+-#
+-# Video4Linux support is needed for USB Multimedia device support
+-#
+-
+-#
+ # USB Network Adapters
+ #
+ # CONFIG_USB_CATC is not set
+@@ -1117,7 +1143,6 @@ # CONFIG_USB_KAWETH is not set
+ # CONFIG_USB_PEGASUS is not set
+ # CONFIG_USB_RTL8150 is not set
+ # CONFIG_USB_USBNET is not set
+-# CONFIG_USB_ZD1201 is not set
+ CONFIG_USB_MON=y
+ 
+ #
+@@ -1140,10 +1165,12 @@ # CONFIG_USB_RIO500 is not set
+ # CONFIG_USB_LEGOTOWER is not set
+ # CONFIG_USB_LCD is not set
+ # CONFIG_USB_LED is not set
++# CONFIG_USB_CY7C63 is not set
+ # CONFIG_USB_CYTHERM is not set
+ # CONFIG_USB_PHIDGETKIT is not set
+ # CONFIG_USB_PHIDGETSERVO is not set
+ # CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
+ # CONFIG_USB_LD is not set
+ # CONFIG_USB_TEST is not set
+ 
+@@ -1162,6 +1189,19 @@ #
+ # CONFIG_MMC is not set
+ 
+ #
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
+ # InfiniBand support
+ #
+ # CONFIG_INFINIBAND is not set
+@@ -1171,6 +1211,24 @@ # EDAC - error detection and reporting (
+ #
+ 
+ #
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
+ # File systems
+ #
+ CONFIG_EXT2_FS=y
+@@ -1188,6 +1246,7 @@ # CONFIG_OCFS2_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ CONFIG_AUTOFS_FS=y
+@@ -1221,7 +1280,6 @@ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
+ # CONFIG_CONFIGFS_FS is not set
+ 
+ #
+@@ -1268,7 +1326,9 @@ CONFIG_SMB_NLS_DEFAULT=y
+ CONFIG_SMB_NLS_REMOTE="cp437"
+ CONFIG_CIFS=m
+ # CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
+ # CONFIG_CIFS_XATTR is not set
++# CONFIG_CIFS_DEBUG2 is not set
+ # CONFIG_CIFS_EXPERIMENTAL is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+@@ -1336,14 +1396,19 @@ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+ CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
+ CONFIG_DEBUG_KERNEL=y
+ CONFIG_LOG_BUF_SHIFT=16
+ CONFIG_DETECT_SOFTLOCKUP=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
+-CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_INFO is not set
+ # CONFIG_DEBUG_FS is not set
+@@ -1401,3 +1466,4 @@ CONFIG_CRC32=y
+ CONFIG_LIBCRC32C=m
+ CONFIG_ZLIB_INFLATE=y
+ CONFIG_ZLIB_DEFLATE=y
++CONFIG_PLIST=y
+diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
+index d7c80ed..fc87f55 100644
+--- a/arch/parisc/hpux/fs.c
++++ b/arch/parisc/hpux/fs.c
+@@ -92,7 +92,7 @@ static int filldir(void * __buf, const c
+ 	put_user(namlen, &dirent->d_namlen);
+ 	copy_to_user(dirent->d_name, name, namlen);
+ 	put_user(0, dirent->d_name + namlen);
+-	((char *) dirent) += reclen;
++	dirent = (void __user *)dirent + reclen;
+ 	buf->current_dir = dirent;
+ 	buf->count -= reclen;
+ 	return 0;
+diff --git a/arch/parisc/kernel/binfmt_elf32.c b/arch/parisc/kernel/binfmt_elf32.c
+index d1833f1..1e64e7b 100644
+--- a/arch/parisc/kernel/binfmt_elf32.c
++++ b/arch/parisc/kernel/binfmt_elf32.c
+@@ -87,7 +87,7 @@ #define ELF_PLATFORM  ("PARISC32\0")
+  */
+ 
+ #define SET_PERSONALITY(ex, ibcs2) \
+-	current->personality = PER_LINUX32; \
++	set_thread_flag(TIF_32BIT); \
+ 	current->thread.map_base = DEFAULT_MAP_BASE32; \
+ 	current->thread.task_size = DEFAULT_TASK_SIZE32 \
+ 
+@@ -102,25 +102,3 @@ cputime_to_compat_timeval(const cputime_
+ }
+ 
+ #include "../../../fs/binfmt_elf.c"
+-
+-/* Set up a separate execution domain for ELF32 binaries running
+- * on an ELF64 kernel */
+-
+-static struct exec_domain parisc32_exec_domain = { 
+-	.name = "Linux/ELF32",
+-	.pers_low = PER_LINUX32,
+-	.pers_high = PER_LINUX32,
+-};      
+-
+-static int __init parisc32_exec_init(void)
+-{
+-	/* steal the identity signal mappings from the default domain */
+-	parisc32_exec_domain.signal_map = default_exec_domain.signal_map;
+-	parisc32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
+-
+-	register_exec_domain(&parisc32_exec_domain);
+-
+-	return 0;
+-}
+-
+-__initcall(parisc32_exec_init);
+diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
+index bc7c4a4..0be51e9 100644
+--- a/arch/parisc/kernel/cache.c
++++ b/arch/parisc/kernel/cache.c
+@@ -35,15 +35,12 @@ int icache_stride __read_mostly;
+ 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.
+  */
+ DEFINE_SPINLOCK(pa_tlb_lock);
+-EXPORT_SYMBOL(pa_tlb_lock);
+-#endif
+ 
+ struct pdc_cache_info cache_info __read_mostly;
+ #ifndef CONFIG_PA20
+@@ -91,7 +88,8 @@ update_mmu_cache(struct vm_area_struct *
+ 
+ 		flush_kernel_dcache_page(page);
+ 		clear_bit(PG_dcache_dirty, &page->flags);
+-	}
++	} else if (parisc_requires_coherency())
++		flush_kernel_dcache_page(page);
+ }
+ 
+ void
+@@ -370,3 +368,45 @@ void parisc_setup_cache_timing(void)
+ 
+ 	printk(KERN_INFO "Setting cache flush threshold to %x (%d CPUs online)\n", parisc_cache_flush_threshold, num_online_cpus());
+ }
++
++extern void purge_kernel_dcache_page(unsigned long);
++extern void clear_user_page_asm(void *page, unsigned long vaddr);
++
++void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
++{
++	purge_kernel_dcache_page((unsigned long)page);
++	purge_tlb_start();
++	pdtlb_kernel(page);
++	purge_tlb_end();
++	clear_user_page_asm(page, vaddr);
++}
++EXPORT_SYMBOL(clear_user_page);
++
++void flush_kernel_dcache_page_addr(void *addr)
++{
++	flush_kernel_dcache_page_asm(addr);
++	purge_tlb_start();
++	pdtlb_kernel(addr);
++	purge_tlb_end();
++}
++EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
++
++void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
++		    struct page *pg)
++{
++	/* no coherency needed (all in kmap/kunmap) */
++	copy_user_page_asm(vto, vfrom);
++	if (!parisc_requires_coherency())
++		flush_kernel_dcache_page_asm(vto);
++}
++EXPORT_SYMBOL(copy_user_page);
++
++#ifdef CONFIG_PA8X00
++
++void kunmap_parisc(void *addr)
++{
++	if (parisc_requires_coherency())
++		flush_kernel_dcache_page_addr(addr);
++}
++EXPORT_SYMBOL(kunmap_parisc);
++#endif
+diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
+index 95c1b8e..a659951 100644
+--- a/arch/parisc/kernel/entry.S
++++ b/arch/parisc/kernel/entry.S
+@@ -30,6 +30,7 @@ #include <asm/asm-offsets.h>
+ 
+ 
+ #include <asm/psw.h>
++#include <asm/cache.h>		/* for L1_CACHE_SHIFT */
+ #include <asm/assembly.h>	/* for LDREG/STREG defines */
+ #include <asm/pgtable.h>
+ #include <asm/signal.h>
+@@ -478,11 +479,7 @@ #endif
+ 	bb,>=,n		\pmd,_PxD_PRESENT_BIT,\fault
+ 	DEP		%r0,31,PxD_FLAG_SHIFT,\pmd /* clear flags */
+ 	copy		\pmd,%r9
+-#ifdef CONFIG_64BIT
+-	shld		%r9,PxD_VALUE_SHIFT,\pmd
+-#else
+-	shlw		%r9,PxD_VALUE_SHIFT,\pmd
+-#endif
++	SHLREG		%r9,PxD_VALUE_SHIFT,\pmd
+ 	EXTR		\va,31-PAGE_SHIFT,ASM_BITS_PER_PTE,\index
+ 	DEP		%r0,31,PAGE_SHIFT,\pmd  /* clear offset */
+ 	shladd		\index,BITS_PER_PTE_ENTRY,\pmd,\pmd
+@@ -970,11 +967,7 @@ #ifdef CONFIG_SMP
+ 	/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
+ 	** irq_stat[] is defined using ____cacheline_aligned.
+ 	*/
+-#ifdef CONFIG_64BIT
+-	shld	%r1, 6, %r20
+-#else
+-	shlw	%r1, 5, %r20
+-#endif
++	SHLREG	%r1,L1_CACHE_SHIFT,%r20
+ 	add     %r19,%r20,%r19	/* now have &irq_stat[smp_processor_id()] */
+ #endif /* CONFIG_SMP */
+ 
+@@ -1076,7 +1069,7 @@ intr_do_preempt:
+ 	BL	preempt_schedule_irq, %r2
+ 	nop
+ 
+-	b	intr_restore		/* ssm PSW_SM_I done by intr_restore */
++	b,n	intr_restore		/* ssm PSW_SM_I done by intr_restore */
+ #endif /* CONFIG_PREEMPT */
+ 
+ 	.import do_signal,code
+@@ -2115,11 +2108,7 @@ #ifdef CONFIG_SMP
+ 	ldw     TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
+ 
+ 	/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
+-#ifdef CONFIG_64BIT
+-	shld	%r26, 6, %r20
+-#else
+-	shlw	%r26, 5, %r20
+-#endif
++	SHLREG	%r26,L1_CACHE_SHIFT,%r20
+ 	add     %r19,%r20,%r19	/* now have &irq_stat[smp_processor_id()] */
+ #endif /* CONFIG_SMP */
+ 
+diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
+index 3058bff..db33fcb 100644
+--- a/arch/parisc/kernel/hardware.c
++++ b/arch/parisc/kernel/hardware.c
+@@ -231,6 +231,7 @@ static struct hp_hardware hp_hardware_li
+ 	{HPHW_NPROC,0x5E6,0x4,0x91,"Keystone/Matterhorn W2 650"},
+ 	{HPHW_NPROC,0x5E7,0x4,0x91,"Caribe W2 800"},
+ 	{HPHW_NPROC,0x5E8,0x4,0x91,"Pikes Peak W2"},
++	{HPHW_NPROC,0x5EB,0x4,0x91,"Perf/Leone 875 W2+"},
+ 	{HPHW_NPROC,0x5FF,0x4,0x91,"Hitachi W"},
+ 	{HPHW_NPROC,0x600,0x4,0x81,"Gecko (712/60)"},
+ 	{HPHW_NPROC,0x601,0x4,0x81,"Gecko 80 (712/80)"},
+@@ -584,8 +585,10 @@ static struct hp_hardware hp_hardware_li
+ 	{HPHW_CONSOLE, 0x01A, 0x0001F, 0x00, "Jason/Anole 64 Null Console"}, 
+ 	{HPHW_CONSOLE, 0x01B, 0x0001F, 0x00, "Jason/Anole 100 Null Console"}, 
+ 	{HPHW_FABRIC, 0x004, 0x000AA, 0x80, "Halfdome DNA Central Agent"}, 
++	{HPHW_FABRIC, 0x005, 0x000AA, 0x80, "Keystone DNA Central Agent"}, 
+ 	{HPHW_FABRIC, 0x007, 0x000AA, 0x80, "Caribe DNA Central Agent"}, 
+ 	{HPHW_FABRIC, 0x004, 0x000AB, 0x00, "Halfdome TOGO Fabric Crossbar"}, 
++	{HPHW_FABRIC, 0x005, 0x000AB, 0x00, "Keystone TOGO Fabric Crossbar"}, 
+ 	{HPHW_FABRIC, 0x004, 0x000AC, 0x00, "Halfdome Sakura Fabric Router"}, 
+ 	{HPHW_FIO, 0x025, 0x0002E, 0x80, "Armyknife Optional X.25"}, 
+ 	{HPHW_FIO, 0x004, 0x0004F, 0x0, "8-Port X.25 EISA-ACC (AMSO)"}, 
+diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
+index 5b8803c..9075603 100644
+--- a/arch/parisc/kernel/irq.c
++++ b/arch/parisc/kernel/irq.c
+@@ -35,9 +35,6 @@ #include <asm/smp.h>
+ 
+ #undef PARISC_IRQ_CR16_COUNTS
+ 
+-extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
+-extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *);
+-
+ #define EIEM_MASK(irq)       (1UL<<(CPU_IRQ_MAX - irq))
+ 
+ /* Bits in EIEM correlate with cpu_irq_action[].
+@@ -45,6 +42,17 @@ #define EIEM_MASK(irq)       (1UL<<(CPU_
+ */
+ static volatile unsigned long cpu_eiem = 0;
+ 
++/*
++** ack bitmap ... habitually set to 1, but reset to zero
++** between ->ack() and ->end() of the interrupt to prevent
++** re-interruption of a processing interrupt.
++*/
++static volatile unsigned long global_ack_eiem = ~0UL;
++/*
++** Local bitmap, same as above but for per-cpu interrupts
++*/
++static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
++
+ static void cpu_disable_irq(unsigned int irq)
+ {
+ 	unsigned long eirr_bit = EIEM_MASK(irq);
+@@ -62,13 +70,6 @@ static void cpu_enable_irq(unsigned int 
+ 
+ 	cpu_eiem |= eirr_bit;
+ 
+-	/* FIXME: while our interrupts aren't nested, we cannot reset
+-	 * the eiem mask if we're already in an interrupt.  Once we
+-	 * implement nested interrupts, this can go away
+-	 */
+-	if (!in_interrupt())
+-		set_eiem(cpu_eiem);
+-
+ 	/* This is just a simple NOP IPI.  But what it does is cause
+ 	 * all the other CPUs to do a set_eiem(cpu_eiem) at the end
+ 	 * of the interrupt handler */
+@@ -84,13 +85,45 @@ static unsigned int cpu_startup_irq(unsi
+ void no_ack_irq(unsigned int irq) { }
+ void no_end_irq(unsigned int irq) { }
+ 
++void cpu_ack_irq(struct irq_desc *dummy, unsigned int irq)
++{
++	unsigned long mask = EIEM_MASK(irq);
++	int cpu = smp_processor_id();
++
++	/* Clear in EIEM so we can no longer process */
++	if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
++		per_cpu(local_ack_eiem, cpu) &= ~mask;
++	else
++		global_ack_eiem &= ~mask;
++
++	/* disable the interrupt */
++	set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
++	/* and now ack it */
++	mtctl(mask, 23);
++}
++
++void cpu_end_irq(struct irq_desc *dummy, unsigned int irq)
++{
++	unsigned long mask = EIEM_MASK(irq);
++	int cpu = smp_processor_id();
++
++	/* set it in the eiems---it's no longer in process */
++	if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
++		per_cpu(local_ack_eiem, cpu) |= mask;
++	else
++		global_ack_eiem |= mask;
++
++	/* enable the interrupt */
++	set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
++}
++
+ #ifdef CONFIG_SMP
+ int cpu_check_affinity(unsigned int irq, cpumask_t *dest)
+ {
+ 	int cpu_dest;
+ 
+ 	/* timer and ipi have to always be received on all CPUs */
+-	if (irq == TIMER_IRQ || irq == IPI_IRQ) {
++	if (CHECK_IRQ_PER_CPU(irq)) {
+ 		/* Bad linux design decision.  The mask has already
+ 		 * been set; we must reset it */
+ 		irq_desc[irq].affinity = CPU_MASK_ALL;
+@@ -119,8 +152,6 @@ static struct hw_interrupt_type cpu_inte
+ 	.shutdown	= cpu_disable_irq,
+ 	.enable		= cpu_enable_irq,
+ 	.disable	= cpu_disable_irq,
+-	.ack		= no_ack_irq,
+-	.end		= no_end_irq,
+ #ifdef CONFIG_SMP
+ 	.set_affinity	= cpu_set_affinity_irq,
+ #endif
+@@ -209,7 +240,7 @@ #endif
+ ** Then use that to get the Transaction address and data.
+ */
+ 
+-int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *type, void *data)
++int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
+ {
+ 	if (irq_desc[irq].action)
+ 		return -EBUSY;
+@@ -217,8 +248,8 @@ int cpu_claim_irq(unsigned int irq, stru
+ 		return -EBUSY;
+ 
+ 	if (type) {
+-		irq_desc[irq].chip = type;
+-		irq_desc[irq].chip_data = data;
++		set_irq_chip(irq, type);
++		set_irq_chip_data(irq, data);
+ 		cpu_interrupt_type.enable(irq);
+ 	}
+ 	return 0;
+@@ -298,97 +329,86 @@ unsigned int txn_alloc_data(unsigned int
+ 	return virt_irq - CPU_IRQ_BASE;
+ }
+ 
++static inline int eirr_to_irq(unsigned long eirr)
++{
++#ifdef CONFIG_64BIT
++	int bit = fls64(eirr);
++#else
++	int bit = fls(eirr);
++#endif
++	return (BITS_PER_LONG - bit) + TIMER_IRQ;
++}
++
+ /* ONLY called from entry.S:intr_extint() */
+ void do_cpu_irq_mask(struct pt_regs *regs)
+ {
+ 	unsigned long eirr_val;
+-
+-	irq_enter();
+-
+-	/*
+-	 * Don't allow TIMER or IPI nested interrupts.
+-	 * Allowing any single interrupt to nest can lead to that CPU
+-	 * handling interrupts with all enabled interrupts unmasked.
+-	 */
+-	set_eiem(0UL);
+-
+-	/* 1) only process IRQs that are enabled/unmasked (cpu_eiem)
+-	 * 2) We loop here on EIRR contents in order to avoid
+-	 *    nested interrupts or having to take another interrupt
+-	 *    when we could have just handled it right away.
+-	 */
+-	for (;;) {
+-		unsigned long bit = (1UL << (BITS_PER_LONG - 1));
+-		unsigned int irq;
+-		eirr_val = mfctl(23) & cpu_eiem;
+-		if (!eirr_val)
+-			break;
+-
+-		mtctl(eirr_val, 23); /* reset bits we are going to process */
+-
+-		/* Work our way from MSb to LSb...same order we alloc EIRs */
+-		for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
++	int irq, cpu = smp_processor_id();
+ #ifdef CONFIG_SMP
+-			cpumask_t dest = irq_desc[irq].affinity;
++	cpumask_t dest;
+ #endif
+-			if (!(bit & eirr_val))
+-				continue;
+ 
+-			/* clear bit in mask - can exit loop sooner */
+-			eirr_val &= ~bit;
++	local_irq_disable();
++	irq_enter();
+ 
+-#ifdef CONFIG_SMP
+-			/* FIXME: because generic set affinity mucks
+-			 * with the affinity before sending it to us
+-			 * we can get the situation where the affinity is
+-			 * wrong for our CPU type interrupts */
+-			if (irq != TIMER_IRQ && irq != IPI_IRQ &&
+-			    !cpu_isset(smp_processor_id(), dest)) {
+-				int cpu = first_cpu(dest);
+-
+-				printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
+-				       irq, smp_processor_id(), cpu);
+-				gsc_writel(irq + CPU_IRQ_BASE,
+-					   cpu_data[cpu].hpa);
+-				continue;
+-			}
+-#endif
++	eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem &
++		per_cpu(local_ack_eiem, cpu);
++	if (!eirr_val)
++		goto set_out;
++	irq = eirr_to_irq(eirr_val);
+ 
+-			__do_IRQ(irq, regs);
+-		}
++#ifdef CONFIG_SMP
++	dest = irq_desc[irq].affinity;
++	if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
++	    !cpu_isset(smp_processor_id(), dest)) {
++		int cpu = first_cpu(dest);
++
++		printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
++		       irq, smp_processor_id(), cpu);
++		gsc_writel(irq + CPU_IRQ_BASE,
++			   cpu_data[cpu].hpa);
++		goto set_out;
+ 	}
++#endif
++	generic_handle_irq(irq, regs);
+ 
+-	set_eiem(cpu_eiem);	/* restore original mask */
++ out:
+ 	irq_exit();
+-}
++	return;
+ 
++ set_out:
++	set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
++	goto out;
++}
+ 
+ static struct irqaction timer_action = {
+ 	.handler = timer_interrupt,
+ 	.name = "timer",
+-	.flags = IRQF_DISABLED,
++	.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_PERCPU,
+ };
+ 
+ #ifdef CONFIG_SMP
+ static struct irqaction ipi_action = {
+ 	.handler = ipi_interrupt,
+ 	.name = "IPI",
+-	.flags = IRQF_DISABLED,
++	.flags = IRQF_DISABLED | IRQF_PERCPU,
+ };
+ #endif
+ 
+ static void claim_cpu_irqs(void)
+ {
+ 	int i;
+-	for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
+-		irq_desc[i].chip = &cpu_interrupt_type;
+-	}
++	for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++)
++		set_irq_chip_and_handler(i, &cpu_interrupt_type,
++					 handle_level_irq_chip);
+ 
+ 	irq_desc[TIMER_IRQ].action = &timer_action;
+ 	irq_desc[TIMER_IRQ].status |= IRQ_PER_CPU;
++	set_irq_handler(TIMER_IRQ, handle_specific_irq_timer);
+ #ifdef CONFIG_SMP
+ 	irq_desc[IPI_IRQ].action = &ipi_action;
+ 	irq_desc[IPI_IRQ].status = IRQ_PER_CPU;
++	set_irq_handler(IPI_IRQ, handle_specific_irq_ipi);
+ #endif
+ }
+ 
+diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
+index 99d7fca..fb81e56 100644
+--- a/arch/parisc/kernel/processor.c
++++ b/arch/parisc/kernel/processor.c
+@@ -143,8 +143,9 @@ #endif
+ 	p = &cpu_data[cpuid];
+ 	boot_cpu_data.cpu_count++;
+ 
+-	/* initialize counters */
+-	memset(p, 0, sizeof(struct cpuinfo_parisc));
++	/* initialize counters - CPU 0 gets it_value set in time_init() */
++	if (cpuid)
++		memset(p, 0, sizeof(struct cpuinfo_parisc));
+ 
+ 	p->loops_per_jiffy = loops_per_jiffy;
+ 	p->dev = dev;		/* Save IODC data in case we need it */
+diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
+index bb83880..9a04272 100644
+--- a/arch/parisc/kernel/signal.c
++++ b/arch/parisc/kernel/signal.c
+@@ -26,7 +26,6 @@ #include <linux/unistd.h>
+ #include <linux/stddef.h>
+ #include <linux/compat.h>
+ #include <linux/elf.h>
+-#include <linux/personality.h>
+ #include <asm/ucontext.h>
+ #include <asm/rt_sigframe.h>
+ #include <asm/uaccess.h>
+@@ -35,7 +34,6 @@ #include <asm/cacheflush.h>
+ #include <asm/asm-offsets.h>
+ 
+ #ifdef CONFIG_COMPAT
+-#include <linux/compat.h>
+ #include "signal32.h"
+ #endif
+ 
+@@ -318,6 +316,7 @@ #ifdef __LP64__
+ 	if (is_compat_task()) {
+ 		DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info);
+ 		err |= copy_siginfo_to_user32(&compat_frame->info, info);
++
+ 		DBG(1,"SETUP_RT_FRAME: 1\n");
+ 		compat_val = (compat_int_t)current->sas_ss_sp;
+ 		err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_sp);
+@@ -433,13 +432,13 @@ #endif
+ 	if (in_syscall) {
+ 		regs->gr[31] = haddr;
+ #ifdef __LP64__
+-		if (personality(current->personality) == PER_LINUX)
++		if (!test_thread_flag(TIF_32BIT))
+ 			sigframe_size |= 1;
+ #endif
+ 	} else {
+ 		unsigned long psw = USER_PSW;
+ #ifdef __LP64__
+-		if (personality(current->personality) == PER_LINUX)
++		if (!test_thread_flag(TIF_32BIT))
+ 			psw |= PSW_W;
+ #endif
+ 
+diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
+index e39b38a..73fbd5a 100644
+--- a/arch/parisc/kernel/signal32.h
++++ b/arch/parisc/kernel/signal32.h
+@@ -73,7 +73,6 @@ typedef struct compat_siginfo {
+                 struct {
+                         compat_timer_t _tid;            /* timer id */
+                         int _overrun;           /* overrun count */
+-                        char _pad[sizeof(unsigned int) - sizeof(int)];
+                         compat_sigval_t _sigval;        /* same as below */
+                         int _sys_private;       /* not to be passed to user */
+                 } _timer;
+diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
+index 98e4095..faad338 100644
+--- a/arch/parisc/kernel/smp.c
++++ b/arch/parisc/kernel/smp.c
+@@ -262,6 +262,9 @@ #endif /* kDEBUG */
+ 					this_cpu, which);
+ 				return IRQ_NONE;
+ 			} /* Switch */
++		/* let in any pending interrupts */
++		local_irq_enable();
++		local_irq_disable();
+ 		} /* while (ops) */
+ 	}
+ 	return IRQ_HANDLED;
+@@ -430,8 +433,9 @@ smp_do_timer(struct pt_regs *regs)
+ static void __init
+ smp_cpu_init(int cpunum)
+ {
+-	extern int init_per_cpu(int);  /* arch/parisc/kernel/setup.c */
++	extern int init_per_cpu(int);  /* arch/parisc/kernel/processor.c */
+ 	extern void init_IRQ(void);    /* arch/parisc/kernel/irq.c */
++	extern void start_cpu_itimer(void); /* arch/parisc/kernel/time.c */
+ 
+ 	/* Set modes and Enable floating point coprocessor */
+ 	(void) init_per_cpu(cpunum);
+@@ -457,6 +461,7 @@ smp_cpu_init(int cpunum)
+ 	enter_lazy_tlb(&init_mm, current);
+ 
+ 	init_IRQ();   /* make sure no IRQ's are enabled or pending */
++	start_cpu_itimer();
+ }
+ 
+ 
+diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
+index 8b5df98..eeca660 100644
+--- a/arch/parisc/kernel/sys_parisc.c
++++ b/arch/parisc/kernel/sys_parisc.c
+@@ -31,6 +31,8 @@ #include <linux/mman.h>
+ #include <linux/shm.h>
+ #include <linux/smp_lock.h>
+ #include <linux/syscalls.h>
++#include <linux/utsname.h>
++#include <linux/personality.h>
+ 
+ int sys_pipe(int __user *fildes)
+ {
+@@ -248,3 +250,46 @@ asmlinkage int sys_free_hugepages(unsign
+ {
+ 	return -EINVAL;
+ }
++
++long parisc_personality(unsigned long personality)
++{
++	long err;
++
++	if (personality(current->personality) == PER_LINUX32
++	    && personality == PER_LINUX)
++		personality = PER_LINUX32;
++
++	err = sys_personality(personality);
++	if (err == PER_LINUX32)
++		err = PER_LINUX;
++	
++	return err;
++}
++
++static inline int override_machine(char __user *mach) {
++#ifdef CONFIG_COMPAT
++	if (personality(current->personality) == PER_LINUX32) {
++		if (__put_user(0, mach + 6) ||
++		    __put_user(0, mach + 7))
++			return -EFAULT;
++	}
++
++	return 0;
++#else /*!CONFIG_COMPAT*/
++	return 0;
++#endif /*CONFIG_COMPAT*/
++}
++
++long parisc_newuname(struct new_utsname __user *utsname)
++{
++	int err = 0;
++
++	down_read(&uts_sem);
++	if (copy_to_user(utsname, &system_utsname, sizeof(*utsname)))
++		err = -EFAULT;
++	up_read(&uts_sem);
++
++	err = override_machine(utsname->machine);
++
++	return (long)err;
++}
+diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
+index e27b432..701d66a 100644
+--- a/arch/parisc/kernel/syscall_table.S
++++ b/arch/parisc/kernel/syscall_table.S
+@@ -132,7 +132,7 @@ #endif
+ 	ENTRY_SAME(socketpair)
+ 	ENTRY_SAME(setpgid)
+ 	ENTRY_SAME(send)
+-	ENTRY_SAME(newuname)
++	ENTRY_OURS(newuname)
+ 	ENTRY_SAME(umask)		/* 60 */
+ 	ENTRY_SAME(chroot)
+ 	ENTRY_SAME(ustat)
+@@ -221,7 +221,7 @@ #endif
+ 	ENTRY_SAME(fchdir)
+ 	ENTRY_SAME(bdflush)
+ 	ENTRY_SAME(sysfs)		/* 135 */
+-	ENTRY_SAME(personality)
++	ENTRY_OURS(personality)
+ 	ENTRY_SAME(ni_syscall)	/* for afs_syscall */
+ 	ENTRY_SAME(setfsuid)
+ 	ENTRY_SAME(setfsgid)
+diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
+index 5facc9b..acb8b31 100644
+--- a/arch/parisc/kernel/time.c
++++ b/arch/parisc/kernel/time.c
+@@ -35,8 +35,7 @@ #include <linux/timex.h>
+ /* xtime and wall_jiffies keep wall-clock time */
+ extern unsigned long wall_jiffies;
+ 
+-static long clocktick __read_mostly;	/* timer cycles per tick */
+-static long halftick __read_mostly;
++static unsigned long clocktick __read_mostly;	/* timer cycles per tick */
+ 
+ #ifdef CONFIG_SMP
+ extern void smp_do_timer(struct pt_regs *regs);
+@@ -44,46 +43,106 @@ #endif
+ 
+ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+ {
+-	long now;
+-	long next_tick;
+-	int nticks;
+-	int cpu = smp_processor_id();
++	unsigned long now;
++	unsigned long next_tick;
++	unsigned long cycles_elapsed;
++	unsigned long cycles_remainder;
++	unsigned int cpu = smp_processor_id();
++
++	/* gcc can optimize for "read-only" case with a local clocktick */
++	unsigned long cpt = clocktick;
+ 
+ 	profile_tick(CPU_PROFILING, regs);
+ 
+-	now = mfctl(16);
+-	/* initialize next_tick to time at last clocktick */
++	/* Initialize next_tick to the expected tick time. */
+ 	next_tick = cpu_data[cpu].it_value;
+ 
+-	/* since time passes between the interrupt and the mfctl()
+-	 * above, it is never true that last_tick + clocktick == now.  If we
+-	 * never miss a clocktick, we could set next_tick = last_tick + clocktick
+-	 * but maybe we'll miss ticks, hence the loop.
+-	 *
+-	 * Variables are *signed*.
++	/* Get current interval timer.
++	 * CR16 reads as 64 bits in CPU wide mode.
++	 * CR16 reads as 32 bits in CPU narrow mode.
+ 	 */
++	now = mfctl(16);
++
++	cycles_elapsed = now - next_tick;
+ 
+-	nticks = 0;
+-	while((next_tick - now) < halftick) {
+-		next_tick += clocktick;
+-		nticks++;
++	if ((cycles_elapsed >> 5) < cpt) {
++		/* use "cheap" math (add/subtract) instead
++		 * of the more expensive div/mul method
++		 */
++		cycles_remainder = cycles_elapsed;
++		while (cycles_remainder > cpt) {
++			cycles_remainder -= cpt;
++		}
++	} else {
++		cycles_remainder = cycles_elapsed % cpt;
+ 	}
+-	mtctl(next_tick, 16);
++
++	/* Can we differentiate between "early CR16" (aka Scenario 1) and
++	 * "long delay" (aka Scenario 3)? I don't think so.
++	 *
++	 * We expected timer_interrupt to be delivered at least a few hundred
++	 * cycles after the IT fires. But it's arbitrary how much time passes
++	 * before we call it "late". I've picked one second.
++	 */
++/* aproximate HZ with shifts. Intended math is "(elapsed/clocktick) > HZ" */
++#if HZ == 1000
++	if (cycles_elapsed > (cpt << 10) )
++#elif HZ == 250
++	if (cycles_elapsed > (cpt << 8) )
++#elif HZ == 100
++	if (cycles_elapsed > (cpt << 7) )
++#else
++#warn WTF is HZ set to anyway?
++	if (cycles_elapsed > (HZ * cpt) )
++#endif
++	{
++		/* Scenario 3: very long delay?  bad in any case */
++		printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!"
++			" cycles %lX rem %lX "
++			" next/now %lX/%lX\n",
++			cpu,
++			cycles_elapsed, cycles_remainder,
++			next_tick, now );
++	}
++
++	/* convert from "division remainder" to "remainder of clock tick" */
++	cycles_remainder = cpt - cycles_remainder;
++
++	/* Determine when (in CR16 cycles) next IT interrupt will fire.
++	 * We want IT to fire modulo clocktick even if we miss/skip some.
++	 * But those interrupts don't in fact get delivered that regularly.
++	 */
++	next_tick = now + cycles_remainder;
++
+ 	cpu_data[cpu].it_value = next_tick;
+ 
+-	while (nticks--) {
++	/* Skip one clocktick on purpose if we are likely to miss next_tick.
++	 * We want to avoid the new next_tick being less than CR16.
++	 * If that happened, itimer wouldn't fire until CR16 wrapped.
++	 * We'll catch the tick we missed on the tick after that.
++	 */
++	if (!(cycles_remainder >> 13))
++		next_tick += cpt;
++
++	/* Program the IT when to deliver the next interrupt. */
++        /* Only bottom 32-bits of next_tick are written to cr16.  */
++	mtctl(next_tick, 16);
++
++
++	/* Done mucking with unreliable delivery of interrupts.
++	 * Go do system house keeping.
++	 */
+ #ifdef CONFIG_SMP
+-		smp_do_timer(regs);
++	smp_do_timer(regs);
+ #else
+-		update_process_times(user_mode(regs));
++	update_process_times(user_mode(regs));
+ #endif
+-		if (cpu == 0) {
+-			write_seqlock(&xtime_lock);
+-			do_timer(regs);
+-			write_sequnlock(&xtime_lock);
+-		}
++	if (cpu == 0) {
++		write_seqlock(&xtime_lock);
++		do_timer(regs);
++		write_sequnlock(&xtime_lock);
+ 	}
+-    
++
+ 	/* check soft power switch status */
+ 	if (cpu == 0 && !atomic_read(&power_tasklet.count))
+ 		tasklet_schedule(&power_tasklet);
+@@ -109,14 +168,12 @@ #endif
+ EXPORT_SYMBOL(profile_pc);
+ 
+ 
+-/*** converted from ia64 ***/
+ /*
+  * Return the number of micro-seconds that elapsed since the last
+  * update to wall time (aka xtime aka wall_jiffies).  The xtime_lock
+  * must be at least read-locked when calling this routine.
+  */
+-static inline unsigned long
+-gettimeoffset (void)
++static inline unsigned long gettimeoffset (void)
+ {
+ #ifndef CONFIG_SMP
+ 	/*
+@@ -124,21 +181,47 @@ #ifndef CONFIG_SMP
+ 	 *    Once parisc-linux learns the cr16 difference between processors,
+ 	 *    this could be made to work.
+ 	 */
+-	long last_tick;
+-	long elapsed_cycles;
+-
+-	/* it_value is the intended time of the next tick */
+-	last_tick = cpu_data[smp_processor_id()].it_value;
++	unsigned long now;
++	unsigned long prev_tick;
++	unsigned long next_tick;
++	unsigned long elapsed_cycles;
++	unsigned long usec;
++	unsigned long cpuid = smp_processor_id();
++	unsigned long cpt = clocktick;
++
++	next_tick = cpu_data[cpuid].it_value;
++	now = mfctl(16);	/* Read the hardware interval timer.  */
++
++	prev_tick = next_tick - cpt;
++
++	/* Assume Scenario 1: "now" is later than prev_tick.  */
++	elapsed_cycles = now - prev_tick;
++
++/* aproximate HZ with shifts. Intended math is "(elapsed/clocktick) > HZ" */
++#if HZ == 1000
++	if (elapsed_cycles > (cpt << 10) )
++#elif HZ == 250
++	if (elapsed_cycles > (cpt << 8) )
++#elif HZ == 100
++	if (elapsed_cycles > (cpt << 7) )
++#else
++#warn WTF is HZ set to anyway?
++	if (elapsed_cycles > (HZ * cpt) )
++#endif
++	{
++		/* Scenario 3: clock ticks are missing. */
++		printk (KERN_CRIT "gettimeoffset(CPU %ld): missing %ld ticks!"
++			" cycles %lX prev/now/next %lX/%lX/%lX  clock %lX\n",
++			cpuid, elapsed_cycles / cpt,
++			elapsed_cycles, prev_tick, now, next_tick, cpt);
++	}
+ 
+-	/* Subtract one tick and account for possible difference between
+-	 * when we expected the tick and when it actually arrived.
+-	 * (aka wall vs real)
+-	 */
+-	last_tick -= clocktick * (jiffies - wall_jiffies + 1);
+-	elapsed_cycles = mfctl(16) - last_tick;
++	/* FIXME: Can we improve the precision? Not with PAGE0. */
++	usec = (elapsed_cycles * 10000) / PAGE0->mem_10msec;
+ 
+-	/* the precision of this math could be improved */
+-	return elapsed_cycles / (PAGE0->mem_10msec / 10000);
++	/* add in "lost" jiffies */
++	usec += cpt * (jiffies - wall_jiffies);
++	return usec;
+ #else
+ 	return 0;
+ #endif
+@@ -149,6 +232,7 @@ do_gettimeofday (struct timeval *tv)
+ {
+ 	unsigned long flags, seq, usec, sec;
+ 
++	/* Hold xtime_lock and adjust timeval.  */
+ 	do {
+ 		seq = read_seqbegin_irqsave(&xtime_lock, flags);
+ 		usec = gettimeoffset();
+@@ -156,25 +240,13 @@ do_gettimeofday (struct timeval *tv)
+ 		usec += (xtime.tv_nsec / 1000);
+ 	} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
+ 
+-	if (unlikely(usec > LONG_MAX)) {
+-		/* This can happen if the gettimeoffset adjustment is
+-		 * negative and xtime.tv_nsec is smaller than the
+-		 * adjustment */
+-		printk(KERN_ERR "do_gettimeofday() spurious xtime.tv_nsec of %ld\n", usec);
+-		usec += USEC_PER_SEC;
+-		--sec;
+-		/* This should never happen, it means the negative
+-		 * time adjustment was more than a second, so there's
+-		 * something seriously wrong */
+-		BUG_ON(usec > LONG_MAX);
+-	}
+-
+-
++	/* Move adjusted usec's into sec's.  */
+ 	while (usec >= USEC_PER_SEC) {
+ 		usec -= USEC_PER_SEC;
+ 		++sec;
+ 	}
+ 
++	/* Return adjusted result.  */
+ 	tv->tv_sec = sec;
+ 	tv->tv_usec = usec;
+ }
+@@ -226,22 +298,23 @@ unsigned long long sched_clock(void)
+ }
+ 
+ 
++void __init start_cpu_itimer(void)
++{
++	unsigned int cpu = smp_processor_id();
++	unsigned long next_tick = mfctl(16) + clocktick;
++
++	mtctl(next_tick, 16);		/* kick off Interval Timer (CR16) */
++
++	cpu_data[cpu].it_value = next_tick;
++}
++
+ void __init time_init(void)
+ {
+-	unsigned long next_tick;
+ 	static struct pdc_tod tod_data;
+ 
+ 	clocktick = (100 * PAGE0->mem_10msec) / HZ;
+-	halftick = clocktick / 2;
+ 
+-	/* Setup clock interrupt timing */
+-
+-	next_tick = mfctl(16);
+-	next_tick += clocktick;
+-	cpu_data[smp_processor_id()].it_value = next_tick;
+-
+-	/* kick off Itimer (CR16) */
+-	mtctl(next_tick, 16);
++	start_cpu_itimer();	/* get CPU 0 started */
+ 
+ 	if(pdc_tod_read(&tod_data) == 0) {
+ 		write_seqlock_irq(&xtime_lock);
+diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
+index f2b96f1..780f344 100644
+--- a/arch/parisc/mm/init.c
++++ b/arch/parisc/mm/init.c
+@@ -31,10 +31,7 @@ #include <asm/sections.h>
+ 
+ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
+ 
+-extern char _text;	/* start of kernel code, defined by linker */
+ extern int  data_start;
+-extern char _end;	/* end of BSS, defined by linker */
+-extern char __init_begin, __init_end;
+ 
+ #ifdef CONFIG_DISCONTIGMEM
+ struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
+@@ -319,8 +316,8 @@ #define PDC_CONSOLE_IO_IODC_SIZE 32768
+ 
+ 	reserve_bootmem_node(NODE_DATA(0), 0UL,
+ 			(unsigned long)(PAGE0->mem_free + PDC_CONSOLE_IO_IODC_SIZE));
+-	reserve_bootmem_node(NODE_DATA(0),__pa((unsigned long)&_text),
+-			(unsigned long)(&_end - &_text));
++	reserve_bootmem_node(NODE_DATA(0), __pa((unsigned long)_text),
++			(unsigned long)(_end - _text));
+ 	reserve_bootmem_node(NODE_DATA(0), (bootmap_start_pfn << PAGE_SHIFT),
+ 			((bootmap_pfn - bootmap_start_pfn) << PAGE_SHIFT));
+ 
+@@ -355,8 +352,8 @@ #ifdef CONFIG_BLK_DEV_INITRD
+ #endif
+ 
+ 	data_resource.start =  virt_to_phys(&data_start);
+-	data_resource.end = virt_to_phys(&_end)-1;
+-	code_resource.start = virt_to_phys(&_text);
++	data_resource.end = virt_to_phys(_end) - 1;
++	code_resource.start = virt_to_phys(_text);
+ 	code_resource.end = virt_to_phys(&data_start)-1;
+ 
+ 	/* We don't know which region the kernel will be in, so try
+@@ -385,12 +382,12 @@ #ifdef CONFIG_DEBUG_KERNEL
+ 	 */
+ 	local_irq_disable();
+ 
+-	memset(&__init_begin, 0x00, 
+-		(unsigned long)&__init_end - (unsigned long)&__init_begin);
++	memset(__init_begin, 0x00,
++		(unsigned long)__init_end - (unsigned long)__init_begin);
+ 
+ 	flush_data_cache();
+ 	asm volatile("sync" : : );
+-	flush_icache_range((unsigned long)&__init_begin, (unsigned long)&__init_end);
++	flush_icache_range((unsigned long)__init_begin, (unsigned long)__init_end);
+ 	asm volatile("sync" : : );
+ 
+ 	local_irq_enable();
+@@ -398,8 +395,8 @@ #endif
+ 	
+ 	/* align __init_begin and __init_end to page size,
+ 	   ignoring linker script where we might have tried to save RAM */
+-	init_begin = PAGE_ALIGN((unsigned long)(&__init_begin));
+-	init_end   = PAGE_ALIGN((unsigned long)(&__init_end));
++	init_begin = PAGE_ALIGN((unsigned long)(__init_begin));
++	init_end   = PAGE_ALIGN((unsigned long)(__init_end));
+ 	for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) {
+ 		ClearPageReserved(virt_to_page(addr));
+ 		init_page_count(virt_to_page(addr));
+@@ -578,7 +575,7 @@ static void __init map_pages(unsigned lo
+ 	extern const unsigned long fault_vector_20;
+ 	extern void * const linux_gateway_page;
+ 
+-	ro_start = __pa((unsigned long)&_text);
++	ro_start = __pa((unsigned long)_text);
+ 	ro_end   = __pa((unsigned long)&data_start);
+ 	fv_addr  = __pa((unsigned long)&fault_vector_20) & PAGE_MASK;
+ 	gw_addr  = __pa((unsigned long)&linux_gateway_page) & PAGE_MASK;
+diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c
+index 2738456..47a1d2a 100644
+--- a/arch/parisc/mm/ioremap.c
++++ b/arch/parisc/mm/ioremap.c
+@@ -188,7 +188,7 @@ #endif
+ }
+ EXPORT_SYMBOL(__ioremap);
+ 
+-void iounmap(void __iomem *addr)
++void iounmap(const volatile void __iomem *addr)
+ {
+ 	if (addr > high_memory)
+ 		return vfree((void *) (PAGE_MASK & (unsigned long __force) addr));
+diff --git a/block/Kconfig b/block/Kconfig
+index b6f5f0a..973be43 100644
+--- a/block/Kconfig
++++ b/block/Kconfig
+@@ -1,11 +1,9 @@
+ #
+ # Block layer core configuration
+ #
+-#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64
+-#for instance.
+ config LBD
+ 	bool "Support for Large Block Devices"
+-	depends on X86 || (MIPS && 32BIT) || PPC32 || (S390 && !64BIT) || SUPERH || UML
++	depends on !64BIT
+ 	help
+ 	  Say Y here if you want to attach large (bigger than 2TB) discs to
+ 	  your machine, or if you want to have a raid or loopback device
+@@ -26,7 +24,7 @@ config BLK_DEV_IO_TRACE
+ 
+ config LSF
+ 	bool "Support for Large Single Files"
+-	depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML
++	depends on !64BIT
+ 	help
+ 	  Say Y here if you want to be able to handle very large files (bigger
+ 	  than 2TB), otherwise say N.
+diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig
+index 22f8cf2..a9f9c48 100644
+--- a/drivers/char/agp/Kconfig
++++ b/drivers/char/agp/Kconfig
+@@ -1,6 +1,6 @@
+ config AGP
+ 	tristate "/dev/agpgart (AGP Support)"
+-	depends on ALPHA || IA64 || PPC || X86
++	depends on ALPHA || IA64 || PARISC || PPC || X86
+ 	depends on PCI
+ 	---help---
+ 	  AGP (Accelerated Graphics Port) is a bus system mainly used to
+@@ -86,7 +86,7 @@ config AGP_NVIDIA
+ 
+ config AGP_SIS
+ 	tristate "SiS chipset support"
+-	depends on AGP
++	depends on AGP && X86
+ 	help
+ 	  This option gives you AGP support for the GLX component of
+ 	  X on Silicon Integrated Systems [SiS] chipsets.
+@@ -103,7 +103,7 @@ config AGP_SWORKS
+ 
+ config AGP_VIA
+ 	tristate "VIA chipset support"
+-	depends on AGP
++	depends on AGP && X86
+ 	help
+ 	  This option gives you AGP support for the GLX component of
+ 	  X on VIA MVP3/Apollo Pro chipsets.
+@@ -122,6 +122,14 @@ config AGP_HP_ZX1
+ 	  This option gives you AGP GART support for the HP ZX1 chipset
+ 	  for IA64 processors.
+ 
++config AGP_PARISC
++	tristate "HP Quicksilver AGP support"
++	depends on AGP && PARISC && 64BIT
++	help
++	  This option gives you AGP GART support for the HP Quicksilver
++	  AGP bus adapter on HP PA-RISC machines (Ok, just on the C8000
++	  workstation...)
++
+ config AGP_ALPHA_CORE
+ 	tristate "Alpha AGP support"
+ 	depends on AGP && (ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL)
+diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile
+index d33a22f..3e58160 100644
+--- a/drivers/char/agp/Makefile
++++ b/drivers/char/agp/Makefile
+@@ -8,6 +8,7 @@ obj-$(CONFIG_AGP_AMD64)		+= amd64-agp.o
+ obj-$(CONFIG_AGP_ALPHA_CORE)	+= alpha-agp.o
+ obj-$(CONFIG_AGP_EFFICEON)	+= efficeon-agp.o
+ obj-$(CONFIG_AGP_HP_ZX1)	+= hp-agp.o
++obj-$(CONFIG_AGP_PARISC)	+= parisc-agp.o
+ obj-$(CONFIG_AGP_I460)		+= i460-agp.o
+ obj-$(CONFIG_AGP_INTEL)		+= intel-agp.o
+ obj-$(CONFIG_AGP_NVIDIA)	+= nvidia-agp.o
+diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
+new file mode 100644
+index 0000000..17c50b0
+--- /dev/null
++++ b/drivers/char/agp/parisc-agp.c
+@@ -0,0 +1,416 @@
++/*
++ * HP Quicksilver AGP GART routines
++ *
++ * Copyright (c) 2006, Kyle McMartin <kyle at parisc-linux.org>
++ *
++ * Based on drivers/char/agpgart/hp-agp.c which is
++ * (c) Copyright 2002, 2003 Hewlett-Packard Development Company, L.P.
++ *	Bjorn Helgaas <bjorn.helgaas at hp.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/pci.h>
++#include <linux/init.h>
++#include <linux/klist.h>
++#include <linux/agp_backend.h>
++
++#include <asm-parisc/parisc-device.h>
++#include <asm-parisc/ropes.h>
++
++#include "agp.h"
++
++#define DRVNAME	"quicksilver"
++#define DRVPFX	DRVNAME ": "
++
++#ifndef log2
++#define log2(x)		ffz(~(x))
++#endif
++
++#define AGP8X_MODE_BIT		3
++#define AGP8X_MODE		(1 << AGP8X_MODE_BIT)
++
++static struct _parisc_agp_info {
++	void __iomem *ioc_regs;
++	void __iomem *lba_regs;
++
++	int lba_cap_offset;
++
++	u64 *gatt;
++	u64 gatt_entries;
++
++	u64 gart_base;
++	u64 gart_size;
++
++	int io_page_size;
++	int io_pages_per_kpage;
++} parisc_agp_info;
++
++static struct gatt_mask parisc_agp_masks[] =
++{
++        {
++		.mask = SBA_PDIR_VALID_BIT,
++		.type = 0
++	}
++};
++
++static struct aper_size_info_fixed parisc_agp_sizes[] =
++{
++        {0, 0, 0},              /* filled in by parisc_agp_fetch_size() */
++};
++
++static int
++parisc_agp_fetch_size(void)
++{
++	int size;
++
++	size = parisc_agp_info.gart_size / MB(1);
++	parisc_agp_sizes[0].size = size;
++	agp_bridge->current_size = (void *) &parisc_agp_sizes[0];
++
++	return size;
++}
++
++static int
++parisc_agp_configure(void)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++
++	agp_bridge->gart_bus_addr = info->gart_base;
++	agp_bridge->capndx = info->lba_cap_offset;
++	agp_bridge->mode = readl(info->lba_regs+info->lba_cap_offset+PCI_AGP_STATUS);
++
++	return 0;
++}
++
++static void
++parisc_agp_tlbflush(struct agp_memory *mem)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++
++	writeq(info->gart_base | log2(info->gart_size), info->ioc_regs+IOC_PCOM);
++	readq(info->ioc_regs+IOC_PCOM);	/* flush */
++}
++
++static int
++parisc_agp_create_gatt_table(struct agp_bridge_data *bridge)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++	int i;
++
++	for (i = 0; i < info->gatt_entries; i++) {
++		info->gatt[i] = (unsigned long)agp_bridge->scratch_page;
++	}
++
++	return 0;
++}
++
++static int
++parisc_agp_free_gatt_table(struct agp_bridge_data *bridge)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++
++	info->gatt[0] = SBA_AGPGART_COOKIE;
++
++	return 0;
++}
++
++static int
++parisc_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++	int i, k;
++	off_t j, io_pg_start;
++	int io_pg_count;
++
++	if (type != 0 || mem->type != 0) {
++		return -EINVAL;
++	}
++
++	io_pg_start = info->io_pages_per_kpage * pg_start;
++	io_pg_count = info->io_pages_per_kpage * mem->page_count;
++	if ((io_pg_start + io_pg_count) > info->gatt_entries) {
++		return -EINVAL;
++	}
++
++	j = io_pg_start;
++	while (j < (io_pg_start + io_pg_count)) {
++		if (info->gatt[j])
++			return -EBUSY;
++		j++;
++	}
++
++	if (mem->is_flushed == FALSE) {
++		global_cache_flush();
++		mem->is_flushed = TRUE;
++	}
++
++	for (i = 0, j = io_pg_start; i < mem->page_count; i++) {
++		unsigned long paddr;
++
++		paddr = mem->memory[i];
++		for (k = 0;
++		     k < info->io_pages_per_kpage;
++		     k++, j++, paddr += info->io_page_size) {
++			info->gatt[j] =
++				agp_bridge->driver->mask_memory(agp_bridge,
++					paddr, type);
++		}
++	}
++
++	agp_bridge->driver->tlb_flush(mem);
++
++	return 0;
++}
++
++static int
++parisc_agp_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++	int i, io_pg_start, io_pg_count;
++
++	if (type != 0 || mem->type != 0) {
++		return -EINVAL;
++	}
++
++	io_pg_start = info->io_pages_per_kpage * pg_start;
++	io_pg_count = info->io_pages_per_kpage * mem->page_count;
++	for (i = io_pg_start; i < io_pg_count + io_pg_start; i++) {
++		info->gatt[i] = agp_bridge->scratch_page;
++	}
++
++	agp_bridge->driver->tlb_flush(mem);
++	return 0;
++}
++
++static unsigned long
++parisc_agp_mask_memory(struct agp_bridge_data *bridge,
++		    unsigned long addr, int type)
++{
++	return SBA_PDIR_VALID_BIT | addr;
++}
++
++static void
++parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++	u32 command;
++
++	command = readl(info->lba_regs + info->lba_cap_offset + PCI_AGP_STATUS);
++
++	command = agp_collect_device_status(bridge, mode, command);
++	command |= 0x00000100;
++
++	writel(command, info->lba_regs + info->lba_cap_offset + PCI_AGP_COMMAND);
++
++	agp_device_command(command, (mode & AGP8X_MODE) != 0);
++}
++
++struct agp_bridge_driver parisc_agp_driver = {
++	.owner			= THIS_MODULE,
++	.size_type		= FIXED_APER_SIZE,
++	.configure		= parisc_agp_configure,
++	.fetch_size		= parisc_agp_fetch_size,
++	.tlb_flush		= parisc_agp_tlbflush,
++	.mask_memory		= parisc_agp_mask_memory,
++	.masks			= parisc_agp_masks,
++	.agp_enable		= parisc_agp_enable,
++	.cache_flush		= global_cache_flush,
++	.create_gatt_table	= parisc_agp_create_gatt_table,
++	.free_gatt_table	= parisc_agp_free_gatt_table,
++	.insert_memory		= parisc_agp_insert_memory,
++	.remove_memory		= parisc_agp_remove_memory,
++	.alloc_by_type		= agp_generic_alloc_by_type,
++	.free_by_type		= agp_generic_free_by_type,
++	.agp_alloc_page		= agp_generic_alloc_page,
++	.agp_destroy_page	= agp_generic_destroy_page,
++	.cant_use_aperture	= 1,
++};
++
++static int __init
++agp_ioc_init(void __iomem *ioc_regs)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++        u64 *iova_base, *io_pdir, io_tlb_ps;
++        int io_tlb_shift;
++
++        printk(KERN_INFO DRVPFX "IO PDIR shared with sba_iommu\n");
++
++        info->ioc_regs = ioc_regs;
++
++        io_tlb_ps = readq(info->ioc_regs+IOC_TCNFG);
++        switch (io_tlb_ps) {
++        case 0: io_tlb_shift = 12; break;
++        case 1: io_tlb_shift = 13; break;
++        case 2: io_tlb_shift = 14; break;
++        case 3: io_tlb_shift = 16; break;
++        default:
++                printk(KERN_ERR DRVPFX "Invalid IOTLB page size "
++                       "configuration 0x%llx\n", io_tlb_ps);
++                info->gatt = NULL;
++                info->gatt_entries = 0;
++                return -ENODEV;
++        }
++        info->io_page_size = 1 << io_tlb_shift;
++        info->io_pages_per_kpage = PAGE_SIZE / info->io_page_size;
++
++        iova_base = readq(info->ioc_regs+IOC_IBASE) & ~0x1;
++        info->gart_base = iova_base + PLUTO_IOVA_SIZE - PLUTO_GART_SIZE;
++
++        info->gart_size = PLUTO_GART_SIZE;
++        info->gatt_entries = info->gart_size / info->io_page_size;
++
++        io_pdir = phys_to_virt(readq(info->ioc_regs+IOC_PDIR_BASE));
++        info->gatt = &io_pdir[(PLUTO_IOVA_SIZE/2) >> PAGE_SHIFT];
++
++        if (info->gatt[0] != SBA_AGPGART_COOKIE) {
++                info->gatt = NULL;
++                info->gatt_entries = 0;
++                printk(KERN_ERR DRVPFX "No reserved IO PDIR entry found; "
++                       "GART disabled\n");
++                return -ENODEV;
++        }
++
++        return 0;
++}
++
++static int
++lba_find_capability(int cap)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++        u16 status;
++        u8 pos, id;
++        int ttl = 48;
++
++        status = readw(info->lba_regs + PCI_STATUS);
++        if (!(status & PCI_STATUS_CAP_LIST))
++                return 0;
++        pos = readb(info->lba_regs + PCI_CAPABILITY_LIST);
++        while (ttl-- && pos >= 0x40) {
++                pos &= ~3;
++                id = readb(info->lba_regs + pos + PCI_CAP_LIST_ID);
++                if (id == 0xff)
++                        break;
++                if (id == cap)
++                        return pos;
++                pos = readb(info->lba_regs + pos + PCI_CAP_LIST_NEXT);
++        }
++        return 0;
++}
++
++static int __init
++agp_lba_init(void __iomem *lba_hpa)
++{
++	struct _parisc_agp_info *info = &parisc_agp_info;
++        int cap;
++
++	info->lba_regs = lba_hpa;
++        info->lba_cap_offset = lba_find_capability(PCI_CAP_ID_AGP);
++
++        cap = readl(lba_hpa + info->lba_cap_offset) & 0xff;
++        if (cap != PCI_CAP_ID_AGP) {
++                printk(KERN_ERR DRVPFX "Invalid capability ID 0x%02x at 0x%x\n",
++                       cap, info->lba_cap_offset);
++                return -ENODEV;
++        }
++
++        return 0;
++}
++
++static int __init
++parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
++{
++	struct pci_dev *fake_bridge_dev = NULL;
++	struct agp_bridge_data *bridge;
++	int error = 0;
++
++	fake_bridge_dev = kmalloc(sizeof (struct pci_dev), GFP_KERNEL);
++	if (!fake_bridge_dev) {
++		error = -ENOMEM;
++		goto fail;
++	}
++
++	error = agp_ioc_init(ioc_hpa);
++	if (error)
++		goto fail;
++
++	error = agp_lba_init(lba_hpa);
++	if (error)
++		goto fail;
++
++	bridge = agp_alloc_bridge();
++	if (!bridge) {
++		error = -ENOMEM;
++		goto fail;
++	}
++	bridge->driver = &parisc_agp_driver;
++
++	fake_bridge_dev->vendor = PCI_VENDOR_ID_HP;
++	fake_bridge_dev->device = PCI_DEVICE_ID_HP_PCIX_LBA;
++	bridge->dev = fake_bridge_dev;
++
++	error = agp_add_bridge(bridge);
++
++fail:
++	return error;
++}
++
++static struct device *next_device(struct klist_iter *i) {
++	struct klist_node * n = klist_next(i);
++	return n ? container_of(n, struct device, knode_parent) : NULL;
++}
++
++static int
++parisc_agp_init(void)
++{
++	extern struct sba_device *sba_list;
++
++	int err = -1;
++	struct parisc_device *sba = NULL, *lba = NULL;
++	struct lba_device *lbadev = NULL;
++	struct device *dev = NULL;
++	struct klist_iter i;
++
++	if (!sba_list)
++		goto out;
++
++	/* Find our parent Pluto */
++	sba = sba_list->dev;
++	if (!IS_PLUTO(sba)) {
++		printk(KERN_INFO DRVPFX "No Pluto found, so no AGPGART for you.\n");
++		goto out;
++	}
++
++	/* Now search our Pluto for our precious AGP device... */
++	klist_iter_init(&sba->dev.klist_children, &i);
++	while ((dev = next_device(&i))) {
++		struct parisc_device *padev = to_parisc_device(dev);
++		if (IS_QUICKSILVER(padev))
++			lba = padev;
++	}
++	klist_iter_exit(&i);
++
++	if (!lba) {
++		printk(KERN_INFO DRVPFX "No AGP devices found.\n");
++		goto out;
++	}
++
++	lbadev = parisc_get_drvdata(lba);
++
++	/* w00t, let's go find our cookies... */
++	parisc_agp_setup(sba_list->ioc[0].ioc_hpa, lbadev->hba.base_addr);
++
++	return 0;
++
++out:
++	return err;
++}
++
++module_init(parisc_agp_init);
++
++MODULE_AUTHOR("Kyle McMartin <kyle at parisc-linux.org>");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c
+index 683f14b..ffba0c1 100644
+--- a/drivers/net/tulip/21142.c
++++ b/drivers/net/tulip/21142.c
+@@ -26,9 +26,9 @@ static u16 t21142_csr15[] = { 0x0008, 0x
+ 
+ /* Handle the 21143 uniquely: do autoselect with NWay, not the EEPROM list
+    of available transceivers.  */
+-void t21142_timer(unsigned long data)
++void t21142_media_task(void *data)
+ {
+-	struct net_device *dev = (struct net_device *)data;
++	struct net_device *dev = data;
+ 	struct tulip_private *tp = netdev_priv(dev);
+ 	void __iomem *ioaddr = tp->base_addr;
+ 	int csr12 = ioread32(ioaddr + CSR12);
+diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
+index d05c5aa..150a05a 100644
+--- a/drivers/net/tulip/de2104x.c
++++ b/drivers/net/tulip/de2104x.c
+@@ -1730,7 +1730,7 @@ static void __init de21040_get_media_inf
+ }
+ 
+ /* Note: this routine returns extra data bits for size detection. */
+-static unsigned __init tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
++static unsigned __devinit tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
+ {
+ 	int i;
+ 	unsigned retval = 0;
+@@ -1926,7 +1926,7 @@ bad_srom:
+ 	goto fill_defaults;
+ }
+ 
+-static int __init de_init_one (struct pci_dev *pdev,
++static int __devinit de_init_one (struct pci_dev *pdev,
+ 				  const struct pci_device_id *ent)
+ {
+ 	struct net_device *dev;
+@@ -2082,7 +2082,7 @@ err_out_free:
+ 	return rc;
+ }
+ 
+-static void __exit de_remove_one (struct pci_dev *pdev)
++static void __devexit de_remove_one (struct pci_dev *pdev)
+ {
+ 	struct net_device *dev = pci_get_drvdata(pdev);
+ 	struct de_private *de = dev->priv;
+diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
+index 99ccf2e..19faa0e 100644
+--- a/drivers/net/tulip/interrupt.c
++++ b/drivers/net/tulip/interrupt.c
+@@ -87,6 +87,10 @@ int tulip_refill_rx(struct net_device *d
+ 		}
+ 		tp->rx_ring[entry].status = cpu_to_le32(DescOwned);
+ 	}
++
++/* FIXME: restarting DMA breaks tulip_down() code path.
++   tulip_down() will unmap the RX and TX descriptors.
++ */
+ 	if(tp->chip_id == LC82C168) {
+ 		if(((ioread32(tp->base_addr + CSR5)>>17)&0x07) == 4) {
+ 			/* Rx stopped due to out of buffers,
+diff --git a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c
+index e9bc2a9..01e1ea4 100644
+--- a/drivers/net/tulip/media.c
++++ b/drivers/net/tulip/media.c
+@@ -44,8 +44,10 @@ static const unsigned char comet_miireg2
+ 
+ /* 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)
+ {
+@@ -261,24 +263,56 @@ void tulip_select_media(struct net_devic
+ 				u16 *reset_sequence = &((u16*)(p+3))[init_length];
+ 				int reset_length = p[2 + init_length*2];
+ 				misc_info = reset_sequence + reset_length;
+-				if (startup)
++				if (startup) {
++					int timeout = 30;
+ 					for (i = 0; i < reset_length; i++)
+ 						iowrite32(get_u16(&reset_sequence[i]) << 16, ioaddr + CSR15);
++
++					/* flush posted writes */
++					ioread32(ioaddr + CSR15);
++
++					/* 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++)
+ 					iowrite32(get_u16(&init_sequence[i]) << 16, ioaddr + CSR15);
++
++				ioread32(ioaddr + CSR15);	/* flush posted writes */
+ 			} else {
+ 				u8 *init_sequence = p + 2;
+ 				u8 *reset_sequence = p + 3 + init_length;
+ 				int reset_length = p[2 + init_length];
+ 				misc_info = (u16*)(reset_sequence + reset_length);
+ 				if (startup) {
++					int timeout = 30;
+ 					iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12);
+ 					for (i = 0; i < reset_length; i++)
+ 						iowrite32(reset_sequence[i], ioaddr + CSR12);
++
++					/* flush posted writes */
++					ioread32(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++)
+ 					iowrite32(init_sequence[i], ioaddr + CSR12);
++
++				ioread32(ioaddr + CSR12);	/* flush posted writes */
+ 			}
++
+ 			tmp_info = get_u16(&misc_info[1]);
+ 			if (tmp_info)
+ 				tp->advertising[phy_num] = tmp_info | 1;
+diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c
+index e058a9f..272ef62 100644
+--- a/drivers/net/tulip/timer.c
++++ b/drivers/net/tulip/timer.c
+@@ -18,13 +18,14 @@ #include <linux/pci.h>
+ #include "tulip.h"
+ 
+ 
+-void tulip_timer(unsigned long data)
++void tulip_media_task(void *data)
+ {
+-	struct net_device *dev = (struct net_device *)data;
++	struct net_device *dev = data;
+ 	struct tulip_private *tp = netdev_priv(dev);
+ 	void __iomem *ioaddr = tp->base_addr;
+ 	u32 csr12 = ioread32(ioaddr + CSR12);
+ 	int next_tick = 2*HZ;
++	unsigned long flags;
+ 
+ 	if (tulip_debug > 2) {
+ 		printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode"
+@@ -126,6 +127,15 @@ void tulip_timer(unsigned long data)
+ 	}
+ 	break;
+ 	}
++
++
++	spin_lock_irqsave(&tp->lock, flags);
++	if (tp->timeout_recovery) {
++		tulip_tx_timeout_complete(tp, ioaddr);
++		tp->timeout_recovery = 0;
++	}
++	spin_unlock_irqrestore(&tp->lock, flags);
++
+ 	/* mod_timer synchronizes us with potential add_timer calls
+ 	 * from interrupts.
+ 	 */
+diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h
+index 3bcfbf3..408fe46 100644
+--- a/drivers/net/tulip/tulip.h
++++ b/drivers/net/tulip/tulip.h
+@@ -30,11 +30,10 @@ #include <asm/irq.h>
+ /* undefine, or define to various debugging levels (>4 == obscene levels) */
+ #define TULIP_DEBUG 1
+ 
+-/* undefine USE_IO_OPS for MMIO, define for PIO */
+ #ifdef CONFIG_TULIP_MMIO
+-# undef USE_IO_OPS
++#define TULIP_BAR	1	/* CBMA */
+ #else
+-# define USE_IO_OPS 1
++#define TULIP_BAR	0	/* CBIO */
+ #endif
+ 
+ 
+@@ -44,7 +43,8 @@ struct tulip_chip_table {
+ 	int io_size;
+ 	int valid_intrs;	/* CSR7 interrupt enable settings */
+ 	int flags;
+-	void (*media_timer) (unsigned long data);
++	void (*media_timer) (unsigned long);
++	void (*media_task) (void *);
+ };
+ 
+ 
+@@ -142,6 +142,7 @@ enum status_bits {
+ 	RxNoBuf = 0x80,
+ 	RxIntr = 0x40,
+ 	TxFIFOUnderflow = 0x20,
++	RxErrIntr = 0x10,
+ 	TxJabber = 0x08,
+ 	TxNoBuf = 0x04,
+ 	TxDied = 0x02,
+@@ -192,9 +193,14 @@ struct tulip_tx_desc {
+ 
+ 
+ enum desc_status_bits {
+-	DescOwned = 0x80000000,
+-	RxDescFatalErr = 0x8000,
+-	RxWholePkt = 0x0300,
++	DescOwned    = 0x80000000,
++	DescWholePkt = 0x60000000,
++	DescEndPkt   = 0x40000000,
++	DescStartPkt = 0x20000000,
++	DescEndRing  = 0x02000000,
++	DescUseLink  = 0x01000000,
++	RxDescFatalErr = 0x008000,
++	RxWholePkt   = 0x00000300,
+ };
+ 
+ 
+@@ -366,6 +372,7 @@ #endif
+ 	unsigned int medialock:1;	/* Don't sense media type. */
+ 	unsigned int mediasense:1;	/* Media sensing in progress. */
+ 	unsigned int nway:1, nwayset:1;		/* 21143 internal NWay. */
++	unsigned int timeout_recovery:1;
+ 	unsigned int csr0;	/* CSR0 setting. */
+ 	unsigned int csr6;	/* Current CSR6 control settings. */
+ 	unsigned char eeprom[EEPROM_SIZE];	/* Serial EEPROM contents. */
+@@ -384,6 +391,7 @@ #endif
+ 	void __iomem *base_addr;
+ 	int csr12_shadow;
+ 	int pad0;		/* Used for 8-byte alignment */
++	struct work_struct media_work;
+ };
+ 
+ 
+@@ -398,7 +406,7 @@ struct eeprom_fixup {
+ 
+ /* 21142.c */
+ extern u16 t21142_csr14[];
+-void t21142_timer(unsigned long data);
++void t21142_media_task(void *data);
+ void t21142_start_nway(struct net_device *dev);
+ void t21142_lnk_change(struct net_device *dev, int csr5);
+ 
+@@ -436,7 +444,7 @@ void pnic_lnk_change(struct net_device *
+ void pnic_timer(unsigned long data);
+ 
+ /* timer.c */
+-void tulip_timer(unsigned long data);
++void tulip_media_task(void *data);
+ void mxic_timer(unsigned long data);
+ void comet_timer(unsigned long data);
+ 
+@@ -473,8 +481,11 @@ static inline void tulip_stop_rxtx(struc
+ 			udelay(10);
+ 
+ 		if (!i)
+-			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n",
+-					pci_name(tp->pdev));
++			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed"
++					" (CSR5 0x%x CSR6 0x%x)\n",
++					pci_name(tp->pdev),
++					ioread32(ioaddr + CSR5),
++					ioread32(ioaddr + CSR6));
+ 	}
+ }
+ 
+@@ -485,4 +496,14 @@ static inline void tulip_restart_rxtx(st
+ 	tulip_start_rxtx(tp);
+ }
+ 
++static inline void tulip_tx_timeout_complete(struct tulip_private *tp, void __iomem *ioaddr)
++{
++	/* Stop and restart the chip's Tx processes. */
++	tulip_restart_rxtx(tp);
++	/* Trigger an immediate transmit demand. */
++	iowrite32(0, ioaddr + CSR1);
++
++	tp->stats.tx_errors++;
++}
++
+ #endif /* __NET_TULIP_H__ */
+diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
+index 7351831..21eaeb2 100644
+--- a/drivers/net/tulip/tulip_core.c
++++ b/drivers/net/tulip/tulip_core.c
+@@ -130,7 +130,14 @@ #else
+ int tulip_debug = 1;
+ #endif
+ 
++static void tulip_timer(unsigned long data)
++{
++	struct net_device *dev = (struct net_device *)data;
++	struct tulip_private *tp = netdev_priv(dev);
+ 
++	if (netif_running(dev))
++		schedule_work(&tp->media_work);
++}
+ 
+ /*
+  * This table use during operation for capabilities and media timer.
+@@ -144,59 +151,60 @@ struct tulip_chip_table tulip_tbl[] = {
+ 
+   /* DC21140 */
+   { "Digital DS21140 Tulip", 128, 0x0001ebef,
+-	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_PCI_MWI, tulip_timer },
++	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_PCI_MWI, tulip_timer,
++	tulip_media_task },
+ 
+   /* DC21142, DC21143 */
+-  { "Digital DS21143 Tulip", 128, 0x0801fbff,
++  { "Digital DS21142/43 Tulip", 128, 0x0801fbff,
+ 	HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI | HAS_NWAY
+-	| HAS_INTR_MITIGATION | HAS_PCI_MWI, t21142_timer },
++	| HAS_INTR_MITIGATION | HAS_PCI_MWI, tulip_timer, t21142_media_task },
+ 
+   /* LC82C168 */
+   { "Lite-On 82c168 PNIC", 256, 0x0001fbef,
+-	HAS_MII | HAS_PNICNWAY, pnic_timer },
++	HAS_MII | HAS_PNICNWAY, pnic_timer, },
+ 
+   /* MX98713 */
+   { "Macronix 98713 PMAC", 128, 0x0001ebef,
+-	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM, mxic_timer },
++	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM, mxic_timer, },
+ 
+   /* MX98715 */
+   { "Macronix 98715 PMAC", 256, 0x0001ebef,
+-	HAS_MEDIA_TABLE, mxic_timer },
++	HAS_MEDIA_TABLE, mxic_timer, },
+ 
+   /* MX98725 */
+   { "Macronix 98725 PMAC", 256, 0x0001ebef,
+-	HAS_MEDIA_TABLE, mxic_timer },
++	HAS_MEDIA_TABLE, mxic_timer, },
+ 
+   /* AX88140 */
+   { "ASIX AX88140", 128, 0x0001fbff,
+ 	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | MC_HASH_ONLY
+-	| IS_ASIX, tulip_timer },
++	| IS_ASIX, tulip_timer, tulip_media_task },
+ 
+   /* PNIC2 */
+   { "Lite-On PNIC-II", 256, 0x0801fbff,
+-	HAS_MII | HAS_NWAY | HAS_8023X | HAS_PCI_MWI, pnic2_timer },
++	HAS_MII | HAS_NWAY | HAS_8023X | HAS_PCI_MWI, pnic2_timer, },
+ 
+   /* COMET */
+   { "ADMtek Comet", 256, 0x0001abef,
+-	HAS_MII | MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer },
++	HAS_MII | MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer, },
+ 
+   /* COMPEX9881 */
+   { "Compex 9881 PMAC", 128, 0x0001ebef,
+-	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM, mxic_timer },
++	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM, mxic_timer, },
+ 
+   /* I21145 */
+   { "Intel DS21145 Tulip", 128, 0x0801fbff,
+ 	HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI
+-	| HAS_NWAY | HAS_PCI_MWI, t21142_timer },
++	| HAS_NWAY | HAS_PCI_MWI, tulip_timer, tulip_media_task },
+ 
+   /* DM910X */
+   { "Davicom DM9102/DM9102A", 128, 0x0001ebef,
+ 	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI,
+-	tulip_timer },
++	tulip_timer, tulip_media_task },
+ 
+   /* RS7112 */
+   { "Conexant LANfinity", 256, 0x0001ebef,
+-	HAS_MII | HAS_ACPI, tulip_timer },
++	HAS_MII | HAS_ACPI, tulip_timer, tulip_media_task },
+ 
+ };
+ 
+@@ -295,12 +303,14 @@ static void tulip_up(struct net_device *
+ 
+ 	/* Reset the chip, holding bit 0 set at least 50 PCI cycles. */
+ 	iowrite32(0x00000001, ioaddr + CSR0);
++	pci_read_config_dword(tp->pdev, PCI_COMMAND, &i);  /* flush write */
+ 	udelay(100);
+ 
+ 	/* Deassert reset.
+ 	   Wait the specified 50 PCI cycles after a reset by initializing
+ 	   Tx and Rx queues and the address filter list. */
+ 	iowrite32(tp->csr0, ioaddr + CSR0);
++	pci_read_config_dword(tp->pdev, PCI_COMMAND, &i);  /* flush write */
+ 	udelay(100);
+ 
+ 	if (tulip_debug > 1)
+@@ -522,20 +532,9 @@ static void tulip_tx_timeout(struct net_
+ 			   "SIA %8.8x %8.8x %8.8x %8.8x, resetting...\n",
+ 			   dev->name, ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR12),
+ 			   ioread32(ioaddr + CSR13), ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15));
+-		if ( ! tp->medialock  &&  tp->mtable) {
+-			do
+-				--tp->cur_index;
+-			while (tp->cur_index >= 0
+-				   && (tulip_media_cap[tp->mtable->mleaf[tp->cur_index].media]
+-					   & MediaIsFD));
+-			if (--tp->cur_index < 0) {
+-				/* We start again, but should instead look for default. */
+-				tp->cur_index = tp->mtable->leafcount - 1;
+-			}
+-			tulip_select_media(dev, 0);
+-			printk(KERN_WARNING "%s: transmit timed out, switching to %s "
+-				   "media.\n", dev->name, medianame[dev->if_port]);
+-		}
++		tp->timeout_recovery = 1;
++		schedule_work(&tp->media_work);
++		goto out_unlock;
+ 	} else if (tp->chip_id == PNIC2) {
+ 		printk(KERN_WARNING "%s: PNIC2 transmit timed out, status %8.8x, "
+ 		       "CSR6/7 %8.8x / %8.8x CSR12 %8.8x, resetting...\n",
+@@ -575,14 +574,9 @@ #if defined(way_too_many_messages)
+ 	}
+ #endif
+ 
+-	/* Stop and restart the chip's Tx processes . */
+-
+-	tulip_restart_rxtx(tp);
+-	/* Trigger an immediate transmit demand. */
+-	iowrite32(0, ioaddr + CSR1);
+-
+-	tp->stats.tx_errors++;
++	tulip_tx_timeout_complete(tp, ioaddr);
+ 
++out_unlock:
+ 	spin_unlock_irqrestore (&tp->lock, flags);
+ 	dev->trans_start = jiffies;
+ 	netif_wake_queue (dev);
+@@ -732,6 +726,8 @@ static void tulip_down (struct net_devic
+ 	void __iomem *ioaddr = tp->base_addr;
+ 	unsigned long flags;
+ 
++	flush_scheduled_work();
++
+ 	del_timer_sync (&tp->timer);
+ #ifdef CONFIG_TULIP_NAPI
+ 	del_timer_sync (&tp->oom_timer);
+@@ -740,21 +736,20 @@ #endif
+ 
+ 	/* Disable interrupts by clearing the interrupt mask. */
+ 	iowrite32 (0x00000000, ioaddr + CSR7);
++	ioread32 (ioaddr + CSR7);	/* flush posted write */
+ 
+-	/* Stop the Tx and Rx processes. */
+-	tulip_stop_rxtx(tp);
++	spin_unlock_irqrestore (&tp->lock, flags);
+ 
+-	/* prepare receive buffers */
+-	tulip_refill_rx(dev);
++	free_irq (dev->irq, dev);	/* no more races after this */
++	tulip_stop_rxtx(tp);		/* Stop DMA */
+ 
+-	/* release any unconsumed transmit buffers */
+-	tulip_clean_tx_ring(tp);
++	/* Put driver back into the state we start with */
++	tulip_refill_rx(dev);		/* prepare RX buffers */
++	tulip_clean_tx_ring(tp);	/* clean up unsent TX buffers */
+ 
+ 	if (ioread32 (ioaddr + CSR6) != 0xffffffff)
+ 		tp->stats.rx_missed_errors += ioread32 (ioaddr + CSR8) & 0xffff;
+ 
+-	spin_unlock_irqrestore (&tp->lock, flags);
+-
+ 	init_timer(&tp->timer);
+ 	tp->timer.data = (unsigned long)dev;
+ 	tp->timer.function = tulip_tbl[tp->chip_id].media_timer;
+@@ -780,7 +775,6 @@ static int tulip_close (struct net_devic
+ 		printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
+ 			dev->name, ioread32 (ioaddr + CSR5));
+ 
+-	free_irq (dev->irq, dev);
+ 
+ 	/* Free all the skbuffs in the Rx queue. */
+ 	for (i = 0; i < RX_RING_SIZE; i++) {
+@@ -1361,11 +1355,8 @@ #endif
+ 	if (pci_request_regions (pdev, "tulip"))
+ 		goto err_out_free_netdev;
+ 
+-#ifndef USE_IO_OPS
+-	ioaddr =  pci_iomap(pdev, 1, tulip_tbl[chip_idx].io_size);
+-#else
+-	ioaddr =  pci_iomap(pdev, 0, tulip_tbl[chip_idx].io_size);
+-#endif
++	ioaddr =  pci_iomap(pdev, TULIP_BAR, tulip_tbl[chip_idx].io_size);
++
+ 	if (!ioaddr)
+ 		goto err_out_free_res;
+ 
+@@ -1398,6 +1389,8 @@ #endif
+ 	tp->timer.data = (unsigned long)dev;
+ 	tp->timer.function = tulip_tbl[tp->chip_id].media_timer;
+ 
++	INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task, dev);
++
+ 	dev->base_addr = (unsigned long)ioaddr;
+ 
+ #ifdef CONFIG_TULIP_MWI
+@@ -1644,8 +1637,14 @@ #endif
+ 	if (register_netdev(dev))
+ 		goto err_out_free_ring;
+ 
+-	printk(KERN_INFO "%s: %s rev %d at %p,",
+-	       dev->name, chip_name, chip_rev, ioaddr);
++	printk(KERN_INFO "%s: %s rev %d at "
++#ifdef CONFIG_TULIP_MMIO
++		"MMIO"
++#else
++		"Port"
++#endif
++		" 0x%lx,", dev->name, chip_name, chip_rev,
++		pci_resource_start(pdev, TULIP_BAR));
+ 	pci_set_drvdata(pdev, dev);
+ 
+ 	if (eeprom_missing)
+@@ -1747,7 +1746,6 @@ static int tulip_suspend (struct pci_dev
+ 		tulip_down(dev);
+ 
+ 	netif_device_detach(dev);
+-	free_irq(dev->irq, dev);
+ 
+ 	pci_save_state(pdev);
+ 	pci_disable_device(pdev);
+diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
+index eba9083..78e99ab 100644
+--- a/drivers/net/tulip/winbond-840.c
++++ b/drivers/net/tulip/winbond-840.c
+@@ -90,10 +90,8 @@ static int full_duplex[MAX_UNITS] = {-1,
+    Making the Tx ring too large decreases the effectiveness of channel
+    bonding and packet priority.
+    There are no ill effects from too-large receive rings. */
+-#define TX_RING_SIZE	16
+ #define TX_QUEUE_LEN	10		/* Limit ring entries actually used.  */
+ #define TX_QUEUE_LEN_RESTART	5
+-#define RX_RING_SIZE	32
+ 
+ #define TX_BUFLIMIT	(1024-128)
+ 
+@@ -137,6 +135,8 @@ #include <asm/processor.h>		/* Processor
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ 
++#include "tulip.h"
++
+ /* These identify the driver base version and may not be removed. */
+ static char version[] =
+ KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) " DRV_RELDATE "  Donald Becker <becker at scyld.com>\n"
+@@ -242,8 +242,8 @@ static const struct pci_id_info pci_id_t
+ };
+ 
+ /* This driver was written to use PCI memory space, however some x86 systems
+-   work only with I/O space accesses.  Pass -DUSE_IO_OPS to use PCI I/O space
+-   accesses instead of memory space. */
++   work only with I/O space accesses. See CONFIG_TULIP_MMIO in .config
++*/
+ 
+ /* Offsets to the Command and Status Registers, "CSRs".
+    While similar to the Tulip, these registers are longword aligned.
+@@ -261,21 +261,11 @@ enum w840_offsets {
+ 	CurTxDescAddr=0x4C, CurTxBufAddr=0x50,
+ };
+ 
+-/* Bits in the interrupt status/enable registers. */
+-/* The bits in the Intr Status/Enable registers, mostly interrupt sources. */
+-enum intr_status_bits {
+-	NormalIntr=0x10000, AbnormalIntr=0x8000,
+-	IntrPCIErr=0x2000, TimerInt=0x800,
+-	IntrRxDied=0x100, RxNoBuf=0x80, IntrRxDone=0x40,
+-	TxFIFOUnderflow=0x20, RxErrIntr=0x10,
+-	TxIdle=0x04, IntrTxStopped=0x02, IntrTxDone=0x01,
+-};
+-
+ /* Bits in the NetworkConfig register. */
+ enum rx_mode_bits {
+-	AcceptErr=0x80, AcceptRunt=0x40,
+-	AcceptBroadcast=0x20, AcceptMulticast=0x10,
+-	AcceptAllPhys=0x08, AcceptMyPhys=0x02,
++	AcceptErr=0x80,
++	RxAcceptBroadcast=0x20, AcceptMulticast=0x10,
++	RxAcceptAllPhys=0x08, AcceptMyPhys=0x02,
+ };
+ 
+ enum mii_reg_bits {
+@@ -297,13 +287,6 @@ struct w840_tx_desc {
+ 	u32 buffer1, buffer2;
+ };
+ 
+-/* Bits in network_desc.status */
+-enum desc_status_bits {
+-	DescOwn=0x80000000, DescEndRing=0x02000000, DescUseLink=0x01000000,
+-	DescWholePkt=0x60000000, DescStartPkt=0x20000000, DescEndPkt=0x40000000,
+-	DescIntr=0x80000000,
+-};
+-
+ #define MII_CNT		1 /* winbond only supports one MII */
+ struct netdev_private {
+ 	struct w840_rx_desc *rx_ring;
+@@ -371,7 +354,6 @@ static int __devinit w840_probe1 (struct
+ 	int irq;
+ 	int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0;
+ 	void __iomem *ioaddr;
+-	int bar = 1;
+ 
+ 	i = pci_enable_device(pdev);
+ 	if (i) return i;
+@@ -393,10 +375,8 @@ static int __devinit w840_probe1 (struct
+ 
+ 	if (pci_request_regions(pdev, DRV_NAME))
+ 		goto err_out_netdev;
+-#ifdef USE_IO_OPS
+-	bar = 0;
+-#endif
+-	ioaddr = pci_iomap(pdev, bar, netdev_res_size);
++
++	ioaddr = pci_iomap(pdev, TULIP_BAR, netdev_res_size);
+ 	if (!ioaddr)
+ 		goto err_out_free_res;
+ 
+@@ -838,7 +818,7 @@ static void init_rxtx_rings(struct net_d
+ 					np->rx_buf_sz,PCI_DMA_FROMDEVICE);
+ 
+ 		np->rx_ring[i].buffer1 = np->rx_addr[i];
+-		np->rx_ring[i].status = DescOwn;
++		np->rx_ring[i].status = DescOwned;
+ 	}
+ 
+ 	np->cur_rx = 0;
+@@ -923,7 +903,7 @@ #if defined (__i386__) && !defined(MODUL
+ 	}
+ #elif defined(__powerpc__) || defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)
+ 	i |= 0xE000;
+-#elif defined(__sparc__)
++#elif defined(__sparc__) || defined (CONFIG_PARISC)
+ 	i |= 0x4800;
+ #else
+ #warning Processor architecture undefined
+@@ -1043,11 +1023,11 @@ static int start_tx(struct sk_buff *skb,
+ 
+ 	/* Now acquire the irq spinlock.
+ 	 * The difficult race is the the ordering between
+-	 * increasing np->cur_tx and setting DescOwn:
++	 * increasing np->cur_tx and setting DescOwned:
+ 	 * - if np->cur_tx is increased first the interrupt
+ 	 *   handler could consider the packet as transmitted
+-	 *   since DescOwn is cleared.
+-	 * - If DescOwn is set first the NIC could report the
++	 *   since DescOwned is cleared.
++	 * - If DescOwned is set first the NIC could report the
+ 	 *   packet as sent, but the interrupt handler would ignore it
+ 	 *   since the np->cur_tx was not yet increased.
+ 	 */
+@@ -1055,7 +1035,7 @@ static int start_tx(struct sk_buff *skb,
+ 	np->cur_tx++;
+ 
+ 	wmb(); /* flush length, buffer1, buffer2 */
+-	np->tx_ring[entry].status = DescOwn;
++	np->tx_ring[entry].status = DescOwned;
+ 	wmb(); /* flush status and kick the hardware */
+ 	iowrite32(0, np->base_addr + TxStartDemand);
+ 	np->tx_q_bytes += skb->len;
+@@ -1155,12 +1135,12 @@ static irqreturn_t intr_handler(int irq,
+ 
+ 		handled = 1;
+ 
+-		if (intr_status & (IntrRxDone | RxNoBuf))
++		if (intr_status & (RxIntr | RxNoBuf))
+ 			netdev_rx(dev);
+ 		if (intr_status & RxNoBuf)
+ 			iowrite32(0, ioaddr + RxStartDemand);
+ 
+-		if (intr_status & (TxIdle | IntrTxDone) &&
++		if (intr_status & (TxNoBuf | TxIntr) &&
+ 			np->cur_tx != np->dirty_tx) {
+ 			spin_lock(&np->lock);
+ 			netdev_tx_done(dev);
+@@ -1168,8 +1148,8 @@ static irqreturn_t intr_handler(int irq,
+ 		}
+ 
+ 		/* Abnormal error summary/uncommon events handlers. */
+-		if (intr_status & (AbnormalIntr | TxFIFOUnderflow | IntrPCIErr |
+-						   TimerInt | IntrTxStopped))
++		if (intr_status & (AbnormalIntr | TxFIFOUnderflow | SytemError |
++						   TimerInt | TxDied))
+ 			netdev_error(dev, intr_status);
+ 
+ 		if (--work_limit < 0) {
+@@ -1305,7 +1285,7 @@ #endif
+ 			np->rx_ring[entry].buffer1 = np->rx_addr[entry];
+ 		}
+ 		wmb();
+-		np->rx_ring[entry].status = DescOwn;
++		np->rx_ring[entry].status = DescOwned;
+ 	}
+ 
+ 	return 0;
+@@ -1342,7 +1322,7 @@ #endif
+ 			   dev->name, new);
+ 		update_csr6(dev, new);
+ 	}
+-	if (intr_status & IntrRxDied) {		/* Missed a Rx frame. */
++	if (intr_status & RxDied) {		/* Missed a Rx frame. */
+ 		np->stats.rx_errors++;
+ 	}
+ 	if (intr_status & TimerInt) {
+@@ -1381,13 +1361,13 @@ static u32 __set_rx_mode(struct net_devi
+ 		/* Unconditionally log net taps. */
+ 		printk(KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name);
+ 		memset(mc_filter, 0xff, sizeof(mc_filter));
+-		rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAllPhys
++		rx_mode = RxAcceptBroadcast | AcceptMulticast | RxAcceptAllPhys
+ 			| AcceptMyPhys;
+ 	} else if ((dev->mc_count > multicast_filter_limit)
+ 			   ||  (dev->flags & IFF_ALLMULTI)) {
+ 		/* Too many to match, or accept all multicasts. */
+ 		memset(mc_filter, 0xff, sizeof(mc_filter));
+-		rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
++		rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys;
+ 	} else {
+ 		struct dev_mc_list *mclist;
+ 		int i;
+@@ -1398,7 +1378,7 @@ static u32 __set_rx_mode(struct net_devi
+ 			filterbit &= 0x3f;
+ 			mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
+ 		}
+-		rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
++		rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys;
+ 	}
+ 	iowrite32(mc_filter[0], ioaddr + MulticastFilter0);
+ 	iowrite32(mc_filter[1], ioaddr + MulticastFilter1);
+diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
+index 1fbda77..b0b7799 100644
+--- a/drivers/parisc/iosapic.c
++++ b/drivers/parisc/iosapic.c
+@@ -146,7 +146,7 @@ #ifdef CONFIG_SUPERIO
+ #include <asm/superio.h>
+ #endif
+ 
+-#include <asm/iosapic.h>
++#include <asm/ropes.h>
+ #include "./iosapic_private.h"
+ 
+ #define MODULE_NAME "iosapic"
+@@ -686,12 +686,13 @@ #endif
+  * i386/ia64 support ISA devices and have to deal with
+  * edge-triggered interrupts too.
+  */
+-static void iosapic_end_irq(unsigned int irq)
++void iosapic_end_irq(struct irq_desc *dummy, unsigned int irq)
+ {
+ 	struct vector_info *vi = iosapic_get_vector(irq);
+ 	DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
+ 			vi->eoi_addr, vi->eoi_data);
+ 	iosapic_eoi(vi->eoi_addr, vi->eoi_data);
++	cpu_end_irq(NULL, irq);
+ }
+ 
+ static unsigned int iosapic_startup_irq(unsigned int irq)
+@@ -728,8 +729,6 @@ static struct hw_interrupt_type iosapic_
+ 	.shutdown =	iosapic_disable_irq,
+ 	.enable =	iosapic_enable_irq,
+ 	.disable =	iosapic_disable_irq,
+-	.ack =		no_ack_irq,
+-	.end =		iosapic_end_irq,
+ #ifdef CONFIG_SMP
+ 	.set_affinity =	iosapic_set_affinity_irq,
+ #endif
+@@ -818,6 +817,7 @@ #endif /* CONFIG_SUPERIO */
+ 	vi->eoi_data = cpu_to_le32(vi->txn_data);
+ 
+ 	cpu_claim_irq(vi->txn_irq, &iosapic_interrupt_type, vi);
++	set_irq_handler(vi->txn_irq, handle_level_irq_iosapic);
+ 
+  out:
+ 	pcidev->irq = vi->txn_irq;
+diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
+index 3fe4a77..ba67699 100644
+--- a/drivers/parisc/lba_pci.c
++++ b/drivers/parisc/lba_pci.c
+@@ -46,9 +46,9 @@ #include <asm/pdcpat.h>
+ #include <asm/page.h>
+ #include <asm/system.h>
+ 
++#include <asm/ropes.h>
+ #include <asm/hardware.h>	/* for register_parisc_driver() stuff */
+ #include <asm/parisc-device.h>
+-#include <asm/iosapic.h>	/* for iosapic_register() */
+ #include <asm/io.h>		/* read/write stuff */
+ 
+ #undef DEBUG_LBA	/* general stuff */
+@@ -100,113 +100,10 @@ #endif
+ 
+ #define MODULE_NAME "LBA"
+ 
+-#define LBA_FUNC_ID	0x0000	/* function id */
+-#define LBA_FCLASS	0x0008	/* function class, bist, header, rev... */
+-#define LBA_CAPABLE	0x0030	/* capabilities register */
+-
+-#define LBA_PCI_CFG_ADDR	0x0040	/* poke CFG address here */
+-#define LBA_PCI_CFG_DATA	0x0048	/* read or write data here */
+-
+-#define LBA_PMC_MTLT	0x0050	/* Firmware sets this - read only. */
+-#define LBA_FW_SCRATCH	0x0058	/* Firmware writes the PCI bus number here. */
+-#define LBA_ERROR_ADDR	0x0070	/* On error, address gets logged here */
+-
+-#define LBA_ARB_MASK	0x0080	/* bit 0 enable arbitration. PAT/PDC enables */
+-#define LBA_ARB_PRI	0x0088	/* firmware sets this. */
+-#define LBA_ARB_MODE	0x0090	/* firmware sets this. */
+-#define LBA_ARB_MTLT	0x0098	/* firmware sets this. */
+-
+-#define LBA_MOD_ID	0x0100	/* Module ID. PDC_PAT_CELL reports 4 */
+-
+-#define LBA_STAT_CTL	0x0108	/* Status & Control */
+-#define   LBA_BUS_RESET		0x01	/*  Deassert PCI Bus Reset Signal */
+-#define   CLEAR_ERRLOG		0x10	/*  "Clear Error Log" cmd */
+-#define   CLEAR_ERRLOG_ENABLE	0x20	/*  "Clear Error Log" Enable */
+-#define   HF_ENABLE	0x40	/*    enable HF mode (default is -1 mode) */
+-
+-#define LBA_LMMIO_BASE	0x0200	/* < 4GB I/O address range */
+-#define LBA_LMMIO_MASK	0x0208
+-
+-#define LBA_GMMIO_BASE	0x0210	/* > 4GB I/O address range */
+-#define LBA_GMMIO_MASK	0x0218
+-
+-#define LBA_WLMMIO_BASE	0x0220	/* All < 4GB ranges under the same *SBA* */
+-#define LBA_WLMMIO_MASK	0x0228
+-
+-#define LBA_WGMMIO_BASE	0x0230	/* All > 4GB ranges under the same *SBA* */
+-#define LBA_WGMMIO_MASK	0x0238
+-
+-#define LBA_IOS_BASE	0x0240	/* I/O port space for this LBA */
+-#define LBA_IOS_MASK	0x0248
+-
+-#define LBA_ELMMIO_BASE	0x0250	/* Extra LMMIO range */
+-#define LBA_ELMMIO_MASK	0x0258
+-
+-#define LBA_EIOS_BASE	0x0260	/* Extra I/O port space */
+-#define LBA_EIOS_MASK	0x0268
+-
+-#define LBA_GLOBAL_MASK	0x0270	/* Mercury only: Global Address Mask */
+-#define LBA_DMA_CTL	0x0278	/* firmware sets this */
+-
+-#define LBA_IBASE	0x0300	/* SBA DMA support */
+-#define LBA_IMASK	0x0308
+-
+-/* FIXME: ignore DMA Hint stuff until we can measure performance */
+-#define LBA_HINT_CFG	0x0310
+-#define LBA_HINT_BASE	0x0380	/* 14 registers at every 8 bytes. */
+-
+-#define LBA_BUS_MODE	0x0620
+-
+-/* ERROR regs are needed for config cycle kluges */
+-#define LBA_ERROR_CONFIG 0x0680
+-#define     LBA_SMART_MODE 0x20
+-#define LBA_ERROR_STATUS 0x0688
+-#define LBA_ROPE_CTL     0x06A0
+-
+-#define LBA_IOSAPIC_BASE	0x800 /* Offset of IRQ logic */
+-
+ /* non-postable I/O port space, densely packed */
+ #define LBA_PORT_BASE	(PCI_F_EXTEND | 0xfee00000UL)
+ static void __iomem *astro_iop_base __read_mostly;
+ 
+-#define ELROY_HVERS	0x782
+-#define MERCURY_HVERS	0x783
+-#define QUICKSILVER_HVERS	0x784
+-
+-static inline int IS_ELROY(struct parisc_device *d)
+-{
+-	return (d->id.hversion == ELROY_HVERS);
+-}
+-
+-static inline int IS_MERCURY(struct parisc_device *d)
+-{
+-	return (d->id.hversion == MERCURY_HVERS);
+-}
+-
+-static inline int IS_QUICKSILVER(struct parisc_device *d)
+-{
+-	return (d->id.hversion == QUICKSILVER_HVERS);
+-}
+-
+-
+-/*
+-** lba_device: Per instance Elroy data structure
+-*/
+-struct lba_device {
+-	struct pci_hba_data hba;
+-
+-	spinlock_t	lba_lock;
+-	void		*iosapic_obj;
+-
+-#ifdef CONFIG_64BIT
+-	void __iomem *	iop_base;    /* PA_VIEW - for IO port accessor funcs */
+-#endif
+-
+-	int		flags;       /* state/functionality enabled */
+-	int		hw_rev;      /* HW revision of chip */
+-};
+-
+-
+ static u32 lba_t32;
+ 
+ /* lba flags */
+@@ -1542,8 +1439,8 @@ lba_driver_probe(struct parisc_device *d
+ 		default: version = "TR4+";
+ 		}
+ 
+-		printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n",
+-			MODULE_NAME, version, func_class & 0xf, dev->hpa.start);
++		printk(KERN_INFO "Elroy version %s (0x%x) found at 0x%lx\n",
++		       version, func_class & 0xf, dev->hpa.start);
+ 
+ 		if (func_class < 2) {
+ 			printk(KERN_WARNING "Can't support LBA older than "
+@@ -1563,14 +1460,18 @@ #endif
+ 		}
+ 
+ 	} else if (IS_MERCURY(dev) || IS_QUICKSILVER(dev)) {
++		int major, minor;
++
+ 		func_class &= 0xff;
+-		version = kmalloc(6, GFP_KERNEL);
+-		snprintf(version, 6, "TR%d.%d",(func_class >> 4),(func_class & 0xf));
++		major = func_class >> 4, minor = func_class & 0xf;
++
+ 		/* We could use one printk for both Elroy and Mercury,
+                  * but for the mask for func_class.
+                  */ 
+-		printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n",
+-		       MODULE_NAME, version, func_class & 0xff, dev->hpa.start);
++		printk(KERN_INFO "%s version TR%d.%d (0x%x) found at 0x%lx\n",
++		       IS_MERCURY(dev) ? "Mercury" : "Quicksilver", major,
++		       minor, func_class, dev->hpa.start);
++
+ 		cfg_ops = &mercury_cfg_ops;
+ 	} else {
+ 		printk(KERN_ERR "Unknown LBA found at 0x%lx\n", dev->hpa.start);
+@@ -1600,6 +1501,7 @@ #endif
+ 	lba_dev->hba.dev = dev;
+ 	lba_dev->iosapic_obj = tmp_obj;  /* save interrupt handle */
+ 	lba_dev->hba.iommu = sba_get_iommu(dev);  /* get iommu data */
++	parisc_set_drvdata(dev, lba_dev);
+ 
+ 	/* ------------ Second : initialize common stuff ---------- */
+ 	pci_bios = &lba_bios_ops;
+diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
+index 8b47328..1b709f6 100644
+--- a/drivers/parisc/sba_iommu.c
++++ b/drivers/parisc/sba_iommu.c
+@@ -38,22 +38,15 @@ #include <asm/hardware.h>	/* for registe
+ #include <linux/proc_fs.h>
+ #include <linux/seq_file.h>
+ 
++#include <asm/ropes.h>
++#include <asm/mckinley.h>	/* for proc_mckinley_root */
+ #include <asm/runway.h>		/* for proc_runway_root */
+ #include <asm/pdc.h>		/* for PDC_MODEL_* */
+ #include <asm/pdcpat.h>		/* for is_pdc_pat() */
+ #include <asm/parisc-device.h>
+ 
+-
+-/* declared in arch/parisc/kernel/setup.c */
+-extern struct proc_dir_entry * proc_mckinley_root;
+-
+ #define MODULE_NAME "SBA"
+ 
+-#ifdef CONFIG_PROC_FS
+-/* depends on proc fs support. But costs CPU performance */
+-#undef SBA_COLLECT_STATS
+-#endif
+-
+ /*
+ ** The number of debug flags is a clue - this code is fragile.
+ ** Don't even think about messing with it unless you have
+@@ -92,202 +85,12 @@ #else
+ #define DBG_RES(x...)
+ #endif
+ 
+-#if defined(CONFIG_64BIT)
+-/* "low end" PA8800 machines use ZX1 chipset: PAT PDC and only run 64-bit */
+-#define ZX1_SUPPORT
+-#endif
+-
+ #define SBA_INLINE	__inline__
+ 
+-
+-/*
+-** The number of pdir entries to "free" before issueing
+-** a read to PCOM register to flush out PCOM writes.
+-** Interacts with allocation granularity (ie 4 or 8 entries
+-** allocated and free'd/purged at a time might make this
+-** less interesting).
+-*/
+-#define DELAYED_RESOURCE_CNT	16
+-
+ #define DEFAULT_DMA_HINT_REG	0
+ 
+-#define ASTRO_RUNWAY_PORT	0x582
+-#define IKE_MERCED_PORT		0x803
+-#define REO_MERCED_PORT		0x804
+-#define REOG_MERCED_PORT	0x805
+-#define PLUTO_MCKINLEY_PORT	0x880
+-
+-#define SBA_FUNC_ID	0x0000	/* function id */
+-#define SBA_FCLASS	0x0008	/* function class, bist, header, rev... */
+-
+-#define IS_ASTRO(id)		((id)->hversion == ASTRO_RUNWAY_PORT)
+-#define IS_IKE(id)		((id)->hversion == IKE_MERCED_PORT)
+-#define IS_PLUTO(id)		((id)->hversion == PLUTO_MCKINLEY_PORT)
+-
+-#define SBA_FUNC_SIZE 4096   /* SBA configuration function reg set */
+-
+-#define ASTRO_IOC_OFFSET	(32 * SBA_FUNC_SIZE)
+-#define PLUTO_IOC_OFFSET	(1 * SBA_FUNC_SIZE)
+-/* Ike's IOC's occupy functions 2 and 3 */
+-#define IKE_IOC_OFFSET(p)	((p+2) * SBA_FUNC_SIZE)
+-
+-#define IOC_CTRL          0x8	/* IOC_CTRL offset */
+-#define IOC_CTRL_TC       (1 << 0) /* TOC Enable */
+-#define IOC_CTRL_CE       (1 << 1) /* Coalesce Enable */
+-#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. */
+-
+-#define ROPES_PER_IOC	8	/* per Ike half or Pluto/Astro */
+-
+-
+-/*
+-** Offsets into MBIB (Function 0 on Ike and hopefully Astro)
+-** Firmware programs this stuff. Don't touch it.
+-*/
+-#define LMMIO_DIRECT0_BASE  0x300
+-#define LMMIO_DIRECT0_MASK  0x308
+-#define LMMIO_DIRECT0_ROUTE 0x310
+-
+-#define LMMIO_DIST_BASE  0x360
+-#define LMMIO_DIST_MASK  0x368
+-#define LMMIO_DIST_ROUTE 0x370
+-
+-#define IOS_DIST_BASE	0x390
+-#define IOS_DIST_MASK	0x398
+-#define IOS_DIST_ROUTE	0x3A0
+-
+-#define IOS_DIRECT_BASE	0x3C0
+-#define IOS_DIRECT_MASK	0x3C8
+-#define IOS_DIRECT_ROUTE 0x3D0
+-
+-/*
+-** Offsets into I/O TLB (Function 2 and 3 on Ike)
+-*/
+-#define ROPE0_CTL	0x200  /* "regbus pci0" */
+-#define ROPE1_CTL	0x208
+-#define ROPE2_CTL	0x210
+-#define ROPE3_CTL	0x218
+-#define ROPE4_CTL	0x220
+-#define ROPE5_CTL	0x228
+-#define ROPE6_CTL	0x230
+-#define ROPE7_CTL	0x238
+-
+-#define IOC_ROPE0_CFG	0x500	/* pluto only */
+-#define   IOC_ROPE_AO	  0x10	/* Allow "Relaxed Ordering" */
+-
+-
+-
+-#define HF_ENABLE	0x40
+-
+-
+-#define IOC_IBASE	0x300	/* IO TLB */
+-#define IOC_IMASK	0x308
+-#define IOC_PCOM	0x310
+-#define IOC_TCNFG	0x318
+-#define IOC_PDIR_BASE	0x320
+-
+-/* AGP GART driver looks for this */
+-#define SBA_IOMMU_COOKIE    0x0000badbadc0ffeeUL
+-
+-
+-/*
+-** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
+-** It's safer (avoid memory corruption) to keep DMA page mappings
+-** equivalently sized to VM PAGE_SIZE.
+-**
+-** We really can't avoid generating a new mapping for each
+-** page since the Virtual Coherence Index has to be generated
+-** and updated for each page.
+-**
+-** PAGE_SIZE could be greater than IOVP_SIZE. But not the inverse.
+-*/
+-#define IOVP_SIZE	PAGE_SIZE
+-#define IOVP_SHIFT	PAGE_SHIFT
+-#define IOVP_MASK	PAGE_MASK
+-
+-#define SBA_PERF_CFG	0x708	/* Performance Counter stuff */
+-#define SBA_PERF_MASK1	0x718
+-#define SBA_PERF_MASK2	0x730
+-
+-
+-/*
+-** Offsets into PCI Performance Counters (functions 12 and 13)
+-** Controlled by PERF registers in function 2 & 3 respectively.
+-*/
+-#define SBA_PERF_CNT1	0x200
+-#define SBA_PERF_CNT2	0x208
+-#define SBA_PERF_CNT3	0x210
+-
+-
+-struct ioc {
+-	void __iomem	*ioc_hpa;	/* I/O MMU base address */
+-	char		*res_map;	/* resource map, bit == pdir entry */
+-	u64		*pdir_base;	/* physical base address */
+-	unsigned long	ibase;	/* pdir IOV Space base - shared w/lba_pci */
+-	unsigned long	imask;	/* pdir IOV Space mask - shared w/lba_pci */
+-#ifdef ZX1_SUPPORT
+-	unsigned long	iovp_mask;	/* help convert IOVA to IOVP */
+-#endif
+-	unsigned long	*res_hint;	/* next avail IOVP - circular search */
+-	spinlock_t	res_lock;
+-	unsigned int	res_bitshift;	/* from the LEFT! */
+-	unsigned int	res_size;	/* size of resource map in bytes */
+-#ifdef SBA_HINT_SUPPORT
+-/* FIXME : DMA HINTs not used */
+-	unsigned long	hint_mask_pdir;	/* bits used for DMA hints */
+-	unsigned int	hint_shift_pdir;
+-#endif
+-#if DELAYED_RESOURCE_CNT > 0
+-	int saved_cnt;
+-	struct sba_dma_pair {
+-		dma_addr_t	iova;
+-		size_t		size;
+-	} saved[DELAYED_RESOURCE_CNT];
+-#endif
+-
+-#ifdef SBA_COLLECT_STATS
+-#define SBA_SEARCH_SAMPLE	0x100
+-	unsigned long avg_search[SBA_SEARCH_SAMPLE];
+-	unsigned long avg_idx;	/* current index into avg_search */
+-	unsigned long used_pages;
+-	unsigned long msingle_calls;
+-	unsigned long msingle_pages;
+-	unsigned long msg_calls;
+-	unsigned long msg_pages;
+-	unsigned long usingle_calls;
+-	unsigned long usingle_pages;
+-	unsigned long usg_calls;
+-	unsigned long usg_pages;
+-#endif
+-
+-	/* STUFF We don't need in performance path */
+-	unsigned int	pdir_size;	/* in bytes, determined by IOV Space size */
+-};
+-
+-struct sba_device {
+-	struct sba_device	*next;	/* list of SBA's in system */
+-	struct parisc_device	*dev;	/* dev found in bus walk */
+-	struct parisc_device_id	*iodc;	/* data about dev from firmware */
+-	const char 		*name;
+-	void __iomem		*sba_hpa; /* base address */
+-	spinlock_t		sba_lock;
+-	unsigned int		flags;  /* state/functionality enabled */
+-	unsigned int		hw_rev;  /* HW revision of chip */
+-
+-	struct resource		chip_resv; /* MMIO reserved for chip */
+-	struct resource		iommu_resv; /* MMIO reserved for iommu */
+-
+-	unsigned int		num_ioc;  /* number of on-board IOC's */
+-	struct ioc		ioc[MAX_IOC];
+-};
+-
+-
+-static struct sba_device *sba_list;
++struct sba_device *sba_list;
++EXPORT_SYMBOL_GPL(sba_list);
+ 
+ static unsigned long ioc_needs_fdc = 0;
+ 
+@@ -300,8 +103,14 @@ static unsigned long piranha_bad_128k = 
+ /* Looks nice and keeps the compiler happy */
+ #define SBA_DEV(d) ((struct sba_device *) (d))
+ 
++#ifdef CONFIG_AGP_PARISC
++#define SBA_AGP_SUPPORT
++#endif /*CONFIG_AGP_PARISC*/
++
+ #ifdef SBA_AGP_SUPPORT
+-static int reserve_sba_gart = 1;
++static int sba_reserve_agpgart = 1;
++module_param(sba_reserve_agpgart, int, 1);
++MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
+ #endif
+ 
+ #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1))
+@@ -741,7 +550,7 @@ sba_io_pdir_entry(u64 *pdir_ptr, space_t
+ 	asm("lci 0(%%sr1, %1), %0" : "=r" (ci) : "r" (vba));
+ 	pa |= (ci >> 12) & 0xff;  /* move CI (8 bits) into lowest byte */
+ 
+-	pa |= 0x8000000000000000ULL;	/* set "valid" bit */
++	pa |= SBA_PDIR_VALID_BIT;	/* set "valid" bit */
+ 	*pdir_ptr = cpu_to_le64(pa);	/* swap and store into I/O Pdir */
+ 
+ 	/*
+@@ -1498,6 +1307,10 @@ #endif
+ 	WRITE_REG(ioc->ibase | 31, ioc->ioc_hpa + IOC_PCOM);
+ 
+ #ifdef SBA_AGP_SUPPORT
++{
++	struct klist_iter i;
++	struct device *dev = NULL;
++
+ 	/*
+ 	** If an AGP device is present, only use half of the IOV space
+ 	** for PCI DMA.  Unfortunately we can't know ahead of time
+@@ -1506,20 +1319,22 @@ #ifdef SBA_AGP_SUPPORT
+ 	** We program the next pdir index after we stop w/ a key for
+ 	** the GART code to handshake on.
+ 	*/
+-	device=NULL;
+-	for (lba = sba->child; lba; lba = lba->sibling) {
++        klist_iter_init(&sba->dev.klist_children, &i);
++	while (dev = next_device(&i)) {
++		struct parisc_device *lba = to_parisc_device(dev);
+ 		if (IS_QUICKSILVER(lba))
+-			break;
++			agp_found = 1;
+ 	}
++	klist_iter_exit(&i);
+ 
+-	if (lba) {
+-		DBG_INIT("%s: Reserving half of IOVA space for AGP GART support\n", __FUNCTION__);
++	if (agp_found && sba_reserve_agpgart) {
++		printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n",
++		       __FUNCTION__, (iova_space_size/2) >> 20);
+ 		ioc->pdir_size /= 2;
+-		((u64 *)ioc->pdir_base)[PDIR_INDEX(iova_space_size/2)] = SBA_IOMMU_COOKIE;
+-	} else {
+-		DBG_INIT("%s: No GART needed - no AGP controller found\n", __FUNCTION__);
++		ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE;
+ 	}
+-#endif /* 0 */
++}
++#endif /*SBA_AGP_SUPPORT*/
+ 
+ }
+ 
+@@ -1701,7 +1516,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%
+ 	}
+ #endif
+ 
+-	if (!IS_PLUTO(sba_dev->iodc)) {
++	if (!IS_PLUTO(sba_dev->dev)) {
+ 		ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL);
+ 		DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->",
+ 			__FUNCTION__, sba_dev->sba_hpa, ioc_ctl);
+@@ -1718,9 +1533,8 @@ #ifdef DEBUG_SBA_INIT
+ #endif
+ 	} /* if !PLUTO */
+ 
+-	if (IS_ASTRO(sba_dev->iodc)) {
++	if (IS_ASTRO(sba_dev->dev)) {
+ 		int err;
+-		/* PAT_PDC (L-class) also reports the same goofy base */
+ 		sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, ASTRO_IOC_OFFSET);
+ 		num_ioc = 1;
+ 
+@@ -1730,13 +1544,9 @@ #endif
+ 		err = request_resource(&iomem_resource, &(sba_dev->chip_resv));
+ 		BUG_ON(err < 0);
+ 
+-	} else if (IS_PLUTO(sba_dev->iodc)) {
++	} else if (IS_PLUTO(sba_dev->dev)) {
+ 		int err;
+ 
+-		/* We use a negative value for IOC HPA so it gets 
+-                 * corrected when we add it with IKE's IOC offset.
+-		 * Doesnt look clean, but fewer code. 
+-                 */
+ 		sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, PLUTO_IOC_OFFSET);
+ 		num_ioc = 1;
+ 
+@@ -1752,14 +1562,14 @@ #endif
+ 		err = request_resource(&iomem_resource, &(sba_dev->iommu_resv));
+ 		WARN_ON(err < 0);
+ 	} else {
+-		/* IS_IKE (ie N-class, L3000, L1500) */
++		/* IKE, REO */
+ 		sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(0));
+ 		sba_dev->ioc[1].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(1));
+ 		num_ioc = 2;
+ 
+ 		/* TODO - LOOKUP Ike/Stretch chipset mem map */
+ 	}
+-	/* XXX: What about Reo? */
++	/* XXX: What about Reo Grande? */
+ 
+ 	sba_dev->num_ioc = num_ioc;
+ 	for (i = 0; i < num_ioc; i++) {
+@@ -1774,7 +1584,7 @@ #endif
+ 			 * Overrides bit 1 in DMA Hint Sets.
+ 			 * Improves netperf UDP_STREAM by ~10% for bcm5701.
+ 			 */
+-			if (IS_PLUTO(sba_dev->iodc)) {
++			if (IS_PLUTO(sba_dev->dev)) {
+ 				void __iomem *rope_cfg;
+ 				unsigned long cfg_val;
+ 
+@@ -1803,7 +1613,7 @@ #endif
+ 				READ_REG(sba_dev->ioc[i].ioc_hpa + 0x400)
+ 			);
+ 
+-		if (IS_PLUTO(sba_dev->iodc)) {
++		if (IS_PLUTO(sba_dev->dev)) {
+ 			sba_ioc_init_pluto(sba_dev->dev, &(sba_dev->ioc[i]), i);
+ 		} else {
+ 			sba_ioc_init(sba_dev->dev, &(sba_dev->ioc[i]), i);
+@@ -2067,7 +1877,7 @@ sba_driver_callback(struct parisc_device
+ 	/* Read HW Rev First */
+ 	func_class = READ_REG(sba_addr + SBA_FCLASS);
+ 
+-	if (IS_ASTRO(&dev->id)) {
++	if (IS_ASTRO(dev)) {
+ 		unsigned long fclass;
+ 		static char astro_rev[]="Astro ?.?";
+ 
+@@ -2078,11 +1888,11 @@ sba_driver_callback(struct parisc_device
+ 		astro_rev[8] = '0' + (char) ((fclass & 0x18) >> 3);
+ 		version = astro_rev;
+ 
+-	} else if (IS_IKE(&dev->id)) {
++	} else if (IS_IKE(dev)) {
+ 		static char ike_rev[] = "Ike rev ?";
+ 		ike_rev[8] = '0' + (char) (func_class & 0xff);
+ 		version = ike_rev;
+-	} else if (IS_PLUTO(&dev->id)) {
++	} else if (IS_PLUTO(dev)) {
+ 		static char pluto_rev[]="Pluto ?.?";
+ 		pluto_rev[6] = '0' + (char) ((func_class & 0xf0) >> 4); 
+ 		pluto_rev[8] = '0' + (char) (func_class & 0x0f); 
+@@ -2097,7 +1907,7 @@ sba_driver_callback(struct parisc_device
+ 		global_ioc_cnt = count_parisc_driver(&sba_driver);
+ 
+ 		/* Astro and Pluto have one IOC per SBA */
+-		if ((!IS_ASTRO(&dev->id)) || (!IS_PLUTO(&dev->id)))
++		if ((!IS_ASTRO(dev)) || (!IS_PLUTO(dev)))
+ 			global_ioc_cnt *= 2;
+ 	}
+ 
+@@ -2117,7 +1927,6 @@ sba_driver_callback(struct parisc_device
+ 
+ 	sba_dev->dev = dev;
+ 	sba_dev->hw_rev = func_class;
+-	sba_dev->iodc = &dev->id;
+ 	sba_dev->name = dev->name;
+ 	sba_dev->sba_hpa = sba_addr;
+ 
+diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
+index 657a3ab..dcfba12 100644
+--- a/drivers/scsi/53c700.c
++++ b/drivers/scsi/53c700.c
+@@ -294,6 +294,7 @@ NCR_700_detect(struct scsi_host_template
+ 	__u8 *memory;
+ 	__u32 *script;
+ 	struct Scsi_Host *host;
++	const char *chipname;
+ 	static int banner = 0;
+ 	int j;
+ 
+@@ -392,11 +393,11 @@ NCR_700_detect(struct scsi_host_template
+ 		printk(KERN_NOTICE "53c700: Version " NCR_700_VERSION " By James.Bottomley at HansenPartnership.com\n");
+ 		banner = 1;
+ 	}
++	chipname = hostdata->chip710 ? "53c710" : \
++		   (hostdata->fast ? "53c700-66" : "53c700");
+ 	printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no,
+-	       hostdata->chip710 ? "53c710" :
+-	       (hostdata->fast ? "53c700-66" : "53c700"),
+-	       hostdata->rev, hostdata->differential ?
+-	       "(Differential)" : "");
++			chipname, hostdata->rev,
++			hostdata->differential ?  "(Differential)" : "");
+ 	/* reset the chip */
+ 	NCR_700_chip_reset(host);
+ 
+diff --git a/drivers/scsi/script_asm.pl b/drivers/scsi/script_asm.pl
+index 7d651d9..d8847ec 100644
+--- a/drivers/scsi/script_asm.pl
++++ b/drivers/scsi/script_asm.pl
+@@ -156,11 +156,11 @@ # Parsing regular expressions
+ $hexnum = '0[xX][0-9A-Fa-f]+';		
+ $constant = "$hexnum|$decnum";
+ 
+-# yucky - since we can't control grouping of # $constant, we need to 
++# yucky - since we can't control grouping of $constant, we need to 
+ # expand out each alternative for $value.
+ 
+-$value = "$identifier|$identifier\\s*[+\-]\\s*$decnum|".
+-    "$identifier\\s*[+-]\s*$hexnum|$constant";
++$value = "$identifier\\s*[+-]\\s*$decnum|$identifier\\s*[+-]\s*$hexnum|".
++    "$identifier\\s*[+-]\\s*$identifier|$identifier|$constant";
+ 
+ print STDERR "value regex = $value\n" if ($debug);
+ 
+@@ -490,7 +490,12 @@ print STDERR "Parsing MOVE FROM $transfe
+ 	    $address += 2;
+ 	} elsif ($rest =~ /^MEMORY\s+(.*)/i) {
+ 	    $rest = $1;
+-	    $code[$address] = 0xc0_00_00_00; 
++	    if ($rest =~ /^NO\s*FLUSH\s+(.*)/i) {
++		$rest = $1;
++		$code[$address] = 0xc1_00_00_00;
++	    } else {
++		$code[$address] = 0xc0_00_00_00; 
++	    }
+ 	    if ($rest =~ /^($value)\s*,\s*($value)\s*,\s*($value)\s*$/) {
+ 		$count = $1;
+ 		$source = $2;
+@@ -715,7 +720,7 @@ # with this syntax to set target mode.
+ 	} else {
+ 	    $code[$address] = 0x98_00_00_00;
+ 	}
+-print STDERR "parsing JUMP, rest = $rest\n" if ($debug);
++print STDERR "parsing $instruction, rest = $rest\n" if ($debug);
+ 
+ # Relative jump. 
+ 	if ($rest =~ /^(REL\s*\(\s*$identifier\s*\))\s*(.*)/i) { 
+@@ -743,7 +748,7 @@ # Absolute jump, requires no more gunk
+ 	} else {
+ 	    die
+ "$0 : syntax error in line $lineno : $_
+-	expected , <conditional> or end of line, got $1
++	expected , <conditional> or end of line, got $rest
+ ";
+ 	}
+ 	
+diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
+index 739d3ef..52abce4 100644
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
+@@ -204,13 +204,6 @@ void sym_xpt_done(struct sym_hcb *np, st
+ 	cmd->scsi_done(cmd);
+ }
+ 
+-static void sym_xpt_done2(struct sym_hcb *np, struct scsi_cmnd *cmd, int cam_status)
+-{
+-	sym_set_cam_status(cmd, cam_status);
+-	sym_xpt_done(np, cmd);
+-}
+-
+-
+ /*
+  *  Tell the SCSI layer about a BUS RESET.
+  */
+@@ -415,10 +408,8 @@ static int sym_queue_command(struct sym_
+ 	 *  Minimal checkings, so that we will not 
+ 	 *  go outside our tables.
+ 	 */
+-	if (sdev->id == np->myaddr) {
+-		sym_xpt_done2(np, cmd, DID_NO_CONNECT);
+-		return 0;
+-	}
++	if (sdev->id == np->myaddr)
++		goto nodev;
+ 
+ 	/*
+ 	 *  Retrieve the target descriptor.
+@@ -439,6 +430,11 @@ static int sym_queue_command(struct sym_
+ 		return 1;	/* Means resource shortage */
+ 	sym_queue_scsiio(np, cmd, cp);
+ 	return 0;
++
++ nodev:
++	cmd->result = DID_NO_CONNECT << 16;
++	cmd->scsi_done(cmd);
++	return 0;
+ }
+ 
+ /*
+@@ -1349,7 +1345,7 @@ static int sym_host_info(struct sym_hcb 
+ 			 "revision id 0x%x\n",
+ 			 np->s.chip_name, np->device_id, np->revision_id);
+ 	copy_info(&info, "At PCI address %s, IRQ " IRQ_FMT "\n",
+-		pci_name(np->s.device), IRQ_PRM(np->s.irq));
++		pci_name(np->s.device), IRQ_PRM(np->s.device->irq));
+ 	copy_info(&info, "Min. period factor %d, %s SCSI BUS%s\n",
+ 			 (int) (np->minsync_dt ? np->minsync_dt : np->minsync),
+ 			 np->maxwide ? "Wide" : "Narrow",
+@@ -1402,8 +1398,8 @@ static void sym_free_resources(struct sy
+ 	/*
+ 	 *  Free O/S specific resources.
+ 	 */
+-	if (np->s.irq)
+-		free_irq(np->s.irq, np);
++	if (pdev->irq)
++		free_irq(pdev->irq, np);
+ 	if (np->s.ioaddr)
+ 		pci_iounmap(pdev, np->s.ioaddr);
+ 	if (np->s.ramaddr)
+@@ -1552,7 +1548,6 @@ static struct Scsi_Host * __devinit sym_
+ 			sym_name(np), pdev->irq);
+ 		goto attach_failed;
+ 	}
+-	np->s.irq = pdev->irq;
+ 
+ 	/*
+ 	 *  After SCSI devices have been opened, we cannot
+@@ -1592,6 +1587,10 @@ static struct Scsi_Host * __devinit sym_
+ 	BUG_ON(sym2_transport_template == NULL);
+ 	instance->transportt	= sym2_transport_template;
+ 
++	/* 53c896 rev 1 errata: DMA may not cross 16MB boundary */
++	if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && np->revision_id < 2)
++		instance->dma_boundary = 0xFFFFFF;
++
+ 	spin_unlock_irqrestore(instance->host_lock, flags);
+ 
+ 	return instance;
+diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h
+index e022d3c..d4d98ae 100644
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.h
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.h
+@@ -184,7 +184,6 @@ struct sym_shcb {
+ 	void __iomem *	ioaddr;		/* MMIO kernel io address	*/
+ 	void __iomem *	ramaddr;	/* RAM  kernel io address	*/
+ 	u_short		io_ws;		/* IO window size		*/
+-	int		irq;		/* IRQ number			*/
+ 
+ 	struct timer_list timer;	/* Timer handler link header	*/
+ 	u_long		lasttime;
+diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c
+index 913c71c..4d65fb7 100644
+--- a/drivers/serial/8250_gsc.c
++++ b/drivers/serial/8250_gsc.c
+@@ -22,7 +22,6 @@ #include <linux/types.h>
+ #include <asm/hardware.h>
+ #include <asm/parisc-device.h>
+ #include <asm/io.h>
+-#include <asm/serial.h> /* for LASI_BASE_BAUD */
+ 
+ #include "8250.h"
+ 
+@@ -54,7 +53,8 @@ serial_init_chip(struct parisc_device *d
+ 
+ 	memset(&port, 0, sizeof(port));
+ 	port.iotype	= UPIO_MEM;
+-	port.uartclk	= LASI_BASE_BAUD * 16;
++	/* 7.272727MHz on Lasi.  Assumed the same for Dino, Wax and Timi. */
++	port.uartclk	= 7272727;
+ 	port.mapbase	= address;
+ 	port.membase	= ioremap_nocache(address, 16);
+ 	port.irq	= dev->irq;
+diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
+index 5b48ac2..1c1994f 100644
+--- a/drivers/serial/Kconfig
++++ b/drivers/serial/Kconfig
+@@ -556,10 +556,11 @@ config SERIAL_MUX
+ 	default y
+ 	---help---
+ 	  Saying Y here will enable the hardware MUX serial driver for
+-	  the Nova and K class systems.  The hardware MUX is not 8250/16550 
+-	  compatible therefore the /dev/ttyB0 device is shared between the 
+-	  Serial MUX and the PDC software console.  The following steps 
+-	  need to be completed to use the Serial MUX:
++	  the Nova, K class systems and D class with a 'remote control card'.
++	  The hardware MUX is not 8250/16550 compatible therefore the 
++	  /dev/ttyB0 device is shared between the Serial MUX and the PDC
++	  software console. The following steps need to be completed to use
++	  the Serial MUX:
+ 
+ 	    1. create the device entry (mknod /dev/ttyB0 c 11 0)
+ 	    2. Edit the /etc/inittab to start a getty listening on /dev/ttyB0
+diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
+index 372e47f..9bc49c9 100644
+--- a/drivers/serial/serial_core.c
++++ b/drivers/serial/serial_core.c
+@@ -2023,6 +2023,7 @@ static inline void
+ uart_report_port(struct uart_driver *drv, struct uart_port *port)
+ {
+ 	char address[64];
++	char irq[16];
+ 
+ 	switch (port->iotype) {
+ 	case UPIO_PORT:
+@@ -2045,10 +2046,19 @@ uart_report_port(struct uart_driver *drv
+ 		break;
+ 	}
+ 
+-	printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
++#ifndef NO_IRQ
++#define NO_IRQ (-1)
++#endif
++	if (port->irq == NO_IRQ) {
++		strlcpy(irq, "polled", sizeof(irq));
++	} else {
++		snprintf(irq, sizeof(irq), "irq = %d", port->irq);
++	}
++
++	printk(KERN_INFO "%s%s%s%d at %s (%s) is a %s\n",
+ 	       port->dev ? port->dev->bus_id : "",
+ 	       port->dev ? ": " : "",
+-	       drv->dev_name, port->line, address, port->irq, uart_type(port));
++	       drv->dev_name, port->line, address, irq, uart_type(port));
+ }
+ 
+ static void
+diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
+index a2c56b2..26e33c7 100644
+--- a/drivers/usb/input/hid-core.c
++++ b/drivers/usb/input/hid-core.c
+@@ -752,21 +752,31 @@ static __inline__ __u32 s32ton(__s32 val
+ }
+ 
+ /*
+- * Extract/implement a data field from/to a report.
++ * Extract/implement a data field from/to a little endian report (bit array).
+  */
+ 
+ static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n)
+ {
+-	report += (offset >> 5) << 2; offset &= 31;
+-	return (le64_to_cpu(get_unaligned((__le64*)report)) >> offset) & ((1ULL << n) - 1);
++	u32 x;
++
++	report += offset >> 3;  /* adjust byte index */
++	offset &= 8 - 1;
++	x = get_unaligned((u32 *) report);
++	x = le32_to_cpu(x);
++	x = (x >> offset) & ((1 << n) - 1);
++	return x;
+ }
+ 
+ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
+ {
+-	report += (offset >> 5) << 2; offset &= 31;
+-	put_unaligned((get_unaligned((__le64*)report)
+-		& cpu_to_le64(~((((__u64) 1 << n) - 1) << offset)))
+-		| cpu_to_le64((__u64)value << offset), (__le64*)report);
++	u32 x;
++
++	report += offset >> 3;
++	offset &= 8 - 1;
++	x = get_unaligned((u32 *)report);
++	x &= cpu_to_le32(~((((__u32) 1 << n) - 1) << offset));
++	x |= cpu_to_le32(value << offset);
++	put_unaligned(x,(u32 *)report);
+ }
+ 
+ /*
+diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c
+index 32b5d62..5bcdaaf 100644
+--- a/fs/binfmt_som.c
++++ b/fs/binfmt_som.c
+@@ -29,6 +29,7 @@ #include <linux/shm.h>
+ #include <linux/personality.h>
+ #include <linux/init.h>
+ 
++#include <asm/a.out.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+ 
+@@ -194,6 +195,7 @@ load_som_binary(struct linux_binprm * bp
+ 	unsigned long som_entry;
+ 	struct som_hdr *som_ex;
+ 	struct som_exec_auxhdr *hpuxhdr;
++	struct files_struct *files;
+ 
+ 	/* Get the exec-header */
+ 	som_ex = (struct som_hdr *) bprm->buf;
+@@ -208,15 +210,27 @@ load_som_binary(struct linux_binprm * bp
+ 	size = som_ex->aux_header_size;
+ 	if (size > SOM_PAGESIZE)
+ 		goto out;
+-	hpuxhdr = (struct som_exec_auxhdr *) kmalloc(size, GFP_KERNEL);
++	hpuxhdr = kmalloc(size, GFP_KERNEL);
+ 	if (!hpuxhdr)
+ 		goto out;
+ 
+ 	retval = kernel_read(bprm->file, som_ex->aux_header_location,
+ 			(char *) hpuxhdr, size);
++	if (retval != size) {
++		if (retval >= 0)
++			retval = -EIO;
++		goto out_free;
++	}
++
++	files = current->files; /* Refcounted so ok */
++	retval = unshare_files();
+ 	if (retval < 0)
+ 		goto out_free;
+-#error "Fix security hole before enabling me"
++	if (files == current->files) {
++		put_files_struct(files);
++		files = NULL;
++	}
++
+ 	retval = get_unused_fd();
+ 	if (retval < 0)
+ 		goto out_free;
+diff --git a/include/asm-generic/compat_signal.h b/include/asm-generic/compat_signal.h
+new file mode 100644
+index 0000000..889d57f
+--- /dev/null
++++ b/include/asm-generic/compat_signal.h
+@@ -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 */
+diff --git a/include/asm-parisc/agp.h b/include/asm-parisc/agp.h
+new file mode 100644
+index 0000000..9f61d4e
+--- /dev/null
++++ b/include/asm-parisc/agp.h
+@@ -0,0 +1,25 @@
++#ifndef _ASM_PARISC_AGP_H
++#define _ASM_PARISC_AGP_H
++
++/*
++ * PARISC specific AGP definitions.
++ * Copyright (c) 2006 Kyle McMartin <kyle at parisc-linux.org>
++ *
++ */
++
++#define map_page_into_agp(page)		/* nothing */
++#define unmap_page_from_agp(page)	/* nothing */
++#define flush_agp_mappings()		/* nothing */
++#define flush_agp_cache()		mb()
++
++/* Convert a physical address to an address suitable for the GART. */
++#define phys_to_gart(x) (x)
++#define gart_to_phys(x) (x)
++
++/* GATT allocation. Returns/accepts GATT kernel virtual address. */
++#define alloc_gatt_pages(order)		\
++	((char *)__get_free_pages(GFP_KERNEL, (order)))
++#define free_gatt_pages(table, order)	\
++	free_pages((unsigned long)(table), (order))
++
++#endif /* _ASM_PARISC_AGP_H */
+diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h
+index 1a7bfe6..5a1e0e8 100644
+--- a/include/asm-parisc/assembly.h
++++ b/include/asm-parisc/assembly.h
+@@ -29,7 +29,8 @@ #define STREG	std
+ #define LDREGX  ldd,s
+ #define LDREGM	ldd,mb
+ #define STREGM	std,ma
+-#define SHRREG  shrd
++#define SHRREG	shrd
++#define SHLREG	shld
+ #define RP_OFFSET	16
+ #define FRAME_SIZE	128
+ #define CALLEE_REG_FRAME_SIZE	144
+@@ -39,7 +40,8 @@ #define STREG	stw
+ #define LDREGX  ldwx,s
+ #define LDREGM	ldwm
+ #define STREGM	stwm
+-#define SHRREG  shr
++#define SHRREG	shr
++#define SHLREG	shlw
+ #define RP_OFFSET	20
+ #define FRAME_SIZE	64
+ #define CALLEE_REG_FRAME_SIZE	128
+diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h
+index 0b459cd..2bc41f2 100644
+--- a/include/asm-parisc/cacheflush.h
++++ b/include/asm-parisc/cacheflush.h
+@@ -191,16 +191,38 @@ flush_anon_page(struct page *page, unsig
+ }
+ #define ARCH_HAS_FLUSH_ANON_PAGE
+ 
+-static inline void
+-flush_kernel_dcache_page(struct page *page)
++#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
++void flush_kernel_dcache_page_addr(void *addr);
++static inline void flush_kernel_dcache_page(struct page *page)
+ {
+-	flush_kernel_dcache_page_asm(page_address(page));
++	flush_kernel_dcache_page_addr(page_address(page));
+ }
+-#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
+ 
+ #ifdef CONFIG_DEBUG_RODATA
+ void mark_rodata_ro(void);
+ #endif
+ 
++#ifdef CONFIG_PA8X00
++/* Only pa8800, pa8900 needs this */
++#define ARCH_HAS_KMAP
++
++void kunmap_parisc(void *addr);
++
++static inline void *kmap(struct page *page)
++{
++	might_sleep();
++	return page_address(page);
++}
++
++#define kunmap(page)			kunmap_parisc(page_address(page))
++
++#define kmap_atomic(page, idx)		page_address(page)
++
++#define kunmap_atomic(addr, idx)	kunmap_parisc(addr)
++
++#define kmap_atomic_pfn(pfn, idx)	page_address(pfn_to_page(pfn))
++#define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
++#endif
++
+ #endif /* _PARISC_CACHEFLUSH_H */
+ 
+diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
+index 71b4eee..d834058 100644
+--- a/include/asm-parisc/compat.h
++++ b/include/asm-parisc/compat.h
+@@ -5,7 +5,7 @@ #define _ASM_PARISC_COMPAT_H
+  */
+ #include <linux/types.h>
+ #include <linux/sched.h>
+-#include <linux/personality.h>
++#include <linux/thread_info.h>
+ 
+ #define COMPAT_USER_HZ 100
+ 
+@@ -150,9 +150,10 @@ static __inline__ void __user *compat_al
+ 	return (void __user *)regs->gr[30];
+ }
+ 
++#define HAVE_ARCH_IS_COMPAT_TASK
+ static inline int __is_compat_task(struct task_struct *t)
+ {
+-	return personality(t->personality) == PER_LINUX32;
++	return test_ti_thread_flag(t->thread_info, TIF_32BIT);
+ }
+ 
+ static inline int is_compat_task(void)
+diff --git a/include/asm-parisc/dma.h b/include/asm-parisc/dma.h
+index 9979c3c..da2cf37 100644
+--- a/include/asm-parisc/dma.h
++++ b/include/asm-parisc/dma.h
+@@ -72,18 +72,13 @@ #define DMA2_CLR_MASK_REG       0xDC    
+ #define DMA2_MASK_ALL_REG       0xDE    /* all-channels mask (w) */
+ #define DMA2_EXT_MODE_REG	(0x400 | DMA2_MODE_REG)
+ 
+-extern spinlock_t dma_spin_lock;
+-
+ static __inline__ unsigned long claim_dma_lock(void)
+ {
+-	unsigned long flags;
+-	spin_lock_irqsave(&dma_spin_lock, flags);
+-	return flags;
++	return 0;
+ }
+ 
+ static __inline__ void release_dma_lock(unsigned long flags)
+ {
+-	spin_unlock_irqrestore(&dma_spin_lock, flags);
+ }
+ 
+ 
+diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h
+index 6a332a9..d84bbb2 100644
+--- a/include/asm-parisc/futex.h
++++ b/include/asm-parisc/futex.h
+@@ -1,6 +1,71 @@
+-#ifndef _ASM_FUTEX_H
+-#define _ASM_FUTEX_H
++#ifndef _ASM_PARISC_FUTEX_H
++#define _ASM_PARISC_FUTEX_H
+ 
+-#include <asm-generic/futex.h>
++#ifdef __KERNEL__
+ 
++#include <linux/futex.h>
++#include <asm/errno.h>
++#include <asm/uaccess.h>
++
++static inline int
++futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
++{
++	int op = (encoded_op >> 28) & 7;
++	int cmp = (encoded_op >> 24) & 15;
++	int oparg = (encoded_op << 8) >> 20;
++	int cmparg = (encoded_op << 20) >> 20;
++	int oldval = 0, ret;
++	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
++		oparg = 1 << oparg;
++
++	if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
++		return -EFAULT;
++
++	inc_preempt_count();
++
++	switch (op) {
++	case FUTEX_OP_SET:
++	case FUTEX_OP_ADD:
++	case FUTEX_OP_OR:
++	case FUTEX_OP_ANDN:
++	case FUTEX_OP_XOR:
++	default:
++		ret = -ENOSYS;
++	}
++
++	dec_preempt_count();
++
++	if (!ret) {
++		switch (cmp) {
++		case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
++		case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
++		case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
++		case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
++		case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
++		case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
++		default: ret = -ENOSYS;
++		}
++	}
++	return ret;
++}
++
++/* Non-atomic version */
++static inline int
++futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
++{
++	int err = 0;
++	int uval;
++
++	if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
++		return -EFAULT;
++
++	err = get_user(uval, uaddr);
++	if (err) return -EFAULT;
++	if (uval == oldval)
++		err = put_user(newval, uaddr);
++	if (err) return -EFAULT;
++	return uval;
++}
++
++#endif
+ #endif
+diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h
+index b9eb245..c1963ce 100644
+--- a/include/asm-parisc/io.h
++++ b/include/asm-parisc/io.h
+@@ -134,7 +134,7 @@ extern inline void __iomem * ioremap(uns
+ }
+ #define ioremap_nocache(off, sz)	ioremap((off), (sz))
+ 
+-extern void iounmap(void __iomem *addr);
++extern void iounmap(const volatile void __iomem *addr);
+ 
+ static inline unsigned char __raw_readb(const volatile void __iomem *addr)
+ {
+diff --git a/include/asm-parisc/iosapic.h b/include/asm-parisc/iosapic.h
+deleted file mode 100644
+index 613390e..0000000
+--- a/include/asm-parisc/iosapic.h
++++ /dev/null
+@@ -1,53 +0,0 @@
+-/*
+-** This file is private to iosapic driver.
+-** If stuff needs to be used by another driver, move it to a common file.
+-**
+-** WARNING: fields most data structures here are ordered to make sure
+-**          they pack nicely for 64-bit compilation. (ie sizeof(long) == 8)
+-*/
+-
+-
+-/*
+-** I/O SAPIC init function
+-** Caller knows where an I/O SAPIC is. LBA has an integrated I/O SAPIC.
+-** Call setup as part of per instance initialization.
+-** (ie *not* init_module() function unless only one is present.)
+-** fixup_irq is to initialize PCI IRQ line support and
+-** virtualize pcidev->irq value. To be called by pci_fixup_bus().
+-*/
+-extern void *iosapic_register(unsigned long hpa);
+-extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
+-
+-
+-#ifdef __IA64__
+-/*
+-** PA: PIB (Processor Interrupt Block) is handled by Runway bus adapter.
+-**     and is hardcoded to 0xfeeNNNN0 where NNNN is id_eid field.
+-**
+-** IA64: PIB is handled by "Local SAPIC" (integrated in the processor).
+-*/
+-struct local_sapic_info {
+-	struct local_sapic_info *lsi_next;      /* point to next CPU info */
+-	int                     *lsi_cpu_id;    /* point to logical CPU id */
+-	unsigned long           *lsi_id_eid;    /* point to IA-64 CPU id */
+-	int                     *lsi_status;    /* point to CPU status   */
+-	void                    *lsi_private;   /* point to special info */
+-};
+-
+-/*
+-** "root" data structure which ties everything together.
+-** Should always be able to start with sapic_root and locate
+-** the desired information.
+-*/
+-struct sapic_info {
+-	struct sapic_info	*si_next;	/* info is per cell */
+-	int                     si_cellid;      /* cell id */
+-	unsigned int            si_status;       /* status  */
+-	char                    *si_pib_base;   /* intr blk base address */
+-	local_sapic_info_t      *si_local_info;
+-	io_sapic_info_t         *si_io_info;
+-	extint_info_t           *si_extint_info;/* External Intr info      */
+-};
+-
+-#endif /* IA64 */
+-
+diff --git a/include/asm-parisc/irq-handlers.h b/include/asm-parisc/irq-handlers.h
+new file mode 100644
+index 0000000..95a9d1b
+--- /dev/null
++++ b/include/asm-parisc/irq-handlers.h
+@@ -0,0 +1,15 @@
++HANDLE_LEVEL_IRQ(_chip, cpu_ack_irq, cpu_end_irq)
++HANDLE_SPECIFIC_IRQ(_timer, cpu_ack_irq, cpu_end_irq, timer_interrupt)
++#ifdef CONFIG_SMP
++HANDLE_SPECIFIC_IRQ(_ipi, cpu_ack_irq, cpu_end_irq, ipi_interrupt)
++#endif
++#ifdef CONFIG_IOSAPIC
++HANDLE_LEVEL_IRQ(_iosapic, cpu_ack_irq, iosapic_end_irq)
++#endif
++
++static inline char *arch_handle_irq_name(void fastcall (*handle)(unsigned int,
++							struct irq_desc *,
++							struct pt_regs *))
++{
++	return NULL;
++}
+diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h
+index 5cae260..0bdcab3 100644
+--- a/include/asm-parisc/irq.h
++++ b/include/asm-parisc/irq.h
+@@ -8,6 +8,7 @@ #ifndef _ASM_PARISC_IRQ_H
+ #define _ASM_PARISC_IRQ_H
+ 
+ #include <linux/cpumask.h>
++#include <linux/irqreturn.h>
+ #include <asm/types.h>
+ 
+ #define NO_IRQ		(-1)
+@@ -26,12 +27,28 @@ #define CPU_IRQ_MAX	(CPU_IRQ_BASE + (BIT
+ 
+ #define NR_IRQS		(CPU_IRQ_MAX + 1)
+ 
++#define ARCH_HAS_IRQ_HANDLERS
++
++struct irq_desc;
++
++void fastcall handle_level_irq_chip(unsigned int irq, struct irq_desc *desc,
++				    struct pt_regs *regs);
++void fastcall handle_level_irq_iosapic(unsigned int irq, struct irq_desc *desc,
++				       struct pt_regs *regs);
++void fastcall handle_percpu_irq_chip(unsigned int irq, struct irq_desc *desc,
++				     struct pt_regs *regs);
++void fastcall handle_specific_irq_timer(unsigned int irq,
++					struct irq_desc *desc,
++					struct pt_regs *regs);
++void fastcall handle_specific_irq_ipi(unsigned int irq, struct irq_desc *desc,
++				      struct pt_regs *regs);
++
+ static __inline__ int irq_canonicalize(int irq)
+ {
+ 	return (irq == 2) ? 9 : irq;
+ }
+ 
+-struct hw_interrupt_type;
++struct irq_chip;
+ 
+ /*
+  * Some useful "we don't have to do anything here" handlers.  Should
+@@ -39,6 +56,9 @@ struct hw_interrupt_type;
+  */
+ void no_ack_irq(unsigned int irq);
+ void no_end_irq(unsigned int irq);
++void cpu_ack_irq(struct irq_desc *, unsigned int irq);
++void cpu_end_irq(struct irq_desc *, unsigned int irq);
++void iosapic_end_irq(struct irq_desc *, unsigned int irq);
+ 
+ extern int txn_alloc_irq(unsigned int nbits);
+ extern int txn_claim_irq(int);
+@@ -46,9 +66,13 @@ extern unsigned int txn_alloc_data(unsig
+ extern unsigned long txn_alloc_addr(unsigned int);
+ extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
+ 
+-extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *);
++extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *);
+ extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
+ 
++/* Prototypes for the two directly called interrupts */
++extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
++extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *);
++
+ /* soft power switch support (power.c) */
+ extern struct tasklet_struct power_tasklet;
+ 
+diff --git a/include/asm-parisc/mckinley.h b/include/asm-parisc/mckinley.h
+new file mode 100644
+index 0000000..d1ea6f1
+--- /dev/null
++++ b/include/asm-parisc/mckinley.h
+@@ -0,0 +1,9 @@
++#ifndef ASM_PARISC_MCKINLEY_H
++#define ASM_PARISC_MCKINLEY_H
++#ifdef __KERNEL__
++
++/* declared in arch/parisc/kernel/setup.c */
++extern struct proc_dir_entry * proc_mckinley_root;
++
++#endif /*__KERNEL__*/
++#endif /*ASM_PARISC_MCKINLEY_H*/
+diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
+index 57d6d82..3567208 100644
+--- a/include/asm-parisc/page.h
++++ b/include/asm-parisc/page.h
+@@ -26,24 +26,10 @@ #define copy_page(to,from)      copy_use
+ 
+ struct page;
+ 
+-extern void purge_kernel_dcache_page(unsigned long);
+-extern void copy_user_page_asm(void *to, void *from);
+-extern void clear_user_page_asm(void *page, unsigned long vaddr);
+-
+-static inline void
+-copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg)
+-{
+-	copy_user_page_asm(vto, vfrom);
+-	flush_kernel_dcache_page_asm(vto);
+-	/* XXX: ppc flushes icache too, should we? */
+-}
+-
+-static inline void
+-clear_user_page(void *page, unsigned long vaddr, struct page *pg)
+-{
+-	purge_kernel_dcache_page((unsigned long)page);
+-	clear_user_page_asm(page, vaddr);
+-}
++void copy_user_page_asm(void *to, void *from);
++void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
++			   struct page *pg);
++void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
+ 
+ /*
+  * These are used to make use of C type-checking..
+diff --git a/include/asm-parisc/param.h b/include/asm-parisc/param.h
+index 07cb9b9..32e03d8 100644
+--- a/include/asm-parisc/param.h
++++ b/include/asm-parisc/param.h
+@@ -2,13 +2,9 @@ #ifndef _ASMPARISC_PARAM_H
+ #define _ASMPARISC_PARAM_H
+ 
+ #ifdef __KERNEL__
+-# ifdef CONFIG_PA20
+-#  define HZ		1000		/* Faster machines */
+-# else
+-#  define HZ		100		/* Internal kernel timer frequency */
+-# endif
+-# define USER_HZ	100		/* .. some user interfaces are in "ticks" */
+-# define CLOCKS_PER_SEC	(USER_HZ)	/* like times() */
++#define HZ		CONFIG_HZ
++#define USER_HZ		100		/* some user API use "ticks" */
++#define CLOCKS_PER_SEC	(USER_HZ)	/* like times() */
+ #endif
+ 
+ #ifndef HZ
+diff --git a/include/asm-parisc/parisc-device.h b/include/asm-parisc/parisc-device.h
+index 1d247e3..e12624d 100644
+--- a/include/asm-parisc/parisc-device.h
++++ b/include/asm-parisc/parisc-device.h
+@@ -1,3 +1,6 @@
++#ifndef _ASM_PARISC_PARISC_DEVICE_H_
++#define _ASM_PARISC_PARISC_DEVICE_H_
++
+ #include <linux/device.h>
+ 
+ struct parisc_device {
+@@ -57,3 +60,5 @@ parisc_get_drvdata(struct parisc_device 
+ }
+ 
+ extern struct bus_type parisc_bus_type;
++
++#endif /*_ASM_PARISC_PARISC_DEVICE_H_*/
+diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h
+index 8b631f4..7b8ad11 100644
+--- a/include/asm-parisc/pci.h
++++ b/include/asm-parisc/pci.h
+@@ -293,4 +293,9 @@ static inline void pcibios_penalize_isa_
+ 	/* We don't need to penalize isa irq's */
+ }
+ 
++static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
++{
++	return channel ? 15 : 14;
++}
++
+ #endif /* __ASM_PARISC_PCI_H */
+diff --git a/include/asm-parisc/prefetch.h b/include/asm-parisc/prefetch.h
+new file mode 100644
+index 0000000..5d02172
+--- /dev/null
++++ b/include/asm-parisc/prefetch.h
+@@ -0,0 +1,39 @@
++/*
++ * include/asm-parisc/prefetch.h
++ *
++ * PA 2.0 defines data prefetch instructions on page 6-11 of the Kane book.
++ * In addition, many implementations do hardware prefetching of both
++ * instructions and data.
++ *
++ * PA7300LC (page 14-4 of the ERS) also implements prefetching by a load
++ * to gr0 but not in a way that Linux can use.  If the load would cause an
++ * interruption (eg due to prefetching 0), it is suppressed on PA2.0
++ * processors, but not on 7300LC.
++ *
++ */
++
++#ifndef __ASM_PARISC_PREFETCH_H
++#define __ASM_PARISC_PREFETCH_H
++
++#ifndef __ASSEMBLY__
++#ifdef CONFIG_PREFETCH
++
++#define ARCH_HAS_PREFETCH
++extern inline void prefetch(const void *addr)
++{
++	__asm__("ldw 0(%0), %%r0" : : "r" (addr));
++}
++
++/* LDD is a PA2.0 addition. */
++#ifdef CONFIG_PA20
++#define ARCH_HAS_PREFETCHW
++extern inline void prefetchw(const void *addr)
++{
++	__asm__("ldd 0(%0), %%r0" : : "r" (addr));
++}
++#endif /* CONFIG_PA20 */
++
++#endif /* CONFIG_PREFETCH */
++#endif /* __ASSEMBLY__ */
++
++#endif /* __ASM_PARISC_PROCESSOR_H */
+diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
+index b73626f..fd7866d 100644
+--- a/include/asm-parisc/processor.h
++++ b/include/asm-parisc/processor.h
+@@ -9,6 +9,8 @@ #ifndef __ASM_PARISC_PROCESSOR_H
+ #define __ASM_PARISC_PROCESSOR_H
+ 
+ #ifndef __ASSEMBLY__
++#include <asm/prefetch.h>	/* lockdep.h needs <linux/prefetch.h> */
++
+ #include <linux/threads.h>
+ #include <linux/spinlock_types.h>
+ 
+@@ -276,7 +278,7 @@ on downward growing arches, it looks lik
+  */
+ 
+ #ifdef __LP64__
+-#define USER_WIDE_MODE	(personality(current->personality) == PER_LINUX)
++#define USER_WIDE_MODE	(!test_thread_flag(TIF_32BIT))
+ #else
+ #define USER_WIDE_MODE	0
+ #endif
+@@ -328,33 +330,20 @@ extern unsigned long get_wchan(struct ta
+ #define KSTK_EIP(tsk)	((tsk)->thread.regs.iaoq[0])
+ #define KSTK_ESP(tsk)	((tsk)->thread.regs.gr[30])
+ 
++#define cpu_relax()	barrier()
+ 
+-/*
+- * PA 2.0 defines data prefetch instructions on page 6-11 of the Kane book.
+- * In addition, many implementations do hardware prefetching of both
+- * instructions and data.
+- *
+- * PA7300LC (page 14-4 of the ERS) also implements prefetching by a load
+- * to gr0 but not in a way that Linux can use.  If the load would cause an
+- * interruption (eg due to prefetching 0), it is suppressed on PA2.0
+- * processors, but not on 7300LC.
+- */
+-#ifdef  CONFIG_PREFETCH
+-#define ARCH_HAS_PREFETCH
+-#define ARCH_HAS_PREFETCHW
+-
+-extern inline void prefetch(const void *addr)
+-{
+-	__asm__("ldw 0(%0), %%r0" : : "r" (addr));
+-}
+-
+-extern inline void prefetchw(const void *addr)
++/* Used as a macro to identify the combined VIPT/PIPT cached
++ * CPUs which require a guarantee of coherency (no inequivalent
++ * aliases with different data, whether clean or not) to operate */
++static inline int parisc_requires_coherency(void)
+ {
+-	__asm__("ldd 0(%0), %%r0" : : "r" (addr));
+-}
++#ifdef CONFIG_PA8X00
++	/* FIXME: also pa8900 - when we see one */
++	return boot_cpu_data.cpu_type == mako;
++#else
++	return 0;
+ #endif
+-
+-#define cpu_relax()	barrier()
++}
+ 
+ #endif /* __ASSEMBLY__ */
+ 
+diff --git a/include/asm-parisc/ropes.h b/include/asm-parisc/ropes.h
+new file mode 100644
+index 0000000..5542dd0
+--- /dev/null
++++ b/include/asm-parisc/ropes.h
+@@ -0,0 +1,322 @@
++#ifndef _ASM_PARISC_ROPES_H_
++#define _ASM_PARISC_ROPES_H_
++
++#include <asm-parisc/parisc-device.h>
++
++#ifdef CONFIG_64BIT
++/* "low end" PA8800 machines use ZX1 chipset: PAT PDC and only run 64-bit */
++#define ZX1_SUPPORT
++#endif
++
++#ifdef CONFIG_PROC_FS
++/* depends on proc fs support. But costs CPU performance */
++#undef SBA_COLLECT_STATS
++#endif
++
++/*
++** The number of pdir entries to "free" before issueing
++** a read to PCOM register to flush out PCOM writes.
++** Interacts with allocation granularity (ie 4 or 8 entries
++** allocated and free'd/purged at a time might make this
++** less interesting).
++*/
++#define DELAYED_RESOURCE_CNT	16
++
++#define MAX_IOC		2	/* per Ike. Pluto/Astro only have 1. */
++#define ROPES_PER_IOC	8	/* per Ike half or Pluto/Astro */
++
++struct ioc {
++	void __iomem	*ioc_hpa;	/* I/O MMU base address */
++	char		*res_map;	/* resource map, bit == pdir entry */
++	u64		*pdir_base;	/* physical base address */
++	unsigned long	ibase;		/* pdir IOV Space base - shared w/lba_pci */
++	unsigned long	imask;		/* pdir IOV Space mask - shared w/lba_pci */
++#ifdef ZX1_SUPPORT
++	unsigned long	iovp_mask;	/* help convert IOVA to IOVP */
++#endif
++	unsigned long	*res_hint;	/* next avail IOVP - circular search */
++	spinlock_t	res_lock;
++	unsigned int	res_bitshift;	/* from the LEFT! */
++	unsigned int	res_size;	/* size of resource map in bytes */
++#ifdef SBA_HINT_SUPPORT
++/* FIXME : DMA HINTs not used */
++	unsigned long	hint_mask_pdir; /* bits used for DMA hints */
++	unsigned int	hint_shift_pdir;
++#endif
++#if DELAYED_RESOURCE_CNT > 0
++	int		saved_cnt;
++	struct sba_dma_pair {
++			dma_addr_t	iova;
++			size_t		size;
++        } saved[DELAYED_RESOURCE_CNT];
++#endif
++
++#ifdef SBA_COLLECT_STATS
++#define SBA_SEARCH_SAMPLE	0x100
++	unsigned long	avg_search[SBA_SEARCH_SAMPLE];
++	unsigned long	avg_idx;	/* current index into avg_search */
++	unsigned long	used_pages;
++	unsigned long	msingle_calls;
++	unsigned long	msingle_pages;
++	unsigned long	msg_calls;
++	unsigned long	msg_pages;
++	unsigned long	usingle_calls;
++	unsigned long	usingle_pages;
++	unsigned long	usg_calls;
++	unsigned long	usg_pages;
++#endif
++        /* STUFF We don't need in performance path */
++	unsigned int	pdir_size;	/* in bytes, determined by IOV Space size */
++};
++
++struct sba_device {
++	struct sba_device	*next;  /* list of SBA's in system */
++	struct parisc_device	*dev;   /* dev found in bus walk */
++	const char		*name;
++	void __iomem		*sba_hpa; /* base address */
++	spinlock_t		sba_lock;
++	unsigned int		flags;  /* state/functionality enabled */
++	unsigned int		hw_rev;  /* HW revision of chip */
++
++	struct resource		chip_resv; /* MMIO reserved for chip */
++	struct resource		iommu_resv; /* MMIO reserved for iommu */
++
++	unsigned int		num_ioc;  /* number of on-board IOC's */
++	struct ioc		ioc[MAX_IOC];
++};
++
++#define ASTRO_RUNWAY_PORT	0x582
++#define IKE_MERCED_PORT		0x803
++#define REO_MERCED_PORT		0x804
++#define REOG_MERCED_PORT	0x805
++#define PLUTO_MCKINLEY_PORT	0x880
++
++static inline int IS_ASTRO(struct parisc_device *d) {
++	return d->id.hversion == ASTRO_RUNWAY_PORT;
++}
++
++static inline int IS_IKE(struct parisc_device *d) {
++	return d->id.hversion == IKE_MERCED_PORT;
++}
++
++static inline int IS_PLUTO(struct parisc_device *d) {
++	return d->id.hversion == PLUTO_MCKINLEY_PORT;
++}
++
++#define PLUTO_IOVA_BASE	(1UL*1024*1024*1024)	/* 1GB */
++#define PLUTO_IOVA_SIZE	(1UL*1024*1024*1024)	/* 1GB */
++#define PLUTO_GART_SIZE	(PLUTO_IOVA_SIZE / 2)
++
++#define SBA_PDIR_VALID_BIT	0x8000000000000000ULL
++
++#define SBA_AGPGART_COOKIE	0x0000badbadc0ffeeULL
++
++#define SBA_FUNC_ID	0x0000	/* function id */
++#define SBA_FCLASS	0x0008	/* function class, bist, header, rev... */
++
++#define SBA_FUNC_SIZE 4096   /* SBA configuration function reg set */
++
++#define ASTRO_IOC_OFFSET	(32 * SBA_FUNC_SIZE)
++#define PLUTO_IOC_OFFSET	(1 * SBA_FUNC_SIZE)
++/* Ike's IOC's occupy functions 2 and 3 */
++#define IKE_IOC_OFFSET(p)	((p+2) * SBA_FUNC_SIZE)
++
++#define IOC_CTRL          0x8	/* IOC_CTRL offset */
++#define IOC_CTRL_TC       (1 << 0) /* TOC Enable */
++#define IOC_CTRL_CE       (1 << 1) /* Coalesce Enable */
++#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 */
++
++/*
++** Offsets into MBIB (Function 0 on Ike and hopefully Astro)
++** Firmware programs this stuff. Don't touch it.
++*/
++#define LMMIO_DIRECT0_BASE  0x300
++#define LMMIO_DIRECT0_MASK  0x308
++#define LMMIO_DIRECT0_ROUTE 0x310
++
++#define LMMIO_DIST_BASE  0x360
++#define LMMIO_DIST_MASK  0x368
++#define LMMIO_DIST_ROUTE 0x370
++
++#define IOS_DIST_BASE	0x390
++#define IOS_DIST_MASK	0x398
++#define IOS_DIST_ROUTE	0x3A0
++
++#define IOS_DIRECT_BASE	0x3C0
++#define IOS_DIRECT_MASK	0x3C8
++#define IOS_DIRECT_ROUTE 0x3D0
++
++/*
++** Offsets into I/O TLB (Function 2 and 3 on Ike)
++*/
++#define ROPE0_CTL	0x200  /* "regbus pci0" */
++#define ROPE1_CTL	0x208
++#define ROPE2_CTL	0x210
++#define ROPE3_CTL	0x218
++#define ROPE4_CTL	0x220
++#define ROPE5_CTL	0x228
++#define ROPE6_CTL	0x230
++#define ROPE7_CTL	0x238
++
++#define IOC_ROPE0_CFG	0x500	/* pluto only */
++#define   IOC_ROPE_AO	  0x10	/* Allow "Relaxed Ordering" */
++
++#define HF_ENABLE	0x40
++
++#define IOC_IBASE	0x300	/* IO TLB */
++#define IOC_IMASK	0x308
++#define IOC_PCOM	0x310
++#define IOC_TCNFG	0x318
++#define IOC_PDIR_BASE	0x320
++
++/*
++** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
++** It's safer (avoid memory corruption) to keep DMA page mappings
++** equivalently sized to VM PAGE_SIZE.
++**
++** We really can't avoid generating a new mapping for each
++** page since the Virtual Coherence Index has to be generated
++** and updated for each page.
++**
++** PAGE_SIZE could be greater than IOVP_SIZE. But not the inverse.
++*/
++#define IOVP_SIZE	PAGE_SIZE
++#define IOVP_SHIFT	PAGE_SHIFT
++#define IOVP_MASK	PAGE_MASK
++
++#define SBA_PERF_CFG	0x708	/* Performance Counter stuff */
++#define SBA_PERF_MASK1	0x718
++#define SBA_PERF_MASK2	0x730
++
++/*
++** Offsets into PCI Performance Counters (functions 12 and 13)
++** Controlled by PERF registers in function 2 & 3 respectively.
++*/
++#define SBA_PERF_CNT1	0x200
++#define SBA_PERF_CNT2	0x208
++#define SBA_PERF_CNT3	0x210
++
++/*
++** lba_device: Per instance Elroy data structure
++*/
++struct lba_device {
++	struct pci_hba_data	hba;
++
++	spinlock_t		lba_lock;
++	void			*iosapic_obj;
++
++#ifdef CONFIG_64BIT
++	void __iomem		*iop_base;	/* PA_VIEW - for IO port accessor funcs */
++#endif
++
++	int			flags;		/* state/functionality enabled */
++	int			hw_rev;		/* HW revision of chip */
++};
++
++#define ELROY_HVERS		0x782
++#define MERCURY_HVERS		0x783
++#define QUICKSILVER_HVERS	0x784
++
++static inline int IS_ELROY(struct parisc_device *d) {
++	return (d->id.hversion == ELROY_HVERS);
++}
++
++static inline int IS_MERCURY(struct parisc_device *d) {
++	return (d->id.hversion == MERCURY_HVERS);
++}
++
++static inline int IS_QUICKSILVER(struct parisc_device *d) {
++	return (d->id.hversion == QUICKSILVER_HVERS);
++}
++
++static inline int agp_mode_mercury(void __iomem *hpa) {
++	u64 bus_mode;
++
++	bus_mode = readl(hpa + 0x0620);
++	if (bus_mode & 1)
++		return 1;
++
++	return 0;
++}
++
++/*
++** I/O SAPIC init function
++** Caller knows where an I/O SAPIC is. LBA has an integrated I/O SAPIC.
++** Call setup as part of per instance initialization.
++** (ie *not* init_module() function unless only one is present.)
++** fixup_irq is to initialize PCI IRQ line support and
++** virtualize pcidev->irq value. To be called by pci_fixup_bus().
++*/
++extern void *iosapic_register(unsigned long hpa);
++extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
++
++#define LBA_FUNC_ID	0x0000	/* function id */
++#define LBA_FCLASS	0x0008	/* function class, bist, header, rev... */
++#define LBA_CAPABLE	0x0030	/* capabilities register */
++
++#define LBA_PCI_CFG_ADDR	0x0040	/* poke CFG address here */
++#define LBA_PCI_CFG_DATA	0x0048	/* read or write data here */
++
++#define LBA_PMC_MTLT	0x0050	/* Firmware sets this - read only. */
++#define LBA_FW_SCRATCH	0x0058	/* Firmware writes the PCI bus number here. */
++#define LBA_ERROR_ADDR	0x0070	/* On error, address gets logged here */
++
++#define LBA_ARB_MASK	0x0080	/* bit 0 enable arbitration. PAT/PDC enables */
++#define LBA_ARB_PRI	0x0088	/* firmware sets this. */
++#define LBA_ARB_MODE	0x0090	/* firmware sets this. */
++#define LBA_ARB_MTLT	0x0098	/* firmware sets this. */
++
++#define LBA_MOD_ID	0x0100	/* Module ID. PDC_PAT_CELL reports 4 */
++
++#define LBA_STAT_CTL	0x0108	/* Status & Control */
++#define   LBA_BUS_RESET		0x01	/*  Deassert PCI Bus Reset Signal */
++#define   CLEAR_ERRLOG		0x10	/*  "Clear Error Log" cmd */
++#define   CLEAR_ERRLOG_ENABLE	0x20	/*  "Clear Error Log" Enable */
++#define   HF_ENABLE	0x40	/*    enable HF mode (default is -1 mode) */
++
++#define LBA_LMMIO_BASE	0x0200	/* < 4GB I/O address range */
++#define LBA_LMMIO_MASK	0x0208
++
++#define LBA_GMMIO_BASE	0x0210	/* > 4GB I/O address range */
++#define LBA_GMMIO_MASK	0x0218
++
++#define LBA_WLMMIO_BASE	0x0220	/* All < 4GB ranges under the same *SBA* */
++#define LBA_WLMMIO_MASK	0x0228
++
++#define LBA_WGMMIO_BASE	0x0230	/* All > 4GB ranges under the same *SBA* */
++#define LBA_WGMMIO_MASK	0x0238
++
++#define LBA_IOS_BASE	0x0240	/* I/O port space for this LBA */
++#define LBA_IOS_MASK	0x0248
++
++#define LBA_ELMMIO_BASE	0x0250	/* Extra LMMIO range */
++#define LBA_ELMMIO_MASK	0x0258
++
++#define LBA_EIOS_BASE	0x0260	/* Extra I/O port space */
++#define LBA_EIOS_MASK	0x0268
++
++#define LBA_GLOBAL_MASK	0x0270	/* Mercury only: Global Address Mask */
++#define LBA_DMA_CTL	0x0278	/* firmware sets this */
++
++#define LBA_IBASE	0x0300	/* SBA DMA support */
++#define LBA_IMASK	0x0308
++
++/* FIXME: ignore DMA Hint stuff until we can measure performance */
++#define LBA_HINT_CFG	0x0310
++#define LBA_HINT_BASE	0x0380	/* 14 registers at every 8 bytes. */
++
++#define LBA_BUS_MODE	0x0620
++
++/* ERROR regs are needed for config cycle kluges */
++#define LBA_ERROR_CONFIG 0x0680
++#define     LBA_SMART_MODE 0x20
++#define LBA_ERROR_STATUS 0x0688
++#define LBA_ROPE_CTL     0x06A0
++
++#define LBA_IOSAPIC_BASE	0x800 /* Offset of IRQ logic */
++
++#endif /*_ASM_PARISC_ROPES_H_*/
+diff --git a/include/asm-parisc/serial.h b/include/asm-parisc/serial.h
+index 82fd820..d7e3cc6 100644
+--- a/include/asm-parisc/serial.h
++++ b/include/asm-parisc/serial.h
+@@ -3,20 +3,8 @@
+  */
+ 
+ /*
+- * This assumes you have a 7.272727 MHz clock for your UART.
+- * The documentation implies a 40Mhz clock, and elsewhere a 7Mhz clock
+- * Clarified: 7.2727MHz on LASI. Not yet clarified for DINO
++ * This is used for 16550-compatible UARTs
+  */
++#define BASE_BAUD ( 1843200 / 16 )
+ 
+-#define LASI_BASE_BAUD ( 7272727 / 16 )
+-#define BASE_BAUD  LASI_BASE_BAUD
+-
+-/*
+- * We don't use the ISA probing code, so these entries are just to reserve
+- * space.  Some example (maximal) configurations:
+- * - 712 w/ additional Lasi & RJ16 ports: 4
+- * - J5k w/ PCI serial cards: 2 + 4 * card ~= 34
+- * A500 w/ PCI serial cards: 5 + 4 * card ~= 17
+- */
+- 
+ #define SERIAL_PORT_DFNS
+diff --git a/include/asm-parisc/spinlock.h b/include/asm-parisc/spinlock.h
+index a93960e..7c737a0 100644
+--- a/include/asm-parisc/spinlock.h
++++ b/include/asm-parisc/spinlock.h
+@@ -56,50 +56,79 @@ static inline int __raw_spin_trylock(raw
+ }
+ 
+ /*
+- * Read-write spinlocks, allowing multiple readers
+- * but only one writer.
++ * Read-write spinlocks, allowing multiple readers but only one writer.
++ * Linux rwlocks are unfair to writers; they can be starved for an indefinite
++ * time by readers.  With care, they can also be taken in interrupt context.
++ *
++ * In the PA-RISC implementation, we have a spinlock and a counter.
++ * Readers use the lock to serialise their access to the counter (which
++ * records how many readers currently hold the lock).  
++ * Writers hold the spinlock, preventing any readers or other writers from
++ * grabbing the rwlock.
+  */
+ 
+-#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
+-
+-/* read_lock, read_unlock are pretty straightforward.  Of course it somehow
+- * sucks we end up saving/restoring flags twice for read_lock_irqsave aso. */
+-
++/* Note that we have to ensure interrupts are disabled in case we're
++ * interrupted by some other code that wants to grab the same read lock */
+ static  __inline__ void __raw_read_lock(raw_rwlock_t *rw)
+ {
+-	__raw_spin_lock(&rw->lock);
+-
++	unsigned long flags;
++	local_irq_save(flags);
++	__raw_spin_lock_flags(&rw->lock, flags);
+ 	rw->counter++;
+-
+ 	__raw_spin_unlock(&rw->lock);
++	local_irq_restore(flags);
+ }
+ 
++/* Note that we have to ensure interrupts are disabled in case we're
++ * interrupted by some other code that wants to grab the same read lock */
+ static  __inline__ void __raw_read_unlock(raw_rwlock_t *rw)
+ {
+-	__raw_spin_lock(&rw->lock);
+-
++	unsigned long flags;
++	local_irq_save(flags);
++	__raw_spin_lock_flags(&rw->lock, flags);
+ 	rw->counter--;
+-
+ 	__raw_spin_unlock(&rw->lock);
++	local_irq_restore(flags);
+ }
+ 
+-/* write_lock is less trivial.  We optimistically grab the lock and check
+- * if we surprised any readers.  If so we release the lock and wait till
+- * they're all gone before trying again
+- *
+- * Also note that we don't use the _irqsave / _irqrestore suffixes here.
+- * If we're called with interrupts enabled and we've got readers (or other
+- * writers) in interrupt handlers someone fucked up and we'd dead-lock
+- * sooner or later anyway.   prumpf */
++/* Note that we have to ensure interrupts are disabled in case we're
++ * interrupted by some other code that wants to grab the same read lock */
++static __inline__ int __raw_read_trylock(raw_rwlock_t *rw)
++{
++	unsigned long flags;
++ retry:
++	local_irq_save(flags);
++	if (__raw_spin_trylock(&rw->lock)) {
++		rw->counter++;
++		__raw_spin_unlock(&rw->lock);
++		local_irq_restore(flags);
++		return 1;
++	}
+ 
+-static  __inline__ void __raw_write_lock(raw_rwlock_t *rw)
++	local_irq_restore(flags);
++	/* If write-locked, we fail to acquire the lock */
++	if (rw->counter < 0)
++		return 0;
++
++	/* Wait until we have a realistic chance at the lock */
++	while (__raw_spin_is_locked(&rw->lock) && rw->counter >= 0)
++		cpu_relax();
++
++	goto retry;
++}
++
++/* Note that we have to ensure interrupts are disabled in case we're
++ * interrupted by some other code that wants to read_trylock() this lock */
++static __inline__ void __raw_write_lock(raw_rwlock_t *rw)
+ {
++	unsigned long flags;
+ retry:
+-	__raw_spin_lock(&rw->lock);
++	local_irq_save(flags);
++	__raw_spin_lock_flags(&rw->lock, flags);
+ 
+-	if(rw->counter != 0) {
+-		/* this basically never happens */
++	if (rw->counter != 0) {
+ 		__raw_spin_unlock(&rw->lock);
++		local_irq_restore(flags);
+ 
+ 		while (rw->counter != 0)
+ 			cpu_relax();
+@@ -107,31 +136,37 @@ retry:
+ 		goto retry;
+ 	}
+ 
+-	/* got it.  now leave without unlocking */
+-	rw->counter = -1; /* remember we are locked */
++	rw->counter = -1; /* mark as write-locked */
++	mb();
++	local_irq_restore(flags);
+ }
+ 
+-/* write_unlock is absolutely trivial - we don't have to wait for anything */
+-
+-static  __inline__ void __raw_write_unlock(raw_rwlock_t *rw)
++static __inline__ void __raw_write_unlock(raw_rwlock_t *rw)
+ {
+ 	rw->counter = 0;
+ 	__raw_spin_unlock(&rw->lock);
+ }
+ 
+-static  __inline__ int __raw_write_trylock(raw_rwlock_t *rw)
++/* Note that we have to ensure interrupts are disabled in case we're
++ * interrupted by some other code that wants to read_trylock() this lock */
++static __inline__ int __raw_write_trylock(raw_rwlock_t *rw)
+ {
+-	__raw_spin_lock(&rw->lock);
+-	if (rw->counter != 0) {
+-		/* this basically never happens */
+-		__raw_spin_unlock(&rw->lock);
+-
+-		return 0;
++	unsigned long flags;
++	int result = 0;
++
++	local_irq_save(flags);
++	if (__raw_spin_trylock(&rw->lock)) {
++		if (rw->counter == 0) {
++			rw->counter = -1;
++			result = 1;
++		} else {
++			/* Read-locked.  Oh well. */
++			__raw_spin_unlock(&rw->lock);
++		}
+ 	}
++	local_irq_restore(flags);
+ 
+-	/* got it.  now leave without unlocking */
+-	rw->counter = -1; /* remember we are locked */
+-	return 1;
++	return result;
+ }
+ 
+ /*
+diff --git a/include/linux/compat.h b/include/linux/compat.h
+index 9760753..f72df4d 100644
+--- a/include/linux/compat.h
++++ b/include/linux/compat.h
+@@ -5,10 +5,16 @@ #define _LINUX_COMPAT_H
+  * syscall compatibility layer.
+  */
+ 
+-#ifdef CONFIG_COMPAT
++#ifndef CONFIG_COMPAT
++
++/* Non-native task requiring compat... doesn't exist */
++#define is_compat_task() 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>
+@@ -17,6 +23,11 @@ #include <asm/siginfo.h>
+ #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() (personality(current->personality) == PER_LINUX32)
++#endif
++
+ typedef __compat_uid32_t	compat_uid_t;
+ typedef __compat_gid32_t	compat_gid_t;
+ 
+@@ -199,10 +210,6 @@ long compat_get_bitmap(unsigned long *ma
+ 		       unsigned long bitmap_size);
+ long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
+ 		       unsigned long bitmap_size);
+-int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
+-int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
+-int get_compat_sigevent(struct sigevent *event,
+-		const struct compat_sigevent __user *u_event);
+ 
+ static inline int compat_timeval_compare(struct compat_timeval *lhs,
+ 					struct compat_timeval *rhs)
+diff --git a/include/linux/compat_siginfo.h b/include/linux/compat_siginfo.h
+new file mode 100644
+index 0000000..f3342d4
+--- /dev/null
++++ b/include/linux/compat_siginfo.h
+@@ -0,0 +1,141 @@
++#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>
++
++/*
++ * 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
++
++#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);
++
++extern int compat_copy_sigevent_from_user(struct sigevent *to, compat_sigevent_t __user *from);
++extern int compat_copy_sigevent_to_user(compat_sigevent_t __user *to, struct sigevent *from);
++
++#endif /* CONFIG_COMPAT */
++#endif /* _ASM_GENERIC_COMPAT_SIGINFO_H */
++
+diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
+index 88dafa2..952bee7 100644
+--- a/include/linux/debug_locks.h
++++ b/include/linux/debug_locks.h
+@@ -43,6 +43,8 @@ #else
+ # define locking_selftest()	do { } while (0)
+ #endif
+ 
++struct task_struct;
++
+ #ifdef CONFIG_LOCKDEP
+ extern void debug_show_all_locks(void);
+ extern void debug_show_held_locks(struct task_struct *task);
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index 85ce7ef..42620e7 100644
+--- a/include/linux/highmem.h
++++ b/include/linux/highmem.h
+@@ -29,6 +29,7 @@ #else /* CONFIG_HIGHMEM */
+ 
+ static inline unsigned int nr_free_highpages(void) { return 0; }
+ 
++#ifndef ARCH_HAS_KMAP
+ static inline void *kmap(struct page *page)
+ {
+ 	might_sleep();
+@@ -41,6 +42,7 @@ #define kmap_atomic(page, idx)		page_add
+ #define kunmap_atomic(addr, idx)	do { } while (0)
+ #define kmap_atomic_pfn(pfn, idx)	page_address(pfn_to_page(pfn))
+ #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
++#endif
+ 
+ #endif /* CONFIG_HIGHMEM */
+ 
+diff --git a/include/linux/io.h b/include/linux/io.h
+index 420e2fd..a3c128f 100644
+--- a/include/linux/io.h
++++ b/include/linux/io.h
+@@ -23,4 +23,31 @@ #include <asm/io.h>
+ void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
+ void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
+ 
++/**
++ *	check_signature		-	find BIOS signatures
++ *	@io_addr: mmio address to check 
++ *	@signature:  signature block
++ *	@length: length of signature
++ *
++ *	Perform a signature comparison with the mmio address io_addr. This
++ *	address should have been obtained by ioremap.
++ *	Returns 1 on a match.
++ */
++ 
++static inline int check_signature(const volatile void __iomem * io_addr,
++	const unsigned char *signature, int length)
++{
++	int retval = 0;
++	do {
++		if (readb(io_addr) != *signature)
++			goto out;
++		io_addr++;
++		signature++;
++		length--;
++	} while (length);
++	retval = 1;
++out:
++	return retval;
++}
++
+ #endif /* _LINUX_IO_H */
+diff --git a/include/linux/signal.h b/include/linux/signal.h
+index 117135e..e9bdea1 100644
+--- a/include/linux/signal.h
++++ b/include/linux/signal.h
+@@ -241,6 +241,9 @@ extern int sigprocmask(int, sigset_t *, 
+ struct pt_regs;
+ extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
+ 
++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 */
+diff --git a/include/linux/types.h b/include/linux/types.h
+index 3f23566..475ac63 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -129,14 +129,19 @@ #define aligned_u64 unsigned long long _
+ 
+ /*
+  * The type used for indexing onto a disc or disc partition.
+- * If required, asm/types.h can override it and define
+- * HAVE_SECTOR_T
+  */
+-#ifndef HAVE_SECTOR_T
++#ifdef CONFIG_LBD
++typedef u64 sector_t;
++#else
+ typedef unsigned long sector_t;
+ #endif
+ 
+-#ifndef HAVE_BLKCNT_T
++/*
++ * The type of the inode's block count.
++ */
++#ifdef CONFIG_LSF
++typedef u64 blkcnt_t;
++#else
+ typedef unsigned long blkcnt_t;
+ #endif
+ 
+diff --git a/ipc/compat_mq.c b/ipc/compat_mq.c
+index d8d1e9f..41572f3 100644
+--- a/ipc/compat_mq.c
++++ b/ipc/compat_mq.c
+@@ -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>
+diff --git a/kernel/Makefile b/kernel/Makefile
+index d62ec66..4448483 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -35,7 +35,7 @@ obj-$(CONFIG_STACK_UNWIND) += unwind.o
+ obj-$(CONFIG_PM) += power/
+ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
+ obj-$(CONFIG_KEXEC) += kexec.o
+-obj-$(CONFIG_COMPAT) += compat.o
++obj-$(CONFIG_COMPAT) += compat.o compat_signal.o
+ obj-$(CONFIG_CPUSETS) += cpuset.o
+ obj-$(CONFIG_IKCONFIG) += configs.o
+ obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
+diff --git a/kernel/compat.c b/kernel/compat.c
+index 126dee9..5f24154 100644
+--- a/kernel/compat.c
++++ b/kernel/compat.c
+@@ -13,6 +13,7 @@
+ 
+ #include <linux/linkage.h>
+ #include <linux/compat.h>
++#include <linux/compat_siginfo.h>
+ #include <linux/errno.h>
+ #include <linux/time.h>
+ #include <linux/signal.h>
+@@ -417,7 +418,11 @@ asmlinkage long compat_sys_waitid(int wh
+ 
+ 	BUG_ON(info.si_code & __SI_MASK);
+ 	info.si_code |= __SI_CHLD;
+-	return copy_siginfo_to_user32(uinfo, &info);
++
++	if (compat_copy_siginfo_to_user(uinfo, &info) != 0)
++		return -EFAULT;
++
++	return 0;
+ }
+ 
+ static int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr,
+@@ -794,7 +799,7 @@ compat_sys_rt_sigtimedwait (compat_sigse
+ 	if (sig) {
+ 		ret = sig;
+ 		if (uinfo) {
+-			if (copy_siginfo_to_user32(uinfo, &info))
++			if (compat_copy_siginfo_to_user(uinfo, &info))
+ 				ret = -EFAULT;
+ 		}
+ 	}else {
+diff --git a/kernel/compat_signal.c b/kernel/compat_signal.c
+new file mode 100644
+index 0000000..b6bc6f9
+--- /dev/null
++++ b/kernel/compat_signal.c
+@@ -0,0 +1,280 @@
++/*
++ *  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);
++	/* si_code is only a (short) value, remove kernel bits. */
++	compat_from.si_code = (short)(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 __force)(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 __force)(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 __force)(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;
++}
++#endif
++
++#ifndef HAVE_ARCH_COPY_SIGINFO_FROM_USER
++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 __user*)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 __user*)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 __user*)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
++
++#ifndef HAVE_ARCH_COPY_SIGEVENT_FROM_USER
++int compat_copy_sigevent_from_user(sigevent_t *to, compat_sigevent_t __user *from)
++{
++	int err;
++	u64 scratch;
++
++	/* copy sigval_t sigev_value
++	 	int_t sival_int		(same)
++	 	uptr_t sival_ptr	(32 vs 64)*/
++	err = __get_user(to->sigev_value.sival_int,
++	    		 &from->sigev_value.sival_int);
++	err |= __get_user(scratch, &from->sigev_value.sival_ptr);
++	to->sigev_value.sival_ptr = (u64 __user *)scratch;
++
++	/* copy int_t sigev_signo 	(same)*/
++	err |= __get_user(to->sigev_signo, &from->sigev_signo);
++
++	/* copy int_t sigev_notify	(same)*/
++	err |= __get_user(to->sigev_notify, &from->sigev_notify);
++
++	/* never copy _sigev_un padding */
++
++	/* copy int_t _tid 		(same),
++	   good_sigevent() uses this value of */
++	err |= __get_user(to->sigev_notify_thread_id, &from->sigev_notify_thread_id);
++
++	/* XXX: Do not copy these, they aren't used by
++	   anyone. We would need to distinguish the uses of the union.
++	   copy _sigev_thread
++	  	uptr_t _function	(32 vs 64)
++	  	uptr_t _attribute	(32 vs 64)*/
++
++	return err;
++}
++#endif
++
++#ifndef HAVE_ARCH_COPY_SIGEVENT_TO_USER
++int compat_copy_sigevent_to_user(compat_sigevent_t __user *to, sigevent_t *from)
++{
++	int err;
++	u32 scratch;
++
++	/* copy sigval_t sigev_value
++	 	int_t sival_int		(same)
++	 	uptr_t sival_ptr	(32 vs 64)*/
++	err = __put_user(from->sigev_value.sival_int,
++	    		 &to->sigev_value.sival_int);
++	scratch = (u32)((u64 __force)from->sigev_value.sival_ptr & 0xffffffffUL);
++	err |= __put_user((compat_uptr_t)scratch, &to->sigev_value.sival_ptr);
++
++	/* copy int_t sigev_signo 	(same)*/
++	err |= __put_user(from->sigev_signo, &to->sigev_signo);
++
++	/* copy int_t sigev_notify	(same)*/
++	err |= __put_user(from->sigev_notify, &to->sigev_notify);
++
++	/* never copy _sigev_un padding */
++
++	/* copy int_t _tid 		(same),
++	   good_sigevent() uses this value of */
++	err |= __put_user(from->sigev_notify_thread_id, &to->sigev_notify_thread_id);
++
++	/* XXX: Do not copy these, they aren't used by
++	   anyone. We would need to distinguish the uses of the union.
++	   copy _sigev_thread
++	  	uptr_t _function	(32 vs 64)
++	  	uptr_t _attribute	(32 vs 64)*/
++
++	return err;
++}
++#endif
++
+diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
+index ac1f850..931614f 100644
+--- a/kernel/irq/chip.c
++++ b/kernel/irq/chip.c
+@@ -17,6 +17,90 @@ #include <linux/kernel_stat.h>
+ 
+ #include "internals.h"
+ 
++/* Helpers for constructing IRQ handlers */
++
++#ifdef CONFIG_SMP
++#define HANDLE_PERCPU_IRQ(NAME, ACK, EOI)				\
++void fastcall								\
++handle_percpu_irq##NAME(unsigned int irq, struct irq_desc *desc,	\
++			struct pt_regs *regs)				\
++{									\
++	irqreturn_t action_ret;						\
++									\
++	kstat_this_cpu.irqs[irq]++;					\
++									\
++	ACK(desc, irq);							\
++									\
++	action_ret = handle_IRQ_event(irq, regs, desc->action);		\
++	if (!noirqdebug)						\
++		note_interrupt(irq, desc, action_ret, regs);		\
++									\
++	EOI(desc,irq);							\
++}
++#else
++#define HANDLE_PERCPU_IRQ(NAME, ACK, END)
++#endif /* CONFIG_SMP */
++
++#define HANDLE_LEVEL_IRQ(NAME, MASK, UNMASK)				\
++void fastcall								\
++handle_level_irq##NAME(unsigned int irq, struct irq_desc *desc,		\
++			struct pt_regs *regs)				\
++{									\
++	unsigned int cpu = smp_processor_id();				\
++	struct irqaction *action;					\
++	irqreturn_t action_ret;						\
++									\
++	spin_lock(&desc->lock);						\
++	MASK(desc, irq);						\
++									\
++	if (unlikely(desc->status & IRQ_INPROGRESS))			\
++		goto out_unlock;					\
++	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);			\
++	kstat_cpu(cpu).irqs[irq]++;					\
++									\
++	/*								\
++	 * If its disabled or no action available			\
++	 * keep it masked and get out of here				\
++	 */								\
++	action = desc->action;						\
++	if (unlikely(!action || (desc->status & IRQ_DISABLED))) {	\
++		desc->status |= IRQ_PENDING;				\
++		goto out_unlock;					\
++	}								\
++									\
++	desc->status |= IRQ_INPROGRESS;					\
++	desc->status &= ~IRQ_PENDING;					\
++	spin_unlock(&desc->lock);					\
++									\
++	action_ret = handle_IRQ_event(irq, regs, action);		\
++	if (!noirqdebug)						\
++		note_interrupt(irq, desc, action_ret, regs);		\
++									\
++	spin_lock(&desc->lock);						\
++	desc->status &= ~IRQ_INPROGRESS;				\
++	UNMASK(desc,irq);						\
++out_unlock:								\
++	spin_unlock(&desc->lock);					\
++}
++
++#define HANDLE_SPECIFIC_IRQ(NAME, ACK, EOI, HANDLER)			\
++void fastcall								\
++handle_specific_irq##NAME(unsigned int irq, struct irq_desc *desc,	\
++			  struct pt_regs *regs)				\
++{									\
++	irqreturn_t action_ret;						\
++									\
++	kstat_this_cpu.irqs[irq]++;					\
++									\
++	ACK(desc, irq);							\
++									\
++	action_ret = HANDLER(irq, desc->action->dev_id, regs);		\
++	if (!noirqdebug)						\
++		note_interrupt(irq, desc, action_ret, regs);		\
++									\
++	EOI(desc,irq);							\
++}
++
+ /**
+  *	set_irq_chip - set the irq chip for an irq
+  *	@irq:	irq number
+@@ -186,6 +270,24 @@ static inline void mask_ack_irq(struct i
+ 	}
+ }
+ 
++static inline void unmask_enabled_irq(struct irq_desc *desc, int irq)
++{
++	if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
++		desc->chip->unmask(irq);
++}
++
++static inline void ack_irq(struct irq_desc *desc, int irq)
++{
++	if (desc->chip->ack)
++		desc->chip->ack(irq);
++}
++
++static inline void eoi_irq(struct irq_desc *desc, int irq)
++{
++	if (desc->chip->eoi)
++		desc->chip->eoi(irq);
++}
++
+ /**
+  *	handle_simple_irq - Simple and software-decoded IRQs.
+  *	@irq:	the interrupt number
+@@ -241,46 +343,7 @@ out_unlock:
+  *	it after the associated handler has acknowledged the device, so the
+  *	interrupt line is back to inactive.
+  */
+-void fastcall
+-handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
+-{
+-	unsigned int cpu = smp_processor_id();
+-	struct irqaction *action;
+-	irqreturn_t action_ret;
+-
+-	spin_lock(&desc->lock);
+-	mask_ack_irq(desc, irq);
+-
+-	if (unlikely(desc->status & IRQ_INPROGRESS))
+-		goto out_unlock;
+-	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+-	kstat_cpu(cpu).irqs[irq]++;
+-
+-	/*
+-	 * If its disabled or no action available
+-	 * keep it masked and get out of here
+-	 */
+-	action = desc->action;
+-	if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
+-		desc->status |= IRQ_PENDING;
+-		goto out_unlock;
+-	}
+-
+-	desc->status |= IRQ_INPROGRESS;
+-	desc->status &= ~IRQ_PENDING;
+-	spin_unlock(&desc->lock);
+-
+-	action_ret = handle_IRQ_event(irq, regs, action);
+-	if (!noirqdebug)
+-		note_interrupt(irq, desc, action_ret, regs);
+-
+-	spin_lock(&desc->lock);
+-	desc->status &= ~IRQ_INPROGRESS;
+-	if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
+-		desc->chip->unmask(irq);
+-out_unlock:
+-	spin_unlock(&desc->lock);
+-}
++HANDLE_LEVEL_IRQ(, mask_ack_irq, unmask_enabled_irq)
+ 
+ /**
+  *	handle_fasteoi_irq - irq handler for transparent controllers
+@@ -416,7 +479,6 @@ out_unlock:
+ 	spin_unlock(&desc->lock);
+ }
+ 
+-#ifdef CONFIG_SMP
+ /**
+  *	handle_percpu_IRQ - Per CPU local irq handler
+  *	@irq:	the interrupt number
+@@ -425,25 +487,19 @@ #ifdef CONFIG_SMP
+  *
+  *	Per CPU interrupts on SMP machines without locking requirements
+  */
+-void fastcall
+-handle_percpu_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
++HANDLE_PERCPU_IRQ(, ack_irq, eoi_irq)
++
++#ifdef ARCH_HAS_IRQ_HANDLERS
++#include <asm/irq-handlers.h>
++#else
++static inline char *arch_handle_irq_name(void fastcall (*handle)(unsigned int,
++							struct irq_desc *,
++							struct pt_regs *))
+ {
+-	irqreturn_t action_ret;
+-
+-	kstat_this_cpu.irqs[irq]++;
+-
+-	if (desc->chip->ack)
+-		desc->chip->ack(irq);
+-
+-	action_ret = handle_IRQ_event(irq, regs, desc->action);
+-	if (!noirqdebug)
+-		note_interrupt(irq, desc, action_ret, regs);
+-
+-	if (desc->chip->eoi)
+-		desc->chip->eoi(irq);
++	return NULL;
+ }
++#endif
+ 
+-#endif /* CONFIG_SMP */
+ 
+ void
+ __set_irq_handler(unsigned int irq,
+@@ -533,5 +589,5 @@ #endif
+ 	if (handle == handle_bad_irq)
+ 		return "bad    ";
+ 
+-	return NULL;
++	return arch_handle_irq_name(handle);
+ }
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c
+index 9a111f7..fce2838 100644
+--- a/kernel/ptrace.c
++++ b/kernel/ptrace.c
+@@ -399,7 +399,7 @@ static int ptrace_setsiginfo(struct task
+ 	siginfo_t newinfo;
+ 	int error = -ESRCH;
+ 
+-	if (copy_from_user(&newinfo, data, sizeof (siginfo_t)))
++	if (copy_siginfo_from_user(&newinfo, data) != 0)
+ 		return -EFAULT;
+ 
+ 	read_lock(&tasklist_lock);
+diff --git a/kernel/resource.c b/kernel/resource.c
+index 4628643..4aa21cc 100644
+--- a/kernel/resource.c
++++ b/kernel/resource.c
+@@ -178,6 +178,8 @@ static int __release_resource(struct res
+ {
+ 	struct resource *tmp, **p;
+ 
++	BUG_ON(old->child);
++
+ 	p = &old->parent->child;
+ 	for (;;) {
+ 		tmp = *p;
+@@ -344,12 +346,11 @@ EXPORT_SYMBOL(allocate_resource);
+  *
+  * Returns 0 on success, -EBUSY if the resource can't be inserted.
+  *
+- * This function is equivalent of request_resource when no conflict
++ * This function is equivalent to request_resource when no conflict
+  * happens. If a conflict happens, and the conflicting resources
+  * entirely fit within the range of the new resource, then the new
+- * resource is inserted and the conflicting resources become childs of
+- * the new resource.  Otherwise the new resource becomes the child of
+- * the conflicting resource
++ * resource is inserted and the conflicting resources become children of
++ * the new resource.
+  */
+ int insert_resource(struct resource *parent, struct resource *new)
+ {
+@@ -357,20 +358,21 @@ int insert_resource(struct resource *par
+ 	struct resource *first, *next;
+ 
+ 	write_lock(&resource_lock);
+- begin:
+- 	result = 0;
+-	first = __request_resource(parent, new);
+-	if (!first)
+-		goto out;
+ 
+-	result = -EBUSY;
+-	if (first == parent)
+-		goto out;
++	for (;; parent = first) {
++	 	result = 0;
++		first = __request_resource(parent, new);
++		if (!first)
++			goto out;
+ 
+-	/* Resource fully contained by the clashing resource? Recurse into it */
+-	if (first->start <= new->start && first->end >= new->end) {
+-		parent = first;
+-		goto begin;
++		result = -EBUSY;
++		if (first == parent)
++			goto out;
++
++		if ((first->start > new->start) || (first->end < new->end))
++			break;
++		if ((first->start == new->start) && (first->end == new->end))
++			break;
+ 	}
+ 
+ 	for (next = first; ; next = next->sibling) {
+diff --git a/kernel/signal.c b/kernel/signal.c
+index bfdb568..f2df625 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -21,6 +21,7 @@ #include <linux/binfmts.h>
+ #include <linux/security.h>
+ #include <linux/syscalls.h>
+ #include <linux/ptrace.h>
++#include <linux/compat_siginfo.h>
+ #include <linux/signal.h>
+ #include <linux/capability.h>
+ #include <asm/param.h>
+@@ -2038,17 +2039,35 @@ sys_rt_sigpending(sigset_t __user *set, 
+ 	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())
++                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()){
++		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.
+@@ -2263,7 +2282,7 @@ sys_rt_sigqueueinfo(int pid, int sig, si
+ {
+ 	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.
+diff --git a/mm/Kconfig b/mm/Kconfig
+index 8f5b456..aadd1c3 100644
+--- a/mm/Kconfig
++++ b/mm/Kconfig
+@@ -148,7 +148,7 @@ config MIGRATION
+ 	  the page.
+ 
+ config RESOURCES_64BIT
+-	bool "64 bit Memory and IO resources (EXPERIMENTAL)" if (!64BIT && EXPERIMENTAL)
++	bool "64 bit Memory and IO resources (EXPERIMENTAL)" if (!64BIT && !PARISC && EXPERIMENTAL)
+ 	default 64BIT
+ 	help
+ 	  This option allows memory and IO resources to be 64 bit.
+diff --git a/mm/shmem.c b/mm/shmem.c
+index db21c51..5e96f34 100644
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -625,7 +625,7 @@ done2:
+ 	}
+ }
+ 
+-static void shmem_truncate(struct inode *inode)
++/* static gcc-3.3 OPD bug - GGG */ void shmem_truncate(struct inode *inode)
+ {
+ 	shmem_truncate_range(inode, inode->i_size, (loff_t)-1);
+ }

Added: dists/trunk/linux-2.6/debian/patches/series/2-extra
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/series/2-extra	Mon Sep 25 18:58:54 2006
@@ -0,0 +1 @@
++ hppa.patch hppa



More information about the Kernel-svn-changes mailing list