]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.11pre6 2.3.11pre6
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:26:14 +0000 (15:26 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:26:14 +0000 (15:26 -0500)
87 files changed:
CREDITS
arch/arm/def-configs/a5k [new file with mode: 0644]
arch/arm/def-configs/ebsa110 [new file with mode: 0644]
arch/arm/def-configs/footbridge [new file with mode: 0644]
arch/arm/def-configs/rpc [new file with mode: 0644]
arch/arm/kernel/Makefile
arch/arm/kernel/armksyms.c
arch/arm/kernel/calls.S
arch/arm/kernel/dma-arc.c
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/head-armv.S
arch/arm/kernel/hw-footbridge.c
arch/arm/kernel/isa.c [new file with mode: 0644]
arch/arm/kernel/leds-footbridge.c
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/setup.c
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/lib/Makefile
arch/arm/lib/io.c
arch/arm/mm/init.c
arch/i386/kernel/entry.S
arch/i386/kernel/init_task.c
arch/i386/kernel/ioport.c
arch/i386/kernel/mca.c
arch/i386/kernel/process.c
arch/i386/kernel/setup.c
arch/i386/kernel/traps.c
arch/i386/kernel/vm86.c
arch/i386/mm/fault.c
arch/i386/mm/init.c
arch/mips/kernel/irixelf.c
drivers/char/cyclades.c
drivers/char/ppdev.c
drivers/char/sysrq.c
drivers/scsi/aic7xxx.c
drivers/scsi/aic7xxx/aic7xxx.reg
drivers/scsi/aic7xxx_reg.h
drivers/sgi/char/shmiq.c
drivers/usb/acm.c
drivers/usb/audio.c
drivers/usb/cpia.c
drivers/usb/hub.c
drivers/usb/keyboard.c
drivers/usb/mouse.c
drivers/usb/ohci-hcd.c
drivers/usb/ohci.c
drivers/usb/printer.c
drivers/usb/uhci-debug.c
drivers/usb/uhci.c
drivers/usb/uhci.h
drivers/usb/usb-debug.c
drivers/usb/usb.c
drivers/usb/usb.h
drivers/video/vgacon.c
fs/buffer.c
fs/exec.c
fs/ncpfs/dir.c
fs/nfs/read.c
fs/proc/array.c
include/asm-arm/arch-arc/time.h
include/asm-arm/arch-ebsa110/hardware.h
include/asm-arm/arch-ebsa285/io.h
include/asm-arm/arch-ebsa285/irq.h
include/asm-arm/arch-ebsa285/time.h
include/asm-arm/arch-rpc/time.h
include/asm-arm/io.h
include/asm-arm/page.h
include/asm-arm/processor.h
include/asm-arm/spinlock.h
include/asm-arm/string.h
include/asm-arm/system.h
include/asm-i386/mmu_context.h
include/asm-i386/pgtable.h
include/asm-i386/processor.h
include/linux/cyclades.h
include/linux/ioport.h
include/linux/sched.h
kernel/exit.c
kernel/fork.c
kernel/ksyms.c
kernel/ptrace.c
kernel/resource.c
kernel/sched.c
mm/swapfile.c

diff --git a/CREDITS b/CREDITS
index 1850a7b29d6ae44c5e6163e655f70602c80409a6..8c0d992538912829b008b0ff8a643652eba12f80 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1714,12 +1714,13 @@ S: 75019 Paris
 S: France
 
 N: Rik van Riel
-E: H.H.vanRiel@humbolt.geo.uu.nl
-W: http://humbolt.geo.uu.nl/
-D: Maintainer of the mm-patches page (see www.linuxhq.com)
-D: Documentation/sysctl/*, kswapd fixes, random kernel hacker
-S: Vorenkampsweg 1
-S: NL-9488 TG  Zeijerveld
+E: riel@nl.linux.org
+W: http://www.nl.linux.org/~riel/
+D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
+D: clustering contributor, kswapd fixes, random kernel hacker,
+D: nl.linux.org maintainer, minor scheduler additions
+S: IJsselstraat 23a
+S: 9725 GA  Groningen
 S: The Netherlands
 
 N: William E. Roadcap
diff --git a/arch/arm/def-configs/a5k b/arch/arm/def-configs/a5k
new file mode 100644 (file)
index 0000000..8b402a5
--- /dev/null
@@ -0,0 +1,425 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+
+#
+# System and processor type
+#
+# CONFIG_ARCH_ARC is not set
+CONFIG_ARCH_A5K=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_FOOTBRIDGE is not set
+CONFIG_ARCH_ACORN=y
+# CONFIG_ISA_DMA is not set
+# CONFIG_CPU_32 is not set
+CONFIG_CPU_26=y
+# CONFIG_CPU_ARM2 is not set
+CONFIG_CPU_ARM3=y
+# CONFIG_CPU_ARM6 is not set
+# CONFIG_CPU_ARM7 is not set
+# CONFIG_CPU_SA110 is not set
+CONFIG_PAGESIZE_32=y
+# CONFIG_PAGESIZE_16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_TEXT_SECTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_NWFPE is not set
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_ELF=m
+# CONFIG_BINFMT_MISC is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_IDE_CHIPSETS is not set
+
+#
+# Additional Block Devices
+#
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_PARIDE_PARPORT=y
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# Acorn-specific block devices
+#
+CONFIG_BLK_DEV_IDE_CARDS=y
+CONFIG_BLK_DEV_IDE_ICSIDE=y
+# CONFIG_BLK_DEV_IDE_RAPIDE is not set
+# CONFIG_BLK_DEV_FD1772 is not set
+CONFIG_BLK_DEV_MFM=m
+CONFIG_BLK_DEV_MFM_AUTODETECT=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+# CONFIG_SERIAL_CONSOLE is not set
+# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_ATOMWIDE_SERIAL=y
+CONFIG_DUALSP_SERIAL=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
+CONFIG_PRINTER=y
+CONFIG_PRINTER_READBACK=y
+CONFIG_MOUSE=y
+
+#
+# Mice
+#
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+# CONFIG_PSMOUSE is not set
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Joystick support
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_DTLK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+CONFIG_KBDMOUSE=y
+
+#
+# Console drivers
+#
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FB_ACORN=y
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FBCON_ADVANCED is not set
+CONFIG_FBCON_MFB=y
+CONFIG_FBCON_CFB2=y
+CONFIG_FBCON_CFB4=y
+CONFIG_FBCON_CFB8=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+# CONFIG_FBCON_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_ACORN_8x8=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK is not set
+# CONFIG_FIREWALL is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
+# CONFIG_INET_RARP is not set
+# CONFIG_SKB_LARGE is not set
+# CONFIG_IPV6 is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+# CONFIG_CPU_IS_SLOW is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA subsystem support
+#
+# CONFIG_IRDA is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_ARM_ETHER1=y
+CONFIG_ARM_ETHER3=y
+# CONFIG_ARM_ETHERH is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_RTL8139 is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_EISA is not set
+# CONFIG_NET_POCKET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_DLCI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
+# CONFIG_SHAPER is not set
+# CONFIG_HOSTESS_SV11 is not set
+# CONFIG_COSA is not set
+# CONFIG_RCPCI is not set
+
+#
+# SCSI support
+#
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+CONFIG_SCSI_PPA=m
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_ACORNSCSI_3=y
+CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE=y
+CONFIG_SCSI_ACORNSCSI_SYNC=y
+CONFIG_SCSI_ARXESCSI=m
+# CONFIG_SCSI_CUMANA_2 is not set
+CONFIG_SCSI_EESOXSCSI=y
+# CONFIG_SCSI_POWERTECSCSI is not set
+
+#
+# The following drivers are not fully supported
+#
+# CONFIG_SCSI_CUMANA_1 is not set
+# CONFIG_SCSI_ECOSCSI is not set
+# CONFIG_SCSI_OAK1 is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# Filesystems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+CONFIG_ADFS_FS=y
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_NFSD=y
+# CONFIG_NFSD_SUN is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+CONFIG_ACORN_PARTITION=y
+CONFIG_ACORN_PARTITION_ADFS=y
+CONFIG_ACORN_PARTITION_ICS=y
+CONFIG_ACORN_PARTITION_POWERTEC=y
+CONFIG_ACORN_PARTITION_RISCIX=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_INFO is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_NO_PGT_CACHE=y
+# CONFIG_DEBUG_LL is not set
diff --git a/arch/arm/def-configs/ebsa110 b/arch/arm/def-configs/ebsa110
new file mode 100644 (file)
index 0000000..0e4acde
--- /dev/null
@@ -0,0 +1,308 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+
+#
+# System and processor type
+#
+# CONFIG_ARCH_ARC is not set
+# CONFIG_ARCH_A5K is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_EBSA110=y
+# CONFIG_FOOTBRIDGE is not set
+# CONFIG_ARCH_ACORN is not set
+# CONFIG_ISA_DMA is not set
+CONFIG_CPU_32=y
+# CONFIG_CPU_26 is not set
+# CONFIG_CPU_ARM2 is not set
+# CONFIG_CPU_ARM3 is not set
+# CONFIG_CPU_ARM6 is not set
+# CONFIG_CPU_ARM7 is not set
+CONFIG_CPU_SA110=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_TEXT_SECTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_NWFPE is not set
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_ELF=m
+# CONFIG_BINFMT_MISC is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8"
+CONFIG_LEDS=y
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_IDE is not set
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_ONLY is not set
+
+#
+# Additional Block Devices
+#
+# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_NBD=m
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_RAM=y
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_PARIDE_PARPORT=y
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SERIAL_EXTENDED=y
+# CONFIG_SERIAL_MANY_PORTS is not set
+# CONFIG_SERIAL_SHARE_IRQ is not set
+# CONFIG_SERIAL_DETECT_IRQ is not set
+# CONFIG_SERIAL_MULTIPORT is not set
+# CONFIG_HUB6 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
+CONFIG_PRINTER=m
+CONFIG_PRINTER_READBACK=y
+CONFIG_MOUSE=y
+
+#
+# Mice
+#
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+# CONFIG_PSMOUSE is not set
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_QIC02_TAPE is not set
+CONFIG_WATCHDOG=y
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+# CONFIG_WDT is not set
+CONFIG_SOFT_WATCHDOG=y
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Joystick support
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_DTLK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+# CONFIG_NETLINK is not set
+CONFIG_FIREWALL=y
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_IP_FIREWALL=y
+CONFIG_IP_ALWAYS_DEFRAG=y
+# CONFIG_IP_TRANSPARENT_PROXY is not set
+CONFIG_IP_MASQUERADE=y
+
+#
+# Protocol-specific masquerading support will be built as modules.
+#
+CONFIG_IP_MASQUERADE_ICMP=y
+
+#
+# Protocol-specific masquerading support will be built as modules.
+#
+# CONFIG_IP_MASQUERADE_MOD is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+CONFIG_SYN_COOKIES=y
+
+#
+# (it is safe to leave these untouched)
+#
+# CONFIG_INET_RARP is not set
+# CONFIG_SKB_LARGE is not set
+# CONFIG_IPV6 is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+# CONFIG_CPU_IS_SLOW is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA subsystem support
+#
+# CONFIG_IRDA is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_ARM_AM79C961A=y
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_RTL8139 is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_EISA is not set
+# CONFIG_NET_POCKET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_DLCI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=y
+
+#
+# CCP compressors for PPP are only built as modules.
+#
+# CONFIG_SLIP is not set
+# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
+# CONFIG_SHAPER is not set
+# CONFIG_HOSTESS_SV11 is not set
+# CONFIG_COSA is not set
+# CONFIG_RCPCI is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Filesystems
+#
+# CONFIG_QUOTA is not set
+CONFIG_AUTOFS_FS=m
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+CONFIG_MINIX_FS=y
+# CONFIG_NTFS_FS is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_ARTHUR is not set
+# CONFIG_DEBUG_LL is not set
diff --git a/arch/arm/def-configs/footbridge b/arch/arm/def-configs/footbridge
new file mode 100644 (file)
index 0000000..ce85d6f
--- /dev/null
@@ -0,0 +1,493 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+
+#
+# System and processor type
+#
+# CONFIG_ARCH_ARC is not set
+# CONFIG_ARCH_A5K is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_EBSA110 is not set
+CONFIG_FOOTBRIDGE=y
+CONFIG_HOST_FOOTBRIDGE=y
+# CONFIG_ADDIN_FOOTBRIDGE is not set
+CONFIG_ARCH_EBSA285=y
+# CONFIG_CATS is not set
+CONFIG_ARCH_NETWINDER=y
+# CONFIG_ARCH_ACORN is not set
+CONFIG_PCI=y
+CONFIG_ISA_DMA=y
+CONFIG_CPU_32=y
+# CONFIG_CPU_26 is not set
+# CONFIG_CPU_ARM2 is not set
+# CONFIG_CPU_ARM3 is not set
+# CONFIG_CPU_ARM6 is not set
+# CONFIG_CPU_ARM7 is not set
+CONFIG_CPU_SA110=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_ALIGNMENT_TRAP is not set
+# CONFIG_TEXT_SECTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+CONFIG_NWFPE=y
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_ARTHUR is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+CONFIG_CMDLINE="root=/dev/hda2 ro mem=32M parport=0x378,7 ide0=autotune"
+CONFIG_LEDS=y
+CONFIG_LEDS_TIMER=y
+# CONFIG_LEDS_CPU is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_BLK_DEV_OFFBOARD=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_VIA82C586 is not set
+# CONFIG_BLK_DEV_CMD646 is not set
+CONFIG_BLK_DEV_SL82C105=y
+# CONFIG_IDE_CHIPSETS is not set
+
+#
+# Additional Block Devices
+#
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=m
+CONFIG_MD_STRIPED=m
+CONFIG_MD_MIRRORING=m
+CONFIG_MD_RAID5=m
+CONFIG_BLK_DEV_RAM=y
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_PARIDE_PARPORT=y
+CONFIG_PARIDE=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
+CONFIG_PRINTER=m
+CONFIG_PRINTER_READBACK=y
+CONFIG_MOUSE=y
+
+#
+# Mice
+#
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+CONFIG_PSMOUSE=y
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_QIC02_TAPE is not set
+CONFIG_WATCHDOG=y
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+# CONFIG_WDT is not set
+CONFIG_SOFT_WATCHDOG=y
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_ACQUIRE_WDT is not set
+CONFIG_DS1620=y
+CONFIG_NWBUTTON=y
+CONFIG_NWBUTTON_REBOOT=y
+CONFIG_NWFLASH=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=y
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Joystick support
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_DTLK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+
+#
+# Console drivers
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_CYBER2000=y
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FBCON_ADVANCED=y
+# CONFIG_FBCON_MFB is not set
+# CONFIG_FBCON_CFB2 is not set
+# CONFIG_FBCON_CFB4 is not set
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+# CONFIG_FBCON_CFB32 is not set
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+CONFIG_FBCON_VGA=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+CONFIG_FONT_ACORN_8x8=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_NETLINK is not set
+# CONFIG_FIREWALL is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+CONFIG_IP_ALIAS=y
+# CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
+# CONFIG_INET_RARP is not set
+CONFIG_SKB_LARGE=y
+# CONFIG_IPV6 is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+# CONFIG_CPU_IS_SLOW is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA subsystem support
+#
+# CONFIG_IRDA is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_ARM_AM79C961A is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=y
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_RTL8139 is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_NET_ISA is not set
+CONFIG_NET_EISA=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_DE4X5 is not set
+CONFIG_DEC_ELCP=m
+# CONFIG_DGRS is not set
+# CONFIG_EEXPRESS_PRO100 is not set
+# CONFIG_LNE390 is not set
+# CONFIG_NE3210 is not set
+CONFIG_NE2K_PCI=y
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_ES3210 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_ZNET is not set
+# CONFIG_NET_POCKET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_DLCI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+
+#
+# CCP compressors for PPP are only built as modules.
+#
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
+# CONFIG_SHAPER is not set
+# CONFIG_HOSTESS_SV11 is not set
+# CONFIG_COSA is not set
+# CONFIG_RCPCI is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_PAS is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_ADLIB=m
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_WAVEFRONT is not set
+# CONFIG_SOUND_CS4232 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_MAUI is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_SOFTOSS is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_UART6850 is not set
+# CONFIG_SOUND_VIDC is not set
+CONFIG_SOUND_WAVEARTIST=m
+CONFIG_WAVEARTIST_BASE=250
+CONFIG_WAVEARTIST_IRQ=12
+CONFIG_WAVEARTIST_DMA=3
+CONFIG_WAVEARTIST_DMA2=7
+
+#
+# Additional low level sound drivers
+#
+# CONFIG_LOWLEVEL_SOUND is not set
+
+#
+# Filesystems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+CONFIG_ADFS_FS=y
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+# CONFIG_NFSD_SUN is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+CONFIG_ACORN_PARTITION=y
+CONFIG_ACORN_PARTITION_ADFS=y
+# CONFIG_ACORN_PARTITION_ICS is not set
+# CONFIG_ACORN_PARTITION_POWERTEC is not set
+# CONFIG_ACORN_PARTITION_RISCIX is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+CONFIG_NLS_ISO8859_15=m
+# CONFIG_NLS_KOI8_R is not set
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_INFO is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_LL is not set
diff --git a/arch/arm/def-configs/rpc b/arch/arm/def-configs/rpc
new file mode 100644 (file)
index 0000000..904bb07
--- /dev/null
@@ -0,0 +1,471 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+
+#
+# System and processor type
+#
+# CONFIG_ARCH_ARC is not set
+# CONFIG_ARCH_A5K is not set
+CONFIG_ARCH_RPC=y
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_FOOTBRIDGE is not set
+CONFIG_ARCH_ACORN=y
+# CONFIG_ISA_DMA is not set
+CONFIG_CPU_32=y
+# CONFIG_CPU_26 is not set
+# CONFIG_CPU_ARM2 is not set
+# CONFIG_CPU_ARM3 is not set
+# CONFIG_CPU_ARM6 is not set
+# CONFIG_CPU_ARM7 is not set
+CONFIG_CPU_SA110=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_ALIGNMENT_TRAP is not set
+# CONFIG_TEXT_SECTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_NWFPE is not set
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDETAPE=y
+CONFIG_BLK_DEV_IDEFLOPPY=y
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_IDE_CHIPSETS is not set
+
+#
+# Additional Block Devices
+#
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_PARIDE_PARPORT=y
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# Acorn-specific block devices
+#
+CONFIG_BLK_DEV_IDE_CARDS=y
+CONFIG_BLK_DEV_IDE_ICSIDE=y
+CONFIG_BLK_DEV_IDE_RAPIDE=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+# CONFIG_SERIAL_CONSOLE is not set
+# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_ATOMWIDE_SERIAL=y
+CONFIG_DUALSP_SERIAL=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
+CONFIG_PRINTER=m
+CONFIG_PRINTER_READBACK=y
+CONFIG_MOUSE=y
+
+#
+# Mice
+#
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+# CONFIG_PSMOUSE is not set
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Joystick support
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_DTLK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+CONFIG_RPCMOUSE=y
+
+#
+# Console drivers
+#
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FB_ACORN=y
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FBCON_ADVANCED=y
+CONFIG_FBCON_MFB=y
+CONFIG_FBCON_CFB2=y
+CONFIG_FBCON_CFB4=y
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA is not set
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+CONFIG_FONT_ACORN_8x8=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK is not set
+# CONFIG_FIREWALL is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
+# CONFIG_INET_RARP is not set
+CONFIG_SKB_LARGE=y
+# CONFIG_IPV6 is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+# CONFIG_CPU_IS_SLOW is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA subsystem support
+#
+# CONFIG_IRDA is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_ARM_ETHER1=m
+CONFIG_ARM_ETHER3=m
+CONFIG_ARM_ETHERH=m
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_RTL8139 is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_EISA is not set
+# CONFIG_NET_POCKET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_DLCI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+
+#
+# CCP compressors for PPP are only built as modules.
+#
+# CONFIG_SLIP is not set
+# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
+# CONFIG_SHAPER is not set
+# CONFIG_HOSTESS_SV11 is not set
+# CONFIG_COSA is not set
+# CONFIG_RCPCI is not set
+
+#
+# SCSI support
+#
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_ACORNSCSI_3=m
+CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE=y
+CONFIG_SCSI_ACORNSCSI_SYNC=y
+CONFIG_SCSI_ARXESCSI=m
+CONFIG_SCSI_CUMANA_2=m
+CONFIG_SCSI_EESOXSCSI=m
+CONFIG_SCSI_POWERTECSCSI=m
+
+#
+# The following drivers are not fully supported
+#
+CONFIG_SCSI_CUMANA_1=m
+CONFIG_SCSI_OAK1=m
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_WAVEFRONT is not set
+# CONFIG_SOUND_CS4232 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_MAUI is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_SOFTOSS is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_UART6850 is not set
+CONFIG_SOUND_VIDC=m
+# CONFIG_SOUND_WAVEARTIST is not set
+
+#
+# Additional low level sound drivers
+#
+# CONFIG_LOWLEVEL_SOUND is not set
+
+#
+# Filesystems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+CONFIG_ADFS_FS=y
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+# CONFIG_UMSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFSD is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+CONFIG_ACORN_PARTITION=y
+CONFIG_ACORN_PARTITION_ADFS=y
+CONFIG_ACORN_PARTITION_ICS=y
+CONFIG_ACORN_PARTITION_POWERTEC=y
+CONFIG_ACORN_PARTITION_RISCIX=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_ISO8859_9=m
+# CONFIG_NLS_ISO8859_15 is not set
+CONFIG_NLS_KOI8_R=m
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_INFO is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_ARTHUR is not set
+# CONFIG_DEBUG_LL is not set
index 5bcc22af1e4329beb583e50baebace9f12e1eaad..4ad76d3e54faa0c47b95ca73e7c6fb3245ca46ee 100644 (file)
@@ -20,7 +20,7 @@ O_OBJS_arc        = dma-arc.o iic.o fiq.o oldlatches.o
 O_OBJS_a5k        = dma-a5k.o iic.o fiq.o
 O_OBJS_rpc        = dma-rpc.o iic.o fiq.o
 O_OBJS_ebsa110    = dma-dummy.o
-O_OBJS_footbridge = dma-footbridge.o $(ISA_DMA_OBJS)
+O_OBJS_footbridge = dma-footbridge.o $(ISA_DMA_OBJS) isa.o
 O_OBJS_nexuspci   = dma-dummy.o
 
 OX_OBJS_arc      = dma.o
index c93421ba7763bd6556f0dfe48551fe052022a019..37a3b834663b10b4758c5ee008c6e00c180070bc 100644 (file)
@@ -116,10 +116,6 @@ EXPORT_SYMBOL(insb);
 EXPORT_SYMBOL(insw);
 EXPORT_SYMBOL(insl);
 
-EXPORT_SYMBOL(_memcpy_fromio);
-EXPORT_SYMBOL(_memcpy_toio);
-EXPORT_SYMBOL(_memset_io);
-
        /* address translation */
 #ifndef __virt_to_phys__is_a_macro
 EXPORT_SYMBOL(__virt_to_phys);
index 154e3aeabe1538545df47772defec41b10179281..adad3a551c32f2f8b1ccc06e6e25a1d8bd3777db 100644 (file)
 /* 145 */      .long   SYMBOL_NAME(sys_readv)
                .long   SYMBOL_NAME(sys_writev)
                .long   SYMBOL_NAME(sys_getsid)
-               .long   SYMBOL_NAME(sys_ni_syscall)
-               .long   SYMBOL_NAME(sys_ni_syscall)
+               .long   SYMBOL_NAME(sys_fdatasync)
+               .long   SYMBOL_NAME(sys_sysctl)
 /* 150 */      .long   SYMBOL_NAME(sys_mlock)
                .long   SYMBOL_NAME(sys_munlock)
                .long   SYMBOL_NAME(sys_mlockall)
index 9be27bdaeb7f8420a543d3403065d8160e2ab962..8631d2595a53ac540be40f2fddf33c9ceb46b626 100644 (file)
@@ -100,7 +100,7 @@ void arch_enable_dma(dmach_t channel, dma_t *dma)
 int arch_get_dma_residue(dmach_t channel, dma_t *dma)
 {
   switch (channel) {
-#ifdef CONFIG_BLK_DEV_FD
+#ifdef CONFIG_BLK_DEV_FD1772
     case DMA_VIRTUAL_FLOPPY0: { /* Data DMA */
         extern unsigned int fdc1772_bytestogo;
 
index 9456abe337d23404340b9eccbf8b6bc8431a3a22..ef9c8fea66c7d1507914389825d14e17ab5c5185 100644 (file)
@@ -244,6 +244,10 @@ irq_prio_ebsa110:
                movne   \irqnr, #IRQ_PCI
                bne     1001f
 
+               tst     \irqstat, #IRQ_MASK_DOORBELLHOST
+               movne   \irqnr, #IRQ_DOORBELLHOST
+               bne     1001f
+       
                tst     \irqstat, #IRQ_MASK_I2OINPOST
                movne   \irqnr, #IRQ_I2OINPOST
                bne     1001f
index 7dbc7ff95bb3eda6cf9ff1e7f4c1a2f653623b38..c867b22d4338036b28d8479a13d6b0c3ea5465ca 100644 (file)
@@ -132,7 +132,8 @@ ENTRY(sys_call_table)
 SYMBOL_NAME(sys_syscall):
                eor     r6, r0, #OS_NUMBER << 20
                cmp     r6, #NR_syscalls        @ check range
-               ldmleib sp, {r0 - r4}           @ get our args
+               add     ip, sp, #4
+               ldmleib ip, {r0 - r4}           @ get our args
                strle   r4, [sp]                @ Put our arg on the stack
                ldrle   pc, [r5, r6, lsl #2]
                mov     r0, #-ENOSYS
index 2e13f08182b7db51a8e22d4f3f09fc4b654bed16..5161d8dbff36aff3d58e1b1f3cea9718f4898ae0 100644 (file)
@@ -72,6 +72,8 @@ ENTRY(_stext)
  *  r1 = 6 -> CATS
  *  r1 = 7 -> tbox
  *  r1 = 8 -> SA110/21285 as co-processor
+ *  r1 = 9 -> CL-PS7110 system
+ *  r1 = 12 -> SA1100 based system
  */
 
 __entry:       teq     r0, #0                                  @ check for illegal entry...
@@ -245,6 +247,12 @@ __entry:   teq     r0, #0                                  @ check for illegal entry...
                .long   DC21285_ARMCSR_BASE                     @ Physical I/O base address
                .long   0x7cf00000 >> 18                        @ Virtual I/O base address
 
+               @ SA1100
+               .long   SYMBOL_NAME(swapper_pg_dir) - 0xc0000000 + 0xc0000000
+               .long   0xc0000000
+               .long   0x80000000                              @ IO mapping will change when kernel gets on its feet
+               .long   0x3800
+
 .LCProcTypes:  @ ARM6 / 610
                .long   0x41560600
                .long   0xffffff00
@@ -266,9 +274,9 @@ __entry:    teq     r0, #0                                  @ check for illegal entry...
                b       .Larmv3_flush_late                      @ arm v3 flush & ctrl late setup
                mov     pc, lr
 
-               @ StrongARM
-               .long   0x4401a100
-               .long   0xfffffff0
+               @ StrongARM-110 and StrongARM-1100
+               .long   0x4401a100                              @ 4401a100 and 4401a110
+               .long   0xffffffe0
                .long   0x00000c02
                b       .Larmv4_flush_early
                b       .Lsa_fastclock
index 857f120e14f6c0cade92d8e7aa3a9d79e56a9386..81d783c0e20e23d2262087fe1b0fd19965f4c8d4 100644 (file)
@@ -866,8 +866,63 @@ EXPORT_SYMBOL(cpld_modify);
 #define DEFAULT_LEDS   GPIO_GREEN_LED
 #endif
 
+/*
+ * CATS stuff
+ */
+#ifdef CONFIG_CATS
+
+#define CONFIG_PORT    0x370
+#define INDEX_PORT     (CONFIG_PORT)
+#define DATA_PORT      (CONFIG_PORT + 1)
+
+static void __init cats_hw_init(void)
+{
+       /* Set Aladdin to CONFIGURE mode */
+       outb(0x51, CONFIG_PORT);
+       outb(0x23, CONFIG_PORT);
+
+       /* Select logical device 3 */
+       outb(0x07, INDEX_PORT);
+       outb(0x03, DATA_PORT);
+
+       /* Set parallel port to DMA channel 3, ECP+EPP1.9, 
+          enable EPP timeout */
+       outb(0x74, INDEX_PORT);
+       outb(0x03, DATA_PORT);
+       
+       outb(0xf0, INDEX_PORT);
+       outb(0x0f, DATA_PORT);
+
+       outb(0xf1, INDEX_PORT);
+       outb(0x07, DATA_PORT);
+
+       /* Select logical device 4 */
+       outb(0x07, INDEX_PORT);
+       outb(0x04, DATA_PORT);
+
+       /* UART1 high speed mode */
+       outb(0xf0, INDEX_PORT);
+       outb(0x02, DATA_PORT);
+
+       /* Select logical device 5 */
+       outb(0x07, INDEX_PORT);
+       outb(0x05, DATA_PORT);
+
+       /* UART2 high speed mode */
+       outb(0xf0, INDEX_PORT);
+       outb(0x02, DATA_PORT);
+
+       /* Set Aladdin to RUN mode */
+       outb(0xbb, CONFIG_PORT);
+}
+
+#endif
+
 __initfunc(void hw_init(void))
 {
+       extern void register_isa_ports(unsigned int, unsigned int, 
+                                      unsigned int);
+       register_isa_ports(DC21285_PCI_MEM, DC21285_PCI_IO, 0);
 #ifdef CONFIG_ARCH_NETWINDER
        /*
         * this ought to have a better home...
@@ -889,5 +944,8 @@ __initfunc(void hw_init(void))
        }
 #endif
 
+       if (machine_is_cats())
+               cats_hw_init();
+
        leds_event(led_start);
 }
diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
new file mode 100644 (file)
index 0000000..e340be4
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * arch/arm/kernel/isa.c
+ *
+ * ISA shared memory and I/O port support
+ *
+ * Copyright (C) 1999 Phil Blundell
+ */
+
+/* 
+ * Nothing about this is actually ARM specific.  One day we could move
+ * it into kernel/resource.c or some place like that.  
+ */
+
+#include <linux/stddef.h>
+#include <linux/types.h>
+#include <linux/linkage.h>
+#include <linux/fs.h>
+#include <linux/sysctl.h>
+#include <linux/init.h>
+
+static unsigned int isa_membase, isa_portbase, isa_portshift;
+
+static ctl_table ctl_isa_vars[4] = {
+       {BUS_ISA_MEM_BASE, "membase", &isa_membase, 
+        sizeof(isa_membase), 0444, NULL, &proc_dointvec},
+       {BUS_ISA_PORT_BASE, "portbase", &isa_portbase, 
+        sizeof(isa_portbase), 0444, NULL, &proc_dointvec},
+       {BUS_ISA_PORT_SHIFT, "portshift", &isa_portshift, 
+        sizeof(isa_portshift), 0444, NULL, &proc_dointvec},
+       {0}
+};
+
+static struct ctl_table_header *isa_sysctl_header;
+
+static ctl_table ctl_isa[2] = {{BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars},
+                              {0}};
+static ctl_table ctl_bus[2] = {{CTL_BUS, "bus", NULL, 0, 0555, ctl_isa},
+                              {0}};
+
+__initfunc(void
+register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift))
+{
+       isa_membase = membase;
+       isa_portbase = portbase;
+       isa_portshift = portshift;
+       isa_sysctl_header = register_sysctl_table(ctl_bus, 0);
+}
index cb6c7f4b438fdcf3bb23c5b3969f0b69fa9ce920..7264a47af4ce5b33a7e6d2c7296f379138b442ee 100644 (file)
@@ -33,8 +33,9 @@ static char led_state;
 static char hw_led_state;
 
 static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+extern spinlock_t gpio_lock;
 
-#ifdef CONFIG_ARCH_EBSA285
+#ifdef CONFIG_FOOTBRIDGE
 
 static void __ebsa285_text ebsa285_leds_event(led_event_t evt)
 {
@@ -226,8 +227,9 @@ __initfunc(void
 init_leds_event(led_event_t evt))
 {
        switch (machine_arch_type) {
-#ifdef CONFIG_ARCH_EBSA285
+#ifdef CONFIG_FOOTBRIDGE
        case MACH_TYPE_EBSA285:
+       case MACH_TYPE_CO285:
                leds_event = ebsa285_leds_event;
                break;
 #endif
index ff0c548b465f78827cc4106cf22672c808c1d7a4..c456777669ea303182853d0b23889818ca14f7dd 100644 (file)
@@ -209,8 +209,7 @@ void flush_thread(void)
 {
        int i;
 
-       for (i = 0; i < NR_DEBUGS; i++)
-               current->tss.debug[i] = 0;
+       memset(&current->tss.debug, 0, sizeof(current->tss.debug));
        current->used_math = 0;
        current->flags &= ~PF_USEDFPU;
 }
@@ -255,8 +254,6 @@ int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
  */
 void dump_thread(struct pt_regs * regs, struct user * dump)
 {
-       int i;
-
        dump->magic = CMAGIC;
        dump->start_code = current->mm->start_code;
        dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
@@ -265,8 +262,11 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
        dump->u_dsize = (current->mm->brk - current->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
        dump->u_ssize = 0;
 
-       for (i = 0; i < NR_DEBUGS; i++)
-               dump->u_debugreg[i] = current->tss.debug[i];  
+       dump->u_debugreg[0] = current->tss.debug.bp[0].address;
+       dump->u_debugreg[1] = current->tss.debug.bp[1].address;
+       dump->u_debugreg[2] = current->tss.debug.bp[0].insn;
+       dump->u_debugreg[3] = current->tss.debug.bp[1].insn;
+       dump->u_debugreg[4] = current->tss.debug.nsaved;
 
        if (dump->start_stack < 0x04000000)
                dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
index fbc3a21874cdb53eb1610475734289a9fbef4cdd..28874f2831ef57b610236b90af36535a9264d3a5 100644 (file)
@@ -59,209 +59,24 @@ static inline long put_stack_long(struct task_struct *task, int offset,
        return 0;
 }
 
-/*
- * This routine gets a long from any process space by following the page
- * tables. NOTE! You should check that the long isn't on a page boundary,
- * and that it is in the task area before calling this: this routine does
- * no checking.
- */
-static unsigned long get_long(struct task_struct * tsk,
-       struct vm_area_struct * vma, unsigned long addr)
+static int
+read_long(struct task_struct *child, unsigned long addr, unsigned long *res)
 {
-       pgd_t *pgdir;
-       pmd_t *pgmiddle;
-       pte_t *pgtable;
-       unsigned long page;
-
-repeat:
-       pgdir = pgd_offset(vma->vm_mm, addr);
-       if (pgd_none(*pgdir)) {
-               handle_mm_fault(tsk, vma, addr, 0);
-               goto repeat;
-       }
-       if (pgd_bad(*pgdir)) {
-               printk("ptrace: bad page directory %08lx\n", pgd_val(*pgdir));
-               pgd_clear(pgdir);
-               return 0;
-       }
-       pgmiddle = pmd_offset(pgdir, addr);
-       if (pmd_none(*pgmiddle)) {
-               handle_mm_fault(tsk, vma, addr, 0);
-               goto repeat;
-       }
-       if (pmd_bad(*pgmiddle)) {
-               printk("ptrace: bad page middle %08lx\n", pmd_val(*pgmiddle));
-               pmd_clear(pgmiddle);
-               return 0;
-       }
-       pgtable = pte_offset(pgmiddle, addr);
-       if (!pte_present(*pgtable)) {
-               handle_mm_fault(tsk, vma, addr, 0);
-               goto repeat;
-       }
-       page = pte_page(*pgtable);
-       if(MAP_NR(page) >= max_mapnr)
-               return 0;
-       page += addr & ~PAGE_MASK;
-       return *(unsigned long *)page;
-}
+       int copied;
 
-/*
- * This routine puts a long into any process space by following the page
- * tables. NOTE! You should check that the long isn't on a page boundary,
- * and that it is in the task area before calling this: this routine does
- * no checking.
- *
- * Now keeps R/W state of the page so that a text page stays readonly
- * even if a debugger scribbles breakpoints into it.  -M.U-
- */
-static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long addr,
-       unsigned long data)
-{
-       pgd_t *pgdir;
-       pmd_t *pgmiddle;
-       pte_t *pgtable;
-       unsigned long page;
-
-repeat:
-       pgdir = pgd_offset(vma->vm_mm, addr);
-       if (!pgd_present(*pgdir)) {
-               handle_mm_fault(tsk, vma, addr, 1);
-               goto repeat;
-       }
-       if (pgd_bad(*pgdir)) {
-               printk("ptrace: bad page directory %08lx\n", pgd_val(*pgdir));
-               pgd_clear(pgdir);
-               return;
-       }
-       pgmiddle = pmd_offset(pgdir, addr);
-       if (pmd_none(*pgmiddle)) {
-               handle_mm_fault(tsk, vma, addr, 1);
-               goto repeat;
-       }
-       if (pmd_bad(*pgmiddle)) {
-               printk("ptrace: bad page middle %08lx\n", pmd_val(*pgmiddle));
-               pmd_clear(pgmiddle);
-               return;
-       }
-       pgtable = pte_offset(pgmiddle, addr);
-       if (!pte_present(*pgtable)) {
-               handle_mm_fault(tsk, vma, addr, 1);
-               goto repeat;
-       }
-       page = pte_page(*pgtable);
-       if (!pte_write(*pgtable)) {
-               handle_mm_fault(tsk, vma, addr, 1);
-               goto repeat;
-       }
-       
-       if (MAP_NR(page) < max_mapnr) {
-               page += addr & ~PAGE_MASK;
-
-               flush_cache_range(vma->vm_mm, addr, addr + sizeof(unsigned long));
-
-               *(unsigned long *)page = data;
-
-               clean_cache_area(page, sizeof(unsigned long));
+       copied = access_process_vm(child, addr, res, sizeof(*res), 0);
 
-               set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
-               flush_tlb_page(vma, addr & PAGE_MASK);
-       }
+       return copied != sizeof(*res) ? -EIO : 0;
 }
 
-/*
- * This routine checks the page boundaries, and that the offset is
- * within the task area. It then calls get_long() to read a long.
- */
-static int read_long(struct task_struct * tsk, unsigned long addr,
-       unsigned long * result)
+static int
+write_long(struct task_struct *child, unsigned long addr, unsigned long val)
 {
-       struct vm_area_struct * vma = find_extend_vma(tsk, addr);
-
-       if (!vma)
-               return -EIO;
-       if ((addr & ~PAGE_MASK) > PAGE_SIZE-sizeof(long)) {
-               unsigned long low,high;
-               struct vm_area_struct * vma_high = vma;
-
-               if (addr + sizeof(long) >= vma->vm_end) {
-                       vma_high = vma->vm_next;
-                       if (!vma_high || vma_high->vm_start != vma->vm_end)
-                               return -EIO;
-               }
-               low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
-               high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
-               switch (addr & (sizeof(long)-1)) {
-                       case 1:
-                               low >>= 8;
-                               low |= high << 24;
-                               break;
-                       case 2:
-                               low >>= 16;
-                               low |= high << 16;
-                               break;
-                       case 3:
-                               low >>= 24;
-                               low |= high << 8;
-                               break;
-               }
-               *result = low;
-       } else
-               *result = get_long(tsk, vma, addr);
-       return 0;
-}
+       int copied;
 
-/*
- * This routine checks the page boundaries, and that the offset is
- * within the task area. It then calls put_long() to write a long.
- */
-static int write_long(struct task_struct * tsk, unsigned long addr,
-       unsigned long data)
-{
-       struct vm_area_struct * vma = find_extend_vma(tsk, addr);
-
-       if (!vma)
-               return -EIO;
-       if ((addr & ~PAGE_MASK) > PAGE_SIZE-sizeof(long)) {
-               unsigned long low,high;
-               struct vm_area_struct * vma_high = vma;
-
-               if (addr + sizeof(long) >= vma->vm_end) {
-                       vma_high = vma->vm_next;
-                       if (!vma_high || vma_high->vm_start != vma->vm_end)
-                               return -EIO;
-               }
-               low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
-               high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
-               switch (addr & (sizeof(long)-1)) {
-                       case 0: /* shouldn't happen, but safety first */
-                               low = data;
-                               break;
-                       case 1:
-                               low &= 0x000000ff;
-                               low |= data << 8;
-                               high &= ~0xff;
-                               high |= data >> 24;
-                               break;
-                       case 2:
-                               low &= 0x0000ffff;
-                               low |= data << 16;
-                               high &= ~0xffff;
-                               high |= data >> 16;
-                               break;
-                       case 3:
-                               low &= 0x00ffffff;
-                               low |= data << 24;
-                               high &= ~0xffffff;
-                               high |= data >> 8;
-                               break;
-               }
-               put_long(tsk, vma, addr & ~(sizeof(long)-1),low);
-               put_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1),high);
-       } else
-               put_long(tsk, vma, addr, data);
-       return 0;
+       copied = access_process_vm(child, addr, &val, sizeof(val), 1);
+
+       return copied != sizeof(val) ? -EIO : 0;
 }
 
 /*
@@ -350,19 +165,12 @@ printk ("=%08lX ", val);
        return val;
 }
 
-int ptrace_set_bpt (struct task_struct *child)
+static unsigned long
+get_branch_address(struct task_struct *child, unsigned long pc, unsigned long insn)
 {
-       unsigned long insn, pc, alt;
-       int i, nsaved = 0, res;
-
-       pc = pc_pointer (get_stack_long (child, 15/*REG_PC*/));
+       unsigned long alt = 0;
 
-       res = read_long (child, pc, &insn);
-       if (res < 0)
-               return res;
-
-       child->tss.debug[nsaved++] = alt = pc + 4;
-printk ("ptrace_set_bpt: insn=%08lX pc=%08lX ", insn, pc);
+printk(KERN_DEBUG "ptrace_set_bpt: insn=%08lX pc=%08lX ", insn, pc);
        switch (insn & 0x0e100000) {
        case 0x00000000:
        case 0x00100000:
@@ -423,7 +231,7 @@ printk ("ldr ");
                                        alt -= ptrace_getldrop2 (child, insn);
                        }
                        if (read_long (child, alt, &alt) < 0)
-                               alt = pc + 4; /* not valid */
+                               alt = 0; /* not valid */
                        else
                                alt = pc_pointer (alt);
                }
@@ -440,7 +248,7 @@ printk ("ldrimm ");
                                        alt -= insn & 0xfff;
                        }
                        if (read_long (child, alt, &alt) < 0)
-                               alt = pc + 4; /* not valid */
+                               alt = 0; /* not valid */
                        else
                                alt = pc_pointer (alt);
                }
@@ -473,7 +281,7 @@ printk ("ldm ");
                        base = ptrace_getrn (child, insn);
 
                        if (read_long (child, base + nr_regs, &alt) < 0)
-                               alt = pc + 4; /* not valid */
+                               alt = 0; /* not valid */
                        else
                                alt = pc_pointer (alt);
                        break;
@@ -499,22 +307,55 @@ printk ("b/bl ");
            break;
        }
 printk ("=%08lX\n", alt);
-       if (alt != pc + 4)
-               child->tss.debug[nsaved++] = alt;
 
-       for (i = 0; i < nsaved; i++) {
-               res = read_long (child, child->tss.debug[i], &insn);
-               if (res >= 0) {
-                       child->tss.debug[i + 2] = insn;
-                       res = write_long (child, child->tss.debug[i], BREAKINST);
+       return alt;
+}
+
+static int
+add_breakpoint(struct task_struct *child, struct debug_info *dbg, unsigned long addr)
+{
+       int nr = dbg->nsaved;
+       int res = -EINVAL;
+
+       if (nr < 2) {
+               res = read_long(child, addr, &dbg->bp[nr].insn);
+               if (res == 0)
+                       res = write_long(child, addr, BREAKINST);
+
+               if (res == 0) {
+                       dbg->bp[nr].address = addr;
+                       dbg->nsaved += 1;
                }
-               if (res < 0) {
-                       child->tss.debug[4] = 0;
-                       return res;
+       } else
+               printk(KERN_DEBUG "add_breakpoint: too many breakpoints\n");
+
+       return res;
+}
+
+int ptrace_set_bpt (struct task_struct *child)
+{
+       struct debug_info *dbg = &child->tss.debug;
+       unsigned long insn, pc, alt;
+       int res;
+
+       pc = pc_pointer (get_stack_long (child, 15/*REG_PC*/));
+
+       res = read_long(child, pc, &insn);
+       if (res >= 0) {
+               res = 0;
+
+               dbg->nsaved = 0;
+
+               res = add_breakpoint(child, dbg, pc + 4);
+
+               if (res == 0) {
+                       alt = get_branch_address(child, pc, insn);
+                       if (alt)
+                               res = add_breakpoint(child, dbg, alt);
                }
        }
-       child->tss.debug[4] = nsaved;
-       return 0;
+
+       return res;
 }
 
 /* Ensure no single-step breakpoint is pending.  Returns non-zero
@@ -522,16 +363,24 @@ printk ("=%08lX\n", alt);
  */
 int ptrace_cancel_bpt (struct task_struct *child)
 {
-       int i, nsaved = child->tss.debug[4];
+       struct debug_info *dbg = &child->tss.debug;
+       unsigned long tmp;
+       int i, nsaved = dbg->nsaved;
 
-       child->tss.debug[4] = 0;
+       dbg->nsaved = 0;
 
        if (nsaved > 2) {
                printk ("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved);
                nsaved = 2;
        }
-       for (i = 0; i < nsaved; i++)
-               write_long (child, child->tss.debug[i], child->tss.debug[i + 2]);
+
+       for (i = 0; i < nsaved; i++) {
+               read_long(child, dbg->bp[i].address, &tmp);
+               if (tmp != BREAKINST)
+                       printk(KERN_ERR "ptrace_cancel_bpt: weirdness\n");
+               write_long(child, dbg->bp[i].address, dbg->bp[i].insn);
+       }
+
        return nsaved != 0;
 }
 
@@ -598,8 +447,8 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
                        unsigned long tmp;
 
                        ret = read_long(child, addr, &tmp);
-                       if (ret >= 0)
-                               ret = put_user(tmp, (unsigned long *)data);
+                       if (ret)
+                               put_user(tmp, (unsigned long *) data);
                        goto out;
                }
 
@@ -619,7 +468,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
 
                case PTRACE_POKETEXT:                           /* write the word at location addr. */
                case PTRACE_POKEDATA:
-                       ret = write_long(child,addr,data);
+                       ret = write_long(child, addr, data);
                        goto out;
 
                case PTRACE_POKEUSR:                            /* write the word at location addr in the USER area */
@@ -665,7 +514,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
                        ret = -EIO;
                        if ((unsigned long) data > _NSIG)
                                goto out;
-                       child->tss.debug[4] = -1;
+                       child->tss.debug.nsaved = -1;
                        child->flags &= ~PF_TRACESYS;
                        wake_up_process(child);
                        child->exit_code = data;
index 0b0a70087ced05e079ae5fabc11cb3597fa50877..4cec8cd03215353cd66a27c4fbabcc5b6dc3bb99 100644 (file)
@@ -309,7 +309,8 @@ setup_arch(char **cmdline_p, unsigned long * memory_start_p, unsigned long * mem
        case MACH_TYPE_EBSA110:
                /* EBSA110 locks if we execute 'wait for interrupt' */
                disable_hlt();
-               params = NULL;
+               if (params && params->u1.s.page_size != 4096)
+                       params = NULL;
                break;
 
        case MACH_TYPE_EBSA285:
index 4e49885b866c7ede24b16f20cd4af06c44469236..18c0f557e05d02c87fc5e2f5c4a5693d417f542b 100644 (file)
@@ -76,6 +76,25 @@ unsigned long mktime(unsigned int year, unsigned int mon,
                  )*60 + sec; /* finally seconds */
 }
 
+/*
+ * Handle profile stuff...
+ */
+static void do_profile(unsigned long pc)
+{
+       if (prof_buffer && current->pid) {
+               extern int _stext;
+
+               pc -= (unsigned long)&_stext;
+
+               pc >>= prof_shift;
+
+               if (pc >= prof_len)
+                       pc = prof_len - 1;
+
+               prof_buffer[pc] += 1;
+       }
+}
+
 #include <asm/arch/time.h>
 
 static unsigned long do_gettimeoffset(void)
index 9267fec09214b6f10e0831f358b8c7540cd7c574..50c1a003c60432419e0a6cf2bce4ab99cb1485de 100644 (file)
@@ -387,3 +387,9 @@ asmlinkage void baddataabort(int code, unsigned long instr, struct pt_regs *regs
                code, regs->ARM_pc, instr, regs->ARM_lr, regs->ARM_sp);
 }
 #endif
+
+asmlinkage void __div0(void)
+{
+       printk("Awooga, division by zero in kernel.\n");
+       __backtrace();
+}
index 0b241d333c301a4f29c0c9cc3bae71a461f7fee5..93d858fe97060cdd66aee2572b0d547c299e4856 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 L_TARGET := lib.a
-L_OBJS   := backtrace.o bitops.o checksum.o delay.o io.o memcpy.o \
+L_OBJS   := backtrace.o bitops.o checksum.o delay.o memcpy.o \
            semaphore.o string.o system.o uaccess.o
 
 ifeq ($(PROCESSOR),armo)
@@ -24,6 +24,8 @@ endif
 
 ifeq ($(MACHINE),ebsa110)
   L_OBJS += io-ebsa110.o
+else
+  LX_OBJS += io.o
 endif
 
 ifeq ($(MACHINE),footbridge)
index c94a2ba075fbb0b853f569a61c95ab39a8b9bc1a..a7720eca115ac85ff5bc5ecf1daccd8c71625ccd 100644 (file)
@@ -1,3 +1,5 @@
+#include <linux/module.h>
+
 #include <asm/io.h>
 
 /*
@@ -40,3 +42,8 @@ void _memset_io(unsigned long dst, int c, unsigned long count)
                dst++;
        }
 }
+
+EXPORT_SYMBOL(_memcpy_fromio);
+EXPORT_SYMBOL(_memcpy_toio);
+EXPORT_SYMBOL(_memset_io);
+
index 8db4e79233495f1e0b880476c8b74815ae00468a..82d3094f565ed926fe2b8559ebbd774228ae74e7 100644 (file)
@@ -247,7 +247,7 @@ void free_initmem (void)
                          (unsigned long)(&__netwinder_end),
                          "netwinder");
 
-       if (!machine_is_ebsa285() && !machine_is_cats())
+       if (!machine_is_ebsa285() && !machine_is_cats() && !machine_is_co285())
                free_area((unsigned long)(&__ebsa285_begin),
                          (unsigned long)(&__ebsa285_end),
                          "ebsa285/cats");
index 3a5fc93a11598598a2bf341ad7f7fcbc9a14611b..8c04667fdfc9aa147ba3af6e3b556effcce8265e 100644 (file)
@@ -153,11 +153,9 @@ ENTRY(lcall7)
        ALIGN
        .globl  ret_from_fork
 ret_from_fork:
-#ifdef __SMP__
        pushl %ebx
        call SYMBOL_NAME(schedule_tail)
        addl $4, %esp
-#endif /* __SMP__ */
        GET_CURRENT(%ebx)
        jmp     ret_from_sys_call
 
index 537bcd196968b0e0a1a149a7cb86d59cb7e95091..364be7c16858bde9f882f9c085eb50aa606f95db 100644 (file)
@@ -31,6 +31,5 @@ union task_union init_task_union
  * section. Since TSS's are completely CPU-local, we want them
  * on exact cacheline boundaries, to eliminate cacheline ping-pong.
  */ 
-struct hard_thread_struct init_tss[NR_CPUS] __cacheline_aligned =
-                                       { [0 ... NR_CPUS-1] = INIT_TSS };
+struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };
 
index 9664ebfc1435690572549aa6c2961148fced3363..070667cbf4a8a9834cd7976605342269c30ee437 100644 (file)
@@ -54,8 +54,8 @@ static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_
  */
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
 {
-       struct soft_thread_struct * t = &current->thread;
-       struct hard_thread_struct * tss = init_tss + smp_processor_id();
+       struct thread_struct * t = &current->thread;
+       struct tss_struct * tss = init_tss + smp_processor_id();
 
        if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32))
                return -EINVAL;
index a47a0c2092b6b06f2e8fcd32a350f67091b1f570..e820b03537db880e1286a9b96ecd9c11d8050600 100644 (file)
@@ -332,7 +332,7 @@ __initfunc(void mca_init(void))
        restore_flags(flags);
 
        for (i = 0; i < MCA_STANDARD_RESOURCES; i++)
-               request_resource(&pci_io_resource, mca_standard_resources + i);
+               request_resource(&ioport_resource, mca_standard_resources + i);
 
 #ifdef CONFIG_PROC_FS
        mca_do_proc_init();
index 43df6f48e950ea3096ac0b489b424a642f681791..9e2d4432b5b15a4536e3fd8fa7cc216145308e3d 100644 (file)
@@ -512,7 +512,7 @@ void forget_segments(void)
        /*
         * Load the LDT entry of init_task.
         */
-       load_LDT(init_task.mm);
+       load_LDT(&init_mm);
 }
 
 /*
@@ -539,7 +539,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
                :"=&a" (retval), "=&S" (d0)
                :"0" (__NR_clone), "i" (__NR_exit),
                 "r" (arg), "r" (fn),
-                "b" (flags | CLONE_VM | CLONE_TLB)
+                "b" (flags | CLONE_VM)
                : "memory");
        return retval;
 }
@@ -566,13 +566,15 @@ void flush_thread(void)
 
 void release_thread(struct task_struct *dead_task)
 {
-       void * ldt = dead_task->mm->segments;
+       if (dead_task->mm) {
+               void * ldt = dead_task->mm->segments;
 
-       // temporary debugging check
-       if (ldt) {
-               printk("WARNING: dead process %8s still has LDT? <%p>\n",
-                               dead_task->comm, ldt);
-               BUG();
+               // temporary debugging check
+               if (ldt) {
+                       printk("WARNING: dead process %8s still has LDT? <%p>\n",
+                                       dead_task->comm, ldt);
+                       BUG();
+               }
        }
 }
 
@@ -735,9 +737,9 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
 extern int cpus_initialized;
 void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
 {
-       struct soft_thread_struct *prev = &prev_p->thread,
+       struct thread_struct *prev = &prev_p->thread,
                                 *next = &next_p->thread;
-       struct hard_thread_struct *tss = init_tss + smp_processor_id();
+       struct tss_struct *tss = init_tss + smp_processor_id();
 
        unlazy_fpu(prev_p);
 
@@ -753,8 +755,10 @@ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
        asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
        asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
 
-       /* Re-load LDT if necessary */
-       if (prev_p->mm->segments != next_p->mm->segments)
+       /*
+        * Re-load LDT if necessary
+        */
+       if (prev_p->active_mm->segments != next_p->active_mm->segments)
                load_LDT(next_p->mm);
 
        /* Re-load page tables */
index e45e87082eb7e739551fa887c70e36537fd25908..89f8a3fd8ae7ec665201d1bcb9e344b7735f9ac4 100644 (file)
@@ -390,7 +390,7 @@ __initfunc(void setup_arch(char **cmdline_p,
 
        /* request I/O space for devices used on all i[345]86 PCs */
        for (i = 0; i < STANDARD_RESOURCES; i++)
-               request_resource(&pci_io_resource, standard_resources+i);
+               request_resource(&ioport_resource, standard_resources+i);
        request_resource(keyboard_resources, &kbd_status_resource);
 
 #ifdef CONFIG_VT
@@ -1010,7 +1010,7 @@ unsigned long cpu_initialized = 0;
 void cpu_init (void)
 {
        int nr = smp_processor_id();
-       struct hard_thread_struct * t = &init_tss[nr];
+       struct tss_struct * t = &init_tss[nr];
 
        if (test_and_set_bit(nr,&cpu_initialized)) {
                printk("CPU#%d ALREADY INITIALIZED!!!!!!!!!\n", nr);
@@ -1033,12 +1033,13 @@ void cpu_init (void)
        /*
         * set up and load the per-CPU TSS and LDT
         */
+       mmget(&init_mm);
+       current->active_mm = &init_mm;
        t->esp0 = current->thread.esp0;
        set_tss_desc(nr,t);
        gdt_table[__TSS(nr)].b &= 0xfffffdff;
        load_TR(nr);
-
-       load_LDT(current->mm);
+       load_LDT(&init_mm);
 
        /*
         * Clear all 6 debug registers:
index d7eb49206b43559a28f7528e0fb21c5771b8adba..52449bcfdfc03dce38e28322d178b2f51cb0eaaa 100644 (file)
@@ -199,6 +199,9 @@ void die(const char * str, struct pt_regs * regs, long err)
        spin_lock_irq(&die_lock);
        printk("%s: %04lx\n", str, err & 0xffff);
        show_registers(regs);
+
+spin_lock_irq(&die_lock);
+
        spin_unlock_irq(&die_lock);
        do_exit(SIGSEGV);
 }
index d49eed6e83ac7bce7b751cecdd2dff3ee210b3aa..65dd7e9da921484ee0a9b0895607866cd103bfb8 100644 (file)
@@ -65,7 +65,7 @@
 asmlinkage struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs));
 struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
 {
-       struct hard_thread_struct *tss;
+       struct tss_struct *tss;
        struct pt_regs *ret;
        unsigned long tmp;
 
@@ -211,7 +211,7 @@ out:
 
 static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
 {
-       struct hard_thread_struct *tss;
+       struct tss_struct *tss;
 /*
  * make sure the vm86() system call doesn't try to do anything silly
  */
index 3fbf22a4bc7bcc62180791261a9484f4d251241c..2d1f349b3107d6292eef3c6a58cb4e8b349213a0 100644 (file)
@@ -109,7 +109,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_interrupt() || mm == &init_mm)
+       if (in_interrupt() || !mm)
                goto no_context;
 
        down(&mm->mmap_sem);
index e59b6d1c55ad72b1b703c5cede8aebb1696626e0..9758097e9b4ce7da3049c0e9d9c76bb4979e711f 100644 (file)
@@ -330,7 +330,6 @@ __initfunc(void test_wp_bit(void))
        printk("Checking if this processor honours the WP bit even in supervisor mode... ");
        pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_READONLY));
        local_flush_tlb();
-       current->mm->mmap->vm_start += PAGE_SIZE;
        __asm__ __volatile__(
                "jmp 1f; 1:\n"
                "movb %0,%1\n"
@@ -342,7 +341,6 @@ __initfunc(void test_wp_bit(void))
                :"memory");
        pg0[0] = old;
        local_flush_tlb();
-       current->mm->mmap->vm_start -= PAGE_SIZE;
        if (boot_cpu_data.wp_works_ok < 0) {
                boot_cpu_data.wp_works_ok = 0;
                printk("No.\n");
index 0983a1b6a935c8993718f5a80fccda08f7f92d5c..521e836e834099996fc62d0b082eb7372e185aba 100644 (file)
@@ -732,9 +732,9 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm,
                if(retval) {
                        set_fs(old_fs);
                        printk("Unable to load IRIX ELF interpreter\n");
-                       kfree(elf_phdata);
                        send_sig(SIGSEGV, current, 0);
-                       return 0;
+                       retval = 0;
+                       goto out_file;
                }
        }
 
index cae9bb8181c275c8f1f11e8e88c72a3e5bd91fba..f0af759a11bc8bd95284f965712dc989e775ebd8 100644 (file)
@@ -1,7 +1,7 @@
 #define BLOCKMOVE
 #define        Z_WAKE
 static char rcsid[] =
-"$Revision: 2.2.2.3 $$Date: 1999/06/28 11:13:29 $";
+"$Revision: 2.3.1.1 $$Date: 1999/07/15 16:45:53 $";
 
 /*
  *  linux/drivers/char/cyclades.c
@@ -31,6 +31,20 @@ static char rcsid[] =
  *   void cleanup_module(void);
  *
  * $Log: cyclades.c,v $
+ * Revision 2.3.1.1   1999/07/15 16:45:53 ivan
+ * Removed CY_PROC conditional compilation;
+ * Implemented SMP-awareness for the driver;
+ * Implemented a new ISA IRQ autoprobe that uses the irq_probe_[on|off] 
+ * functions;
+ * The driver now accepts memory addresses (maddr=0xMMMMM) and IRQs
+ * (irq=NN) as parameters (only for ISA boards);
+ * Fixed bug in set_line_char that would prevent the Cyclades-Z 
+ * ports from being configured at speeds above 115.2Kbps;
+ * Fixed bug in cy_set_termios that would prevent XON/XOFF flow control
+ * switching from working properly;
+ * The driver now only prints IRQ info for the Cyclades-Z if it's 
+ * configured to work in interrupt mode;
+ *
  * Revision 2.2.2.3   1999/06/28 11:13:29 ivan
  * Added support for interrupt mode operation for the Z cards;
  * Removed the driver inactivity control for the Z;
@@ -557,7 +571,6 @@ static char rcsid[] =
 #undef CY_16Y_HACK
 #undef CY_ENABLE_MONITORING
 #undef CY_PCI_DEBUG
-#undef CY_PROC
 
 #if 0
 #define PAUSE __asm__("nop");
@@ -613,6 +626,18 @@ static char rcsid[] =
 #include <asm/uaccess.h>
 #include <asm/bitops.h>
 
+#include <asm/spinlock.h>
+
+#define        CY_LOCK(info,flags)                                     \
+               do {                                            \
+               spin_lock_irqsave(&cy_card[info->card].card_lock, flags); \
+               } while (0)
+               
+#define        CY_UNLOCK(info,flags)                                   \
+               do {                                            \
+               spin_unlock_irqrestore(&cy_card[info->card].card_lock, flags); \
+               } while (0)
+
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -668,11 +693,6 @@ static struct tty_driver cy_serial_driver, cy_callout_driver;
 static int serial_refcount;
 
 #ifndef CONFIG_COBALT_27
-static volatile int cy_irq_triggered;
-static volatile int cy_triggered;
-static int cy_wild_int_mask;
-static volatile ucchar *intr_base_addr;
-
 /* This is the address lookup table. The driver will probe for
    Cyclom-Y/ISA boards at all addresses in here. If you want the
    driver to probe addresses at a different address, add it to
@@ -695,6 +715,14 @@ static unsigned char *cy_isa_addresses[] = {
 };
 #define NR_ISA_ADDRS (sizeof(cy_isa_addresses)/sizeof(unsigned char*))
 
+#ifdef MODULE
+static int maddr[NR_CARDS] = { 0, };
+static int irq[NR_CARDS]  = { 0, };
+
+MODULE_PARM(maddr, "1-" __MODULE_STRING(NR_CARDS) "l");
+MODULE_PARM(irq, "1-" __MODULE_STRING(NR_CARDS) "i");
+#endif
+
 #endif /* CONFIG_COBALT_27 */
 
 /* This is the per-card data structure containing address, irq, number of
@@ -818,7 +846,7 @@ static unsigned short       cy_pci_dev_id[] = {
 static void cy_start(struct tty_struct *);
 static void set_line_char(struct cyclades_port *);
 #ifndef CONFIG_COBALT_27
-static void cy_probe(int, void *, struct pt_regs *);
+static unsigned detect_isa_irq (volatile ucchar *);
 #endif /* CONFIG_COBALT_27 */
 #ifdef CYCLOM_SHOW_STATUS
 static void show_status(int);
@@ -963,226 +991,79 @@ do_softint(void *private_)
    command to the Cirrus chip to complete and then issues the
    new command.  An error is returned if the previous command
    didn't finish within the time limit.
+
+   This function is only called from inside spinlock-protected code.
  */
 static int
 cyy_issue_cmd(volatile ucchar *base_addr, u_char cmd, int index)
 {
-  unsigned long flags;
   volatile int  i;
 
-    save_flags(flags); cli();
-        /* Check to see that the previous command has completed */
-        for(i = 0 ; i < 100 ; i++){
-            if (cy_readb(base_addr+(CyCCR<<index)) == 0){
-                break;
-            }
-            udelay(10L);
-        }
-        /* if the CCR never cleared, the previous command
-            didn't finish within the "reasonable time" */
-        if ( i == 100 ) {
-            restore_flags(flags);
-            return (-1);
-        }
+    /* Check to see that the previous command has completed */
+    for(i = 0 ; i < 100 ; i++){
+       if (cy_readb(base_addr+(CyCCR<<index)) == 0){
+           break;
+       }
+       udelay(10L);
+    }
+    /* if the CCR never cleared, the previous command
+       didn't finish within the "reasonable time" */
+    if (i == 100)      return (-1);
+
+    /* Issue the new command */
+    cy_writeb((u_long)base_addr+(CyCCR<<index), cmd);
 
-        /* Issue the new command */
-        cy_writeb((u_long)base_addr+(CyCCR<<index), cmd);
-    restore_flags(flags);
     return(0);
 } /* cyy_issue_cmd */
 
 #ifndef CONFIG_COBALT_27       /* ISA interrupt detection code */
-
-static int probe_ready;
-
-/*
- * Grab all interrupts in preparation for doing an automatic irq
- * detection.  dontgrab is a mask of irq's _not_ to grab.  Returns a
- * mask of irq's which were grabbed and should therefore be freed
- * using free_all_interrupts().
- */
-static int
-grab_all_interrupts(int dontgrab)
+static unsigned detect_isa_irq (volatile ucchar *address)
 {
-  int irq_lines = 0;
-  int i, mask;
-    
-    for (i = 0, mask = 1; i < 16; i++, mask <<= 1) {
-        if (!(mask & dontgrab)
-        && !request_irq(i, cy_probe,
-                    SA_INTERRUPT, "serial probe", NULL)) {
-            irq_lines |= mask;
-        }
-    }
-    return irq_lines;
-} /* grab_all_interrupts */
+  int irq;
+  unsigned long irqs, flags;
+  int save_xir, save_car;
+  int index = 0; /* IRQ probing is only for ISA */
 
-/*
- * Release all interrupts grabbed by grab_all_interrupts
- */
-static void
-free_all_interrupts(int irq_lines)
-{
-  int i;
-    
-    for (i = 0; i < 16; i++) {
-        if (irq_lines & (1 << i)) {
-            free_irq(i,NULL);
-       }
-    }
-} /* free_all_interrupts */
+    /* forget possible initially masked and pending IRQ */
+    irq = probe_irq_off(probe_irq_on());
 
-/*
- * This routine returns a bitfield of "wild interrupts".  Basically,
- * any unclaimed interrupts which is flapping around.
- */
-static int
-check_wild_interrupts(void)
-{
-  int   i, mask;
-  int   wild_interrupts = 0;
-  int   irq_lines;
-  unsigned long timeout;
-  unsigned long flags;
-        
-    /*Turn on interrupts (they may be off) */
-    save_flags(flags); sti();
+    /* Clear interrupts on the board first */
+    cy_writeb((u_long)address + (Cy_ClrIntr<<index), 0);
+                             /* Cy_ClrIntr is 0x1800 */
 
-        irq_lines = grab_all_interrupts(0);
-       
-        /*
-         * Delay for 0.1 seconds -- we use a busy loop since this may 
-         * occur during the bootup sequence
-         */
-        timeout = jiffies+(HZ/10);
-        while (time_after_eq(timeout, jiffies))
-            ;
-        
-        cy_triggered = 0;       /* Reset after letting things settle */
+    irqs = probe_irq_on();
+    /* Wait ... */
+    udelay(5000L);
 
-        timeout = jiffies+(HZ/10);
-        while (time_after_eq(timeout, jiffies))
-                ;
-        
-        for (i = 0, mask = 1; i < 16; i++, mask <<= 1) {
-            if ((cy_triggered & (1 << i)) &&
-                (irq_lines & (1 << i))) {
-                    wild_interrupts |= mask;
-            }
-        }
-        free_all_interrupts(irq_lines);
-    restore_flags(flags);
-    return wild_interrupts;
-} /* check_wild_interrupts */
-
-/*
- * This routine is called by do_auto_irq(); it attempts to determine
- * which interrupt a serial port is configured to use.  It is not
- * fool-proof, but it works a large part of the time.
- */
-static int
-get_auto_irq(volatile ucchar *address)
-{
-  unsigned long        timeout;
-  volatile ucchar      *base_addr;
-  int                  index;
-  unsigned long                flags;
-
-    index = 0;  /* IRQ probing is only for ISA */
-    base_addr = address;
-    intr_base_addr = address;
-        
-    /*
-     * Enable interrupts and see who answers
-     */
-    cy_irq_triggered = 0;
+    /* Enable the Tx interrupts on the CD1400 */
     save_flags(flags); cli();
-        cy_writeb((u_long)base_addr+(CyCAR<<index), 0);
-        cyy_issue_cmd(base_addr,CyCHAN_CTL|CyENB_XMTR,index);
-        cy_writeb((u_long)base_addr+(CySRER<<index), 
-             cy_readb(base_addr+(CySRER<<index)) | CyTxMpty);
-        probe_ready = 1;
-    restore_flags(flags);
-    
-    timeout = jiffies+(HZ/50);
-    while (time_after_eq(timeout, jiffies)) {
-        if (cy_irq_triggered)
-            break;
-    }
-    probe_ready = 0;
-    return(cy_irq_triggered);
-} /* get_auto_irq */
+       cy_writeb((u_long)address + (CyCAR<<index), 0);
+       cyy_issue_cmd(address, CyCHAN_CTL|CyENB_XMTR, index);
 
-/*
- * Calls get_auto_irq() multiple times, to make sure we don't get
- * faked out by random interrupts
- */
-static int
-do_auto_irq(volatile ucchar *address)
-{
-  int                   irq_lines = 0;
-  int                   irq_try_1 = 0, irq_try_2 = 0;
-  int                   retries;
-  unsigned long                flags;
-
-    /* Turn on interrupts (they may be off) */
-    save_flags(flags); sti();
-
-        probe_ready = 0;
-
-        cy_wild_int_mask = check_wild_interrupts();
-
-        irq_lines = grab_all_interrupts(cy_wild_int_mask);
-        
-        for (retries = 0; retries < 5; retries++) {
-            if (!irq_try_1)
-                irq_try_1 = get_auto_irq(address);
-            if (!irq_try_2)
-                irq_try_2 = get_auto_irq(address);
-            if (irq_try_1 && irq_try_2) {
-                if (irq_try_1 == irq_try_2)
-                    break;
-                irq_try_1 = irq_try_2 = 0;
-            }
-        }
+       cy_writeb((u_long)address + (CyCAR<<index), 0);
+       cy_writeb((u_long)address + (CySRER<<index), 
+               cy_readb(address + (CySRER<<index)) | CyTxMpty);
     restore_flags(flags);
-    free_all_interrupts(irq_lines);
-    return (irq_try_1 == irq_try_2) ? irq_try_1 : 0;
-} /* do_auto_irq */
 
+    /* Wait ... */
+    udelay(5000L);
 
-/*
- * This interrupt routine is used
- * while we are probing for submarines.
- */
-static void
-cy_probe(int irq, void *dev_id, struct pt_regs *regs)
-{
-  int save_xir, save_car;
-  int index = 0;        /* probing interrupts is only for ISA */
-
-    if (!probe_ready) {
-        cy_writeb((u_long)intr_base_addr+(Cy_ClrIntr<<index), 0);
-        return;
-    }
+    /* Check which interrupt is in use */
+    irq = probe_irq_off(irqs);
 
-    cy_irq_triggered = irq;
-    cy_triggered |= 1 << irq;
-
-        if(cy_readb(intr_base_addr+(CySVRR<<index)) != 0) {
-            save_xir = (u_char) cy_readb(intr_base_addr+(CyTIR<<index));
-            save_car = cy_readb(intr_base_addr+(CyCAR<<index));
-            cy_writeb((u_long)intr_base_addr+(CyCAR<<index), (save_xir & 0x3));
-            cy_writeb((u_long)intr_base_addr+(CySRER<<index),
-                cy_readb(intr_base_addr+(CySRER<<index)) & ~CyTxMpty);
-            cy_writeb((u_long)intr_base_addr+(CyTIR<<index), (save_xir & 0x3f));
-            cy_writeb((u_long)intr_base_addr+(CyCAR<<index), (save_car));
-        }
-        cy_writeb((u_long)intr_base_addr+(Cy_ClrIntr<<index), 0);
-                                 /* Cy_ClrIntr is 0x1800 */
-    return;
-} /* cy_probe */
+    /* Clean up */
+    save_xir = (u_char) cy_readb(address + (CyTIR<<index));
+    save_car = cy_readb(address + (CyCAR<<index));
+    cy_writeb((u_long)address + (CyCAR<<index), (save_xir & 0x3));
+    cy_writeb((u_long)address + (CySRER<<index),
+       cy_readb(address + (CySRER<<index)) & ~CyTxMpty);
+    cy_writeb((u_long)address + (CyTIR<<index), (save_xir & 0x3f));
+    cy_writeb((u_long)address + (CyCAR<<index), (save_car));
+    cy_writeb((u_long)address + (Cy_ClrIntr<<index), 0);
+                             /* Cy_ClrIntr is 0x1800 */
 
+    return (irq > 0)? irq : 0;
+}
 #endif /* CONFIG_COBALT_27 */
 
 /* The real interrupt service routine is called
@@ -1245,6 +1126,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                    printk("cyy_interrupt: rcvd intr, chip %d\n\r", chip);
 #endif
                     /* determine the channel & change to that context */
+                   spin_lock(&cinfo->card_lock);
                     save_xir = (u_char) cy_readb(base_addr+(CyRIR<<index));
                     channel = (u_short ) (save_xir & CyIRChannel);
                     i = channel + chip * 4 + cinfo->first_line;
@@ -1252,6 +1134,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                     info->last_active = jiffies;
                     save_car = cy_readb(base_addr+(CyCAR<<index));
                     cy_writeb((u_long)base_addr+(CyCAR<<index), save_xir);
+                   spin_unlock(&cinfo->card_lock);
 
                     /* if there is nowhere to put the data, discard it */
                     if(info->tty == 0){
@@ -1359,8 +1242,10 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                         queue_task(&tty->flip.tqueue, &tq_timer);
                     }
                     /* end of service */
+                   spin_lock(&cinfo->card_lock);
                     cy_writeb((u_long)base_addr+(CyRIR<<index), (save_xir & 0x3f));
                     cy_writeb((u_long)base_addr+(CyCAR<<index), (save_car));
+                   spin_unlock(&cinfo->card_lock);
                 }
 
 
@@ -1373,23 +1258,29 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 #endif
 
                     /* determine the channel & change to that context */
+                   spin_lock(&cinfo->card_lock);
                     save_xir = (u_char) cy_readb(base_addr+(CyTIR<<index));
                     channel = (u_short ) (save_xir & CyIRChannel);
                     i = channel + chip * 4 + cinfo->first_line;
                     save_car = cy_readb(base_addr+(CyCAR<<index));
                     cy_writeb((u_long)base_addr+(CyCAR<<index), save_xir);
+                   spin_unlock(&cinfo->card_lock);
 
                     /* validate the port# (as configured and open) */
                     if( (i < 0) || (NR_PORTS <= i) ){
+                       spin_lock(&cinfo->card_lock);
                         cy_writeb((u_long)base_addr+(CySRER<<index),
                              cy_readb(base_addr+(CySRER<<index)) & ~CyTxMpty);
+                       spin_unlock(&cinfo->card_lock);
                         goto txend;
                     }
                     info = &cy_port[i];
                     info->last_active = jiffies;
                     if(info->tty == 0){
+                       spin_lock(&cinfo->card_lock);
                         cy_writeb((u_long)base_addr+(CySRER<<index),
                              cy_readb(base_addr+(CySRER<<index)) & ~CyTxMpty);
+                       spin_unlock(&cinfo->card_lock);
                         goto txdone;
                     }
 
@@ -1421,21 +1312,27 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
                     while (char_count-- > 0){
                        if (!info->xmit_cnt){
+                           spin_lock(&cinfo->card_lock);
                             cy_writeb((u_long)base_addr+(CySRER<<index),
                                cy_readb(base_addr+(CySRER<<index)) & 
                                        ~CyTxMpty);
+                           spin_unlock(&cinfo->card_lock);
                            goto txdone;
                        }
                        if (info->xmit_buf == 0){
+                           spin_lock(&cinfo->card_lock);
                             cy_writeb((u_long)base_addr+(CySRER<<index),
                                cy_readb(base_addr+(CySRER<<index)) & 
                                        ~CyTxMpty);
+                           spin_unlock(&cinfo->card_lock);
                             goto txdone;
                        }
                        if (info->tty->stopped || info->tty->hw_stopped){
+                           spin_lock(&cinfo->card_lock);
                             cy_writeb((u_long)base_addr+(CySRER<<index),
                                cy_readb(base_addr+(CySRER<<index)) & 
                                        ~CyTxMpty);
+                           spin_unlock(&cinfo->card_lock);
                             goto txdone;
                        }
                         /* Because the Embedded Transmit Commands have
@@ -1475,14 +1372,17 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                     }
         txend:
                     /* end of service */
+                   spin_lock(&cinfo->card_lock);
                     cy_writeb((u_long)base_addr+(CyTIR<<index), 
                              (save_xir & 0x3f));
                     cy_writeb((u_long)base_addr+(CyCAR<<index), (save_car));
+                   spin_unlock(&cinfo->card_lock);
                 }
 
                 if (status & CySRModem) {        /* modem interrupt */
 
                     /* determine the channel & change to that context */
+                   spin_lock(&cinfo->card_lock);
                     save_xir = (u_char) cy_readb(base_addr+(CyMIR<<index));
                     channel = (u_short ) (save_xir & CyIRChannel);
                     info = &cy_port[channel + chip * 4
@@ -1493,6 +1393,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
                     mdm_change = cy_readb(base_addr+(CyMISR<<index));
                     mdm_status = cy_readb(base_addr+(CyMSVR1<<index));
+                   spin_unlock(&cinfo->card_lock);
 
                     if(info->tty == 0){/* no place for data, ignore it*/
                         ;
@@ -1517,9 +1418,11 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                     /* cy_start isn't used
                                         because... !!! */
                                     info->tty->hw_stopped = 0;
+                                 spin_lock(&cinfo->card_lock);
                                   cy_writeb((u_long)base_addr+(CySRER<<index),
                                        cy_readb(base_addr+(CySRER<<index)) | 
                                        CyTxMpty);
+                                 spin_unlock(&cinfo->card_lock);
                                     cy_sched_event(info,
                                        Cy_EVENT_WRITE_WAKEUP);
                                 }
@@ -1528,9 +1431,11 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                     /* cy_stop isn't used
                                         because ... !!! */
                                     info->tty->hw_stopped = 1;
+                                 spin_lock(&cinfo->card_lock);
                                   cy_writeb((u_long)base_addr+(CySRER<<index),
                                        cy_readb(base_addr+(CySRER<<index)) & 
                                        ~CyTxMpty);
+                                 spin_unlock(&cinfo->card_lock);
                                 }
                             }
                         }
@@ -1540,17 +1445,21 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                         }
                     }
                     /* end of service */
+                   spin_lock(&cinfo->card_lock);
                     cy_writeb((u_long)base_addr+(CyMIR<<index), 
                              (save_xir & 0x3f));
                     cy_writeb((u_long)base_addr+(CyCAR<<index), save_car);
+                   spin_unlock(&cinfo->card_lock);
                 }
             }          /* end while status != 0 */
         }            /* end loop for chips... */
     } while(had_work);
 
    /* clear interrupts */
+   spin_lock(&cinfo->card_lock);
    cy_writeb((u_long)card_base_addr + (Cy_ClrIntr<<index), 0);
                                 /* Cy_ClrIntr is 0x1800 */
+   spin_unlock(&cinfo->card_lock);
 } /* cyy_interrupt */
 
 /***********************************************************/
@@ -1624,31 +1533,6 @@ cyz_issue_cmd( struct cyclades_card *cinfo,
     return(0);
 } /* cyz_issue_cmd */
 
-
-#if 0
-static int
-cyz_update_channel( struct cyclades_card *cinfo,
-           u_long channel, u_char mode, u_char cmd)
-{ 
-  struct FIRM_ID *firm_id =
-      (struct FIRM_ID *)(cinfo->base_addr + ID_ADDRESS);
-  struct ZFW_CTRL *zfw_ctrl;
-  struct CH_CTRL *ch_ctrl;
-
-    if (!ISZLOADED(*cinfo)){
-       return (-1);
-    }
-    zfw_ctrl = (struct ZFW_CTRL *)
-              (cinfo->base_addr + cy_readl(&firm_id->zfwctrl_addr));
-    ch_ctrl = zfw_ctrl->ch_ctrl;
-
-    cy_writel(&ch_ctrl[channel].op_mode, (uclong)mode);
-
-    return cyz_issue_cmd(cinfo, channel, cmd, 0L);
-
-} /* cyz_update_channel */
-#endif
-
 #ifdef CONFIG_CYZ_INTR
 static void
 cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs)
@@ -2225,11 +2109,14 @@ startup(struct cyclades_port * info)
   int card,chip,channel,index;
   unsigned long page;
 
+    card = info->card;
+    channel = (info->line) - (cy_card[card].first_line);
+
     page = get_free_page(GFP_KERNEL);
     if (!page)
        return -ENOMEM;
 
-    save_flags(flags); cli();
+    CY_LOCK(info, flags);
 
     if (info->flags & ASYNC_INITIALIZED){
        free_page(page);
@@ -2249,10 +2136,10 @@ startup(struct cyclades_port * info)
     else
        info->xmit_buf = (unsigned char *) page;
 
+    CY_UNLOCK(info, flags);
+
     set_line_char(info);
 
-    card = info->card;
-    channel = (info->line) - (cy_card[card].first_line);
     if (!IS_CYC_Z(cy_card[card])) {
        chip = channel>>2;
        channel &= 0x03;
@@ -2265,6 +2152,8 @@ startup(struct cyclades_port * info)
             card, chip, channel, (long)base_addr);/**/
 #endif
 
+       CY_LOCK(info, flags);
+
        cy_writeb((ulong)base_addr+(CyCAR<<index), (u_char)channel);
 
        cy_writeb((ulong)base_addr+(CyRTPR<<index), (info->default_timeout
@@ -2297,7 +2186,7 @@ startup(struct cyclades_port * info)
        info->idle_stats.recv_idle =
        info->idle_stats.xmit_idle = jiffies;
 
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
 
     } else {
       struct FIRM_ID *firm_id;
@@ -2306,8 +2195,6 @@ startup(struct cyclades_port * info)
       struct CH_CTRL *ch_ctrl;
       int retval;
 
-       restore_flags(flags);
-
        base_addr = (unsigned char*) (cy_card[card].base_addr);
 
         firm_id = (struct FIRM_ID *) (base_addr + ID_ADDRESS);
@@ -2326,6 +2213,8 @@ startup(struct cyclades_port * info)
             card, channel, (long)base_addr);/**/
 #endif
 
+       CY_LOCK(info, flags);
+
        cy_writel(&ch_ctrl[channel].op_mode, C_CH_ENABLE);
 #ifdef Z_WAKE
 #ifdef CONFIG_CYZ_INTR
@@ -2380,6 +2269,8 @@ startup(struct cyclades_port * info)
        info->idle_stats.in_use    =
        info->idle_stats.recv_idle =
        info->idle_stats.xmit_idle = jiffies;
+
+       CY_UNLOCK(info, flags);
     }
 
 #ifdef CY_DEBUG_OPEN
@@ -2388,7 +2279,7 @@ startup(struct cyclades_port * info)
        return 0;
 
 errout:
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
        return retval;
 } /* startup */
 
@@ -2410,21 +2301,21 @@ start_xmit( struct cyclades_port *info )
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
            cy_writeb((u_long)base_addr+(CyCAR<<index), channel);
            cy_writeb((u_long)base_addr+(CySRER<<index), 
                cy_readb(base_addr+(CySRER<<index)) | CyTxMpty);
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
     } else {
 #ifdef CONFIG_CYZ_INTR
       int retval;
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
            retval = cyz_issue_cmd(&cy_card[card], channel, C_CM_INTBACK, 0L);
            if (retval != 0){
                printk("cyc:start_xmit retval was %x\n", retval);
            }
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
 #else /* CONFIG_CYZ_INTR */
        /* Don't have to do anything at this time */
 #endif /* CONFIG_CYZ_INTR */
@@ -2461,7 +2352,7 @@ shutdown(struct cyclades_port * info)
                card, chip, channel, (long)base_addr);
 #endif
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
 
            if (info->xmit_buf){
                unsigned char * temp;
@@ -2488,7 +2379,7 @@ shutdown(struct cyclades_port * info)
                set_bit(TTY_IO_ERROR, &info->tty->flags);
            }
            info->flags &= ~ASYNC_INITIALIZED;
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
     } else {
       struct FIRM_ID *firm_id;
       struct ZFW_CTRL *zfw_ctrl;
@@ -2513,7 +2404,7 @@ shutdown(struct cyclades_port * info)
        board_ctrl = &(zfw_ctrl->board_ctrl);
        ch_ctrl = zfw_ctrl->ch_ctrl;
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
 
            if (info->xmit_buf){
                unsigned char * temp;
@@ -2541,7 +2432,7 @@ shutdown(struct cyclades_port * info)
            }
            info->flags &= ~ASYNC_INITIALIZED;
 
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
     }
 
 #ifdef CY_DEBUG_OPEN
@@ -2568,6 +2459,9 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
   int retval;
   char *base_addr;
 
+    cinfo = &cy_card[info->card];
+    channel = info->line - cinfo->first_line;
+
     /*
      * If the device is in the middle of being closed, then block
      * until it's done, and then try again.
@@ -2627,18 +2521,16 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
     printk("cyc block_til_ready before block: ttyC%d, count = %d\n",
            info->line, info->count);/**/
 #endif
-    save_flags(flags); cli();
+    CY_LOCK(info, flags);
     if (!tty_hung_up_p(filp))
        info->count--;
-    restore_flags(flags);
+    CY_UNLOCK(info, flags);
 #ifdef CY_DEBUG_COUNT
     printk("cyc block_til_ready: (%d): decrementing count to %d\n",
         current->pid, info->count);
 #endif
     info->blocked_open++;
 
-    cinfo = &cy_card[info->card];
-    channel = info->line - cinfo->first_line;
     if (!IS_CYC_Z(*cinfo)) {
        chip = channel>>2;
        channel &= 0x03;
@@ -2647,7 +2539,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
                            + (cy_chip_offset[chip]<<index));
 
        while (1) {
-           save_flags(flags); cli();
+           CY_LOCK(info, flags);
                if (!(info->flags & ASYNC_CALLOUT_ACTIVE) &&
                    (tty->termios->c_cflag & CBAUD)){
                    cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
@@ -2660,7 +2552,8 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
                         cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
                }
-           restore_flags(flags);
+           CY_UNLOCK(info, flags);
+
            current->state = TASK_INTERRUPTIBLE;
            if (tty_hung_up_p(filp)
            || !(info->flags & ASYNC_INITIALIZED) ){
@@ -2668,16 +2561,18 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
                    -EAGAIN : -ERESTARTSYS);
                break;
            }
-           save_flags(flags); cli();
+
+           CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                if (!(info->flags & ASYNC_CALLOUT_ACTIVE)
                && !(info->flags & ASYNC_CLOSING)
                && (C_CLOCAL(tty)
                    || (cy_readb(base_addr+(CyMSVR1<<index)) & CyDCD))) {
-                       restore_flags(flags);
+                       CY_UNLOCK(info, flags);
                        break;
                }
-           restore_flags(flags);
+           CY_UNLOCK(info, flags);
+
            if (signal_pending(current)) {
                retval = -ERESTARTSYS;
                break;
@@ -2956,6 +2851,7 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
            printk("Not clean (jiff=%lu)...", jiffies);
 #endif
            current->state = TASK_INTERRUPTIBLE;
+           current->counter = 0;       /* make us low-priority */
            schedule_timeout(char_time);
            if (signal_pending(current))
                break;
@@ -2968,6 +2864,7 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
     }
     /* Run one more char cycle */
     current->state = TASK_INTERRUPTIBLE;
+    current->counter = 0;      /* make us low-priority */
     schedule_timeout(char_time * 5);
     current->state = TASK_RUNNING;
 #ifdef CY_DEBUG_WAIT_UNTIL_SENT
@@ -2992,12 +2889,11 @@ cy_close(struct tty_struct * tty, struct file * filp)
         return;
     }
 
-    save_flags(flags); cli();
-
+    CY_LOCK(info, flags);
     /* If the TTY is being hung up, nothing to do */
     if (tty_hung_up_p(filp)) {
        MOD_DEC_USE_COUNT;
-        restore_flags(flags);
+       CY_UNLOCK(info, flags);
         return;
     }
         
@@ -3028,7 +2924,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
     }
     if (info->count) {
        MOD_DEC_USE_COUNT;
-        restore_flags(flags);
+       CY_UNLOCK(info, flags);
         return;
     }
     info->flags |= ASYNC_CLOSING;
@@ -3046,9 +2942,11 @@ cy_close(struct tty_struct * tty, struct file * filp)
     * the line discipline to only process XON/XOFF characters.
     */
     tty->closing = 1;
+    CY_UNLOCK(info, flags);
     if (info->closing_wait != CY_CLOSING_WAIT_NONE) {
        tty_wait_until_sent(tty, info->closing_wait);
     }
+    CY_LOCK(info, flags);
 
     if (!IS_CYC_Z(cy_card[info->card])) {
        int channel = info->line - cy_card[info->card].first_line;
@@ -3064,7 +2962,9 @@ cy_close(struct tty_struct * tty, struct file * filp)
        if (info->flags & ASYNC_INITIALIZED) {
            /* Waiting for on-board buffers to be empty before closing 
               the port */
+           CY_UNLOCK(info, flags);
            cy_wait_until_sent(tty, info->timeout);
+           CY_LOCK(info, flags);
        }
     } else {
 #ifdef Z_WAKE
@@ -3084,16 +2984,21 @@ cy_close(struct tty_struct * tty, struct file * filp)
            if (retval != 0){
                printk("cyc:shutdown retval (1) was %x\n", retval);
            }
+           CY_UNLOCK(info, flags);
            interruptible_sleep_on(&info->shutdown_wait);
+           CY_LOCK(info, flags);
        }
 #endif
     }
 
+    CY_UNLOCK(info, flags);
     shutdown(info);
     if (tty->driver.flush_buffer)
         tty->driver.flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
         tty->ldisc.flush_buffer(tty);
+    CY_LOCK(info, flags);
+
     tty->closing = 0;
     info->event = 0;
     info->tty = 0;
@@ -3113,7 +3018,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
 #endif
 
     MOD_DEC_USE_COUNT;
-    restore_flags(flags);
+    CY_UNLOCK(info, flags);
     return;
 } /* cy_close */
 
@@ -3151,8 +3056,7 @@ cy_write(struct tty_struct * tty, int from_user,
         return 0;
     }
 
-    save_flags(flags);               
-
+    CY_LOCK(info, flags);
     if (from_user) {
        down(&tmp_buf_sem);
        while (1) {
@@ -3168,13 +3072,11 @@ cy_write(struct tty_struct * tty, int from_user,
                }
                break;
            }
-           cli();               
            c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
                        SERIAL_XMIT_SIZE - info->xmit_head));
            memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
            info->xmit_head = ((info->xmit_head + c) & (SERIAL_XMIT_SIZE-1));
            info->xmit_cnt += c;
-           restore_flags(flags);
            buf += c;
            count -= c;
            ret += c;
@@ -3182,22 +3084,20 @@ cy_write(struct tty_struct * tty, int from_user,
        up(&tmp_buf_sem);
     } else {
        while (1) {
-           cli();
            c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, 
                        SERIAL_XMIT_SIZE - info->xmit_head));
            if (c <= 0) {
-               restore_flags(flags);
                break;
            }
            memcpy(info->xmit_buf + info->xmit_head, buf, c);
            info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
            info->xmit_cnt += c;
-           restore_flags(flags);
            buf += c;
            count -= c;
            ret += c;
        }
     }
+    CY_UNLOCK(info, flags);
 
     info->idle_stats.xmit_bytes += ret;
     info->idle_stats.xmit_idle   = jiffies;
@@ -3232,9 +3132,9 @@ cy_put_char(struct tty_struct *tty, unsigned char ch)
     if (!tty || !info->xmit_buf)
         return;
 
-    save_flags(flags); cli();
+    CY_LOCK(info, flags);
         if (info->xmit_cnt >= SERIAL_XMIT_SIZE - 1) {
-            restore_flags(flags);
+           CY_UNLOCK(info, flags);
             return;
         }
 
@@ -3243,7 +3143,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch)
         info->xmit_cnt++;
        info->idle_stats.xmit_bytes++;
        info->idle_stats.xmit_idle = jiffies;
-    restore_flags(flags);
+    CY_UNLOCK(info, flags);
 } /* cy_put_char */
 
 
@@ -3255,9 +3155,6 @@ static void
 cy_flush_chars(struct tty_struct *tty)
 {
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-  unsigned char *base_addr;
-  int card,chip,channel,index;
                                 
 #ifdef CY_DEBUG_IO
     printk("cyc:cy_flush_chars ttyC%d\n", info->line); /* */
@@ -3270,25 +3167,7 @@ cy_flush_chars(struct tty_struct *tty)
     || tty->hw_stopped || !info->xmit_buf)
         return;
 
-    card = info->card;
-    channel = info->line - cy_card[card].first_line;
-    if (!IS_CYC_Z(cy_card[card])) {
-       chip = channel>>2;
-       channel &= 0x03;
-       index = cy_card[card].bus_index;
-       base_addr = (unsigned char*)
-                      (cy_card[card].base_addr
-                      + (cy_chip_offset[chip]<<index));
-
-       save_flags(flags); cli();
-           cy_writeb((u_long)base_addr+(CyCAR<<index), channel);
-           cy_writeb((u_long)base_addr+(CySRER<<index),
-               cy_readb(base_addr+(CySRER<<index)) | CyTxMpty);
-       restore_flags(flags);
-    } else {
-       /* Since polling is already in place,
-           nothing further need be done.  */
-    }
+    start_xmit(info);
 } /* cy_flush_chars */
 
 
@@ -3509,7 +3388,7 @@ set_line_char(struct cyclades_port * info)
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
            cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
 
           /* tx and rx baud rate */
@@ -3599,8 +3478,8 @@ set_line_char(struct cyclades_port * info)
            if (info->tty){
                clear_bit(TTY_IO_ERROR, &info->tty->flags);
            }
+       CY_UNLOCK(info, flags);
 
-       restore_flags(flags);
     } else {
       struct FIRM_ID *firm_id;
       struct ZFW_CTRL *zfw_ctrl;
@@ -3623,8 +3502,8 @@ set_line_char(struct cyclades_port * info)
 
        /* baud rate */
        baud = tty_get_baud_rate(info->tty);
-       if (baud > CD1400_MAX_SPEED) {
-           baud = CD1400_MAX_SPEED;
+       if (baud > CYZ_MAX_SPEED) {
+           baud = CYZ_MAX_SPEED;
        }
        cy_writel(&ch_ctrl->comm_baud , baud);
 
@@ -3829,12 +3708,11 @@ get_modem_info(struct cyclades_port * info, unsigned int *value)
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
            cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
            status = cy_readb(base_addr+(CyMSVR1<<index));
            status |= cy_readb(base_addr+(CyMSVR2<<index));
-       restore_flags(flags);
-
+       CY_UNLOCK(info, flags);
 
         if (info->rtsdtr_inv) {
            result =  ((status  & CyRTS) ? TIOCM_DTR : 0)
@@ -3905,17 +3783,17 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
        switch (cmd) {
        case TIOCMBIS:
            if (arg & TIOCM_RTS){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                    cy_writeb((u_long)base_addr+(CyMSVR2<<index), CyDTR);
                 } else {
                    cy_writeb((u_long)base_addr+(CyMSVR1<<index), CyRTS);
                 }
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            if (arg & TIOCM_DTR){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                    cy_writeb((u_long)base_addr+(CyMSVR1<<index), CyRTS);
@@ -3928,12 +3806,12 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
                    cy_readb(base_addr+(CyMSVR1<<index)), 
                     cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            break;
        case TIOCMBIC:
            if (arg & TIOCM_RTS){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), 
                           (u_char)channel);
                 if (info->rtsdtr_inv) {
@@ -3941,10 +3819,10 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
                 } else {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), ~CyRTS);
                 }
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            if (arg & TIOCM_DTR){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), ~CyRTS);
@@ -3957,31 +3835,31 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
                    cy_readb(base_addr+(CyMSVR1<<index)), 
                     cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            break;
        case TIOCMSET:
            if (arg & TIOCM_RTS){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                        cy_writeb((u_long)base_addr+(CyMSVR2<<index), CyDTR);
                 } else {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), CyRTS);
                 }
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }else{
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                        cy_writeb((u_long)base_addr+(CyMSVR2<<index), ~CyDTR);
                 } else {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), ~CyRTS);
                 }
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            if (arg & TIOCM_DTR){
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), CyRTS);
@@ -3994,9 +3872,9 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
                    cy_readb(base_addr+(CyMSVR1<<index)), 
                     cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }else{
-               save_flags(flags); cli();
+               CY_LOCK(info, flags);
                cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
                 if (info->rtsdtr_inv) {
                        cy_writeb((u_long)base_addr+(CyMSVR1<<index), ~CyRTS);
@@ -4010,7 +3888,7 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
                    cy_readb(base_addr+(CyMSVR1<<index)), 
                     cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
-               restore_flags(flags);
+               CY_UNLOCK(info, flags);
            }
            break;
        default:
@@ -4030,50 +3908,66 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
            switch (cmd) {
            case TIOCMBIS:
                if (arg & TIOCM_RTS){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) | C_RS_RTS);
+                   CY_UNLOCK(info, flags);
                }
                if (arg & TIOCM_DTR){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) | C_RS_DTR);
 #ifdef CY_DEBUG_DTR
                    printk("cyc:set_modem_info raising Z DTR\n");
 #endif
+                   CY_UNLOCK(info, flags);
                }
                break;
            case TIOCMBIC:
                if (arg & TIOCM_RTS){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) & ~C_RS_RTS);
+                   CY_UNLOCK(info, flags);
                }
                if (arg & TIOCM_DTR){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) & ~C_RS_DTR);
 #ifdef CY_DEBUG_DTR
                    printk("cyc:set_modem_info clearing Z DTR\n");
 #endif
+                   CY_UNLOCK(info, flags);
                }
                break;
            case TIOCMSET:
                if (arg & TIOCM_RTS){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) | C_RS_RTS);
+                   CY_UNLOCK(info, flags);
                }else{
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) & ~C_RS_RTS);
+                   CY_UNLOCK(info, flags);
                }
                if (arg & TIOCM_DTR){
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) | C_RS_DTR);
 #ifdef CY_DEBUG_DTR
                    printk("cyc:set_modem_info raising Z DTR\n");
 #endif
+                   CY_UNLOCK(info, flags);
                }else{
+                   CY_LOCK(info, flags);
                    cy_writel(&ch_ctrl[channel].rs_control,
                        cy_readl(&ch_ctrl[channel].rs_control) & ~C_RS_DTR);
 #ifdef CY_DEBUG_DTR
                    printk("cyc:set_modem_info clearing Z DTR\n");
 #endif
+                   CY_UNLOCK(info, flags);
                }
                break;
            default:
@@ -4082,12 +3976,14 @@ set_modem_info(struct cyclades_port * info, unsigned int cmd,
        }else{
            return -ENODEV;
        }
+       CY_LOCK(info, flags);
         retval = cyz_issue_cmd(&cy_card[info->card],
                                    channel, C_CM_IOCTLM,0L);
        if (retval != 0){
            printk("cyc:set_modem_info retval at %d was %x\n",
                __LINE__, retval);
        }
+       CY_UNLOCK(info, flags);
     }
     return 0;
 } /* set_modem_info */
@@ -4104,7 +4000,7 @@ cy_break(struct tty_struct *tty, int break_state)
     if (serial_paranoia_check(info, tty->device, "cy_break"))
        return;
 
-    save_flags(flags); cli();
+    CY_LOCK(info, flags);
     if (!IS_CYC_Z(cy_card[info->card])) {
         /* Let the transmit ISR take care of this (since it
           requires stuffing characters into the output stream).
@@ -4113,14 +4009,18 @@ cy_break(struct tty_struct *tty, int break_state)
            if (!info->breakon) {
                info->breakon = 1;
                if (!info->xmit_cnt) {
+                   CY_UNLOCK(info, flags);
                    start_xmit(info);
+                   CY_LOCK(info, flags);
                }
            }
        } else {
            if (!info->breakoff) {
                info->breakoff = 1;
                if (!info->xmit_cnt) {
+                   CY_UNLOCK(info, flags);
                    start_xmit(info);
+                   CY_LOCK(info, flags);
                }
            }
        }
@@ -4145,8 +4045,7 @@ cy_break(struct tty_struct *tty, int break_state)
            }
        }
     }
-    restore_flags(flags);
-
+    CY_UNLOCK(info, flags);
 } /* cy_break */
 
 static int
@@ -4168,6 +4067,7 @@ set_threshold(struct cyclades_port * info, unsigned long value)
 {
   unsigned char *base_addr;
   int card,channel,chip,index;
+  unsigned long flags;
    
     card = info->card;
     channel = info->line - cy_card[card].first_line;
@@ -4181,8 +4081,11 @@ set_threshold(struct cyclades_port * info, unsigned long value)
 
        info->cor3 &= ~CyREC_FIFO;
        info->cor3 |= value & CyREC_FIFO;
-       cy_writeb((u_long)base_addr+(CyCOR3<<index), info->cor3);
-       cyy_issue_cmd(base_addr,CyCOR_CHANGE|CyCOR3ch,index);
+
+       CY_LOCK(info, flags);
+           cy_writeb((u_long)base_addr+(CyCOR3<<index), info->cor3);
+           cyy_issue_cmd(base_addr,CyCOR_CHANGE|CyCOR3ch,index);
+       CY_UNLOCK(info, flags);
     } else {
        // Nothing to do!
     }
@@ -4236,6 +4139,7 @@ set_timeout(struct cyclades_port * info, unsigned long value)
 {
   unsigned char *base_addr;
   int card,channel,chip,index;
+  unsigned long flags;
    
     card = info->card;
     channel = info->line - cy_card[card].first_line;
@@ -4247,7 +4151,9 @@ set_timeout(struct cyclades_port * info, unsigned long value)
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       cy_writeb((u_long)base_addr+(CyRTPR<<index), value & 0xff);
+       CY_LOCK(info, flags);
+           cy_writeb((u_long)base_addr+(CyRTPR<<index), value & 0xff);
+       CY_UNLOCK(info, flags);
     } else {
        // Nothing to do!
     }
@@ -4424,7 +4330,8 @@ cy_set_termios(struct tty_struct *tty, struct termios * old_termios)
     printk("cyc:cy_set_termios ttyC%d\n", info->line);
 #endif
 
-    if (tty->termios->c_cflag == old_termios->c_cflag)
+    if ((tty->termios->c_cflag == old_termios->c_cflag) &&
+       ((tty->termios->c_iflag & IXON) == (old_termios->c_iflag & IXON)))
         return;
     set_line_char(info);
 
@@ -4487,14 +4394,14 @@ cy_throttle(struct tty_struct * tty)
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
        cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
        if (info->rtsdtr_inv) {
                cy_writeb((u_long)base_addr+(CyMSVR2<<index), ~CyDTR);
        } else {
                cy_writeb((u_long)base_addr+(CyMSVR1<<index), ~CyRTS);
        }
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
     } else {
        // Nothing to do!
     }
@@ -4546,14 +4453,14 @@ cy_unthrottle(struct tty_struct * tty)
                       (cy_card[card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-       save_flags(flags); cli();
+       CY_LOCK(info, flags);
        cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
        if (info->rtsdtr_inv) {
                cy_writeb((u_long)base_addr+(CyMSVR2<<index), CyDTR);
        } else {
                cy_writeb((u_long)base_addr+(CyMSVR1<<index), CyRTS);
        }
-       restore_flags(flags);
+       CY_UNLOCK(info, flags);
     }else{
        // Nothing to do!
     }
@@ -4591,12 +4498,12 @@ cy_stop(struct tty_struct *tty)
                    (cy_card[info->card].base_addr
                            + (cy_chip_offset[chip]<<index));
 
-        save_flags(flags); cli();
+       CY_LOCK(info, flags);
             cy_writeb((u_long)base_addr+(CyCAR<<index),
               (u_char)(channel & 0x0003)); /* index channel */
             cy_writeb((u_long)base_addr+(CySRER<<index), 
                cy_readb(base_addr+(CySRER<<index)) & ~CyTxMpty);
-        restore_flags(flags);
+       CY_UNLOCK(info, flags);
     } else {
        // Nothing to do!
     }
@@ -4631,12 +4538,12 @@ cy_start(struct tty_struct *tty)
                        (cy_card[info->card].base_addr
                       + (cy_chip_offset[chip]<<index));
 
-        save_flags(flags); cli();
+       CY_LOCK(info, flags);
             cy_writeb((u_long)base_addr+(CyCAR<<index),
               (u_char)(channel & 0x0003)); /* index channel */
             cy_writeb((u_long)base_addr+(CySRER<<index), 
                cy_readb(base_addr+(CySRER<<index)) | CyTxMpty);
-        restore_flags(flags);
+       CY_UNLOCK(info, flags);
     } else {
        // Nothing to do!
     }
@@ -4658,19 +4565,22 @@ cy_flush_buffer(struct tty_struct *tty)
 
     if (serial_paranoia_check(info, tty->device, "cy_flush_buffer"))
         return;
-    save_flags(flags); cli();
-    info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-    restore_flags(flags);
 
     card = info->card;
     channel = (info->line) - (cy_card[card].first_line);
 
+    CY_LOCK(info, flags);
+    info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+    CY_UNLOCK(info, flags);
+
     if (IS_CYC_Z(cy_card[card])) { /* If it is a Z card, flush the on-board 
                                      buffers as well */
+       CY_LOCK(info, flags);
        retval = cyz_issue_cmd(&cy_card[card], channel, C_CM_FLUSH_TX, 0L);
        if (retval != 0) {
            printk("cyc: flush_buffer retval was %x\n", retval);
        }
+       CY_UNLOCK(info, flags);
     }
     wake_up_interruptible(&tty->write_wait);
     if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
@@ -4717,8 +4627,8 @@ cy_hangup(struct tty_struct *tty)
 
 /* initialize chips on Cyclom-Y card -- return number of valid
    chips (which is number of ports/4) */
-static unsigned short __init 
-cyy_init_card(volatile ucchar *true_base_addr,int index)
+__initfunc(static unsigned short
+cyy_init_card(volatile ucchar *true_base_addr,int index))
 {
   unsigned int chip_number;
   volatile ucchar* base_addr;
@@ -4803,14 +4713,30 @@ cyy_init_card(volatile ucchar *true_base_addr,int index)
  * sets global variables and return the number of ISA boards found.
  * ---------------------------------------------------------------------
  */
-static int __init cy_detect_isa(void)
+__initfunc(static int
+cy_detect_isa(void))
 {
   unsigned short       cy_isa_irq,nboard;
   volatile ucchar      *cy_isa_address;
   unsigned short       i,j,cy_isa_nchan;
+#ifdef MODULE
+  int isparam = 0;
+#endif
 
         nboard = 0;
 
+#ifdef MODULE
+       /* Check for module parameters */
+       for(i = 0 ; i < NR_CARDS; i++) {
+           if (maddr[i] || i) {
+               isparam = 1;
+               cy_isa_addresses[i] = (ucchar *)maddr[i];
+           }
+           if (!maddr[i])
+               break;
+       }
+#endif
+
         /* scan the address table probing for Cyclom-Y/ISA boards */
         for (i = 0 ; i < NR_ISA_ADDRS ; i++) {
                 cy_isa_address = cy_isa_addresses[i];
@@ -4829,8 +4755,13 @@ static int __init cy_detect_isa(void)
                         continue;
                 }
 
+#ifdef MODULE
+               if (isparam && irq[i])
+                   cy_isa_irq = irq[i];
+               else
+#endif
                 /* find out the board's irq by probing */
-                cy_isa_irq = do_auto_irq(cy_isa_address);
+                cy_isa_irq = detect_isa_irq(cy_isa_address);
                 if (cy_isa_irq == 0) {
                         printk("Cyclom-Y/ISA found at 0x%lx ",
                                 (unsigned long) cy_isa_address);
@@ -4910,8 +4841,8 @@ static void plx_init(uclong addr, uclong initctl)
  * sets global variables and return the number of PCI boards found.
  * ---------------------------------------------------------------------
  */
-static int __init 
-cy_detect_pci(void)
+__initfunc(static int
+cy_detect_pci(void))
 {
 #ifdef CONFIG_PCI
 
@@ -5054,6 +4985,11 @@ cy_detect_pci(void)
                    default: /* Old boards, use PLX_9060 */
 
                    plx_init(cy_pci_addr0, 0x6c);
+                   /* For some yet unknown reason, once the PLX9060 reloads
+                      the EEPROM, the IRQ is lost and, thus, we have to
+                      re-write it to the PCI config. registers.
+                      This will remain here until we find a permanent fix. */
+                   pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, cy_pci_irq);
 
                    cy_writew(cy_pci_addr0+0x68, 
                        cy_readw(cy_pci_addr0+0x68)|0x0900);
@@ -5095,6 +5031,11 @@ cy_detect_pci(void)
 #endif
 
                plx_init(cy_pci_addr0, 0x6c);
+               /* For some yet unknown reason, once the PLX9060 reloads
+                  the EEPROM, the IRQ is lost and, thus, we have to
+                  re-write it to the PCI config. registers.
+                  This will remain here until we find a permanent fix. */
+               pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, cy_pci_irq);
 
                mailbox = (uclong)cy_readl(&((struct RUNTIME_9060 *) 
                           cy_pci_addr0)->mail_box_0);
@@ -5203,17 +5144,19 @@ cy_detect_pci(void)
                 cy_card[j].num_chips = -1;
 
                 /* print message */
+#ifdef CONFIG_CYZ_INTR
                /* don't report IRQ if board is no IRQ */
-               if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) {
+               if( (cy_pci_irq != 0) && (cy_pci_irq != 255) )
                    printk("Cyclades-8Zo/PCI #%d: 0x%lx-0x%lx, IRQ%d, ",
                        j+1,(ulong)cy_pci_addr2,
                        (ulong)(cy_pci_addr2 + CyPCI_Zwin - 1),
                        (int)cy_pci_irq);
-               }else{
+               else
+#endif /* CONFIG_CYZ_INTR */
                    printk("Cyclades-8Zo/PCI #%d: 0x%lx-0x%lx, ",
                        j+1,(ulong)cy_pci_addr2,
                        (ulong)(cy_pci_addr2 + CyPCI_Zwin - 1));
-               }
+
                 printk("%d channels starting from port %d.\n",
                    cy_pci_nchan,cy_next_channel);
 #ifdef CONFIG_CYZ_INTR
@@ -5288,17 +5231,19 @@ cy_detect_pci(void)
                 cy_card[j].num_chips = -1;
 
                 /* print message */
+#ifdef CONFIG_CYZ_INTR
                /* don't report IRQ if board is no IRQ */
-               if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) {
+               if( (cy_pci_irq != 0) && (cy_pci_irq != 255) )
                    printk("Cyclades-Ze/PCI #%d: 0x%lx-0x%lx, IRQ%d, ",
                        j+1,(ulong)cy_pci_addr2,
                        (ulong)(cy_pci_addr2 + CyPCI_Ze_win - 1),
                        (int)cy_pci_irq);
-               }else{
+               else
+#endif /* CONFIG_CYZ_INTR */
                    printk("Cyclades-Ze/PCI #%d: 0x%lx-0x%lx, ",
                        j+1,(ulong)cy_pci_addr2,
                        (ulong)(cy_pci_addr2 + CyPCI_Ze_win - 1));
-               }
+
                 printk("%d channels starting from port %d.\n",
                    cy_pci_nchan,cy_next_channel);
 #ifdef CONFIG_CYZ_INTR
@@ -5414,8 +5359,8 @@ done:
     extra ports are ignored.
  */
 
-int __init 
-cy_init(void)
+__initfunc(int
+cy_init(void))
 {
   struct cyclades_port  *info;
   struct cyclades_card *cinfo;
@@ -5424,9 +5369,6 @@ cy_init(void)
   unsigned long mailbox;
   unsigned short chip_number;
   int nports;
-#ifdef CY_PROC
-  struct proc_dir_entry *ent;
-#endif
 
     init_bh(CYCLADES_BH, do_cyclades_bh);
 
@@ -5530,12 +5472,13 @@ cy_init(void)
     /* initialize per-port data structures for each valid board found */
     for (board = 0 ; board < cy_nboard ; board++) {
             cinfo = &cy_card[board];
-            if (cinfo->num_chips == -1){ /* Cyclades-Z */
+            if (cinfo->num_chips == -1) { /* Cyclades-Z */
                number_z_boards++;
                mailbox = cy_readl(&((struct RUNTIME_9060 *)
                             cy_card[board].ctl_addr)->mail_box_0);
                nports = (mailbox == ZE_V1) ? ZE_V1_NPORTS : 8;
                cinfo->intr_enabled = 0;
+               spin_lock_init(&cinfo->card_lock);
                 for (port = cinfo->first_line ;
                      port < cinfo->first_line + nports;
                      port++)
@@ -5578,9 +5521,9 @@ cy_init(void)
                                cy_callout_driver.init_termios;
                     info->normal_termios =
                                cy_serial_driver.init_termios;
-                    init_waitqueue_head(&info->open_wait);
-                    init_waitqueue_head(&info->close_wait);
-                    init_waitqueue_head(&info->shutdown_wait);
+                   init_waitqueue_head(&info->open_wait);
+                   init_waitqueue_head(&info->close_wait);
+                   init_waitqueue_head(&info->shutdown_wait);
                     /* info->session */
                     /* info->pgrp */
                     info->read_status_mask = 0;
@@ -5594,6 +5537,7 @@ cy_init(void)
                 continue;
             }else{ /* Cyclom-Y of some kind*/
                 index = cinfo->bus_index;
+               spin_lock_init(&cinfo->card_lock);
                 for (port = cinfo->first_line ;
                      port < cinfo->first_line + 4*cinfo->num_chips ;
                      port++)
@@ -5647,9 +5591,9 @@ cy_init(void)
                               cy_callout_driver.init_termios;
                     info->normal_termios =
                               cy_serial_driver.init_termios;
-                    init_waitqueue_head(&info->open_wait);
-                    init_waitqueue_head(&info->close_wait);
-                    init_waitqueue_head(&info->shutdown_wait);
+                   init_waitqueue_head(&info->open_wait);
+                   init_waitqueue_head(&info->close_wait);
+                   init_waitqueue_head(&info->shutdown_wait);
                     /* info->session */
                     /* info->pgrp */
                     info->read_status_mask =
@@ -5671,11 +5615,6 @@ cy_init(void)
     }
 #endif /* CONFIG_CYZ_INTR */
 
-#ifdef CY_PROC
-        ent = create_proc_entry("cyclades", S_IFREG | S_IRUGO, 0);
-        ent->read_proc = cyclades_get_proc_info;
-#endif
-
     return 0;
     
 } /* cy_init */
@@ -5729,10 +5668,6 @@ cleanup_module(void)
        free_page((unsigned long) tmp_buf);
        tmp_buf = NULL;
     }
-#ifdef CY_PROC
-    remove_proc_entry("cyclades", 0);
-#endif
-
 } /* cleanup_module */
 #else
 /* called by linux/init/main.c to parse command line options */
@@ -5796,8 +5731,7 @@ show_status(int line_num)
     printk("  session pgrp open_wait = %lx %lx %lx\n",
              info->session, info->pgrp, (long)info->open_wait);
 
-
-    save_flags(flags); cli();
+    CY_LOCK(info, flags);
 
         base_addr = (unsigned char*)
                        (cy_card[card].base_addr
@@ -5854,7 +5788,7 @@ show_status(int line_num)
         printk(" CyTBPR %x\n", cy_readb(base_addr + CyTBPR<<index));
         printk(" CyTCOR %x\n", cy_readb(base_addr + CyTCOR<<index));
 
-    restore_flags(flags);
+    CY_UNLOCK(info, flags);
 } /* show_status */
 #endif
 
index c2dc3f167402ef677bb658b9ed0ab0ce535a6e84..485ae1dfd82749ca1094c33fdf74d98438189c88 100644 (file)
 #define min(a,b) ((a) < (b) ? (a) : (b))
 #endif
 
-/* The device minor encodes the parport number and (arbitrary) 
- * pardevice number as (port << 4) | dev. */
-#define PP_PORT(minor) ((minor >> 4) & 0xf)
-
 struct pp_struct {
        struct pardevice * pdev;
        wait_queue_head_t irq_wait;
@@ -176,7 +172,7 @@ static ssize_t pp_read (struct file * file, char * buf, size_t count,
 
        if (!(pp->flags & PP_CLAIMED)) {
                /* Don't have the port claimed */
-               printk (KERN_DEBUG CHRDEV "%02x: claim the port first\n",
+               printk (KERN_DEBUG CHRDEV "%x: claim the port first\n",
                        minor);
                return -EINVAL;
        }
@@ -230,7 +226,7 @@ static ssize_t pp_write (struct file * file, const char * buf, size_t count,
 
        if (!(pp->flags & PP_CLAIMED)) {
                /* Don't have the port claimed */
-               printk (KERN_DEBUG CHRDEV "%02x: claim the port first\n",
+               printk (KERN_DEBUG CHRDEV "%x: claim the port first\n",
                        minor);
                return -EINVAL;
        }
@@ -281,7 +277,6 @@ static void pp_irq (int irq, void * private, struct pt_regs * unused)
 
 static int register_device (int minor, struct pp_struct *pp)
 {
-       unsigned int portnum = PP_PORT (minor);
        struct parport * port;
        struct pardevice * pdev = NULL;
        char *name;
@@ -291,10 +286,10 @@ static int register_device (int minor, struct pp_struct *pp)
        if (name == NULL)
                return -ENOMEM;
 
-       sprintf (name, CHRDEV "%02x", minor);
+       sprintf (name, CHRDEV "%x", minor);
        port = parport_enumerate (); /* FIXME: use attach/detach */
 
-       while (port && port->number != portnum)
+       while (port && port->number != minor)
                port = port->next;
 
        if (!port) {
@@ -329,7 +324,7 @@ static int pp_ioctl(struct inode *inode, struct file *file,
        if (cmd == PPCLAIM) {
                if (pp->flags & PP_CLAIMED) {
                        printk (KERN_DEBUG CHRDEV
-                               "%02x: you've already got it!\n", minor);
+                               "%x: you've already got it!\n", minor);
                        return -EINVAL;
                }
 
@@ -351,7 +346,7 @@ static int pp_ioctl(struct inode *inode, struct file *file,
 
        if (cmd == PPEXCL) {
                if (pp->pdev) {
-                       printk (KERN_DEBUG CHRDEV "%02x: too late for PPEXCL; "
+                       printk (KERN_DEBUG CHRDEV "%x: too late for PPEXCL; "
                                "already registered\n", minor);
                        if (pp->flags & PP_EXCL)
                                /* But it's not really an error. */
@@ -378,7 +373,7 @@ static int pp_ioctl(struct inode *inode, struct file *file,
        /* Everything else requires the port to be claimed, so check
         * that now. */
        if ((pp->flags & PP_CLAIMED) == 0) {
-               printk (KERN_DEBUG CHRDEV "%02x: claim the port first\n",
+               printk (KERN_DEBUG CHRDEV "%x: claim the port first\n",
                        minor);
                return -EINVAL;
        }
@@ -454,7 +449,7 @@ static int pp_ioctl(struct inode *inode, struct file *file,
                return ret;
 
        default:
-               printk (KERN_DEBUG CHRDEV "%02x: What? (cmd=0x%x)\n", minor,
+               printk (KERN_DEBUG CHRDEV "%x: What? (cmd=0x%x)\n", minor,
                        cmd);
                return -EINVAL;
        }
@@ -466,10 +461,9 @@ static int pp_ioctl(struct inode *inode, struct file *file,
 static int pp_open (struct inode * inode, struct file * file)
 {
        unsigned int minor = MINOR (inode->i_rdev);
-       unsigned int portnum = PP_PORT (minor);
        struct pp_struct *pp;
 
-       if (portnum >= PARPORT_MAX)
+       if (minor >= PARPORT_MAX)
                return -ENXIO;
 
        pp = kmalloc (GFP_KERNEL, sizeof (struct pp_struct));
@@ -499,7 +493,7 @@ static int pp_release (struct inode * inode, struct file * file)
 
        if (pp->flags & PP_CLAIMED) {
                parport_release (pp->pdev);
-               printk (KERN_DEBUG CHRDEV "%02x: released pardevice because "
+               printk (KERN_DEBUG CHRDEV "%x: released pardevice because "
                        "user-space forgot\n", minor);
        }
 
@@ -507,7 +501,7 @@ static int pp_release (struct inode * inode, struct file * file)
                kfree (pp->pdev->name);
                parport_unregister_device (pp->pdev);
                pp->pdev = NULL;
-               printk (KERN_DEBUG CHRDEV "%02x: unregistered pardevice\n",
+               printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n",
                        minor);
        }
 
index e6f50ebf1050082d803688533bcdd6ea1a394544..85e436565cba4912e0c172a507ae8f783fef0005 100644 (file)
@@ -40,7 +40,7 @@ static void send_sig_all(int sig, int even_init)
        struct task_struct *p;
 
        for_each_task(p) {
-               if (p->pid && p->mm != &init_mm) {          /* Not swapper nor kernel thread */
+               if (p->mm) {                                /* Not swapper nor kernel thread */
                        if (p->pid == 1 && even_init)       /* Ugly hack to kill init */
                                p->pid = 0x8000;
                        force_sig(sig, p);
index a4182e7336e8db969bd2f30545534e199309af5e..30f844b9062db1cc5a7b4da17de366fcf5f9b6d7 100644 (file)
@@ -269,7 +269,7 @@ struct proc_dir_entry proc_scsi_aic7xxx = {
     0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
 
-#define AIC7XXX_C_VERSION  "5.1.17"
+#define AIC7XXX_C_VERSION  "5.1.19"
 
 #define NUMBER(arr)     (sizeof(arr) / sizeof(arr[0]))
 #define MIN(a,b)        (((a) < (b)) ? (a) : (b))
@@ -7411,73 +7411,83 @@ read_seeprom(struct aic7xxx_host *p, int offset,
 
 /*+F*************************************************************************
  * Function:
- *   write_brdctl
+ *   read_brdctl
  *
  * Description:
- *   Writes a value to the BRDCTL register.
+ *   Reads the BRDCTL register.
  *-F*************************************************************************/
-static void
-write_brdctl(struct aic7xxx_host *p, unsigned char value)
+static unsigned char
+read_brdctl(struct aic7xxx_host *p)
 {
-  unsigned char brdctl;
+  unsigned char brdctl, value;
 
-  if ((p->chip & AHC_CHIPID_MASK) == AHC_AIC7895)
+  if (p->features & AHC_ULTRA2)
   {
-    brdctl = BRDSTB;
-    if (p->flags & AHC_CHNLB)
-      brdctl |= BRDCS;
+    brdctl = BRDRW_ULTRA2;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(4);
+    return(aic_inb(p, BRDCTL));
+  }
+  brdctl = BRDRW;
+  if ( !((p->chip & AHC_CHIPID_MASK) == AHC_AIC7895) ||
+        (p->flags & AHC_CHNLB) )
+  {
+    brdctl |= BRDCS;
   }
-  else if (p->features & AHC_ULTRA2)
-    brdctl = 0;
-  else
-    brdctl = BRDSTB | BRDCS;
-  aic_outb(p, brdctl, BRDCTL);
-  udelay(1);
-  brdctl |= value;
-  aic_outb(p, brdctl, BRDCTL);
-  udelay(1);
-  if (p->features & AHC_ULTRA2)
-    brdctl |= BRDSTB_ULTRA2;
-  else
-    brdctl &= ~BRDSTB;
   aic_outb(p, brdctl, BRDCTL);
   udelay(1);
-  if (p->features & AHC_ULTRA2)
-    brdctl = 0;
-  else
-    brdctl &= ~BRDCS;
-  aic_outb(p, brdctl, BRDCTL);
+  value = aic_inb(p, BRDCTL);
+  aic_outb(p, 0, BRDCTL);
   udelay(1);
+  return (value);
 }
 
 /*+F*************************************************************************
  * Function:
- *   read_brdctl
+ *   write_brdctl
  *
  * Description:
- *   Reads the BRDCTL register.
+ *   Writes a value to the BRDCTL register.
  *-F*************************************************************************/
-static unsigned char
-read_brdctl(struct aic7xxx_host *p)
+static void
+write_brdctl(struct aic7xxx_host *p, unsigned char value)
 {
-  unsigned char brdctl, value;
+  unsigned char brdctl;
 
-  if ((p->chip & AHC_CHIPID_MASK) == AHC_AIC7895)
+  if (p->features & AHC_ULTRA2)
   {
-    brdctl = BRDRW;
-    if (p->flags & AHC_CHNLB)
-      brdctl |= BRDCS;
+    brdctl = value;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(4);
+    brdctl |= BRDSTB_ULTRA2;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(4);
+    brdctl &= ~BRDSTB_ULTRA2;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(4);
+    read_brdctl(p);
   }
-  else if (p->features & AHC_ULTRA2)
-    brdctl = BRDRW_ULTRA2;
   else
-    brdctl = BRDRW | BRDCS;
-  aic_outb(p, brdctl, BRDCTL);
-  udelay(1);
-  value = aic_inb(p, BRDCTL);
-  aic_outb(p, 0, BRDCTL);
-  udelay(1);
-  return (value);
+  {
+    brdctl = BRDSTB;
+    if ( !((p->chip & AHC_CHIPID_MASK) == AHC_AIC7895) ||
+          (p->flags & AHC_CHNLB) )
+    {
+      brdctl |= BRDCS;
+    }
+    brdctl = BRDSTB | BRDCS;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(1);
+    brdctl |= value;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(1);
+    brdctl &= ~BRDSTB;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(1);
+    brdctl &= ~BRDCS;
+    aic_outb(p, brdctl, BRDCTL);
+    udelay(1);
+  }
 }
 
 /*+F*************************************************************************
@@ -7769,9 +7779,9 @@ configure_termination(struct aic7xxx_host *p)
                  p->host_no);
       }
     }
+    aic_outb(p, sxfrctl1, SXFRCTL1);
     write_brdctl(p, brddat);
     release_seeprom(p);
-    aic_outb(p, sxfrctl1, SXFRCTL1);
   }
 }
 
@@ -8085,7 +8095,11 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
     /* Select channel B */
     aic_outb(p, aic_inb(p, SBLKCTL) | SELBUSB, SBLKCTL);
 
-    term = ((p->flags & AHC_TERM_ENB_B) != 0) ? STPWEN : 0;
+    if ((p->flags & AHC_SEEPROM_FOUND) || (aic7xxx_override_term != -1))
+      term = (aic_inb(p, SXFRCTL1) & STPWEN);
+    else
+      term = ((p->flags & AHC_TERM_ENB_B) ? STPWEN : 0);
+
     aic_outb(p, p->scsi_id_b, SCSIID);
     scsi_conf = aic_inb(p, SCSICONF + 1);
     aic_outb(p, DFON | SPIOEN, SXFRCTL0);
@@ -8099,11 +8113,18 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
     aic_outb(p, aic_inb(p, SBLKCTL) & ~SELBUSB, SBLKCTL);
   }
 
-  term = ((p->flags & AHC_TERM_ENB_SE_LOW) != 0) ? STPWEN : 0;
   if (p->features & AHC_ULTRA2)
+  {
     aic_outb(p, p->scsi_id, SCSIID_ULTRA2);
+  }
   else
+  {
     aic_outb(p, p->scsi_id, SCSIID);
+  }
+  if ((p->flags & AHC_SEEPROM_FOUND) || (aic7xxx_override_term != -1))
+    term = (aic_inb(p, SXFRCTL1) & STPWEN);
+  else
+    term = ((p->flags & (AHC_TERM_ENB_A|AHC_TERM_ENB_LVD)) ? STPWEN : 0);
   scsi_conf = aic_inb(p, SCSICONF);
   aic_outb(p, DFON | SPIOEN, SXFRCTL0);
   aic_outb(p, (scsi_conf & ENSPCHK) | STIMESEL | term | 
@@ -8793,27 +8814,33 @@ aic7xxx_load_seeprom(struct aic7xxx_host *p, unsigned char *sxfrctl1)
     }
     if (p->flags & AHC_NEWEEPROM_FMT)
     {
-      if ( (sc->device_flags[i] & CFNEWULTRAFORMAT) &&
-          !(p->features & AHC_ULTRA2) )
+      if ( !(p->features & AHC_ULTRA2) )
       {
         /*
          * I know of two different Ultra BIOSes that do this differently.
          * One on the Gigabyte 6BXU mb that wants flags[i] & CFXFER to
-         * be == to 0x03 and SYNCISULTRA to be true to mean 40MByte/s
+         * be == to 0x03 and SYNCHISULTRA to be true to mean 40MByte/s
          * while on the IBM Netfinity 5000 they want the same thing
          * to be something else, while flags[i] & CFXFER == 0x03 and
-         * SYNCISULTRA false should be 40MByte/s.  So, we set both to
+         * SYNCHISULTRA false should be 40MByte/s.  So, we set both to
          * 40MByte/s and the lower speeds be damned.  People will have
          * to select around the conversely mapped lower speeds in order
          * to select lower speeds on these boards.
          */
-        if ((sc->device_flags[i] & (CFXFER)) == 0x03)
+        if ( (sc->device_flags[i] & CFNEWULTRAFORMAT) &&
+            ((sc->device_flags[i] & CFXFER) == 0x03) )
         {
           sc->device_flags[i] &= ~CFXFER;
           sc->device_flags[i] |= CFSYNCHISULTRA;
         }
+        if (sc->device_flags[i] & CFSYNCHISULTRA)
+        {
+          p->ultraenb |= mask;
+        }
       }
-      if (sc->device_flags[i] & CFSYNCHISULTRA)
+      else if ( !(sc->device_flags[i] & CFNEWULTRAFORMAT) &&
+                 (p->features & AHC_ULTRA2) &&
+                (sc->device_flags[i] & CFSYNCHISULTRA) )
       {
         p->ultraenb |= mask;
       }
@@ -9034,11 +9061,44 @@ aic7xxx_detect(Scsi_Host_Template *template)
 
 
 #if defined(__i386__) || defined(__alpha__)
+#ifdef CONFIG_PCI
+  /*
+   * PCI-bus chipset probe.
+   */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,92)
+  if (pci_present())
+  {
+    if (pci_find_device(PCI_VENDOR_ID_INTEL,
+                        PCI_DEVICE_ID_INTEL_82450GX,
+                        NULL))
+      aic7xxx_no_probe = 1;
+    if (pci_find_device(PCI_VENDOR_ID_INTEL,
+                        PCI_DEVICE_ID_INTEL_82451NX,
+                        NULL))
+      aic7xxx_no_probe = 1;
+  }
+#else
+#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
+  if (pcibios_present())
+  {
+    unsigned char pci_bus, pci_devfn;
+    if (!(pcibios_find_device(PCI_VENDOR_ID_INTEL,
+                              PCI_DEVICE_ID_INTEL_82450GX,
+                              0, &pci_bus, &pci_devfn)) )
+      aic7xxx_no_probe = 1;
+    if (!(pcibios_find_device(PCI_VENDOR_ID_INTEL,
+                              PCI_DEVICE_ID_INTEL_82451NX,
+                              0, &pci_bus, &pci_devfn)) )
+      aic7xxx_no_probe = 1;
+  }
+#endif /* LINUX_VERSION_CODE */
+#endif /* CONFIG_PCI */
   /*
    * EISA/VL-bus card signature probe.
    */
   slot = MINSLOT;
-  while ( (slot <= MAXSLOT) && !(aic7xxx_no_probe) )
+  while ( (slot <= MAXSLOT) && 
+         !(aic7xxx_no_probe) )
   {
     base = SLOTBASE(slot) + MINREG;
 
@@ -9296,6 +9356,10 @@ aic7xxx_detect(Scsi_Host_Template *template)
        AHC_PAGESCBS | AHC_NEWEEPROM_FMT | AHC_BIOS_ENABLED,
        AHC_AIC7860_FE,                                       7,
        32, C46 },
+      {PCI_VENDOR_ID_ADAPTEC, PCI_DEVICE_ID_ADAPTEC_38602, AHC_AIC7860,
+       AHC_PAGESCBS | AHC_NEWEEPROM_FMT | AHC_BIOS_ENABLED,
+       AHC_AIC7860_FE,                                       7,
+       32, C46 },
       {PCI_VENDOR_ID_ADAPTEC, PCI_DEVICE_ID_ADAPTEC_7860, AHC_AIC7860,
        AHC_PAGESCBS | AHC_NEWEEPROM_FMT | AHC_BIOS_ENABLED,
        AHC_AIC7860_FE,                                       7,
@@ -9474,6 +9538,23 @@ aic7xxx_detect(Scsi_Host_Template *template)
           temp_p->pci_device_fn = pdev->devfn;
           temp_p->base = pdev->base_address[0];
           temp_p->mbase = pdev->base_address[1];
+          temp_p->base &= PCI_BASE_ADDRESS_IO_MASK;
+          temp_p->mbase &= PCI_BASE_ADDRESS_MEM_MASK;
+          current_p = list_p;
+         while(current_p)
+         {
+           if ( ((current_p->pci_bus == temp_p->pci_bus) &&
+                 (current_p->pci_device_fn == temp_p->pci_device_fn)) ||
+                  (current_p->base == temp_p->base) )
+           {
+              /* duplicate PCI entry, skip it */
+             kfree(temp_p);
+             temp_p = NULL;
+           }
+           current_p = current_p->next;
+         }
+         if ( temp_p == NULL )
+            continue;
           if (aic7xxx_verbose & VERBOSE_PROBE2)
             printk("aic7xxx: <%s> at PCI %d/%d\n", 
               board_names[aic_pdevs[i].board_name_index],
@@ -9507,11 +9588,6 @@ aic7xxx_detect(Scsi_Host_Template *template)
 #else  /* LINUX_VERSION_CODE > KERNEL_VERSION(2,1,92) */
           temp_p->pci_bus = pci_bus;
           temp_p->pci_device_fn = pci_devfn;
-          if (aic7xxx_verbose & VERBOSE_PROBE2)
-            printk("aic7xxx: <%s> at PCI %d/%d\n", 
-              board_names[aic_pdevs[i].board_name_index],
-              PCI_SLOT(temp_p->pci_device_fn),
-              PCI_FUNC(temp_p->pci_device_fn));
           pcibios_read_config_byte(pci_bus, pci_devfn, PCI_INTERRUPT_LINE,
             &pci_irq);
           temp_p->irq = pci_irq;
@@ -9521,6 +9597,28 @@ aic7xxx_detect(Scsi_Host_Template *template)
           pcibios_read_config_dword(pci_bus, pci_devfn, PCI_BASE_ADDRESS_1,
             &mmapbase);
           temp_p->mbase = mmapbase;
+          temp_p->base &= PCI_BASE_ADDRESS_IO_MASK;
+          temp_p->mbase &= PCI_BASE_ADDRESS_MEM_MASK;
+          current_p = list_p;
+         while(current_p)
+         {
+           if ( ((current_p->pci_bus == temp_p->pci_bus) &&
+                 (current_p->pci_device_fn == temp_p->pci_device_fn)) ||
+                  (current_p->base == temp_p->base) )
+           {
+              /* duplicate PCI entry, skip it */
+             kfree(temp_p);
+             temp_p = NULL;
+           }
+           current_p = current_p->next;
+         }
+         if ( temp_p == NULL )
+            continue;
+          if (aic7xxx_verbose & VERBOSE_PROBE2)
+            printk("aic7xxx: <%s> at PCI %d/%d\n", 
+              board_names[aic_pdevs[i].board_name_index],
+              PCI_SLOT(temp_p->pci_device_fn),
+              PCI_FUNC(temp_p->pci_device_fn));
           pcibios_read_config_word(pci_bus, pci_devfn, PCI_COMMAND, &command);
           if (aic7xxx_verbose & VERBOSE_PROBE2)
           {
@@ -9548,12 +9646,6 @@ aic7xxx_detect(Scsi_Host_Template *template)
 #endif /* AIC7XXX_STRICT_PCI_SETUP */
 #endif /* LINUIX_VERSION_CODE > KERNEL_VERSION(2,1,92) */
 
-          /*
-           * The first bit (LSB) of PCI_BASE_ADDRESS_0 is always set, so
-           * we mask it off.
-           */
-          temp_p->base &= PCI_BASE_ADDRESS_IO_MASK;
-          temp_p->mbase &= PCI_BASE_ADDRESS_MEM_MASK;
           temp_p->unpause = INTEN;
           temp_p->pause = temp_p->unpause | PAUSE;
           if ( ((temp_p->base == 0) &&
@@ -9571,6 +9663,9 @@ aic7xxx_detect(Scsi_Host_Template *template)
           }
 
 #ifdef MMAPIO
+          if ( !(temp_p->flags & AHC_MULTI_CHANNEL) ||
+               ((temp_p->chip != (AHC_AIC7870 | AHC_PCI)) &&
+                (temp_p->chip != (AHC_AIC7880 | AHC_PCI))) )
           {
             unsigned long page_offset, base;
 
index 7f348aa9393ac25d0a8330da19069bc2772f0746..6cc347d5b82b2bd9e130b6deca0fb68e5597add7 100644 (file)
@@ -845,7 +845,7 @@ register CRCCONTROL1 {
        bit     CRCENDCHKEN     0x20 /* CRC End Check Enable */
        bit     CRCREQCHKEN     0x10
        bit     TARGCRCENDEN    0x08 /* Enable End CRC transfer when target */
-       bit     TARGCRCCNTEN    0x40 /* Enable CRC transfer when target */
+       bit     TARGCRCCNTEN    0x04 /* Enable CRC transfer when target */
 }
 
 /*
index b42750864288e66e2a1143273a5fca561c333229..f86e1bec8a264f2503716485a7518fd023e2bce7 100644 (file)
 
 #define        CRCCONTROL1                     0x9d
 #define                CRCONSEEN               0x80
-#define                TARGCRCCNTEN            0x40
 #define                CRCVALCHKEN             0x40
 #define                CRCENDCHKEN             0x20
 #define                CRCREQCHKEN             0x10
 #define                TARGCRCENDEN            0x08
+#define                TARGCRCCNTEN            0x04
 
 #define        SCSIPHASE                       0x9e
 #define                SP_STATUS               0x20
index 59ec035cb551077ceda52ce658bb0f7b26fafdc7..c94a77041e40ccb3ec9bed8558a2c57837556436 100644 (file)
@@ -214,6 +214,8 @@ shmiq_ioctl (struct inode *inode, struct file *f, unsigned int cmd, unsigned lon
                        goto bad_file;
 
                v = shmiq_manage_file (file);
+               if (v<0)
+                       fput(file);
                return v;
 
                /*
index d5acef82f543330c5910a84fa86008eabff255dd..4521bd701ba1923f2a6d6cfef4e75e5a91a95517 100644 (file)
@@ -231,7 +231,10 @@ static int acm_probe(struct usb_device *dev)
                        continue;
 
                printk("USB ACM found\n");
-               usb_set_configuration(dev, dev->config[cfgnum].bConfigurationValue);
+               if (usb_set_configuration(dev, dev->config[cfgnum].bConfigurationValue)) {
+                       printk (KERN_INFO " Failed usb_set_configuration: ACM\n");
+                       continue;
+               }
                acm->dev=dev;
                acm->readendp=dev->config[cfgnum].altsetting[0].interface[1].endpoint[0].bEndpointAddress;
                acm->writeendp=dev->config[cfgnum].altsetting[0].interface[1].endpoint[1].bEndpointAddress;
index abbb73c4f0297a5378db13417f4c3ae1d15b67f6..fc503f3cb7ecf5c257b82352833fe94e0f3538f8 100644 (file)
@@ -81,7 +81,10 @@ static int usb_audio_probe(struct usb_device *dev)
 
                endpoint = &interface->endpoint[0];
 
-//             usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+//             if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+//                     printk (KERN_INFO " Failed usb_set_configuration: Audio\n");
+//                     break;
+//             }
 //             usb_set_protocol(dev, 0);
 //             usb_set_idle(dev, 0, 0);
         
@@ -92,8 +95,13 @@ static int usb_audio_probe(struct usb_device *dev)
                         aud);
 
                list_add(&aud->list, &usb_audio_list);
+               
+               return 0;
        }
-       return 0;
+       
+       if (aud)
+               kfree (aud);
+       return -1;
 }
 
 static void usb_audio_disconnect(struct usb_device *dev)
index ba89884a4520ca59b6b814571a75ae170c74b969..6b531ffc9b28a90acf914a0e6613aa584d56cb74 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/io.h>
 
 #include "usb.h"
-#include "uhci.h"
 #include "cpia.h"
 
 #define MAX_FRAME_SIZE (384 * 288 * 3)
@@ -478,10 +477,10 @@ printk("no frame available\n");
 
        sbuf = &cpia->sbuf[cpia->receivesbuf];
 
-       uhci_unsched_isochronous(dev, sbuf->isodesc);
+       usb_unschedule_isochronous(dev, sbuf->isodesc);
 
        /* Do something to it now */
-       sbuf->len = uhci_compress_isochronous(dev, sbuf->isodesc);
+       sbuf->len = usb_compress_isochronous(dev, sbuf->isodesc);
 
        if (sbuf->len)
        printk("%d bytes received\n", sbuf->len);
@@ -498,7 +497,7 @@ printk("no frame available\n");
        }
 
        /* Reschedule this block of Isochronous desc */
-       uhci_sched_isochronous(dev, sbuf->isodesc, cpia->sbuf[(cpia->receivesbuf + 2) % 3].isodesc);
+       usb_schedule_isochronous(dev, sbuf->isodesc, cpia->sbuf[(cpia->receivesbuf + 2) % 3].isodesc);
 
        /* Move to the next one */
        cpia->receivesbuf = (cpia->receivesbuf + 1) % 3;
@@ -521,18 +520,18 @@ int cpia_init_isoc(struct usb_cpia *cpia)
        cpia->state = STATE_SCANNING;
 
        /* Allocate all of the memory necessary */
-       cpia->sbuf[0].isodesc = uhci_alloc_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[0].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
-       cpia->sbuf[1].isodesc = uhci_alloc_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[1].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
-       cpia->sbuf[2].isodesc = uhci_alloc_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[2].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
+       cpia->sbuf[0].isodesc = usb_allocate_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[0].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
+       cpia->sbuf[1].isodesc = usb_allocate_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[1].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
+       cpia->sbuf[2].isodesc = usb_allocate_isochronous(dev, usb_rcvisocpipe(dev,1), cpia->sbuf[2].data, STREAM_BUF_SIZE, 960, cpia_isoc_irq, cpia);
 
        printk("isodesc[0] @ %p\n", cpia->sbuf[0].isodesc);
        printk("isodesc[1] @ %p\n", cpia->sbuf[1].isodesc);
        printk("isodesc[2] @ %p\n", cpia->sbuf[2].isodesc);
 
        /* Schedule the queues */
-       uhci_sched_isochronous(dev, cpia->sbuf[0].isodesc, NULL);
-       uhci_sched_isochronous(dev, cpia->sbuf[1].isodesc, cpia->sbuf[0].isodesc);
-       uhci_sched_isochronous(dev, cpia->sbuf[2].isodesc, cpia->sbuf[1].isodesc);
+       usb_schedule_isochronous(dev, cpia->sbuf[0].isodesc, NULL);
+       usb_schedule_isochronous(dev, cpia->sbuf[1].isodesc, cpia->sbuf[0].isodesc);
+       usb_schedule_isochronous(dev, cpia->sbuf[2].isodesc, cpia->sbuf[1].isodesc);
 
        if (usb_set_interface(cpia->dev, 1, 3)) {
                printk("cpia_set_interface error\n");
@@ -561,18 +560,18 @@ void cpia_stop_isoc(struct usb_cpia *cpia)
        /* Set packet size to 0 */
        if (usb_set_interface(cpia->dev, 1, 0)) {
                printk("cpia_set_interface error\n");
-               return -EINVAL;
+               return /* -EINVAL */;
        }
 
        /* Unschedule all of the iso td's */
-       uhci_unsched_isochronous(dev, cpia->sbuf[2].isodesc);
-       uhci_unsched_isochronous(dev, cpia->sbuf[1].isodesc);
-       uhci_unsched_isochronous(dev, cpia->sbuf[0].isodesc);
+       usb_unschedule_isochronous(dev, cpia->sbuf[2].isodesc);
+       usb_unschedule_isochronous(dev, cpia->sbuf[1].isodesc);
+       usb_unschedule_isochronous(dev, cpia->sbuf[0].isodesc);
 
        /* Delete them all */
-       uhci_delete_isochronous(dev, cpia->sbuf[2].isodesc);
-       uhci_delete_isochronous(dev, cpia->sbuf[1].isodesc);
-       uhci_delete_isochronous(dev, cpia->sbuf[0].isodesc);
+       usb_delete_isochronous(dev, cpia->sbuf[2].isodesc);
+       usb_delete_isochronous(dev, cpia->sbuf[1].isodesc);
+       usb_delete_isochronous(dev, cpia->sbuf[0].isodesc);
 }
 
 /* Video 4 Linux API */
@@ -980,7 +979,7 @@ static long cpia_read(struct video_device *dev, char *buf, unsigned long count,
        struct usb_cpia *cpia = (struct usb_cpia *)dev;
        int len;
 
-       printk("cpia_read: %d bytes\n", count);
+       printk("cpia_read: %ld bytes\n", count);
 #if 0
        len = cpia_capture(cpia, buf, count);
 
@@ -995,7 +994,7 @@ static int cpia_mmap(struct video_device *dev, const char *adr, unsigned long si
        unsigned long start = (unsigned long)adr;
        unsigned long page, pos;
 
-       printk("mmap: %d (%X) bytes\n", size, size);
+       printk("mmap: %ld (%lX) bytes\n", size, size);
        if (size > (((2 * MAX_FRAME_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
                return -EINVAL;
 
@@ -1048,7 +1047,10 @@ static void usb_cpia_configure(struct usb_cpia *cpia)
        unsigned char camerastat[8];
        unsigned char *buf;
 
-       usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+       if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+               printk (KERN_INFO " Failed usb_set_configuration: CPIA\n");
+               return;
+       }
 
        if (usb_cpia_get_version(dev, version)) {
                printk("cpia_get_version error\n");
index e076b7837a580036149d198c098c00d5e36923f6..02443f965b8df6cc15245e68db269bdd5e8056ce 100644 (file)
@@ -26,10 +26,8 @@ static spinlock_t hub_list_lock = SPIN_LOCK_UNLOCKED;
 /* List of hubs needing servicing */
 static struct list_head hub_event_list;
 
-#ifdef MODULE
 /* List containing all of the hubs (for cleanup) */
 static struct list_head all_hubs_list;
-#endif
 
 /* PID of khubd */
 static int khubd_pid = 0;
index e87519d9f52b9f23b7b83360165f8b178413e72a..47c0780e51b6d814c1bffdd7aa17d2b56bec93cc 100644 (file)
@@ -195,7 +195,10 @@ usb_kbd_probe(struct usb_device *dev)
         kbd->dev = dev;
         dev->private = kbd;
 
-        usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+        if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+               printk (KERN_INFO " Failed usb_set_configuration: kbd\n");
+               goto probe_err;
+       }
         usb_set_protocol(dev, 0);
         usb_set_idle(dev, 0, 0);
         
@@ -206,9 +209,14 @@ usb_kbd_probe(struct usb_device *dev)
                         kbd);
 
         list_add(&kbd->list, &usb_kbd_list);
+       
+       return 0;
     }
 
-    return 0;
+probe_err:
+    if (kbd)
+       kfree (kbd);
+    return -1;
 }
 
 static void
index ab2c2923717462a8267e542bf41f2623f6430e28..4b4be164d617b35e4cd4a0bffc30a49186bd3722 100644 (file)
@@ -293,7 +293,10 @@ static int mouse_probe(struct usb_device *dev)
 
        printk("USB mouse found\n");
 
-       usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+       if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+               printk (KERN_INFO " Failed usb_set_configuration: mouse\n");
+               return -1;
+       }
 
        /* these are used to request the irq when the mouse is opened */
        mouse->dev = dev;
index 8db61e08e6aa2e8d58568d87a610c6049377266e..b839ba884138541ae23acf193abcefa722d30c3a 100644 (file)
@@ -280,12 +280,44 @@ static struct usb_device *sohci_usb_allocate(struct usb_device *parent) {
 }
 
 
+static void *sohci_alloc_isochronous (struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id)
+{
+       return NULL;
+}
+
+static void sohci_delete_isochronous (struct usb_device *dev, void *_isodesc)
+{
+       return;
+}
+
+static int sohci_sched_isochronous (struct usb_device *usb_dev, void *_isodesc, void *_pisodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+static int sohci_unsched_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+static int sohci_compress_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+
 struct usb_operations sohci_device_operations = {
        sohci_usb_allocate,
        sohci_usb_deallocate,
        sohci_control_msg,
        sohci_bulk_msg,
        sohci_request_irq,
+       NULL,   /* FIXME: should be release_irq/remove_irq */
+       sohci_alloc_isochronous,
+       sohci_delete_isochronous,
+       sohci_sched_isochronous,
+       sohci_unsched_isochronous,
+       sohci_compress_isochronous
 };
 
  
index f35479b8a1546dbc1be9fb8625984c7813df316b..dd54f77e37f54d3a5fd8270bcb5e734b3a7b44df 100644 (file)
@@ -1571,6 +1571,32 @@ static int ohci_usb_deallocate(struct usb_device *usb_dev)
 }
 
 
+static void *ohci_alloc_isochronous (struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id)
+{
+       return NULL;
+}
+
+static void ohci_delete_isochronous (struct usb_device *dev, void *_isodesc)
+{
+       return;
+}
+
+static int ohci_sched_isochronous (struct usb_device *usb_dev, void *_isodesc, void *_pisodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+static int ohci_unsched_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+static int ohci_compress_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return USB_ST_NOTSUPPORTED;
+}
+
+
 /*
  * functions for the generic USB driver
  */
@@ -1581,6 +1607,11 @@ struct usb_operations ohci_device_operations = {
        ohci_bulk_msg,
        ohci_request_irq,
        ohci_release_irq,
+       ohci_alloc_isochronous,
+       ohci_delete_isochronous,
+       ohci_sched_isochronous,
+       ohci_unsched_isochronous,
+       ohci_compress_isochronous
 };
 
 
index 2ea179870041489997b03bc6157348fc63dbade5..84083ce4654bcff9dbb622c128181ee6551c4ea5 100644 (file)
@@ -318,7 +318,7 @@ static int printer_probe(struct usb_device *dev)
        }
 
         if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
-               printk(KERN_INFO "  Failed to set configuration\n");
+               printk(KERN_INFO "  Failed usb_set_configuration: printer\n");
                return -1;
        }
 #if 0
index 32549763e7d459a5902d4ad62ce557e99793c558..8a1d3032c533526cd9c44850e910a39d4bc4803e 100644 (file)
@@ -43,9 +43,9 @@ void show_td(struct uhci_td * td)
                spid = "?";
                break;
        }
-       printk("MaxLen=%x %sEndPt=%x Dev=%x, PID=%x(%s) ",
+       printk("MaxLen=%x DT%d EndPt=%x Dev=%x, PID=%x(%s) ",
                td->info >> 21,
-                ((td->info >> 19) & 1) ? "DT " : "",
+                ((td->info >> 19) & 1),
                 (td->info >> 15) & 15,
                 (td->info >> 8) & 127,
                 (td->info & 0xff),
index 4e09a8d1c135a3b0f639b79024f93bb8707f1848..32b0d41fcaccd0a84e405c82a79c33e0364ce154 100644 (file)
@@ -344,6 +344,7 @@ static void uhci_remove_irq_list(struct uhci_td *td)
        spin_unlock_irqrestore(&irqlist_lock, flags);
 }
 
+
 /*
  * Request a interrupt handler..
  *
@@ -360,7 +361,7 @@ static void* uhci_request_irq(struct usb_device *usb_dev, unsigned int pipe, usb
        unsigned int destination, status;
 
        /* Destination: pipe destination with INPUT */
-       destination = (pipe & 0x0007ff00) | 0x69;
+       destination = (pipe & PIPE_DEVEP_MASK) | 0x69;
 
        /* Status:    slow/fast,      Interrupt,   Active,    Short Packet Detect     Infinite Errors */
        status = (pipe & (1 << 26)) | (1 << 24) | (1 << 23)   |   (1 << 29)       |    (0 << 27);
@@ -371,7 +372,8 @@ static void* uhci_request_irq(struct usb_device *usb_dev, unsigned int pipe, usb
 
        td->link = 1;
        td->status = status;                    /* In */
-       td->info = destination | (7 << 21) | (usb_gettoggle(usb_dev, usb_pipeendpoint(pipe), usb_pipeout(pipe)) << 19); /* 8 bytes of data */
+       td->info = destination | ((usb_maxpacket(usb_dev, pipe) - 1) << 21) |
+               (usb_gettoggle(usb_dev, usb_pipeendpoint(pipe), usb_pipeout(pipe)) << 19);
        td->buffer = virt_to_bus(dev->data);
        td->first = td;
        td->qh = interrupt_qh;
@@ -490,7 +492,7 @@ int uhci_release_irq(void* handle)
  * Isochronous thread operations
  */
 
-int uhci_compress_isochronous(struct usb_device *usb_dev, void *_isodesc)
+static int uhci_compress_isochronous(struct usb_device *usb_dev, void *_isodesc)
 {
        struct uhci_iso_td *isodesc = (struct uhci_iso_td *)_isodesc;
        char *data = isodesc->data;
@@ -517,7 +519,7 @@ if ((isodesc->td[i].status >> 16) & 0xFF)
        return totlen;
 }
 
-int uhci_unsched_isochronous(struct usb_device *usb_dev, void *_isodesc)
+static int uhci_unschedule_isochronous(struct usb_device *usb_dev, void *_isodesc)
 {
        struct uhci_device *dev = usb_to_uhci(usb_dev);
        struct uhci *uhci = dev->uhci;
@@ -540,7 +542,7 @@ int uhci_unsched_isochronous(struct usb_device *usb_dev, void *_isodesc)
 }
        
 /* td points to the one td we allocated for isochronous transfers */
-int uhci_sched_isochronous(struct usb_device *usb_dev, void *_isodesc, void *_pisodesc)
+static int uhci_schedule_isochronous(struct usb_device *usb_dev, void *_isodesc, void *_pisodesc)
 {
        struct uhci_device *dev = usb_to_uhci(usb_dev);
        struct uhci *uhci = dev->uhci;
@@ -550,7 +552,7 @@ int uhci_sched_isochronous(struct usb_device *usb_dev, void *_isodesc, void *_pi
 
        if (isodesc->frame != -1) {
                printk("isoc queue not removed\n");
-               uhci_unsched_isochronous(usb_dev, isodesc);
+               uhci_unschedule_isochronous(usb_dev, isodesc);
        }
 
        /* Insert TD into list */
@@ -592,7 +594,7 @@ printk("last at frame %d\n", (frame + i - 1) % 1024);
 /*
  * Initialize isochronous queue
  */
-void *uhci_alloc_isochronous(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id)
+static void *uhci_allocate_isochronous(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id)
 {
        struct uhci_device *dev = usb_to_uhci(usb_dev);
        unsigned long destination, status;
@@ -631,7 +633,7 @@ void *uhci_alloc_isochronous(struct usb_device *usb_dev, unsigned int pipe, void
                td = &isodesc->td[i];
 
                /* The "pipe" thing contains the destination in bits 8--18 */
-               destination = (pipe & 0x0007ff00);
+               destination = (pipe & PIPE_DEVEP_MASK);
 
                if (usb_pipeout(pipe))
                        destination |= 0xE1;    /* OUT */
@@ -667,13 +669,13 @@ void *uhci_alloc_isochronous(struct usb_device *usb_dev, unsigned int pipe, void
        return isodesc;
 }
 
-void uhci_delete_isochronous(struct usb_device *usb_dev, void *_isodesc)
+static void uhci_delete_isochronous(struct usb_device *usb_dev, void *_isodesc)
 {
        struct uhci_iso_td *isodesc = (struct uhci_iso_td *)_isodesc;
 
        /* If it's still scheduled, unschedule them */
        if (isodesc->frame)
-               uhci_unsched_isochronous(usb_dev, isodesc);
+               uhci_unschedule_isochronous(usb_dev, isodesc);
 
        /* Remove it from the IRQ list */
        uhci_remove_irq_list(&isodesc->td[isodesc->num - 1]);
@@ -783,7 +785,7 @@ static int uhci_run_control(struct uhci_device *dev, struct uhci_td *first, stru
  * information, that's just ridiculously high. Most
  * control messages have just a few bytes of data.
  */
-static int uhci_control_msg(struct usb_device *usb_dev, unsigned int pipe, void *cmd, void *data, int len)
+static int uhci_control_msg(struct usb_device *usb_dev, unsigned int pipe, devrequest *cmd, void *data, int len)
 {
        struct uhci_device *dev = usb_to_uhci(usb_dev);
        struct uhci_td *first, *td, *prevtd;
@@ -797,7 +799,7 @@ static int uhci_control_msg(struct usb_device *usb_dev, unsigned int pipe, void
        first = td = uhci_td_allocate(dev);
 
        /* The "pipe" thing contains the destination in bits 8--18, 0x2D is SETUP */
-       destination = (pipe & 0x0007ff00) | 0x2D;
+       destination = (pipe & PIPE_DEVEP_MASK) | 0x2D;
 
        /* Status:    slow/fast,       Active,    Short Packet Detect     Three Errors */
        status = (pipe & (1 << 26)) | (1 << 23)   |   (1 << 29)       |    (3 << 27);
@@ -858,7 +860,7 @@ static int uhci_control_msg(struct usb_device *usb_dev, unsigned int pipe, void
 
        td->backptr = &prevtd->link;
        td->status = (status /* & ~(3 << 27) */) | (1 << 24);   /* no limit on final packet */
-       td->info = destination | (0x7ff << 21);         /* 0 bytes of data */
+       td->info = destination | (UHCI_NULL_DATA_SIZE << 21);   /* 0 bytes of data */
        td->buffer = 0;
        td->first = first;
        td->link = 1;                                   /* Terminate */
@@ -888,7 +890,7 @@ static int uhci_control_msg(struct usb_device *usb_dev, unsigned int pipe, void
        }
 
        if (uhci_debug && ret) {
-               __u8 *p = cmd;
+               __u8 *p = (__u8 *)cmd;
 
                printk("Failed cmd - %02X %02X %02X %02X %02X %02X %02X %02X\n",
                       p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
@@ -1015,10 +1017,10 @@ static int uhci_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *da
          I FORGOT WHAT IT EXACTLY DOES
        */
        if (usb_pipeout(pipe)) {
-               destination = (pipe & 0x0007ff00) | 0xE1;
+               destination = (pipe & PIPE_DEVEP_MASK) | 0xE1;
        }
        else {
-               destination = (pipe & 0x0007ff00) | 0x69;
+               destination = (pipe & PIPE_DEVEP_MASK) | 0x69;
        }
 
        /* Status:    slow/fast,       Active,    Short Packet Detect     Three Errors */
@@ -1176,6 +1178,11 @@ struct usb_operations uhci_device_operations = {
        uhci_bulk_msg,
        uhci_request_irq,
        uhci_release_irq,
+       uhci_allocate_isochronous,
+       uhci_delete_isochronous,
+       uhci_schedule_isochronous,
+       uhci_unschedule_isochronous,
+       uhci_compress_isochronous
 };
 
 /*
@@ -1243,6 +1250,9 @@ static void uhci_connect_change(struct uhci *uhci, unsigned int port, unsigned i
         * and find out what it wants to do..
         */
        usb_dev = uhci_usb_allocate(root_hub->usb);
+       if (!usb_dev)
+               return;
+       
        dev = usb_dev->hcpriv;
 
        dev->uhci = uhci;
@@ -1673,8 +1683,8 @@ static int uhci_control_thread(void * __uhci)
                                printk("UHCI queue dump:\n");
                                show_queues(uhci);
                        } else if (signr == SIGUSR2) {
-                               printk("UHCI debug toggle\n");
                                uhci_debug = !uhci_debug;
+                               printk("UHCI debug toggle = %x\n", uhci_debug);
                        } else {
                                break;
                        }
index 5fa7a7feb0412d8a1d237daab0c6913d78aae319..ea76df0cc1fa9fa82f61fec30393cc50cafc44f4 100644 (file)
@@ -53,6 +53,8 @@
 #define   USBPORTSC_PR         0x0200  /* Port Reset */
 #define   USBPORTSC_SUSP       0x1000  /* Suspend */
 
+#define UHCI_NULL_DATA_SIZE    0x7ff   /* for UHCI controller TD */
+
 struct uhci_qh {
        unsigned int link;      /* Next queue */
        unsigned int element;   /* Queue element pointer */
@@ -238,11 +240,5 @@ void show_td(struct uhci_td * td);
 void show_status(struct uhci *uhci);
 void show_queues(struct uhci *uhci);
 
-int uhci_compress_isochronous(struct usb_device *usb_dev, void *_isodesc);
-int uhci_unsched_isochronous(struct usb_device *usb_dev, void *_isodesc);
-int uhci_sched_isochronous(struct usb_device *usb_dev, void *_isodesc, void *_pisodesc);
-void *uhci_alloc_isochronous(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id);
-void uhci_delete_isochronous(struct usb_device *dev, void *_isodesc);
-
 #endif
 
index f612b100e30b9724010e0760fd47f10ae9df000a..e656cc6c4c8e34a3ffac8f0bb135ee1b7c0b9e87 100644 (file)
@@ -53,12 +53,21 @@ void usb_show_device(struct usb_device *dev)
  */
 void usb_show_device_descriptor(struct usb_device_descriptor *desc)
 {
-       printk("  USB version %x.%02x\n", desc->bcdUSB >> 8, desc->bcdUSB & 0xff);
-       printk("  Vendor:  %04x\n", desc->idVendor);
-       printk("  Product: %04x\n", desc->idProduct);
-       printk("  Configurations: %d\n", desc->bNumConfigurations);
-
-       printk("  Device Class: %d\n", desc->bDeviceClass);
+       printk("  Length              = %2d%s\n", desc->bLength,
+               desc->bLength == USB_DT_DEVICE_SIZE ? "" : " (!!!)");
+       printk("  DescriptorType      = %02x\n", desc->bDescriptorType);
+
+       printk("  USB version         = %x.%02x\n",
+               desc->bcdUSB >> 8, desc->bcdUSB & 0xff);
+       printk("  Vendor:Product      = %04x:%04x\n",
+               desc->idVendor, desc->idProduct);
+       printk("  MaxPacketSize0      = %d\n", desc->bMaxPacketSize0);
+       printk("  NumConfigurations   = %d\n", desc->bNumConfigurations);
+       printk("  Device version      = %x.%02x\n",
+               desc->bcdDevice >> 8, desc->bcdDevice & 0xff);
+
+       printk("  Device Class:SubClass:Protocol = %02x:%02x:%02x\n",
+               desc->bDeviceClass, desc->bDeviceSubClass, desc->bDeviceProtocol);
        switch (desc->bDeviceClass) {
        case 0:
                printk("    Per-interface classes\n");
@@ -78,7 +87,7 @@ void usb_show_config_descriptor(struct usb_config_descriptor * desc)
 {
        printk("Configuration:\n");
        printk("  bLength             = %4d%s\n", desc->bLength,
-               desc->bLength == 9 ? "" : " (!!!)");
+               desc->bLength == USB_DT_CONFIG_SIZE ? "" : " (!!!)");
        printk("  bDescriptorType     =   %02x\n", desc->bDescriptorType);
        printk("  wTotalLength        = %04x\n", desc->wTotalLength);
        printk("  bNumInterfaces      =   %02x\n", desc->bNumInterfaces);
@@ -92,14 +101,13 @@ void usb_show_interface_descriptor(struct usb_interface_descriptor * desc)
 {
        printk("  Interface:\n");
        printk("    bLength             = %4d%s\n", desc->bLength,
-               desc->bLength == 9 ? "" : " (!!!)");
+               desc->bLength == USB_DT_INTERFACE_SIZE ? "" : " (!!!)");
        printk("    bDescriptorType     =   %02x\n", desc->bDescriptorType);
        printk("    bInterfaceNumber    =   %02x\n", desc->bInterfaceNumber);
        printk("    bAlternateSetting   =   %02x\n", desc->bAlternateSetting);
        printk("    bNumEndpoints       =   %02x\n", desc->bNumEndpoints);
-       printk("    bInterfaceClass     =   %02x\n", desc->bInterfaceClass);
-       printk("    bInterfaceSubClass  =   %02x\n", desc->bInterfaceSubClass);
-       printk("    bInterfaceProtocol  =   %02x\n", desc->bInterfaceProtocol);
+       printk("    bInterface Class:SubClass:Protocol =   %02x:%02x:%02x\n",
+               desc->bInterfaceClass, desc->bInterfaceSubClass, desc->bInterfaceProtocol);
        printk("    iInterface          =   %02x\n", desc->iInterface);
 }
 
@@ -108,7 +116,7 @@ void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor * desc)
        char *EndpointType[4] = { "Control", "Isochronous", "Bulk", "Interrupt" };
        printk("    Endpoint:\n");
        printk("      bLength             = %4d%s\n", desc->bLength,
-               desc->bLength == 7 ? "" : " (!!!)");
+               desc->bLength == USB_DT_ENDPOINT_SIZE ? "" : " (!!!)");
        printk("      bDescriptorType     =   %02x\n", desc->bDescriptorType);
        printk("      bEndpointAddress    =   %02x (%s)\n", desc->bEndpointAddress,
                (desc->bEndpointAddress & 0x80) ? "in" : "out");
index 6ef078f5fe91c4cbe946a486d598a07638fd1822..7d7d0eaf01a1e5233f6c85b5739934d186437037 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * driver/usb/usb.c
+ * drivers/usb/usb.c
  *
  * (C) Copyright Linus Torvalds 1999
  *
@@ -647,6 +647,19 @@ int usb_set_port_feature(struct usb_device *dev, int port, int feature)
        return dev->bus->op->control_msg(dev, usb_sndctrlpipe(dev,0), &dr, NULL, 0);
 }
 
+int usb_get_status (struct usb_device *dev, int type, int target, void *data)
+{
+       devrequest dr;
+
+       dr.requesttype = USB_DIR_IN | type;     /* USB_RECIP_DEVICE, _INTERFACE, or _ENDPOINT */
+       dr.request = USB_REQ_GET_STATUS;
+       dr.value = 0;
+       dr.index = target;
+       dr.length = 2;
+
+       return dev->bus->op->control_msg (dev, usb_rcvctrlpipe (dev,0), &dr, data, 2);
+}
+
 int usb_get_hub_status(struct usb_device *dev, void *data)
 {
        devrequest dr;
@@ -928,7 +941,7 @@ int usb_get_stringtable(struct usb_device *dev)
                return -1;
 
        /* get space for strings and index */
-       dev->stringindex = kmalloc(sizeof(char *)*maxindex, GFP_KERNEL);
+       dev->stringindex = kmalloc(sizeof(char *) * (maxindex+1), GFP_KERNEL);
        if (!dev->stringindex)
                return -1;
        dev->stringtable = kmalloc(totalchars, GFP_KERNEL);
@@ -939,7 +952,7 @@ int usb_get_stringtable(struct usb_device *dev)
        }
 
        /* fill them in */
-       memset(dev->stringindex, 0, sizeof(char *)*maxindex);
+       memset(dev->stringindex, 0, sizeof(char *) * (maxindex+1));
        for (i=1, string = dev->stringtable; i <= maxindex; i++) {
                if (usb_get_string(dev, langid, i, buffer, bLengths[i]))
                        continue;
@@ -1097,6 +1110,32 @@ void* usb_request_irq(struct usb_device *dev, unsigned int pipe, usb_device_irq
        return dev->bus->op->request_irq(dev, pipe, handler, period, dev_id);
 }
 
+
+void *usb_allocate_isochronous (struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id)
+{
+       return usb_dev->bus->op->alloc_isoc (usb_dev, pipe, data, len, maxsze, completed, dev_id);
+}
+
+void usb_delete_isochronous (struct usb_device *dev, void *_isodesc)
+{
+       return dev->bus->op->delete_isoc (dev, _isodesc);
+}
+
+int usb_schedule_isochronous (struct usb_device *usb_dev, void *_isodesc, void *_pisodesc)
+{
+       return usb_dev->bus->op->sched_isoc (usb_dev, _isodesc, _pisodesc);
+}
+
+int usb_unschedule_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return usb_dev->bus->op->unsched_isoc (usb_dev, _isodesc);
+}
+
+int usb_compress_isochronous (struct usb_device *usb_dev, void *_isodesc)
+{
+       return usb_dev->bus->op->compress_isoc (usb_dev, _isodesc);
+}
+
 int usb_release_irq(struct usb_device *dev, void* handle)
 {
        return dev->bus->op->release_irq(handle);
index 0472d38e7e607f394095382e61e92b5c865e8696..f9486b6abda7c226bd94d026bd1fac1c08fce895 100644 (file)
@@ -149,6 +149,7 @@ typedef struct {
 #define USB_ST_REMOVED         0x100
 #define USB_ST_TIMEOUT         0x110
 #define USB_ST_INTERNALERROR   -1
+#define USB_ST_NOTSUPPORTED    -2
 
 /*
  * USB device number allocation bitmap. There's one bitmap
@@ -289,6 +290,11 @@ struct usb_operations {
        int (*bulk_msg)(struct usb_device *, unsigned int, void *, int,unsigned long *);
        void* (*request_irq)(struct usb_device *, unsigned int, usb_device_irq, int, void *);
        int (*release_irq)(void* handle);
+       void *(*alloc_isoc)(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int maxsze, usb_device_irq completed, void *dev_id);
+       void (*delete_isoc)(struct usb_device *dev, void *_isodesc);
+       int (*sched_isoc)(struct usb_device *usb_dev, void *_isodesc, void *_pisodesc);
+       int (*unsched_isoc)(struct usb_device *usb_dev, void *_isodesc);
+       int (*compress_isoc)(struct usb_device *usb_dev, void *_isodesc);
 };
 
 /*
@@ -309,8 +315,8 @@ struct usb_device {
        int devnum;                     /* Device number on USB bus */
        int slow;                       /* Slow device? */
        int maxpacketsize;              /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
-       int toggle[2];                  /* one bit for each endpoint ([0] = IN, [1] = OUT) */
-       int halted;                     /* endpoint halts */
+       unsigned int toggle[2];         /* one bit for each endpoint ([0] = IN, [1] = OUT) */
+       unsigned int halted;            /* endpoint halts */
        struct usb_config_descriptor *actconfig;/* the active configuration */
        int epmaxpacket[16];            /* endpoint specific maximums */
        int ifnum;                      /* active interface number */
@@ -356,6 +362,13 @@ void usb_driver_purge(struct usb_driver *,struct usb_device *);
 extern int  usb_parse_configuration(struct usb_device *dev, void *buf, int len);
 extern void usb_destroy_configuration(struct usb_device *dev);
 
+extern void *usb_allocate_isochronous (struct usb_device *usb_dev, unsigned int pipe, void *data, int len,
+                                       int maxsze, usb_device_irq completed, void *dev_id);
+extern void usb_delete_isochronous (struct usb_device *dev, void *_isodesc);
+extern int usb_schedule_isochronous (struct usb_device *usb_dev, void *_isodesc, void *_pisodesc);
+extern int usb_unschedule_isochronous (struct usb_device *usb_dev, void *_isodesc);
+extern int usb_compress_isochronous (struct usb_device *usb_dev, void *_isodesc);
+
 /*
  * Calling this entity a "pipe" is glorifying it. A USB pipe
  * is something embarrassingly simple: it basically consists
@@ -380,7 +393,7 @@ extern void usb_destroy_configuration(struct usb_device *dev);
  *  - device:          bits 8-14
  *  - endpoint:                bits 15-18
  *  - Data0/1:         bit 19
- *  - speed:           bit 26          (00 = Full, 01 = Low Speed)
+ *  - speed:           bit 26          (0 = Full, 1 = Low Speed)
  *  - pipe type:       bits 30-31      (00 = isochronous, 01 = interrupt, 10 = control, 11 = bulk)
  *
  * Why? Because it's arbitrary, and whatever encoding we select is really
@@ -392,19 +405,18 @@ extern void usb_destroy_configuration(struct usb_device *dev);
 #define usb_maxpacket(dev,pipe)        ((dev)->epmaxpacket[usb_pipeendpoint(pipe)])
 #define usb_packetid(pipe)     (((pipe) & 0x80) ? 0x69 : 0xE1)
 
+#define usb_pipeout(pipe)      ((((pipe) >> 7) & 1) ^ 1)
 #define usb_pipedevice(pipe)   (((pipe) >> 8) & 0x7f)
+#define usb_pipe_endpdev(pipe) (((pipe) >> 8) & 0x7ff)
 #define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf)
 #define usb_pipedata(pipe)     (((pipe) >> 19) & 1)
-#define usb_pipeout(pipe)      ((((pipe) >> 7) & 1) ^ 1)
 #define usb_pipeslow(pipe)     (((pipe) >> 26) & 1)
-
 #define usb_pipetype(pipe)     (((pipe) >> 30) & 3)
 #define usb_pipeisoc(pipe)     (usb_pipetype((pipe)) == 0)
 #define usb_pipeint(pipe)      (usb_pipetype((pipe)) == 1)
 #define usb_pipecontrol(pipe)  (usb_pipetype((pipe)) == 2)
 #define usb_pipebulk(pipe)     (usb_pipetype((pipe)) == 3)
 
-#define usb_pipe_endpdev(pipe) (((pipe) >> 8) & 0x7ff)
 #define PIPE_DEVEP_MASK                0x0007ff00
 
 /* The D0/D1 toggle bits */
@@ -448,10 +460,12 @@ int usb_get_device_descriptor(struct usb_device *dev);
 int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size);
 int usb_clear_port_feature(struct usb_device *dev, int port, int feature);
 int usb_set_port_feature(struct usb_device *dev, int port, int feature);
+int usb_get_status (struct usb_device *dev, int type, int target, void *data);
 int usb_get_hub_status(struct usb_device *dev, void *data);
 int usb_get_port_status(struct usb_device *dev, int port, void *data);
 int usb_get_protocol(struct usb_device *dev);
 int usb_set_protocol(struct usb_device *dev, int protocol);
+int usb_set_interface(struct usb_device *dev, int interface, int alternate);
 int usb_set_idle(struct usb_device *dev, int duration, int report_id);
 int usb_set_interface(struct usb_device *dev, int interface, int alternate);
 int usb_set_configuration(struct usb_device *dev, int configuration);
index 20348e9bf2089d0e6e052fd6774f83c980b49879..96407561c9b645149ed4835fbbbc28d4f9f0b974 100644 (file)
@@ -190,7 +190,7 @@ __initfunc(static const char *vgacon_startup(void))
                        vga_video_type = VIDEO_TYPE_EGAM;
                        vga_vram_end = 0xb8000;
                        display_desc = "EGA+";
-                       request_resource(&pci_io_resource, &ega_console_resource);
+                       request_resource(&ioport_resource, &ega_console_resource);
                }
                else
                {
@@ -199,8 +199,8 @@ __initfunc(static const char *vgacon_startup(void))
                        vga_video_type = VIDEO_TYPE_MDA;
                        vga_vram_end = 0xb2000;
                        display_desc = "*MDA";
-                       request_resource(&pci_io_resource, &mda1_console_resource);
-                       request_resource(&pci_io_resource, &mda2_console_resource);
+                       request_resource(&ioport_resource, &mda1_console_resource);
+                       request_resource(&ioport_resource, &mda2_console_resource);
                        vga_video_font_height = 14;
                }
        }
@@ -220,12 +220,12 @@ __initfunc(static const char *vgacon_startup(void))
                                static struct resource ega_console_resource = { "ega", 0x3C0, 0x3DF };
                                vga_video_type = VIDEO_TYPE_EGAC;
                                display_desc = "EGA";
-                               request_resource(&pci_io_resource, &ega_console_resource);
+                               request_resource(&ioport_resource, &ega_console_resource);
                        } else {
                                static struct resource vga_console_resource = { "vga+", 0x3C0, 0x3DF };
                                vga_video_type = VIDEO_TYPE_VGAC;
                                display_desc = "VGA+";
-                               request_resource(&pci_io_resource, &vga_console_resource);
+                               request_resource(&ioport_resource, &vga_console_resource);
 
 #ifdef VGA_CAN_DO_64KB
                                /*
@@ -270,7 +270,7 @@ __initfunc(static const char *vgacon_startup(void))
                        vga_video_type = VIDEO_TYPE_CGA;
                        vga_vram_end = 0xba000;
                        display_desc = "*CGA";
-                       request_resource(&pci_io_resource, &cga_console_resource);
+                       request_resource(&ioport_resource, &cga_console_resource);
                        vga_video_font_height = 8;
                }
        }
index 7df36981863a33411587099349cceef1f81155dd..d11fc40b2d25f0ae06535d79fe6181fc9159c16b 100644 (file)
@@ -1969,6 +1969,7 @@ asmlinkage int sys_bdflush(int func, long data)
                goto out;
 
        if (func == 1) {
+#if 0
                struct mm_struct *user_mm;
                /*
                 * bdflush will spend all of it's time in kernel-space,
@@ -1978,14 +1979,16 @@ asmlinkage int sys_bdflush(int func, long data)
                 */
                user_mm = current->mm;
                mmget(user_mm);
-               current->flags |= PF_LAZY_TLB;
+               current->mm = NULL;
+#endif
 
                error = sync_old_buffers();
 
-               current->flags &= ~PF_LAZY_TLB;
-               SET_PAGE_DIR(current, user_mm->pgd);
-               mmput(current->mm);
+#if 0
                current->mm = user_mm;
+               mmput(current->active_mm);
+               current->active_mm = user_mm;
+#endif
 
                goto out;
        }
index 887f9145ade3d1c5e20bbb2a9bf6ba77459a7366..d583614b4ff486e417afdc30809f7d9511c2d187 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -368,7 +368,7 @@ static int exec_mmap(void)
        struct mm_struct * mm, * old_mm;
        int retval;
 
-       if (atomic_read(&current->mm->count) == 1) {
+       if (current->mm && atomic_read(&current->mm->count) == 1) {
                flush_cache_mm(current->mm);
                mm_release();
                release_segments(current->mm);
@@ -385,10 +385,12 @@ static int exec_mmap(void)
        mm->cpu_vm_mask = (1UL << smp_processor_id());
        mm->total_vm = 0;
        mm->rss = 0;
+
        /*
         * Make sure we have a private LDT if needed ...
         */
-       copy_segments(current, mm);
+       if (current->mm)
+               copy_segments(current, mm);
 
        old_mm = current->mm;
        current->mm = mm;
@@ -396,9 +398,9 @@ static int exec_mmap(void)
        if (retval)
                goto fail_restore;
        activate_context(current);
-       up(&mm->mmap_sem);
        mm_release();
-       mmput(old_mm);
+       if (old_mm)
+               mmput(old_mm);
        return 0;
 
        /*
index cf4c13fdefb3d0915ebcea4194e9b841a82dbbb3..d90529f24e02dc45613f2a43d520593ac021573a 100644 (file)
@@ -349,6 +349,9 @@ ncp_lookup_validate(struct dentry * dentry, int flags)
        int len = dentry->d_name.len;      
        struct ncpfs_inode_info finfo;
        __u8 __name[dentry->d_name.len + 1];
+
+       if (!dir)
+               return 0;
         
        server = NCP_SERVER(dir);
 
index 899b62c8219307782fa17d34ce08fb1ccc95a173..a7960c1e0af41a353e6b97cbaf99d80c9911f87c 100644 (file)
@@ -152,7 +152,7 @@ nfs_readpage_result(struct rpc_task *task)
                fail++;
                dprintk("NFS: %d successful reads, %d failures\n", succ, fail);
        }
-       page->owner = (int)current; // HACK, FIXME, will go away.
+       page->owner = current; // HACK, FIXME, will go away.
        UnlockPage(page);
        free_page(address);
 
index e5671587d2a72fe6665a5d1cf5cfcf0ffdc3d81f..adce46f3010a6921a1ff7baf1d764f57f1b831d1 100644 (file)
@@ -742,7 +742,7 @@ static inline char * task_mem(struct task_struct *p, char *buffer)
 {
        struct mm_struct * mm = p->mm;
 
-       if (mm && mm != &init_mm) {
+       if (mm) {
                struct vm_area_struct * vma = mm->mmap;
                unsigned long data = 0, stack = 0;
                unsigned long exec = 0, lib = 0;
@@ -868,7 +868,7 @@ static int get_stat(int pid, char * buffer)
                return 0;
        state = *get_task_state(tsk);
        vsize = eip = esp = 0;
-       if (tsk->mm && tsk->mm != &init_mm) {
+       if (tsk->mm) {
                struct vm_area_struct *vma = tsk->mm->mmap;
                while (vma) {
                        vsize += vma->vm_end - vma->vm_start;
@@ -1025,7 +1025,7 @@ static int get_statm(int pid, char * buffer)
        read_unlock(&tasklist_lock);    /* FIXME!! This should be done after the last use */
        if (!tsk)
                return 0;
-       if (tsk->mm && tsk->mm != &init_mm) {
+       if (tsk->mm) {
                struct vm_area_struct * vma = tsk->mm->mmap;
 
                while (vma) {
@@ -1111,7 +1111,7 @@ static ssize_t read_maps (int pid, struct file * file, char * buf,
        if (!p)
                goto freepage_out;
 
-       if (!p->mm || p->mm == &init_mm || count == 0)
+       if (!p->mm || count == 0)
                goto getlen_out;
 
        /* Check whether the mmaps could change if we sleep */
@@ -1378,8 +1378,6 @@ static int process_unauthorized(int type, int pid)
                ok = p->dumpable;
                if(!cap_issubset(p->cap_permitted, current->cap_permitted))
                        ok=0;                   
-               if(!p->mm)      /* Scooby scooby doo where are you ? */
-                       p=NULL;
        }
                
        read_unlock(&tasklist_lock);
index c02ac8df5d65592a7332dec24993ebbbe43fdcd1..5e7f3c8637ccfadc47e0ef69199d326aa4f0db89 100644 (file)
@@ -167,6 +167,9 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                else
                        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
        }
+
+       if (!user_mode(regs))
+               do_profile(instruction_pointer(regs));
 }
 
 static struct irqaction timerirq = {
index 5cad8350230b480af90880358d5a43ba27f89c74..afa7275b0c14f0f697c47f46f97b79e9c31f5490 100644 (file)
@@ -40,5 +40,7 @@
 #define FLUSH_BASE             0xdf000000
 #define PCIO_BASE              0xf0000000
 
+#define PARAMS_BASE            (PAGE_OFFSET + 0x400)
+
 #endif
 
index b23ee68634fad2093c235cc7514d33dd738464ef..f99e1dc6bf71ed635f891d129a19cd272b830547 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * linux/include/asm-arm/arch-ebsa285/io.h
  *
- * Copyright (C) 1997,1998 Russell King
+ * Copyright (C) 1997-1999 Russell King
  *
  * Modifications:
- *  06-Dec-1997        RMK     Created.
+ *  06-12-1997 RMK     Created.
+ *  07-04-1999 RMK     Major cleanup
  */
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 #undef ARCH_IO_DELAY
 #define ARCH_READWRITE
 
-/*
- * Dynamic IO functions - let the compiler
- * optimize the expressions
- */
-#define DECLARE_DYN_OUT(fnsuffix,instr,typ)                            \
-extern __inline__ void                                                 \
-__out##fnsuffix (unsigned int value, unsigned int port)                        \
-{                                                                      \
-       __asm__ __volatile__(                                           \
-       "str%?" ##instr## "     %0, [%1, %2]    @ out"###fnsuffix       \
-       :                                                               \
-       : "r" (value), "r" (PCIO_BASE), typ (port));                    \
-}
+#define __pci_io_addr(x)       (PCIO_BASE + (unsigned int)(x))
 
-#define DECLARE_DYN_IN(sz,fnsuffix,instr,typ)                          \
-extern __inline__ unsigned sz                                          \
-__in##fnsuffix (unsigned int port)                                     \
-{                                                                      \
-       unsigned long value;                                            \
-       __asm__ __volatile__(                                           \
-       "ldr%?" ##instr## "     %0, [%1, %2]    @ in"###fnsuffix        \
-       : "=&r" (value)                                                 \
-       : "r" (PCIO_BASE), typ (port));                                 \
-       return (unsigned sz)value;                                      \
-}
+#define __inb(p)               (*(volatile unsigned char *)__pci_io_addr(p))
+#define __inl(p)               (*(volatile unsigned long *)__pci_io_addr(p))
 
-extern __inline__ unsigned int __ioaddr (unsigned int port)            \
-{                                                                      \
-       return (unsigned int)(PCIO_BASE + port);                        \
+extern __inline__ unsigned int __inw(unsigned int port)
+{
+       unsigned int value;
+       __asm__ __volatile__(
+       "ldr%?h %0, [%1, %2]    @ inw"
+       : "=&r" (value)
+       : "r" (PCIO_BASE), "r" (port));
+       return value;
 }
 
-#define DECLARE_IO(sz,fnsuffix,instr,typ)      \
-       DECLARE_DYN_OUT(fnsuffix,instr,typ)     \
-       DECLARE_DYN_IN(sz,fnsuffix,instr,typ)
-
-DECLARE_IO(char,b,"b","Jr")
-DECLARE_IO(short,w,"h","r")
-DECLARE_IO(long,l,"","Jr")
-
-#undef DECLARE_IO
-#undef DECLARE_DYN_OUT
-#undef DECLARE_DYN_IN
-
-/*
- * Constant address IO functions
- *
- * These have to be macros for the 'J' constraint to work -
- * +/-4096 immediate operand.
- */
-#define __outbc(value,port)                                            \
-({                                                                     \
-       __asm__ __volatile__(                                           \
-       "str%?b %0, [%1, %2]                            @ outbc"        \
-       :                                                               \
-       : "r" (value), "r" (PCIO_BASE), "Jr" (port));                   \
-})
 
-#define __inbc(port)                                                   \
-({                                                                     \
-       unsigned char result;                                           \
-       __asm__ __volatile__(                                           \
-       "ldr%?b %0, [%1, %2]                            @ inbc"         \
-       : "=r" (result)                                                 \
-       : "r" (PCIO_BASE), "Jr" (port));                                \
-       result;                                                         \
-})
-
-#define __outwc(value,port)                                            \
-({                                                                     \
-       __asm__ __volatile__(                                           \
-       "str%?h %0, [%1, %2]                            @ outwc"        \
-       :                                                               \
-       : "r" (value), "r" (PCIO_BASE), "r" (port));                    \
-})
+#define __outb(v,p)            (*(volatile unsigned char *)__pci_io_addr(p) = (v))
+#define __outl(v,p)            (*(volatile unsigned long *)__pci_io_addr(p) = (v))
 
-#define __inwc(port)                                                   \
-({                                                                     \
-       unsigned short result;                                          \
-       __asm__ __volatile__(                                           \
-       "ldr%?h %0, [%1, %2]                            @ inwc"         \
-       : "=r" (result)                                                 \
-       : "r" (PCIO_BASE), "r" (port));                                 \
-       result & 0xffff;                                                \
-})
-
-#define __outlc(value,port)                                            \
-({                                                                     \
-       __asm__ __volatile__(                                           \
-       "str%?  %0, [%1, %2]                            @ outlc"        \
-       :                                                               \
-       : "r" (value), "r" (PCIO_BASE), "Jr" (port));                   \
-})
-
-#define __inlc(port)                                                   \
-({                                                                     \
-       unsigned long result;                                           \
-       __asm__ __volatile__(                                           \
-       "ldr%?  %0, [%1, %2]                            @ inlc"         \
-       : "=r" (result)                                                 \
-       : "r" (PCIO_BASE), "Jr" (port));                                \
-       result;                                                         \
-})
-
-#define __ioaddrc(port)                                                        \
-({                                                                     \
-       unsigned long addr;                                             \
-       addr = PCIO_BASE + port;                                        \
-       addr;                                                           \
-})
-
-/*
- * Translated address IO functions
- *
- * IO address has already been translated to a virtual address
- */
-#define outb_t(v,p)                                                    \
-       (*(volatile unsigned char *)(p) = (v))
-
-#define inb_t(p)                                                       \
-       (*(volatile unsigned char *)(p))
-
-#define outl_t(v,p)                                                    \
-       (*(volatile unsigned long *)(p) = (v))
+extern __inline__ void __outw(unsigned int value, unsigned int port)
+{
+       __asm__ __volatile__(
+       "str%?h %0, [%1, %2]    @ outw"
+       : : "r" (value), "r" (PCIO_BASE), "r" (port));
+}
 
-#define inl_t(p)                                                       \
-       (*(volatile unsigned long *)(p))
+#define __ioaddr(p)    __pci_io_addr(p)
 
 /*
  * ioremap support - validate a PCI memory address,
@@ -151,7 +53,7 @@ DECLARE_IO(long,l,"","Jr")
  * address for the page tables.
  */
 #define valid_ioaddr(iomem,size) ((iomem) < 0x80000000 && (iomem) + (size) <= 0x80000000)
-#define io_to_phys(iomem)      ((iomem) + DC21285_PCI_MEM)
+#define io_to_phys(iomem)       ((iomem) + DC21285_PCI_MEM)
 
 /*
  * Fudge up IO addresses by this much.  Once we're confident that nobody
@@ -178,28 +80,20 @@ DECLARE_IO(long,l,"","Jr")
 
 extern void iounmap(void *addr);
 
-#define DECLARE_PCI_WRITE(typ,fnsuffix)                                        \
-static inline void write##fnsuffix(unsigned typ val, unsigned int addr)        \
-{                                                                      \
-       *(volatile unsigned typ *)(IO_FUDGE_FACTOR + addr) = val;       \
-}
+#define __pci_mem_addr(x)      ((void *)(IO_FUDGE_FACTOR + (unsigned long)(x)))
 
-#define DECLARE_PCI_READ(typ,fnsuffix)                                 \
-static inline unsigned typ read##fnsuffix (unsigned int addr)          \
-{                                                                      \
-       return *(volatile unsigned typ *)(IO_FUDGE_FACTOR + addr);      \
-}
+#define readb(addr)    (*(volatile unsigned char *)__pci_mem_addr(addr))
+#define readw(addr)    (*(volatile unsigned short *)__pci_mem_addr(addr))
+#define readl(addr)    (*(volatile unsigned long *)__pci_mem_addr(addr))
 
-#define DECLARE_PCI(typ,fnsuffix)                                      \
-       DECLARE_PCI_WRITE(typ,fnsuffix)                                 \
-       DECLARE_PCI_READ(typ,fnsuffix)
+#define writeb(b,addr) (*(volatile unsigned char *)__pci_mem_addr(addr) = (b))
+#define writew(b,addr) (*(volatile unsigned short *)__pci_mem_addr(addr) = (b))
+#define writel(b,addr) (*(volatile unsigned long *)__pci_mem_addr(addr) = (b))
 
-DECLARE_PCI(char,b)
-DECLARE_PCI(short,w)
-DECLARE_PCI(long,l)
+#define memset_io(a,b,c)       memset(__pci_mem_addr(a),(b),(c))
+#define memcpy_fromio(a,b,c)   memcpy((a),__pci_mem_addr(b),(c))
+#define memcpy_toio(a,b,c)     memcpy(__pci_mem_addr(a),(b),(c))
 
-#undef DECLARE_PCI
-#undef DECLARE_PCI_READ
-#undef DECLARE_PCI_WRITE
+#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__pci_mem_addr(b),(c),(d))
 
 #endif
index ca1a55cdb4ae65dd654e485c27f19a23a9540766..37b07af4437101b45228a5241cdb05782150fb76 100644 (file)
@@ -159,6 +159,8 @@ static __inline__ void irq_init_irq(void)
        if (isa_irq != -1) {
                /*
                 * Setup, and then probe for an ISA PIC
+                * If the PIC is not there, then we
+                * ignore the PIC.
                 */
                outb(0x11, PIC_LO);
                outb(_ISA_IRQ(0), PIC_MASK_LO); /* IRQ number           */
index 7c5cd89c454fdd1525edf3c7559869863a36dd28..a7579761a77669492d652d3e321d45b8634a9934 100644 (file)
@@ -115,6 +115,9 @@ static void isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                else
                        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
        }
+
+       if (!user_mode(regs))
+               do_profile(instruction_pointer(regs));
 }
 
 static struct irqaction isa_timer_irq = {
@@ -257,6 +260,9 @@ static void __ebsa285_text timer1_interrupt(int irq, void *dev_id, struct pt_reg
                else
                        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
        }
+
+       if (!user_mode(regs))
+               do_profile(instruction_pointer(regs));
 }
 
 static struct irqaction __ebsa285_data timer1_irq = {
@@ -279,22 +285,20 @@ set_dummy_time(unsigned long secs)
  */
 extern __inline__ void setup_timer(void)
 {
-       switch(machine_arch_type) {
-       case MACH_TYPE_CO285:
+       if (machine_arch_type == MACH_TYPE_CO285)
                /*
                 * Add-in 21285s shouldn't access the RTC
                 */
                rtc_base = 0;
-               break;
-
-       default:
+       else
                rtc_base = 0x70;
-               break;
-       }
 
        if (rtc_base) {
                int reg_d, reg_b;
 
+               /*
+                * Probe for the RTC.
+                */
                reg_d = CMOS_READ(RTC_REG_D);
 
                /*
@@ -314,7 +318,7 @@ extern __inline__ void setup_timer(void)
                    CMOS_READ(RTC_REG_B) == reg_b) {
 
                        /*
-                        * Check the battery
+                        * We have a RTC.  Check the battery
                         */
                        if ((reg_d & 0x80) == 0)
                                printk(KERN_WARNING "RTC: *** warning: CMOS battery bad\n");
@@ -332,7 +336,6 @@ extern __inline__ void setup_timer(void)
                xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0);
                set_rtc_mmss = set_dummy_time;
        }
-
        if (machine_is_ebsa285() || machine_is_co285()) {
                gettimeoffset = timer1_gettimeoffset;
 
index b28666b37501d668f977fd45c333c004f11f266b..0ac40356ae4e875ea3e1b13afad0f7bee0b504a7 100644 (file)
@@ -151,7 +151,7 @@ extern __inline__ unsigned long get_rtc_time(void)
         */
        buf[4] &= 0x1f;
        buf[3] &= 0x3f;
-printk("Year %4d mon %02X day %02X hour %02X min %02X sec %02X\n", year, buf[4], buf[3], buf[2], buf[1], buf[0]);
+
        for (i = 0; i < 5; i++)
                BCD_TO_BIN(buf[i]);
 
@@ -175,6 +175,9 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                else
                        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
        }
+
+       if (!user_mode(regs))
+               do_profile(instruction_pointer(regs));
 }
 
 static struct irqaction timerirq = {
index 35db8e667f056eb5247f096b20d32f97e783cc2d..c6efd60da0f9ba9d7a6077c4cdb3a67067b0d3cd 100644 (file)
 
 extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
 
-/*
- * String version of IO memory access ops:
- */
-extern void _memcpy_fromio(void *, unsigned long, unsigned long);
-extern void _memcpy_toio(unsigned long, const void *, unsigned long);
-extern void _memset_io(unsigned long, int, unsigned long);
-
-#define memcpy_fromio(to,from,len)     _memcpy_fromio((to),(unsigned long)(from),(len))
-#define memcpy_toio(to,from,len)       _memcpy_toio((unsigned long)(to),(from),(len))
-#define memset_io(addr,c,len)          _memset_io((unsigned long)(addr),(c),(len))
-
 #endif
 
 #include <asm/hardware.h>
@@ -121,8 +110,12 @@ __IO(l,"",long)
  * This macro will give you the translated IO address for this particular
  * architecture, which can be used with the out_t... functions.
  */
+#ifdef __ioaddrc
 #define ioaddr(port)   \
   (__builtin_constant_p((port)) ? __ioaddrc((port)) : __ioaddr((port)))
+#else
+#define ioaddr(port) __ioaddr((port))
+#endif
 
 #ifndef ARCH_IO_DELAY
 /*
@@ -205,6 +198,19 @@ __IO(l,"",long)
 
 #endif
 
+#ifndef memcpy_fromio
+/*
+ * String version of IO memory access ops:
+ */
+extern void _memcpy_fromio(void *, unsigned long, unsigned long);
+extern void _memcpy_toio(unsigned long, const void *, unsigned long);
+extern void _memset_io(unsigned long, int, unsigned long);
+
+#define memcpy_fromio(to,from,len)     _memcpy_fromio((to),(unsigned long)(from),(len))
+#define memcpy_toio(to,from,len)       _memcpy_toio((unsigned long)(to),(from),(len))
+#define memset_io(addr,c,len)          _memset_io((unsigned long)(addr),(c),(len))
+#endif
+
 /*
  * This isn't especially architecture dependent so it seems like it
  * might as well go here as anywhere.
index 704b99b05cda2b42692d296ca57a4dac8000e0f7..b047806fa2cc67a74883a6d3140fef5a9345a98d 100644 (file)
@@ -6,6 +6,19 @@
 
 #ifdef __KERNEL__
 
+#ifndef __ASSEMBLY__
+
+#define BUG() do { \
+       printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+       *(int *)0 = 0; \
+} while (0)
+
+#define PAGE_BUG(page) do { \
+       BUG(); \
+} while (0)
+
+#endif /* __ASSEMBLY__ */
+
 #define get_user_page(vaddr)           __get_free_page(GFP_KERNEL)
 #define free_user_page(page, addr)     free_page(addr)
 #define clear_page(page)               memzero((void *)(page), PAGE_SIZE)
index 97141aa25f103b3e0197b36248fc9fb9467aba68..1282c7469c4e4a7e7fbaf5b151549f7cfc1593a2 100644 (file)
@@ -40,12 +40,20 @@ typedef unsigned long mm_segment_t;         /* domain register      */
 #include <asm/arch/processor.h>
 #include <asm/proc/processor.h>
 
+struct debug_info {
+       int                             nsaved;
+       struct {
+               unsigned long           address;
+               unsigned long           insn;
+       } bp[2];
+};
+
 struct thread_struct {
        unsigned long                   address;          /* Address of fault   */
        unsigned long                   trap_no;          /* Trap number        */
        unsigned long                   error_code;       /* Error code of trap */
        union fp_state                  fpstate;          /* FPE save state     */
-       unsigned long                   debug[NR_DEBUGS]; /* Debug/ptrace       */
+       struct debug_info               debug;            /* Debug/ptrace       */
        struct context_save_struct      *save;            /* context save       */
        unsigned long                   memmap;           /* page tables        */
        EXTRA_THREAD_STRUCT
index 74022ebae27cb2b6f668c1e9f31edfae350b9372..98d277259cd2a003ec227a93acd1e7d82147d21e 100644 (file)
@@ -54,7 +54,7 @@ typedef EMPTY_STRUCT spinlock_t;
 #define SPIN_LOCK_UNLOCKED EMPTY_STRUCT_INIT(spinlock_t)
 
 #define spin_lock_init(lock)   do { } while(0)
-#define spin_lock(lock)                do { } while(0)
+#define spin_lock(lock)                (void)(lock) /* Not "unused variable". */
 #define spin_trylock(lock)     (1)
 #define spin_unlock_wait(lock) do { } while(0)
 #define spin_unlock(lock)      do { } while(0)
@@ -105,9 +105,9 @@ typedef struct {
 typedef EMPTY_STRUCT rwlock_t;
 #define RW_LOCK_UNLOCKED EMPTY_STRUCT_INIT(rwlock_t)
 
-#define read_lock(lock)                do { } while(0)
+#define read_lock(lock)                (void)(lock) /* Not "unused variable". */
 #define read_unlock(lock)      do { } while(0)
-#define write_lock(lock)       do { } while(0)
+#define write_lock(lock)       (void)(lock) /* Not "unused variable". */
 #define write_unlock(lock)     do { } while(0)
 
 #else
index d185c87bb25ef75da721dfadb081e89259285e78..9c72b0173dd292e0cfcb0c33775f24c1c58e49bd 100644 (file)
@@ -14,6 +14,7 @@ extern char * strchr(const char * s, int c);
 #define __HAVE_ARCH_MEMCPY
 #define __HAVE_ARCH_MEMMOVE
 #define __HAVE_ARCH_MEMSET
+#define __HAVE_ARCH_MEMCHR
 
 #define __HAVE_ARCH_MEMZERO
 extern void memzero(void *ptr, int n);
index 80252899dcfa9926c250dd614dc2361572c647d7..cfb62a24f338c67d4cf1a3919edb105001a4a625 100644 (file)
@@ -32,6 +32,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_CLPS7110     9
 #define MACH_TYPE_ARCHIMEDES   10
 #define MACH_TYPE_A5K          11
+#define MACH_TYPE_SA1100       12      /* not allocated!!! */
 
 /*
  * Sort out a definition for machine_arch_type
index c47b52a9215a2d3295af737bb587c6f8cf648689..b2d0bf6cf640c3e377d0a89f85a14fd41a5deaec 100644 (file)
  * This all means that kernel threads have about as much overhead as
  * a function call ...
  */
-#define get_mmu_context(prev, next) \
-       do { if (next->flags & PF_LAZY_TLB) \
-               { mmget(prev->mm); next->mm = prev->mm; \
-                       next->thread.cr3 = prev->thread.cr3; } } while(0)
-
-#define put_mmu_context(prev, next) \
-       do { if (prev->flags & PF_LAZY_TLB) \
-                       { mmput(prev->mm); } } while(0)
+#define get_mmu_context(next) do { } while (0)
+#define set_mmu_context(prev,next) do { next->thread.cr3 = prev->thread.cr3; } while(0)
 
 #define init_new_context(mm)   do { } while(0)
 /*
index 66eae8442801074dc14ff88b58cd588e849a4e8b..1ba8f67667611c4ef8f5262bf2039c3584d068c1 100644 (file)
@@ -307,9 +307,6 @@ extern pte_t * __bad_pagetable(void);
 do { \
        unsigned long __pgdir = __pa(pgdir); \
        (tsk)->thread.cr3 = __pgdir; \
-       /* do not inherit lazy-TLB after exec() */ \
-       if ((pgdir != swapper_pg_dir) && ((tsk)->flags & PF_LAZY_TLB)) \
-               (tsk)->flags &= ~PF_LAZY_TLB; \
        if ((tsk) == current) \
                __asm__ __volatile__("movl %0,%%cr3": :"r" (__pgdir)); \
 } while (0)
index f56bf6690c39b42d59de04c8f1b26afc7f434d8c..0bc1afc9150c96e2aec45a7efd072d97be128c78 100644 (file)
@@ -96,7 +96,7 @@ struct cpuinfo_x86 {
 #define X86_FEATURE_AMD3D      0x80000000
 
 extern struct cpuinfo_x86 boot_cpu_data;
-extern struct hard_thread_struct init_tss[NR_CPUS];
+extern struct tss_struct init_tss[NR_CPUS];
 
 #ifdef __SMP__
 extern struct cpuinfo_x86 cpu_data[];
@@ -221,7 +221,7 @@ extern unsigned int mca_pentium_flag;
  * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
  */
 #define IO_BITMAP_SIZE 32
-#define IO_BITMAP_OFFSET offsetof(struct hard_thread_struct,io_bitmap)
+#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
 #define INVALID_IO_BITMAP_OFFSET 0x8000
 
 struct i387_hard_struct {
@@ -259,7 +259,7 @@ typedef struct {
        unsigned long seg;
 } mm_segment_t;
 
-struct hard_thread_struct {
+struct tss_struct {
        unsigned short  back_link,__blh;
        unsigned long   esp0;
        unsigned short  ss0,__ss0h;
@@ -290,7 +290,7 @@ struct hard_thread_struct {
        unsigned long __cacheline_filler[5];
 };
 
-struct soft_thread_struct {
+struct thread_struct {
        unsigned long   esp0;
        unsigned long   cr3;
        unsigned long   eip;
@@ -392,7 +392,7 @@ extern void forget_segments(void);
 /*
  * Return saved PC of a blocked thread.
  */
-extern inline unsigned long thread_saved_pc(struct soft_thread_struct *t)
+extern inline unsigned long thread_saved_pc(struct thread_struct *t)
 {
        return ((unsigned long *)t->esp)[3];
 }
index c1c79c96e73d8c217420f56aaf1f8134b9780201..044433b2039a1955db03457631e84478e6f566a4 100644 (file)
@@ -490,7 +490,26 @@ struct ZFW_CTRL {
 /****************** ****************** *******************/
 #endif
 
+/* Per card data structure */
+struct cyclades_card {
+    long base_addr;
+    long ctl_addr;
+    int irq;
+    int num_chips;     /* 0 if card absent, -1 if Z/PCI, else Y */
+    int first_line;    /* minor number of first channel on card */
+    int bus_index;     /* address shift - 0 for ISA, 1 for PCI */
+    int        intr_enabled;   /* FW Interrupt flag - 0 disabled, 1 enabled */
+#ifdef __KERNEL__
+    spinlock_t card_lock;
+#else
+    uclong filler;
+#endif
 
+};
+
+struct cyclades_chip {
+  int filler;
+};
 
 
 #ifdef __KERNEL__
@@ -508,22 +527,6 @@ struct ZFW_CTRL {
 #define cy_readw(port)  readw(port)
 #define cy_readl(port)  readl(port)
 
-/* Per card data structure */
-
-struct cyclades_card {
-    long base_addr;
-    long ctl_addr;
-    int irq;
-    int num_chips;     /* 0 if card absent, -1 if Z/PCI, else Y */
-    int first_line;    /* minor number of first channel on card */
-    int bus_index;     /* address shift - 0 for ISA, 1 for PCI */
-    int        intr_enabled;   /* FW Interrupt flag - 0 disabled, 1 enabled */
-};
-
-struct cyclades_chip {
-  int filler;
-};
-
 /*
  * This is our internal structure for each serial port's state.
  * 
@@ -568,16 +571,16 @@ struct cyclades_port {
        int                     xmit_cnt;
         int                     default_threshold;
         int                     default_timeout;
-       struct tq_struct        tqueue;
+       unsigned long           jiffies[3];
+       unsigned long           rflush_count;
        struct termios          normal_termios;
        struct termios          callout_termios;
-       wait_queue_head_t       open_wait;
-       wait_queue_head_t       close_wait;
-       wait_queue_head_t       shutdown_wait;
         struct cyclades_monitor mon;
-       unsigned long           jiffies[3];
-       unsigned long           rflush_count;
        struct cyclades_idle_stats   idle_stats;
+       struct tq_struct        tqueue;
+       wait_queue_head_t       open_wait;
+       wait_queue_head_t       close_wait;
+       wait_queue_head_t       shutdown_wait;
 };
 
 /*
index 597b3ebce50540e39a6331925d26c3802266d24a..e4672ec82ee0551b6294b68d891c2b2fa84fd151 100644 (file)
@@ -19,8 +19,9 @@ struct resource {
        struct resource *parent, *sibling, *child;
 };
 
-extern struct resource pci_io_resource;
-extern struct resource pci_mem_resource;
+/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
+extern struct resource ioport_resource;
+extern struct resource iomem_resource;
 
 extern void reserve_setup(char *str, int *ints);
 extern int get_resource_list(struct resource *, char *buf, int size);
@@ -29,17 +30,17 @@ extern int request_resource(struct resource *root, struct resource *new);
 extern int release_resource(struct resource *new);
 
 /* Convenience shorthand with allocation */
-#define request_region(start,n,name)   __request_region(&pci_io_resource, (start), (n), (name))
+#define request_region(start,n,name)   __request_region(&ioport_resource, (start), (n), (name))
 extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
 
 /* Compatibility cruft */
-#define check_region(start,n)  __check_region(&pci_io_resource, (start), (n))
-#define release_region(start,n)        __release_region(&pci_io_resource, (start), (n))
+#define check_region(start,n)  __check_region(&ioport_resource, (start), (n))
+#define release_region(start,n)        __release_region(&ioport_resource, (start), (n))
 extern int __check_region(struct resource *, unsigned long, unsigned long);
 extern void __release_region(struct resource *, unsigned long, unsigned long);
 
-#define get_ioport_list(buf)   get_resource_list(&pci_io_resource, buf, PAGE_SIZE)
-#define get_mem_list(buf)      get_resource_list(&pci_mem_resource, buf, PAGE_SIZE)
+#define get_ioport_list(buf)   get_resource_list(&ioport_resource, buf, PAGE_SIZE)
+#define get_mem_list(buf)      get_resource_list(&iomem_resource, buf, PAGE_SIZE)
 
 #define HAVE_AUTOIRQ
 extern void autoirq_setup(int waittime);
index 2e83963898937012058af9c83bdd57ffe1afef4a..8e5ca6d34c8c3c66ad807d5f47a091e732c149ab 100644 (file)
@@ -35,7 +35,6 @@ extern unsigned long event;
 #define CLONE_PID      0x00001000      /* set if pid shared */
 #define CLONE_PTRACE   0x00002000      /* set if we want to let tracing continue on the child too */
 #define CLONE_VFORK    0x00004000      /* set if the parent wants the child to wake it up on mm_release */
-#define CLONE_TLB      0x00008000      /* system thread does lazy TLB flushing (kernel-internal only!) */
 
 /*
  * These are the constant used to fake the fixed-point load-average
@@ -194,7 +193,7 @@ struct mm_struct {
 #define INIT_MM(name) {                                        \
                &init_mmap, NULL, NULL,                 \
                swapper_pg_dir,                         \
-               ATOMIC_INIT(1), 1,                      \
+               ATOMIC_INIT(2), 1,                      \
                __MUTEX_INITIALIZER(name.mmap_sem),     \
                SPIN_LOCK_UNLOCKED,                     \
                0,                                      \
@@ -302,13 +301,14 @@ struct task_struct {
        struct sem_undo *semundo;
        struct sem_queue *semsleeping;
 /* CPU-specific state of this task */
-       struct soft_thread_struct thread;
+       struct thread_struct thread;
 /* filesystem information */
        struct fs_struct *fs;
 /* open file information */
        struct files_struct *files;
+
 /* memory management info */
-       struct mm_struct *mm;
+       struct mm_struct *mm, *active_mm;
 
 /* signal handlers */
        spinlock_t sigmask_lock;        /* Protects signal and blocked */
@@ -334,7 +334,6 @@ struct task_struct {
 #define PF_SIGNALED    0x00000400      /* killed by a signal */
 #define PF_MEMALLOC    0x00000800      /* Allocating memory */
 #define PF_VFORK       0x00001000      /* Wake up parent in mm_release */
-#define PF_LAZY_TLB    0x00002000      /* thread does lazy TLB switching */
 
 #define PF_USEDFPU     0x00100000      /* task used FPU this quantum (SMP) */
 #define PF_DTRACE      0x00200000      /* delayed trace (used on m68k, i386) */
@@ -381,7 +380,7 @@ struct task_struct {
 /* thread */   INIT_THREAD, \
 /* fs */       &init_fs, \
 /* files */    &init_files, \
-/* mm */       &init_mm, \
+/* mm */       NULL, &init_mm, \
 /* signals */  SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
 }
 
index a0277d6dc977a46f295b62377678c29a4d7a3e09..363d3256200d71a7fd3bb20ed167271d64d51d38 100644 (file)
@@ -233,17 +233,31 @@ static inline void __exit_mm(struct task_struct * tsk)
 {
        struct mm_struct * mm = tsk->mm;
 
-       /* Set us up to use the kernel mm state */
-       if (mm != &init_mm) {
-               flush_cache_mm(mm);
-               flush_tlb_mm(mm);
-               destroy_context(mm);
-               tsk->mm = &init_mm;
+       /* Lazy TLB process? */
+       if (!mm) {
+               struct mm_struct *active_mm = tsk->active_mm;
+               mmget(&init_mm);
+               tsk->active_mm = &init_mm;
                tsk->swappable = 0;
-               SET_PAGE_DIR(tsk, swapper_pg_dir);
-               mm_release();
-               mmput(mm);
+               SET_PAGE_DIR(tsk, swapper_pg_dir);              
+               if (active_mm)
+                       mmput(active_mm);
+               return;
        }
+
+       /* Set us up to use the kernel mm state */
+       flush_cache_mm(mm);
+       flush_tlb_mm(mm);
+       destroy_context(mm);
+       mm_release();
+
+       /* This turns us into a task with no MM */
+       tsk->mm = NULL;
+       tsk->active_mm = &init_mm;
+       mmget(&init_mm);
+       tsk->swappable = 0;
+       SET_PAGE_DIR(tsk, swapper_pg_dir);
+       mmput(mm);
 }
 
 void exit_mm(struct task_struct *tsk)
index 9dc2a56976d6c96dd41b89453f92ccadf6d7729b..8fd12d51824142f218a26d95c19e10e02233977c 100644 (file)
@@ -232,6 +232,9 @@ static inline int dup_mmap(struct mm_struct * mm)
        struct vm_area_struct * mpnt, *tmp, **pprev;
        int retval;
 
+       /* Kill me slowly. UGLY! FIXME! */
+       memcpy(&mm->start_code, &current->mm->start_code, 15*sizeof(unsigned long));
+
        flush_cache_mm(current->mm);
        pprev = &mm->mmap;
        for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
@@ -289,9 +292,6 @@ fail_nomem:
 
 /*
  * Allocate and initialize an mm_struct.
- *
- * NOTE! The mm mutex will be locked until the
- * caller decides that all systems are go..
  */
 struct mm_struct * mm_alloc(void)
 {
@@ -299,23 +299,11 @@ struct mm_struct * mm_alloc(void)
 
        mm = kmem_cache_alloc(mm_cachep, SLAB_KERNEL);
        if (mm) {
-               *mm = *current->mm;
+               memset(mm, 0, sizeof(*mm));
                init_new_context(mm);
                atomic_set(&mm->count, 1);
-               mm->map_count = 0;
-               mm->def_flags = 0;
-               init_MUTEX_LOCKED(&mm->mmap_sem);
+               init_MUTEX(&mm->mmap_sem);
                mm->page_table_lock = SPIN_LOCK_UNLOCKED;
-               /*
-                * Leave mm->pgd set to the parent's pgd
-                * so that pgd_offset() is always valid.
-                */
-               mm->mmap = mm->mmap_avl = mm->mmap_cache = NULL;
-
-               /* It has not run yet, so cannot be present in anyone's
-                * cache or tlb.
-                */
-               mm->cpu_vm_mask = 0;
        }
        return mm;
 }
@@ -366,14 +354,23 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
        tsk->cmin_flt = tsk->cmaj_flt = 0;
        tsk->nswap = tsk->cnswap = 0;
 
+       /*
+        * Are we cloning a kernel thread?
+        */
+       mm = current->mm;
+       if (!mm) {
+               tsk->active_mm = NULL;
+               return 0;
+       }
+
        if (clone_flags & CLONE_VM) {
-               mmget(current->mm);
+               mmget(mm);
                /*
                 * No need to worry about the LDT descriptor for the
                 * cloned task, LDTs get magically loaded at
                 * __switch_to time if necessary.
                 */
-               SET_PAGE_DIR(tsk, current->mm->pgd);
+               SET_PAGE_DIR(tsk, mm->pgd);
                return 0;
        }
 
@@ -383,18 +380,23 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
                goto fail_nomem;
 
        tsk->mm = mm;
+       tsk->active_mm = mm;
+
+       mm->pgd = pgd_alloc();
+       if (!mm->pgd)
+               goto free_mm;
+
        /*
         * child gets a private LDT (if there was an LDT in the parent)
         */
        copy_segments(tsk, mm);
 
-       retval = new_page_tables(tsk);
-       if (retval)
-               goto free_mm;
+       down(&current->mm->mmap_sem);
        retval = dup_mmap(mm);
+       up(&current->mm->mmap_sem);
        if (retval)
                goto free_pt;
-       up(&mm->mmap_sem);
+       SET_PAGE_DIR(tsk, mm->pgd);
        return 0;
 
 free_mm:
@@ -536,8 +538,6 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
                new_flags &= ~(PF_PTRACED|PF_TRACESYS);
        if (clone_flags & CLONE_VFORK)
                new_flags |= PF_VFORK;
-       if ((clone_flags & CLONE_TLB) && capable(CAP_SYS_ADMIN))
-               new_flags |= PF_LAZY_TLB;
        p->flags = new_flags;
 }
 
@@ -560,7 +560,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
 
        *p = *current;
 
-       down(&current->mm->mmap_sem);
        lock_kernel();
 
        retval = -EAGAIN;
@@ -679,7 +678,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
 
 bad_fork:
        unlock_kernel();
-       up(&current->mm->mmap_sem);
 fork_out:
        if ((clone_flags & CLONE_VFORK) && (retval > 0)) 
                down(&sem);
index 4decadf7c66af4cdb2b2d3a42a1538473aad9680..ee654c47231df820a90891410747146fdb72b2e4 100644 (file)
@@ -192,7 +192,10 @@ EXPORT_SYMBOL(vfs_unlink);
 EXPORT_SYMBOL(vfs_rename);
 EXPORT_SYMBOL(__pollwait);
 EXPORT_SYMBOL(ROOT_DEV);
-
+EXPORT_SYMBOL(add_to_page_cache_unique);
+EXPORT_SYMBOL(__find_get_page);
+EXPORT_SYMBOL(__find_lock_page);
+                        
 #if !defined(CONFIG_NFSD) && defined(CONFIG_NFSD_MODULE)
 EXPORT_SYMBOL(do_nfsservctl);
 #endif
@@ -312,8 +315,8 @@ EXPORT_SYMBOL(release_resource);
 EXPORT_SYMBOL(__request_region);
 EXPORT_SYMBOL(__check_region);
 EXPORT_SYMBOL(__release_region);
-EXPORT_SYMBOL(pci_io_resource);
-EXPORT_SYMBOL(pci_mem_resource);
+EXPORT_SYMBOL(ioport_resource);
+EXPORT_SYMBOL(iomem_resource);
 
 /* process management */
 EXPORT_SYMBOL(__wake_up);
index 0d007d4926b1c63e276eb6d71647d8d0099ad5cf..2b8fe0ddac1e7e19db9111bc5fe75d19910b4e7d 100644 (file)
@@ -39,6 +39,8 @@ repeat:
        if (!pte_present(*pgtable))
                goto fault_in_page;
        page = pte_page(*pgtable);
+       if (write && (!pte_write(*pgtable) || !pte_dirty(*pgtable)))
+               goto fault_in_page;
        if (MAP_NR(page) >= max_mapnr)
                return 0;
        flush_cache_page(vma, addr);
index ce15021e30e6512688f38b1988b84f5889e3e047..19b056682ad51d85d14ebec4f35ff24f51aca241 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/init.h>
 #include <linux/malloc.h>
 
-struct resource pci_io_resource = { "PCI IO", 0x0000, 0xFFFF };
-struct resource pci_mem_resource = { "PCI mem", 0x00000000, 0xFFFFFFFF };
+struct resource ioport_resource = { "PCI IO", 0x0000, 0xFFFF };
+struct resource iomem_resource = { "PCI mem", 0x00000000, 0xFFFFFFFF };
 
 /*
  * This generates reports for /proc/ioports and /proc/memory
@@ -49,7 +49,7 @@ int get_resource_list(struct resource *root, char *buf, int size)
        char *fmt;
 
        fmt = "        %08lx-%08lx : %s\n";
-       if (root == &pci_io_resource)
+       if (root == &ioport_resource)
                fmt = "        %04lx-%04lx : %s\n";
        return do_resource_list(root->child, fmt, 8, buf, buf + size) - buf;
 }      
@@ -179,7 +179,7 @@ void __init reserve_setup(char *str, int *ints)
                        res->start = ints[i];
                        res->end = res->start + ints[i] - 1;
                        res->child = NULL;
-                       if (request_resource(&pci_io_resource, res) == 0)
+                       if (request_resource(&ioport_resource, res) == 0)
                                reserved = x+1;
                }
        }
index b45e08d7ce6ef7206e81abb81bf2c034d024340f..3f793f20fd8388c3d7d069bc818cf228c00d155d 100644 (file)
@@ -622,8 +622,12 @@ signed long schedule_timeout(signed long timeout)
  * cleans up all remaining scheduler things, without impacting the
  * common case.
  */
-static inline void __schedule_tail (struct task_struct *prev)
+static inline void __schedule_tail(struct task_struct *prev)
 {
+       if (!prev->mm) {
+               mmput(prev->active_mm);
+               prev->active_mm = NULL;
+       }
 #ifdef __SMP__
        if ((prev->state == TASK_RUNNING) &&
                        (prev != idle_task(smp_processor_id())))
@@ -633,7 +637,7 @@ static inline void __schedule_tail (struct task_struct *prev)
 #endif /* __SMP__ */
 }
 
-void schedule_tail (struct task_struct *prev)
+void schedule_tail(struct task_struct *prev)
 {
        __schedule_tail(prev);
 }
@@ -781,9 +785,19 @@ still_running_back:
         * but prev is set to (the just run) 'last' process by switch_to().
         * This might sound slightly confusing but makes tons of sense.
         */
-       get_mmu_context(prev, next);
+       {
+               struct mm_struct *mm = next->mm;
+               if (!mm) {
+                       mm = prev->active_mm;
+                       set_mmu_context(prev,next);
+                       if (next->active_mm) BUG();
+                       next->active_mm = mm;
+                       mmget(mm);
+               }
+       }
+
+       get_mmu_context(next);
        switch_to(prev, next, prev);
-       put_mmu_context(prev, next);
        __schedule_tail(prev);
 
 same_process:
@@ -1931,7 +1945,7 @@ static void show_task(struct task_struct * p)
                printk("%5d ", p->p_cptr->pid);
        else
                printk("      ");
-       if (p->flags & PF_LAZY_TLB)
+       if (!p->mm)
                printk(" (L-TLB) ");
        else
                printk(" (NOTLB) ");
@@ -2029,6 +2043,5 @@ void __init sched_init(void)
         * The boot idle thread does lazy MMU switching as well:
         */
        mmget(&init_mm);
-       current->flags |= PF_LAZY_TLB;
 }
 
index f43a2ed4a21020a5e214a451909e161464ea4fa9..5a7a148ea8cc48e5bb79dcb0e5d376c27e1828c0 100644 (file)
@@ -266,7 +266,7 @@ static void unuse_process(struct mm_struct * mm, unsigned long entry,
        /*
         * Go through process' page directory.
         */
-       if (!mm || mm == &init_mm)
+       if (!mm)
                return;
        for (vma = mm->mmap; vma; vma = vma->vm_next) {
                pgd_t * pgd = pgd_offset(mm, vma->vm_start);