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
--- /dev/null
+#
+# 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
--- /dev/null
+#
+# 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
--- /dev/null
+#
+# 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
--- /dev/null
+#
+# 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
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
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);
/* 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)
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;
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
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
* 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...
.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
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
#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...
}
#endif
+ if (machine_is_cats())
+ cats_hw_init();
+
leds_event(led_start);
}
--- /dev/null
+/*
+ * 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);
+}
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)
{
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
{
int i;
- for (i = 0; i < NR_DEBUGS; i++)
- current->tss.debug[i] = 0;
+ memset(¤t->tss.debug, 0, sizeof(current->tss.debug));
current->used_math = 0;
current->flags &= ~PF_USEDFPU;
}
*/
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);
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;
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;
}
/*
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:
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);
}
alt -= insn & 0xfff;
}
if (read_long (child, alt, &alt) < 0)
- alt = pc + 4; /* not valid */
+ alt = 0; /* not valid */
else
alt = pc_pointer (alt);
}
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;
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
*/
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;
}
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;
}
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 */
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;
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:
)*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)
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();
+}
#
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)
ifeq ($(MACHINE),ebsa110)
L_OBJS += io-ebsa110.o
+else
+ LX_OBJS += io.o
endif
ifeq ($(MACHINE),footbridge)
+#include <linux/module.h>
+
#include <asm/io.h>
/*
dst++;
}
}
+
+EXPORT_SYMBOL(_memcpy_fromio);
+EXPORT_SYMBOL(_memcpy_toio);
+EXPORT_SYMBOL(_memset_io);
+
(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");
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
* 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 };
*/
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{
- struct soft_thread_struct * t = ¤t->thread;
- struct hard_thread_struct * tss = init_tss + smp_processor_id();
+ struct thread_struct * t = ¤t->thread;
+ struct tss_struct * tss = init_tss + smp_processor_id();
if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32))
return -EINVAL;
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();
/*
* Load the LDT entry of init_task.
*/
- load_LDT(init_task.mm);
+ load_LDT(&init_mm);
}
/*
:"=&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;
}
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();
+ }
}
}
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);
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 */
/* 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
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);
/*
* 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:
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);
}
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;
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
*/
* 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);
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"
:"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");
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;
}
}
#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
* 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;
#undef CY_16Y_HACK
#undef CY_ENABLE_MONITORING
#undef CY_PCI_DEBUG
-#undef CY_PROC
#if 0
#define PAUSE __asm__("nop");
#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>
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
};
#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
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);
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
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;
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){
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);
}
#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;
}
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
}
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
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*/
;
/* 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);
}
/* 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);
}
}
}
}
}
/* 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 */
/***********************************************************/
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)
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);
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;
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
info->idle_stats.recv_idle =
info->idle_stats.xmit_idle = jiffies;
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
} else {
struct FIRM_ID *firm_id;
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);
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
info->idle_stats.in_use =
info->idle_stats.recv_idle =
info->idle_stats.xmit_idle = jiffies;
+
+ CY_UNLOCK(info, flags);
}
#ifdef CY_DEBUG_OPEN
return 0;
errout:
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
return retval;
} /* startup */
(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 */
card, chip, channel, (long)base_addr);
#endif
- save_flags(flags); cli();
+ CY_LOCK(info, flags);
if (info->xmit_buf){
unsigned char * temp;
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;
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;
}
info->flags &= ~ASYNC_INITIALIZED;
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
}
#ifdef CY_DEBUG_OPEN
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.
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;
+ (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);
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) ){
-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;
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;
}
/* 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
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;
}
}
if (info->count) {
MOD_DEC_USE_COUNT;
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
return;
}
info->flags |= ASYNC_CLOSING;
* 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;
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
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;
#endif
MOD_DEC_USE_COUNT;
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
return;
} /* cy_close */
return 0;
}
- save_flags(flags);
-
+ CY_LOCK(info, flags);
if (from_user) {
down(&tmp_buf_sem);
while (1) {
}
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;
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;
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;
}
info->xmit_cnt++;
info->idle_stats.xmit_bytes++;
info->idle_stats.xmit_idle = jiffies;
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
} /* cy_put_char */
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); /* */
|| 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 */
(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 */
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;
/* 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);
(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)
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);
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) {
} 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);
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);
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);
cy_readb(base_addr+(CyMSVR1<<index)),
cy_readb(base_addr+(CyMSVR2<<index)));
#endif
- restore_flags(flags);
+ CY_UNLOCK(info, flags);
}
break;
default:
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:
}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 */
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).
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);
}
}
}
}
}
}
- restore_flags(flags);
-
+ CY_UNLOCK(info, flags);
} /* cy_break */
static int
{
unsigned char *base_addr;
int card,channel,chip,index;
+ unsigned long flags;
card = info->card;
channel = info->line - cy_card[card].first_line;
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!
}
{
unsigned char *base_addr;
int card,channel,chip,index;
+ unsigned long flags;
card = info->card;
channel = info->line - cy_card[card].first_line;
(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!
}
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);
(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!
}
(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!
}
(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!
}
(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!
}
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))
/* 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;
* 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];
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);
* 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
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);
#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);
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
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
extra ports are ignored.
*/
-int __init
-cy_init(void)
+__initfunc(int
+cy_init(void))
{
struct cyclades_port *info;
struct cyclades_card *cinfo;
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);
/* 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++)
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;
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++)
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 =
}
#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 */
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 */
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
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
#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;
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;
}
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;
}
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;
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) {
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;
}
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. */
/* 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;
}
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;
}
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));
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);
}
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);
}
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);
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))
/*+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*************************************************************************
p->host_no);
}
}
+ aic_outb(p, sxfrctl1, SXFRCTL1);
write_brdctl(p, brddat);
release_seeprom(p);
- aic_outb(p, sxfrctl1, SXFRCTL1);
}
}
/* 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);
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 |
}
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;
}
#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;
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,
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],
#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;
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)
{
#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) &&
}
#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;
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 */
}
/*
#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
goto bad_file;
v = shmiq_manage_file (file);
+ if (v<0)
+ fput(file);
return v;
/*
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;
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);
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)
#include <asm/io.h>
#include "usb.h"
-#include "uhci.h"
#include "cpia.h"
#define MAX_FRAME_SIZE (384 * 288 * 3)
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);
}
/* 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;
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");
/* 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 */
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);
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;
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");
/* 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;
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);
kbd);
list_add(&kbd->list, &usb_kbd_list);
+
+ return 0;
}
- return 0;
+probe_err:
+ if (kbd)
+ kfree (kbd);
+ return -1;
}
static void
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;
}
+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
};
}
+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
*/
ohci_bulk_msg,
ohci_request_irq,
ohci_release_irq,
+ ohci_alloc_isochronous,
+ ohci_delete_isochronous,
+ ohci_sched_isochronous,
+ ohci_unsched_isochronous,
+ ohci_compress_isochronous
};
}
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
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),
spin_unlock_irqrestore(&irqlist_lock, flags);
}
+
/*
* Request a interrupt handler..
*
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);
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;
* 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;
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;
}
/* 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;
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 */
/*
* 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;
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 */
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]);
* 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;
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);
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 */
}
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]);
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 */
uhci_bulk_msg,
uhci_request_irq,
uhci_release_irq,
+ uhci_allocate_isochronous,
+ uhci_delete_isochronous,
+ uhci_schedule_isochronous,
+ uhci_unschedule_isochronous,
+ uhci_compress_isochronous
};
/*
* 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;
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;
}
#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 */
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
*/
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");
{
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);
{
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);
}
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");
/*
- * driver/usb/usb.c
+ * drivers/usb/usb.c
*
* (C) Copyright Linus Torvalds 1999
*
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;
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);
}
/* 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;
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);
#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
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);
};
/*
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 */
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
* - 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
#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 */
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);
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
{
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;
}
}
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
/*
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;
}
}
goto out;
if (func == 1) {
+#if 0
struct mm_struct *user_mm;
/*
* bdflush will spend all of it's time in kernel-space,
*/
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;
}
struct mm_struct * mm, * old_mm;
int retval;
- if (atomic_read(¤t->mm->count) == 1) {
+ if (current->mm && atomic_read(¤t->mm->count) == 1) {
flush_cache_mm(current->mm);
mm_release();
release_segments(current->mm);
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;
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;
/*
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);
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);
{
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;
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;
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) {
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 */
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);
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 = {
#define FLUSH_BASE 0xdf000000
#define PCIO_BASE 0xf0000000
+#define PARAMS_BASE (PAGE_OFFSET + 0x400)
+
#endif
/*
* 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,
* 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
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
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 */
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 = {
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 = {
*/
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);
/*
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");
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;
*/
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]);
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 = {
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>
* 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
/*
#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.
#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)
#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
#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)
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
#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);
#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
* 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)
/*
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)
#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[];
* 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 {
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;
unsigned long __cacheline_filler[5];
};
-struct soft_thread_struct {
+struct thread_struct {
unsigned long esp0;
unsigned long cr3;
unsigned long eip;
/*
* 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];
}
/****************** ****************** *******************/
#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__
#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.
*
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;
};
/*
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);
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);
#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
#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, \
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 */
#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) */
/* 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, \
}
{
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)
struct vm_area_struct * mpnt, *tmp, **pprev;
int retval;
+ /* Kill me slowly. UGLY! FIXME! */
+ memcpy(&mm->start_code, ¤t->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) {
/*
* 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)
{
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;
}
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;
}
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(¤t->mm->mmap_sem);
retval = dup_mmap(mm);
+ up(¤t->mm->mmap_sem);
if (retval)
goto free_pt;
- up(&mm->mmap_sem);
+ SET_PAGE_DIR(tsk, mm->pgd);
return 0;
free_mm:
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;
}
*p = *current;
- down(¤t->mm->mmap_sem);
lock_kernel();
retval = -EAGAIN;
bad_fork:
unlock_kernel();
- up(¤t->mm->mmap_sem);
fork_out:
if ((clone_flags & CLONE_VFORK) && (retval > 0))
down(&sem);
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
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);
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);
#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
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;
}
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;
}
}
* 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())))
#endif /* __SMP__ */
}
-void schedule_tail (struct task_struct *prev)
+void schedule_tail(struct task_struct *prev)
{
__schedule_tail(prev);
}
* 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:
printk("%5d ", p->p_cptr->pid);
else
printk(" ");
- if (p->flags & PF_LAZY_TLB)
+ if (!p->mm)
printk(" (L-TLB) ");
else
printk(" (NOTLB) ");
* The boot idle thread does lazy MMU switching as well:
*/
mmget(&init_mm);
- current->flags |= PF_LAZY_TLB;
}
/*
* 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);