The module will be called acm.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
-USB serial converter support
+USB Serial converter support
CONFIG_USB_SERIAL
Say Y here if you want to connect a Connect Tech WhiteHEAT
multi-port USB to serial converter; a Belkin, Peracom, or eTek
The module will be called usb-serial.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
+USB Generic Serial Driver
+CONFIG_USB_SERIAL_GENERIC
+ Say Y here if you want to use the generic USB serial driver.
+ Please read Documentation/usb/usb-serial.txt for more information
+ on using this driver. It is recommended that the USB Serial
+ Driver be compiled as a module for this driver to be used properly.
+
+USB ConnectTech WhiteHEAT Serial Driver
+CONFIG_USB_SERIAL_WHITEHEAT
+ Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
+ USB to serial converter device.
+
+USB Handspring Visor Driver
+CONFIG_USB_SERIAL_VISOR
+ Say Y here if you want to connect to your HandSpring Visor through
+ its USB docking station.
+
+USB Belkin Single Port Serial Driver
+CONFIG_USB_SERIAL_BELKIN
+ Say Y here if you want to use a Belkin single port USB to serial
+ converter device.
+
+USB Peracom Single Port Serial Driver
+CONFIG_USB_SERIAL_PERACOM
+ Say Y here if you want to use a Peracom single port USB to serial
+ converter device.
+
USB Printer support
CONFIG_USB_PRINTER
Say Y here if you want to connect a USB printer to your computer's USB
properly with huge UIDs. If it can deal with 64-bit file offsets on all
architectures, this should not be a problem.
-- Decide on a final layout for the new msqid64_ds, semid64_ds, and
- shmid64_ds, and shminfo64 structures. The current ones leave pad space
- for 64-bit time_t and 32-bit pid_t, as well as 4 extra machine words.
- Perhaps more pad space should be left for future use?
-
- Decide whether or not to keep backwards compatibility with the system
accounting file, or if we should break it as the comments suggest
(currently, the old 16-bit UID and GID are still written to disk, and
uses the 32-bit UID system calls properly otherwise.
This affects at least:
- SunOS emulation - now fixed?
+ SunOS emulation
Solaris emulation
iBCS on Intel
Other filesystems have not been checked yet.
-- The ncpfs and smpfs filesystems can not presently return 32-bit UIDs to
- all ioctl()s. Some new ioctl()s have been added for 32-bit UIDs, but
+- The ncpfs and smpfs filesystems can not presently use 32-bit UIDs in
+ all ioctl()s. Some new ioctl()s have been added with 32-bit UIDs, but
more are needed. (as well as new user<->kernel data structures)
- The ELF core dump format only supports 16-bit UIDs on arm, i386, m68k,
- make sure that the UID mapping feature of AX25 networking works properly
(it should be safe because it's always used a 32-bit integer to
communicate between user and kernel)
+
+
+Chris Wing
+wingc@umich.edu
+
+last updated: January 11, 2000
# For a description of the syntax of this configuration file,
# see the Configure script.
#
+
+define_bool CONFIG_UID16 n
+
mainmenu_name "Kernel configuration of Linux for Alpha machines"
mainmenu_option next_comment
source drivers/pci/Config.in
+bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
+
+if [ "$CONFIG_HOTPLUG" = "y" ] ; then
+ source drivers/pcmcia/Config.in
+fi
+
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
# CONFIG_FTAPE is not set
# CONFIG_DRM is not set
# CONFIG_DRM_TDFX is not set
+CONFIG_PCMCIA_SERIAL=y
#
# PCMCIA character device support
#
-CONFIG_PCMCIA_SERIAL=y
# CONFIG_PCMCIA_SERIAL_CS is not set
#
switch (expected) {
case 0:
+ {
/* FIXME: how do we figure out which hose the
error was on? */
struct pci_controler *hose;
for (hose = hose_head; hose; hose = hose->next)
mcpcia_pci_clr_err(hose2mid(hose->index));
break;
+ }
case 1:
mcpcia_pci_clr_err(mcheck_extra(cpu));
break;
ARCHDIR = nexuspci
endif
-ifeq ($(CONFIG_ARCH_SA1100),u)
+ifeq ($(CONFIG_ARCH_SA1100),y)
MACHINE = sa1100
ARCHDIR = sa1100
endif
SUBDIRS += arch/arm/kernel arch/arm/mm arch/arm/lib \
arch/arm/special arch/arm/nwfpe
CORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)
-LIBS := arch/arm/lib/lib.a $(LIBS) $(GCCLIB)
+LIBS := arch/arm/lib/lib.o arch/arm/lib/lib.a $(LIBS) $(GCCLIB)
DRIVERS += arch/arm/special/special.a
ifeq ($(CONFIG_NWFPE),y)
ZRELADDR = 0x40008000
endif
-ifeq ($(CONFIG_ARCH_SA110),y)
+ifeq ($(CONFIG_ARCH_SA1100),y)
+OBJS += head-sa1100.o
ifeq ($(CONFIG_SA1100_VICTOR),y)
-HEAD = head-victor.o
ZTEXTADDR = 0x00002000
ZBSSADDR = 0xc0100000
else
vmlinux.lds: vmlinux.lds.in
@sed "$(SEDFLAGS)" < vmlinux.lds.in > $@
-clean:; rm -f vmlinux core piggy*
+clean:; rm -f vmlinux core piggy* vmlinux.lds
.PHONY: vmlinux.lds clean
--- /dev/null
+/*
+ * linux/arch/arm/boot/compressed/head-sa1100.S
+ *
+ * Copyright (C) 1999 Nicolas Pitre <nico@cam.org>
+ *
+ * SA1100 specific tweaks. This is merged with head.S by the linker.
+ */
+
+#include <linux/config.h>
+
+
+ .section ".start", #alloc, #execinstr
+
+#ifndef CONFIG_ARCH_SA1100
+#error What am I doing here...
+#endif
+
+#ifdef CONFIG_SA1100_BRUTUS
+@ need to enter SVC mode
+#define angel_SWIreason_EnterSVC 0x17 /* from arm.h, in angel source */
+#define angel_SWI_ARM (0xEF123456 & 0xffffff)
+ mov r0, #angel_SWIreason_EnterSVC
+ swi #angel_SWI_ARM
+
+ @ turn off interrupts to prevent the angel from running
+ mrs r0, cpsr
+ orr r0, r0, #0xc0
+ msr cpsr, r0
+#endif
+
+#ifdef CONFIG_SA1100_VICTOR
+ @ Copy cmdline to 0xc0000000
+ mov r1, #0xc0000000
+ cmp r0, #0
+ moveq r2, #0
+1: ldrneb r2, [r0], #1
+ cmpne r2, #0
+ strb r2, [r1], #1
+ bne 1b
+#endif
+
+ @ Data cache might be active.
+ @ Be sure to flush kernel binary out of the cache,
+ @ whatever state it is, before it is turned off.
+ @ This is done by fetching through currently executed
+ @ memory to be sure we hit the same cache.
+ bic r2, pc, #0x1f
+ add r3, r2, #0x4000 @ 16 kb is quite enough...
+1: ldr r0, [r2], #32
+ teq r2, r3
+ bne 1b
+ mcr p15, 0, r0, c7, c10, 4 @ drain WB
+ mcr p15, 0, r0, c7, c7, 0 @ flush I & D caches
+
+ @ disabling MMU, enabling I cache
+ mrc p15, 0, r0, c1, c0, 0 @ read control reg
+ bic r0, r0, #0x0d @ clear WB, DC, MMU
+ orr r0, r0, #0x1000 @ set Icache
+ mcr p15, 0, r0, c1, c0, 0
+
+ @ set registers for entry
+ mov r0, #0
+ mov r1, #16
+
+
+++ /dev/null
-/*
- * linux/arch/arm/boot/compressed/head-victor.S
- *
- * Copyright (C) 1998 Nicolas Pitre <nico@visuaide.com>
- */
-
-#include <linux/linkage.h>
-
- .text
- .globl _start
-_start:
- @ just in case we still use an a.out loader...
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
-
- @ load different addresses
- adr r2, LC0
- ldmia r2, {r4, r5, r6, sp}
-
- @ clear BSS
- mov r2, #0
-1: str r2, [r5], #4
- cmp r5, r6
- blt 1b
-
- @ uncompress the kernel
- mov r8, r0 @ save cmdline ptr
- mov r0, r4 @ where to put uncompressed data
- add r1, r6, #31
- bic r1, r1, #31 @ free memory space
- add r2, r1, #65536 @ end of free mem space
- bl SYMBOL_NAME(decompress_kernel)
- mov r0, r8 @ retrieve cmdline ptr
- mov pc, r4 @ call via EXEC entry
-
-LC0: .word _load_addr
- .word __bss_start
- .word SYMBOL_NAME(_end)
- .word SYMBOL_NAME(user_stack)+4096
cmp r2, r3
blt 1b
- eor r1, r6, #0x44 << 24 @ SA-110?
+ eor r1, r6, #0x44 << 24 @ SA-110 or SA-1100?
eor r1, r1, #0x01 << 16
eor r1, r1, #0xa1 << 8
- movs r1, r1, lsr #4
+ movs r1, r1, lsr #5
mcreq p15, 0, r1, c7, c7, 0 @ flush I & D-cache
mcreq p15, 0, r1, c7, c10, 4 @ drain WB
add pc, r5, r0 @ call relocation code
mov r0, r4
bl memdump
#endif
- eor r0, r6, #0x44 << 24 @ SA-110?
+ eor r0, r6, #0x44 << 24 @ SA-110 or SA-1100?
eor r0, r0, #0x01 << 16
eor r0, r0, #0xa1 << 8
- movs r0, r0, lsr #4
+ movs r0, r0, lsr #5
mcreq p15, 0, r0, c7, c7, 0 @ flush I cache
mcreq p15, 0, r1, c7, c10, 4 @ drain WB
define_bool CONFIG_ARM y
+define_bool CONFIG_UID16 y
+
mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
fi
if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
- define_bool CONFIG_CPU_SA1100 y
choice 'SA1100 implementation' \
"Brutus CONFIG_SA1100_BRUTUS \
Empeg CONFIG_SA1100_EMPEG \
"$CONFIG_FOOTBRIDGE" = "y" -o \
"$CONFIG_ARCH_NEXUSPCI" = "y" ]; then
define_bool CONFIG_CPU_32v4 y
- define_bool CONFIG_CPU_SA110 y
+ if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
+ define_bool CONFIG_CPU_SA1100 y
+ else
+ define_bool CONFIG_CPU_SA110 y
+ fi
else
if [ "$CONFIG_ARCH_RPC" = "y" ]; then
define_bool CONFIG_CPU_32v3 y
if [ "$CONFIG_ARCH_NEXUSPCI" = "y" -o \
"$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then
define_bool CONFIG_PCI y
- source drivers/pci/Config.h
+ source drivers/pci/Config.in
fi
#
define_bool CONFIG_ISA_DMA n
fi
-if [ "$CONFIG_CPU_32" = "y" -a "$CONFIG_ARCH_EBSA110" != "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool 'Enable kernel-mode alignment trap handler (EXPERIMENTAL)' CONFIG_ALIGNMENT_TRAP
+if [ "$CONFIG_CPU_32" = "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then
+ bool 'Kernel-mode alignment trap handler' CONFIG_ALIGNMENT_TRAP
fi
#bool 'Split text into discardable sections' CONFIG_TEXT_SECTIONS
endmenu
bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+if [ "$CONFIG_CPU_26" = "y" ]; then
+ bool 'Disable pgtable cache' CONFIG_NO_PGT_CACHE
+fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- if [ "$CONFIG_CPU_26" = "y" ]; then
- bool 'Disable pgtable cache (EXPERIMENTAL)' CONFIG_NO_PGT_CACHE
- fi
-
# These options are only for real kernel hackers
# who want to get their hands dirty.
bool 'Kernel low-level debugging functions' CONFIG_DEBUG_LL
#
CONFIG_ARM=y
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
#
# System and processor type
#
# 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
+# CONFIG_ISA_DMA is not set
#
# Loadable module support
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
-# CONFIG_NWFPE is not set
+CONFIG_NWFPE=y
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
-CONFIG_BINFMT_ELF=m
+# CONFIG_BINFMT_ELF is not set
# CONFIG_BINFMT_MISC is not set
-CONFIG_PARPORT=y
-CONFIG_PARPORT_PC=y
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_ARC is not set
+# CONFIG_PARPORT_AMIGA is not set
+# CONFIG_PARPORT_MFC3 is not set
+# CONFIG_PARPORT_ATARI is not set
+# CONFIG_PARPORT_SUNBPP is not set
+# CONFIG_PARPORT_OTHER is not set
+# CONFIG_PARPORT_1284 is not set
#
-# Plug and Play support
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Plug and Play configuration
#
# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
# 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
+
+#
+# IDE chipset support/bugfixes
+#
# CONFIG_BLK_DEV_CMD640 is not set
+CONFIG_BLK_DEV_IDE_ICSIDE=y
+# CONFIG_BLK_DEV_IDEDMA_ICS is not set
+# CONFIG_BLK_DEV_IDE_RAPIDE is not set
# CONFIG_IDE_CHIPSETS 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_PARPORT=m
# CONFIG_PARIDE is not set
+# CONFIG_BLK_DEV_IDE_MODES 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
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
-# CONFIG_SERIAL_CONSOLE is not set
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_ATOMWIDE_SERIAL is not set
+# CONFIG_DUALSP_SERIAL 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
+# CONFIG_PRINTER is not set
+# CONFIG_PPDEV is not set
#
# Mice
#
-# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_BUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
+CONFIG_MOUSE=y
# CONFIG_PSMOUSE is not set
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
# 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
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
-CONFIG_KBDMOUSE=y
+# CONFIG_DRM is not set
+# CONFIG_DRM_TDFX is not set
+
+#
+# PCMCIA character device support
+#
+# CONFIG_PCMCIA_SERIAL_CS is not set
+# CONFIG_AGP is not set
+
+#
+# Support for USB
+#
+# CONFIG_USB is not set
#
# Console drivers
#
CONFIG_FB=y
+
+#
+# Frame-buffer support
+#
+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_ATY128 is not set
+# CONFIG_FB_3DFX is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_MFB=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_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
#
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
-# CONFIG_FIREWALL is not set
+# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=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_KHTTPD is not set
+# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE 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_HAMRADIO is not set
#
-# IrDA subsystem support
+# IrDA (infrared) support
#
# CONFIG_IRDA is not set
# Network device support
#
CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
CONFIG_NET_ETHERNET=y
CONFIG_ARM_ETHER1=y
CONFIG_ARM_ETHER3=y
# 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_DM9102 is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN 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
+
+#
+# Wireless LAN (non-hamradio)
+#
# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring driver support
+#
# CONFIG_TR is not set
-# CONFIG_SHAPER is not set
-# CONFIG_HOSTESS_SV11 is not set
-# CONFIG_COSA is not set
+# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA 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
+# CONFIG_SCSI is not set
#
# Sound
CONFIG_ADFS_FS=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
+# CONFIG_BFS_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_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set
#
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
-CONFIG_NFSD=y
-# CONFIG_NFSD_SUN is not set
+# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
#
# Partition Types
#
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
+# CONFIG_PARTITION_ADVANCED 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_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
#
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
-# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_NO_PGT_CACHE=y
-# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_LL=y
#
CONFIG_ARM=y
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
#
# System and processor type
#
CONFIG_CPU_SA110=y
CONFIG_PCI=y
CONFIG_ISA_DMA=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
# CONFIG_ALIGNMENT_TRAP is not set
#
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_NWFPE=y
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PARPORT_SUNBPP is not set
# CONFIG_PARPORT_OTHER is not set
CONFIG_PARPORT_1284=y
-CONFIG_CMDLINE="root=/dev/hda2 ro mem=32M parport=0x378,7 ide0=autotune"
+CONFIG_CMDLINE="root=/dev/hda1 ro mem=32M parport=0x378,7 ide0=autotune"
CONFIG_LEDS=y
CONFIG_LEDS_TIMER=y
# CONFIG_LEDS_CPU is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
-# IDEDMA_NEW_DRIVE_LISTINGS is not set
-IDEDMA_PCI_EXPERIMENTAL=y
+CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
+CONFIG_IDEDMA_PCI_EXPERIMENTAL=y
CONFIG_BLK_DEV_OFFBOARD=y
# CONFIG_BLK_DEV_AEC6210 is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_CMD646 is not set
CONFIG_BLK_DEV_CY82C693=y
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_PDC202XX=y
-# PDC202XX_FORCE_BURST_BIT is not set
-# PDC202XX_FORCE_MASTER_MODE is not set
+# CONFIG_PDC202XX_FORCE_BURST_BIT is not set
+# CONFIG_PDC202XX_FORCE_MASTER_MODE is not set
# CONFIG_BLK_DEV_TRM290 is not set
CONFIG_BLK_DEV_SL82C105=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_RAM=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BLK_DEV_XD is not set
+# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
CONFIG_PARIDE=m
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
-CONFIG_WATCHDOG=y
#
# Watchdog Cards
#
+CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
# CONFIG_WDT is not set
CONFIG_SOFT_WATCHDOG=y
#
# Video For Linux
#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Joystick support
-#
-# CONFIG_JOYSTICK is not set
+CONFIG_VIDEO_DEV=y
+# CONFIG_I2C_PARPORT is not set
+
+#
+# Radio/Video Adapters
+#
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_RADIO_MIROPCM20 is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_BUZ is not set
+# CONFIG_VIDEO_ZR36120 is not set
+CONFIG_VIDEO_CYBERPRO=m
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_DRM_TDFX is not set
+
+#
+# PCMCIA character device support
+#
+# CONFIG_PCMCIA_SERIAL_CS is not set
+# CONFIG_AGP is not set
#
-# USB drivers - not for the faint of heart
+# Support for USB
#
CONFIG_USB=m
+
+#
+# USB Controllers
+#
# CONFIG_USB_UHCI is not set
CONFIG_USB_OHCI=m
CONFIG_USB_OHCI_DEBUG=y
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_VROOTHUB=y
+
+#
+# Miscellaneous USB options
+#
# CONFIG_USB_DEBUG_ISOC is not set
-CONFIG_USB_HUB=m
+CONFIG_USB_PROC=y
+# CONFIG_USB_EZUSB is not set
+
+#
+# USB Devices
+#
CONFIG_USB_MOUSE=m
+# CONFIG_USB_HP_SCANNER is not set
CONFIG_USB_KBD=m
CONFIG_USB_AUDIO=m
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
+# CONFIG_USB_SERIAL is not set
# CONFIG_USB_CPIA is not set
-CONFIG_USB_SCSI=m
-CONFIG_USB_SCSI_DEBUG=m
-# CONFIG_USB_EZUSB is not set
+# CONFIG_USB_DC2XX is not set
+# CONFIG_USB_SCSI is not set
# CONFIG_USB_USS720 is not set
-CONFIG_USB_PROC=y
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
+
+#
+# Frame-buffer support
+#
+CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
CONFIG_FB_CYBER2000=y
# CONFIG_FB_MATROX is not set
# CONFIG_FB_ATY is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_3DFX is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_FBCON_ADVANCED=y
# CONFIG_FBCON_MFB is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_RTL8139 is not set
-# CONFIG_SIS900 is not set
-# CONFIG_YELLOWFIN is not set
+# CONFIG_DM9102 is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
-# CONFIG_ACENIC is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_LNE390 is not set
# CONFIG_NE3210 is not set
CONFIG_NE2K_PCI=y
+# CONFIG_SIS900 is not set
# 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
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
# CONFIG_NET_RADIO is not set
#
-# Token ring devices
+# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
-# CONFIG_HOSTESS_SV11 is not set
-# CONFIG_COSA is not set
-# CONFIG_SEALEVEL_4021 is not set
-# CONFIG_DLCI is not set
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
#
# SCSI support
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT 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_AD1816 is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_CS4232 is not set
# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_VMIDI is not set
# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SOFTOSS is not set
+CONFIG_SOUND_SB=m
# 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_VIA82CXXX is not set
# CONFIG_SOUND_YM3812 is not set
-# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
# CONFIG_SOUND_UART6850 is not set
# CONFIG_SOUND_VIDC is not set
CONFIG_SOUND_WAVEARTIST=m
# Filesystems
#
# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS_FS=y
CONFIG_ADFS_FS=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
+CONFIG_DEVPTS_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_UDF_FS is not set
# CONFIG_UFS_FS is not set
#
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
CONFIG_NFSD=m
-# CONFIG_NFSD_SUN is not set
+# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
#
CONFIG_ARM=y
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
#
# System and processor type
#
# 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_32v3=y
+CONFIG_CPU_ARM6=y
+CONFIG_CPU_ARM7=y
CONFIG_CPU_SA110=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
+# CONFIG_ISA_DMA is not set
# CONFIG_ALIGNMENT_TRAP is not set
-# CONFIG_TEXT_SECTIONS is not set
#
# Loadable module support
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_NWFPE is not set
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
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_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_PCMCIA is not set
+# CONFIG_PARPORT_ARC is not set
+# CONFIG_PARPORT_AMIGA is not set
+# CONFIG_PARPORT_MFC3 is not set
+# CONFIG_PARPORT_ATARI is not set
+# CONFIG_PARPORT_SUNBPP is not set
+# CONFIG_PARPORT_OTHER is not set
+# CONFIG_PARPORT_1284 is not set
#
-# Plug and Play support
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Plug and Play configuration
#
# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDETAPE=y
-CONFIG_BLK_DEV_IDEFLOPPY=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
# CONFIG_BLK_DEV_CMD640 is not set
+CONFIG_BLK_DEV_IDE_ICSIDE=y
+CONFIG_BLK_DEV_IDEDMA_ICS=y
+CONFIG_IDEDMA_ICS_AUTO=y
+CONFIG_BLK_DEV_IDE_RAPIDE=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
#
# CONFIG_BLK_DEV_XD is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
+# CONFIG_BLK_DEV_IDE_MODES 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_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_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
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
#
# Mice
#
+CONFIG_BUSMOUSE=y
# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_BUSMOUSE is not set
+# CONFIG_LOGIBUSMOUSE is not set
# CONFIG_MS_BUSMOUSE is not set
+CONFIG_MOUSE=y
# CONFIG_PSMOUSE is not set
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
# 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
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_DRM_TDFX is not set
+
+#
+# PCMCIA character device support
+#
+# CONFIG_PCMCIA_SERIAL_CS is not set
+# CONFIG_AGP is not set
CONFIG_RPCMOUSE=y
+#
+# Support for USB
+#
+# CONFIG_USB is not set
+
#
# Console drivers
#
CONFIG_FB=y
+
+#
+# Frame-buffer support
+#
+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_ATY128 is not set
+# CONFIG_FB_3DFX is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_FBCON_ADVANCED=y
CONFIG_FBCON_MFB=y
# CONFIG_FBCON_IPLAN2P4 is not set
# CONFIG_FBCON_IPLAN2P8 is not set
# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA_PLANES is not set
# CONFIG_FBCON_VGA is not set
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
CONFIG_FBCON_FONTS=y
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
-# CONFIG_FIREWALL is not set
+# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
#
# (it is safe to leave these untouched)
#
-# CONFIG_INET_RARP is not set
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE 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_HAMRADIO is not set
#
-# IrDA subsystem support
+# IrDA (infrared) support
#
# CONFIG_IRDA is not set
# Network device support
#
CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
CONFIG_NET_ETHERNET=y
CONFIG_ARM_ETHER1=m
CONFIG_ARM_ETHER3=m
-CONFIG_ARM_ETHERH=m
+CONFIG_ARM_ETHERH=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_DM9102 is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN 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
+# CONFIG_PPP_ASYNC is not set
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_SLIP is not set
#
-# CCP compressors for PPP are only built as modules.
+# Wireless LAN (non-hamradio)
#
-# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring driver support
+#
# CONFIG_TR is not set
-# CONFIG_SHAPER is not set
-# CONFIG_HOSTESS_SV11 is not set
-# CONFIG_COSA is not set
+# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
#
# SCSI support
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
+CONFIG_SCSI_DEBUG_QUEUES=y
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 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_SIM710 is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# Sound
#
CONFIG_SOUND=m
+# CONFIG_SOUND_CMPCI is not set
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT 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_AD1816 is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_CS4232 is not set
# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_VMIDI is not set
# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SOFTOSS is not set
+# CONFIG_SOUND_SB 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_VIA82CXXX is not set
# CONFIG_SOUND_YM3812 is not set
-# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
# CONFIG_SOUND_UART6850 is not set
CONFIG_SOUND_VIDC=m
# CONFIG_SOUND_WAVEARTIST 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_BFS_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=y
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set
#
#
# Partition Types
#
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_OSF_PARTITION=y
+CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
+CONFIG_BSD_DISKLABEL=y
+CONFIG_SOLARIS_X86_PARTITION=y
+# CONFIG_UNIXWARE_DISKLABEL is not set
+CONFIG_SGI_PARTITION=y
+CONFIG_SUN_PARTITION=y
+CONFIG_AMIGA_PARTITION=y
+# CONFIG_ATARI_PARTITION is not set
CONFIG_ACORN_PARTITION=y
CONFIG_ACORN_PARTITION_ADFS=y
CONFIG_ACORN_PARTITION_ICS=y
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_ISO8859_9=m
+# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
CONFIG_NLS_KOI8_R=m
# 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
+CONFIG_DEBUG_LL=y
#
CONFIG_ARM=y
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
#
# System and processor type
#
# CONFIG_CATS is not set
CONFIG_ARCH_NETWINDER=y
# CONFIG_ARCH_ACORN is not set
-CONFIG_PCI=y
-CONFIG_PCI_NAMES=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_32v4=y
CONFIG_CPU_SA110=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
+CONFIG_PCI=y
+CONFIG_ISA_DMA=y
# CONFIG_ALIGNMENT_TRAP is not set
-# CONFIG_TEXT_SECTIONS is not set
#
# Loadable module support
# CONFIG_ARTHUR is not set
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
+CONFIG_PARPORT_PC_FIFO=y
+# CONFIG_PARPORT_PC_PCMCIA is not set
+# CONFIG_PARPORT_ARC is not set
+# CONFIG_PARPORT_AMIGA is not set
+# CONFIG_PARPORT_MFC3 is not set
+# CONFIG_PARPORT_ATARI is not set
+# CONFIG_PARPORT_SUNBPP is not set
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
CONFIG_CMDLINE="root=/dev/hda1 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
+# I2O device support
#
-# CONFIG_PNP is not set
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Plug and Play configuration
+#
+CONFIG_PNP=y
+CONFIG_ISAPNP=y
#
# Block devices
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=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
+
+#
+# IDE chipset support/bugfixes
+#
# 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_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
+CONFIG_IDEDMA_PCI_EXPERIMENTAL=y
+CONFIG_BLK_DEV_OFFBOARD=y
+# CONFIG_BLK_DEV_AEC6210 is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_CMD646 is not set
+CONFIG_BLK_DEV_CY82C693=y
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_PDC202XX=y
+# CONFIG_PDC202XX_FORCE_BURST_BIT is not set
+# CONFIG_PDC202XX_FORCE_MASTER_MODE 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_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_BLK_CPQ_DA is not set
#
# Additional Block Devices
CONFIG_BLK_DEV_RAM=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BLK_DEV_XD is not set
+# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
CONFIG_PARIDE=m
CONFIG_PARIDE_KTTI=m
CONFIG_PARIDE_ON20=m
CONFIG_PARIDE_ON26=m
+CONFIG_BLK_DEV_IDE_MODES=y
# CONFIG_BLK_DEV_HD is not set
#
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
-CONFIG_PRINTER_READBACK=y
-CONFIG_MOUSE=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
#
# Mice
#
-# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_BUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
+CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
-CONFIG_WATCHDOG=y
#
# Watchdog Cards
#
+CONFIG_WATCHDOG=y
# 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_21285_WATCHDOG is not set
+CONFIG_977_WATCHDOG=m
CONFIG_DS1620=y
CONFIG_NWBUTTON=y
CONFIG_NWBUTTON_REBOOT=y
#
# Video For Linux
#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Joystick support
-#
-# CONFIG_JOYSTICK is not set
+CONFIG_VIDEO_DEV=y
+# CONFIG_I2C_PARPORT is not set
+
+#
+# Radio/Video Adapters
+#
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_RADIO_MIROPCM20 is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_BUZ is not set
+# CONFIG_VIDEO_ZR36120 is not set
+CONFIG_VIDEO_CYBERPRO=m
# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_DRM_TDFX is not set
+
+#
+# PCMCIA character device support
+#
+# CONFIG_PCMCIA_SERIAL_CS is not set
+# CONFIG_AGP is not set
+
+#
+# Support for USB
+#
+CONFIG_USB=m
+
+#
+# USB Controllers
+#
+# CONFIG_USB_UHCI is not set
+CONFIG_USB_OHCI=m
+CONFIG_USB_OHCI_DEBUG=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_OHCI_VROOTHUB=y
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEBUG_ISOC is not set
+CONFIG_USB_PROC=y
+# CONFIG_USB_EZUSB is not set
+
+#
+# USB Devices
+#
+CONFIG_USB_MOUSE=m
+# CONFIG_USB_HP_SCANNER is not set
+CONFIG_USB_KBD=m
+CONFIG_USB_AUDIO=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+# CONFIG_USB_SERIAL is not set
+# CONFIG_USB_CPIA is not set
+# CONFIG_USB_DC2XX is not set
+# CONFIG_USB_SCSI is not set
+# CONFIG_USB_USS720 is not set
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
+
+#
+# Frame-buffer support
+#
+CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
CONFIG_FB_CYBER2000=y
# CONFIG_FB_MATROX is not set
# CONFIG_FB_ATY is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_3DFX is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_FBCON_ADVANCED=y
# CONFIG_FBCON_MFB is not set
# CONFIG_FBCON_IPLAN2P4 is not set
# CONFIG_FBCON_IPLAN2P8 is not set
# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA_PLANES is not set
CONFIG_FBCON_VGA=y
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
CONFIG_FBCON_FONTS=y
# Networking options
#
CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK is not set
-# CONFIG_FIREWALL is not set
+# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
#
# (it is safe to leave these untouched)
#
-# CONFIG_INET_RARP is not set
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE 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_HAMRADIO is not set
#
-# IrDA subsystem support
+# IrDA (infrared) support
#
# CONFIG_IRDA is not set
# Network device support
#
CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
CONFIG_NET_ETHERNET=y
# CONFIG_ARM_AM79C961A is not set
CONFIG_NET_VENDOR_3COM=y
# 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_DM9102 is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_LNE390 is not set
# CONFIG_NE3210 is not set
CONFIG_NE2K_PCI=y
+# CONFIG_SIS900 is not set
# 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
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN 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_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring driver support
+#
# CONFIG_TR is not set
-# CONFIG_SHAPER is not set
-# CONFIG_HOSTESS_SV11 is not set
-# CONFIG_COSA is not set
+# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
#
# SCSI support
# Sound
#
CONFIG_SOUND=m
+# CONFIG_SOUND_CMPCI is not set
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT 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_AD1816 is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_CS4232 is not set
# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_VMIDI is not set
# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SOFTOSS is not set
+CONFIG_SOUND_SB=m
# 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_VIA82CXXX is not set
# CONFIG_SOUND_YM3812 is not set
-# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
# CONFIG_SOUND_UART6850 is not set
# CONFIG_SOUND_VIDC is not set
CONFIG_SOUND_WAVEARTIST=m
# Filesystems
#
# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS_FS=y
CONFIG_ADFS_FS=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
+# CONFIG_EFS_FS is not set
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_DEVPTS_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_UDF_FS is not set
# CONFIG_UFS_FS is not set
#
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
CONFIG_NFSD=m
-# CONFIG_NFSD_SUN is not set
+# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
#
# Partition Types
#
+CONFIG_PARTITION_ADVANCED=y
# CONFIG_OSF_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
CONFIG_ACORN_PARTITION=y
CONFIG_ACORN_PARTITION_ADFS=y
# CONFIG_ACORN_PARTITION_ICS 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_14 is not set
CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
#
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
-# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_LL is not set
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/proc-fns.h>
+#include <asm/processor.h>
#include <asm/semaphore.h>
#include <asm/system.h>
#include <asm/uaccess.h>
extern unsigned int local_bh_count[NR_CPUS];
extern unsigned int local_irq_count[NR_CPUS];
-extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
-
/*
* syscalls
*/
EXPORT_SYMBOL(__machine_arch_type);
/* networking */
-EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(__csum_ipv6_magic);
EXPORT_SYMBOL_NOVERS(strtok);
EXPORT_SYMBOL_NOVERS(strrchr);
EXPORT_SYMBOL_NOVERS(strstr);
-EXPORT_SYMBOL_NOVERS(__memset);
-EXPORT_SYMBOL_NOVERS(memset); /* needed for some versions of gcc */
+EXPORT_SYMBOL_NOVERS(memset);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memmove);
EXPORT_SYMBOL_NOVERS(memcmp);
continue;
pci_write_config_word(dev, PCI_STATUS, status & 0xf900);
- printk(KERN_DEBUG "PCI: status %04X on %s\n",
- status, dev->name);
+ printk(KERN_DEBUG "PCI: %02X:%02X: status %04X on %s\n",
+ dev->bus->number, dev->devfn, status, dev->name);
}
}
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
- struct pci_dev *dev;
+ struct list_head *walk = &bus->devices;
- for (dev = bus->devices; dev; dev = dev->sibling) {
+ for (walk = walk->next; walk != &bus->devices; walk = walk->next) {
+ struct pci_dev *dev = pci_dev_b(walk);
u16 cmd;
/*
return 0;
}
+#ifdef CONFIG_FOOTBRIDGE
/* ebsa285 host-specific stuff */
static int irqmap_ebsa285[] __initdata = { IRQ_IN1, IRQ_IN0, IRQ_PCI, IRQ_IN3 };
static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
if (dev->irq >= 128)
- return 16 + (dev->irq & 0x1f);
+ return dev->irq & 0x1f;
if (dev->irq >= 1 && dev->irq <= 4)
return irqmap_cats[dev->irq - 1];
no_swizzle,
netwinder_map_irq
};
+#endif
+
+#ifdef CONFIG_ARCH_NEXUSPCI
+/*
+ * Owing to a PCB cockup, issue A backplanes are wired thus:
+ *
+ * Slot 1 2 3 4 5 Bridge
+ * IRQ D C B A A
+ * A D C B B
+ * B A D C C
+ * C B A D D
+ *
+ * ID A31 A30 A29 A28 A27 A26
+ */
+
+static int irqmap_ftv[] __initdata = { IRQ_PCI_A, IRQ_PCI_B, IRQ_PCI_C, IRQ_PCI_D };
+
+static int __init ftv_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+ return irqmap_ftv[(slot + pin) & 3];
+}
+
+/* ftv host-specific stuff */
+static struct hw_pci ftv_pci __initdata = {
+ plx90x0_init,
+ 0x9000,
+ 0x00100000,
+ no_swizzle,
+ ftv_map_irq
+};
+#endif
void __init pcibios_init(void)
{
struct hw_pci *hw_pci = NULL;
+#ifdef CONFIG_FOOTBRIDGE
if (machine_is_ebsa285())
hw_pci = &ebsa285_pci;
else if (machine_is_cats())
hw_pci = &cats_pci;
else if (machine_is_netwinder())
hw_pci = &netwinder_pci;
+#endif
+#ifdef CONFIG_ARCH_NEXUSPCI
+ hw_pci = &ftv_pci;
+#endif
if (hw_pci == NULL)
return;
pci_fixup_irqs(hw_pci->swizzle, hw_pci->map_irq);
pci_set_bus_ranges();
+#ifdef CONFIG_FOOTBRIDGE
/*
* Initialise any other hardware after we've got the PCI bus
* initialised. We may need the PCI bus to talk to this other
* hardware.
*/
hw_init();
+#endif
}
char * __init pcibios_setup(char *str)
return str;
}
-void __init
-pcibios_align_resource(void *data, struct resource *res, unsigned long size)
+/*
+ * Assign new address to PCI resource. We hope our resource information
+ * is complete.
+ *
+ * Expects start=0, end=size-1, flags=resource type.
+ */
+int pci_assign_resource(struct pci_dev *dev, int i)
+{
+ return 0;
+}
+
+void pcibios_align_resource(void *data, struct resource *res, unsigned long size)
{
}
};
void __init dc21285_init(void);
+void __init plx90x0_init(void);
/* 15 */ .long SYMBOL_NAME(sys_chmod)
.long SYMBOL_NAME(sys_lchown16)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_break */
- .long SYMBOL_NAME(sys_stat)
+ .long SYMBOL_NAME(sys_ni_syscall) /* was sys_stat */
.long SYMBOL_NAME(sys_lseek)
/* 20 */ .long SYMBOL_NAME(sys_getpid)
- .long SYMBOL_NAME(sys_mount_wrapper)
+ .long SYMBOL_NAME(sys_mount)
.long SYMBOL_NAME(sys_oldumount)
.long SYMBOL_NAME(sys_setuid16)
.long SYMBOL_NAME(sys_getuid16)
/* 25 */ .long SYMBOL_NAME(sys_stime)
.long SYMBOL_NAME(sys_ptrace)
.long SYMBOL_NAME(sys_alarm)
- .long SYMBOL_NAME(sys_fstat)
+ .long SYMBOL_NAME(sys_ni_syscall) /* was sys_fstat */
.long SYMBOL_NAME(sys_pause)
/* 30 */ .long SYMBOL_NAME(sys_utime)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_stty */
.long SYMBOL_NAME(sys_setgroups16)
.long SYMBOL_NAME(old_select)
.long SYMBOL_NAME(sys_symlink)
- .long SYMBOL_NAME(sys_lstat)
+ .long SYMBOL_NAME(sys_ni_syscall) /* was sys_lstat */
/* 85 */ .long SYMBOL_NAME(sys_readlink)
.long SYMBOL_NAME(sys_uselib)
.long SYMBOL_NAME(sys_swapon)
/* 120 */ .long SYMBOL_NAME(sys_clone_wapper)
.long SYMBOL_NAME(sys_setdomainname)
.long SYMBOL_NAME(sys_newuname)
- .long SYMBOL_NAME(sys_ni_syscall) /* .long SYMBOL_NAME(sys_modify_ldt) */
+ .long SYMBOL_NAME(sys_ni_syscall)
.long SYMBOL_NAME(sys_adjtimex)
/* 125 */ .long SYMBOL_NAME(sys_mprotect)
.long SYMBOL_NAME(sys_sigprocmask)
.long SYMBOL_NAME(sys_ni_syscall) /* .long _sys_afs_syscall */
.long SYMBOL_NAME(sys_setfsuid16)
.long SYMBOL_NAME(sys_setfsgid16)
-/* 140 */ .long SYMBOL_NAME(sys_llseek_wrapper)
+/* 140 */ .long SYMBOL_NAME(sys_llseek)
.long SYMBOL_NAME(sys_getdents)
.long SYMBOL_NAME(sys_select)
.long SYMBOL_NAME(sys_flock)
#elif defined(CONFIG_ARCH_SA1100)
.macro addruart,rx
mov \rx, #0xf8000000
- add \rx, \rx, #0x00050000
+ add \rx, \rx, #0x00050000 @ Ser3
+ @add \rx, \rx, #0x00010000 @ Ser1
.endm
.macro senduart,rd,rx
- str \rd, [\rx, #0x14] @ UARTDR
+ str \rd, [\rx, #0x14] @ UTDR
.endm
- .macro busyuart,rd,rx
+ .macro waituart,rd,rx
1001: ldr \rd, [\rx, #0x20] @ UTSR1
- tst \rd, #1 << 2
+ tst \rd, #1 << 2 @ UTSR1_TNF
beq 1001b
.endm
+ .macro busyuart,rd,rx
+1001: ldr \rd, [\rx, #0x20] @ UTSR1
+ tst \rd, #1 << 0 @ UTSR1_TBY
+ bne 1001b
+ .endm
+
#else
#error Unknown architecture
#endif
#ifdef CONFIG_HOST_FOOTBRIDGE
csrio.flags = IORESOURCE_IO;
+ csrio.name = "DC21285";
csrmem.flags = IORESOURCE_MEM;
+ csrmem.name = "DC21285";
allocate_resource(&ioport_resource, &csrio, 128,
0xff00, 0xffff, 128, NULL, NULL);
(1 << 31) | (1 << 29) | (1 << 28) | (1 << 24);
#endif
- printk(KERN_DEBUG"PCI: DC21285 footbridge, revision %02lX\n",
+ printk(KERN_DEBUG "PCI: DC21285 footbridge, revision %02lX\n",
*CSR_CLASSREV & 0xff);
pci_scan_bus(0, &dc21285_ops, NULL);
mov r0, r1
mov r1, r4
mov r2, r3
- mov r3, lr
b baddataabort
Ldata_ldrstr_post:
and r2, r6, #31 @ int mode
b SYMBOL_NAME(bad_mode)
-
+#ifdef CONFIG_NWFPE
+ /* The FPE is always present */
+ .equ fpe_not_present, 0
+#else
wfs_mask_data: .word 0x0e200110 @ WFS/RFS
.word 0x0fef0fff
.word 0x0d0d0100 @ LDF [sp]/STF [sp]
add r5, r5, r4, lsl #2
str r5, [sp, r6, lsr #14] @ Save reg
mov pc, r9
+#endif
/*
* SVC mode handlers
stmfd sp!, {r4 - sl, fp, lr} @ Store most regs on stack
mrs ip, cpsr
stmfd sp!, {ip} @ Save cpsr_SVC
- ldr r2, [r1, #TSS_DOMAIN]
str sp, [r0, #TSS_SAVE] @ Save sp_SVC
ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
- mcr p15, 0, r2, c3, c0 @ Set domain register
+ ldr r2, [r1, #TSS_DOMAIN]
ldmfd sp!, {ip}
+ mcr p15, 0, r2, c3, c0 @ Set domain register
msr spsr, ip @ Save tasks CPSR into SPSR for this return
ldmfd sp!, {r4 - sl, fp, pc}^ @ Load all regs saved previously
* All exits to user mode from the kernel go through this code.
*/
+#define S_OFF 8
+#define SYSCALL_REGS r4, r5
+
/*
* Define to favour ARM8, ARM9 and StrongARM cpus. This says that it is
* cheaper to use two LDR instructions than a two-register LDM, if the
.align 5
fast_syscall_return:
- str r0, [sp, #S_R0 + 4] @ returned r0
+ str r0, [sp, #S_R0 + S_OFF] @ returned r0
slow_syscall_return:
- add sp, sp, #4
+ add sp, sp, #S_OFF
ret_from_sys_call:
#ifdef HARVARD_CACHE
ldr r0, bh_data
/*=============================================================================
* SWI handler
*-----------------------------------------------------------------------------
- *
- * We now handle sys-call tracing, and the errno in the task structure.
- * Still have a problem with >4 arguments for functions. Theres only
- * a couple of functions in the code that have 5 arguments, so Im not
- * too worried.
*/
+/*
+ * Create some aliases for some registers. These should allow
+ * us to have in theory up to 7 arguments to a function.
+ */
+scno .req r9 @ syscall number
+tbl .req r8 @ syscall table pointer
+tip .req r7 @ temporary IP
+
.align 5
vector_swi: save_user_regs
mask_pc lr, lr
mov fp, #0
- ldr r6, [lr, #-4] @ get SWI instruction
- arm700_bug_check r6, r7
+ ldr scno, [lr, #-4] @ get SWI instruction
+ arm700_bug_check scno, ip
#ifdef CONFIG_ALIGNMENT_TRAP
- ldr r7, .LCswi
- ldr r7, [r7]
- mcr p15, 0, r7, c1, c0
+ ldr ip, .LCswi
+ ldr ip, [ip]
+ mcr p15, 0, ip, c1, c0
#endif
- enable_irqs r7
+ enable_irqs ip
- str r4, [sp, #-4]! @ new style: (r0 = arg1, r4 = arg5)
+ stmdb sp!, {SYSCALL_REGS} @ new style: (r0 = arg1, r4 = arg5, r5 = arg6)
+ @ Note that we dont have to handle
+ @ sys_syscalls arg7 here
adrsvc al, lr, fast_syscall_return
- bic r6, r6, #0xff000000 @ mask off SWI op-code
- eor r6, r6, #OS_NUMBER<<20 @ check OS number
- cmp r6, #NR_syscalls @ check upper syscall limit
+ bic scno, scno, #0xff000000 @ mask off SWI op-code
+ eor scno, scno, #OS_NUMBER<<20 @ check OS number
+ cmp scno, #NR_syscalls @ check upper syscall limit
bcs 2f
- get_current_task r7
- ldr ip, [r7, #TSK_FLAGS] @ check for syscall tracing
- adr r5, SYMBOL_NAME(sys_call_table)
+ get_current_task ip
+ ldr ip, [ip, #TSK_FLAGS] @ check for syscall tracing
+ adr tbl, SYMBOL_NAME(sys_call_table)
tst ip, #PF_TRACESYS
- ldreq pc, [r5, r6, lsl #2] @ call sys routine
+ ldreq pc, [tbl, scno, lsl #2] @ call sys routine
- ldr r7, [sp, #S_IP + 4] @ save old IP
- mov r0, #0
- str r0, [sp, #S_IP + 4] @ trace entry [IP = 0]
+ ldr tip, [sp, #S_IP + S_OFF] @ save old IP
+ mov ip, #0
+ str ip, [sp, #S_IP + S_OFF] @ trace entry [IP = 0]
bl SYMBOL_NAME(syscall_trace)
- str r7, [sp, #S_IP + 4]
+ str tip, [sp, #S_IP + S_OFF]
- ldmib sp, {r0 - r3} @ have to reload r0 - r3
+ add ip, sp, #S_OFF
+ ldmia ip, {r0 - r3} @ have to reload r0 - r3
mov lr, pc
- ldr pc, [r5, r6, lsl #2] @ call sys routine
- str r0, [sp, #S_R0 + 4] @ returned r0
+ ldr pc, [tbl, scno, lsl #2] @ call sys routine
+ str r0, [sp, #S_R0 + S_OFF] @ returned r0
- mov r0, #1
- str r0, [sp, #S_IP + 4] @ trace exit [IP = 1]
+ mov ip, #1
+ str ip, [sp, #S_IP + S_OFF] @ trace exit [IP = 1]
bl SYMBOL_NAME(syscall_trace)
- str r7, [sp, #S_IP + 4]
+ str tip, [sp, #S_IP + S_OFF]
b slow_syscall_return
-2: add r1, sp, #4
- tst r6, #0x00f00000 @ is it a Unix SWI?
+2: add r1, sp, #S_OFF
+ tst scno, #0x00f00000 @ is it a Unix SWI?
bne 3f
- subs r0, r6, #(KSWI_SYS_BASE - KSWI_BASE)
+ subs r0, scno, #(KSWI_SYS_BASE - KSWI_BASE)
bcs SYMBOL_NAME(arm_syscall)
b SYMBOL_NAME(sys_ni_syscall) @ not private func
-3: eor r0, r6, #OS_NUMBER <<20 @ Put OS number back
+3: eor r0, scno, #OS_NUMBER <<20 @ Put OS number back
adrsvc al, lr, slow_syscall_return
b SYMBOL_NAME(deferred)
@ r0 = syscall number
@ r5 = syscall table
SYMBOL_NAME(sys_syscall):
- eor r6, r0, #OS_NUMBER << 20
- cmp r6, #NR_syscalls @ check range
- 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]
+ eor scno, r0, #OS_NUMBER << 20
+ cmp scno, #NR_syscalls @ check range
+ add ip, sp, #S_OFF
+ ldmleib ip, {r0 - r3, SYSCALL_REGS} @ get our args
+ stmleia sp, {SYSCALL_REGS} @ Put our arg on the stack
+ ldrle pc, [tbl, scno, lsl #2]
mov r0, #-ENOSYS
- mov pc, lr
+ RETINSTR(mov,pc,lr)
sys_fork_wrapper:
- add r0, sp, #4
+ add r0, sp, #S_OFF
b SYMBOL_NAME(sys_fork)
sys_vfork_wrapper:
- add r0, sp, #4
+ add r0, sp, #S_OFF
b SYMBOL_NAME(sys_vfork)
sys_execve_wrapper:
- add r3, sp, #4
+ add r3, sp, #S_OFF
b SYMBOL_NAME(sys_execve)
-sys_mount_wrapper:
- mov r6, lr
- add r5, sp, #4
- str r5, [sp]
- str r4, [sp, #-4]!
- bl SYMBOL_NAME(sys_compat_mount)
- add sp, sp, #4
- RETINSTR(mov,pc,r6)
-
sys_clone_wapper:
- add r2, sp, #4
+ add r2, sp, #S_OFF
b SYMBOL_NAME(sys_clone)
-sys_llseek_wrapper:
- mov r6, lr
- add r5, sp, #4
- str r5, [sp]
- str r4, [sp, #-4]!
- bl SYMBOL_NAME(sys_compat_llseek)
- add sp, sp, #4
- RETINSTR(mov,pc,r6)
-
sys_sigsuspend_wrapper:
- add r3, sp, #4
+ add r3, sp, #S_OFF
b SYMBOL_NAME(sys_sigsuspend)
sys_rt_sigsuspend_wrapper:
- add r2, sp, #4
+ add r2, sp, #S_OFF
b SYMBOL_NAME(sys_rt_sigsuspend)
sys_sigreturn_wrapper:
- add r0, sp, #4
+ add r0, sp, #S_OFF
b SYMBOL_NAME(sys_sigreturn)
sys_rt_sigreturn_wrapper:
- add r0, sp, #4
+ add r0, sp, #S_OFF
b SYMBOL_NAME(sys_rt_sigreturn)
sys_sigaltstack_wrapper:
- ldr r2, [sp, #4 + S_SP]
+ ldr r2, [sp, #S_OFF + S_SP]
b do_sigaltstack
.data
* r1 contains the unique architecture number. See
* linux/arch/arm/kernel/setup.c machine_desc[] array for the complete
* list. If you require a new number, please follow the instructions
- * given in Documentation/ARM-README.
+ * given in Documentation/arm/README.
*/
__entry: teq r0, #0
movne r0, #'i'
moveq r0, #'a'
beq __error
bl __create_page_tables
- adr lr, __aligned_call
+ adr lr, __ret
add pc, r10, #12 @ flush caches (returns ctrl reg)
__switch_data: .long __mmap_switched
.long SYMBOL_NAME(cr_alignment)
.long SYMBOL_NAME(init_task_union)+8192
- /*
- * This needs to be aligned to a cache line.
- */
- .align 5
-__aligned_call:
- ldr lr, __switch_data
-#ifdef CONFIG_ALIGNMENT_TRAP
- orr r0, r0, #2 @ ...........A.
-#endif
+__ret: ldr lr, __switch_data
mcr p15, 0, r0, c1, c0
+ mov r0, r0
+ mov r0, r0
+ mov r0, r0
mov pc, lr
/*
str r9, [r6] @ Save processor ID
str r1, [r7] @ Save machine type
+#ifdef CONFIG_ALIGNMENT_TRAP
+ orr r0, r0, #2 @ ...........A.
+#endif
bic r2, r0, #2 @ Clear 'A' bit
stmia r8, {r0, r2} @ Save control register values
b SYMBOL_NAME(start_kernel)
* amount which are required to get the kernel running, which
* generally means mapping in the kernel code.
*
- * We only map in 2MB of RAM, which should be sufficient in
+ * We only map in 4MB of RAM, which should be sufficient in
* all cases.
*
- * r4 = physical address of page tables
* r5 = physical address of start of RAM
* r6 = physical IO address
* r7 = byte offset into page tables for IO
* r8 = page table flags
*/
__create_page_tables:
+ add r4, r5, #SWAPPER_PGDIR_OFFSET
mov r0, r4
mov r3, #0
add r2, r0, #0x4000 @ Clear page table
teq r0, r2
bne 1b
/*
- * map in two sections (2MB) for kernel.
+ * Create identity mapping for first MB of kernel.
+ * map in four sections (4MB) for kernel.
* these are marked cacheable and bufferable.
+ *
+ * The identity mapping will be removed by paging_init()
*/
- add r0, r4, #(TEXTADDR - 0x8000) >> 18
mov r3, #0x0c
orr r3, r3, r8
add r3, r3, r5
+ add r0, r4, r5, lsr #18
+ str r3, [r0]
+ add r0, r4, #(TEXTADDR - 0x8000) >> 18
+ str r3, [r0], #4
+ add r3, r3, #1 << 20
+ str r3, [r0], #4
+ add r3, r3, #1 << 20
str r3, [r0], #4
add r3, r3, #1 << 20
str r3, [r0], #4
* via a serial before paging_init.
*/
add r0, r4, r7
+ rsb r3, r7, #0x4000 @ PTRS_PER_PGD*sizeof(long)
+ cmp r3, #0x0800
+ addge r2, r0, #0x0800
+ addlt r2, r0, r3
orr r3, r6, r8
- add r2, r0, #0x0800
1: str r3, [r0], #4
add r3, r3, #1 << 20
teq r0, r2
* Lookup machine architecture
* r1 = machine architecture number
* Returns:
- * r4 = physical address of page tables
+ * r4 = unused word
* r5 = physical start address of RAM
* r6 = physical address of IO
* r7 = byte offset into page tables for IO
adr r4, __arch_types_start
add r4, r4, r1, lsl #4
ldmia r4, {r4, r5, r6, r7}
- add r4, r5, #SWAPPER_PGDIR_OFFSET
mov r7, r7, lsr #18
mov pc, lr
1: mov r7, #0
@ 0x04 - DEC EBSA285
.long 0
.long 0
- .long 0x24000000 @ I/O base address (0x42000000 -> 0xfe000000)
- .long 0xe0000000
+ .long DC21285_ARMCSR_BASE
+ .long 0xfe000000
@ 0x05 - Rebel.com NetWinder
.long 0
.long 0
- .long 0x24000000 @ I/O base address (0x42000000 -> 0xfe000000)
- .long 0xe0000000
+ .long DC21285_ARMCSR_BASE
+ .long 0xfe000000
@ 0x06 - CATS
.long 0
.long 0
- .long 0x24000000 @ I/O base address (0x42000000 -> 0xfe000000)
- .long 0xe0000000
+ .long DC21285_ARMCSR_BASE
+ .long 0xfe000000
@ 0x07 - tbox
.long 0
.long 0
.long 0
.long 0
-__arch_types_end:
- @ unknown - SA1100
+
+ @ 0x10 - SA1100
.long 0
.long 0xc0000000
.long 0x80000000
- .long 0xe0000000
+ .long 0xf8000000
+
+ /*
+ * Don't add anything here unless you have an
+ * architecture number allocated - see
+ * Documentation/arm/README
+ */
+__arch_types_end:
static int __init nohlt_setup(char *__unused)
{
hlt_counter = 1;
- return 0;
+ return 1;
}
static int __init hlt_setup(char *__unused)
{
hlt_counter = 0;
- return 0;
+ return 1;
}
__setup("nohlt", nohlt_setup);
void machine_power_off(void)
{
+ arch_power_off();
}
void show_regs(struct pt_regs * regs)
int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
{
if (current->used_math)
- memcpy(fp, ¤t->thread.fpstate.soft, sizeof (fp));
+ memcpy(fp, ¤t->thread.fpstate.soft, sizeof (*fp));
return current->used_math;
}
struct machine_desc {
const char *name; /* architecture name */
unsigned int param_offset; /* parameter page */
+ unsigned int video_start; /* start of video RAM */
+ unsigned int video_end; /* end of video RAM */
unsigned int reserve_lp0 :1; /* never has lp0 */
unsigned int reserve_lp1 :1; /* never has lp1 */
unsigned int reserve_lp2 :1; /* never has lp2 */
unsigned int broken_hlt :1; /* hlt is broken */
unsigned int soft_reboot :1; /* soft reboot */
- unsigned int video_start; /* start of video RAM */
- unsigned int video_end; /* end of video RAM */
void (*fixup)(struct machine_desc *,
struct param_struct *, char **);
};
meminfo.nr_banks = 0;
}
- start = 0;
+ start = PHYS_OFFSET;
size = memparse(from + 4, &from);
if (*from == '@')
start = memparse(from + 1, &from);
}
#define O_PFN_DOWN(x) ((x) >> PAGE_SHIFT)
-#define P_PFN_DOWN(x) O_PFN_DOWN((x) - PHYS_OFFSET)
#define V_PFN_DOWN(x) O_PFN_DOWN(__pa(x))
#define O_PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT)
-#define P_PFN_UP(x) O_PFN_UP((x) - PHYS_OFFSET)
#define V_PFN_UP(x) O_PFN_UP(__pa(x))
#define PFN_SIZE(x) ((x) >> PAGE_SHIFT)
#define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \
(((unsigned long)(s)) & PAGE_MASK))
+/*
+ * FIXME: These can be removed when Ingo's cleanup patch goes in
+ */
#define free_bootmem(s,sz) free_bootmem((s)<<PAGE_SHIFT, (sz)<<PAGE_SHIFT)
#define reserve_bootmem(s,sz) reserve_bootmem((s)<<PAGE_SHIFT, (sz)<<PAGE_SHIFT)
*/
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) {
- if (__pa(initrd_end) > (meminfo.end + PHYS_OFFSET)) {
+ if (__pa(initrd_end) > meminfo.end) {
printk ("initrd extends beyond end of memory "
"(0x%08lx > 0x%08lx) - disabling initrd\n",
- __pa(initrd_end), meminfo.end + PHYS_OFFSET);
+ __pa(initrd_end), meminfo.end);
initrd_start = 0;
initrd_end = 0;
}
#endif
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
- reserve_bootmem(O_PFN_DOWN(initrd_start),
+ reserve_bootmem(V_PFN_DOWN(initrd_start),
PFN_RANGE(initrd_start, initrd_end));
#endif
}
char **cmdline)
{
#if 0
- if (machine_is_co285()) {
- extern unsigned long boot_memory_end;
- extern char boot_command_line[];
+ extern unsigned long boot_memory_end;
+ extern char boot_command_line[];
- meminfo.nr_banks = 1;
- meminfo.bank[0].start = PHYS_OFFSET;
- meminfo.bank[0].size = boot_memory_end;
+ meminfo.nr_banks = 1;
+ meminfo.bank[0].start = PHYS_OFFSET;
+ meminfo.bank[0].size = boot_memory_end;
+
+ *cmdline = boot_command_line;
+#endif
+}
- *cmdline = boot_command_line;
+static void __init
+fixup_sa1100(struct machine_desc *desc, struct param_struct *params,
+ char **cmdline)
+{
+#ifdef CONFIG_ARCH_SA1100
+ int i;
+ extern struct mem_desc {
+ unsigned long phys_start;
+ unsigned long length;
+ } mem_desc[];
+ extern unsigned int mem_desc_size;
+
+ for( i = 0; i < mem_desc_size; i++ ) {
+ if( i >= NR_BANKS ) {
+ printk( __FUNCTION__
+ ": mem_desc too large for meminfo structure\n");
+ break;
+ }
+ meminfo.bank[i].start = mem_desc[i].phys_start;
+ meminfo.bank[i].size = mem_desc[i].length;
}
+ meminfo.nr_banks = i;
+
+#if defined(CONFIG_SA1100_BRUTUS)
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ setup_ramdisk( 1, 0, 0, 8192 );
+ setup_initrd( __phys_to_virt(0xd8000000), 0x00400000 );
+#elif defined(CONFIG_SA1100_EMPEG)
+ ROOT_DEV = MKDEV( 3, 1 ); /* /dev/hda1 */
+ setup_ramdisk( 1, 0, 0, 4096 );
+ setup_initrd( 0xd0000000+((1024-320)*1024), (320*1024) );
+#elif defined(CONFIG_SA1100_TIFON)
+ ROOT_DEV = MKDEV(UNNAMED_MAJOR, 0);
+ setup_ramdisk(1, 0, 0, 4096);
+ setup_initrd( 0xd0000000 + 0x1100004, 0x140000 );
+#elif defined(CONFIG_SA1100_VICTOR)
+ ROOT_DEV = MKDEV( 60, 2 );
+
+ /* Get command line parameters passed from the loader (if any) */
+ if( *((char*)0xc0000000) )
+ strcpy( default_command_line, ((char *)0xc0000000) );
+
+ /* power off if any problem */
+ strcat( default_command_line, " panic=1" );
+#elif defined(CONFIG_SA1100_LART)
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ setup_ramdisk(1, 0, 0, 8192);
+ setup_initrd(0xc0400000, 0x00400000);
+#endif
#endif
}
NO_VIDEO,
0, 0, 0, 0, 0,
NULL
- }, { "Nexus-FTV/PCI", /* Philip Blundell */
+ }, { "FTV/PCI", /* Philip Blundell */
NO_PARAMS,
NO_VIDEO,
0, 0, 0, 0, 0,
NULL
}, { "Shark", /* Alexander Schulz */
NO_PARAMS,
- NO_VIDEO,
+ /* do you really mean 0x200000? */
+ 0x06000000, 0x06000000+0x00200000,
0, 0, 0, 0, 0,
NULL
+ }, { "SA1100-based", /* Nicolas Pitre */
+ NO_PARAMS,
+ NO_VIDEO,
+ 0, 0, 0, 0, 0,
+ fixup_sa1100
}
};
err |= __put_user (current->thread.trap_no, &sc->trap_no);
err |= __put_user (current->thread.error_code, &sc->error_code);
+ err |= __put_user (current->thread.address, &sc->fault_address);
err |= __put_user (mask, &sc->oldmask);
return err;
return error;
}
+#define PGOFF_SHIFT (PAGE_SHIFT - 12)
+#define PGOFF_MASK (~((1 << PGOFF_SHIFT) - 1))
+
/*
- * Perform the select(nd, in, out, ex, tv) and mmap() system
- * calls. ARM Linux didn't use to be able to handle more than
- * 4 system call parameters, so these system calls used a memory
- * block for parameter passing..
+ * Note: off_4k is always units of 4K. If we can't do the requested
+ * offset, we return EINVAL.
*/
+asmlinkage long
+sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
+ unsigned long flags, unsigned long fd, unsigned long off_4k)
+{
+ unsigned long pgoff;
+
+ if (off_4k & ~PGOFF_MASK)
+ return -EINVAL;
+
+ pgoff = off_4k >> PGOFF_SHIFT;
+
+ return do_mmap2(addr, len, prot, flags, fd, pgoff);
+}
struct mmap_arg_struct {
unsigned long addr;
return error;
}
+/*
+ * Perform the select(nd, in, out, ex, tv) and mmap() system
+ * calls.
+ */
extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
struct sel_arg_struct {
return error;
}
-/*
- * Detect the old function calling standard
- */
-static inline unsigned long old_calling_standard (struct pt_regs *regs)
-{
- unsigned long instr, *pcv = (unsigned long *)(instruction_pointer(regs) - 8);
- return (!get_user (instr, pcv) && instr == 0xe1a0300d);
-}
-
/* Compatability functions - we used to pass 5 parameters as r0, r1, r2, *r3, *(r3+4)
* We now use r0 - r4, and return an error if the old style calling standard is used.
* Eventually these functions will disappear.
*/
-asmlinkage int
-sys_compat_llseek (unsigned int fd, unsigned long offset_high, unsigned long offset_low,
- loff_t *result, unsigned int origin, struct pt_regs *regs)
-{
- extern int sys_llseek (unsigned int, unsigned long, unsigned long, loff_t *, unsigned int);
-
- if (old_calling_standard (regs)) {
- printk (KERN_NOTICE "%s (%d): unsupported llseek call standard\n",
- current->comm, current->pid);
- return -EINVAL;
- }
- return sys_llseek (fd, offset_high, offset_low, result, origin);
-}
-
-asmlinkage int
-sys_compat_mount (char *devname, char *dirname, char *type, unsigned long flags, void *data,
- struct pt_regs *regs)
-{
- extern int sys_mount (char *, char *, char *, unsigned long, void *);
-
- if (old_calling_standard (regs)) {
- printk (KERN_NOTICE "%s (%d): unsupported mount call standard\n",
- current->comm, current->pid);
- return -EINVAL;
- }
- return sys_mount (devname, dirname, type, flags, data);
-}
-
-asmlinkage int sys_uname (struct old_utsname * name)
+asmlinkage int sys_uname(struct old_utsname * name)
{
static int warned = 0;
int err;
down(&uts_sem);
error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
- error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
- error -= __put_user(0,name->nodename+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
- error -= __put_user(0,name->release+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
- error -= __put_user(0,name->version+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
- error -= __put_user(0,name->machine+__OLD_UTS_LEN);
+ error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
+ error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
+ error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
+ error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
+ error |= __put_user(0,name->release+__OLD_UTS_LEN);
+ error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
+ error |= __put_user(0,name->version+__OLD_UTS_LEN);
+ error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
+ error |= __put_user(0,name->machine+__OLD_UTS_LEN);
up(&uts_sem);
schedule();
return -ERESTARTNOHAND;
}
-
/*
* xtime is atomically updated in timer_bh. lost_ticks is
- * nonzero if the tiemr bottom half hasnt executed yet.
+ * nonzero if the timer bottom half hasnt executed yet.
*/
if (lost_ticks)
tv->tv_usec += USECS_PER_JIFFY;
dump_instr(instruction_pointer(regs), 0);
}
- spin_unlock_irq(&die_lock);
+ spin_unlock_irq(&die_lock);
+ do_exit(SIGSEGV);
}
-static void die_if_kernel(const char *str, struct pt_regs *regs, int err)
+void die_if_kernel(const char *str, struct pt_regs *regs, int err)
{
if (user_mode(regs))
return;
}
/*
- * bad_mode handles the impossible case in the vectors.
- * If you see one of these, then it's extremely serious,
- * and could mean you have buggy hardware. It never
- * returns, and never tries to sync. We hope that we
- * can dump out some state information...
+ * bad_mode handles the impossible case in the vectors. If you see one of
+ * these, then it's extremely serious, and could mean you have buggy hardware.
+ * It never returns, and never tries to sync. We hope that we can at least
+ * dump out some state information...
*/
asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode)
{
handler[reason], processor_modes[proc_mode]);
/*
- * Dump out the vectors and stub routines
+ * Dump out the vectors and stub routines. Maybe a better solution
+ * would be to dump them out only if we detect that they are corrupted.
*/
printk(KERN_CRIT "Vectors:\n");
dump_mem(0, 0x40);
current->used_math = 1;
}
+/*
+ * Handle some more esoteric system calls
+ */
asmlinkage int arm_syscall (int no, struct pt_regs *regs)
{
switch (no) {
case 2: /* sys_cacheflush */
#ifdef CONFIG_CPU_32
- /* r0 = start, r1 = length, r2 = flags */
+ /* r0 = start, r1 = end, r2 = flags */
cpu_flush_cache_area(regs->ARM_r0, regs->ARM_r1, 1);
#endif
break;
if (no <= 0x7ff)
return -ENOSYS;
#ifdef CONFIG_DEBUG_USER
- /* experiance shows that these seem to indicate that
+ /* experience shows that these seem to indicate that
* something catastrophic has happened
*/
printk("[%d] %s: arm syscall %d\n", current->pid, current->comm, no);
function, __builtin_return_address(0), size);
}
-#ifdef CONFIG_CPU_26
-asmlinkage void baddataabort(int code, unsigned long instr, struct pt_regs *regs)
+/*
+ * A data abort trap was taken, but the instruction was not an instruction
+ * which should cause the trap to be taken. Try to abort it. Note that
+ * the while(1) is there because we cannot currently handle returning from
+ * this function.
+ */
+asmlinkage void
+baddataabort(int code, unsigned long instr, struct pt_regs *regs)
{
unsigned long phys, addr = instruction_pointer(regs);
#ifdef CONFIG_DEBUG_ERRORS
- printk("pid=%d\n", current->pid);
-
- show_regs(regs);
- dump_instr(instruction_pointer(regs), 1);
+ dump_instr(addr, 1);
{
pgd_t *pgd;
printk ("\n");
}
#endif
- panic("unknown data abort code %d [pc=%08lx *pc=%08lx lr=%08lx sp=%08lx]",
- code, regs->ARM_pc, instr, regs->ARM_lr, regs->ARM_sp);
+ force_sig(SIGILL, current);
+ die_if_kernel("unknown data abort code", regs, instr);
+ while (1);
}
-#endif
void __bug(const char *file, int line, void *data)
{
__backtrace();
}
+void abort(void)
+{
+ void *lr = __builtin_return_address(0);
+
+ printk(KERN_CRIT "abort() called from %p! (Please "
+ "report to rmk@arm.linux.org.uk)\n", lr);
+
+ *(int *)0 = 0;
+
+ /* if that doesn't kill us, halt */
+ panic("Oops failed to kill thread");
+}
+
void __init trap_init(void)
{
extern void __trap_init(void);
#
L_TARGET := lib.a
-L_OBJS := backtrace.o bitops.o checksum.o delay.o \
- string.o system.o uaccess.o
+L_OBJS := changebit.o csumipv6.o csumpartial.o csumpartialcopy.o \
+ csumpartialcopyuser.o clearbit.o copy_page.o findbit.o \
+ memchr.o memcpy.o memset.o memzero.o setbit.o strchr.o \
+ strrchr.o testchangebit.o testclearbit.o testsetbit.o \
+ uaccess.o
+
+O_TARGET := lib.o
+O_OBJS := backtrace.o delay.o
ifeq ($(PROCESSOR),armo)
L_OBJS += uaccess-armo.o
ifeq ($(MACHINE),ebsa110)
L_OBJS += io-ebsa110.o
else
- LX_OBJS += io.o
+ OX_OBJS += io.o
endif
ifeq ($(MACHINE),footbridge)
L_OBJS += io-footbridge.o
endif
+#
+# SA1100 IO routines happen to be the
+# same as the footbridge routines
+#
+ifeq ($(MACHINE),sa1100)
+ L_OBJS += io-footbridge.o
+endif
+
include $(TOPDIR)/Rules.make
.S.o:
getconsdata.o: getconsdata.c
$(CC) $(CFLAGS) -c getconsdata.c
-
-checksum.o string.o: constants.h
+++ /dev/null
-/*
- * linux/arch/arm/lib/bitops.S
- *
- * Copyright (C) 1995, 1996 Russell King
- */
-
-#include <linux/linkage.h>
-#include <asm/assembler.h>
- .text
-
-@ Purpose : Function to set a bit
-@ Prototype: int set_bit(int bit,int *addr)
-
-ENTRY(set_bit)
- and r2, r0, #7
- mov r3, #1
- mov r3, r3, lsl r2
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1, r0, lsr #3]
- orr r2, r2, r3
- strb r2, [r1, r0, lsr #3]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-ENTRY(test_and_set_bit)
- add r1, r1, r0, lsr #3 @ Get byte offset
- and r3, r0, #7 @ Get bit offset
- mov r0, #1
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1]
- tst r2, r0, lsl r3
- orr r2, r2, r0, lsl r3
- moveq r0, #0
- strb r2, [r1]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-@ Purpose : Function to clear a bit
-@ Prototype: int clear_bit(int bit,int *addr)
-
-ENTRY(clear_bit)
- and r2, r0, #7
- mov r3, #1
- mov r3, r3, lsl r2
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1, r0, lsr #3]
- bic r2, r2, r3
- strb r2, [r1, r0, lsr #3]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-ENTRY(test_and_clear_bit)
- add r1, r1, r0, lsr #3 @ Get byte offset
- and r3, r0, #7 @ Get bit offset
- mov r0, #1
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1]
- tst r2, r0, lsl r3
- bic r2, r2, r0, lsl r3
- moveq r0, #0
- strb r2, [r1]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-/* Purpose : Function to change a bit
- * Prototype: int change_bit(int bit,int *addr)
- */
-ENTRY(change_bit)
- and r2, r0, #7
- mov r3, #1
- mov r3, r3, lsl r2
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1, r0, lsr #3]
- eor r2, r2, r3
- strb r2, [r1, r0, lsr #3]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-ENTRY(test_and_change_bit)
- add r1, r1, r0, lsr #3
- and r3, r0, #7
- mov r0, #1
- SAVEIRQS(ip)
- DISABLEIRQS(ip)
- ldrb r2, [r1]
- tst r2, r0, lsl r3
- eor r2, r2, r0, lsl r3
- moveq r0, #0
- strb r2, [r1]
- RESTOREIRQS(ip)
- RETINSTR(mov,pc,lr)
-
-@ Purpose : Find a 'zero' bit
-@ Prototype: int find_first_zero_bit(char *addr,int maxbit);
-
-ENTRY(find_first_zero_bit)
- mov r2, #0 @ Initialise bit position
-Lfindzbit1lp: ldrb r3, [r0, r2, lsr #3] @ Check byte, if 0xFF, then all bits set
- teq r3, #0xFF
- bne Lfoundzbit
- add r2, r2, #8
- cmp r2, r1 @ Check to see if we have come to the end
- bcc Lfindzbit1lp
- add r0, r1, #1 @ Make sure that we flag an error
- RETINSTR(mov,pc,lr)
-Lfoundzbit: tst r3, #1 @ Check individual bits
- moveq r0, r2
- RETINSTR(moveq,pc,lr)
- tst r3, #2
- addeq r0, r2, #1
- RETINSTR(moveq,pc,lr)
- tst r3, #4
- addeq r0, r2, #2
- RETINSTR(moveq,pc,lr)
- tst r3, #8
- addeq r0, r2, #3
- RETINSTR(moveq,pc,lr)
- tst r3, #16
- addeq r0, r2, #4
- RETINSTR(moveq,pc,lr)
- tst r3, #32
- addeq r0, r2, #5
- RETINSTR(moveq,pc,lr)
- tst r3, #64
- addeq r0, r2, #6
- RETINSTR(moveq,pc,lr)
- add r0, r2, #7
- RETINSTR(mov,pc,lr)
-
-@ Purpose : Find next 'zero' bit
-@ Prototype: int find_next_zero_bit(char *addr,int maxbit,int offset)
-
-ENTRY(find_next_zero_bit)
- tst r2, #7
- beq Lfindzbit1lp @ If new byte, goto old routine
- ldrb r3, [r0, r2, lsr#3]
- orr r3, r3, #0xFF00 @ Set top bits so we wont get confused
- stmfd sp!, {r4}
- and r4, r2, #7
- mov r3, r3, lsr r4 @ Shift right by no. of bits
- ldmfd sp!, {r4}
- and r3, r3, #0xFF
- teq r3, #0xFF
- orreq r2, r2, #7
- addeq r2, r2, #1
- beq Lfindzbit1lp @ If all bits are set, goto old routine
- b Lfoundzbit
--- /dev/null
+/*
+ * linux/arch/arm/lib/changebit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+/* Purpose : Function to change a bit
+ * Prototype: int change_bit(int bit,int *addr)
+ */
+ENTRY(change_bit)
+ and r2, r0, #7
+ mov r3, #1
+ mov r3, r3, lsl r2
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1, r0, lsr #3]
+ eor r2, r2, r3
+ strb r2, [r1, r0, lsr #3]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
+++ /dev/null
-/*
- * linux/arch/arm/lib/checksum.S
- *
- * Copyright (C) 1995, 1996, 1997, 1998 Russell King
- */
-#include <linux/config.h>
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/errno.h>
-#include "constants.h"
-
- .text
-
-/* Function: __u32 csum_partial(const char *src, int len, __u32)
- * Params : r0 = buffer, r1 = len, r2 = checksum
- * Returns : r0 = new checksum
- */
-
-ENTRY(csum_partial)
- tst r0, #2
- beq 1f
- subs r1, r1, #2
- addmi r1, r1, #2
- bmi 3f
- bic r0, r0, #3
- ldr r3, [r0], #4
- adds r2, r2, r3, lsr #16
- adcs r2, r2, #0
-1: adds r2, r2, #0
- bics ip, r1, #31
- beq 3f
- stmfd sp!, {r4 - r6}
-2: ldmia r0!, {r3 - r6}
- adcs r2, r2, r3
- adcs r2, r2, r4
- adcs r2, r2, r5
- adcs r2, r2, r6
- ldmia r0!, {r3 - r6}
- adcs r2, r2, r3
- adcs r2, r2, r4
- adcs r2, r2, r5
- adcs r2, r2, r6
- sub ip, ip, #32
- teq ip, #0
- bne 2b
- adcs r2, r2, #0
- ldmfd sp!, {r4 - r6}
-3: ands ip, r1, #0x1c
- beq 5f
-4: ldr r3, [r0], #4
- adcs r2, r2, r3
- sub ip, ip, #4
- teq ip, #0
- bne 4b
- adcs r2, r2, #0
-5: ands ip, r1, #3
- moveq r0, r2
- RETINSTR(moveq,pc,lr)
- mov ip, ip, lsl #3
- rsb ip, ip, #32
- ldr r3, [r0]
- mov r3, r3, lsl ip
- adds r2, r2, r3, lsr ip
- adc r0, r2, #0
- RETINSTR(mov,pc,lr)
-
-/* Function: __u32 csum_partial_copy_from_user (const char *src, char *dst, int len, __u32 sum, int *err_ptr)
- * Params : r0 = src, r1 = dst, r2 = len, r3 = sum, [sp, #0] = &err
- * Returns : r0 = checksum, [[sp, #0], #0] = 0 or -EFAULT
- */
-#if defined(CONFIG_CPU_32)
-
- .macro save_regs
- stmfd sp!, {r1 - r2, r4 - r8, fp, ip, lr, pc}
- .endm
-
- .macro load_regs,flags
- ldm\flags fp, {r1, r2, r4-r8, fp, sp, pc}
- .endm
-
- .macro load1b, reg1
-9999: ldrbt \reg1, [r0], $1
- .section __ex_table, "a"
- .align 3
- .long 9999b, 6001f
- .previous
- .endm
-
- .macro load2b, reg1, reg2
-9999: ldrbt \reg1, [r0], $1
-9998: ldrbt \reg2, [r0], $1
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .previous
- .endm
-
- .macro load1l, reg1
-9999: ldrt \reg1, [r0], $4
- .section __ex_table, "a"
- .align 3
- .long 9999b, 6001f
- .previous
- .endm
-
- .macro load2l, reg1, reg2
-9999: ldrt \reg1, [r0], $4
-9998: ldrt \reg2, [r0], $4
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .previous
- .endm
-
- .macro load4l, reg1, reg2, reg3, reg4
-9999: ldrt \reg1, [r0], $4
-9998: ldrt \reg2, [r0], $4
-9997: ldrt \reg3, [r0], $4
-9996: ldrt \reg4, [r0], $4
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .long 9997b, 6001f
- .long 9996b, 6001f
- .previous
- .endm
-
-#elif defined(CONFIG_CPU_26)
-
- .macro save_regs
- stmfd sp!, {r1 - r2, r4 - r9, fp, ip, lr, pc}
- mov r9, sp, lsr #13
- mov r9, r9, lsl #13
- ldr r9, [r9, #TSK_ADDR_LIMIT]
- mov r9, r9, lsr #24
- .endm
-
- .macro load_regs,flags
- ldm\flags fp, {r1, r2, r4-r9, fp, sp, pc}^
- .endm
-
- .macro load1b, reg1
- tst r9, #0x01
-9999: ldreqbt \reg1, [r0], #1
- ldrneb \reg1, [r0], #1
- .section __ex_table, "a"
- .align 3
- .long 9999b, 6001f
- .previous
- .endm
-
- .macro load2b, reg1, reg2
- tst r9, #0x01
-9999: ldreqbt \reg1, [r0], #1
- ldrneb \reg1, [r0], #1
-9998: ldreqbt \reg2, [r0], #1
- ldrneb \reg2, [r0], #1
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .previous
- .endm
-
- .macro load1l, reg1
- tst r9, #0x01
-9999: ldreqt \reg1, [r0], #4
- ldrne \reg1, [r0], #4
- .section __ex_table, "a"
- .align 3
- .long 9999b, 6001f
- .previous
- .endm
-
- .macro load2l, reg1, reg2
- tst r9, #0x01
- ldmneia r0!, {\reg1, \reg2}
-9999: ldreqt \reg1, [r0], #4
-9998: ldreqt \reg2, [r0], #4
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .previous
- .endm
-
- .macro load4l, reg1, reg2, reg3, reg4
- tst r9, #0x01
- ldmneia r0!, {\reg1, \reg2, \reg3, \reg4}
-9999: ldreqt \reg1, [r0], #4
-9998: ldreqt \reg2, [r0], #4
-9997: ldreqt \reg3, [r0], #4
-9996: ldreqt \reg4, [r0], #4
- .section __ex_table, "a"
- .long 9999b, 6001f
- .long 9998b, 6001f
- .long 9997b, 6001f
- .long 9996b, 6001f
- .previous
- .endm
-
-#else
-#error Unknown CPU architecture
-#endif
-
-ENTRY(csum_partial_copy_from_user)
- mov ip, sp
- save_regs
- sub fp, ip, #4
- cmp r2, #4
- blt .too_small_user
- tst r1, #2 @ Test destination alignment
- beq .dst_aligned_user
- subs r2, r2, #2 @ We do not know if SRC is aligned...
- load2b ip, r8
- orr ip, ip, r8, lsl #8
- adds r3, r3, ip
- adcs r3, r3, #0
- strb ip, [r1], #1
- mov ip, ip, lsr #8
- strb ip, [r1], #1 @ Destination now aligned
-.dst_aligned_user:
- tst r0, #3
- bne .src_not_aligned_user
- adds r3, r3, #0
- bics ip, r2, #15 @ Routine for src & dst aligned
- beq 2f
-1: load4l r4, r5, r6, r7
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- load2l r4, r5
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- tst ip, #4
- beq 4f
-3: load1l r4
- str r4, [r1], #4
- adcs r3, r3, r4
-4: ands r2, r2, #3
- adceq r0, r3, #0
- load_regs eqea
- load1l r4
- tst r2, #2
- beq .exit
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- mov r4, r4, lsr #8
-.exit: tst r2, #1
- strneb r4, [r1], #1
- andne r4, r4, #255
- adcnes r3, r3, r4
- adcs r0, r3, #0
- load_regs ea
-
-.too_small_user:
- teq r2, #0
- load_regs eqea
- cmp r2, #2
- blt .too_small_user1
- load2b ip, r8
- orr ip, ip, r8, lsl #8
- adds r3, r3, ip
- strb ip, [r1], #1
- strb r8, [r1], #1
- tst r2, #1
-.too_small_user1: @ C = 0
- beq .csum_exit
- load1b ip
- strb ip, [r1], #1
- adcs r3, r3, ip
-.csum_exit: adc r0, r3, #0
- load_regs ea
-
-.src_not_aligned_user:
- cmp r2, #4
- blt .too_small_user
- and ip, r0, #3
- bic r0, r0, #3
- load1l r4
- cmp ip, #2
- beq .src2_aligned_user
- bhi .src3_aligned_user
- mov r4, r4, lsr #8
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: load4l r5, r6, r7, r8
- orr r4, r4, r5, lsl #24
- mov r5, r5, lsr #8
- orr r5, r5, r6, lsl #24
- mov r6, r6, lsr #8
- orr r6, r6, r7, lsl #24
- mov r7, r7, lsr #8
- orr r7, r7, r8, lsl #24
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #8
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- load2l r5, r6
- orr r4, r4, r5, lsl #24
- mov r5, r5, lsr #8
- orr r5, r5, r6, lsl #24
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #8
- tst ip, #4
- beq 4f
-3: load1l r5
- orr r4, r4, r5, lsl #24
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #8
-4: ands r2, r2, #3
- adceq r0, r3, #0
- load_regs eqea
- tst r2, #2
- beq .exit
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- b .exit
-
-.src2_aligned_user:
- mov r4, r4, lsr #16
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: load4l r5, r6, r7, r8
- orr r4, r4, r5, lsl #16
- mov r5, r5, lsr #16
- orr r5, r5, r6, lsl #16
- mov r6, r6, lsr #16
- orr r6, r6, r7, lsl #16
- mov r7, r7, lsr #16
- orr r7, r7, r8, lsl #16
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #16
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- load2l r5, r6
- orr r4, r4, r5, lsl #16
- mov r5, r5, lsr #16
- orr r5, r5, r6, lsl #16
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #16
- tst ip, #4
- beq 4f
-3: load1l r5
- orr r4, r4, r5, lsl #16
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #16
-4: ands r2, r2, #3
- adceq r0, r3, #0
- load_regs eqea
- tst r2, #2
- beq .exit
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- load1b r4
- b .exit
-
-.src3_aligned_user:
- mov r4, r4, lsr #24
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: load4l r5, r6, r7, r8
- orr r4, r4, r5, lsl #8
- mov r5, r5, lsr #24
- orr r5, r5, r6, lsl #8
- mov r6, r6, lsr #24
- orr r6, r6, r7, lsl #8
- mov r7, r7, lsr #24
- orr r7, r7, r8, lsl #8
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #24
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- load2l r5, r6
- orr r4, r4, r5, lsl #8
- mov r5, r5, lsr #24
- orr r5, r5, r6, lsl #8
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #24
- tst ip, #4
- beq 4f
-3: load1l r5
- orr r4, r4, r5, lsl #8
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #24
-4: ands r2, r2, #3
- adceq r0, r3, #0
- load_regs eqea
- tst r2, #2
- beq .exit
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- load1l r4
- strb r4, [r1], #1
- adcs r3, r3, r4, lsl #24
- mov r4, r4, lsr #8
- b .exit
-
-#if defined(CONFIG_CPU_32)
- .section .fixup,"ax"
-#endif
- .align 4
-6001: mov r4, #-EFAULT
- ldr r5, [fp, #4]
- str r4, [r5]
- ldmia sp, {r1, r2} @ retrieve original arguments
- add r2, r2, r1
- mov r3, #0 @ zero the buffer
-6002: teq r2, r1
- strneb r3, [r1], #1
- bne 6002b
- load_regs ea
-#if defined(CONFIG_CPU_32)
- .previous
-#endif
-
-/* Function: __u32 csum_partial_copy (const char *src, char *dst, int len, __u32 sum)
- * Params : r0 = src, r1 = dst, r2 = len, r3 = checksum
- * Returns : r0 = new checksum
- */
-ENTRY(csum_partial_copy_nocheck)
-ENTRY(csum_partial_copy)
- mov ip, sp
- stmfd sp!, {r4 - r8, fp, ip, lr, pc}
- sub fp, ip, #4
- cmp r2, #4
- blt Ltoo_small
- tst r1, #2 @ Test destination alignment
- beq Ldst_aligned
- subs r2, r2, #2 @ We do not know if SRC is aligned...
- ldrb ip, [r0], #1
- ldrb r8, [r0], #1
- orr ip, ip, r8, lsl #8
- adds r3, r3, ip
- adcs r3, r3, #0
- strb ip, [r1], #1
- mov ip, ip, lsr #8
- strb ip, [r1], #1 @ Destination now aligned
-Ldst_aligned: tst r0, #3
- bne Lsrc_not_aligned
- adds r3, r3, #0
- bics ip, r2, #15 @ Routine for src & dst aligned
- beq 3f
-1: ldmia r0!, {r4, r5, r6, r7}
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-3: ands ip, r2, #12
- beq 5f
- tst ip, #8
- beq 4f
- ldmia r0!, {r4, r5}
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- tst ip, #4
- beq 5f
-4: ldr r4, [r0], #4
- str r4, [r1], #4
- adcs r3, r3, r4
-5: ands r2, r2, #3
- adceq r0, r3, #0
- LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
- ldr r4, [r0], #4
- tst r2, #2
- beq Lexit_r4
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- b Lexit_r4
-
-Ltoo_small: teq r2, #0
- LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
- cmp r2, #2
- blt Ltoo_small1
- ldrb ip, [r0], #1
- ldrb r8, [r0], #1
- orr ip, ip, r8, lsl #8
- adds r3, r3, ip
- strb ip, [r1], #1
- strb r8, [r1], #1
- tst r2, #1
-Ltoo_small1: ldrneb r4, [r0], #1
-Lexit_r4: tst r2, #1
- strneb r4, [r1], #1
- andne r4, r4, #255
- adcnes r3, r3, r4
- adcs r0, r3, #0
- LOADREGS(ea,fp,{r4 - r8, fp, sp, pc})
-
-Lsrc_not_aligned:
- cmp r2, #4
- blt Ltoo_small
- and ip, r0, #3
- bic r0, r0, #3
- ldr r4, [r0], #4
- cmp ip, #2
- beq Lsrc2_aligned
- bhi Lsrc3_aligned
- mov r4, r4, lsr #8
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: ldmia r0!, {r5, r6, r7, r8}
- orr r4, r4, r5, lsl #24
- mov r5, r5, lsr #8
- orr r5, r5, r6, lsl #24
- mov r6, r6, lsr #8
- orr r6, r6, r7, lsl #24
- mov r7, r7, lsr #8
- orr r7, r7, r8, lsl #24
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #8
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- ldmia r0!, {r5, r6}
- orr r4, r4, r5, lsl #24
- mov r5, r5, lsr #8
- orr r5, r5, r6, lsl #24
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #8
- tst ip, #4
- beq 4f
-3: ldr r5, [r0], #4
- orr r4, r4, r5, lsl #24
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #8
-4: ands r2, r2, #3
- adceq r0, r3, #0
- LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
- tst r2, #2
- beq Lexit_r4
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- b Lexit_r4
-
-Lsrc2_aligned: mov r4, r4, lsr #16
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: ldmia r0!, {r5, r6, r7, r8}
- orr r4, r4, r5, lsl #16
- mov r5, r5, lsr #16
- orr r5, r5, r6, lsl #16
- mov r6, r6, lsr #16
- orr r6, r6, r7, lsl #16
- mov r7, r7, lsr #16
- orr r7, r7, r8, lsl #16
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #16
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- ldmia r0!, {r5, r6}
- orr r4, r4, r5, lsl #16
- mov r5, r5, lsr #16
- orr r5, r5, r6, lsl #16
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #16
- tst ip, #4
- beq 4f
-3: ldr r5, [r0], #4
- orr r4, r4, r5, lsl #16
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #16
-4: ands r2, r2, #3
- adceq r0, r3, #0
- LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
- tst r2, #2
- beq Lexit_r4
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- mov r4, r4, lsr #8
- strb r4, [r1], #1
- ldrb r4, [r0], #1
- b Lexit_r4
-
-Lsrc3_aligned: mov r4, r4, lsr #24
- adds r3, r3, #0
- bics ip, r2, #15
- beq 2f
-1: ldmia r0!, {r5, r6, r7, r8}
- orr r4, r4, r5, lsl #8
- mov r5, r5, lsr #24
- orr r5, r5, r6, lsl #8
- mov r6, r6, lsr #24
- orr r6, r6, r7, lsl #8
- mov r7, r7, lsr #24
- orr r7, r7, r8, lsl #8
- stmia r1!, {r4, r5, r6, r7}
- adcs r3, r3, r4
- adcs r3, r3, r5
- adcs r3, r3, r6
- adcs r3, r3, r7
- mov r4, r8, lsr #24
- sub ip, ip, #16
- teq ip, #0
- bne 1b
-2: ands ip, r2, #12
- beq 4f
- tst ip, #8
- beq 3f
- ldmia r0!, {r5, r6}
- orr r4, r4, r5, lsl #8
- mov r5, r5, lsr #24
- orr r5, r5, r6, lsl #8
- stmia r1!, {r4, r5}
- adcs r3, r3, r4
- adcs r3, r3, r5
- mov r4, r6, lsr #24
- tst ip, #4
- beq 4f
-3: ldr r5, [r0], #4
- orr r4, r4, r5, lsl #8
- str r4, [r1], #4
- adcs r3, r3, r4
- mov r4, r5, lsr #24
-4: ands r2, r2, #3
- adceq r0, r3, #0
- LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
- tst r2, #2
- beq Lexit_r4
- adcs r3, r3, r4, lsl #16
- strb r4, [r1], #1
- ldr r4, [r0], #4
- strb r4, [r1], #1
- adcs r3, r3, r4, lsl #24
- mov r4, r4, lsr #8
- b Lexit_r4
-
-ENTRY(__csum_ipv6_magic)
- stmfd sp!, {lr}
- adds ip, r2, r3
- ldmia r1, {r1 - r3, lr}
- adcs ip, ip, r1
- adcs ip, ip, r2
- adcs ip, ip, r3
- adcs ip, ip, lr
- ldmia r0, {r0 - r3}
- adcs r0, ip, r0
- adcs r0, r0, r1
- adcs r0, r0, r2
- adcs r0, r0, r3
- ldr r3, [sp, #4]
- adcs r0, r0, r3
- adcs r0, r0, #0
- LOADREGS(fd, sp!, {pc})
--- /dev/null
+/*
+ * linux/arch/arm/lib/clearbit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+@ Purpose : Function to clear a bit
+@ Prototype: int clear_bit(int bit,int *addr)
+
+ENTRY(clear_bit)
+ and r2, r0, #7
+ mov r3, #1
+ mov r3, r3, lsl r2
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1, r0, lsr #3]
+ bic r2, r2, r3
+ strb r2, [r1, r0, lsr #3]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/copypage.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+/*
+ * StrongARM optimised copy_page routine
+ * now 1.72bytes/cycle, was 1.60 bytes/cycle
+ * (50MHz bus -> 86MB/s)
+ */
+
+ENTRY(copy_page)
+ stmfd sp!, {r4, lr} @ 2
+ mov r2, #PAGE_SZ/64 @ 1
+1: ldmia r1!, {r3, r4, ip, lr} @ 4
+ subs r2, r2, #1 @ 1
+ stmia r0!, {r3, r4, ip, lr} @ 4
+ ldmia r1!, {r3, r4, ip, lr} @ 4+1
+ stmia r0!, {r3, r4, ip, lr} @ 4
+ ldmia r1!, {r3, r4, ip, lr} @ 4+1
+ stmia r0!, {r3, r4, ip, lr} @ 4
+ ldmia r1!, {r3, r4, ip, lr} @ 4+1
+ stmia r0!, {r3, r4, ip, lr} @ 4
+ bne 1b @ 1
+ LOADREGS(fd, sp!, {r4, pc}) @ 3
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/csumipv6.S
+ *
+ * Copyright (C) 1995-1998 Russell King
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+ .text
+
+ENTRY(__csum_ipv6_magic)
+ str lr, [sp, #-4]!
+ adds ip, r2, r3
+ ldmia r1, {r1 - r3, lr}
+ adcs ip, ip, r1
+ adcs ip, ip, r2
+ adcs ip, ip, r3
+ adcs ip, ip, lr
+ ldmia r0, {r0 - r3}
+ adcs r0, ip, r0
+ adcs r0, r0, r1
+ adcs r0, r0, r2
+ ldr r2, [sp, #4]
+ adcs r0, r0, r3
+ adcs r0, r0, r2
+ adcs r0, r0, #0
+ LOADREGS(fd, sp!, {pc})
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/csumpartial.S
+ *
+ * Copyright (C) 1995-1998 Russell King
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+ .text
+
+/* Function: __u32 csum_partial(const char *src, int len, __u32)
+ * Params : r0 = buffer, r1 = len, r2 = checksum
+ * Returns : r0 = new checksum
+ */
+
+ENTRY(csum_partial)
+ tst r0, #2
+ beq 1f
+ subs r1, r1, #2
+ addmi r1, r1, #2
+ bmi 3f
+ bic r0, r0, #3
+ ldr r3, [r0], #4
+ adds r2, r2, r3, lsr #16
+ adcs r2, r2, #0
+1: adds r2, r2, #0
+ bics ip, r1, #31
+ beq 3f
+ stmfd sp!, {r4 - r6}
+2: ldmia r0!, {r3 - r6}
+ adcs r2, r2, r3
+ adcs r2, r2, r4
+ adcs r2, r2, r5
+ adcs r2, r2, r6
+ ldmia r0!, {r3 - r6}
+ adcs r2, r2, r3
+ adcs r2, r2, r4
+ adcs r2, r2, r5
+ adcs r2, r2, r6
+ sub ip, ip, #32
+ teq ip, #0
+ bne 2b
+ adcs r2, r2, #0
+ ldmfd sp!, {r4 - r6}
+3: ands ip, r1, #0x1c
+ beq 5f
+4: ldr r3, [r0], #4
+ sub ip, ip, #4
+ adcs r2, r2, r3
+ teq ip, #0
+ bne 4b
+ adcs r2, r2, #0
+5: ands ip, r1, #3
+ moveq r0, r2
+ RETINSTR(moveq,pc,lr)
+ mov ip, ip, lsl #3
+ ldr r3, [r0]
+ rsb ip, ip, #32
+ mov r3, r3, lsl ip
+ adds r2, r2, r3, lsr ip
+ adc r0, r2, #0
+ RETINSTR(mov,pc,lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/csumpartialcopy.S
+ *
+ * Copyright (C) 1995-1998 Russell King
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+ .text
+
+/* Function: __u32 csum_partial_copy_nocheck(const char *src, char *dst, int len, __u32 sum)
+ * Params : r0 = src, r1 = dst, r2 = len, r3 = checksum
+ * Returns : r0 = new checksum
+ */
+ENTRY(csum_partial_copy_nocheck)
+ mov ip, sp
+ stmfd sp!, {r4 - r8, fp, ip, lr, pc}
+ sub fp, ip, #4
+ cmp r2, #4
+ blt Ltoo_small
+ tst r1, #2 @ Test destination alignment
+ beq Ldst_aligned
+ ldrb ip, [r0], #1
+ ldrb r8, [r0], #1
+ subs r2, r2, #2 @ We do not know if SRC is aligned...
+ orr ip, ip, r8, lsl #8
+ adds r3, r3, ip
+ adcs r3, r3, #0
+ strb ip, [r1], #1
+ mov ip, ip, lsr #8
+ strb ip, [r1], #1 @ Destination now aligned
+Ldst_aligned: tst r0, #3
+ bne Lsrc_not_aligned
+ adds r3, r3, #0
+ bics ip, r2, #15 @ Routine for src & dst aligned
+ beq 3f
+1: ldmia r0!, {r4, r5, r6, r7}
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+3: ands ip, r2, #12
+ beq 5f
+ tst ip, #8
+ beq 4f
+ ldmia r0!, {r4, r5}
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ tst ip, #4
+ beq 5f
+4: ldr r4, [r0], #4
+ str r4, [r1], #4
+ adcs r3, r3, r4
+5: ands r2, r2, #3
+ adceq r0, r3, #0
+ LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
+ ldr r4, [r0], #4
+ tst r2, #2
+ beq Lexit_r4
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ b Lexit_r4
+
+Ltoo_small: teq r2, #0
+ LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
+ cmp r2, #2
+ blt Ltoo_small1
+ ldrb ip, [r0], #1
+ ldrb r8, [r0], #1
+ orr ip, ip, r8, lsl #8
+ adds r3, r3, ip
+ strb ip, [r1], #1
+ strb r8, [r1], #1
+ tst r2, #1
+Ltoo_small1: ldrneb r4, [r0], #1
+Lexit_r4: tst r2, #1
+ strneb r4, [r1], #1
+ andne r4, r4, #255
+ adcnes r3, r3, r4
+ adcs r0, r3, #0
+ LOADREGS(ea,fp,{r4 - r8, fp, sp, pc})
+
+Lsrc_not_aligned:
+ cmp r2, #4
+ blt Ltoo_small
+ and ip, r0, #3
+ bic r0, r0, #3
+ ldr r4, [r0], #4
+ cmp ip, #2
+ beq Lsrc2_aligned
+ bhi Lsrc3_aligned
+ mov r4, r4, lsr #8
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: ldmia r0!, {r5, r6, r7, r8}
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r6, lsl #24
+ mov r6, r6, lsr #8
+ orr r6, r6, r7, lsl #24
+ mov r7, r7, lsr #8
+ orr r7, r7, r8, lsl #24
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #8
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ ldmia r0!, {r5, r6}
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r6, lsl #24
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #8
+ tst ip, #4
+ beq 4f
+3: ldr r5, [r0], #4
+ orr r4, r4, r5, lsl #24
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #8
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
+ tst r2, #2
+ beq Lexit_r4
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ b Lexit_r4
+
+Lsrc2_aligned: mov r4, r4, lsr #16
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: ldmia r0!, {r5, r6, r7, r8}
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r6, lsl #16
+ mov r6, r6, lsr #16
+ orr r6, r6, r7, lsl #16
+ mov r7, r7, lsr #16
+ orr r7, r7, r8, lsl #16
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #16
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ ldmia r0!, {r5, r6}
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r6, lsl #16
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #16
+ tst ip, #4
+ beq 4f
+3: ldr r5, [r0], #4
+ orr r4, r4, r5, lsl #16
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #16
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
+ tst r2, #2
+ beq Lexit_r4
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ ldrb r4, [r0], #1
+ b Lexit_r4
+
+Lsrc3_aligned: mov r4, r4, lsr #24
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: ldmia r0!, {r5, r6, r7, r8}
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r6, lsl #8
+ mov r6, r6, lsr #24
+ orr r6, r6, r7, lsl #8
+ mov r7, r7, lsr #24
+ orr r7, r7, r8, lsl #8
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #24
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ ldmia r0!, {r5, r6}
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r6, lsl #8
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #24
+ tst ip, #4
+ beq 4f
+3: ldr r5, [r0], #4
+ orr r4, r4, r5, lsl #8
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #24
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc})
+ tst r2, #2
+ beq Lexit_r4
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ ldr r4, [r0], #4
+ strb r4, [r1], #1
+ adcs r3, r3, r4, lsl #24
+ mov r4, r4, lsr #8
+ b Lexit_r4
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/csumpartialcopyuser.S
+ *
+ * Copyright (C) 1995-1998 Russell King
+ */
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/errno.h>
+#include "constants.h"
+
+ .text
+
+/* Function: __u32 csum_partial_copy_from_user (const char *src, char *dst, int len, __u32 sum, int *err_ptr)
+ * Params : r0 = src, r1 = dst, r2 = len, r3 = sum, [sp, #0] = &err
+ * Returns : r0 = checksum, [[sp, #0], #0] = 0 or -EFAULT
+ */
+#if defined(CONFIG_CPU_32)
+
+ .macro save_regs
+ stmfd sp!, {r1 - r2, r4 - r8, fp, ip, lr, pc}
+ .endm
+
+ .macro load_regs,flags
+ ldm\flags fp, {r1, r2, r4-r8, fp, sp, pc}
+ .endm
+
+ .macro load1b, reg1
+9999: ldrbt \reg1, [r0], $1
+ .section __ex_table, "a"
+ .align 3
+ .long 9999b, 6001f
+ .previous
+ .endm
+
+ .macro load2b, reg1, reg2
+9999: ldrbt \reg1, [r0], $1
+9998: ldrbt \reg2, [r0], $1
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .previous
+ .endm
+
+ .macro load1l, reg1
+9999: ldrt \reg1, [r0], $4
+ .section __ex_table, "a"
+ .align 3
+ .long 9999b, 6001f
+ .previous
+ .endm
+
+ .macro load2l, reg1, reg2
+9999: ldrt \reg1, [r0], $4
+9998: ldrt \reg2, [r0], $4
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .previous
+ .endm
+
+ .macro load4l, reg1, reg2, reg3, reg4
+9999: ldrt \reg1, [r0], $4
+9998: ldrt \reg2, [r0], $4
+9997: ldrt \reg3, [r0], $4
+9996: ldrt \reg4, [r0], $4
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .long 9997b, 6001f
+ .long 9996b, 6001f
+ .previous
+ .endm
+
+#elif defined(CONFIG_CPU_26)
+
+ .macro save_regs
+ stmfd sp!, {r1 - r2, r4 - r9, fp, ip, lr, pc}
+ mov r9, sp, lsr #13
+ mov r9, r9, lsl #13
+ ldr r9, [r9, #TSK_ADDR_LIMIT]
+ mov r9, r9, lsr #24
+ .endm
+
+ .macro load_regs,flags
+ ldm\flags fp, {r1, r2, r4-r9, fp, sp, pc}^
+ .endm
+
+ .macro load1b, reg1
+ tst r9, #0x01
+9999: ldreqbt \reg1, [r0], #1
+ ldrneb \reg1, [r0], #1
+ .section __ex_table, "a"
+ .align 3
+ .long 9999b, 6001f
+ .previous
+ .endm
+
+ .macro load2b, reg1, reg2
+ tst r9, #0x01
+9999: ldreqbt \reg1, [r0], #1
+ ldrneb \reg1, [r0], #1
+9998: ldreqbt \reg2, [r0], #1
+ ldrneb \reg2, [r0], #1
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .previous
+ .endm
+
+ .macro load1l, reg1
+ tst r9, #0x01
+9999: ldreqt \reg1, [r0], #4
+ ldrne \reg1, [r0], #4
+ .section __ex_table, "a"
+ .align 3
+ .long 9999b, 6001f
+ .previous
+ .endm
+
+ .macro load2l, reg1, reg2
+ tst r9, #0x01
+ ldmneia r0!, {\reg1, \reg2}
+9999: ldreqt \reg1, [r0], #4
+9998: ldreqt \reg2, [r0], #4
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .previous
+ .endm
+
+ .macro load4l, reg1, reg2, reg3, reg4
+ tst r9, #0x01
+ ldmneia r0!, {\reg1, \reg2, \reg3, \reg4}
+9999: ldreqt \reg1, [r0], #4
+9998: ldreqt \reg2, [r0], #4
+9997: ldreqt \reg3, [r0], #4
+9996: ldreqt \reg4, [r0], #4
+ .section __ex_table, "a"
+ .long 9999b, 6001f
+ .long 9998b, 6001f
+ .long 9997b, 6001f
+ .long 9996b, 6001f
+ .previous
+ .endm
+
+#else
+#error Unknown CPU architecture
+#endif
+
+ENTRY(csum_partial_copy_from_user)
+ mov ip, sp
+ save_regs
+ sub fp, ip, #4
+ cmp r2, #4
+ blt .too_small_user
+ tst r1, #2 @ Test destination alignment
+ beq .dst_aligned_user
+ load2b ip, r8
+ subs r2, r2, #2 @ We do not know if SRC is aligned...
+ orr ip, ip, r8, lsl #8
+ adds r3, r3, ip
+ adcs r3, r3, #0
+ strb ip, [r1], #1
+ mov ip, ip, lsr #8
+ strb ip, [r1], #1 @ Destination now aligned
+.dst_aligned_user:
+ tst r0, #3
+ bne .src_not_aligned_user
+ adds r3, r3, #0
+ bics ip, r2, #15 @ Routine for src & dst aligned
+ beq 2f
+1: load4l r4, r5, r6, r7
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ load2l r4, r5
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ tst ip, #4
+ beq 4f
+3: load1l r4
+ str r4, [r1], #4
+ adcs r3, r3, r4
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ load_regs eqea
+ load1l r4
+ tst r2, #2
+ beq .exit
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+.exit: tst r2, #1
+ strneb r4, [r1], #1
+ andne r4, r4, #255
+ adcnes r3, r3, r4
+ adcs r0, r3, #0
+ load_regs ea
+
+.too_small_user:
+ teq r2, #0
+ load_regs eqea
+ cmp r2, #2
+ blt .too_small_user1
+ load2b ip, r8
+ orr ip, ip, r8, lsl #8
+ adds r3, r3, ip
+ strb ip, [r1], #1
+ strb r8, [r1], #1
+ tst r2, #1
+.too_small_user1: @ C = 0
+ beq .csum_exit
+ load1b ip
+ strb ip, [r1], #1
+ adcs r3, r3, ip
+.csum_exit: adc r0, r3, #0
+ load_regs ea
+
+.src_not_aligned_user:
+ cmp r2, #4
+ blt .too_small_user
+ and ip, r0, #3
+ bic r0, r0, #3
+ load1l r4
+ cmp ip, #2
+ beq .src2_aligned_user
+ bhi .src3_aligned_user
+ mov r4, r4, lsr #8
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: load4l r5, r6, r7, r8
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r6, lsl #24
+ mov r6, r6, lsr #8
+ orr r6, r6, r7, lsl #24
+ mov r7, r7, lsr #8
+ orr r7, r7, r8, lsl #24
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #8
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ load2l r5, r6
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r6, lsl #24
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #8
+ tst ip, #4
+ beq 4f
+3: load1l r5
+ orr r4, r4, r5, lsl #24
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #8
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ load_regs eqea
+ tst r2, #2
+ beq .exit
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ b .exit
+
+.src2_aligned_user:
+ mov r4, r4, lsr #16
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: load4l r5, r6, r7, r8
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r6, lsl #16
+ mov r6, r6, lsr #16
+ orr r6, r6, r7, lsl #16
+ mov r7, r7, lsr #16
+ orr r7, r7, r8, lsl #16
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #16
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ load2l r5, r6
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r6, lsl #16
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #16
+ tst ip, #4
+ beq 4f
+3: load1l r5
+ orr r4, r4, r5, lsl #16
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #16
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ load_regs eqea
+ tst r2, #2
+ beq .exit
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ mov r4, r4, lsr #8
+ strb r4, [r1], #1
+ tst r2, #1
+ adceq r0, r3, #0
+ load_regs eqea
+ load1b r4
+ b .exit
+
+.src3_aligned_user:
+ mov r4, r4, lsr #24
+ adds r3, r3, #0
+ bics ip, r2, #15
+ beq 2f
+1: load4l r5, r6, r7, r8
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r6, lsl #8
+ mov r6, r6, lsr #24
+ orr r6, r6, r7, lsl #8
+ mov r7, r7, lsr #24
+ orr r7, r7, r8, lsl #8
+ stmia r1!, {r4, r5, r6, r7}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ adcs r3, r3, r6
+ adcs r3, r3, r7
+ mov r4, r8, lsr #24
+ sub ip, ip, #16
+ teq ip, #0
+ bne 1b
+2: ands ip, r2, #12
+ beq 4f
+ tst ip, #8
+ beq 3f
+ load2l r5, r6
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r6, lsl #8
+ stmia r1!, {r4, r5}
+ adcs r3, r3, r4
+ adcs r3, r3, r5
+ mov r4, r6, lsr #24
+ tst ip, #4
+ beq 4f
+3: load1l r5
+ orr r4, r4, r5, lsl #8
+ str r4, [r1], #4
+ adcs r3, r3, r4
+ mov r4, r5, lsr #24
+4: ands r2, r2, #3
+ adceq r0, r3, #0
+ load_regs eqea
+ tst r2, #2
+ beq .exit
+ adcs r3, r3, r4, lsl #16
+ strb r4, [r1], #1
+ load1l r4
+ strb r4, [r1], #1
+ adcs r3, r3, r4, lsl #24
+ mov r4, r4, lsr #8
+ b .exit
+
+#if defined(CONFIG_CPU_32)
+ .section .fixup,"ax"
+#endif
+ .align 4
+6001: mov r4, #-EFAULT
+ ldr r5, [fp, #4]
+ str r4, [r5]
+ ldmia sp, {r1, r2} @ retrieve original arguments
+ add r2, r2, r1
+ mov r3, #0 @ zero the buffer
+6002: teq r2, r1
+ strneb r3, [r1], #1
+ bne 6002b
+ load_regs ea
+#if defined(CONFIG_CPU_32)
+ .previous
+#endif
--- /dev/null
+/*
+ * linux/arch/arm/lib/bitops.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+@ Purpose : Find a 'zero' bit
+@ Prototype: int find_first_zero_bit(char *addr,int maxbit);
+
+ENTRY(find_first_zero_bit)
+ mov r2, #0 @ Initialise bit position
+Lfindzbit1lp: ldrb r3, [r0, r2, lsr #3] @ Check byte, if 0xFF, then all bits set
+ teq r3, #0xFF
+ bne Lfoundzbit
+ add r2, r2, #8
+ cmp r2, r1 @ Check to see if we have come to the end
+ bcc Lfindzbit1lp
+ add r0, r1, #1 @ Make sure that we flag an error
+ RETINSTR(mov,pc,lr)
+Lfoundzbit: tst r3, #1 @ Check individual bits
+ moveq r0, r2
+ RETINSTR(moveq,pc,lr)
+ tst r3, #2
+ addeq r0, r2, #1
+ RETINSTR(moveq,pc,lr)
+ tst r3, #4
+ addeq r0, r2, #2
+ RETINSTR(moveq,pc,lr)
+ tst r3, #8
+ addeq r0, r2, #3
+ RETINSTR(moveq,pc,lr)
+ tst r3, #16
+ addeq r0, r2, #4
+ RETINSTR(moveq,pc,lr)
+ tst r3, #32
+ addeq r0, r2, #5
+ RETINSTR(moveq,pc,lr)
+ tst r3, #64
+ addeq r0, r2, #6
+ RETINSTR(moveq,pc,lr)
+ add r0, r2, #7
+ RETINSTR(mov,pc,lr)
+
+@ Purpose : Find next 'zero' bit
+@ Prototype: int find_next_zero_bit(char *addr,int maxbit,int offset)
+
+ENTRY(find_next_zero_bit)
+ tst r2, #7
+ beq Lfindzbit1lp @ If new byte, goto old routine
+ ldrb r3, [r0, r2, lsr#3]
+ orr r3, r3, #0xFF00 @ Set top bits so we wont get confused
+ stmfd sp!, {r4}
+ and r4, r2, #7
+ mov r3, r3, lsr r4 @ Shift right by no. of bits
+ ldmfd sp!, {r4}
+ and r3, r3, #0xFF
+ teq r3, #0xFF
+ orreq r2, r2, #7
+ addeq r2, r2, #1
+ beq Lfindzbit1lp @ If all bits are set, goto old routine
+ b Lfoundzbit
#include <asm/pgtable.h>
#include <asm/uaccess.h>
+/*
+ * Make sure that the compiler and target are compatible
+ */
+#if (defined(__APCS_32__) && defined(CONFIG_CPU_26))
+#error Your compiler targets APCS-32 but this kernel requires APCS-26.
+#endif
+#if (defined(__APCS_26__) && defined(CONFIG_CPU_32))
+#error Your compiler targets APCS-26 but this kernel requires APCS-32.
+#endif
+
#undef PAGE_READONLY
#define OFF_TSK(n) (unsigned long)&(((struct task_struct *)0)->n)
.macro ioaddr, rd,rn
add \rd, \rn, #pcio_high
+ .if pcio_low
add \rd, \rd, #pcio_low
+ .endif
.endm
ENTRY(insl)
--- /dev/null
+/*
+ * linux/arch/arm/lib/memchr.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+ENTRY(memchr)
+ str lr, [sp, #-4]!
+1: ldrb r3, [r0], #1
+ teq r3, r1
+ beq 2f
+ subs r2, r2, #1
+ bpl 1b
+2: movne r0, #0
+ subeq r0, r0, #1
+ LOADREGS(fd, sp!, {pc})
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/memcpy.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+
+#define ENTER \
+ mov ip,sp ;\
+ stmfd sp!,{r4-r9,fp,ip,lr,pc} ;\
+ sub fp,ip,#4
+
+#define EXIT \
+ LOADREGS(ea, fp, {r4 - r9, fp, sp, pc})
+
+#define EXITEQ \
+ LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc})
+
+/*
+ * Prototype: void memcpy(void *to,const void *from,unsigned long n);
+ * ARM3: cant use memcopy here!!!
+ */
+ENTRY(memcpy)
+ENTRY(memmove)
+ ENTER
+ cmp r1, r0
+ bcc 19f
+ subs r2, r2, #4
+ blt 6f
+ ands ip, r0, #3
+ bne 7f
+ ands ip, r1, #3
+ bne 8f
+
+1: subs r2, r2, #8
+ blt 5f
+ subs r2, r2, #0x14
+ blt 3f
+2: ldmia r1!,{r3 - r9, ip}
+ stmia r0!,{r3 - r9, ip}
+ subs r2, r2, #32
+ bge 2b
+ cmn r2, #16
+ ldmgeia r1!, {r3 - r6}
+ stmgeia r0!, {r3 - r6}
+ subge r2, r2, #0x10
+3: adds r2, r2, #0x14
+4: ldmgeia r1!, {r3 - r5}
+ stmgeia r0!, {r3 - r5}
+ subges r2, r2, #12
+ bge 4b
+5: adds r2, r2, #8
+ blt 6f
+ subs r2, r2, #4
+ ldrlt r3, [r1], #4
+ ldmgeia r1!, {r4, r5}
+ strlt r3, [r0], #4
+ stmgeia r0!, {r4, r5}
+ subge r2, r2, #4
+
+6: adds r2, r2, #4
+ EXITEQ
+ cmp r2, #2
+ ldrb r3, [r1], #1
+ ldrgeb r4, [r1], #1
+ ldrgtb r5, [r1], #1
+ strb r3, [r0], #1
+ strgeb r4, [r0], #1
+ strgtb r5, [r0], #1
+ EXIT
+
+7: rsb ip, ip, #4
+ cmp ip, #2
+ ldrb r3, [r1], #1
+ ldrgeb r4, [r1], #1
+ ldrgtb r5, [r1], #1
+ strb r3, [r0], #1
+ strgeb r4, [r0], #1
+ strgtb r5, [r0], #1
+ subs r2, r2, ip
+ blt 6b
+ ands ip, r1, #3
+ beq 1b
+
+8: bic r1, r1, #3
+ ldr r7, [r1], #4
+ cmp ip, #2
+ bgt 15f
+ beq 11f
+ cmp r2, #12
+ blt 10f
+ sub r2, r2, #12
+9: mov r3, r7, lsr #8
+ ldmia r1!, {r4 - r7}
+ orr r3, r3, r4, lsl #24
+ mov r4, r4, lsr #8
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r6, lsl #24
+ mov r6, r6, lsr #8
+ orr r6, r6, r7, lsl #24
+ stmia r0!, {r3 - r6}
+ subs r2, r2, #16
+ bge 9b
+ adds r2, r2, #12
+ blt 100f
+10: mov r3, r7, lsr #8
+ ldr r7, [r1], #4
+ subs r2, r2, #4
+ orr r3, r3, r7, lsl #24
+ str r3, [r0], #4
+ bge 10b
+100: sub r1, r1, #3
+ b 6b
+
+11: cmp r2, #12
+ blt 13f /* */
+ sub r2, r2, #12
+12: mov r3, r7, lsr #16
+ ldmia r1!, {r4 - r7}
+ orr r3, r3, r4, lsl #16
+ mov r4, r4, lsr #16
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r6, lsl #16
+ mov r6, r6, lsr #16
+ orr r6, r6, r7,LSL#16
+ stmia r0!, {r3 - r6}
+ subs r2, r2, #16
+ bge 12b
+ adds r2, r2, #12
+ blt 14f
+13: mov r3, r7, lsr #16
+ ldr r7, [r1], #4
+ subs r2, r2, #4
+ orr r3, r3, r7, lsl #16
+ str r3, [r0], #4
+ bge 13b
+14: sub r1, r1, #2
+ b 6b
+
+15: cmp r2, #12
+ blt 17f
+ sub r2, r2, #12
+16: mov r3, r7, lsr #24
+ ldmia r1!,{r4 - r7}
+ orr r3, r3, r4, lsl #8
+ mov r4, r4, lsr #24
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r6, lsl #8
+ mov r6, r6, lsr #24
+ orr r6, r6, r7, lsl #8
+ stmia r0!, {r3 - r6}
+ subs r2, r2, #16
+ bge 16b
+ adds r2, r2, #12
+ blt 18f
+17: mov r3, r7, lsr #24
+ ldr r7, [r1], #4
+ subs r2, r2, #4
+ orr r3, r3, r7, lsl#8
+ str r3, [r0], #4
+ bge 17b
+18: sub r1, r1, #1
+ b 6b
+
+
+19: add r1, r1, r2
+ add r0, r0, r2
+ subs r2, r2, #4
+ blt 24f
+ ands ip, r0, #3
+ bne 25f
+ ands ip, r1, #3
+ bne 26f
+
+20: subs r2, r2, #8
+ blt 23f
+ subs r2, r2, #0x14
+ blt 22f
+21: ldmdb r1!, {r3 - r9, ip}
+ stmdb r0!, {r3 - r9, ip}
+ subs r2, r2, #32
+ bge 21b
+22: cmn r2, #16
+ ldmgedb r1!, {r3 - r6}
+ stmgedb r0!, {r3 - r6}
+ subge r2, r2, #16
+ adds r2, r2, #20
+ ldmgedb r1!, {r3 - r5}
+ stmgedb r0!, {r3 - r5}
+ subge r2, r2, #12
+23: adds r2, r2, #8
+ blt 24f
+ subs r2, r2, #4
+ ldrlt r3, [r1, #-4]!
+ ldmgedb r1!, {r4, r5}
+ strlt r3, [r0, #-4]!
+ stmgedb r0!, {r4, r5}
+ subge r2, r2, #4
+
+24: adds r2, r2, #4
+ EXITEQ
+ cmp r2, #2
+ ldrb r3, [r1, #-1]!
+ ldrgeb r4, [r1, #-1]!
+ ldrgtb r5, [r1, #-1]!
+ strb r3, [r0, #-1]!
+ strgeb r4, [r0, #-1]!
+ strgtb r5, [r0, #-1]!
+ EXIT
+
+25: cmp ip, #2
+ ldrb r3, [r1, #-1]!
+ ldrgeb r4, [r1, #-1]!
+ ldrgtb r5, [r1, #-1]!
+ strb r3, [r0, #-1]!
+ strgeb r4, [r0, #-1]!
+ strgtb r5, [r0, #-1]!
+ subs r2, r2, ip
+ blt 24b
+ ands ip, r1, #3
+ beq 20b
+
+26: bic r1, r1, #3
+ ldr r3, [r1], #0
+ cmp ip, #2
+ blt 34f
+ beq 30f
+ cmp r2, #12
+ blt 28f
+ sub r2, r2, #12
+27: mov r7, r3, lsl #8
+ ldmdb r1!, {r3, r4, r5, r6}
+ orr r7, r7, r6, lsr #24
+ mov r6, r6, lsl #8
+ orr r6, r6, r5, lsr #24
+ mov r5, r5, lsl #8
+ orr r5, r5, r4, lsr #24
+ mov r4, r4, lsl #8
+ orr r4, r4, r3, lsr #24
+ stmdb r0!, {r4, r5, r6, r7}
+ subs r2, r2, #16
+ bge 27b
+ adds r2, r2, #12
+ blt 29f
+28: mov ip, r3, lsl #8
+ ldr r3, [r1, #-4]!
+ subs r2, r2, #4
+ orr ip, ip, r3, lsr #24
+ str ip, [r0, #-4]!
+ bge 28b
+29: add r1, r1, #3
+ b 24b
+
+30: cmp r2, #12
+ blt 32f
+ sub r2, r2, #12
+31: mov r7, r3, lsl #16
+ ldmdb r1!, {r3, r4, r5, r6}
+ orr r7, r7, r6, lsr #16
+ mov r6, r6, lsl #16
+ orr r6, r6, r5, lsr #16
+ mov r5, r5, lsl #16
+ orr r5, r5, r4, lsr #16
+ mov r4, r4, lsl #16
+ orr r4, r4, r3, lsr #16
+ stmdb r0!, {r4, r5, r6, r7}
+ subs r2, r2, #16
+ bge 31b
+ adds r2, r2, #12
+ blt 33f
+32: mov ip, r3, lsl #16
+ ldr r3, [r1, #-4]!
+ subs r2, r2, #4
+ orr ip, ip, r3, lsr #16
+ str ip, [r0, #-4]!
+ bge 32b
+33: add r1, r1, #2
+ b 24b
+
+34: cmp r2, #12
+ blt 36f
+ sub r2, r2, #12
+35: mov r7, r3, lsl #24
+ ldmdb r1!, {r3, r4, r5, r6}
+ orr r7, r7, r6, lsr #8
+ mov r6, r6, lsl #24
+ orr r6, r6, r5, lsr #8
+ mov r5, r5, lsl #24
+ orr r5, r5, r4, lsr #8
+ mov r4, r4, lsl #24
+ orr r4, r4, r3, lsr #8
+ stmdb r0!, {r4, r5, r6, r7}
+ subs r2, r2, #16
+ bge 35b
+ adds r2, r2, #12
+ blt 37f
+36: mov ip, r3, lsl #24
+ ldr r3, [r1, #-4]!
+ subs r2, r2, #4
+ orr ip, ip, r3, lsr #8
+ str ip, [r0, #-4]!
+ bge 36b
+37: add r1, r1, #1
+ b 24b
+
+ .align
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/memset.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+ .align 5
+ENTRY(memset)
+ mov r3, r0
+ cmp r2, #16
+ blt 6f
+ ands ip, r3, #3
+ beq 1f
+ cmp ip, #2
+ strltb r1, [r3], #1 @ Align destination
+ strleb r1, [r3], #1
+ strb r1, [r3], #1
+ rsb ip, ip, #4
+ sub r2, r2, ip
+1: orr r1, r1, r1, lsl #8
+ orr r1, r1, r1, lsl #16
+ cmp r2, #256
+ blt 4f
+ stmfd sp!, {r4, r5, lr}
+ mov r4, r1
+ mov r5, r1
+ mov lr, r1
+ mov ip, r2, lsr #6
+ sub r2, r2, ip, lsl #6
+2: stmia r3!, {r1, r4, r5, lr} @ 64 bytes at a time.
+ stmia r3!, {r1, r4, r5, lr}
+ stmia r3!, {r1, r4, r5, lr}
+ stmia r3!, {r1, r4, r5, lr}
+ subs ip, ip, #1
+ bne 2b
+ teq r2, #0
+ LOADREGS(eqfd, sp!, {r4, r5, pc}) @ Now <64 bytes to go.
+ tst r2, #32
+ stmneia r3!, {r1, r4, r5, lr}
+ stmneia r3!, {r1, r4, r5, lr}
+ tst r2, #16
+ stmneia r3!, {r1, r4, r5, lr}
+ ldmia sp!, {r4, r5}
+3: tst r2, #8
+ stmneia r3!, {r1, lr}
+ tst r2, #4
+ strne r1, [r3], #4
+ tst r2, #2
+ strneb r1, [r3], #1
+ strneb r1, [r3], #1
+ tst r2, #1
+ strneb r1, [r3], #1
+ LOADREGS(fd, sp!, {pc})
+
+4: movs ip, r2, lsr #3
+ beq 3b
+ sub r2, r2, ip, lsl #3
+ str lr, [sp, #-4]!
+ mov lr, r1
+ subs ip, ip, #4
+5: stmgeia r3!, {r1, lr}
+ stmgeia r3!, {r1, lr}
+ stmgeia r3!, {r1, lr}
+ stmgeia r3!, {r1, lr}
+ subges ip, ip, #4
+ bge 5b
+ tst ip, #2
+ stmneia r3!, {r1, lr}
+ stmneia r3!, {r1, lr}
+ tst ip, #1
+ stmneia r3!, {r1, lr}
+ teq r2, #0
+ LOADREGS(eqfd, sp!, {pc})
+ b 3b
+
+6: subs r2, r2, #1
+ strgeb r1, [r3], #1
+ bgt 6b
+ RETINSTR(mov, pc, lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/memzero.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+
+/*
+ * Prototype: void memzero(void *d, size_t n)
+ */
+1: @ 4 <= r1
+ cmp ip, #2 @ 1
+ strltb r2, [r0], #1 @ 1
+ strleb r2, [r0], #1 @ 1
+ strb r2, [r0], #1 @ 1
+ rsb ip, ip, #4 @ 1
+ sub r1, r1, ip @ 1
+ cmp r1, #3 @ 1
+ bgt 2f @ 1 @ +8
+ b 4f @ 1 @ +9
+
+ .align 5
+
+ENTRY(__memzero)
+ mov r2, #0 @ 1
+ cmp r1, #4 @ 1
+ blt 4f @ 1 @ = 3
+
+ @ r1 >= 4
+
+ ands ip, r0, #3 @ 1
+ bne 1b @ 1 @ = 5
+
+2: @ r1 >= 4 && (r0 & 3) = 0 @ = 5 or 11
+
+ str lr, [sp, #-4]! @ 1
+ mov r3, #0 @ 1
+ mov ip, #0 @ 1
+ mov lr, #0 @ 1
+
+ @ 4 <= r1 <= 32 @ = 9 or 15
+
+3: subs r1, r1, #32 @ 1
+ stmgeia r0!, {r2, r3, ip, lr} @ 4
+ stmgeia r0!, {r2, r3, ip, lr} @ 4
+ bgt 3b @ 1
+ LOADREGS(eqfd, sp!, {pc}) @ 1/2
+
+ @ -28 <= r1 <= -1
+
+ cmp r1, #-16 @ 1
+ stmgeia r0!, {r2, r3, ip, lr} @ 4
+ ldr lr, [sp], #4 @ 1
+ addlts r1, r1, #16 @ 1
+ RETINSTR(moveq,pc,lr) @ 1
+
+ @ -12 <= r1 <= -1
+
+ cmp r1, #-8 @ 1
+ stmgeia r0!, {r2, r3} @ 2
+ addlts r1, r1, #8 @ 1
+ RETINSTR(moveq,pc,lr) @ 1
+
+ @ -4 <= r1 <= -1
+
+ cmp r1, #-4 @ 1
+ strge r2, [r0], #4 @ 1
+ adds r1, r1, #4 @ 1
+ RETINSTR(moveq,pc,lr) @ 1
+
+4: @ 1 <= r1 <= 3
+ cmp r1, #2 @ 1
+ strgtb r2, [r0], #1 @ 1
+ strgeb r2, [r0], #1 @ 1
+ strb r2, [r0], #1 @ 1
+ RETINSTR(mov,pc,lr) @ 1
--- /dev/null
+/*
+ * linux/arch/arm/lib/setbit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+@ Purpose : Function to set a bit
+@ Prototype: int set_bit(int bit,int *addr)
+
+ENTRY(set_bit)
+ and r2, r0, #7
+ mov r3, #1
+ mov r3, r3, lsl r2
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1, r0, lsr #3]
+ orr r2, r2, r3
+ strb r2, [r1, r0, lsr #3]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/strchr.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+ENTRY(strchr)
+ str lr, [sp, #-4]!
+ mov r3, #0
+1: ldrb r2, [r0], #1
+ teq r2, r1
+ teqne r2, #0
+ bne 1b
+ teq r2, #0
+ moveq r0, #0
+ subne r0, r0, #1
+ LOADREGS(fd, sp!, {pc})
+
+
+++ /dev/null
-/*
- * linux/arch/arm/lib/string.S
- *
- * Copyright (C) 1995-1999 Russell King
- *
- * ASM optimised string functions
- *
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include "constants.h"
-
- .text
-
-/*
- * Prototype: void memzero(void *d, size_t n)
- */
-1: @ 4 <= r1
- cmp ip, #2 @ 1
- strltb r2, [r0], #1 @ 1
- strleb r2, [r0], #1 @ 1
- strb r2, [r0], #1 @ 1
- rsb ip, ip, #4 @ 1
- sub r1, r1, ip @ 1
- cmp r1, #3 @ 1
- bgt 2f @ 1 @ +8
- b 4f @ 1 @ +9
-
- .align 5
-
-ENTRY(__memzero)
- mov r2, #0 @ 1
- cmp r1, #4 @ 1
- blt 4f @ 1 @ = 3
-
- @ r1 >= 4
-
- ands ip, r0, #3 @ 1
- bne 1b @ 1 @ = 5
-
-2: @ r1 >= 4 && (r0 & 3) = 0 @ = 5 or 11
-
- str lr, [sp, #-4]! @ 1
- mov r3, #0 @ 1
- mov ip, #0 @ 1
- mov lr, #0 @ 1
-
- @ 4 <= r1 <= 32 @ = 9 or 15
-
-3: subs r1, r1, #32 @ 1
- stmgeia r0!, {r2, r3, ip, lr} @ 4
- stmgeia r0!, {r2, r3, ip, lr} @ 4
- bgt 3b @ 1
- LOADREGS(eqfd, sp!, {pc}) @ 1/2
-
- @ -28 <= r1 <= -1
-
- cmp r1, #-16 @ 1
- stmgeia r0!, {r2, r3, ip, lr} @ 4
- ldr lr, [sp], #4 @ 1
- addlts r1, r1, #16 @ 1
- RETINSTR(moveq,pc,lr) @ 1
-
- @ -12 <= r1 <= -1
-
- cmp r1, #-8 @ 1
- stmgeia r0!, {r2, r3} @ 2
- addlts r1, r1, #8 @ 1
- RETINSTR(moveq,pc,lr) @ 1
-
- @ -4 <= r1 <= -1
-
- cmp r1, #-4 @ 1
- strge r2, [r0], #4 @ 1
- adds r1, r1, #4 @ 1
- RETINSTR(moveq,pc,lr) @ 1
-
-4: @ 1 <= r1 <= 3
- cmp r1, #2 @ 1
- strgtb r2, [r0], #1 @ 1
- strgeb r2, [r0], #1 @ 1
- strb r2, [r0], #1 @ 1
- RETINSTR(mov,pc,lr) @ 1
-
-/*
- * StrongARM optimised copy_page routine
- * now 1.72bytes/cycle, was 1.60 bytes/cycle
- * (50MHz bus -> 86MB/s)
- */
-
-ENTRY(copy_page)
- stmfd sp!, {r4, lr} @ 2
- mov r2, #PAGE_SZ/64 @ 1
-1: ldmia r1!, {r3, r4, ip, lr} @ 4
- subs r2, r2, #1 @ 1
- stmia r0!, {r3, r4, ip, lr} @ 4
- ldmia r1!, {r3, r4, ip, lr} @ 4+1
- stmia r0!, {r3, r4, ip, lr} @ 4
- ldmia r1!, {r3, r4, ip, lr} @ 4+1
- stmia r0!, {r3, r4, ip, lr} @ 4
- ldmia r1!, {r3, r4, ip, lr} @ 4+1
- stmia r0!, {r3, r4, ip, lr} @ 4
- bne 1b @ 1
- LOADREGS(fd, sp!, {r4, pc}) @ 3
-
- .align 5
-ENTRY(memset) /* needed for some versions of gcc */
-ENTRY(__memset)
- mov r3, r0
- cmp r2, #16
- blt 6f
- ands ip, r3, #3
- beq 1f
- cmp ip, #2
- strltb r1, [r3], #1 @ Align destination
- strleb r1, [r3], #1
- strb r1, [r3], #1
- rsb ip, ip, #4
- sub r2, r2, ip
-1: orr r1, r1, r1, lsl #8
- orr r1, r1, r1, lsl #16
- cmp r2, #256
- blt 4f
- stmfd sp!, {r4, r5, lr}
- mov r4, r1
- mov r5, r1
- mov lr, r1
- mov ip, r2, lsr #6
- sub r2, r2, ip, lsl #6
-2: stmia r3!, {r1, r4, r5, lr} @ 64 bytes at a time.
- stmia r3!, {r1, r4, r5, lr}
- stmia r3!, {r1, r4, r5, lr}
- stmia r3!, {r1, r4, r5, lr}
- subs ip, ip, #1
- bne 2b
- teq r2, #0
- LOADREGS(eqfd, sp!, {r4, r5, pc}) @ Now <64 bytes to go.
- tst r2, #32
- stmneia r3!, {r1, r4, r5, lr}
- stmneia r3!, {r1, r4, r5, lr}
- tst r2, #16
- stmneia r3!, {r1, r4, r5, lr}
- ldmia sp!, {r4, r5}
-3: tst r2, #8
- stmneia r3!, {r1, lr}
- tst r2, #4
- strne r1, [r3], #4
- tst r2, #2
- strneb r1, [r3], #1
- strneb r1, [r3], #1
- tst r2, #1
- strneb r1, [r3], #1
- LOADREGS(fd, sp!, {pc})
-
-4: movs ip, r2, lsr #3
- beq 3b
- sub r2, r2, ip, lsl #3
- stmfd sp!, {lr}
- mov lr, r1
- subs ip, ip, #4
-5: stmgeia r3!, {r1, lr}
- stmgeia r3!, {r1, lr}
- stmgeia r3!, {r1, lr}
- stmgeia r3!, {r1, lr}
- subges ip, ip, #4
- bge 5b
- tst ip, #2
- stmneia r3!, {r1, lr}
- stmneia r3!, {r1, lr}
- tst ip, #1
- stmneia r3!, {r1, lr}
- teq r2, #0
- LOADREGS(eqfd, sp!, {pc})
- b 3b
-
-6: subs r2, r2, #1
- strgeb r1, [r3], #1
- bgt 6b
- RETINSTR(mov, pc, lr)
-
-ENTRY(strrchr)
- stmfd sp!, {lr}
- mov r3, #0
-1: ldrb r2, [r0], #1
- teq r2, r1
- moveq r3, r0
- teq r2, #0
- bne 1b
- mov r0, r3
- LOADREGS(fd, sp!, {pc})
-
-ENTRY(strchr)
- stmfd sp!,{lr}
- mov r3, #0
-1: ldrb r2, [r0], #1
- teq r2, r1
- teqne r2, #0
- bne 1b
- teq r2, #0
- moveq r0, #0
- subne r0, r0, #1
- LOADREGS(fd, sp!, {pc})
-
-ENTRY(memchr)
- stmfd sp!, {lr}
-1: ldrb r3, [r0], #1
- teq r3, r1
- beq 2f
- subs r2, r2, #1
- bpl 1b
-2: movne r0, #0
- subeq r0, r0, #1
- LOADREGS(fd, sp!, {pc})
-
-
-#define ENTER \
- mov ip,sp ;\
- stmfd sp!,{r4-r9,fp,ip,lr,pc} ;\
- sub fp,ip,#4
-
-#define EXIT \
- LOADREGS(ea, fp, {r4 - r9, fp, sp, pc})
-
-#define EXITEQ \
- LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc})
-
-/*
- * Prototype: void memcpy(void *to,const void *from,unsigned long n);
- * ARM3: cant use memcopy here!!!
- */
-ENTRY(memcpy)
-ENTRY(memmove)
- ENTER
- cmp r1, r0
- bcc 19f
- subs r2, r2, #4
- blt 6f
- ands ip, r0, #3
- bne 7f
- ands ip, r1, #3
- bne 8f
-
-1: subs r2, r2, #8
- blt 5f
- subs r2, r2, #0x14
- blt 3f
-2: ldmia r1!,{r3 - r9, ip}
- stmia r0!,{r3 - r9, ip}
- subs r2, r2, #32
- bge 2b
- cmn r2, #16
- ldmgeia r1!, {r3 - r6}
- stmgeia r0!, {r3 - r6}
- subge r2, r2, #0x10
-3: adds r2, r2, #0x14
-4: ldmgeia r1!, {r3 - r5}
- stmgeia r0!, {r3 - r5}
- subges r2, r2, #12
- bge 4b
-5: adds r2, r2, #8
- blt 6f
- subs r2, r2, #4
- ldrlt r3, [r1], #4
- strlt r3, [r0], #4
- ldmgeia r1!, {r3, r4}
- stmgeia r0!, {r3, r4}
- subge r2, r2, #4
-
-6: adds r2, r2, #4
- EXITEQ
- cmp r2, #2
- ldrb r3, [r1], #1
- strb r3, [r0], #1
- ldrgeb r3, [r1], #1
- strgeb r3, [r0], #1
- ldrgtb r3, [r1], #1
- strgtb r3, [r0], #1
- EXIT
-
-7: rsb ip, ip, #4
- cmp ip, #2
- ldrb r3, [r1], #1
- strb r3, [r0], #1
- ldrgeb r3, [r1], #1
- strgeb r3, [r0], #1
- ldrgtb r3, [r1], #1
- strgtb r3, [r0], #1
- subs r2, r2, ip
- blt 6b
- ands ip, r1, #3
- beq 1b
-
-8: bic r1, r1, #3
- ldr r7, [r1], #4
- cmp ip, #2
- bgt 15f
- beq 11f
- cmp r2, #12
- blt 10f
- sub r2, r2, #12
-9: mov r3, r7, lsr #8
- ldmia r1!, {r4 - r7}
- orr r3, r3, r4, lsl #24
- mov r4, r4, lsr #8
- orr r4, r4, r5, lsl #24
- mov r5, r5, lsr #8
- orr r5, r5, r6, lsl #24
- mov r6, r6, lsr #8
- orr r6, r6, r7, lsl #24
- stmia r0!, {r3 - r6}
- subs r2, r2, #16
- bge 9b
- adds r2, r2, #12
- blt 100f
-10: mov r3, r7, lsr #8
- ldr r7, [r1], #4
- orr r3, r3, r7, lsl #24
- str r3, [r0], #4
- subs r2, r2, #4
- bge 10b
-100: sub r1, r1, #3
- b 6b
-
-11: cmp r2, #12
- blt 13f /* */
- sub r2, r2, #12
-12: mov r3, r7, lsr #16
- ldmia r1!, {r4 - r7}
- orr r3, r3, r4, lsl #16
- mov r4, r4, lsr #16
- orr r4, r4, r5, lsl #16
- mov r5, r5, lsr #16
- orr r5, r5, r6, lsl #16
- mov r6, r6, lsr #16
- orr r6, r6, r7,LSL#16
- stmia r0!, {r3 - r6}
- subs r2, r2, #16
- bge 12b
- adds r2, r2, #12
- blt 14f
-13: mov r3, r7, lsr #16
- ldr r7, [r1], #4
- orr r3, r3, r7, lsl #16
- str r3, [r0], #4
- subs r2, r2, #4
- bge 13b
-14: sub r1, r1, #2
- b 6b
-
-15: cmp r2, #12
- blt 17f
- sub r2, r2, #12
-16: mov r3, r7, lsr #24
- ldmia r1!,{r4 - r7}
- orr r3, r3, r4, lsl #8
- mov r4, r4, lsr #24
- orr r4, r4, r5, lsl #8
- mov r5, r5, lsr #24
- orr r5, r5, r6, lsl #8
- mov r6, r6, lsr #24
- orr r6, r6, r7, lsl #8
- stmia r0!, {r3 - r6}
- subs r2, r2, #16
- bge 16b
- adds r2, r2, #12
- blt 18f
-17: mov r3, r7, lsr #24
- ldr r7, [r1], #4
- orr r3, r3, r7, lsl#8
- str r3, [r0], #4
- subs r2, r2, #4
- bge 17b
-18: sub r1, r1, #1
- b 6b
-
-
-19: add r1, r1, r2
- add r0, r0, r2
- subs r2, r2, #4
- blt 24f
- ands ip, r0, #3
- bne 25f
- ands ip, r1, #3
- bne 26f
-
-20: subs r2, r2, #8
- blt 23f
- subs r2, r2, #0x14
- blt 22f
-21: ldmdb r1!, {r3 - r9, ip}
- stmdb r0!, {r3 - r9, ip}
- subs r2, r2, #32
- bge 21b
-22: cmn r2, #16
- ldmgedb r1!, {r3 - r6}
- stmgedb r0!, {r3 - r6}
- subge r2, r2, #16
- adds r2, r2, #20
- ldmgedb r1!, {r3 - r5}
- stmgedb r0!, {r3 - r5}
- subge r2, r2, #12
-23: adds r2, r2, #8
- blt 24f
- subs r2, r2, #4
- ldrlt r3, [r1, #-4]!
- strlt r3, [r0, #-4]!
- ldmgedb r1!, {r3, r4}
- stmgedb r0!, {r3, r4}
- subge r2, r2, #4
-
-24: adds r2, r2, #4
- EXITEQ
- cmp r2, #2
- ldrb r3, [r1, #-1]!
- strb r3, [r0, #-1]!
- ldrgeb r3, [r1, #-1]!
- strgeb r3, [r0, #-1]!
- ldrgtb r3, [r1, #-1]!
- strgtb r3, [r0, #-1]!
- EXIT
-
-25: cmp ip, #2
- ldrb r3, [r1, #-1]!
- strb r3, [r0, #-1]!
- ldrgeb r3, [r1, #-1]!
- strgeb r3, [r0, #-1]!
- ldrgtb r3, [r1, #-1]!
- strgtb r3, [r0, #-1]!
- subs r2, r2, ip
- blt 24b
- ands ip, r1, #3
- beq 20b
-
-26: bic r1, r1, #3
- ldr r3, [r1], #0
- cmp ip, #2
- blt 34f
- beq 30f
- cmp r2, #12
- blt 28f
- sub r2, r2, #12
-27: mov r7, r3, lsl #8
- ldmdb r1!, {r3, r4, r5, r6}
- orr r7, r7, r6, lsr #24
- mov r6, r6, lsl #8
- orr r6, r6, r5, lsr #24
- mov r5, r5, lsl #8
- orr r5, r5, r4, lsr #24
- mov r4, r4, lsl #8
- orr r4, r4, r3, lsr #24
- stmdb r0!, {r4, r5, r6, r7}
- subs r2, r2, #16
- bge 27b
- adds r2, r2, #12
- blt 29f
-28: mov ip, r3, lsl #8
- ldr r3, [r1, #-4]!
- orr ip, ip, r3, lsr #24
- str ip, [r0, #-4]!
- subs r2, r2, #4
- bge 28b
-29: add r1, r1, #3
- b 24b
-
-30: cmp r2, #12
- blt 32f
- sub r2, r2, #12
-31: mov r7, r3, lsl #16
- ldmdb r1!, {r3, r4, r5, r6}
- orr r7, r7, r6, lsr #16
- mov r6, r6, lsl #16
- orr r6, r6, r5, lsr #16
- mov r5, r5, lsl #16
- orr r5, r5, r4, lsr #16
- mov r4, r4, lsl #16
- orr r4, r4, r3, lsr #16
- stmdb r0!, {r4, r5, r6, r7}
- subs r2, r2, #16
- bge 31b
- adds r2, r2, #12
- blt 33f
-32: mov ip, r3, lsl #16
- ldr r3, [r1, #-4]!
- orr ip, ip, r3, lsr #16
- str ip, [r0, #-4]!
- subs r2, r2, #4
- bge 32b
-33: add r1, r1, #2
- b 24b
-
-34: cmp r2, #12
- blt 36f
- sub r2, r2, #12
-35: mov r7, r3, lsl #24
- ldmdb r1!, {r3, r4, r5, r6}
- orr r7, r7, r6, lsr #8
- mov r6, r6, lsl #24
- orr r6, r6, r5, lsr #8
- mov r5, r5, lsl #24
- orr r5, r5, r4, lsr #8
- mov r4, r4, lsl #24
- orr r4, r4, r3, lsr #8
- stmdb r0!, {r4, r5, r6, r7}
- subs r2, r2, #16
- bge 35b
- adds r2, r2, #12
- blt 37f
-36: mov ip, r3, lsl #24
- ldr r3, [r1, #-4]!
- orr ip, ip, r3, lsr #8
- str ip, [r0, #-4]!
- subs r2, r2, #4
- bge 36b
-37: add r1, r1, #1
- b 24b
-
- .align
-
-
--- /dev/null
+/*
+ * linux/arch/arm/lib/strrchr.S
+ *
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * ASM optimised string functions
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include "constants.h"
+
+ .text
+ENTRY(strrchr)
+ stmfd sp!, {lr}
+ mov r3, #0
+1: ldrb r2, [r0], #1
+ teq r2, r1
+ moveq r3, r0
+ teq r2, #0
+ bne 1b
+ mov r0, r3
+ LOADREGS(fd, sp!, {pc})
+
+
+++ /dev/null
-/*
- * linux/arch/arm/lib/system.c
- *
- * Copyright (C) 1999 Russell King
- *
- * Converted from ASM version 04/09/1999
- */
-#include <linux/kernel.h>
-
-extern void abort(void)
-{
- void *lr = __builtin_return_address(0);
-
- printk(KERN_CRIT "kernel abort from %p! (Please report to rmk@arm.linux.org.uk)\n",
- lr);
-
- /* force an oops */
- *(int *)0 = 0;
-
- /* if that doesn't kill us, halt */
- panic("Oops failed to kill thread");
-}
--- /dev/null
+/*
+ * linux/arch/arm/lib/testchangebit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+ENTRY(test_and_change_bit)
+ add r1, r1, r0, lsr #3
+ and r3, r0, #7
+ mov r0, #1
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1]
+ tst r2, r0, lsl r3
+ eor r2, r2, r0, lsl r3
+ moveq r0, #0
+ strb r2, [r1]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/testclearbit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+ENTRY(test_and_clear_bit)
+ add r1, r1, r0, lsr #3 @ Get byte offset
+ and r3, r0, #7 @ Get bit offset
+ mov r0, #1
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1]
+ tst r2, r0, lsl r3
+ bic r2, r2, r0, lsl r3
+ moveq r0, #0
+ strb r2, [r1]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
--- /dev/null
+/*
+ * linux/arch/arm/lib/testsetbit.S
+ *
+ * Copyright (C) 1995-1996 Russell King
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+ .text
+
+ENTRY(test_and_set_bit)
+ add r1, r1, r0, lsr #3 @ Get byte offset
+ and r3, r0, #7 @ Get bit offset
+ mov r0, #1
+ SAVEIRQS(ip)
+ DISABLEIRQS(ip)
+ ldrb r2, [r1]
+ tst r2, r0, lsl r3
+ orr r2, r2, r0, lsl r3
+ moveq r0, #0
+ strb r2, [r1]
+ RESTOREIRQS(ip)
+ RETINSTR(mov,pc,lr)
+
+
#include <asm/errno.h>
.text
-#ifdef ENTRY
+
#define USER(x...) \
9999: x; \
.section __ex_table,"a"; \
.align 3; \
.long 9999b,9001f; \
.previous
-#else
-#define USER(x...) \
- x
-#define ENTRY(x...) \
- .globl _##x; \
-_##x:
-#define TESTING
-#endif
#define PAGE_SHIFT 12
USER( strgtbt r3, [r0], #1) @ May fault
b .c2u_finished
-#ifndef TESTING
.section .fixup,"ax"
.align 0
9001: LOADREGS(fd,sp!, {r0, r4 - r7, pc})
.previous
-#endif
/* Prototype: unsigned long __arch_copy_from_user(void *to,const void *from,unsigned long n);
* Purpose : copy a block from user memory to kernel memory
strgtb r3, [r0], #1
b .cfu_finished
-#ifndef TESTING
.section .fixup,"ax"
.align 0
/* We took an exception. Zero out the buffer and pretend no
blne SYMBOL_NAME(__memzero)
LOADREGS(fd,sp!, {r0, r4 - r7, pc})
.previous
-#endif
/* Prototype: int __arch_clear_user(void *addr, size_t sz)
* Purpose : clear some user memory
mov r0, #0
LOADREGS(fd,sp!, {r1, pc})
-#ifndef TESTING
.section .fixup,"ax"
.align 0
9001: LOADREGS(fd,sp!, {r0, pc})
.previous
.align
-#endif
#define DO_COW(m) (!((m) & FAULT_CODE_READ))
#define READ_FAULT(m) ((m) & FAULT_CODE_READ)
+extern void die_if_kernel(const char *str, struct pt_regs *regs, int err);
+
#include "fault-common.c"
#ifdef DEBUG
* This needs to be done after sysctl_init, otherwise sys/
* will be overwritten.
*/
-void __init alignment_init(void)
+static int __init alignment_init(void)
{
create_proc_read_entry("sys/debug/alignment", 0, NULL,
- proc_alignment_read);
+ proc_alignment_read, NULL);
+ return 0;
}
__initcall(alignment_init);
#endif /* CONFIG_SYSCTL */
static int
-do_alignment_exception(struct pt_regs *regs)
+do_alignment(unsigned long addr, int error_code, struct pt_regs *regs)
{
unsigned int instr, rd, rn, correction, nr_regs, regbits;
unsigned long eaddr;
return 0;
}
+#else
+
+#define do_alignment NULL
+
#endif
-#define BUG_PROC_MSG \
- "Buggy processor (%08X), trying to continue.\n" \
- "Please read http://www.arm.linux.org.uk/state.html for more information"
+#ifdef CONFIG_DEBUG_USER
-asmlinkage void
-do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs)
+static int
+do_sect_fault(unsigned long addr, int error_code, struct pt_regs *regs)
{
if (user_mode(regs)) {
- if (addr == regs->ARM_pc) {
- static int first = 1;
- if (first) {
- /*
- * I want statistical information on this problem!
- */
- printk(KERN_ERR BUG_PROC_MSG, fsr);
- first = 0;
+ printk("%s: permission fault on section, "
+ "address=0x%08lx, code %d\n",
+ current->comm, addr, error_code);
+#ifdef DEBUG
+ {
+ unsigned int i, j;
+ unsigned long *sp;
+
+ sp = (unsigned long *) (regs->ARM_sp - 128);
+ for (j = 0; j < 20 && sp_valid(sp); j++) {
+ printk("%p: ", sp);
+ for (i = 0; i < 8 && sp_valid(sp); i += 1, sp++)
+ printk("%08lx ", *sp);
+ printk("\n");
}
- return;
+ show_regs(regs);
+ c_backtrace(regs->ARM_fp, regs->ARM_cpsr);
}
+#endif
}
+ return 1; /* not fixed up */
+}
+#else
-#define DIE(signr,nam)\
- force_sig(signr, current);\
- die(nam, regs, fsr);\
- do_exit(signr);\
- break
-
- switch (fsr & 15) {
- /*
- * 0 - vector exception
- */
- case 0:
- force_sig(SIGSEGV, current);
- if (!user_mode(regs)) {
- die("vector exception", regs, fsr);
- do_exit(SIGSEGV);
- }
- break;
-
- /*
- * 15 - permission fault on page
- * 5 - page-table entry descriptor fault
- * 7 - first-level descriptor fault
- */
- case 15: case 5: case 7:
- do_page_fault(addr, error_code, regs);
- break;
+#define do_sect_fault NULL
- /*
- * 13 - permission fault on section
- */
- case 13:
- force_sig(SIGSEGV, current);
- if (!user_mode(regs)) {
- die("section permission fault", regs, fsr);
- do_exit(SIGSEGV);
- } else {
-#ifdef CONFIG_DEBUG_USER
- printk("%s: permission fault on section, "
- "address=0x%08lx, code %d\n",
- current->comm, addr, error_code);
-#ifdef DEBUG
- {
- unsigned int i, j;
- unsigned long *sp;
-
- sp = (unsigned long *) (regs->ARM_sp - 128);
- for (j = 0; j < 20 && sp_valid(sp); j++) {
- printk("%p: ", sp);
- for (i = 0; i < 8 && sp_valid(sp); i += 1, sp++)
- printk("%08lx ", *sp);
- printk("\n");
- }
- show_regs(regs);
- c_backtrace(regs->ARM_fp, regs->ARM_cpsr);
- }
-#endif
#endif
+
+static struct fsr_info {
+ int (*fn)(unsigned long addr, int error_code, struct pt_regs *regs);
+ int sig;
+ char *name;
+} fsr_info[] = {
+ { NULL, SIGSEGV, "vector exception" },
+ { do_alignment, SIGBUS, "alignment exception" },
+ { NULL, SIGKILL, "terminal exception" },
+ { do_alignment, SIGBUS, "alignment exception" },
+ { NULL, SIGBUS, "external abort on linefetch" },
+ { do_page_fault, SIGSEGV, "page fault" },
+ { NULL, SIGBUS, "external abort on linefetch" },
+ { do_page_fault, SIGSEGV, "page fault" },
+ { NULL, SIGBUS, "external abort on non-linefetch" },
+ { NULL, SIGSEGV, "domain fault" },
+ { NULL, SIGBUS, "external abort on non-linefetch" },
+ { NULL, SIGSEGV, "domain fault" },
+ { NULL, SIGBUS, "external abort on translation" },
+ { do_sect_fault, SIGSEGV, "section permission fault" },
+ { NULL, SIGBUS, "external abort on translation" },
+ { do_page_fault, SIGSEGV, "page permission fault" }
+};
+
+/*
+ * Currently dropped down to debug level
+ */
+#define BUG_PROC_MSG \
+ KERN_DEBUG "Weird data abort (%08X).\n" \
+ KERN_DEBUG "Please see http://www.arm.linux.org.uk/state.html for more information"
+
+asmlinkage void
+do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs)
+{
+ struct fsr_info *inf;
+
+ if (user_mode(regs) && addr == regs->ARM_pc) {
+ static int first = 1;
+ if (first) {
+ /*
+ * I want statistical information on this problem,
+ * but we don't want to hastle the users too much.
+ */
+ printk(BUG_PROC_MSG, fsr);
+ first = 0;
}
- break;
+ return;
+ }
- case 1:
- case 3:
-#ifdef CONFIG_ALIGNMENT_TRAP
- if (!do_alignment_exception(regs))
- break;
-#endif
- /*
- * this should never happen
- */
- DIE(SIGBUS, "Alignment exception");
- break;
+ inf = fsr_info + (fsr & 15);
- case 2:
- DIE(SIGKILL, "Terminal exception");
- case 12:
- case 14:
- DIE(SIGBUS, "External abort on translation");
- case 9:
- case 11:
- DIE(SIGSEGV, "Domain fault");
-
- case 4:
- case 6:
- DIE(SIGBUS, "External abort on linefetch");
- case 8:
- case 10:
- DIE(SIGBUS, "External abort on non-linefetch");
+ if (!inf->fn || inf->fn(addr, error_code, regs)) {
+ force_sig(inf->sig, current);
+ die_if_kernel(inf->name, regs, fsr);
}
}
*/
#include <linux/config.h>
-extern void die(char *msg, struct pt_regs *regs, unsigned int err);
+extern void die(const char *msg, struct pt_regs *regs, unsigned int err);
/*
* This is useful to dump out the page tables associated with
do_exit(SIGKILL);
}
-static void do_page_fault(unsigned long addr, int mode, struct pt_regs *regs)
+static int do_page_fault(unsigned long addr, int mode, struct pt_regs *regs)
{
struct task_struct *tsk;
struct mm_struct *mm;
goto do_sigbus;
up(&mm->mmap_sem);
- return;
+ return 0;
/*
* Something tried to access memory that isn't in our memory map..
/* User mode accesses just cause a SIGSEGV */
if (user_mode(regs)) {
+ tsk->thread.address = addr;
tsk->thread.error_code = mode;
tsk->thread.trap_no = 14;
#ifdef CONFIG_DEBUG_USER
tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode);
#endif
force_sig(SIGSEGV, tsk);
- return;
+ return 0;
}
no_context:
tsk->comm, regs->ARM_pc, addr, fixup);
#endif
regs->ARM_pc = fixup;
- return;
+ return 0;
}
kernel_page_fault(addr, mode, regs, tsk, mm);
- return;
+ return 0;
do_sigbus:
/*
* Send a sigbus, regardless of whether we were in kernel
* or user mode.
*/
+ tsk->thread.address = addr;
tsk->thread.error_code = mode;
tsk->thread.trap_no = 14;
force_sig(SIGBUS, tsk);
/* Kernel mode? Handle exceptions or die */
if (!user_mode(regs))
goto no_context;
+ return 0;
}
void __init paging_init(void)
{
void *zero_page, *bad_page, *bad_table;
- unsigned int zone_size[3];
+ unsigned int zone_size[MAX_NR_ZONES];
+ int i;
#ifdef CONFIG_CPU_32
#define TABLE_OFFSET (PTRS_PER_PTE)
/*
* Initialise the zones and mem_map
*/
- zonesize_init(zone_size);
+ for (i = 0; i < MAX_NR_ZONES; i++)
+ zone_size[i] = 0;
+
+ /*
+ * Calculate the size of the zones. On ARM, we don't have
+ * any problems with DMA or highmem, so all memory is
+ * allocated to the DMA zone.
+ */
+ for (i = 0; i < meminfo.nr_banks; i++) {
+ if (meminfo.bank[i].size) {
+ unsigned int end;
+
+ end = (meminfo.bank[i].start - PHYS_OFFSET +
+ meminfo.bank[i].size) >> PAGE_SHIFT;
+ if (zone_size[0] < end)
+ zone_size[0] = end;
+ }
+ }
free_area_init(zone_size);
/*
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- for (; start < end; start += PAGE_SIZE) {
- ClearPageReserved(mem_map + MAP_NR(start));
- set_page_count(mem_map+MAP_NR(start), 1);
- free_page(start);
+ unsigned long addr;
+ for (addr = start; addr < end; addr += PAGE_SIZE) {
+ ClearPageReserved(mem_map + MAP_NR(addr));
+ set_page_count(mem_map+MAP_NR(addr), 1);
+ free_page(addr);
totalram_pages++;
}
printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
return (pte_t *) pmd_page(*pmd) + offset;
}
-/*
- * Calculate the size of the DMA, normal and highmem zones.
- * On 26-bit ARMs, we don't have any real DMA or highmem,
- * so we allocate the whole memory as being DMA-capable.
- */
-void __init zonesize_init(unsigned int *zone_size)
-{
- int i;
-
- zone_size[0] = max_low_pfn;
- zone_size[1] = 0;
- zone_size[2] = 0;
-}
-
/*
* This contains the code to setup the memory map on an ARM2/ARM250/ARM3
* machine. This is both processor & architecture specific, and requires
return 1;
}
+static int __init noalign_setup(char *__unused)
+{
+ cr_alignment &= ~2;
+ cr_no_alignment &= ~2;
+ set_cr(cr_alignment);
+ return 1;
+}
+
+__setup("noalign", noalign_setup);
__setup("nocache", nocache_setup);
__setup("nowb", nowrite_setup);
* the clearance is done by the middle-level functions (pmd)
* rather than the top-level (pgd) functions.
*/
-static inline void free_init_section(unsigned long virt)
+static inline void clear_mapping(unsigned long virt)
{
pmd_clear(pmd_offset(pgd_offset_k(virt), virt));
}
}
}
-/*
- * Initial boot-time mapping. This covers just the zero page, kernel and
- * the flush area. NB: it must be sorted by virtual address, and no
- * virtual address overlaps.
- * init_map[2..4] are for architectures with banked memory.
- */
-static struct map_desc init_map[] __initdata = {
- { 0, 0, PAGE_SIZE, DOMAIN_USER, 0, 0, 1, 0 }, /* zero page */
- { 0, 0, 0, DOMAIN_KERNEL, 0, 1, 1, 1 }, /* kernel memory */
- { 0, 0, 0, DOMAIN_KERNEL, 0, 1, 1, 1 }, /* (4 banks) */
- { 0, 0, 0, DOMAIN_KERNEL, 0, 1, 1, 1 },
- { 0, 0, 0, DOMAIN_KERNEL, 0, 1, 1, 1 },
- { 0, 0, PGDIR_SIZE, DOMAIN_KERNEL, 1, 0, 1, 1 }, /* cache flush 1 */
- { 0, 0, 0, DOMAIN_KERNEL, 1, 0, 1, 0 } /* cache flush 2 */
-};
-
-#define NR_INIT_MAPS (sizeof(init_map) / sizeof(init_map[0]))
-
-/*
- * Calculate the size of the DMA, normal and highmem zones.
- * On ARM, we don't have any problems with DMA, so all memory
- * is allocated to the DMA zone. We also don't have any
- * highmem either.
- */
-void __init zonesize_init(unsigned int *zone_size)
+void __init pagetable_init(void)
{
+ struct map_desc *init_maps, *p;
+ unsigned long address = 0;
int i;
- zone_size[0] = 0;
- zone_size[1] = 0;
- zone_size[2] = 0;
+ /*
+ * Setup initial mappings. We use the page we allocated
+ * for zero page to hold the mappings, which will get
+ * overwritten by the vectors in traps_init(). The
+ * mappings must be in virtual address order.
+ */
+ init_maps = p = alloc_bootmem_low_pages(PAGE_SIZE);
+
+ p->physical = virt_to_phys(init_maps);
+ p->virtual = 0;
+ p->length = PAGE_SIZE;
+ p->domain = DOMAIN_USER;
+ p->prot_read = 0;
+ p->prot_write = 0;
+ p->cacheable = 1;
+ p->bufferable = 0;
+
+ p ++;
for (i = 0; i < meminfo.nr_banks; i++) {
- if (meminfo.bank[i].size) {
- unsigned int end;
+ if (meminfo.bank[i].size == 0)
+ continue;
- end = (meminfo.bank[i].start - PHYS_OFFSET +
- meminfo.bank[i].size) >> PAGE_SHIFT;
- if (end > zone_size[0])
- zone_size[0] = end;
- }
+ p->physical = meminfo.bank[i].start;
+ p->virtual = __phys_to_virt(p->physical);
+ p->length = meminfo.bank[i].size;
+ p->domain = DOMAIN_KERNEL;
+ p->prot_read = 0;
+ p->prot_write = 1;
+ p->cacheable = 1;
+ p->bufferable = 1;
+
+ p ++;
}
-}
-void __init pagetable_init(void)
-{
- unsigned long address = 0;
- int i;
+ p->physical = FLUSH_BASE_PHYS;
+ p->virtual = FLUSH_BASE;
+ p->length = PGDIR_SIZE;
+ p->domain = DOMAIN_KERNEL;
+ p->prot_read = 1;
+ p->prot_write = 0;
+ p->cacheable = 1;
+ p->bufferable = 1;
+
+ p ++;
- /*
- * Setup the above mappings
- */
- init_map[0].physical = virt_to_phys(alloc_bootmem_low_pages(PAGE_SIZE));
- init_map[5].physical = FLUSH_BASE_PHYS;
- init_map[5].virtual = FLUSH_BASE;
#ifdef FLUSH_BASE_MINICACHE
- init_map[6].physical = FLUSH_BASE_PHYS + PGDIR_SIZE;
- init_map[6].virtual = FLUSH_BASE_MINICACHE;
- init_map[6].length = PGDIR_SIZE;
+ p->physical = FLUSH_BASE_PHYS + PGDIR_SIZE;
+ p->virtual = FLUSH_BASE_MINICACHE;
+ p->length = PGDIR_SIZE;
+ p->domain = DOMAIN_KERNEL;
+ p->prot_read = 1;
+ p->prot_write = 0;
+ p->cacheable = 1;
+ p->bufferable = 0;
+
+ p ++;
#endif
- for (i = 0; i < meminfo.nr_banks; i++) {
- init_map[i+1].physical = meminfo.bank[i].start;
- init_map[i+1].virtual = meminfo.bank[i].start +
- PAGE_OFFSET - PHYS_OFFSET;
- init_map[i+1].length = meminfo.bank[i].size;
- }
+ /*
+ * We may have a mapping in virtual address 0.
+ * Clear it out.
+ */
+ clear_mapping(0);
/*
* Go through the initial mappings, but clear out any
*/
i = 0;
do {
- if (address < init_map[i].virtual || i == NR_INIT_MAPS) {
- free_init_section(address);
+ if (address < init_maps->virtual || init_maps == p) {
+ clear_mapping(address);
address += PGDIR_SIZE;
} else {
- create_mapping(init_map + i);
+ create_mapping(init_maps);
- address = init_map[i].virtual + init_map[i].length;
+ address = init_maps->virtual + init_maps->length;
address = (address + PGDIR_SIZE - 1) & PGDIR_MASK;
- do {
- i += 1;
- } while (init_map[i].length == 0 && i < NR_INIT_MAPS);
+ init_maps ++;
}
} while (address != 0);
unsigned int i;
#define PFN(x) (((x) - PHYS_OFFSET) >> PAGE_SHIFT)
+#define free_bootmem(s,sz) free_bootmem(((s)<<PAGE_SHIFT)+PHYS_OFFSET, (sz)<<PAGE_SHIFT)
for (i = 0; i < meminfo.nr_banks; i++) {
if (meminfo.bank[i].size == 0)
end_pfn = PFN(meminfo.bank[i].start + meminfo.bank[i].size);
- if (end_pfn != meminfo.end >> PAGE_SHIFT)
+ if (end_pfn != PFN(meminfo.end))
pg = mem_map + end_pfn;
}
* Copyright (C) 1998-1999 Russell King
* Copyright (C) 1999 Hugo Fiennes
*
- * 1999/09/12 Nicolas Pitre <nico@visuaide.com>
- * Specific RAM implementation details are in
- * linux/include/asm/arch-sa1100/memory.h now.
- * Allows for better macro optimisations when possible.
+ * 1999/12/04 Nicolas Pitre <nico@cam.org>
+ * Converted memory definition for struct meminfo initialisations.
+ * Memory is listed physically now.
*/
+
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/init.h>
#define SIZE(x) (sizeof(x) / sizeof(x[0]))
+
/*
- * These are the memory size mappings for the
- * SA1100. Note that LART is a special case -
- * it doesn't use physical address A23 on the
- * DRAM, so we effectively have 4 * 8MB in
- * two banks.
+ * These are the RAM memory mappings for SA1100 implementations.
+ * Note that LART is a special case - it doesn't use physical
+ * address line A23 on the DRAM, so we effectively have 4 * 8MB
+ * in two banks.
*/
-struct mem_desc mem_desc[] __initdata = {
- /* virt start virt end */
+struct mem_desc {
+ unsigned long phys_start;
+ unsigned long length;
+} mem_desc[] __initdata = {
#if defined(CONFIG_SA1100_BRUTUS)
- { 0xc0000000, 0xc0400000 }, /* 4MB */
- { 0xc1000000, 0xc1400000 }, /* 4MB */
- { 0xc2000000, 0xc2400000 }, /* 4MB */
- { 0xc3000000, 0xc3400000 } /* 4MB */
+ { 0xc0000000, 0x00400000 }, /* 4MB */
+ { 0xc8000000, 0x00400000 }, /* 4MB */
+#if 0 /* only two banks until the bootmem stuff is fixed... */
+ { 0xd0000000, 0x00400000 }, /* 4MB */
+ { 0xd8000000, 0x00400000 } /* 4MB */
+#endif
#elif defined(CONFIG_SA1100_EMPEG)
- { 0xc0000000, 0xc0400000 }, /* 4MB */
- { 0xc1000000, 0xc1400000 } /* 4MB */
+ { 0xc0000000, 0x00400000 }, /* 4MB */
+ { 0xc8000000, 0x00400000 } /* 4MB */
#elif defined(CONFIG_SA1100_LART)
- { 0xc0000000, 0xc0800000 }, /* 16MB */
- { 0xc1000000, 0xc1800000 },
- { 0xc2000000, 0xc2800000 }, /* 16MB */
- { 0xc3000000, 0xc3800000 }
+ { 0xc0000000, 0x00800000 }, /* 8MB */
+ { 0xc1000000, 0x00800000 }, /* 8MB */
+ { 0xc8000000, 0x00800000 }, /* 8MB */
+ { 0xc9000000, 0x00800000 } /* 8MB */
#elif defined(CONFIG_SA1100_VICTOR)
- { 0xc0000000, 0xc0400000 } /* 4MB */
+ { 0xc0000000, 0x00400000 } /* 4MB */
#elif defined(CONFIG_SA1100_TIFON)
- { 0xc0000000, 0xc1000000 }, /* 16MB */
- { 0xc1000000, 0xc2000000 } /* 16MB */
+ { 0xc0000000, 0x01000000 }, /* 16MB */
+ { 0xc8000000, 0x01000000 } /* 16MB */
#else
#error missing memory configuration
#endif
unsigned int __initdata mem_desc_size = SIZE(mem_desc);
+
struct map_desc io_desc[] __initdata = {
/* virtual physical length domain r w c b */
#if defined(CONFIG_SA1100_VICTOR)
b Ldata_simple @ ldc rd, [rn, #m]
b Ldata_unknown
Ldata_unknown: @ Part of jumptable
- ldr r3, [sp, #15 * 4] @ Get PC
- str r3, [sp, #-4]!
- mov r1, r1, lsr #2
- mov r3, r4
- mov r2, r0
- adr r0, Lukabttxt
- bl SYMBOL_NAME(panic)
-Lstop: b Lstop
+ mov r0, r1
+ mov r1, r4
+ mov r2, r3
+ b baddataabort
Ldata_ldmstm: tst r4, #1 << 21 @ check writeback bit
beq Ldata_simple
.word cpu_arm6_cache_wback_area
.word cpu_arm6_cache_purge_area
.word cpu_arm6_flush_tlb_page
- .word cpu_arm7_do_idle
+ .word cpu_arm6_do_idle
.size arm6_processor_functions, . - arm6_processor_functions
/*
* is larger than this, then we flush the whole cache
*/
#define MAX_AREA_SIZE 32768
+#define FLUSH_OFFSET 32768
.macro flush_110_dcache rd, ra, re
add \re, \ra, #16384 @ only necessary for 16k
ands r1, r1, #1
eor r1, r1, #1
str r1, [r3]
- addne ip, ip, #32768
+ addne ip, ip, #FLUSH_OFFSET
flush_110_dcache r3, ip, r1
mov ip, #0
teq r2, #0
ands r1, r1, #1
eor r1, r1, #1
str r1, [r3]
- addne ip, ip, #32768
+ addne ip, ip, #FLUSH_OFFSET
flush_1100_dcache r3, ip, r1
mov ip, #0
teq r2, #0
ands r2, r2, #1
eor r2, r2, #1
str r2, [r3]
- addne ip, ip, #32768
+ addne ip, ip, #FLUSH_OFFSET
flush_110_dcache r3, ip, r1
mov r1, #0
mcr p15, 0, r1, c7, c5, 0 @ flush I cache
ands r2, r2, #1
eor r2, r2, #1
str r2, [r3]
- addne ip, ip, #32768
+ addne ip, ip, #FLUSH_OFFSET
flush_1100_dcache r3, ip, r1
mov r1, #0
mcr p15, 0, r1, c7, c5, 0 @ flush I cache
ENTRY(cpu_sa1100_do_idle)
mov r0, #0
mcr p15, 0, r0, c15, c2, 2 @ Disable clock switching
- @ load from uncacheable loc?
- mcr p15, 0, r0, c15, c8, 2 @ Wait for interrupt
+ ldr r1, =FLUSH_BASE+FLUSH_OFFSET*2 @ load from uncacheable loc
+ ldr r1, [r1, #0]
+ b 1f
+
+ .align 5
+1: mcr p15, 0, r0, c15, c8, 2 @ Wait for interrupt
mcr p15, 0, r0, c15, c1, 2 @ Enable clock switching
mov pc, lr
ENTRY(stext)
SECTIONS
{
- . = TEXTADDR;
- .text : { } /* Set text start address */
-
- __init_begin = .; /* Init code and data */
- .text.init : { *(.text.init) }
- __proc_info_begin = .;
- .proc.info : { *(.proc.info) }
- __proc_info_end = .;
- .data.init : { *(.data.init) }
- . = ALIGN(16);
- __setup_start = .;
- .setup.init : { *(.setup.init) }
- __setup_end = .;
- __initcall_start = .;
- .initcall.init : { *(.initcall.init) }
- __initcall_end = .;
- . = ALIGN(4096);
- __init_end = .;
-
- __ebsa285_begin = .;
- .text.ebsa285 : { *(.text.ebsa285) }
- .data.ebsa285 : { *(.data.ebsa285) }
- . = ALIGN(4096);
- __ebsa285_end = .;
-
- __netwinder_begin = .;
- .text.netwinder : { *(.text.netwinder) }
- .data.netwinder : { *(.data.netwinder) }
- . = ALIGN(4096);
- __netwinder_end = .;
-
- _text = .; /* Text and read-only data */
- .text.real : { /* Real text segment */
- *(.text)
- *(.fixup)
- *(.gnu.warning)
+ . = TEXTADDR;
+ .init : { /* Init code and data */
+ __init_begin = .;
+ *(.text.init)
+ __proc_info_begin = .;
+ *(.proc.info)
+ __proc_info_end = .;
+ *(.data.init)
+ . = ALIGN(16);
+ __setup_start = .;
+ *(.setup.init)
+ __setup_end = .;
+ __initcall_start = .;
+ *(.initcall.init)
+ __initcall_end = .;
+ . = ALIGN(4096);
+ __init_end = .;
}
- .text.lock : { *(.text.lock) } /* out-of-line lock text */
- .rodata : { *(.rodata) }
- .kstrtab : { *(.kstrtab) }
+ .ebsa285 : {
+ __ebsa285_begin = .;
+ *(.text.ebsa285)
+ *(.data.ebsa285)
+ . = ALIGN(4096);
+ __ebsa285_end = .;
+ }
- . = ALIGN(16); /* Exception table */
- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
+ .netwinder : {
+ __netwinder_begin = .;
+ *(.text.netwinder)
+ *(.data.netwinder)
+ . = ALIGN(4096);
+ __netwinder_end = .;
+ }
- __start___ksymtab = .; /* Kernel symbol table */
- __ksymtab : { *(__ksymtab) }
- __stop___ksymtab = .;
+ .text : { /* Real text segment */
+ _text = .; /* Text and read-only data */
+ *(.text)
+ *(.fixup)
+ *(.gnu.warning)
+ *(.text.lock) /* out-of-line lock text */
+ *(.rodata)
+ *(.kstrtab)
+ . = ALIGN(16); /* Exception table */
+ __start___ex_table = .;
+ *(__ex_table)
+ __stop___ex_table = .;
- .got : { *(.got) } /* Global offset table */
+ __start___ksymtab = .; /* Kernel symbol table */
+ *(__ksymtab)
+ __stop___ksymtab = .;
- _etext = .; /* End of text section */
+ *(.got) /* Global offset table */
- . = ALIGN(8192);
- .data : { /* Data */
- *(.init.task)
- *(.data)
- CONSTRUCTORS
+ _etext = .; /* End of text section */
}
- _edata = .; /* End of data section */
+ . = ALIGN(8192);
- __bss_start = .; /* BSS */
- .bss : {
- *(.bss)
+ .data : { /* Data */
+ *(.init.task)
+ *(.data)
+ CONSTRUCTORS
+ _edata = .; /* End of data section */
}
- _end = . ;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .bss : {
+ __bss_start = .; /* BSS */
+ *(.bss)
+ *(COMMON)
+ _end = . ;
+ }
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
}
define_bool CONFIG_X86 y
define_bool CONFIG_ISA y
+define_bool CONFIG_UID16 y
+
mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-source drivers/pcmcia/Config.in
+ source drivers/pcmcia/Config.in
fi
bool 'System V IPC' CONFIG_SYSVIPC
CONFIG_DRM=y
CONFIG_DRM_TDFX=y
# CONFIG_DRM_GAMMA is not set
+CONFIG_PCMCIA_SERIAL=y
#
# PCMCIA character device support
#
-CONFIG_PCMCIA_SERIAL=y
# CONFIG_PCMCIA_SERIAL_CS is not set
# CONFIG_PCMCIA_SERIAL_CB is not set
res->flags |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
- /* Bug? */
+ /* Somebody might have asked allocation of a non-standard resource */
return;
}
pci_write_config_dword(dev, reg, new);
pci_read_config_dword(dev, reg, &check);
- if (new != check) {
+ if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
printk(KERN_ERR "PCI: Error while updating region "
"%s/%d (%08x != %08x)\n", dev->slot_name, resource,
new, check);
# For a description of the syntax of this configuration file,
# see the Configure script.
#
+
+define_bool CONFIG_UID16 y
+
mainmenu_name "Linux/68k Kernel Configuration"
mainmenu_option next_comment
source drivers/pci/Config.in
-source drivers/pcmcia/Config.in
+bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
+
+if [ "$CONFIG_HOTPLUG" = "y" ]; then
+ source drivers/pcmcia/Config.in
+fi
source drivers/parport/Config.in
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG is not set
# CONFIG_PARPORT is not set
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PCI_NAMES is not set
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_MISC=m
+CONFIG_HOTPLUG=y
#
# PCMCIA/Cardbus support
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG is not set
# CONFIG_PARPORT is not set
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
(phys>>12),
APMMU_CACHE|APMMU_PRIV|APMMU_VALID);
init_mm.mmap->vm_start = PAGE_OFFSET;
- stack_top = PAGE_OFFSET - PAGE_SIZE;
}
extern unsigned long free_area_init(unsigned long, unsigned long);
-/* $Id: process.c,v 1.142 1999/12/27 06:08:31 anton Exp $
+/* $Id: process.c,v 1.143 2000/01/09 09:13:28 anton Exp $
* linux/arch/sparc/kernel/process.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
#endif
p->thread.kwim = current->thread.fork_kwim;
+ /* This is used for sun4c only */
+ atomic_set(&p->thread.refcount, 1);
+
if(regs->psr & PSR_PS) {
extern struct pt_regs fake_swapper_regs;
-/* $Id: sparc_ksyms.c,v 1.85 2000/01/08 16:38:18 anton Exp $
+/* $Id: sparc_ksyms.c,v 1.86 2000/01/09 10:46:49 anton Exp $
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
EXPORT_SYMBOL(sparc_valid_addr_bitmap);
-#ifndef CONFIG_SUN4
-EXPORT_SYMBOL(stack_top);
-#endif
-
/* Atomic operations. */
EXPORT_SYMBOL_PRIVATE(_atomic_add);
EXPORT_SYMBOL_PRIVATE(_atomic_sub);
-/* $Id: sunos_asm.S,v 1.14 1996/12/04 18:25:48 jj Exp $
+/* $Id: sunos_asm.S,v 1.15 2000/01/11 17:33:21 jj Exp $
* sunos_asm.S: SunOS system calls which must have a low-level
* entry point to operate correctly.
*
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl C_LABEL(sunos_getuid)
C_LABEL(sunos_getuid):
- call C_LABEL(sys_geteuid)
+ call C_LABEL(sys_geteuid16)
nop
- call C_LABEL(sys_getuid)
+ call C_LABEL(sys_getuid16)
st %o0, [%sp + REGWIN_SZ + PT_I1]
b C_LABEL(ret_sys_call)
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl C_LABEL(sunos_getgid)
C_LABEL(sunos_getgid):
- call C_LABEL(sys_getegid)
+ call C_LABEL(sys_getegid16)
nop
- call C_LABEL(sys_getgid)
+ call C_LABEL(sys_getgid16)
st %o0, [%sp + REGWIN_SZ + PT_I1]
b C_LABEL(ret_sys_call)
-/* $Id: systbls.S,v 1.88 1999/12/21 14:09:06 jj Exp $
+/* $Id: systbls.S,v 1.90 2000/01/11 17:33:20 jj Exp $
* systbls.S: System call entry point tables for OS compatibility.
* The native Linux system call table lives here also.
*
sys_call_table:
/*0*/ .long sys_nis_syscall, sys_exit, sys_fork, sys_read, sys_write
/*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link
-/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown, sys_mknod
-/*15*/ .long sys_chmod, sys_lchown, sparc_brk, sys_nis_syscall, sys_lseek
-/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
+/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod
+/*15*/ .long sys_chmod, sys_lchown16, sparc_brk, sys_nis_syscall, sys_lseek
+/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
/*25*/ .long sys_time, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause
-/*30*/ .long sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
-/*35*/ .long sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile
-/*40*/ .long sys_newlstat, sys_dup, sys_pipe, sys_times, sys_nis_syscall
-/*45*/ .long sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid
-/*50*/ .long sys_getegid, sys_acct, sys_nis_syscall, sys_nis_syscall, sys_ioctl
+/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
+/*35*/ .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile
+/*40*/ .long sys_newlstat, sys_dup, sys_pipe, sys_times, sys_getuid
+/*45*/ .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16
+/*50*/ .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl
/*55*/ .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve
/*60*/ .long sys_umask, sys_chroot, sys_newfstat, sys_fstat64, sys_getpagesize
-/*65*/ .long sys_msync, sys_vfork, sys_pread, sys_pwrite, sys_nis_syscall
-/*70*/ .long sys_nis_syscall, sys_mmap, sys_nis_syscall, sys_munmap, sys_mprotect
-/*75*/ .long sys_nis_syscall, sys_vhangup, sys_truncate64, sys_nis_syscall, sys_getgroups
-/*80*/ .long sys_setgroups, sys_getpgrp, sys_nis_syscall, sys_setitimer, sys_ftruncate64
-/*85*/ .long sys_swapon, sys_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall
-/*90*/ .long sys_dup2, sys_nis_syscall, sys_fcntl, sys_select, sys_nis_syscall
+/*65*/ .long sys_msync, sys_vfork, sys_pread, sys_pwrite, sys_geteuid
+/*70*/ .long sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect
+/*75*/ .long sys_setregid, sys_vhangup, sys_truncate64, sys_getgroups, sys_getgroups16
+/*80*/ .long sys_setgroups16, sys_getpgrp, sys_setgroups, sys_setitimer, sys_ftruncate64
+/*85*/ .long sys_swapon, sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
+/*90*/ .long sys_dup2, sys_setfsuid, sys_fcntl, sys_select, sys_setfsgid
/*95*/ .long sys_fsync, sys_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*100*/ .long sys_getpriority, sys_rt_sigreturn, sys_rt_sigaction, sys_rt_sigprocmask, sys_rt_sigpending
-/*105*/ .long sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_nis_syscall, sys_nis_syscall
-/*110*/ .long sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
+/*105*/ .long sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_setresuid, sys_getresuid
+/*110*/ .long sys_setresgid, sys_getresgid, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*115*/ .long sys_nis_syscall, sys_gettimeofday, sys_getrusage, sys_nis_syscall, sys_getcwd
-/*120*/ .long sys_readv, sys_writev, sys_settimeofday, sys_fchown, sys_fchmod
-/*125*/ .long sys_nis_syscall, sys_setreuid, sys_setregid, sys_rename, sys_truncate
+/*120*/ .long sys_readv, sys_writev, sys_settimeofday, sys_fchown16, sys_fchmod
+/*125*/ .long sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
/*130*/ .long sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
/*135*/ .long sys_nis_syscall, sys_mkdir, sys_rmdir, sys_utimes, sys_stat64
/*140*/ .long sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_getrlimit
/*210*/ .long sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys_sysinfo
/*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_nis_syscall, sys_adjtimex
/*220*/ .long sys_sigprocmask, sys_create_module, sys_delete_module, sys_get_kernel_syms, sys_getpgid
-/*225*/ .long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid
+/*225*/ .long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
/*230*/ .long sys_select, sys_time, sys_nis_syscall, sys_stime, sys_nis_syscall
/* "We are the Knights of the Forest of Ni!!" */
/*235*/ .long sys_nis_syscall, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
.long sys_close, sunos_wait4, sys_creat
.long sys_link, sys_unlink, sunos_execv
.long sys_chdir, sunos_nosys, sys_mknod
- .long sys_chmod, sys_lchown, sunos_brk
+ .long sys_chmod, sys_lchown16, sunos_brk
.long sunos_nosys, sys_lseek, sunos_getpid
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_getuid, sunos_nosys, sys_ptrace
.long sunos_nosys, sunos_sbrk, sunos_sstk
.long sunos_mmap, sunos_vadvise, sys_munmap
.long sys_mprotect, sunos_madvise, sys_vhangup
- .long sunos_nosys, sunos_mincore, sys_getgroups
- .long sys_setgroups, sys_getpgrp, sunos_setpgrp
+ .long sunos_nosys, sunos_mincore, sys_getgroups16
+ .long sys_setgroups16, sys_getpgrp, sunos_setpgrp
.long sys_setitimer, sunos_nosys, sys_swapon
.long sys_getitimer, sys_gethostname, sys_sethostname
.long sunos_getdtablesize, sys_dup2, sunos_nop
.long sys_sigstack, sys_recvmsg, sys_sendmsg
.long sunos_nosys, sys_gettimeofday, sys_getrusage
.long sunos_getsockopt, sunos_nosys, sunos_readv
- .long sunos_writev, sys_settimeofday, sys_fchown
- .long sys_fchmod, sys_recvfrom, sys_setreuid
- .long sys_setregid, sys_rename, sys_truncate
+ .long sunos_writev, sys_settimeofday, sys_fchown16
+ .long sys_fchmod, sys_recvfrom, sys_setreuid16
+ .long sys_setregid16, sys_rename, sys_truncate
.long sys_ftruncate, sys_flock, sunos_nosys
.long sys_sendto, sys_shutdown, sys_socketpair
.long sys_mkdir, sys_rmdir, sys_utimes
-/* $Id: loadmmu.c,v 1.52 2000/01/08 16:38:20 anton Exp $
+/* $Id: loadmmu.c,v 1.53 2000/01/09 10:46:50 anton Exp $
* loadmmu.c: This code loads up all the mm function pointers once the
* machine type has been determined. It also sets the static
* mmu values such as PAGE_NONE, etc.
#include <asm/mmu_context.h>
#include <asm/oplib.h>
-unsigned long stack_top = 0xf0000000 - PAGE_SIZE;
-
struct ctx_list *ctx_list_pool;
struct ctx_list ctx_free;
struct ctx_list ctx_used;
-/* $Id: srmmu.c,v 1.199 1999/12/23 02:00:51 davem Exp $
+/* $Id: srmmu.c,v 1.202 2000/01/09 10:46:50 anton Exp $
* srmmu.c: SRMMU specific routines for memory management.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
* Copyright (C) 1995 Pete Zaitcev
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ * Copyright (C) 1999 Anton Blanchard (anton@progsoc.uts.edu.au)
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/blk.h>
#include <linux/spinlock.h>
+#include <linux/bootmem.h>
#include <asm/page.h>
+#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/io.h>
#include <asm/kdebug.h>
#include <asm/btfixup.h>
-/* #define DEBUG_MAP_KERNEL */
-/* #define PAGESKIP_DEBUG */
-
enum mbus_module srmmu_modtype;
unsigned int hwbug_bitmask;
int vac_cache_size;
extern struct resource sparc_iomap;
+extern unsigned long last_valid_pfn;
+
#ifdef __SMP__
#define FLUSH_BEGIN(mm)
#define FLUSH_END
#define FLUSH_END }
#endif
-static int phys_mem_contig;
-BTFIXUPDEF_SETHI(page_contig_offset)
-
BTFIXUPDEF_CALL(void, ctxd_set, ctxd_t *, pgd_t *)
BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *)
ctxd_t *srmmu_ctx_table_phys;
ctxd_t *srmmu_context_table;
-/* Don't change this without changing access to this
- * in arch/sparc/mm/viking.S
- */
-static struct srmmu_trans {
- unsigned long vbase;
- unsigned long pbase;
- unsigned long size;
-} srmmu_map[SPARC_PHYS_BANKS];
-
-#define SRMMU_HASHSZ 256
-
-/* Not static, viking.S uses it. */
-unsigned long srmmu_v2p_hash[SRMMU_HASHSZ];
-static unsigned long srmmu_p2v_hash[SRMMU_HASHSZ];
-
-#define srmmu_ahashfn(addr) ((addr) >> 24)
-
int viking_mxcc_present = 0;
static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED;
-/* Physical memory can be _very_ non-contiguous on the sun4m, especially
- * the SS10/20 class machines and with the latest openprom revisions.
- * So we have to do a quick lookup.
- * We use the same for SS1000/SC2000 as a fall back, when phys memory is
- * non-contiguous.
- */
-static inline unsigned long srmmu_v2p(unsigned long vaddr)
-{
- unsigned long off = srmmu_v2p_hash[srmmu_ahashfn(vaddr)];
-
- return (vaddr + off);
-}
-
-static inline unsigned long srmmu_p2v(unsigned long paddr)
-{
- unsigned long off = srmmu_p2v_hash[srmmu_ahashfn(paddr)];
-
- if (off != 0xffffffffUL)
- return (paddr - off);
- else
- return 0xffffffffUL;
-}
-
-/* Physical memory on most SS1000/SC2000 can be contiguous, so we handle that case
- * as a special case to make things faster.
- */
-/* FIXME: gcc is stupid here and generates very very bad code in this
- * heavily used routine. So we help it a bit. */
-static inline unsigned long srmmu_c_v2p(unsigned long vaddr)
-{
-#if KERNBASE != 0xf0000000
- if (vaddr >= KERNBASE) return vaddr - KERNBASE;
- return vaddr - BTFIXUP_SETHI(page_contig_offset);
-#else
- register unsigned long kernbase;
-
- __asm__ ("sethi %%hi(0xf0000000), %0" : "=r"(kernbase));
- return vaddr - ((vaddr >= kernbase) ? kernbase : BTFIXUP_SETHI(page_contig_offset));
-#endif
-}
-
-static inline unsigned long srmmu_c_p2v(unsigned long paddr)
-{
-#if KERNBASE != 0xf0000000
- if (paddr < (0xfd000000 - KERNBASE)) return paddr + KERNBASE;
- return (paddr + BTFIXUP_SETHI(page_contig_offset));
-#else
- register unsigned long kernbase;
- register unsigned long limit;
-
- __asm__ ("sethi %%hi(0x0d000000), %0" : "=r"(limit));
- __asm__ ("sethi %%hi(0xf0000000), %0" : "=r"(kernbase));
-
- return paddr + ((paddr < limit) ? kernbase : BTFIXUP_SETHI(page_contig_offset));
-#endif
-}
-
-/* On boxes where there is no lots_of_ram, KERNBASE is mapped to PA<0> and highest
- PA is below 0x0d000000, we can optimize even more :) */
-static inline unsigned long srmmu_s_v2p(unsigned long vaddr)
-{
- return vaddr - PAGE_OFFSET;
-}
-
-static inline unsigned long srmmu_s_p2v(unsigned long paddr)
-{
- return paddr + PAGE_OFFSET;
-}
-
/* In general all page table modifications should use the V8 atomic
* swap instruction. This insures the mmu and the cpu are in sync
* with respect to ref/mod bits in the page tables.
/* Functions really use this, not srmmu_swap directly. */
#define srmmu_set_entry(ptr, newentry) srmmu_swap((unsigned long *) (ptr), (newentry))
-#ifdef PAGESKIP_DEBUG
-#define PGSKIP_DEBUG(from,to) prom_printf("PG_skip %ld->%ld\n", (long)(from), (long)(to)); printk("PG_skip %ld->%ld\n", (long)(from), (long)(to))
-#else
-#define PGSKIP_DEBUG(from,to) do { } while (0)
-#endif
-
-void __init srmmu_frob_mem_map(unsigned long start_mem)
-{
- unsigned long bank_start, bank_end = 0;
- unsigned long addr;
- int i;
-
- /* First, mark all pages as invalid. */
- for(addr = PAGE_OFFSET; MAP_NR(addr) < max_mapnr; addr += PAGE_SIZE)
- mem_map[MAP_NR(addr)].flags |= (1<<PG_reserved);
-
- /* Next, pg[0-3] is sun4c cruft, so we can free it... */
- mem_map[MAP_NR(pg0)].flags &= ~(1<<PG_reserved);
- mem_map[MAP_NR(pg1)].flags &= ~(1<<PG_reserved);
- mem_map[MAP_NR(pg2)].flags &= ~(1<<PG_reserved);
- mem_map[MAP_NR(pg3)].flags &= ~(1<<PG_reserved);
-
- start_mem = PAGE_ALIGN(start_mem);
- for(i = 0; srmmu_map[i].size; i++) {
- bank_start = srmmu_map[i].vbase;
-
- /* Making a one or two pages PG_skip holes
- * is not necessary. We add one more because
- * we must set the PG_skip flag on the first
- * two mem_map[] entries for the hole. Go and
- * see the mm/filemap.c:shrink_mmap() loop for
- * details. -DaveM
- */
- if (i && bank_start - bank_end > 3 * PAGE_SIZE) {
- mem_map[MAP_NR(bank_end)].flags |= (1<<PG_skip);
- mem_map[MAP_NR(bank_end)].next_hash = mem_map + MAP_NR(bank_start);
- mem_map[MAP_NR(bank_end)+1UL].flags |= (1<<PG_skip);
- mem_map[MAP_NR(bank_end)+1UL].next_hash = mem_map + MAP_NR(bank_start);
- PGSKIP_DEBUG(MAP_NR(bank_end), MAP_NR(bank_start));
- if (bank_end > KERNBASE && bank_start < KERNBASE) {
- mem_map[0].flags |= (1<<PG_skip);
- mem_map[0].next_hash = mem_map + MAP_NR(bank_start);
- mem_map[1].flags |= (1<<PG_skip);
- mem_map[1].next_hash = mem_map + MAP_NR(bank_start);
- PGSKIP_DEBUG(0, MAP_NR(bank_start));
- }
- }
-
- bank_end = bank_start + srmmu_map[i].size;
- while(bank_start < bank_end) {
- set_bit(MAP_NR(bank_start) >> 8, sparc_valid_addr_bitmap);
- if((bank_start >= KERNBASE) &&
- (bank_start < start_mem)) {
- bank_start += PAGE_SIZE;
- continue;
- }
- mem_map[MAP_NR(bank_start)].flags &= ~(1<<PG_reserved);
- bank_start += PAGE_SIZE;
- }
-
- if (bank_end == 0xfd000000)
- bank_end = PAGE_OFFSET;
- }
-
- if (bank_end < KERNBASE) {
- mem_map[MAP_NR(bank_end)].flags |= (1<<PG_skip);
- mem_map[MAP_NR(bank_end)].next_hash = mem_map + MAP_NR(KERNBASE);
- mem_map[MAP_NR(bank_end)+1UL].flags |= (1<<PG_skip);
- mem_map[MAP_NR(bank_end)+1UL].next_hash = mem_map + MAP_NR(KERNBASE);
- PGSKIP_DEBUG(MAP_NR(bank_end), MAP_NR(KERNBASE));
- } else if (MAP_NR(bank_end) < max_mapnr) {
- mem_map[MAP_NR(bank_end)].flags |= (1<<PG_skip);
- mem_map[MAP_NR(bank_end)+1UL].flags |= (1<<PG_skip);
- if (mem_map[0].flags & (1 << PG_skip)) {
- mem_map[MAP_NR(bank_end)].next_hash = mem_map[0].next_hash;
- mem_map[MAP_NR(bank_end)+1UL].next_hash = mem_map[0].next_hash;
- PGSKIP_DEBUG(MAP_NR(bank_end), mem_map[0].next_hash - mem_map);
- } else {
- mem_map[MAP_NR(bank_end)].next_hash = mem_map;
- mem_map[MAP_NR(bank_end)+1UL].next_hash = mem_map;
- PGSKIP_DEBUG(MAP_NR(bank_end), 0);
- }
- }
-}
-
/* The very generic SRMMU page table operations. */
static inline int srmmu_device_memory(unsigned long x)
{
}
static unsigned long srmmu_pgd_page(pgd_t pgd)
-{ return srmmu_device_memory(pgd_val(pgd))?~0:srmmu_p2v((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); }
+{ return srmmu_device_memory(pgd_val(pgd))?~0:__va((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); }
static unsigned long srmmu_pmd_page(pmd_t pmd)
-{ return srmmu_device_memory(pmd_val(pmd))?~0:srmmu_p2v((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4); }
-
-static unsigned long srmmu_pte_page(pte_t pte)
-{ return srmmu_device_memory(pte_val(pte))?~0:srmmu_p2v((pte_val(pte) & SRMMU_PTE_PMASK) << 4); }
-
-static unsigned long srmmu_c_pgd_page(pgd_t pgd)
-{ return srmmu_device_memory(pgd_val(pgd))?~0:srmmu_c_p2v((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); }
-
-static unsigned long srmmu_c_pmd_page(pmd_t pmd)
-{ return srmmu_device_memory(pmd_val(pmd))?~0:srmmu_c_p2v((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4); }
-
-static unsigned long srmmu_c_pte_page(pte_t pte)
-{ return srmmu_device_memory(pte_val(pte))?~0:srmmu_c_p2v((pte_val(pte) & SRMMU_PTE_PMASK) << 4); }
+{ return srmmu_device_memory(pmd_val(pmd))?~0:__va((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4); }
-static unsigned long srmmu_s_pgd_page(pgd_t pgd)
-{ return srmmu_device_memory(pgd_val(pgd))?~0:srmmu_s_p2v((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); }
-
-static unsigned long srmmu_s_pmd_page(pmd_t pmd)
-{ return srmmu_device_memory(pmd_val(pmd))?~0:srmmu_s_p2v((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4); }
-
-static unsigned long srmmu_s_pte_page(pte_t pte)
-{ return srmmu_device_memory(pte_val(pte))?~0:srmmu_s_p2v((pte_val(pte) & SRMMU_PTE_PMASK) << 4); }
+static unsigned long srmmu_pte_pagenr(pte_t pte)
+{ return srmmu_device_memory(pte_val(pte))?~0:__va((pte_val(pte) & SRMMU_PTE_PMASK) << 4); }
static inline int srmmu_pte_none(pte_t pte)
{ return !(pte_val(pte) & 0xFFFFFFF); }
* and a page entry and page directory to the page they refer to.
*/
static pte_t srmmu_mk_pte(unsigned long page, pgprot_t pgprot)
-{ return __pte(((srmmu_v2p(page)) >> 4) | pgprot_val(pgprot)); }
-
-static pte_t srmmu_c_mk_pte(unsigned long page, pgprot_t pgprot)
-{ return __pte(((srmmu_c_v2p(page)) >> 4) | pgprot_val(pgprot)); }
-
-static pte_t srmmu_s_mk_pte(unsigned long page, pgprot_t pgprot)
-{ return __pte(((srmmu_s_v2p(page)) >> 4) | pgprot_val(pgprot)); }
+{ return __pte(((__pa(page)) >> 4) | pgprot_val(pgprot)); }
static pte_t srmmu_mk_pte_phys(unsigned long page, pgprot_t pgprot)
{ return __pte(((page) >> 4) | pgprot_val(pgprot)); }
static void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp)
{
- set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (srmmu_v2p((unsigned long) pgdp) >> 4)));
+ set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (__pa((unsigned long) pgdp) >> 4)));
}
static void srmmu_pgd_set(pgd_t * pgdp, pmd_t * pmdp)
{
- set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (srmmu_v2p((unsigned long) pmdp) >> 4)));
+ set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (__pa((unsigned long) pmdp) >> 4)));
}
static void srmmu_pmd_set(pmd_t * pmdp, pte_t * ptep)
{
- set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (srmmu_v2p((unsigned long) ptep) >> 4)));
-}
-
-static void srmmu_c_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp)
-{
- set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (srmmu_c_v2p((unsigned long) pgdp) >> 4)));
-}
-
-static void srmmu_c_pgd_set(pgd_t * pgdp, pmd_t * pmdp)
-{
- set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (srmmu_c_v2p((unsigned long) pmdp) >> 4)));
-}
-
-static void srmmu_c_pmd_set(pmd_t * pmdp, pte_t * ptep)
-{
- set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (srmmu_c_v2p((unsigned long) ptep) >> 4)));
-}
-
-static void srmmu_s_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp)
-{
- set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (srmmu_s_v2p((unsigned long) pgdp) >> 4)));
-}
-
-static void srmmu_s_pgd_set(pgd_t * pgdp, pmd_t * pmdp)
-{
- set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (srmmu_s_v2p((unsigned long) pmdp) >> 4)));
-}
-
-static void srmmu_s_pmd_set(pmd_t * pmdp, pte_t * ptep)
-{
- set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (srmmu_s_v2p((unsigned long) ptep) >> 4)));
+ set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (__pa((unsigned long) ptep) >> 4)));
}
static inline pte_t srmmu_pte_modify(pte_t pte, pgprot_t newprot)
return (pte_t *) srmmu_pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1));
}
-static inline pmd_t *srmmu_c_pmd_offset(pgd_t * dir, unsigned long address)
-{
- return (pmd_t *) srmmu_c_pgd_page(*dir) + ((address >> SRMMU_PMD_SHIFT) & (SRMMU_PTRS_PER_PMD - 1));
-}
-
-static inline pte_t *srmmu_c_pte_offset(pmd_t * dir, unsigned long address)
-{
- return (pte_t *) srmmu_c_pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1));
-}
-
-static inline pmd_t *srmmu_s_pmd_offset(pgd_t * dir, unsigned long address)
-{
- return (pmd_t *) srmmu_s_pgd_page(*dir) + ((address >> SRMMU_PMD_SHIFT) & (SRMMU_PTRS_PER_PMD - 1));
-}
-
-static inline pte_t *srmmu_s_pte_offset(pmd_t * dir, unsigned long address)
-{
- return (pte_t *) srmmu_s_pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1));
-}
-
static inline pte_t *srmmu_get_pte_fast(void)
{
struct page *ret;
ptep = pte_offset(pmdp, virt_addr);
/* No need to flush uncacheable page. */
- set_pte(ptep, mk_pte((unsigned long) EMPTY_PGE, PAGE_SHARED));
+ pte_clear(ptep);
flush_tlb_all();
}
free_pages((unsigned long)tsk, 1);
}
+static void srmmu_get_task_struct(struct task_struct *tsk)
+{
+ atomic_inc(&mem_map[MAP_NR(tsk)].count);
+}
+
/* tsunami.S */
extern void tsunami_flush_cache_all(void);
extern void tsunami_flush_cache_mm(struct mm_struct *mm);
extern void viking_flush_page(unsigned long page);
extern void viking_mxcc_flush_page(unsigned long page);
extern void viking_flush_chunk(unsigned long chunk);
-extern void viking_c_flush_chunk(unsigned long chunk);
-extern void viking_s_flush_chunk(unsigned long chunk);
extern void viking_mxcc_flush_chunk(unsigned long chunk);
extern void viking_flush_tlb_all(void);
extern void viking_flush_tlb_mm(struct mm_struct *mm);
static void hypersparc_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp)
{
- srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (srmmu_v2p((unsigned long) pgdp) >> 4))));
+ srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (__pa((unsigned long) pgdp) >> 4))));
hypersparc_flush_page_to_ram((unsigned long)ctxp);
hyper_flush_whole_icache();
}
alloc_context(old_mm, mm);
spin_unlock(&srmmu_context_spinlock);
ctxp = &srmmu_context_table[mm->context];
- srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (srmmu_v2p((unsigned long) mm->pgd) >> 4))));
+ srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (__pa((unsigned long) mm->pgd) >> 4))));
hypersparc_flush_page_to_ram((unsigned long)ctxp);
}
hyper_flush_whole_icache();
srmmu_set_context(mm->context);
}
-static unsigned long mempool;
-
/* NOTE: All of this startup code assumes the low 16mb (approx.) of
* kernel mappings are done with one single contiguous chunk of
* ram. On small ram machines (classics mainly) we only get
* around 8mb mapped for us.
*/
-static unsigned long kbpage;
-
-/* Some dirty hacks to abstract away the painful boot up init. */
-static inline unsigned long srmmu_early_paddr(unsigned long vaddr)
-{
- return ((vaddr - KERNBASE) + kbpage);
-}
-
-static inline void srmmu_early_pgd_set(pgd_t *pgdp, pmd_t *pmdp)
+void __init early_pgtable_allocfail(char *type)
{
- set_pte((pte_t *)pgdp, __pte((SRMMU_ET_PTD | (srmmu_early_paddr((unsigned long) pmdp) >> 4))));
-}
-
-static inline void srmmu_early_pmd_set(pmd_t *pmdp, pte_t *ptep)
-{
- set_pte((pte_t *)pmdp, __pte((SRMMU_ET_PTD | (srmmu_early_paddr((unsigned long) ptep) >> 4))));
-}
-
-static inline unsigned long srmmu_early_pgd_page(pgd_t pgd)
-{
- return (((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4) - kbpage) + KERNBASE;
-}
-
-static inline unsigned long srmmu_early_pmd_page(pmd_t pmd)
-{
- return (((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4) - kbpage) + KERNBASE;
-}
-
-static inline pmd_t *srmmu_early_pmd_offset(pgd_t *dir, unsigned long address)
-{
- return (pmd_t *) srmmu_early_pgd_page(*dir) + ((address >> SRMMU_PMD_SHIFT) & (SRMMU_PTRS_PER_PMD - 1));
-}
-
-static inline pte_t *srmmu_early_pte_offset(pmd_t *dir, unsigned long address)
-{
- return (pte_t *) srmmu_early_pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1));
+ prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type);
+ prom_halt();
}
static inline void srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long end)
while(start < end) {
pgdp = srmmu_pgd_offset(&init_mm, start);
if(srmmu_pgd_none(*pgdp)) {
- pmdp = sparc_init_alloc(&mempool, SRMMU_PMD_TABLE_SIZE);
- srmmu_early_pgd_set(pgdp, pmdp);
+ pmdp = __alloc_bootmem(SRMMU_PMD_TABLE_SIZE,
+ SRMMU_PMD_TABLE_SIZE, 0UL);
+ if (pmdp == NULL)
+ early_pgtable_allocfail("pmd");
+ memset(pmdp, 0, SRMMU_PMD_TABLE_SIZE);
+ srmmu_pgd_set(pgdp, pmdp);
}
- pmdp = srmmu_early_pmd_offset(pgdp, start);
+ pmdp = srmmu_pmd_offset(pgdp, start);
if(srmmu_pmd_none(*pmdp)) {
- ptep = sparc_init_alloc(&mempool, SRMMU_PTE_TABLE_SIZE);
- srmmu_early_pmd_set(pmdp, ptep);
+ ptep = __alloc_bootmem(SRMMU_PTE_TABLE_SIZE, SRMMU_PTE_TABLE_SIZE, 0UL);
+ if (ptep == NULL)
+ early_pgtable_allocfail("pte");
+ memset(ptep, 0, SRMMU_PTE_TABLE_SIZE);
+ srmmu_pmd_set(pmdp, ptep);
}
start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK;
}
continue;
}
if(srmmu_pgd_none(*pgdp)) {
- pmdp = sparc_init_alloc(&mempool, SRMMU_PMD_TABLE_SIZE);
- srmmu_early_pgd_set(pgdp, pmdp);
+ pmdp = __alloc_bootmem(SRMMU_PMD_TABLE_SIZE,
+ SRMMU_PMD_TABLE_SIZE, 0UL);
+ if (pmdp == NULL)
+ early_pgtable_allocfail("pmd");
+ memset(pmdp, 0, SRMMU_PMD_TABLE_SIZE);
+ srmmu_pgd_set(pgdp, pmdp);
}
- pmdp = srmmu_early_pmd_offset(pgdp, start);
+ pmdp = srmmu_pmd_offset(pgdp, start);
if(what == 1) {
*pmdp = __pmd(prompte);
start += SRMMU_PMD_SIZE;
continue;
}
if(srmmu_pmd_none(*pmdp)) {
- ptep = sparc_init_alloc(&mempool, SRMMU_PTE_TABLE_SIZE);
- srmmu_early_pmd_set(pmdp, ptep);
+ ptep = __alloc_bootmem(SRMMU_PTE_TABLE_SIZE, SRMMU_PTE_TABLE_SIZE, 0UL);
+ if (ptep == NULL)
+ early_pgtable_allocfail("pte");
+ memset(ptep, 0, SRMMU_PTE_TABLE_SIZE);
+ srmmu_pmd_set(pmdp, ptep);
}
- ptep = srmmu_early_pte_offset(pmdp, start);
+ ptep = srmmu_pte_offset(pmdp, start);
*ptep = __pte(prompte);
start += PAGE_SIZE;
}
}
-#ifdef DEBUG_MAP_KERNEL
-#define MKTRACE(foo) prom_printf foo
-#else
-#define MKTRACE(foo)
-#endif
-
-static int lots_of_ram __initdata = 0;
-static int srmmu_low_pa __initdata = 0;
static unsigned long end_of_phys_memory __initdata = 0;
-void __init srmmu_end_memory(unsigned long memory_size, unsigned long *end_mem_p)
-{
- unsigned int sum = 0;
- unsigned long last = 0xff000000;
- long first, cur;
- unsigned long pa;
- unsigned long total = 0;
- int i;
-
- pa = srmmu_hwprobe(KERNBASE + PAGE_SIZE);
- pa = (pa & SRMMU_PTE_PMASK) << 4;
- if (!sp_banks[0].base_addr && pa == PAGE_SIZE) {
- for(i = 0; sp_banks[i].num_bytes != 0; i++) {
- if (sp_banks[i].base_addr + sp_banks[i].num_bytes > 0x0d000000)
- break;
- }
- if (!sp_banks[i].num_bytes) {
- srmmu_low_pa = 1;
- end_of_phys_memory = SRMMU_PGDIR_ALIGN(sp_banks[i-1].base_addr + sp_banks[i-1].num_bytes);
- *end_mem_p = KERNBASE + end_of_phys_memory;
- if (sp_banks[0].num_bytes >= (6 * 1024 * 1024) || end_of_phys_memory <= 0x06000000) {
- /* Make sure there will be enough memory for the whole mem_map (even if sparse) */
- return;
- }
- }
- }
- for(i = 0; sp_banks[i].num_bytes != 0; i++) {
- pa = sp_banks[i].base_addr;
- first = (pa & (~SRMMU_PGDIR_MASK));
- cur = (sp_banks[i].num_bytes + first - SRMMU_PGDIR_SIZE);
- if (cur < 0) cur = 0;
- if (!first || last != (pa & SRMMU_PGDIR_MASK))
- total += SRMMU_PGDIR_SIZE;
- sum += sp_banks[i].num_bytes;
- if (memory_size) {
- if (sum > memory_size) {
- sp_banks[i].num_bytes -=
- (sum - memory_size);
- cur = (sp_banks[i].num_bytes + first - SRMMU_PGDIR_SIZE);
- if (cur < 0) cur = 0;
- total += SRMMU_PGDIR_ALIGN(cur);
- sum = memory_size;
- sp_banks[++i].base_addr = 0xdeadbeef;
- sp_banks[i].num_bytes = 0;
- break;
- }
- }
- total += SRMMU_PGDIR_ALIGN(cur);
- last = (sp_banks[i].base_addr + sp_banks[i].num_bytes - 1) & SRMMU_PGDIR_MASK;
- }
- if (total <= 0x0d000000)
- *end_mem_p = KERNBASE + total;
- else {
- *end_mem_p = 0xfd000000;
- lots_of_ram = 1;
- }
- end_of_phys_memory = total;
-}
-
#define KERNEL_PTE(page_shifted) ((page_shifted)|SRMMU_CACHE|SRMMU_PRIV|SRMMU_VALID)
/* Create a third-level SRMMU 16MB page mapping. */
pgd_t *pgdp = srmmu_pgd_offset(&init_mm, vaddr);
unsigned long big_pte;
- MKTRACE(("dlm[v<%08lx>-->p<%08lx>]", vaddr, phys_base));
big_pte = KERNEL_PTE(phys_base >> 4);
*pgdp = __pgd(big_pte);
}
-/* Look in the sp_bank for the given physical page, return the
- * index number the entry was found in, or -1 for not found.
- */
-static inline int find_in_spbanks(unsigned long phys_page)
-{
- int entry;
-
- for(entry = 0; sp_banks[entry].num_bytes; entry++) {
- unsigned long start = sp_banks[entry].base_addr;
- unsigned long end = start + sp_banks[entry].num_bytes;
-
- if((start <= phys_page) && (phys_page < end))
- return entry;
- }
- return -1;
-}
-
-/* Find an spbank entry not mapped as of yet, TAKEN_VECTOR is an
- * array of char's, each member indicating if that spbank is mapped
- * yet or not.
- */
-static int __init find_free_spbank(char *taken_vector)
-{
- int entry;
-
- for(entry = 0; sp_banks[entry].num_bytes; entry++)
- if(!taken_vector[entry])
- break;
- return entry;
-}
-
-static unsigned long map_spbank_last_pa __initdata = 0xff000000;
-
/* Map sp_bank entry SP_ENTRY, starting at virtual address VBASE.
*/
static unsigned long __init map_spbank(unsigned long vbase, int sp_entry)
unsigned long pstart = (sp_banks[sp_entry].base_addr & SRMMU_PGDIR_MASK);
unsigned long vstart = (vbase & SRMMU_PGDIR_MASK);
unsigned long vend = SRMMU_PGDIR_ALIGN(vbase + sp_banks[sp_entry].num_bytes);
- static int srmmu_bank = 0;
- MKTRACE(("map_spbank %d[v<%08lx>p<%08lx>s<%08lx>]", sp_entry, vbase, sp_banks[sp_entry].base_addr, sp_banks[sp_entry].num_bytes));
- MKTRACE(("map_spbank2 %d[p%08lx v%08lx-%08lx]", sp_entry, pstart, vstart, vend));
while(vstart < vend) {
do_large_mapping(vstart, pstart);
vstart += SRMMU_PGDIR_SIZE; pstart += SRMMU_PGDIR_SIZE;
}
- srmmu_map[srmmu_bank].vbase = vbase;
- srmmu_map[srmmu_bank].pbase = sp_banks[sp_entry].base_addr;
- srmmu_map[srmmu_bank].size = sp_banks[sp_entry].num_bytes;
- if (srmmu_map[srmmu_bank].size)
- srmmu_bank++;
- map_spbank_last_pa = pstart - SRMMU_PGDIR_SIZE;
return vstart;
}
*/
static inline void map_kernel(void)
{
- unsigned long raw_pte, physpage;
- unsigned long vaddr, low_base;
- char etaken[SPARC_PHYS_BANKS];
- int entry;
-
- /* Step 1: Clear out sp_banks taken map. */
- MKTRACE(("map_kernel: clearing etaken vector... "));
- for(entry = 0; entry < SPARC_PHYS_BANKS; entry++)
- etaken[entry] = 0;
-
- low_base = KERNBASE;
-
- /* Step 2: Fill in KERNBASE base pgd. Lots of sanity checking here. */
- raw_pte = srmmu_hwprobe(KERNBASE + PAGE_SIZE);
- if((raw_pte & SRMMU_ET_MASK) != SRMMU_ET_PTE)
- memprobe_error("Wheee, kernel not mapped at all by boot loader.\n");
- physpage = (raw_pte & SRMMU_PTE_PMASK) << 4;
- physpage -= PAGE_SIZE;
- if(physpage & ~(SRMMU_PGDIR_MASK))
- memprobe_error("Wheee, kernel not mapped on 16MB physical boundry.\n");
- entry = find_in_spbanks(physpage);
- if(entry == -1 || (sp_banks[entry].base_addr != physpage))
- memprobe_error("Kernel mapped in non-existant memory.\n");
- MKTRACE(("map_kernel: map_spbank(vbase=%08x, entry<%d>)[%08lx,%08lx]\n", KERNBASE, entry, sp_banks[entry].base_addr, sp_banks[entry].num_bytes));
- if (sp_banks[entry].num_bytes > 0x0d000000) {
- unsigned long orig_base = sp_banks[entry].base_addr;
- unsigned long orig_len = sp_banks[entry].num_bytes;
- unsigned long can_map = 0x0d000000;
-
- /* Map a partial bank in this case, adjust the base
- * and the length, but don't mark it used.
- */
- sp_banks[entry].num_bytes = can_map;
- MKTRACE(("wheee really big mapping [%08lx,%08lx]", orig_base, can_map));
- vaddr = map_spbank(KERNBASE, entry);
- MKTRACE(("vaddr now %08lx ", vaddr));
- sp_banks[entry].base_addr = orig_base + can_map;
- sp_banks[entry].num_bytes = orig_len - can_map;
- MKTRACE(("adjust[%08lx,%08lx]\n", (orig_base + can_map), (orig_len - can_map)));
- MKTRACE(("map_kernel: skipping first loop\n"));
- goto loop_skip;
- }
- vaddr = map_spbank(KERNBASE, entry);
- etaken[entry] = 1;
-
- /* Step 3: Map what we can above KERNBASE. */
- MKTRACE(("map_kernel: vaddr=%08lx, entering first loop\n", vaddr));
- for(;;) {
- unsigned long bank_size;
-
- MKTRACE(("map_kernel: ffsp()"));
- entry = find_free_spbank(&etaken[0]);
- bank_size = sp_banks[entry].num_bytes;
- MKTRACE(("<%d> base=%08lx bs=%08lx ", entry, sp_banks[entry].base_addr, bank_size));
- if(!bank_size)
- break;
- if (srmmu_low_pa)
- vaddr = KERNBASE + sp_banks[entry].base_addr;
- else if (sp_banks[entry].base_addr & (~SRMMU_PGDIR_MASK)) {
- if (map_spbank_last_pa == (sp_banks[entry].base_addr & SRMMU_PGDIR_MASK))
- vaddr -= SRMMU_PGDIR_SIZE;
- vaddr += (sp_banks[entry].base_addr & (~SRMMU_PGDIR_MASK));
- }
- if ((vaddr + bank_size - KERNBASE) > 0x0d000000) {
- unsigned long orig_base = sp_banks[entry].base_addr;
- unsigned long orig_len = sp_banks[entry].num_bytes;
- unsigned long can_map = (0xfd000000 - vaddr);
-
- /* Map a partial bank in this case, adjust the base
- * and the length, but don't mark it used.
- */
- sp_banks[entry].num_bytes = can_map;
- MKTRACE(("wheee really big mapping [%08lx,%08lx]", orig_base, can_map));
- vaddr = map_spbank(vaddr, entry);
- MKTRACE(("vaddr now %08lx ", vaddr));
- sp_banks[entry].base_addr = orig_base + can_map;
- sp_banks[entry].num_bytes = orig_len - can_map;
- MKTRACE(("adjust[%08lx,%08lx]\n", (orig_base + can_map), (orig_len - can_map)));
- break;
- }
-
- /* Ok, we can map this one, do it. */
- MKTRACE(("map_spbank(%08lx,entry<%d>) ", vaddr, entry));
- vaddr = map_spbank(vaddr, entry);
- etaken[entry] = 1;
- MKTRACE(("vaddr now %08lx\n", vaddr));
- }
- MKTRACE(("\n"));
- /* If not lots_of_ram, assume we did indeed map it all above. */
-loop_skip:
- if(!lots_of_ram)
- goto check_and_return;
-
- /* Step 4: Map the rest (if any) right below KERNBASE. */
- MKTRACE(("map_kernel: doing low mappings... "));
- low_base = (KERNBASE - end_of_phys_memory + 0x0d000000);
- MKTRACE(("end_of_phys_memory=%08lx low_base=%08lx\n", end_of_phys_memory, low_base));
-
- /* Ok, now map 'em. */
- MKTRACE(("map_kernel: Allocate pt skeleton (%08lx, %08x)\n",low_base,KERNBASE));
- srmmu_allocate_ptable_skeleton(low_base, KERNBASE);
- vaddr = low_base;
- map_spbank_last_pa = 0xff000000;
- MKTRACE(("map_kernel: vaddr=%08lx Entering second loop for low maps.\n", vaddr));
- for(;;) {
- unsigned long bank_size;
-
- entry = find_free_spbank(&etaken[0]);
- bank_size = sp_banks[entry].num_bytes;
- MKTRACE(("map_kernel: e<%d> base=%08lx bs=%08lx ", entry, sp_banks[entry].base_addr, bank_size));
- if(!bank_size)
- break;
- if (sp_banks[entry].base_addr & (~SRMMU_PGDIR_MASK)) {
- if (map_spbank_last_pa == (sp_banks[entry].base_addr & SRMMU_PGDIR_MASK))
- vaddr -= SRMMU_PGDIR_SIZE;
- vaddr += (sp_banks[entry].base_addr & (~SRMMU_PGDIR_MASK));
- }
- if((vaddr + bank_size) > KERNBASE)
- memprobe_error("Wheee, kernel low mapping overflow.\n");
- MKTRACE(("map_spbank(%08lx, %d) ", vaddr, entry));
- vaddr = map_spbank(vaddr, entry);
- etaken[entry] = 1;
- MKTRACE(("Now, vaddr=%08lx end_of_phys_memory=%08lx\n", vaddr, end_of_phys_memory));
- }
- MKTRACE(("\n"));
-
-check_and_return:
- /* Step 5: Sanity check, make sure we did it all. */
- MKTRACE(("check_and_return: "));
- for(entry = 0; sp_banks[entry].num_bytes; entry++) {
- MKTRACE(("e[%d]=%d ", entry, etaken[entry]));
- if(!etaken[entry]) {
- MKTRACE(("oops\n"));
- memprobe_error("Some bank did not get mapped.\n");
- }
- }
- MKTRACE(("success\n"));
- init_mm.mmap->vm_start = page_offset = low_base;
- stack_top = page_offset - PAGE_SIZE;
- BTFIXUPSET_SETHI(page_offset, low_base);
- BTFIXUPSET_SETHI(stack_top, page_offset - PAGE_SIZE);
- BTFIXUPSET_SIMM13(user_ptrs_per_pgd, page_offset / SRMMU_PGDIR_SIZE);
-
-#if 1
- for(entry = 0; srmmu_map[entry].size; entry++) {
- printk("[%d]: v[%08lx,%08lx](%lx) p[%08lx]\n", entry,
- srmmu_map[entry].vbase,
- srmmu_map[entry].vbase + srmmu_map[entry].size,
- srmmu_map[entry].size,
- srmmu_map[entry].pbase);
- }
-#endif
+ int i;
- /* Now setup the p2v/v2p hash tables. */
- for(entry = 0; entry < SRMMU_HASHSZ; entry++)
- srmmu_v2p_hash[entry] = ((0xff - entry) << 24);
- for(entry = 0; entry < SRMMU_HASHSZ; entry++)
- srmmu_p2v_hash[entry] = 0xffffffffUL;
- for(entry = 0; srmmu_map[entry].size; entry++) {
- unsigned long addr;
-
- for(addr = srmmu_map[entry].vbase;
- addr < (srmmu_map[entry].vbase + srmmu_map[entry].size);
- addr += (1 << 24))
- srmmu_v2p_hash[srmmu_ahashfn(addr)] =
- srmmu_map[entry].pbase - srmmu_map[entry].vbase;
- for(addr = srmmu_map[entry].pbase;
- addr < (srmmu_map[entry].pbase + srmmu_map[entry].size);
- addr += (1 << 24))
- srmmu_p2v_hash[srmmu_ahashfn(addr)] =
- srmmu_map[entry].pbase - srmmu_map[entry].vbase;
+ for (i = 0; sp_banks[i].num_bytes != 0; i++) {
+ map_spbank(sp_banks[i].base_addr + PAGE_OFFSET, i);
}
- BTFIXUPSET_SETHI(page_contig_offset, page_offset - (0xfd000000 - KERNBASE));
- if (srmmu_low_pa)
- phys_mem_contig = 0;
- else {
- phys_mem_contig = 1;
- for(entry = 0; srmmu_map[entry].size; entry++)
- if (srmmu_map[entry].pbase != srmmu_c_v2p (srmmu_map[entry].vbase)) {
- phys_mem_contig = 0;
- break;
- }
- }
- if (phys_mem_contig) {
- printk ("SRMMU: Physical memory is contiguous, bypassing VA<->PA hashes.\n");
- BTFIXUPSET_CALL(pte_page, srmmu_c_pte_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_page, srmmu_c_pmd_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pgd_page, srmmu_c_pgd_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mk_pte, srmmu_c_mk_pte, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pte_offset, srmmu_c_pte_offset, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_offset, srmmu_c_pmd_offset, BTFIXUPCALL_NORM);
- if (BTFIXUPVAL_CALL(ctxd_set) == (unsigned long)srmmu_ctxd_set)
- BTFIXUPSET_CALL(ctxd_set, srmmu_c_ctxd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pgd_set, srmmu_c_pgd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_set, srmmu_c_pmd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_v2p, srmmu_c_v2p, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_p2v, srmmu_c_p2v, BTFIXUPCALL_NORM);
- if (BTFIXUPVAL_CALL(flush_chunk) == (unsigned long)viking_flush_chunk)
- BTFIXUPSET_CALL(flush_chunk, viking_c_flush_chunk, BTFIXUPCALL_NORM);
- } else if (srmmu_low_pa) {
- printk ("SRMMU: Compact physical memory. Using strightforward VA<->PA translations.\n");
- BTFIXUPSET_CALL(pte_page, srmmu_s_pte_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_page, srmmu_s_pmd_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pgd_page, srmmu_s_pgd_page, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mk_pte, srmmu_s_mk_pte, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pte_offset, srmmu_s_pte_offset, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_offset, srmmu_s_pmd_offset, BTFIXUPCALL_NORM);
- if (BTFIXUPVAL_CALL(ctxd_set) == (unsigned long)srmmu_ctxd_set)
- BTFIXUPSET_CALL(ctxd_set, srmmu_s_ctxd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pgd_set, srmmu_s_pgd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pmd_set, srmmu_s_pmd_set, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_v2p, srmmu_s_v2p, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_p2v, srmmu_s_p2v, BTFIXUPCALL_NORM);
- if (BTFIXUPVAL_CALL(flush_chunk) == (unsigned long)viking_flush_chunk)
- BTFIXUPSET_CALL(flush_chunk, viking_s_flush_chunk, BTFIXUPCALL_NORM);
- }
- btfixup();
+ init_mm.mmap->vm_start = PAGE_OFFSET;
+ BTFIXUPSET_SIMM13(user_ptrs_per_pgd, PAGE_OFFSET / SRMMU_PGDIR_SIZE);
return; /* SUCCESS! */
}
/* Paging initialization on the Sparc Reference MMU. */
-extern unsigned long free_area_init(unsigned long, unsigned long);
-extern unsigned long sparc_context_init(unsigned long, int);
+extern void sparc_context_init(int);
-extern int physmem_mapped_contig;
extern int linux_num_cpus;
void (*poke_srmmu)(void) __initdata = NULL;
-unsigned long __init srmmu_paging_init(unsigned long start_mem, unsigned long end_mem)
+extern unsigned long bootmem_init(void);
+extern void sun_serial_setup(void);
+
+void __init srmmu_paging_init(void)
{
- unsigned long ptables_start;
int i, cpunode;
char node_str[128];
+ unsigned long end_pfn;
sparc_iomap.start = 0xfd000000; /* 16MB of IOSPACE on all sun4m's. */
- physmem_mapped_contig = 0; /* for init.c:taint_real_pages() */
if (sparc_cpu_model == sun4d)
num_contexts = 65536; /* We know it is Viking */
prom_halt();
}
- ptables_start = mempool = PAGE_ALIGN(start_mem);
memset(swapper_pg_dir, 0, PAGE_SIZE);
- kbpage = srmmu_hwprobe(KERNBASE + PAGE_SIZE);
- kbpage = (kbpage & SRMMU_PTE_PMASK) << 4;
- kbpage -= PAGE_SIZE;
- srmmu_allocate_ptable_skeleton(KERNBASE, end_mem);
+ last_valid_pfn = end_pfn = bootmem_init();
+
+ srmmu_allocate_ptable_skeleton(KERNBASE, end_of_phys_memory + PAGE_OFFSET);
#if CONFIG_SUN_IO
srmmu_allocate_ptable_skeleton(sparc_iomap.start, IOBASE_END);
srmmu_allocate_ptable_skeleton(DVMA_VADDR, DVMA_END);
#endif
- mempool = PAGE_ALIGN(mempool);
+ /* This does not logically belong here, but we need to
+ * call it at the moment we are able to use the bootmem
+ * allocator.
+ */
+ sun_serial_setup();
+
srmmu_inherit_prom_mappings(0xfe400000,(LINUX_OPPROM_ENDVM-PAGE_SIZE));
map_kernel();
- srmmu_context_table = sparc_init_alloc(&mempool, num_contexts*sizeof(ctxd_t));
- srmmu_ctx_table_phys = (ctxd_t *) srmmu_v2p((unsigned long) srmmu_context_table);
+ srmmu_context_table = __alloc_bootmem(num_contexts*sizeof(ctxd_t), SMP_CACHE_BYTES, 0UL);
+ srmmu_ctx_table_phys = (ctxd_t *) __pa((unsigned long) srmmu_context_table);
for(i = 0; i < num_contexts; i++)
ctxd_set(&srmmu_context_table[i], swapper_pg_dir);
- start_mem = PAGE_ALIGN(mempool);
-
flush_cache_all();
if(BTFIXUPVAL_CALL(flush_page_for_dma) == (unsigned long)viking_flush_page) {
- unsigned long start = ptables_start;
- unsigned long end = start_mem;
+ unsigned long start = (unsigned long)srmmu_context_table;
+ unsigned long end = PAGE_ALIGN((unsigned long)srmmu_context_table + num_contexts*sizeof(ctxd_t));
while(start < end) {
viking_flush_page(start);
flush_tlb_all();
poke_srmmu();
- start_mem = sparc_context_init(start_mem, num_contexts);
- start_mem = free_area_init(start_mem, end_mem);
+ sparc_context_init(num_contexts);
+
+ {
+ unsigned int zones_size[MAX_NR_ZONES] = { 0, 0, 0};
+
+ zones_size[ZONE_DMA] = end_pfn;
+ free_area_init(zones_size);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
/* If initial ramdisk was specified with physical address,
translate it here, as the p2v translation in srmmu
is not straightforward. */
if (initrd_start && initrd_start < KERNBASE) {
- initrd_start = srmmu_p2v(initrd_start);
- initrd_end = srmmu_p2v(initrd_end);
+ initrd_start = __va(initrd_start);
+ initrd_end = __va(initrd_end);
if (initrd_end <= initrd_start)
initrd_start = 0;
}
#endif
- return PAGE_ALIGN(start_mem);
}
static int srmmu_mmu_info(char *buf)
flush_cache_mm(mm);
ctxp = &srmmu_context_table[mm->context];
- srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (srmmu_v2p((unsigned long) swapper_pg_dir) >> 4))));
+ srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (__pa((unsigned long) swapper_pg_dir) >> 4))));
hypersparc_flush_page_to_ram((unsigned long)ctxp);
flush_tlb_mm(mm);
BTFIXUPSET_CALL(set_pte, srmmu_set_pte_cacheable, BTFIXUPCALL_SWAPO0O1);
BTFIXUPSET_CALL(switch_mm, srmmu_switch_mm, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(pte_page, srmmu_pte_page, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(pte_pagenr, srmmu_pte_pagenr, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(pgd_page, srmmu_pgd_page, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_v2p, srmmu_v2p, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(mmu_p2v, srmmu_p2v, BTFIXUPCALL_NORM);
/* Task struct and kernel stack allocating/freeing. */
BTFIXUPSET_CALL(alloc_task_struct, srmmu_alloc_task_struct, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(free_task_struct, srmmu_free_task_struct, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(get_task_struct, srmmu_get_task_struct, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(quick_kernel_fault, srmmu_quick_kernel_fault, BTFIXUPCALL_NORM);
-/* $Id: sun4c.c,v 1.183 2000/01/08 16:38:20 anton Exp $
+/* $Id: sun4c.c,v 1.184 2000/01/09 09:13:34 anton Exp $
* sun4c.c: Doing in software what should be done in hardware.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
unsigned long pages = BUCKET_PTE_PAGE(sun4c_get_pte(tsaddr));
int entry = BUCKET_NUM(tsaddr);
- /* We are deleting a mapping, so the flush here is mandatory. */
- sun4c_flush_page_hw(tsaddr);
+ if (atomic_dec_and_test(&(tsk)->thread.refcount)) {
+ /* We are deleting a mapping, so the flush here is mandatory. */
+ sun4c_flush_page_hw(tsaddr);
#ifndef CONFIG_SUN4
- sun4c_flush_page_hw(tsaddr + PAGE_SIZE);
+ sun4c_flush_page_hw(tsaddr + PAGE_SIZE);
#endif
- sun4c_put_pte(tsaddr, 0);
+ sun4c_put_pte(tsaddr, 0);
#ifndef CONFIG_SUN4
- sun4c_put_pte(tsaddr + PAGE_SIZE, 0);
+ sun4c_put_pte(tsaddr + PAGE_SIZE, 0);
#endif
- sun4c_bucket[entry] = BUCKET_EMPTY;
- if (entry < sun4c_lowbucket_avail)
- sun4c_lowbucket_avail = entry;
+ sun4c_bucket[entry] = BUCKET_EMPTY;
+ if (entry < sun4c_lowbucket_avail)
+ sun4c_lowbucket_avail = entry;
- free_pages(pages, TASK_STRUCT_ORDER);
- garbage_collect(entry);
+ free_pages(pages, TASK_STRUCT_ORDER);
+ garbage_collect(entry);
+ }
}
static void sun4c_free_task_struct_sw(struct task_struct *tsk)
unsigned long pages = BUCKET_PTE_PAGE(sun4c_get_pte(tsaddr));
int entry = BUCKET_NUM(tsaddr);
- /* We are deleting a mapping, so the flush here is mandatory. */
- sun4c_flush_page_sw(tsaddr);
+ if (atomic_dec_and_test(&(tsk)->thread.refcount)) {
+ /* We are deleting a mapping, so the flush here is mandatory. */
+ sun4c_flush_page_sw(tsaddr);
#ifndef CONFIG_SUN4
- sun4c_flush_page_sw(tsaddr + PAGE_SIZE);
+ sun4c_flush_page_sw(tsaddr + PAGE_SIZE);
#endif
- sun4c_put_pte(tsaddr, 0);
+ sun4c_put_pte(tsaddr, 0);
#ifndef CONFIG_SUN4
- sun4c_put_pte(tsaddr + PAGE_SIZE, 0);
+ sun4c_put_pte(tsaddr + PAGE_SIZE, 0);
#endif
- sun4c_bucket[entry] = BUCKET_EMPTY;
- if (entry < sun4c_lowbucket_avail)
- sun4c_lowbucket_avail = entry;
+ sun4c_bucket[entry] = BUCKET_EMPTY;
+ if (entry < sun4c_lowbucket_avail)
+ sun4c_lowbucket_avail = entry;
- free_pages(pages, TASK_STRUCT_ORDER);
- garbage_collect(entry);
+ free_pages(pages, TASK_STRUCT_ORDER);
+ garbage_collect(entry);
+ }
+}
+
+static void sun4c_get_task_struct(struct task_struct *tsk)
+{
+ atomic_inc(&(tsk)->thread.refcount);
}
static void __init sun4c_init_buckets(void)
/* Task struct and kernel stack allocating/freeing. */
BTFIXUPSET_CALL(alloc_task_struct, sun4c_alloc_task_struct, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(get_task_struct, sun4c_get_task_struct, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(quick_kernel_fault, sun4c_quick_kernel_fault, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mmu_info, sun4c_mmu_info, BTFIXUPCALL_NORM);
-/* $Id: entry.S,v 1.110 1999/11/19 05:52:50 davem Exp $
+/* $Id: entry.S,v 1.111 2000/01/11 17:33:29 jj Exp $
* arch/sparc64/kernel/entry.S: Sparc64 trap low-level entry points.
*
* Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu)
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl sunos_getuid
sunos_getuid:
- call sys_geteuid
+ call sys_geteuid16
nop
- call sys_getuid
+ call sys_getuid16
stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I1]
b,pt %xcc, ret_sys_call
stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I0]
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl sunos_getgid
sunos_getgid:
- call sys_getegid
+ call sys_getegid16
nop
- call sys_getgid
+ call sys_getgid16
stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I1]
b,pt %xcc, ret_sys_call
stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I0]
-/* $Id: ioctl32.c,v 1.72 2000/01/04 15:43:45 davem Exp $
+/* $Id: ioctl32.c,v 1.73 2000/01/11 01:06:47 davem Exp $
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
err |= __put_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
err |= __put_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
err |= __put_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
+ if (err)
+ err = -EFAULT;
break;
}
}
err = copy_to_user ((struct hd_geometry32 *)arg, &geo, 4);
err |= __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start));
}
- return err;
+ return err ? -EFAULT : 0;
}
struct fbcmap32 {
ret |= copy_to_user ((char *)A(g), green, f.count);
ret |= copy_to_user ((char *)A(b), blue, f.count);
}
- return ret;
+ return ret ? -EFAULT : 0;
}
struct fbcursor32 {
err |= __get_user(green, &((struct fb_cmap32 *)arg)->green);
err |= __get_user(blue, &((struct fb_cmap32 *)arg)->blue);
err |= __get_user(transp, &((struct fb_cmap32 *)arg)->transp);
- if (err)
+ if (err) {
+ err = -EFAULT;
goto out;
+ }
err = -ENOMEM;
cmap.red = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
if (!cmap.red)
err |= __copy_from_user(cmap.green, (char *)A(green), cmap.len * sizeof(__u16));
err |= __copy_from_user(cmap.blue, (char *)A(blue), cmap.len * sizeof(__u16));
if (cmap.transp) err |= __copy_from_user(cmap.transp, (char *)A(transp), cmap.len * sizeof(__u16));
- if (err)
+ if (err) {
+ err = -EFAULT;
goto out;
+ }
break;
default:
do {
case FBIOPUTCMAP:
break;
}
+ if (err)
+ err = -EFAULT;
+
out: if (cmap.red) kfree(cmap.red);
if (cmap.green) kfree(cmap.green);
if (cmap.blue) kfree(cmap.blue);
err |= __get_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
err |= __get_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
err |= __get_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
- if (err)
+ if (err) {
+ err = -EFAULT;
goto out;
+ }
break;
}
case FDSETDRVPRM32:
err |= __copy_from_user(f->autodetect, ((struct floppy_drive_params32 *)arg)->autodetect, sizeof(f->autodetect));
err |= __get_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
err |= __get_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
- if (err)
+ if (err) {
+ err = -EFAULT;
goto out;
+ }
break;
}
case FDGETDRVSTAT32:
default:
break;
}
+ if (err)
+ err = -EFAULT;
+
out: if (karg) kfree(karg);
return err;
}
return err;
switch (cmd) {
case MTIOCPOS32:
- if (__put_user(pos.mt_blkno, &((struct mtpos32 *)arg)->mt_blkno))
- return -EFAULT;
+ err = __put_user(pos.mt_blkno, &((struct mtpos32 *)arg)->mt_blkno);
break;
case MTIOCGET32:
err = __put_user(get.mt_type, &((struct mtget32 *)arg)->mt_type);
case MTIOCSETCONFIG32:
break;
}
- return err;
+ return err ? -EFAULT: 0;
}
struct cdrom_read32 {
__kernel_caddr_t32 buf;
};
+struct cdrom_generic_command32 {
+ unsigned char cmd[CDROM_PACKET_SIZE];
+ __kernel_caddr_t32 buffer;
+ unsigned int buflen;
+ int stat;
+ __kernel_caddr_t32 sense;
+ __kernel_caddr_t32 reserved[3];
+};
+
static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
{
mm_segment_t old_fs = get_fs();
struct cdrom_read cdread;
struct cdrom_read_audio cdreadaudio;
+ struct cdrom_generic_command cgc;
__kernel_caddr_t32 addr;
char *data = 0;
void *karg;
return -ENOMEM;
cdreadaudio.buf = data;
break;
+ case CDROM_SEND_PACKET:
+ karg = &cgc;
+ err = copy_from_user(cgc.cmd, &((struct cdrom_generic_command32 *)arg)->cmd, sizeof(cgc.cmd));
+ err |= __get_user(addr, &((struct cdrom_generic_command32 *)arg)->buffer);
+ err |= __get_user(cgc.buflen, &((struct cdrom_generic_command32 *)arg)->buflen);
+ if (err)
+ return -EFAULT;
+ if ((data = kmalloc(cgc.buflen, GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+ cgc.buffer = data;
+ break;
default:
do {
static int count = 0;
case CDROMREADAUDIO:
err = copy_to_user((char *)A(addr), data, cdreadaudio.nframes * 2352);
break;
+ case CDROM_SEND_PACKET:
+ err = copy_to_user((char *)A(addr), data, cgc.buflen);
+ break;
default:
break;
}
-out: if (data) kfree(data);
- return err;
+out: if (data)
+ kfree(data);
+ return err ? -EFAULT : 0;
}
struct loop_info32 {
}
break;
}
- return err;
+ return err ? -EFAULT : 0;
}
extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
case CDROMREADCOOKED:
case CDROMREADAUDIO:
case CDROMREADALL:
+ case CDROM_SEND_PACKET:
error = cdrom_ioctl_trans(fd, cmd, arg);
goto out;
-/* $Id: pci.c,v 1.13 2000/01/06 23:51:49 davem Exp $
+/* $Id: pci.c,v 1.14 2000/01/13 00:05:43 davem Exp $
* pci.c: UltraSparc PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
return -ENOSYS; /* :-)... actually implement this soon */
}
+int pcibios_enable_device(struct pci_dev *pdev)
+{
+ return 0;
+}
+
char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "onboardfirst")) {
-/* $Id: pci_psycho.c,v 1.7 1999/12/17 12:31:57 jj Exp $
+/* $Id: pci_psycho.c,v 1.9 2000/01/11 23:38:32 davem Exp $
* pci_psycho.c: PSYCHO/U2P specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
p->iommu.page_table = (iopte_t *)tsbbase;
p->iommu.page_table_sz_bits = 17;
p->iommu.page_table_map_base = 0xc0000000;
+#ifndef NEW_PCI_DMA_MAP
+ memset((char *)tsbbase, 0, PAGE_SIZE << 5);
+#else
+ memset((char *)tsbbase, 0, PAGE_SIZE << 7);
+#endif
#ifndef NEW_PCI_DMA_MAP
iopte = (iopte_t *)tsbbase;
-/* $Id: pci_sabre.c,v 1.8 2000/01/06 23:51:49 davem Exp $
+/* $Id: pci_sabre.c,v 1.10 2000/01/11 23:38:35 davem Exp $
* pci_sabre.c: Sabre specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
}
p->iommu.page_table = (iopte_t *)tsbbase;
p->iommu.page_table_map_base = dvma_offset;
+ memset((char *)tsbbase, 0, PAGE_SIZE << order);
#ifndef NEW_PCI_DMA_MAP
iopte = (iopte_t *)tsbbase;
-/* $Id: sys32.S,v 1.9 1999/12/21 14:09:18 jj Exp $
+/* $Id: sys32.S,v 1.11 2000/01/11 17:33:29 jj Exp $
* sys32.S: I-cache tricks for 32-bit compatability layer simple
* conversions.
*
.align 32
.globl sys32_lseek
- .globl sys32_chmod, sys32_chown, sys32_lchown, sys32_mknod
+ .globl sys32_chmod, sys32_mknod
sys32_lseek:
sra %o1, 0, %o1
sethi %hi(sys_lseek), %g1
orcc %g2, %lo(0xffff), %g2
jmpl %g1 + %lo(sys_chmod), %g0
and %o1, %g2, %o1
-sys32_chown:
- sethi %hi(0xffff), %g2
- sethi %hi(sys_chown), %g1
- orcc %g2, %lo(0xffff), %g2
- and %o1, %g2, %o1
- jmpl %g1 + %lo(sys_chown), %g0
- and %o2, %g2, %o2
-sys32_lchown:
- sethi %hi(0xffff), %g2
- sethi %hi(sys_lchown), %g1
- orcc %g2, %lo(0xffff), %g2
- and %o1, %g2, %o1
- jmpl %g1 + %lo(sys_lchown), %g0
- and %o2, %g2, %o2
sys32_mknod:
sethi %hi(0xffff), %g2
sethi %hi(sys_mknod), %g1
-/* $Id: sys_sparc.c,v 1.32 2000/01/05 01:00:40 davem Exp $
+/* $Id: sys_sparc.c,v 1.33 2000/01/11 17:33:25 jj Exp $
* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/malloc.h>
+#include <linux/ipc.h>
#include <asm/uaccess.h>
#include <asm/ipc.h>
err = -EFAULT;
if(get_user(fourth.__pad, (void **)ptr))
goto out;
- err = sys_semctl (first, second, (int)third, fourth);
+ err = sys_semctl (first, second | IPC_64, (int)third, fourth);
goto out;
}
default:
err = sys_msgget ((key_t) first, second);
goto out;
case MSGCTL:
- err = sys_msgctl (first, second, (struct msqid_ds *) ptr);
+ err = sys_msgctl (first, second | IPC_64, (struct msqid_ds *) ptr);
goto out;
default:
err = -EINVAL;
err = sys_shmget (first, second, (int)third);
goto out;
case SHMCTL:
- err = sys_shmctl (first, second, (struct shmid_ds *) ptr);
+ err = sys_shmctl (first, second | IPC_64, (struct shmid_ds *) ptr);
goto out;
default:
err = -EINVAL;
-/* $Id: sys_sparc32.c,v 1.127 2000/01/04 23:54:41 davem Exp $
+/* $Id: sys_sparc32.c,v 1.128 2000/01/11 17:33:25 jj Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
#include <linux/stat.h>
#include <linux/filter.h>
#include <linux/highmem.h>
+#include <linux/highuid.h>
#include <asm/types.h>
#include <asm/ipc.h>
unsigned short sem_nsems; /* no. of semaphores in array */
};
+struct semid64_ds32 {
+ struct ipc64_perm sem_perm; /* this structure is the same on sparc32 and sparc64 */
+ unsigned int __pad1;
+ __kernel_time_t32 sem_otime;
+ unsigned int __pad2;
+ __kernel_time_t32 sem_ctime;
+ u32 sem_nsems;
+ u32 __unused1;
+ u32 __unused2;
+};
+
struct msqid_ds32
{
struct ipc_perm32 msg_perm;
__kernel_ipc_pid_t32 msg_lrpid;
};
+struct msqid64_ds32 {
+ struct ipc64_perm msg_perm;
+ unsigned int __pad1;
+ __kernel_time_t32 msg_stime;
+ unsigned int __pad2;
+ __kernel_time_t32 msg_rtime;
+ unsigned int __pad3;
+ __kernel_time_t32 msg_ctime;
+ unsigned int msg_cbytes;
+ unsigned int msg_qnum;
+ unsigned int msg_qbytes;
+ __kernel_pid_t32 msg_lspid;
+ __kernel_pid_t32 msg_lrpid;
+ unsigned int __unused1;
+ unsigned int __unused2;
+};
+
+
struct shmid_ds32 {
- struct ipc_perm32 shm_perm;
- int shm_segsz;
- __kernel_time_t32 shm_atime;
- __kernel_time_t32 shm_dtime;
- __kernel_time_t32 shm_ctime;
- __kernel_ipc_pid_t32 shm_cpid;
- __kernel_ipc_pid_t32 shm_lpid;
- unsigned short shm_nattch;
+ struct ipc_perm32 shm_perm;
+ int shm_segsz;
+ __kernel_time_t32 shm_atime;
+ __kernel_time_t32 shm_dtime;
+ __kernel_time_t32 shm_ctime;
+ __kernel_ipc_pid_t32 shm_cpid;
+ __kernel_ipc_pid_t32 shm_lpid;
+ unsigned short shm_nattch;
};
+
+struct shmid64_ds32 {
+ struct ipc64_perm shm_perm;
+ unsigned int __pad1;
+ __kernel_time_t32 shm_atime;
+ unsigned int __pad2;
+ __kernel_time_t32 shm_dtime;
+ unsigned int __pad3;
+ __kernel_time_t32 shm_ctime;
+ __kernel_size_t32 shm_segsz;
+ __kernel_pid_t32 shm_cpid;
+ __kernel_pid_t32 shm_lpid;
+ unsigned int shm_nattch;
+ unsigned int __unused1;
+ unsigned int __unused2;
+};
+
/*
* sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit emulation..
IPCOP_MASK (GETPID) | IPCOP_MASK (GETNCNT) | IPCOP_MASK (GETZCNT) |
IPCOP_MASK (GETALL) | IPCOP_MASK (SETALL) | IPCOP_MASK (IPC_RMID))) {
err = sys_semctl (first, second, third, fourth);
+ } else if (third & IPC_64) {
+ struct semid64_ds s;
+ struct semid64_ds32 *usp = (struct semid64_ds32 *)A(pad);
+ mm_segment_t old_fs;
+ int need_back_translation;
+
+ if (third == (IPC_SET|IPC_64)) {
+ err = get_user (s.sem_perm.uid, &usp->sem_perm.uid);
+ err |= __get_user (s.sem_perm.gid, &usp->sem_perm.gid);
+ err |= __get_user (s.sem_perm.mode, &usp->sem_perm.mode);
+ if (err)
+ goto out;
+ fourth.__pad = &s;
+ }
+ need_back_translation =
+ (IPCOP_MASK (third) &
+ (IPCOP_MASK (SEM_STAT) | IPCOP_MASK (IPC_STAT))) != 0;
+ if (need_back_translation)
+ fourth.__pad = &s;
+ old_fs = get_fs ();
+ set_fs (KERNEL_DS);
+ err = sys_semctl (first, second, third, fourth);
+ set_fs (old_fs);
+ if (need_back_translation) {
+ int err2 = copy_to_user (&usp->sem_perm, &s.sem_perm, sizeof(struct ipc64_perm) + 2*sizeof(time_t));
+ err2 |= __put_user (s.sem_nsems, &usp->sem_nsems);
+ if (err2) err = -EFAULT;
+ }
} else {
struct semid_ds s;
struct semid_ds32 *usp = (struct semid_ds32 *)A(pad);
set_fs (old_fs);
if (need_back_translation) {
int err2 = put_user (s.sem_perm.key, &usp->sem_perm.key);
- err2 |= __put_user (s.sem_perm.uid, &usp->sem_perm.uid);
- err2 |= __put_user (s.sem_perm.gid, &usp->sem_perm.gid);
- err2 |= __put_user (s.sem_perm.cuid, &usp->sem_perm.cuid);
- err2 |= __put_user (s.sem_perm.cgid, &usp->sem_perm.cgid);
+ err2 |= __put_user (high2lowuid(s.sem_perm.uid), &usp->sem_perm.uid);
+ err2 |= __put_user (high2lowgid(s.sem_perm.gid), &usp->sem_perm.gid);
+ err2 |= __put_user (high2lowuid(s.sem_perm.cuid), &usp->sem_perm.cuid);
+ err2 |= __put_user (high2lowgid(s.sem_perm.cgid), &usp->sem_perm.cgid);
err2 |= __put_user (s.sem_perm.mode, &usp->sem_perm.mode);
err2 |= __put_user (s.sem_perm.seq, &usp->sem_perm.seq);
err2 |= __put_user (s.sem_otime, &usp->sem_otime);
(IPCOP_MASK (IPC_INFO) | IPCOP_MASK (MSG_INFO) |
IPCOP_MASK (IPC_RMID))) {
err = sys_msgctl (first, second, (struct msqid_ds *)uptr);
+ } else if (second & IPC_64) {
+ struct msqid64_ds m;
+ struct msqid64_ds32 *up = (struct msqid64_ds32 *)uptr;
+ mm_segment_t old_fs;
+
+ if (second == (IPC_SET|IPC_64)) {
+ err = get_user (m.msg_perm.uid, &up->msg_perm.uid);
+ err |= __get_user (m.msg_perm.gid, &up->msg_perm.gid);
+ err |= __get_user (m.msg_perm.mode, &up->msg_perm.mode);
+ err |= __get_user (m.msg_qbytes, &up->msg_qbytes);
+ if (err)
+ goto out;
+ }
+ old_fs = get_fs ();
+ set_fs (KERNEL_DS);
+ err = sys_msgctl (first, second, (struct msqid_ds *)&m);
+ set_fs (old_fs);
+ if (IPCOP_MASK (second) &
+ (IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) {
+ int err2 = copy_to_user(&up->msg_perm, &m.msg_perm, sizeof(struct ipc64_perm) + 3*sizeof(time_t));
+ err2 |= __put_user (m.msg_cbytes, &up->msg_cbytes);
+ err2 |= __put_user (m.msg_qnum, &up->msg_qnum);
+ err2 |= __put_user (m.msg_qbytes, &up->msg_qbytes);
+ err2 |= __put_user (m.msg_lspid, &up->msg_lspid);
+ err2 |= __put_user (m.msg_lrpid, &up->msg_lrpid);
+ if (err2)
+ err = -EFAULT;
+ }
} else {
struct msqid_ds m;
struct msqid_ds32 *up = (struct msqid_ds32 *)uptr;
if (IPCOP_MASK (second) &
(IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) {
int err2 = put_user (m.msg_perm.key, &up->msg_perm.key);
- err2 |= __put_user (m.msg_perm.uid, &up->msg_perm.uid);
- err2 |= __put_user (m.msg_perm.gid, &up->msg_perm.gid);
- err2 |= __put_user (m.msg_perm.cuid, &up->msg_perm.cuid);
- err2 |= __put_user (m.msg_perm.cgid, &up->msg_perm.cgid);
+ err2 |= __put_user (high2lowuid(m.msg_perm.uid), &up->msg_perm.uid);
+ err2 |= __put_user (high2lowgid(m.msg_perm.gid), &up->msg_perm.gid);
+ err2 |= __put_user (high2lowuid(m.msg_perm.cuid), &up->msg_perm.cuid);
+ err2 |= __put_user (high2lowgid(m.msg_perm.cgid), &up->msg_perm.cgid);
err2 |= __put_user (m.msg_perm.mode, &up->msg_perm.mode);
err2 |= __put_user (m.msg_perm.seq, &up->msg_perm.seq);
err2 |= __put_user (m.msg_stime, &up->msg_stime);
if (IPCOP_MASK (second) &
(IPCOP_MASK (IPC_INFO) | IPCOP_MASK (SHM_LOCK) | IPCOP_MASK (SHM_UNLOCK) |
IPCOP_MASK (IPC_RMID))) {
+ if (second == (IPC_INFO|IPC_64))
+ second = IPC_INFO; /* So that we don't have to translate it */
err = sys_shmctl (first, second, (struct shmid_ds *)uptr);
+ } else if ((second & IPC_64) && second != (SHM_INFO|IPC_64)) {
+ struct shmid64_ds s;
+ struct shmid64_ds32 *up = (struct shmid64_ds32 *)uptr;
+ mm_segment_t old_fs;
+
+ if (second == (IPC_SET|IPC_64)) {
+ err = get_user (s.shm_perm.uid, &up->shm_perm.uid);
+ err |= __get_user (s.shm_perm.gid, &up->shm_perm.gid);
+ err |= __get_user (s.shm_perm.mode, &up->shm_perm.mode);
+ if (err)
+ goto out;
+ }
+ old_fs = get_fs ();
+ set_fs (KERNEL_DS);
+ err = sys_shmctl (first, second, (struct shmid_ds *)&s);
+ set_fs (old_fs);
+ if (err < 0)
+ goto out;
+
+ /* Mask it even in this case so it becomes a CSE. */
+ if (IPCOP_MASK (second) &
+ (IPCOP_MASK (SHM_STAT) | IPCOP_MASK (IPC_STAT))) {
+ int err2 = copy_to_user (&up->shm_perm, &s.shm_perm, sizeof(struct ipc64_perm) + 3*sizeof(time_t));
+ err2 |= __put_user (s.shm_segsz, &up->shm_segsz);
+ err2 |= __put_user (s.shm_nattch, &up->shm_nattch);
+ err2 |= __put_user (s.shm_cpid, &up->shm_cpid);
+ err2 |= __put_user (s.shm_lpid, &up->shm_lpid);
+ if (err2)
+ err = -EFAULT;
+ }
} else {
struct shmid_ds s;
struct shmid_ds32 *up = (struct shmid_ds32 *)uptr;
mm_segment_t old_fs;
+ second &= ~IPC_64;
if (second == IPC_SET) {
err = get_user (s.shm_perm.uid, &up->shm_perm.uid);
err |= __get_user (s.shm_perm.gid, &up->shm_perm.gid);
} else if (IPCOP_MASK (second) &
(IPCOP_MASK (SHM_STAT) | IPCOP_MASK (IPC_STAT))) {
int err2 = put_user (s.shm_perm.key, &up->shm_perm.key);
- err2 |= __put_user (s.shm_perm.uid, &up->shm_perm.uid);
- err2 |= __put_user (s.shm_perm.gid, &up->shm_perm.gid);
- err2 |= __put_user (s.shm_perm.cuid, &up->shm_perm.cuid);
- err2 |= __put_user (s.shm_perm.cgid, &up->shm_perm.cgid);
+ err2 |= __put_user (high2lowuid(s.shm_perm.uid), &up->shm_perm.uid);
+ err2 |= __put_user (high2lowuid(s.shm_perm.gid), &up->shm_perm.gid);
+ err2 |= __put_user (high2lowuid(s.shm_perm.cuid), &up->shm_perm.cuid);
+ err2 |= __put_user (high2lowuid(s.shm_perm.cgid), &up->shm_perm.cgid);
err2 |= __put_user (s.shm_perm.mode, &up->shm_perm.mode);
err2 |= __put_user (s.shm_perm.seq, &up->shm_perm.seq);
err2 |= __put_user (s.shm_atime, &up->shm_atime);
err |= put_user(ino, &statbuf->st_ino);
err |= put_user(mode, &statbuf->st_mode);
err |= put_user(nlink, &statbuf->st_nlink);
- err |= put_user(uid, &statbuf->st_uid);
- err |= put_user(gid, &statbuf->st_gid);
+ err |= put_user(high2lowuid(uid), &statbuf->st_uid);
+ err |= put_user(high2lowgid(gid), &statbuf->st_gid);
err |= put_user(kdev_t_to_nr(rdev), &statbuf->st_rdev);
err |= put_user(size, &statbuf->st_size);
err |= put_user(atime, &statbuf->st_atime);
return ret;
}
-extern asmlinkage int sys_setreuid(uid_t ruid, uid_t euid);
-
-asmlinkage int sys32_setreuid(__kernel_uid_t32 ruid, __kernel_uid_t32 euid)
-{
- uid_t sruid, seuid;
-
- sruid = (ruid == (__kernel_uid_t32)-1) ? ((uid_t)-1) : ((uid_t)ruid);
- seuid = (euid == (__kernel_uid_t32)-1) ? ((uid_t)-1) : ((uid_t)euid);
- return sys_setreuid(sruid, seuid);
-}
-
-extern asmlinkage int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid);
-
-asmlinkage int sys32_setresuid(__kernel_uid_t32 ruid,
- __kernel_uid_t32 euid,
- __kernel_uid_t32 suid)
-{
- uid_t sruid, seuid, ssuid;
-
- sruid = (ruid == (__kernel_uid_t32)-1) ? ((uid_t)-1) : ((uid_t)ruid);
- seuid = (euid == (__kernel_uid_t32)-1) ? ((uid_t)-1) : ((uid_t)euid);
- ssuid = (suid == (__kernel_uid_t32)-1) ? ((uid_t)-1) : ((uid_t)suid);
- return sys_setresuid(sruid, seuid, ssuid);
-}
-
-extern asmlinkage int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
-
-asmlinkage int sys32_getresuid(__kernel_uid_t32 *ruid, __kernel_uid_t32 *euid, __kernel_uid_t32 *suid)
-{
- uid_t a, b, c;
- int ret;
- mm_segment_t old_fs = get_fs();
-
- set_fs (KERNEL_DS);
- ret = sys_getresuid(&a, &b, &c);
- set_fs (old_fs);
- if (put_user (a, ruid) || put_user (b, euid) || put_user (c, suid))
- return -EFAULT;
- return ret;
-}
-
-extern asmlinkage int sys_setregid(gid_t rgid, gid_t egid);
-
-asmlinkage int sys32_setregid(__kernel_gid_t32 rgid, __kernel_gid_t32 egid)
-{
- gid_t srgid, segid;
-
- srgid = (rgid == (__kernel_gid_t32)-1) ? ((gid_t)-1) : ((gid_t)rgid);
- segid = (egid == (__kernel_gid_t32)-1) ? ((gid_t)-1) : ((gid_t)egid);
- return sys_setregid(srgid, segid);
-}
-
-extern asmlinkage int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid);
-
-asmlinkage int sys32_setresgid(__kernel_gid_t32 rgid,
- __kernel_gid_t32 egid,
- __kernel_gid_t32 sgid)
-{
- gid_t srgid, segid, ssgid;
-
- srgid = (rgid == (__kernel_gid_t32)-1) ? ((gid_t)-1) : ((gid_t)rgid);
- segid = (egid == (__kernel_gid_t32)-1) ? ((gid_t)-1) : ((gid_t)egid);
- ssgid = (sgid == (__kernel_gid_t32)-1) ? ((gid_t)-1) : ((gid_t)sgid);
- return sys_setresgid(srgid, segid, ssgid);
-}
-
-extern asmlinkage int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
-
-asmlinkage int sys32_getresgid(__kernel_gid_t32 *rgid, __kernel_gid_t32 *egid, __kernel_gid_t32 *sgid)
-{
- gid_t a, b, c;
- int ret;
- mm_segment_t old_fs = get_fs();
-
- set_fs (KERNEL_DS);
- ret = sys_getresgid(&a, &b, &c);
- set_fs (old_fs);
- if (!ret) {
- ret = put_user (a, rgid);
- ret |= put_user (b, egid);
- ret |= put_user (c, sgid);
- }
- return ret;
-}
-
struct tms32 {
__kernel_clock_t32 tms_utime;
__kernel_clock_t32 tms_stime;
return ret;
}
-extern asmlinkage int sys_getgroups(int gidsetsize, gid_t *grouplist);
-
-asmlinkage int sys32_getgroups(int gidsetsize, __kernel_gid_t32 *grouplist)
-{
- gid_t gl[NGROUPS];
- int ret, i;
- mm_segment_t old_fs = get_fs ();
-
- set_fs (KERNEL_DS);
- ret = sys_getgroups(gidsetsize, gl);
- set_fs (old_fs);
- if (gidsetsize && ret > 0 && ret <= NGROUPS)
- for (i = 0; i < ret; i++, grouplist++)
- if (__put_user (gl[i], grouplist))
- return -EFAULT;
- return ret;
-}
-
-extern asmlinkage int sys_setgroups(int gidsetsize, gid_t *grouplist);
-
-asmlinkage int sys32_setgroups(int gidsetsize, __kernel_gid_t32 *grouplist)
-{
- gid_t gl[NGROUPS];
- int ret, i;
- mm_segment_t old_fs = get_fs ();
-
- if ((unsigned) gidsetsize > NGROUPS)
- return -EINVAL;
- for (i = 0; i < gidsetsize; i++, grouplist++)
- if (__get_user (gl[i], grouplist))
- return -EFAULT;
- set_fs (KERNEL_DS);
- ret = sys_setgroups(gidsetsize, gl);
- set_fs (old_fs);
- return ret;
-}
-
#define RLIM_INFINITY32 0x7fffffff
#define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x)
-/* $Id: systbls.S,v 1.62 2000/01/04 23:54:43 davem Exp $
+/* $Id: systbls.S,v 1.64 2000/01/11 17:33:28 jj Exp $
* systbls.S: System call entry point tables for OS compatibility.
* The native Linux system call table lives here also.
*
sys_call_table32:
/*0*/ .word sys_nis_syscall, sparc_exit, sys_fork, sys_read, sys_write
/*5*/ .word sparc32_open, sys_close, sys32_wait4, sys_creat, sys_link
-/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys32_chown, sys32_mknod
-/*15*/ .word sys32_chmod, sys32_lchown, sparc_brk, sys_perfctr, sys32_lseek
-/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
+/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
+/*15*/ .word sys32_chmod, sys_lchown16, sparc_brk, sys_perfctr, sys32_lseek
+/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
/*25*/ .word sys_time, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
-/*30*/ .word sys32_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
- .word sys_nis_syscall, sys_sync, sys_kill, sys32_newstat, sys32_sendfile
-/*40*/ .word sys32_newlstat, sys_dup, sys_pipe, sys32_times, sys_nis_syscall
- .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid
-/*50*/ .word sys_getegid, sys_acct, sys_nis_syscall, sys_nis_syscall, sys32_ioctl
+/*30*/ .word sys32_utime, sys_lchown, sys_fchown, sys_access, sys_nice
+ .word sys_chown, sys_sync, sys_kill, sys32_newstat, sys32_sendfile
+/*40*/ .word sys32_newlstat, sys_dup, sys_pipe, sys32_times, sys_getuid
+ .word sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16
+/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys32_ioctl
.word sys_reboot, sys32_mmap2, sys_symlink, sys_readlink, sys32_execve
/*60*/ .word sys_umask, sys_chroot, sys32_newfstat, sys_fstat64, sys_getpagesize
- .word sys_msync, sys_vfork, sys32_pread, sys32_pwrite, sys_nis_syscall
-/*70*/ .word sys_nis_syscall, sys32_mmap, sys_nis_syscall, sys_munmap, sys_mprotect
- .word sys_nis_syscall, sys_vhangup, sys32_truncate64, sys_nis_syscall, sys32_getgroups
-/*80*/ .word sys32_setgroups, sys_getpgrp, sys_nis_syscall, sys32_setitimer, sys32_ftruncate64
- .word sys_swapon, sys32_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall
-/*90*/ .word sys_dup2, sys_nis_syscall, sys32_fcntl, sys32_select, sys_nis_syscall
+ .word sys_msync, sys_vfork, sys32_pread, sys32_pwrite, sys_geteuid
+/*70*/ .word sys_getegid, sys32_mmap, sys_setreuid, sys_munmap, sys_mprotect
+ .word sys_setregid, sys_vhangup, sys32_truncate64, sys_getgroups, sys_getgroups16
+/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, sys32_setitimer, sys32_ftruncate64
+ .word sys_swapon, sys32_getitimer, sys_setuid, sys_sethostname, sys_setgid
+/*90*/ .word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid
.word sys_fsync, sys_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
- .word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_nis_syscall, sys_nis_syscall
-/*110*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
+ .word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
+/*110*/ .word sys_setresgid, sys_getresgid, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd
-/*120*/ .word sys32_readv, sys32_writev, sys32_settimeofday, sys_fchown, sys_fchmod
- .word sys_nis_syscall, sys32_setreuid, sys32_setregid, sys_rename, sys_truncate
+/*120*/ .word sys32_readv, sys32_writev, sys32_settimeofday, sys_fchown16, sys_fchmod
+ .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64
/*140*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys32_getrlimit
/*210*/ .word sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys32_sysinfo
.word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex
/*220*/ .word sys32_sigprocmask, sys32_create_module, sys32_delete_module, sys32_get_kernel_syms, sys_getpgid
- .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid
+ .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
/*230*/ .word sys32_select, sys_time, sys_nis_syscall, sys_stime, sys_nis_syscall
.word sys_nis_syscall, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
/*90*/ .word sys_dup2, sys_nis_syscall, sys_fcntl, sys_select, sys_nis_syscall
.word sys_fsync, sys_setpriority, sys_socket, sys_connect, sys_accept
/*100*/ .word sys_getpriority, sys_rt_sigreturn, sys_rt_sigaction, sys_rt_sigprocmask, sys_rt_sigpending
- .word sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_nis_syscall, sys_nis_syscall
-/*110*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_recvmsg, sys_sendmsg
+ .word sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_setresuid, sys_getresuid
+/*110*/ .word sys_setresgid, sys_getresgid, sys_nis_syscall, sys_recvmsg, sys_sendmsg
.word sys_nis_syscall, sys_gettimeofday, sys_getrusage, sys_getsockopt, sys_getcwd
/*120*/ .word sys_readv, sys_writev, sys_settimeofday, sys_fchown, sys_fchmod
.word sys_recvfrom, sys_setreuid, sys_setregid, sys_rename, sys_truncate
.word sys_close, sunos_wait4, sys_creat
.word sys_link, sys_unlink, sunos_execv
.word sys_chdir, sunos_nosys, sys32_mknod
- .word sys32_chmod, sys32_lchown, sunos_brk
+ .word sys32_chmod, sys_lchown16, sunos_brk
.word sunos_nosys, sys32_lseek, sunos_getpid
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_getuid, sunos_nosys, sys_ptrace
.word sunos_nosys, sunos_sbrk, sunos_sstk
.word sunos_mmap, sunos_vadvise, sys_munmap
.word sys_mprotect, sunos_madvise, sys_vhangup
- .word sunos_nosys, sunos_mincore, sys32_getgroups
- .word sys32_setgroups, sys_getpgrp, sunos_setpgrp
+ .word sunos_nosys, sunos_mincore, sys_getgroups16
+ .word sys_setgroups16, sys_getpgrp, sunos_setpgrp
.word sys32_setitimer, sunos_nosys, sys_swapon
.word sys32_getitimer, sys_gethostname, sys_sethostname
.word sunos_getdtablesize, sys_dup2, sunos_nop
.word sys32_sigstack, sys32_recvmsg, sys32_sendmsg
.word sunos_nosys, sys32_gettimeofday, sys32_getrusage
.word sunos_getsockopt, sunos_nosys, sunos_readv
- .word sunos_writev, sys32_settimeofday, sys_fchown
- .word sys_fchmod, sys32_recvfrom, sys32_setreuid
- .word sys_setregid, sys_rename, sys_truncate
+ .word sunos_writev, sys32_settimeofday, sys_fchown16
+ .word sys_fchmod, sys32_recvfrom, sys_setreuid16
+ .word sys_setregid16, sys_rename, sys_truncate
.word sys_ftruncate, sys_flock, sunos_nosys
.word sys32_sendto, sys_shutdown, sys_socketpair
.word sys_mkdir, sys_rmdir, sys32_utimes
-/* $Id: entry64.S,v 1.5 1998/03/26 08:46:15 jj Exp $
+/* $Id: entry64.S,v 1.6 2000/01/12 02:59:26 davem Exp $
* entry64.S: Solaris syscall emulation entry point.
*
* Copyright (C) 1996,1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
.globl solaris_getuid
solaris_getuid:
- lduh [%g6 + AOFF_task_euid], %o1
- lduh [%g6 + AOFF_task_uid], %o0
+ lduw [%g6 + AOFF_task_euid], %o1
+ lduw [%g6 + AOFF_task_uid], %o0
b,pt %xcc, ret_from_solaris
stx %o1, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I1]
.globl solaris_getgid
solaris_getgid:
- lduh [%g6 + AOFF_task_egid], %o1
- lduh [%g6 + AOFF_task_gid], %o0
+ lduw [%g6 + AOFF_task_egid], %o1
+ lduw [%g6 + AOFF_task_gid], %o0
b,pt %xcc, ret_from_solaris
stx %o1, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I1]
-/* $Id: fs.c,v 1.15 2000/01/04 23:54:47 davem Exp $
+/* $Id: fs.c,v 1.16 2000/01/12 02:59:27 davem Exp $
* fs.c: fs related syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
return -EINVAL;
}
-static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
-{
- struct inode * inode;
- struct iattr newattrs;
- int error;
-
- error = -ENOENT;
- if (!(inode = dentry->d_inode)) {
- printk("chown_common: NULL inode\n");
- goto out;
- }
- error = -EROFS;
- if (IS_RDONLY(inode))
- goto out;
- error = -EPERM;
- if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- goto out;
- if (user == (uid_t) -1)
- user = inode->i_uid;
- if (group == (gid_t) -1)
- group = inode->i_gid;
- newattrs.ia_mode = inode->i_mode;
- newattrs.ia_uid = user;
- newattrs.ia_gid = group;
- newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
- /*
- * If the owner has been changed, remove the setuid bit
- */
- if (inode->i_mode & S_ISUID) {
- newattrs.ia_mode &= ~S_ISUID;
- newattrs.ia_valid |= ATTR_MODE;
- }
- /*
- * If the group has been changed, remove the setgid bit
- *
- * Don't remove the setgid bit if no group execute bit.
- * This is a file marked for mandatory locking.
- */
- if (((inode->i_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))) {
- newattrs.ia_mode &= ~S_ISGID;
- newattrs.ia_valid |= ATTR_MODE;
- }
- error = DQUOT_TRANSFER(dentry, &newattrs);
-out:
- return error;
-}
-
-/* Linux chown works like Solaris lchown. Solaris chown does follow symlink */
-asmlinkage int solaris_chown(u32 filename, s32 user, s32 group)
-{
- struct dentry * dentry;
- int error;
-
- lock_kernel();
- dentry = namei((const char *)A(filename));
-
- error = PTR_ERR(dentry);
- if (!IS_ERR(dentry)) {
- error = chown_common(dentry, user, group);
- dput(dentry);
- }
- unlock_kernel();
- return error;
-}
-
/* At least at the time I'm writing this, Linux doesn't have ACLs, so we
just fake this */
asmlinkage int solaris_acl(u32 filename, int cmd, int nentries, u32 aclbufp)
-/* $Id: misc.c,v 1.19 1999/12/15 17:51:25 jj Exp $
+/* $Id: misc.c,v 1.20 2000/01/12 02:59:26 davem Exp $
* misc.c: Miscelaneous syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
}
}
-asmlinkage int solaris_setreuid(s32 ruid, s32 euid)
-{
- int (*sys_setreuid)(uid_t, uid_t) = (int (*)(uid_t, uid_t))SYS(setreuid);
- return sys_setreuid(ruid, euid);
-}
-
-asmlinkage int solaris_setregid(s32 rgid, s32 egid)
-{
- int (*sys_setregid)(gid_t, gid_t) = (int (*)(gid_t, gid_t))SYS(setregid);
- return sys_setregid(rgid, egid);
-}
-
asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)
{
int ret;
-/* $Id: systbl.S,v 1.8 1999/02/11 18:34:02 davem Exp $
+/* $Id: systbl.S,v 1.10 2000/01/12 02:59:26 davem Exp $
* systbl.S: System call entry point table for Solaris compatibility.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
.word CHAIN(time) /* time 13 */
.word solaris_mknod /* mknod sox 14 */
.word CHAIN(chmod) /* chmod so 15 */
- .word solaris_chown /* chown sdd 16 */
+ .word CHAIN(chown) /* chown sdd 16 */
.word solaris_brk /* brk/break x 17 */
.word solaris_stat /* stat sp 18 */
.word CHAIN(lseek) /* seek/lseek ddd 19 */
.word CHAIN(nanosleep) /* nanosleep dd 199 */
.word solaris_facl /* facl dddp 200 */
.word solaris_unimplemented /* 201 */
- .word solaris_setreuid /* setreuid dd 202 */
- .word solaris_setregid /* setregid dd 203 */
+ .word CHAIN(setreuid) /* setreuid dd 202 */
+ .word CHAIN(setregid) /* setregid dd 203 */
.word solaris_unimplemented /* 204 */
.word solaris_unimplemented /* 205 */
.word solaris_unimplemented /* 206 */
#define MAJOR_NR MFM_ACORN_MAJOR
#include <linux/blk.h>
+#include <linux/blkpg.h>
#include <asm/system.h>
#include <asm/io.h>
DBG("mfm_request: Dropping out bottom\n");
}
-static void do_mfm_request(void)
+static void do_mfm_request(request_queue_t *q)
{
DBG("do_mfm_request: about to mfm_request\n");
mfm_request();
return -EFAULT;
return 0;
- case BLKFLSBUF:
- if (!capable(CAP_SYS_ADMIN))
- return -EACCES;
- fsync_dev(dev);
- invalidate_buffers(dev);
- return 0;
-
- case BLKRASET:
- if (!capable(CAP_SYS_ADMIN))
- return -EACCES;
- if (arg > 0xff)
- return -EINVAL;
- read_ahead[major] = arg;
- return 0;
-
- case BLKRAGET:
- return put_user(read_ahead[major], (long *)arg);
-
case BLKGETSIZE:
return put_user (mfm[minor].nr_sects, (long *)arg);
return -EACCES;
return mfm_reread_partitions(dev);
- RO_IOCTLS(dev, arg);
+ case BLKFLSBUF:
+ case BLKROSET:
+ case BLKROGET:
+ case BLKRASET:
+ case BLKRAGET:
+ case BLKPG:
+ return blk_ioctl(dev, cmd, arg);
default:
return -EINVAL;
{
unsigned char irqmask;
- if (register_blkdev(MAJOR_NR, "mfm", &mfm_fops)) {
- printk("mfm_init: unable to get major number %d\n", MAJOR_NR);
- return -1;
- }
-
if (mfm_probecontroller(ONBOARD_MFM_ADDRESS)) {
mfm_addr = ONBOARD_MFM_ADDRESS;
mfm_IRQPollLoc = IOC_IRQSTATB;
ecard_claim(ecs);
}
+ if (register_blkdev(MAJOR_NR, "mfm", &mfm_fops)) {
+ printk("mfm_init: unable to get major number %d\n", MAJOR_NR);
+ ecard_release(ecs);
+ return -1;
+ }
+
printk("mfm: found at address %08X, interrupt %d\n", mfm_addr, mfm_irq);
request_region (mfm_addr, 10, "mfm");
hdc63463_irqpolladdress = ioaddr(mfm_IRQPollLoc);
hdc63463_irqpollmask = irqmask;
- blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB?) read ahread */
#ifndef MODULE
bool ' Support SCSI 2 Tagged queueing' CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
bool ' Support SCSI 2 Synchronous Transfers' CONFIG_SCSI_ACORNSCSI_SYNC
fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- dep_tristate 'ARXE SCSI support (EXPERIMENTAL)' CONFIG_SCSI_ARXESCSI $CONFIG_SCSI
- dep_tristate 'CumanaSCSI II support (EXPERIMENTAL)' CONFIG_SCSI_CUMANA_2 $CONFIG_SCSI
- dep_tristate 'EESOX support (EXPERIMENTAL)' CONFIG_SCSI_EESOXSCSI $CONFIG_SCSI
- dep_tristate 'PowerTec support (EXPERIMENTAL)' CONFIG_SCSI_POWERTECSCSI $CONFIG_SCSI
+dep_tristate 'ARXE SCSI support' CONFIG_SCSI_ARXESCSI $CONFIG_SCSI
+dep_tristate 'CumanaSCSI II support' CONFIG_SCSI_CUMANA_2 $CONFIG_SCSI
+dep_tristate 'EESOX support' CONFIG_SCSI_EESOXSCSI $CONFIG_SCSI
+dep_tristate 'PowerTec support' CONFIG_SCSI_POWERTECSCSI $CONFIG_SCSI
+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
comment 'The following drivers are not fully supported'
dep_tristate 'CumanaSCSI I support' CONFIG_SCSI_CUMANA_1 $CONFIG_SCSI
dep_tristate ' 3dlabs GMX 2000' CONFIG_DRM_GAMMA m
fi
-if [ "$CONFIG_PCMCIA" != "n" ]; then
+if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
source drivers/char/pcmcia/Config.in
fi
# PCMCIA character device configuration
#
-mainmenu_option next_comment
-comment 'PCMCIA character device support'
-
-if [ "$CONFIG_SERIAL" = "n" -o "$CONFIG_PCMCIA" = "n" ]; then
+if [ "$CONFIG_SERIAL" = "n" -o "$CONFIG_PCMCIA" = "n" -o \
+ "$CONFIG_HOTPLUG" = "n" ]; then
define_bool CONFIG_PCMCIA_SERIAL n
else
if [ "$CONFIG_SERIAL" = "m" -o "$CONFIG_PCMCIA" = "m" ]; then
fi
fi
-dep_tristate ' PCMCIA serial device support' CONFIG_PCMCIA_SERIAL_CS $CONFIG_PCMCIA_SERIAL
-if [ "$CONFIG_CARDBUS" = "y" ]; then
- dep_tristate ' CardBus serial device support' CONFIG_PCMCIA_SERIAL_CB $CONFIG_PCMCIA_SERIAL
+if [ "$CONFIG_PCMCIA_SERIAL" != "n" ]; then
+ mainmenu_option next_comment
+ comment 'PCMCIA character device support'
+
+ dep_tristate 'PCMCIA serial device support' CONFIG_PCMCIA_SERIAL_CS $CONFIG_PCMCIA_SERIAL
+ if [ "$CONFIG_CARDBUS" = "y" ]; then
+ dep_tristate 'CardBus serial device support' CONFIG_PCMCIA_SERIAL_CB $CONFIG_PCMCIA_SERIAL
+ fi
+
+ endmenu
fi
if [ "$CONFIG_PCMCIA_SERIAL_CS" = "y" -o \
"$CONFIG_PCMCIA_SERIAL_CB" = "y" ]; then
define_bool CONFIG_PCMCIA_CHRDEV y
fi
-
-endmenu
source drivers/net/wan/Config.in
-if [ "$CONFIG_PCMCIA" != "n" ]; then
+if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
source drivers/net/pcmcia/Config.in
fi
fi
fi
+endmenu
+
if [ "$CONFIG_PCMCIA_3C589" = "y" -o "$CONFIG_PCMCIA_3C574" = "y" -o \
"$CONFIG_PCMCIA_FMVJ18X" = "y" -o "$CONFIG_PCMCIA_PCNET" = "y" -o \
"$CONFIG_PCMCIA_NMCLAN" = "y" -o "$CONFIG_PCMCIA_SMC91C92" = "y" -o \
"$CONFIG_PCMCIA_XIRC2PS" = "y" -o "$CONFIG_PCMCIA_RAYCS" = "y" -o \
"$CONFIG_PCMCIA_NETWAVE" = "y" -o "$CONFIG_PCMCIA_WAVELAN" = "y" ]; then
define_bool CONFIG_PCMCIA_NETCARD y
+else
+ define_bool CONFIG_PCMCIA_NETCARD n
fi
-
-endmenu
resume: tulip_resume
};
-#ifdef MODULE
-
-int module_init(void)
+int tulip_init(void)
{
pci_register_driver(&tulip_ops);
return 0;
}
-void module_cleanup(void)
+void tulip_exit(void)
{
pci_unregister_driver(&tulip_ops);
}
-#else
-
-void tulip_probe(void)
-{
- pci_register_driver(&tulip_ops);
-}
+module_init(tulip_init)
+module_exit(tulip_exit)
-#endif
\f
/*
* Local variables:
* 8/18/99 - Updated driver for 2.3.13 kernel to use new pci
* resource. Driver also reports the card name returned by
* the pci resource.
+ * 1/11/00 - Added spinlocks for smp
*
* To Do:
*
- * Sanitize for smp
+ * IPv6 Multicast
*
* If Problems do Occur
* Most problems can be rectified by either closing and opening the interface
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/pci.h>
+#include <linux/spinlock.h>
#include <net/checksum.h>
#include <asm/io.h>
*/
static char *version =
-"Olympic.c v0.3.0 8/18/99 - Peter De Schrijver & Mike Phillips" ;
+"Olympic.c v0.3.1 1/11/00 - Peter De Schrijver & Mike Phillips" ;
static char *open_maj_error[] = {"No error", "Lobe Media Test", "Physical Insertion",
"Address Verification", "Neighbor Notification (Ring Poll)",
}
}
+ spin_lock_init(&olympic_priv->olympic_lock) ;
+
#if OLYMPIC_DEBUG
printk("BCTL: %x\n",readl(olympic_mmio+BCTL));
printk("GPR: %x\n",readw(olympic_mmio+GPR));
if (!(sisr & SISR_MI)) /* Interrupt isn't for us */
return ;
+ spin_lock(&olympic_priv->olympic_lock);
+
if (dev->interrupt)
printk(KERN_WARNING "%s: Re-entering interrupt \n",dev->name) ;
dev->interrupt = 0 ;
writel(SISR_MI,olympic_mmio+SISR_MASK_SUM);
-
+
+ spin_unlock(&olympic_priv->olympic_lock) ;
}
static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv;
- __u8 *olympic_mmio=olympic_priv->olympic_mmio;
+ __u8 *olympic_mmio=olympic_priv->olympic_mmio;
+ unsigned long flags ;
+
+ spin_lock_irqsave(&olympic_priv->olympic_lock, flags);
if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
+ spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags);
return 1;
}
writew((((readw(olympic_mmio+TXENQ_1)) & 0x8000) ^ 0x8000) | 1,olympic_mmio+TXENQ_1);
dev->tbusy=0;
-
+ spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags);
return 0;
- } else
+ } else {
+ spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags);
return 1;
+ }
}
__u8 *olympic_lap;
char *olympic_card_name ;
+ spinlock_t olympic_lock ;
+
volatile int srb_queued; /* True if an SRB is still posted */
wait_queue_head_t srb_wait;
if [ "$CONFIG_PARPORT_PC" = "y" ]; then
# Don't bother with this if parport_pc is a module; it only affects
# the presence or not of some __init's, which are no-ops for modules.
- if [ "$CONFIG_PCMCIA" != "n" ]; then
+ if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
bool ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA
fi
fi
printk (KERN_DEBUG "%s: FIFO is stuck\n", port->name);
/* Prevent further data transfer. */
- frob_econtrol (port, 0xe0, ECR_TST);
+ frob_econtrol (port, 0xe0, ECR_TST << 5);
/* Adjust for the contents of the FIFO. */
for (written -= priv->fifo_depth; ; written++) {
O_OBJS += proc.o
endif
-L_OBJS += compat.o names.o helper.o setup-res.o setup-bus.o setup-irq.o
+L_OBJS += compat.o names.o setup-res.o setup-bus.o setup-irq.o
ifndef CONFIG_X86
L_OBJS += syscall.o
+++ /dev/null
-/*
- * $Id$
- *
- * drivers/pci/helper.c
- *
- * Copyright 1999 Jeff Garzik <jgarzik@mandrakesoft.com>
- * This software is free. See the file COPYING for licensing details.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/pci.h>
-
-
-int pci_simple_probe (const struct pci_simple_probe_entry *list,
- size_t match_limit, pci_simple_probe_callback cb,
- void *drvr_data)
-{
- struct pci_dev *dev;
- const struct pci_simple_probe_entry *ent;
- size_t matches = 0;
- unsigned short vendor, device;
- int rc;
-
- if (!list || !cb)
- return -1;
-
- dev = pci_find_device (PCI_ANY_ID, PCI_ANY_ID, NULL);
- while (dev) {
- ent = list;
- while (ent->vendor && ent->device) {
- vendor = ent->vendor;
- device = ent->device;
-
- if (((vendor != 0xFFFF) &&
- (vendor != dev->vendor)) ||
- ((device != 0xFFFF) &&
- (device != dev->device))) {
- ent++;
- continue;
- }
-
- if (((ent->subsys_vendor) &&
- (ent->subsys_vendor != dev->subsystem_vendor)) ||
- ((ent->subsys_device) &&
- (ent->subsys_device != dev->subsystem_device))) {
- ent++;
- continue;
- }
-
- rc = (* cb) (dev, matches, ent, drvr_data);
- if (rc < 0)
- return rc;
-
- matches++;
-
- if (match_limit && match_limit == matches)
- return matches;
-
- break; /* stop list search on first match */
- }
-
- dev = pci_find_device (PCI_ANY_ID, PCI_ANY_ID, dev);
- }
-
- return matches;
-}
-
-
static LIST_HEAD(pci_drivers);
-static struct pci_device_id *
+struct pci_device_id *
pci_match_device(struct pci_device_id *ids, struct pci_dev *dev)
{
while (ids->vendor || ids->subvendor || ids->class_mask) {
* Copyright 1998 Martin Mares
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <asm/dma.h> /* isa_dma_bridge_buggy */
EXPORT_SYMBOL(pci_find_device);
EXPORT_SYMBOL(pci_find_slot);
EXPORT_SYMBOL(pci_set_master);
-EXPORT_SYMBOL(pci_simple_probe);
EXPORT_SYMBOL(pci_set_power_state);
EXPORT_SYMBOL(pci_assign_resource);
EXPORT_SYMBOL(pci_register_driver);
}
min = (res->flags & IORESOURCE_IO ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM);
- min += root->start;
size = res->end + 1;
DBGC((" for root[%lx:%lx] min[%lx] size[%lx]\n",
root->start, root->end, min, size));
err = get_user(word, (u16 *)buf);
if (err)
break;
- err = pci_write_config_byte(dev, off, word);
+ err = pci_write_config_word(dev, off, word);
if (err != PCIBIOS_SUCCESSFUL)
err = -EIO;
break;
err = get_user(dword, (u32 *)buf);
if (err)
break;
- pci_write_config_byte(dev, off, dword);
+ err = pci_write_config_dword(dev, off, dword);
if (err != PCIBIOS_SUCCESSFUL)
err = -EIO;
break;
else
while (align && (align < num)) align <<= 1;
}
- if (*base & ~(align-1)) {
+ if (align && (*base & (align-1))) {
printk(KERN_INFO "odd IO request: base %04x align %04x\n",
*base, align);
align = 0;
#ifndef _LINUX_RICOH_H
#define _LINUX_RICOH_H
+#include <linux/config.h>
+
#define RF5C_MODE_CTL 0x1f /* Mode control */
#define RF5C_PWR_CTL 0x2f /* Mixed voltage control */
#define RF5C_CHIP_ID 0x3a /* Chip identification */
#ifndef _LINUX_TI113X_H
#define _LINUX_TI113X_H
+#include <linux/config.h>
/* Register definitions for TI 113X PCI-to-CardBus bridges */
}
align = size = 4*1024*1024;
- min = 0x10000000; max = ~0U;
+ min = PCIBIOS_MIN_MEM; max = ~0U;
if (type & IORESOURCE_IO) {
align = 1024;
size = 256;
- min = 0x1000;
+ min = PCIBIOS_MIN_IO;
max = 0xffff;
}
-/* $Id: envctrl.c,v 1.13 1999/12/19 23:28:07 davem Exp $
+/* $Id: envctrl.c,v 1.14 2000/01/09 15:43:45 ecd Exp $
* envctrl.c: Temperature and Fan monitoring on Machines providing it.
*
* Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
#undef U450_SUPPORT /* might fry you machine, careful here !!! */
-#define DEBUG 1
-#define DEBUG_BUS_SCAN 1
+#undef DEBUG
+#undef DEBUG_BUS_SCAN
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
dep_tristate ' USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB
dep_tristate ' USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
dep_tristate ' USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
+ if [ "$CONFIG_USB_SERIAL" != "n" ]; then
+ bool ' USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC
+ bool ' USB ConnectTech WhiteHEAT Serial Driver' CONFIG_USB_SERIAL_WHITEHEAT
+ bool ' USB Handspring Visor Driver' CONFIG_USB_SERIAL_VISOR
+ bool ' USB Belkin Single Port Serial Driver' CONFIG_USB_SERIAL_BELKIN
+ bool ' USB Peracom Single Port Serial Driver' CONFIG_USB_SERIAL_PERACOM
+ fi
dep_tristate ' USB CPiA Camera support' CONFIG_USB_CPIA $CONFIG_USB
dep_tristate ' USB OV511 Camera support' CONFIG_USB_OV511 $CONFIG_USB
dep_tristate ' USB Kodak DC-2xx Camera support' CONFIG_USB_DC2XX $CONFIG_USB
#include "usb.h"
+/*
+ * CMSPAR, some architectures can't have space and mark parity.
+ */
+
+#ifndef CMSPAR
+#define CMSPAR 0
+#endif
+
/*
* Major and minor numbers.
*/
case ACM_IRQ_LINE_STATE:
- newctrl = le16_to_cpup(data);
+ newctrl = le16_to_cpup((__u16 *) data);
if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
dbg("calling hangup");
USB_DT_HUB << 8, 0, data, size, HZ);
}
-#if 0
-static int usb_clear_hub_feature(struct usb_device *dev, int feature)
+static int usb_clear_hub_feature(struct usb_device *dev, int feature)
{
return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
- USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0 , NULL, 0, HZ);
+ USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, HZ);
}
-#endif
static int usb_clear_port_feature(struct usb_device *dev, int port, int feature)
{
}
if (tries==MAX_TRIES) {
- err("can not enable port %i after %i retries, disabling port", port+1, MAX_TRIES);
+ err("Cannot enable port %i after %i retries, disabling port.", port+1, MAX_TRIES);
+ err("Maybe the USB cable is bad?");
return;
}
/* Allocate a new device struct for it */
struct list_head *tmp;
struct usb_device *dev;
struct usb_hub *hub;
+ struct usb_hub_status hubsts;
+ unsigned short hubstatus, hubchange;
/*
* We restart the list everytime to avoid a deadlock with
if (portchange & USB_PORT_STAT_C_SUSPEND)
dbg("port %d suspend change", i + 1);
- if (portchange & USB_PORT_STAT_C_OVERCURRENT)
+ if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
dbg("port %d over-current change", i + 1);
+ usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_OVER_CURRENT);
+ }
if (portchange & USB_PORT_STAT_C_RESET) {
dbg("port %d reset change", i + 1);
usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_RESET);
}
} /* end for i */
+
+ /* deal with hub status changes */
+ if (usb_get_hub_status(dev, &hubsts) < 0) {
+ err("get_hub_status failed");
+ } else {
+ hubstatus = le16_to_cpup(&hubsts.wHubStatus);
+ hubchange = le16_to_cpup(&hubsts.wHubChange);
+ if (hubchange & HUB_CHANGE_LOCAL_POWER) {
+ dbg("hub power change");
+ usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
+ }
+ if (hubchange & HUB_CHANGE_OVERCURRENT) {
+ dbg("hub overcurrent change");
+ usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
+ }
+ }
} /* end while (1) */
he_unlock:
struct mousedev_list *next;
int dx, dy, dz;
unsigned char ps2[6];
- unsigned char buttons;
+ unsigned long buttons;
unsigned char ready, buffer, bufsiz;
unsigned char mode, genseq, impseq;
};
#include <asm/system.h>
#undef DEBUG
+#define OHCI_USE_NPS
#include "usb.h"
#include "ohci-hcd.h"
printk (KERN_DEBUG __FILE__ " %s branch int %2d(%2x):", str, i, i);
ed_p = &(ohci->hcca.int_table [i]);
while (*ed_p != 0 && j--) {
- printk (" ed: %4x;", (((ed_t *) bus_to_virt (*ed_p))->hwINFO));
- ed_p = &(((ed_t *) bus_to_virt (*ed_p))->hwNextED);
+ ed_t *ed = (ed_t *) bus_to_virt(le32_to_cpup(ed_p));
+ printk (" ed: %4x;", ed->hwINFO);
+ ed_p = &ed->hwNextED;
}
printk ("\n");
}
{
urb_priv_t * urb_priv = urb->hcpriv;
urb_t * urbt;
- unsigned int flags;
+ unsigned long flags;
int i;
/* just to be sure */
urb_priv_t * urb_priv;
unsigned int pipe = urb->pipe;
int i, size = 0;
- unsigned int flags;
+ unsigned long flags;
if (!urb->dev || !urb->dev->bus) return -EINVAL;
static int sohci_unlink_urb (urb_t * urb)
{
- unsigned int flags;
+ unsigned long flags;
ohci_t * ohci;
DECLARE_WAITQUEUE (wait, current);
static int sohci_free_dev (struct usb_device * usb_dev)
{
- unsigned int flags;
+ unsigned long flags;
int i, cnt = 0;
ed_t * ed;
DECLARE_WAITQUEUE (wait, current);
for (i = 0; i < ep_rev (6, interval); i += inter) {
inter = 1;
for (ed_p = &(ohci->hcca.int_table[ep_rev (5, i) + int_branch]);
- (*ed_p != 0) && (((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->int_interval >= interval);
- ed_p = &(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->hwNextED))
- inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->int_interval);
+ (*ed_p != 0) && (((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->int_interval >= interval);
+ ed_p = &(((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->hwNextED))
+ inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->int_interval);
ed->hwNextED = *ed_p;
*ed_p = cpu_to_le32 (virt_to_bus (ed));
}
inter = 1;
for (ed_p = &(ohci->hcca.int_table[ep_rev (5, i)]);
*ed_p != 0;
- ed_p = &(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->hwNextED))
- inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->int_interval);
+ ed_p = &(((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->hwNextED))
+ inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->int_interval);
*ed_p = cpu_to_le32 (virt_to_bus (ed));
}
ed->ed_prev = NULL;
switch (ed->type) {
case CTRL:
if (ed->ed_prev == NULL) {
- writel (le32_to_cpu (ed->hwNextED), &ohci->regs->ed_controlhead);
+ writel (le32_to_cpup (&ed->hwNextED), &ohci->regs->ed_controlhead);
} else {
ed->ed_prev->hwNextED = ed->hwNextED;
}
if(ohci->ed_controltail == ed) {
ohci->ed_controltail = ed->ed_prev;
} else {
- ((ed_t *) bus_to_virt (le32_to_cpu (ed->hwNextED)))->ed_prev = ed->ed_prev;
+ ((ed_t *) bus_to_virt (le32_to_cpup (&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
case BULK:
if (ed->ed_prev == NULL) {
- writel (le32_to_cpu (ed->hwNextED), &ohci->regs->ed_bulkhead);
+ writel (le32_to_cpup (&ed->hwNextED), &ohci->regs->ed_bulkhead);
} else {
ed->ed_prev->hwNextED = ed->hwNextED;
}
if (ohci->ed_bulktail == ed) {
ohci->ed_bulktail = ed->ed_prev;
} else {
- ((ed_t *) bus_to_virt (le32_to_cpu (ed->hwNextED)))->ed_prev = ed->ed_prev;
+ ((ed_t *) bus_to_virt (le32_to_cpup (&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
for (i = 0; i < ep_rev (6, interval); i += inter) {
for (ed_p = &(ohci->hcca.int_table[ep_rev (5, i) + int_branch]), inter = 1;
(*ed_p != 0) && (*ed_p != ed->hwNextED);
- ed_p = &(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->hwNextED),
- inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->int_interval)) {
- if(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p))) == ed) {
+ ed_p = &(((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->hwNextED),
+ inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->int_interval)) {
+ if(((ed_t *) bus_to_virt (le32_to_cpup (ed_p))) == ed) {
*ed_p = ed->hwNextED;
break;
}
if (ohci->ed_isotail == ed)
ohci->ed_isotail = ed->ed_prev;
if (ed->hwNextED != 0)
- ((ed_t *) bus_to_virt (le32_to_cpu (ed->hwNextED)))->ed_prev = ed->ed_prev;
+ ((ed_t *) bus_to_virt (le32_to_cpup (&ed->hwNextED)))->ed_prev = ed->ed_prev;
if (ed->ed_prev != NULL) {
ed->ed_prev->hwNextED = ed->hwNextED;
inter = 1;
for (ed_p = &(ohci->hcca.int_table[ep_rev (5, i)]);
*ed_p != 0;
- ed_p = &(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->hwNextED)) {
- inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpu (*ed_p)))->int_interval);
- if(((ed_t *) bus_to_virt (le32_to_cpu (*ed_p))) == ed) {
+ ed_p = &(((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->hwNextED)) {
+ inter = ep_rev (6, ((ed_t *) bus_to_virt (le32_to_cpup (ed_p)))->int_interval);
+ if(((ed_t *) bus_to_virt (le32_to_cpup (ed_p))) == ed) {
*ed_p = ed->hwNextED;
break;
}
td_pt = urb_priv->td [index];
/* fill the old dummy TD */
- td = (td_t *) bus_to_virt (le32_to_cpu (urb_priv->ed->hwTailP) & 0xfffffff0);
+ td = (td_t *) bus_to_virt (le32_to_cpup (&urb_priv->ed->hwTailP) & 0xfffffff0);
td->ed = urb_priv->ed;
td->index = index;
td->urb = urb;
td_t * td_rev = NULL;
td_t * td_list = NULL;
urb_priv_t * urb_priv = NULL;
- unsigned int flags;
+ unsigned long flags;
spin_lock_irqsave (&usb_ed_lock, flags);
td_list->next_dl_td = td_rev;
td_rev = td_list;
- td_list_hc = le32_to_cpu (td_list->hwNextTD) & 0xfffffff0;
+ td_list_hc = le32_to_cpup (&td_list->hwNextTD) & 0xfffffff0;
}
spin_unlock_irqrestore (&usb_ed_lock, flags);
return td_list;
static void dl_del_list (ohci_t * ohci, unsigned int frame)
{
- unsigned int flags;
+ unsigned long flags;
ed_t * ed;
__u32 edINFO;
td_t * td = NULL, * td_next = NULL, * tdHeadP = NULL, * tdTailP;
spin_lock_irqsave (&usb_ed_lock, flags);
for (ed = ohci->ed_rm_list[frame]; ed != NULL; ed = ed->ed_rm_list) {
- tdTailP = bus_to_virt (le32_to_cpu (ed->hwTailP) & 0xfffffff0);
- tdHeadP = bus_to_virt (le32_to_cpu (ed->hwHeadP) & 0xfffffff0);
- edINFO = le32_to_cpu (ed->hwINFO);
+ tdTailP = bus_to_virt (le32_to_cpup (&ed->hwTailP) & 0xfffffff0);
+ tdHeadP = bus_to_virt (le32_to_cpup (&ed->hwHeadP) & 0xfffffff0);
+ edINFO = le32_to_cpup (&ed->hwINFO);
td_p = &ed->hwHeadP;
for (td = tdHeadP; td != tdTailP; td = td_next) {
urb_t * urb = td->urb;
urb_priv_t * urb_priv = td->urb->hcpriv;
- td_next = bus_to_virt (le32_to_cpu (td->hwNextTD) & 0xfffffff0);
+ td_next = bus_to_virt (le32_to_cpup (&td->hwNextTD) & 0xfffffff0);
if ((urb_priv->state == URB_DEL) || (ed->state & ED_DEL)) {
*td_p = td->hwNextTD | (*td_p & cpu_to_le32 (0x3));
if(++ (urb_priv->td_cnt) == urb_priv->length)
urb_priv_t * urb_priv;
__u32 tdINFO, tdBE, tdCBP, edHeadP, edTailP;
__u16 tdPSW;
- unsigned int flags;
+ unsigned long flags;
while (td_list) {
td_list_next = td_list->next_dl_td;
spin_lock_irqsave (&usb_ed_lock, flags);
if (ed->state != ED_NEW) {
- edHeadP = le32_to_cpu (ed->hwHeadP) & 0xfffffff0;
- edTailP = le32_to_cpu (ed->hwTailP);
+ edHeadP = le32_to_cpup (&ed->hwHeadP) & 0xfffffff0;
+ edTailP = le32_to_cpup (&ed->hwTailP);
if((edHeadP == edTailP) && (ed->state == ED_OPER))
ep_unlink (ohci, ed); /* unlink eds if they are not busy */
ret = *(__u8 *) data;
for ( i = 0; i < num_ports; i++) {
- *(__u8 *) (data + i / 8) |=
+ *(__u8 *) (data + (i + 1) / 8) |=
((readl (&ohci->regs->roothub.portstatus[i]) & 0x001f0000) > 0? 1: 0) << ((i + 1) % 8);
- ret += *(__u8 *) (data + i / 8);
+ ret += *(__u8 *) (data + (i + 1) / 8);
}
len = i/8 + 1;
case RH_CLEAR_FEATURE | RH_CLASS:
switch (wValue) {
+ case RH_C_HUB_LOCAL_POWER:
+ OK(0);
case (RH_C_HUB_OVER_CURRENT):
- WR_RH_STAT(RH_PS_OCIC); OK (0);
+ WR_RH_STAT(RH_HS_OCIC); OK (0);
}
break;
writel (ohci->hc_control = 0xBF, &ohci->regs->control); /* USB Operational */
writel (mask, &ohci->regs->intrenable);
writel (mask, &ohci->regs->intrstatus);
+
+#ifdef OHCI_USE_NPS
+ writel ((readl(&ohci->regs->roothub.a) | 0x200) & ~0x100,
+ &ohci->regs->roothub.a);
+ writel (0x10000, &ohci->regs->roothub.status);
+ mdelay ((readl(&ohci->regs->roothub.a) >> 23) & 0x1fe);
+#endif /* OHCI_USE_NPS */
/* connect the virtual root hub */
struct ohci_regs * regs = ohci->regs;
int ints;
- if ((ohci->hcca.done_head != 0) && !(le32_to_cpu (ohci->hcca.done_head) & 0x01)) {
+ if ((ohci->hcca.done_head != 0) && !(le32_to_cpup (&ohci->hcca.done_head) & 0x01)) {
ints = OHCI_INTR_WDH;
} else {
if ((ints = (readl (®s->intrstatus) & readl (®s->intrenable))) == 0)
bus = usb_alloc_bus (&sohci_device_operations);
if (!bus) {
- free_pages ((unsigned int) ohci, 1);
+ free_pages ((unsigned long) ohci, 1);
return NULL;
}
/* unmap the IO address space */
iounmap (ohci->regs);
- free_pages ((unsigned int) ohci, 1);
+ free_pages ((unsigned long) ohci, 1);
}
/*-------------------------------------------------------------------------*/
static int hc_found_ohci (int irq, void * mem_base)
{
ohci_t * ohci;
- dbg("USB HC found: irq= %d membase= %x", irq, (int) mem_base);
+ dbg("USB HC found: irq= %d membase= %lx", irq, (unsigned long) mem_base);
ohci = hc_alloc_ohci (mem_base);
if (!ohci) {
static int hc_start_ohci (struct pci_dev * dev)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
- unsigned int mem_base = dev->resource[0].start;
+ unsigned long mem_base = dev->resource[0].start;
#else
- unsigned int mem_base = dev->base_address[0];
+ unsigned long mem_base = dev->base_address[0];
if (mem_base & PCI_BASE_ADDRESS_SPACE_IO) return -ENODEV;
mem_base &= PCI_BASE_ADDRESS_MEM_MASK;
#endif
pci_set_master (dev);
- mem_base = (unsigned int) ioremap_nocache (mem_base, 4096);
+ mem_base = (unsigned long) ioremap_nocache (mem_base, 4096);
if (!mem_base) {
err("Error mapping OHCI memory");
#define RH_PS_OCIC 0x00080000
#define RH_PS_PRSC 0x00100000
+/* Root hub status bits */
+#define RH_HS_LPS 0x00000001
+#define RH_HS_OCI 0x00000002
+#define RH_HS_DRWE 0x00008000
+#define RH_HS_LPSC 0x00010000
+#define RH_HS_OCIC 0x00020000
+#define RH_HS_CRWE 0x80000000
#define min(a,b) (((a)<(b))?(a):(b))
return (value);
}
+#if 0
static void ov511_dump_i2c_range( struct usb_device *dev, int reg1, int regn)
{
int i;
int rc;
for(i=reg1; i<=regn; i++) {
rc = ov511_i2c_read(dev, i);
+#if 0
+ PDEBUG("OV7610[0x%X] = 0x%X\n", i, rc);
+#endif
}
}
ov511_dump_reg_range(dev, 0xa0, 0xbf);
}
+#endif
+
+int ov511_i2c_reset(struct usb_device *dev)
+{
+ int rc;
+
+ PDEBUG("Reset 7610\n");
+ rc = ov511_i2c_write(dev, 0x12, 0x80);
+ if (rc < 0)
+ printk(KERN_ERR "ov511: i2c reset: command failed\n");
+
+ return rc;
+}
int ov511_reset(struct usb_device *dev, unsigned char reset_type)
{
{
int alt, multiplier, err;
+#if 0
PDEBUG("set packet size: %d\n", size);
+#endif
switch (size) {
case 992:
return 0;
}
+static int ov511_mode_init_regs(struct usb_ov511 *ov511,
+ int width, int height, int mode)
+{
+ int rc = 0;
+ struct usb_device *dev = ov511->dev;
+
+#if 0
+ PDEBUG("ov511_mode_init_regs(ov511, %d, %d, %d)\n",
+ width, height, mode);
+#endif
+ ov511_set_packet_size(ov511, 0);
+
+ /* Set mode consistent registers */
+ ov511_i2c_write(dev, 0x0f, 0x03);
+ ov511_i2c_write(dev, 0x10, 0xff);
+ ov511_i2c_write(dev, 0x13, 0x01);
+ ov511_i2c_write(dev, 0x16, 0x06);
+ ov511_i2c_write(dev, 0x20, 0x1c);
+ ov511_i2c_write(dev, 0x24, 0x2e); /* 10 */
+ ov511_i2c_write(dev, 0x25, 0x7c); /* 8a */
+ ov511_i2c_write(dev, 0x26, 0x70);
+ ov511_i2c_write(dev, 0x28, 0x24); /* 24 */
+ ov511_i2c_write(dev, 0x2b, 0xac);
+ ov511_i2c_write(dev, 0x2c, 0xfe);
+ ov511_i2c_write(dev, 0x2d, 0x93);
+ ov511_i2c_write(dev, 0x34, 0x8b);
+
+ if (width == 640 && height == 480) {
+ ov511_reg_write(dev, 0x12, 0x4f);
+ ov511_reg_write(dev, 0x13, 0x3d);
+ ov511_reg_write(dev, 0x14, 0x00);
+ ov511_reg_write(dev, 0x15, 0x00);
+ ov511_reg_write(dev, 0x18, 0x03);
+
+ ov511_i2c_write(dev, 0x11, 0x01);
+ ov511_i2c_write(dev, 0x12, 0x24);
+ ov511_i2c_write(dev, 0x14, 0x04);
+ ov511_i2c_write(dev, 0x35, 0x9e);
+ } else if (width == 320 && height == 240) {
+ ov511_reg_write(dev, 0x12, 0x27);
+ ov511_reg_write(dev, 0x13, 0x1f);
+ ov511_reg_write(dev, 0x14, 0x00);
+ ov511_reg_write(dev, 0x15, 0x00);
+ ov511_reg_write(dev, 0x18, 0x03);
+
+ ov511_i2c_write(dev, 0x11, 0x00);
+ ov511_i2c_write(dev, 0x12, 0x04);
+ ov511_i2c_write(dev, 0x14, 0x24);
+ ov511_i2c_write(dev, 0x35, 0x1e);
+ } else {
+ PDEBUG("ov511: Unknown mode (%d, %d): %d\n",
+ width, height, mode);
+ rc = -EINVAL;
+ }
+ ov511_set_packet_size(ov511, 993);
+
+ return rc;
+}
+
+
+/*************************************************************
+
+Turn a YUV4:2:0 block into an RGB block
+
+*************************************************************/
+#define LIMIT(x) ((((x)>0xffffff)?0xff0000:(((x)<=0xffff)?0:(x)&0xff0000))>>16)
+static inline void ov511_move_420_block(int y00, int y01, int y10, int y11,
+ int u, int v, int w,
+ unsigned char * pOut)
+{
+ int r = 68911 * v;
+ int g = -16915 * u + -35101 * v;
+ int b = 87097 * u;
+ y00 *= 49152;
+ y01 *= 49152;
+ y10 *= 49152;
+ y11 *= 49152;
+ *(pOut+w*3) = LIMIT(r + y10);
+ *pOut++ = LIMIT(r + y00);
+ *(pOut+w*3) = LIMIT(g + y10);
+ *pOut++ = LIMIT(g + y00);
+ *(pOut+w*3) = LIMIT(b + y10);
+ *pOut++ = LIMIT(b + y00);
+ *(pOut+w*3) = LIMIT(r + y11);
+ *pOut++ = LIMIT(r + y01);
+ *(pOut+w*3) = LIMIT(g + y11);
+ *pOut++ = LIMIT(g + y01);
+ *(pOut+w*3) = LIMIT(b + y11);
+ *pOut++ = LIMIT(b + y01);
+}
+
/***************************************************************
-For a 640x480 images, data shows up in 1200 384 byte segments. The
-first 128 bytes of each segment are probably some combo of UV but I
-haven't figured it out yet. The next 256 bytes are apparently Y
-data and represent 4 squares of 8x8 pixels as follows:
+For a 640x480 YUV4:2:0 images, data shows up in 1200 384 byte segments. The
+first 64 bytes of each segment are V, the next 64 are U. The V and
+U are arranged as follows:
+
+ 0 1 ... 7
+ 8 9 ... 15
+ ...
+ 56 57 ... 63
+
+The next 256 bytes are Y data and represent 4 squares of 8x8 pixels as
+follows:
0 1 ... 7 64 65 ... 71 ... 192 193 ... 199
8 9 ... 15 72 73 ... 79 200 201 ... 207
... ... ...
56 57 ... 63 120 121 127 248 249 ... 255
-Right now I'm only moving the Y data and haven't figured out
-the UV data.
-
If OV511_DUMPPIX is defined, _parse_data just dumps the
incoming segments, verbatim, in order, into the frame.
When used with vidcat -f ppm -s 640x480 this puts the data
this data is scrambled.
****************************************************************/
+#define HDIV 8
+#define WDIV (256/HDIV)
-static void ov511_parse_data(unsigned char * pIn,
- unsigned char * pOut,
- int iSegment)
+static void ov511_parse_data(unsigned char * pIn0,
+ unsigned char * pOut0,
+ int iWidth,
+ int iSegment)
{
-
#ifndef OV511_DUMPPIX
- int i, j, k, l, m;
- int iOut;
- unsigned char * pOut1;
-#define HDIV 8
-#define WDIV (256/HDIV)
- i = iSegment / (DEFAULT_WIDTH/ WDIV);
- j = iSegment - i * (DEFAULT_WIDTH/ WDIV);
- iOut = (i*HDIV*DEFAULT_WIDTH + j*WDIV) * 3;
- pOut += iOut;
- pIn += 128;
+ int k, l, m;
+ unsigned char * pIn;
+ unsigned char * pOut, * pOut1;
+
+ int iHalf = (iSegment / (iWidth / 32)) & 1;
+ int iY = iSegment / (iWidth / WDIV);
+ int jY = iSegment - iY * (iWidth / WDIV);
+ int iOutY = (iY*HDIV*iWidth + jY*WDIV) * 3;
+ int iUV = iSegment / (iWidth / WDIV * 2);
+ int jUV = iSegment - iUV * (iWidth / WDIV * 2);
+ int iOutUV = (iUV*HDIV*2*iWidth + jUV*WDIV/2) * 3;
+
+ /* Just copy the Y's if in the first stripe */
+ if (!iHalf) {
+ pIn = pIn0 + 128;
+ pOut = pOut0 + iOutY;
for(k=0; k<4; k++) {
pOut1 = pOut;
for(l=0; l<8; l++) {
for(m=0; m<8; m++) {
- *pOut1++ = *pIn;
- *pOut1++ = *pIn;
- *pOut1++ = *pIn++;
+ *pOut1 = *pIn++;
+ pOut1 += 3;
}
- pOut1 += (DEFAULT_WIDTH - 8) * 3;
+ pOut1 += (iWidth - 8) * 3;
}
pOut += 8 * 3;
}
+ }
+
+ /* Use the first half of VUs to calculate value */
+ pIn = pIn0;
+ pOut = pOut0 + iOutUV;
+ for(l=0; l<4; l++) {
+ for(m=0; m<8; m++) {
+ int y00 = *(pOut);
+ int y01 = *(pOut+3);
+ int y10 = *(pOut+iWidth*3);
+ int y11 = *(pOut+iWidth*3+3);
+ int u = *(pIn+64) - 128;
+ int v = *pIn++ - 128;
+ ov511_move_420_block(y00, y01, y10, y11, u, v, iWidth, pOut);
+ pOut += 6;
+ }
+ pOut += (iWidth*2 - 16) * 3;
+ }
+
+ /* Just copy the other UV rows */
+ for(l=0; l<4; l++) {
+ for(m=0; m<8; m++) {
+ *pOut++ = *(pIn + 64);
+ *pOut = *pIn++;
+ pOut += 5;
+ }
+ pOut += (iWidth*2 - 16) * 3;
+ }
+
+ /* Calculate values if it's the second half */
+ if (iHalf) {
+ pIn = pIn0 + 128;
+ pOut = pOut0 + iOutY;
+ for(k=0; k<4; k++) {
+ pOut1 = pOut;
+ for(l=0; l<4; l++) {
+ for(m=0; m<4; m++) {
+ int y10 = *(pIn+8);
+ int y00 = *pIn++;
+ int y11 = *(pIn+8);
+ int y01 = *pIn++;
+ int u = *pOut1 - 128;
+ int v = *(pOut1+1) - 128;
+ ov511_move_420_block(y00, y01, y10, y11, u, v, iWidth, pOut1);
+ pOut1 += 6;
+ }
+ pOut1 += (iWidth*2 - 8) * 3;
+ pIn += 8;
+ }
+ pOut += 8 * 3;
+ }
+ }
+
#else
/* Just dump pix data straight out for debug */
int i;
- pOut += iSegment * 384;
+ pOut0 += iSegment * 384;
for(i=0; i<384; i++) {
- *pOut++ = *pIn++;
+ *pOut0++ = *pIn0++;
}
#endif
}
cdata[4] | cdata[5] | cdata[6] | cdata[7]) == 0 &&
(cdata[8] & 8) && (cdata[8] & 0x80)) {
+#if 0
PDEBUG("Found Frame End!, packnum = %d\n", (int)(cdata[992]));
PDEBUG("Current frame = %d\n", ov511->curframe);
+#endif
if (frame->scanstate == STATE_LINES) {
if (waitqueue_active(&frame->wq)) {
+#if 0
PDEBUG("About to wake up waiting processes\n");
+#endif
frame->grabstate = FRAME_DONE;
+ ov511->curframe = -1;
wake_up_interruptible(&frame->wq);
}
}
else if ((cdata[0] | cdata[1] | cdata[2] | cdata[3] |
cdata[4] | cdata[5] | cdata[6] | cdata[7]) == 0 &&
(cdata[8] & 8)) {
+#if 0
PDEBUG("ov511: Found Frame Start!, packnum = %d\n", (int)(cdata[992]));
PDEBUG("ov511: Frame Header Byte = 0x%x\n", (int)(cdata[8]));
+#endif
frame->scanstate = STATE_LINES;
frame->segment = 0;
}
}
/* Parse the segments */
- while(iPix <= 992 - 384 && frame->segment < 1200) {
- ov511_parse_data(pData, frame->data, frame->segment);
+ while(iPix <= 992 - 384 &&
+ frame->segment < frame->width * frame->height / 256) {
+ ov511_parse_data(pData, frame->data,
+ frame->width,
+ frame->segment);
frame->segment++;
iPix += 384;
pData = &cdata[iPix];
}
/* Save extra data for next time */
- if (frame->segment < 1200) {
+ if (frame->segment < frame->width * frame->height / 256) {
memmove(ov511->scratch, pData, 992 - iPix);
ov511->scratchlen = 992 - iPix;
}
struct ov511_sbuf *sbuf;
int i;
-#if 0
- static int last_status, last_error_count, last_actual_length;
- if (last_status != urb->status ||
- last_error_count != urb->error_count ||
- last_actual_length != urb->actual_length) {
- PDEBUG("ov511_isoc_irq: %p status %d, errcount = %d, length = %d\n", urb, urb->status, urb->error_count, urb->actual_length);
- last_status = urb->status;
- last_error_count = urb->error_count;
- last_actual_length = urb->actual_length;
- }
-#endif
-
if (!ov511->streaming) {
PDEBUG("hmmm... not streaming, but got interrupt\n");
return;
sbuf = &ov511->sbuf[ov511->cursbuf];
/* Copy the data received into our scratch buffer */
- len = ov511_move_data(ov511, urb);
-#if 0
- /* If we don't have a frame we're current working on, complain */
- if (ov511->scratchlen) {
- if (ov511->curframe < 0) {
- // Macro - must be in braces!!
- PDEBUG("received data, but no frame available\n");
- } else
- ov511_parse_data(ov511);
+ if (ov511->curframe >= 0) {
+ len = ov511_move_data(ov511, urb);
}
-#endif
+
for (i = 0; i < FRAMES_PER_DESC; i++) {
sbuf->urb->iso_frame_desc[i].status = 0;
sbuf->urb->iso_frame_desc[i].actual_length = 0;
ov511->cursbuf = 0;
ov511->scratchlen = 0;
- ov511_reg_write(ov511->dev, 0x10, 0x00);
- ov511_reg_write(ov511->dev, 0x11, 0x01);
- ov511_reg_write(ov511->dev, 0x12, 0x4f);
- ov511_reg_write(ov511->dev, 0x13, 0x3d);
- ov511_reg_write(ov511->dev, 0x14, 0x00);
- ov511_reg_write(ov511->dev, 0x15, 0x00);
- ov511_reg_write(ov511->dev, 0x16, 0x01); /* 01 */
- ov511_reg_write(ov511->dev, 0x17, 0x00);
- ov511_reg_write(ov511->dev, 0x18, 0x03);
- ov511_reg_write(ov511->dev, 0x19, 0x00);
- ov511_reg_write(ov511->dev, 0x1a, 0x4f);
- ov511_reg_write(ov511->dev, 0x1b, 0x3b);
- ov511_reg_write(ov511->dev, 0x1c, 0x00);
- ov511_reg_write(ov511->dev, 0x1d, 0x00);
- ov511_reg_write(ov511->dev, 0x1e, 0x01);
- ov511_reg_write(ov511->dev, 0x1f, 0x06);
-
- ov511_reg_write(ov511->dev, 0x20, 0x01);
- ov511_reg_write(ov511->dev, 0x21, 0x01);
- ov511_reg_write(ov511->dev, 0x22, 0x01);
- ov511_reg_write(ov511->dev, 0x23, 0x1a);
-
- ov511_reg_write(ov511->dev, 0x30, 0x1f);
- ov511_reg_write(ov511->dev, 0x31, 0x03);
- ov511_reg_write(ov511->dev, 0x38, 0x00);
- ov511_reg_write(ov511->dev, 0x39, 0x00);
- ov511_reg_write(ov511->dev, 0x3e, 0x00);
-
- ov511_reg_write(ov511->dev, 0x50, 0x00);
- ov511_reg_write(ov511->dev, 0x51, 0x00);
- ov511_reg_write(ov511->dev, 0x52, 0x01);
- ov511_reg_write(ov511->dev, 0x53, 0x01);
- ov511_reg_write(ov511->dev, 0x5e, 0x5a);
- ov511_reg_write(ov511->dev, 0x5f, 0x00);
-
- ov511_reg_write(ov511->dev, 0x70, 0x01); /* 3f */
- ov511_reg_write(ov511->dev, 0x71, 0x01); /* 3f */
- ov511_reg_write(ov511->dev, 0x72, 0x01);
- ov511_reg_write(ov511->dev, 0x73, 0x01);
- ov511_reg_write(ov511->dev, 0x74, 0x01);
- ov511_reg_write(ov511->dev, 0x75, 0x01);
- ov511_reg_write(ov511->dev, 0x76, 0x01);
- ov511_reg_write(ov511->dev, 0x77, 0x01);
- ov511_reg_write(ov511->dev, 0x78, 0x00);
- ov511_reg_write(ov511->dev, 0x79, 0x00); /* 03 */
-
- ov511_reg_write(ov511->dev, 0x80, 0x10);
- ov511_reg_write(ov511->dev, 0x81, 0x21);
- ov511_reg_write(ov511->dev, 0x82, 0x32);
- ov511_reg_write(ov511->dev, 0x83, 0x43);
- ov511_reg_write(ov511->dev, 0x84, 0x11);
- ov511_reg_write(ov511->dev, 0x85, 0x21);
- ov511_reg_write(ov511->dev, 0x86, 0x32);
- ov511_reg_write(ov511->dev, 0x87, 0x44);
- ov511_reg_write(ov511->dev, 0x88, 0x11);
- ov511_reg_write(ov511->dev, 0x89, 0x22);
- ov511_reg_write(ov511->dev, 0x8a, 0x43);
- ov511_reg_write(ov511->dev, 0x8b, 0x44);
- ov511_reg_write(ov511->dev, 0x8c, 0x22);
- ov511_reg_write(ov511->dev, 0x8d, 0x32);
- ov511_reg_write(ov511->dev, 0x8e, 0x44);
- ov511_reg_write(ov511->dev, 0x8f, 0x44);
- ov511_reg_write(ov511->dev, 0x90, 0x22);
- ov511_reg_write(ov511->dev, 0x91, 0x43);
- ov511_reg_write(ov511->dev, 0x92, 0x54);
- ov511_reg_write(ov511->dev, 0x93, 0x55);
- ov511_reg_write(ov511->dev, 0x94, 0x33);
- ov511_reg_write(ov511->dev, 0x95, 0x44);
- ov511_reg_write(ov511->dev, 0x96, 0x55);
- ov511_reg_write(ov511->dev, 0x97, 0x55);
- ov511_reg_write(ov511->dev, 0x98, 0x43);
- ov511_reg_write(ov511->dev, 0x99, 0x44);
- ov511_reg_write(ov511->dev, 0x9a, 0x55);
- ov511_reg_write(ov511->dev, 0x9b, 0x55);
- ov511_reg_write(ov511->dev, 0x9c, 0x44);
- ov511_reg_write(ov511->dev, 0x9d, 0x44);
- ov511_reg_write(ov511->dev, 0x9e, 0x55);
- ov511_reg_write(ov511->dev, 0x9f, 0x55);
-
- ov511_reg_write(ov511->dev, 0xa0, 0x20);
- ov511_reg_write(ov511->dev, 0xa1, 0x32);
- ov511_reg_write(ov511->dev, 0xa2, 0x44);
- ov511_reg_write(ov511->dev, 0xa3, 0x44);
- ov511_reg_write(ov511->dev, 0xa4, 0x22);
- ov511_reg_write(ov511->dev, 0xa5, 0x42);
- ov511_reg_write(ov511->dev, 0xa6, 0x44);
- ov511_reg_write(ov511->dev, 0xa7, 0x44);
- ov511_reg_write(ov511->dev, 0xa8, 0x22);
- ov511_reg_write(ov511->dev, 0xa9, 0x43);
- ov511_reg_write(ov511->dev, 0xaa, 0x44);
- ov511_reg_write(ov511->dev, 0xab, 0x44);
- ov511_reg_write(ov511->dev, 0xac, 0x43);
- ov511_reg_write(ov511->dev, 0xad, 0x44);
- ov511_reg_write(ov511->dev, 0xae, 0x44);
- ov511_reg_write(ov511->dev, 0xaf, 0x44);
- ov511_reg_write(ov511->dev, 0xb0, 0x44);
- ov511_reg_write(ov511->dev, 0xb1, 0x44);
- ov511_reg_write(ov511->dev, 0xb2, 0x44);
- ov511_reg_write(ov511->dev, 0xb3, 0x44);
- ov511_reg_write(ov511->dev, 0xb4, 0x44);
- ov511_reg_write(ov511->dev, 0xb5, 0x44);
- ov511_reg_write(ov511->dev, 0xb6, 0x44);
- ov511_reg_write(ov511->dev, 0xb7, 0x44);
- ov511_reg_write(ov511->dev, 0xb8, 0x44);
- ov511_reg_write(ov511->dev, 0xb9, 0x44);
- ov511_reg_write(ov511->dev, 0xba, 0x44);
- ov511_reg_write(ov511->dev, 0xbb, 0x44);
- ov511_reg_write(ov511->dev, 0xbc, 0x44);
- ov511_reg_write(ov511->dev, 0xbd, 0x44);
- ov511_reg_write(ov511->dev, 0xbe, 0x44);
- ov511_reg_write(ov511->dev, 0xbf, 0x44);
-
- ov511_i2c_write(ov511->dev, 0x13, 0x01); /* 01 */
- ov511_i2c_write(ov511->dev, 0x00, 0x1E); /* 1E */
- ov511_i2c_write(ov511->dev, 0x01, 0x80); /* 80 */
- ov511_i2c_write(ov511->dev, 0x02, 0x80); /* 80 */
- ov511_i2c_write(ov511->dev, 0x03, 0x86); /* 86 */
- ov511_i2c_write(ov511->dev, 0x04, 0x80);
- ov511_i2c_write(ov511->dev, 0x05, 0xff); /* ff */
- ov511_i2c_write(ov511->dev, 0x06, 0x5a);
- ov511_i2c_write(ov511->dev, 0x07, 0xd4);
- ov511_i2c_write(ov511->dev, 0x08, 0x80);
- ov511_i2c_write(ov511->dev, 0x09, 0x80);
- ov511_i2c_write(ov511->dev, 0x0a, 0x80);
- ov511_i2c_write(ov511->dev, 0x0b, 0xe0);
- ov511_i2c_write(ov511->dev, 0x0c, 0x1f); /* 1f */
- ov511_i2c_write(ov511->dev, 0x0d, 0x1f); /* 1f */
- ov511_i2c_write(ov511->dev, 0x0e, 0x15); /* 15 */
- ov511_i2c_write(ov511->dev, 0x0f, 0x03);
- ov511_i2c_write(ov511->dev, 0x10, 0xff);
- ov511_i2c_write(ov511->dev, 0x11, 0x01);
- ov511_i2c_write(ov511->dev, 0x12, 0x24); /* 24 */
- ov511_i2c_write(ov511->dev, 0x14, 0x04);
- ov511_i2c_write(ov511->dev, 0x15, 0x01);
- ov511_i2c_write(ov511->dev, 0x16, 0x06);
- ov511_i2c_write(ov511->dev, 0x17, 0x38);
- ov511_i2c_write(ov511->dev, 0x18, 0x03);
- ov511_i2c_write(ov511->dev, 0x19, 0x05);
- ov511_i2c_write(ov511->dev, 0x1a, 0xf4);
- ov511_i2c_write(ov511->dev, 0x1b, 0x28);
- ov511_i2c_write(ov511->dev, 0x1c, 0x7f);
- ov511_i2c_write(ov511->dev, 0x1d, 0xa2);
- ov511_i2c_write(ov511->dev, 0x1e, 0xc4);
- ov511_i2c_write(ov511->dev, 0x1f, 0x04);
- ov511_i2c_write(ov511->dev, 0x20, 0x1c);
- ov511_i2c_write(ov511->dev, 0x21, 0x80);
- ov511_i2c_write(ov511->dev, 0x22, 0x80);
- ov511_i2c_write(ov511->dev, 0x23, 0x2a);
- ov511_i2c_write(ov511->dev, 0x24, 0x10); /* 10 */
- ov511_i2c_write(ov511->dev, 0x25, 0x8a); /* 8a */
- ov511_i2c_write(ov511->dev, 0x26, 0x70);
- ov511_i2c_write(ov511->dev, 0x27, 0xc2);
- ov511_i2c_write(ov511->dev, 0x28, 0x24);
- ov511_i2c_write(ov511->dev, 0x29, 0x11);
- ov511_i2c_write(ov511->dev, 0x2a, 0x04);
- ov511_i2c_write(ov511->dev, 0x2b, 0xac);
- ov511_i2c_write(ov511->dev, 0x2c, 0xfe);
- ov511_i2c_write(ov511->dev, 0x2d, 0x93);
- ov511_i2c_write(ov511->dev, 0x2e, 0x80);
- ov511_i2c_write(ov511->dev, 0x2f, 0xb0);
- ov511_i2c_write(ov511->dev, 0x30, 0x71);
- ov511_i2c_write(ov511->dev, 0x31, 0x90);
- ov511_i2c_write(ov511->dev, 0x32, 0x22);
- ov511_i2c_write(ov511->dev, 0x33, 0x20);
- ov511_i2c_write(ov511->dev, 0x34, 0x8b);
- ov511_i2c_write(ov511->dev, 0x35, 0x9e);
- ov511_i2c_write(ov511->dev, 0x36, 0x7f);
- ov511_i2c_write(ov511->dev, 0x37, 0x7f);
- ov511_i2c_write(ov511->dev, 0x38, 0x81);
-
- ov511_dump_i2c_regs(ov511->dev);
-
ov511_set_packet_size(ov511, 993);
/* We double buffer the Iso lists */
PDEBUG("sbuf[0] @ %p\n", ov511->sbuf[0].data);
PDEBUG("sbuf[1] @ %p\n", ov511->sbuf[1].data);
- /* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
- * (using read() instead). */
- ov511->frame[0].width = DEFAULT_WIDTH;
- ov511->frame[0].height = DEFAULT_HEIGHT;
- ov511->frame[0].bytes_read = 0;
- ov511->frame[1].width = DEFAULT_WIDTH;
- ov511->frame[1].height = DEFAULT_HEIGHT;
- ov511->frame[1].bytes_read = 0;
-
err = ov511_init_isoc(ov511);
if (err)
goto open_err_on2;
static int ov511_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
{
struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
-
+#if 0
PDEBUG("IOCtl: 0x%X\n", cmd);
-
+#endif
switch (cmd) {
case VIDIOCGCAP:
{
{
struct video_picture p;
- p.colour = 0x8000; /* Damn British people :) */
+ p.colour = 0x8000;
p.hue = 0x8000;
p.brightness = 180 << 8; /* XXX */
p.contrast = 192 << 8; /* XXX */
if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm)))
return -EFAULT;
+#if 0
PDEBUG("MCAPTURE\n");
PDEBUG("frame: %d, size: %dx%d, format: %d\n",
vm.frame, vm.width, vm.height, vm.format);
+#endif
if (vm.format != VIDEO_PALETTE_RGB24)
return -EINVAL;
/* Don't compress if the size changed */
if ((ov511->frame[vm.frame].width != vm.width) ||
- (ov511->frame[vm.frame].height != vm.height))
+ (ov511->frame[vm.frame].height != vm.height)) {
ov511->compress = 0;
+ ov511_mode_init_regs(ov511,
+ vm.width, vm.height, 0);
+#if 0
+ PDEBUG("ov511: Setting frame %d to (%d, %d) : %d\n",
+ vm.frame, vm.width, vm.height, 0);
+#endif
+ }
ov511->frame[vm.frame].width = vm.width;
ov511->frame[vm.frame].height = vm.height;
if (copy_from_user((void *)&frame, arg, sizeof(int)))
return -EFAULT;
+#if 0
PDEBUG("syncing to frame %d\n", frame);
-
+#endif
switch (ov511->frame[frame].grabstate) {
case FRAME_UNUSED:
return -EINVAL;
restart:
while (frame->grabstate == FRAME_GRABBING) {
- interruptible_sleep_on(&frame->wq);
+ interruptible_sleep_on(&ov511->frame[frmx].wq);
if (signal_pending(current))
return -EINTR;
}
0
};
+static int ov7610_configure(struct usb_device *dev)
+{
+ if(ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_WRITE,
+ OV7610_I2C_WRITE_ID) < 0)
+ return -1;
+
+ if(ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_READ,
+ OV7610_I2C_READ_ID) < 0)
+ return -1;
+
+ /* Reset the camera chip */
+ if (ov511_i2c_reset(dev) < 0)
+ return -1;
+
+#if 0
+ if(usb_ov511_reg_write(dev, OV511_REG_I2C_CLOCK_PRESCALER,
+ OV511_I2C_CLOCK_PRESCALER))
+ return -1;
+#endif
+
+ if (ov511_reset(dev, OV511_RESET_NOREGS) < 0)
+ return -1;
+
+ /* Dummy read to sync I2C */
+ if(ov511_i2c_read(dev, 0x00) < 0)
+ return -1;
+
+
+ if((ov511_i2c_read(dev, 0x1C) != 0x7F) ||
+ (ov511_i2c_read(dev, 0x1D) != 0xA2)) {
+ printk(KERN_ERR "ov511: Failed to read OV7610 ID. You might\n");
+ printk(KERN_ERR "ov511: not have an OV7610, or it may be\n");
+ printk(KERN_ERR "ov511: not responding. Report this to\n");
+ printk(KERN_ERR "ov511: mmcclelland@delphi.com\n");
+ return -1;
+ }
+
+ return 0;
+}
+
static int ov511_configure(struct usb_ov511 *ov511)
{
struct usb_device *dev = ov511->dev;
- int temprc; // DEBUG CODE
/* Set altsetting 0 */
if (usb_set_interface(dev, ov511->iface, 0) < 0) {
if (ov511_reset(dev, OV511_RESET_ALL) < 0)
goto error;
+ if(ov7610_configure(dev) < 0) {
+ printk(KERN_ERR "ov511: failed to configure OV7610\n");
+ goto error;
+ }
+
/* Disable compression */
if (ov511_reg_write(dev, OV511_OMNICE_ENABLE, 0x00) < 0) {
printk(KERN_ERR "ov511: disable compression: command failed\n");
goto error;
}
-// FIXME - error checking needed
- ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_WRITE,
- OV7610_I2C_WRITE_ID);
- ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_READ,
- OV7610_I2C_READ_ID);
-
-// DEBUG CODE
-// usb_ov511_reg_write(dev, OV511_REG_I2C_CLOCK_PRESCALER,
-// OV511_I2C_CLOCK_PRESCALER);
-
- if (ov511_reset(dev, OV511_RESET_NOREGS) < 0)
- goto error;
-
- /* Dummy read to sync I2C */
- ov511_i2c_read(dev, 0x1C);
-
-// DEBUG - TEST CODE FOR CAMERA REG READ
- temprc = ov511_i2c_read(dev, 0x1C);
-
- temprc = ov511_i2c_read(dev, 0x1D);
-// END DEBUG CODE
-
ov511->compress = 0;
+ /* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
+ * (using read() instead). */
+ ov511->frame[0].width = DEFAULT_WIDTH;
+ ov511->frame[0].height = DEFAULT_HEIGHT;
+ ov511->frame[0].bytes_read = 0;
+ ov511->frame[1].width = DEFAULT_WIDTH;
+ ov511->frame[1].height = DEFAULT_HEIGHT;
+ ov511->frame[1].bytes_read = 0;
+
+ /* Initialize to DEFAULT_WIDTH, DEFAULT_HEIGHT, YUV4:2:0 */
+ ov511_mode_init_regs(ov511, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);
+
return 0;
error:
#include <linux/module.h>
#include <linux/spinlock.h>
-#include "whiteheat.h"
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
+#include "whiteheat.h" /* firmware for the ConnectTech WhiteHEAT device */
+#endif
#define DEBUG
#include "usb.h"
-/* different configuration options to cut down on code size if you wish */
-#define CONFIG_BELKIN_SERIAL
-#define CONFIG_PERACOM_SERIAL
-#define CONFIG_VISOR_SERIAL
-#define CONFIG_WHITEHEAT_SERIAL
-#define CONFIG_GENERIC_SERIAL
-
/* Module information */
MODULE_AUTHOR("Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/");
MODULE_DESCRIPTION("USB Serial Driver");
-static __u16 vendor = 0;
-static __u16 product = 0;
+#ifdef CONFIG_USB_SERIAL_GENERIC
+static __u16 vendor = 0x05f7;
+static __u16 product = 0xffff;
MODULE_PARM(vendor, "i");
MODULE_PARM_DESC(vendor, "User specified USB idVendor");
MODULE_PARM(product, "i");
MODULE_PARM_DESC(product, "User specified USB idProduct");
-
+#endif
/* USB Serial devices vendor ids and device ids that this driver supports */
#define BELKIN_VENDOR_ID 0x056c
/* function prototypes for a "generic" type serial converter (no flow control, not all endpoints needed) */
+/* need to always compile these in, as some of the other devices use these functions as their own. */
static int generic_serial_open (struct tty_struct *tty, struct file *filp);
static void generic_serial_close (struct tty_struct *tty, struct file *filp);
static int generic_serial_write (struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
static int generic_write_room (struct tty_struct *tty);
static int generic_chars_in_buffer (struct tty_struct *tty);
+#ifdef CONFIG_USB_SERIAL_GENERIC
/* All of the device info needed for the Generic Serial Converter */
static struct usb_serial_device_type generic_device = {
name: "Generic",
write_room: generic_write_room,
chars_in_buffer: generic_chars_in_buffer,
};
+#endif
-
-#if defined(CONFIG_BELKIN_SERIAL) || defined(CONFIG_PERACOM_SERIAL)
+#if defined(CONFIG_USB_SERIAL_BELKIN) || defined(CONFIG_USB_SERIAL_PERACOM)
/* function prototypes for the eTek type converters (this includes Belkin and Peracom) */
static int etek_serial_open (struct tty_struct *tty, struct file *filp);
static void etek_serial_close (struct tty_struct *tty, struct file *filp);
#endif
-#ifdef CONFIG_BELKIN_SERIAL
+#ifdef CONFIG_USB_SERIAL_BELKIN
/* All of the device info needed for the Belkin Serial Converter */
static __u16 belkin_vendor_id = BELKIN_VENDOR_ID;
static __u16 belkin_product_id = BELKIN_SERIAL_CONVERTER;
#endif
-#ifdef CONFIG_PERACOM_SERIAL
+#ifdef CONFIG_USB_SERIAL_PERACOM
/* All of the device info needed for the Peracom Serial Converter */
static __u16 peracom_vendor_id = PERACOM_VENDOR_ID;
static __u16 peracom_product_id = PERACOM_SERIAL_CONVERTER;
#endif
-#ifdef CONFIG_WHITEHEAT_SERIAL
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
/* function prototypes for the Connect Tech WhiteHEAT serial converter */
static int whiteheat_serial_open (struct tty_struct *tty, struct file *filp);
static void whiteheat_serial_close (struct tty_struct *tty, struct file *filp);
#endif
-#ifdef CONFIG_VISOR_SERIAL
+#ifdef CONFIG_USB_SERIAL_VISOR
/* function prototypes for a handspring visor */
static int visor_serial_open (struct tty_struct *tty, struct file *filp);
static void visor_serial_close (struct tty_struct *tty, struct file *filp);
structure for that device, and add it to this list, making sure that the last
entry is NULL. */
static struct usb_serial_device_type *usb_serial_devices[] = {
+#ifdef CONFIG_USB_SERIAL_GENERIC
&generic_device,
-#ifdef CONFIG_WHITEHEAT_SERIAL
+#endif
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
&whiteheat_fake_device,
&whiteheat_device,
#endif
-#ifdef CONFIG_BELKIN_SERIAL
+#ifdef CONFIG_USB_SERIAL_BELKIN
&belkin_device,
#endif
-#ifdef CONFIG_PERACOM_SERIAL
+#ifdef CONFIG_USB_SERIAL_PERACOM
&peracom_device,
#endif
-#ifdef CONFIG_VISOR_SERIAL
+#ifdef CONFIG_USB_SERIAL_VISOR
&handspring_device,
#endif
NULL
}
-#if defined(CONFIG_BELKIN_SERIAL) || defined(CONFIG_PERACOM_SERIAL)
+#if defined(CONFIG_USB_SERIAL_BELKIN) || defined(CONFIG_USB_SERIAL_PERACOM)
/*****************************************************************************
* eTek specific driver functions
*****************************************************************************/
usb_unlink_urb (&serial->read_urb);
serial->active = 0;
}
-#endif /* defined(CONFIG_BELKIN_SERIAL) || defined(CONFIG_PERACOM_SERIAL) */
+#endif /* defined(CONFIG_USB_SERIAL_BELKIN) || defined(CONFIG_USB_SERIAL_PERACOM) */
-#ifdef CONFIG_WHITEHEAT_SERIAL
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
/*****************************************************************************
* Connect Tech's White Heat specific driver functions
*****************************************************************************/
/* we want this device to fail to have a driver assigned to it. */
return (1);
}
-#endif /* CONFIG_WHITEHEAT_SERIAL */
+#endif /* CONFIG_USB_SERIAL_WHITEHEAT */
-#ifdef CONFIG_VISOR_SERIAL
+#ifdef CONFIG_USB_SERIAL_VISOR
/******************************************************************************
* Handspring Visor specific driver functions
******************************************************************************/
return;
}
-#endif /* CONFIG_VISOR_SERIAL*/
+#endif /* CONFIG_USB_SERIAL_VISOR*/
/*****************************************************************************
void usb_show_string(struct usb_device *dev, char *id, int index);
#ifdef DEBUG
-#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n", ## arg)
+#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg)
#else
#define dbg(format, arg...) do {} while (0)
#endif
-#define err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n", ## arg)
-#define info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n", ## arg)
-#define warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n", ## arg)
+#define err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n" , ## arg)
+#define info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n" , ## arg)
+#define warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n" , ## arg)
/*
#define DUMMY_ROWS 25
#endif
-static const char *__init dummycon_startup(void)
+static const char *dummycon_startup(void)
{
return "dummy device";
}
+2000-01-02 a sun <asun@asun.cobalt.com>
+
+ * file.c (hfs_get_block): added hfs_get_block for regular files.
+
1999-04-12 a sun <asun@hecate.darksunrising.blah>
* file_hdr.c (hdr_read): added rootinfo behaviour for DID header.
* Try to add enough allocation blocks to 'fork'
* so that it is 'ablock' allocation blocks long.
*/
-static void grow_fork(struct hfs_fork *fork, int ablocks)
+static int grow_fork(struct hfs_fork *fork, int ablocks)
{
struct hfs_cat_entry *entry = fork->entry;
struct hfs_mdb *mdb = entry->mdb;
blocks = fork->psize;
need = ablocks - blocks/ablksz;
- if (need < 1) {
- return;
+ if (need < 1) { /* no need to grow the fork */
+ return 0;
}
/* round up to clumpsize */
/* find last extent record and try to extend it */
if (!(ext = find_ext(fork, blocks/ablksz - 1))) {
/* somehow we couldn't find the end of the file! */
- return;
+ return -1;
}
/* determine which is the last used extent in the record */
unlock_bitmap(mdb);
if (err) {
relse_ext(ext);
- return;
+ return -1;
}
zero_blocks(mdb, start, len);
unlock_bitmap(mdb);
if (!len || err) {
relse_ext(ext);
- return;
+ return -1;
}
zero_blocks(mdb, start, len);
lock_bitmap(mdb);
hfs_clear_vbm_bits(mdb, start, len);
unlock_bitmap(mdb);
- return;
+ return -1;
}
}
blocks = (fork->psize += len * ablksz);
}
set_cache(fork, ext);
relse_ext(ext);
- return;
+ return 0;
}
/*================ Global functions ================*/
ablock = block / ablksz;
if (block >= fork->psize) {
- if (create) {
- grow_fork(fork, ablock + 1);
- } else {
+ if (!create || (grow_fork(fork, ablock + 1) < 0))
return 0;
- }
}
#if defined(DEBUG_EXTENTS) || defined(DEBUG_ALL)
static hfs_rwret_t hfs_file_write(struct file *, const char *, hfs_rwarg_t,
loff_t *);
static void hfs_file_truncate(struct inode *);
-static int hfs_bmap(struct inode *, int);
+static int hfs_get_block(struct inode *, long, struct buffer_head *, int);
/*================ Global variables ================*/
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
- hfs_bmap, /* get_block */
+ hfs_get_block, /* get_block */
block_read_full_page, /* readpage */
NULL, /* writepage */
hfs_file_truncate, /* truncate */
}
/*
- * hfs_bmap()
+ * hfs_get_block
*
- * This is the bmap() field in the inode_operations structure for
+ * This is the hfs_get_block() field in the inode_operations structure for
* "regular" (non-header) files. The purpose is to translate an inode
* and a block number within the corresponding file into a physical
* block number. This function just calls hfs_extent_map() to do the
- * real work.
+ * real work and then stuffs the appropriate info into the buffer_head.
*/
-static int hfs_bmap(struct inode * inode, int block)
+int hfs_get_block(struct inode *inode, long iblock, struct buffer_head *bh_result, int create)
{
- return hfs_extent_map(HFS_I(inode)->fork, block, 0);
+ unsigned long phys;
+
+ phys = hfs_extent_map(HFS_I(inode)->fork, iblock, create);
+ if (phys) {
+ bh_result->b_dev = inode->i_dev;
+ bh_result->b_blocknr = phys;
+ bh_result->b_state |= (1UL << BH_Mapped);
+ if (create)
+ bh_result->b_state |= (1UL << BH_New);
+ return 0;
+ }
+
+ if (!create)
+ return 0;
+
+ /* we tried to add stuff, but we couldn't. send back an out-of-space
+ * error. */
+ return -ENOSPC;
}
+
/*
* hfs_file_read()
*
* 'filp->offset' bytes into the file. The data is transfered to
* user-space at the address 'buf'. Returns the number of bytes
* successfully transfered. This function checks the arguments, does
- * some setup and then calls hfs_do_read() to do the actual transfer.
- */
+ * some setup and then calls hfs_do_read() to do the actual transfer. */
static hfs_rwret_t hfs_file_read(struct file * filp, char * buf,
hfs_rwarg_t count, loff_t *ppos)
{
#define ndMapNode 0x02 /* Holds part of the bitmap of used nodes */
#define ndLeafNode 0xFF /* A leaf (ndNHeight==1) node */
+/*
+ * Legal values for the bthAtrb field of a (struct BTHdrRec)
+ *
+ * Reference: TN 1150
+ */
+#define bthBadClose 0x00000001 /* b-tree not closed properly. not
+ used by hfsplus. */
+#define bthBigKeys 0x00000002 /* key length is u16 instead of u8.
+ used by hfsplus. */
+#define bthVarIndxKeys 0x00000004 /* variable key length instead of
+ max key length. use din catalog
+ b-tree but not in extents
+ b-tree (hfsplus). */
+
/*================ Function-like macros ================*/
/* Access the cache slot which should contain the desired node */
hfs_word_t bthKeyLen; /* (F) The length of a key in an index node */
hfs_lword_t bthNNodes; /* (V) The total number of nodes */
hfs_lword_t bthFree; /* (V) The number of unused nodes */
- hfs_byte_t bthResv[76]; /* Reserved */
+ hfs_word_t bthResv1; /* reserved */
+ hfs_lword_t bthClpSiz; /* (F) clump size. not usually used. */
+ hfs_byte_t bthType; /* (F) BTree type */
+ hfs_byte_t bthResv2; /* reserved */
+ hfs_lword_t bthAtrb; /* (F) attributes */
+ hfs_lword_t bthResv3[16]; /* Reserved */
};
/*
this node in-core (set for
root and head) */
hfs_u32 node; /* Node number */
+ hfs_u16 nodeSize; /* node size */
+ hfs_u16 keyLen; /* key length */
/* locking related fields: */
hfs_wait_queue wqueue; /* Wait queue for write access */
hfs_wait_queue rqueue; /* Wait queue for read or reserve
int lock;
hfs_wait_queue wait;
int dirt;
+ int keySize;
/* Fields from the BTHdrRec in native byte-order: */
hfs_u32 bthRoot;
hfs_u32 bthNRecs;
}
if (fork == HFS_FK_DATA) {
+#if 0 /* XXX: disable crlf translations for now */
hfs_u32 type = hfs_get_nl(entry->info.file.finfo.fdType);
- fk = &entry->u.file.data_fork;
HFS_I(inode)->convert =
((HFS_SB(inode->i_sb)->s_conv == 't') ||
((HFS_SB(inode->i_sb)->s_conv == 'a') &&
((type == htonl(0x54455854)) || /* "TEXT" */
(type == htonl(0x7474726f))))); /* "ttro" */
+#else
+ HFS_I(inode)->convert = 0;
+#endif
+ fk = &entry->u.file.data_fork;
} else {
fk = &entry->u.file.rsrc_fork;
HFS_I(inode)->convert = 0;
char * tmp;
struct dentry * dentry;
- lock_kernel();
- error = -EPERM;
if (S_ISDIR(mode) || (!S_ISFIFO(mode) && !capable(CAP_MKNOD)))
- goto out;
+ return -EPERM;
tmp = getname(filename);
- error = PTR_ERR(tmp);
if (IS_ERR(tmp))
- goto out;
+ return PTR_ERR(tmp);
error = -EINVAL;
+ lock_kernel();
switch (mode & S_IFMT) {
case 0:
mode |= S_IFREG; /* fallthrough */
}
break;
}
+ unlock_kernel();
putname(tmp);
-out:
- unlock_kernel();
return error;
}
int error;
char * tmp;
- lock_kernel();
tmp = getname(pathname);
- error = PTR_ERR(tmp);
- if (!IS_ERR(tmp)) {
- error = do_mkdir(tmp,mode);
- putname(tmp);
- }
+ if(IS_ERR(tmp))
+ return PTR_ERR(tmp);
+ lock_kernel();
+ error = do_mkdir(tmp,mode);
unlock_kernel();
+ putname(tmp);
+
return error;
}
int error;
char * tmp;
- lock_kernel();
tmp = getname(pathname);
- error = PTR_ERR(tmp);
- if (!IS_ERR(tmp)) {
- error = do_rmdir(tmp);
- putname(tmp);
- }
+ if(IS_ERR(tmp))
+ return PTR_ERR(tmp);
+ lock_kernel();
+ error = do_rmdir(tmp);
unlock_kernel();
+
+ putname(tmp);
+
return error;
}
int error;
char * tmp;
- lock_kernel();
tmp = getname(pathname);
- error = PTR_ERR(tmp);
- if (!IS_ERR(tmp)) {
- error = do_unlink(tmp);
- putname(tmp);
- }
+ if(IS_ERR(tmp))
+ return PTR_ERR(tmp);
+ lock_kernel();
+ error = do_unlink(tmp);
unlock_kernel();
+ putname(tmp);
+
return error;
}
{
int error;
char * from;
+ char * to;
- lock_kernel();
from = getname(oldname);
- error = PTR_ERR(from);
- if (!IS_ERR(from)) {
- char * to;
- to = getname(newname);
- error = PTR_ERR(to);
- if (!IS_ERR(to)) {
- error = do_symlink(from,to);
- putname(to);
- }
- putname(from);
+ if(IS_ERR(from))
+ return PTR_ERR(from);
+ to = getname(newname);
+ error = PTR_ERR(to);
+ if (!IS_ERR(to)) {
+ lock_kernel();
+ error = do_symlink(from,to);
+ unlock_kernel();
+ putname(to);
}
- unlock_kernel();
+ putname(from);
return error;
}
{
int error;
char * from;
+ char * to;
- lock_kernel();
from = getname(oldname);
- error = PTR_ERR(from);
- if (!IS_ERR(from)) {
- char * to;
- to = getname(newname);
- error = PTR_ERR(to);
- if (!IS_ERR(to)) {
- error = do_link(from,to);
- putname(to);
- }
- putname(from);
+ if(IS_ERR(from))
+ return PTR_ERR(from);
+ to = getname(newname);
+ error = PTR_ERR(to);
+ if (!IS_ERR(to)) {
+ lock_kernel();
+ error = do_link(from,to);
+ unlock_kernel();
+ putname(to);
}
- unlock_kernel();
+ putname(from);
+
return error;
}
{
int error;
char * from;
+ char * to;
- lock_kernel();
from = getname(oldname);
- error = PTR_ERR(from);
- if (!IS_ERR(from)) {
- char * to;
- to = getname(newname);
- error = PTR_ERR(to);
- if (!IS_ERR(to)) {
- error = do_rename(from,to);
- putname(to);
- }
- putname(from);
+ if(IS_ERR(from))
+ return PTR_ERR(from);
+ to = getname(newname);
+ error = PTR_ERR(to);
+ if (!IS_ERR(to)) {
+ lock_kernel();
+ error = do_rename(from,to);
+ unlock_kernel();
+ putname(to);
}
- unlock_kernel();
+ putname(from);
return error;
}
&& (current->uid != server->m.mounted_uid)) {
return -EACCES;
}
- put_user(high2lowuid(server->m.mounted_uid), (old_uid_t *) arg);
+ put_user(NEW_TO_OLD_UID(server->m.mounted_uid), (old_uid_t *) arg);
return 0;
case NCP_IOC_GETMOUNTUID32:
switch (cmd)
{
case SMB_IOC_GETMOUNTUID:
- result = put_user(high2lowuid(server->mnt->mounted_uid), (old_uid_t *) arg);
+ result = put_user(NEW_TO_OLD_UID(server->mnt->mounted_uid), (old_uid_t *) arg);
break;
case SMB_IOC_GETMOUNTUID32:
result = put_user(server->mnt->mounted_uid, (uid_t *) arg);
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
-typedef unsigned int __kernel_uid32_t;
-typedef unsigned int __kernel_gid32_t;
typedef struct {
int val[2];
} __kernel_fsid_t;
+#ifdef __KERNEL__
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+typedef __kernel_uid_t __kernel_uid32_t;
+typedef __kernel_gid_t __kernel_gid32_t;
+#endif /* __KERNEL__ */
+
#ifdef __KERNEL__
#ifndef __GNUC__
#if defined(CONFIG_ARCH_A5K)
/* UART CLK PORT IRQ FLAGS */
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */
#else
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */
#endif
-#define arch_do_idle() do { } while (0)
+#define arch_do_idle() do { } while (0)
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
#define arch_do_idle() \
outb(0, IOMD_SUSMODE)
+#define arch_power_off() do { } while (0)
+
#endif
#define __ASM_ARCH_SYSTEM_H
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
* Translation of various region addresses to virtual addresses
*/
#define __io_pci(a) (PCIO_BASE + (a))
-#if 0
+#if 1
#define __mem_pci(a) ((unsigned long)(a))
#define __mem_isa(a) (PCIMEM_BASE + (unsigned long)(a))
#else
#define __arch_ioremap(off,size,nocache) \
({ \
unsigned long _off = (off), _size = (size); \
- void *_ret = NULL; \
+ void *_ret = (void *)0; \
if (valid_ioaddr(_off, _size)) \
_ret = __ioremap(io_to_phys(_off), _size, 0); \
_ret; \
static inline int fixup_irq(unsigned int irq)
{
#ifdef CONFIG_HOST_FOOTBRIDGE
- if (irq == isa_irq)
+ if (irq == isa_irq) {
irq = *(unsigned char *)PCIIACK_BASE;
+
+ /*
+ * The NetWinder appears to randomly give wrong interrupt
+ * numbers from time to time. When it does, map them to
+ * the unused IRQ 13
+ */
+ if (irq >= NR_IRQS) {
+ printk(KERN_ERR "Strange interrupt %d?\n", irq);
+ irq = _ISA_IRQ(13);
+ }
+ }
#endif
return irq;
#include <asm/leds.h>
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
#define arch_do_idle() do { } while (0)
#define arch_reset(mode) do { } while (0)
+#define arch_power_off() do { } while (0)
#endif
#include <asm/iomd.h>
#include <asm/io.h>
-#define arch_do_idle() cpu_do_idle()
+#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
/*
* linux/include/asm-arm/arch-brutus/hardware.h
*
- * Copyright (C) 1998 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
*
* This file contains the hardware definitions for SA1100 architecture
*/
/* Flushing areas */
#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
#define FLUSH_BASE 0xdf000000
-#define FLUSH_BASE_MINICACHE 0xde000000
+#define FLUSH_BASE_MINICACHE 0xdf800000
/*
* PCMCIA IO is mapped to 0xe0000000. We are likely to use in*()/out*()
--- /dev/null
+/*
+ * linux/include/asm-arm/arch-sa1100/ide.h
+ *
+ * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
+ *
+ */
+
+#ifdef CONFIG_BLK_DEV_IDE
+
+#include <asm/irq.h>
+#include <asm/arch/hardware.h>
+
+/*
+ * Set up a hw structure for a specified data port, control port and IRQ.
+ * This should follow whatever the default interface uses.
+ */
+static __inline__ void
+ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq)
+{
+ ide_ioreg_t reg;
+ int i;
+
+ memset(hw, 0, sizeof(*hw));
+
+#ifdef CONFIG_SA1100_EMPEG
+/* The Empeg board has the first two address lines unused */
+#define IO_SHIFT 2
+#else
+#define IO_SHIFT 0
+#endif
+
+ reg = (ide_ioreg_t) (data_port << IO_SHIFT);
+ for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
+ hw->io_ports[i] = reg;
+ reg += (1 << IO_SHIFT);
+ }
+ hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) (ctrl_port << IO_SHIFT);
+ hw->irq = irq;
+}
+
+/*
+ * This registers the standard ports for this architecture with the IDE
+ * driver.
+ */
+static __inline__ void
+ide_init_default_hwifs(void)
+{
+ hw_regs_t hw;
+
+#if defined( CONFIG_SA1100_EMPEG )
+ /* First, do the SA1100 setup */
+
+ /* PCMCIA IO space */
+ MECR=0x21062106;
+
+ /* Issue 3 is much neater than issue 2 */
+ GPDR&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Interrupts on rising edge: lines are inverted before they get to
+ the SA */
+ GRER&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+ GFER|=(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Take hard drives out of reset */
+ GPSR=(EMPEG_IDERESET);
+
+ /* Clear GEDR */
+ GEDR=0xffffffff;
+
+ /* Sonja and her successors have two IDE ports. */
+ /* MAC 23/4/1999, swap these round so that the left hand
+ hard disk is hda when viewed from the front. This
+ doesn't match the silkscreen however. */
+ ide_init_hwif_ports(&hw,0x10,0x1e,EMPEG_IRQ_IDE2);
+ ide_register_hw(&hw, NULL);
+ ide_init_hwif_ports(&hw,0x00,0x0e,EMPEG_IRQ_IDE1);
+ ide_register_hw(&hw, NULL);
+
+#elif defined( CONFIG_SA1100_VICTOR )
+ /* Enable appropriate GPIOs as interrupt lines */
+ GPDR &= ~GPIO_GPIO7;
+ GRER |= GPIO_GPIO7;
+ GFER &= ~GPIO_GPIO7;
+ GEDR = GPIO_GPIO7;
+ /* set the pcmcia interface timing */
+ MECR = 0x00060006;
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_GPIO7);
+ ide_register_hw(&hw, NULL);
+#else
+#error Missing IDE interface definition in include/asm/arch/ide.h
+#endif
+}
+
+#endif
+
/*
* linux/include/asm-arm/arch-sa1100/memory.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#ifndef __ASM_ARCH_MEMORY_H
* Task size: 3GB
*/
#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
-#define PHYS_OFFSET (0x00000000UL)
+
+/*
+ * Physical DRAM offset is 0xc0000000 on the SA1100
+ */
+#define PHYS_OFFSET (0xc0000000UL)
+
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
* The following gives a maximum memory size of 128MB (32MB in each bank).
- *
- * Does this still need to be optimised for one bank machines?
*/
-#define __virt_to_phys(x) (((x) & 0xe0ffffff) | ((x) & 0x06000000) << 2)
-#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x30000000) >> 2)
+#define __virt_to_phys(x) (((x) & 0xf9ffffff) | ((x) & 0x06000000) << 2)
+#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x18000000) >> 2)
/*
* Virtual view <-> DMA view memory address translations
/*
- * linux/include/asm-arm/arch-ebsa110/param.h
+ * linux/include/asm-arm/arch-sa1100/param.h
*/
/*
* include/asm-arm/arch-sa1100/serial.h
- * (C) 1999 Nicolas Pitre <nico@visuaide.com>
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
*
* All this is intended to be used with a 16550-like UART on the SA1100's
* PCMCIA bus. It has nothing to do with the SA1100's internal serial ports.
/*
* linux/include/asm-arm/arch-sa1100/system.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#include <linux/config.h>
#endif
+#if 0
+#define arch_do_idle() cpu_do_idle()
+#else
/* Enter SA1100 idle mode (see data sheet sec 9.5).
* It seems that the wait-on-interrupt just hang the CPU forever if it's
* on the end of a cache line. Workaround: we force an explicit alignment
" mcr p15, 0, %0, c15, c1, 2 @ Reenable clock switching \n" \
: : "r" (&ICIP) : "cc" ); \
} while (0)
+#endif
+
+#define arch_power_off() do { } while (0)
+
--- /dev/null
+/*
+ * linux/include/asm-arm/arch-brutus/uncompress.h
+ *
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
+ */
+
+
+#if defined(CONFIG_SA1100_EMPEG) || \
+ defined(CONFIG_SA1100_VICTOR) || \
+ defined(CONFIG_SA1100_LART)
+
+#include "hardware.h"
+#include "serial_reg.h"
+
+static volatile unsigned long* serial_port = (unsigned long*)_Ser3UTCR0;
+
+/*
+ * The following code assumes the serial port has already been
+ * initialized by the bootloader or such...
+ */
+
+static void puts( const char *s )
+{
+ int i;
+
+ for (i = 0; *s; i++, s++) {
+ /* wait for space in the UART's transmiter */
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+
+ /* send the character out. */
+ serial_port[UART_TX] = *s;
+
+ /* if a LF, also do CR... */
+ if (*s == 10) {
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+ serial_port[UART_TX] = 13;
+ }
+ }
+}
+
+#else
+
+#define puts( x )
+
+#endif
+
+
+/* Nothing to do for these */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
+
* IP checksum routines
*
* Copyright (C) Original authors of ../asm-i386/checksum.h
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1999 Russell King
*/
#ifndef __ASM_ARM_CHECKSUM_H
#define __ASM_ARM_CHECKSUM_H
unsigned int
csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#if 0
-/*
- * This combination is currently not used, but possible:
- */
-unsigned int
-csum_partial_copy_to_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#endif
-
/*
* These are the old (and unsafe) way of doing checksums, a warning message will be
* printed if they are used and an exception occurs.
*
* these functions should go away after some time.
*/
-#define csum_partial_copy_fromuser csum_partial_copy
-unsigned int
-csum_partial_copy(const char *src, char *dst, int len, int sum);
+#define csum_partial_copy(src,dst,len,sum) csum_partial_copy_nocheck(src,dst,len,sum)
/*
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
- *
- * Converted and optimised for ARM by R. M. King.
*/
static inline unsigned short
ip_fast_csum(unsigned char * iph, unsigned int ihl)
{
unsigned int sum, tmp1;
- __asm__ __volatile__(
- "sub %2, %2, #5 @ ip_fast_csum
+ __asm__ __volatile__(
+ "sub %2, %2, #5 @ ip_fast_csum
ldr %0, [%1], #4
ldr %3, [%1], #4
adds %0, %0, %3
mvn %0, %0
mov %0, %0, lsr #16
"
- : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1)
+ : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
: "1" (iph), "2" (ihl)
: "cc");
- return(sum);
+ return sum;
}
/*
csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned int proto, unsigned int sum)
{
- return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
+ __asm__(
+ "adds %0, %1, %2 @ csum_tcpudp_magic
+ adcs %0, %0, %3
+ adcs %0, %0, %4
+ adcs %0, %0, %5
+ adds %0, %0, %0, lsl #16
+ addcs %0, %0, #0x10000"
+ : "=&r"(sum)
+ : "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
+ : "cc");
+ return (~sum) >> 16;
}
#ifndef __ASM_ARM_DIV64
#define __ASM_ARM_DIV64
-/*
- * unsigned long long division. Yuck Yuck! What is Linux coming to?
- * This is 100% disgusting
- */
-#define do_div(n,base) \
-({ \
- unsigned long __low, __low2, __high, __rem; \
- __low = (n) & 0xffffffff; \
- __high = (n) >> 32; \
- if (__high) { \
- __rem = __high % (unsigned long)base; \
- __high = __high / (unsigned long)base; \
- __low2 = __low >> 16; \
- __low2 += __rem << 16; \
- __rem = __low2 % (unsigned long)base; \
- __low2 = __low2 / (unsigned long)base; \
- __low = __low & 0xffff; \
- __low += __rem << 16; \
- __rem = __low % (unsigned long)base; \
- __low = __low / (unsigned long)base; \
- n = __low + (__low2 << 16) + (__high << 32); \
- } else { \
- __rem = __low % (unsigned long)base; \
- n = (__low / (unsigned long)base); \
- } \
- __rem; \
+/* We're not 64-bit, but... */
+#define do_div(n,base) \
+({ \
+ int __res; \
+ __res = ((unsigned long)n) % (unsigned int)base; \
+ n = ((unsigned long)n) / (unsigned int)base; \
+ __res; \
})
#endif
#ifdef __KERNEL__
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
#include <asm/arch/memory.h>
extern __inline__ unsigned long virt_to_phys(volatile void *x)
extern void _memcpy_toio(unsigned long, const void *, unsigned long);
extern void _memset_io(unsigned long, int, unsigned long);
+#define __raw_writeb(val,addr) __arch_putb(val,addr)
+#define __raw_writew(val,addr) __arch_putw(val,addr)
+#define __raw_writel(val,addr) __arch_putl(val,addr)
+
+#define __raw_readb(addr) __arch_getb(addr)
+#define __raw_readw(addr) __arch_getw(addr)
+#define __raw_readl(addr) __arch_getl(addr)
+
/*
* If this architecture has PCI memory IO, then define the read/write
* macros.
#define isa_writew(val,addr) __arch_putw(val,__mem_isa(addr))
#define isa_writel(val,addr) __arch_putl(val,__mem_isa(addr))
#define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa((b)),(c))
+#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c))
#define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c))
#define isa_eth_io_copy_and_sum(a,b,c,d) \
- eth_copy_and_sum((a),__mem_isa((b),(c),(d))
+ eth_copy_and_sum((a),__mem_isa(b),(c),(d))
static inline int
isa_check_signature(unsigned long io_addr, const unsigned char *signature,
#define IOMD_KARTRX __IOMD(0x004)
#define IOMD_KCTRL __IOMD(0x008)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IOLINES __IOMD(0x00C)
#endif
#define IOMD_IRQCLRA __IOMD(0x014)
#define IOMD_IRQMASKA __IOMD(0x018)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_SUSMODE __IOMD(0x01C)
+#endif
+
#define IOMD_IRQSTATB __IOMD(0x020)
#define IOMD_IRQREQB __IOMD(0x024)
#define IOMD_IRQMASKB __IOMD(0x028)
#define IOMD_FIQREQ __IOMD(0x034)
#define IOMD_FIQMASK __IOMD(0x038)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_CLKCTL __IOMD(0x03C)
+#endif
+
#define IOMD_T0CNTL __IOMD(0x040)
#define IOMD_T0LTCHL __IOMD(0x040)
#define IOMD_T0CNTH __IOMD(0x044)
#define IOMD_T1GO __IOMD(0x058)
#define IOMD_T1LATCH __IOMD(0x05c)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IRQSTATC __IOMD(0x060)
#define IOMD_IRQREQC __IOMD(0x064)
#define IOMD_IRQMASKC __IOMD(0x068)
#ifdef CONFIG_ARCH_RPC
#define IOMD_DRAMCR __IOMD(0x088)
#endif
-#define IOMD_VREFCR __IOMD(0x08C)
+#define IOMD_REFCR __IOMD(0x08C)
#define IOMD_FSIZE __IOMD(0x090)
#define IOMD_ID0 __IOMD(0x094)
#define IOMD_MOUSEY __IOMD(0x0A4)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_MSEDAT __IOMD(0x0A8)
#define IOMD_MSECTL __IOMD(0x0Ac)
#endif
#ifdef CONFIG_ARCH_RPC
#define IOMD_DMAEXT __IOMD(0x0CC)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_ASTCR __IOMD(0x0CC)
#define IOMD_DRAMCR __IOMD(0x0D0)
#define IOMD_SELFREF __IOMD(0x0D4)
#include <asm/arch/memory.h>
-#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
-#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x) __virt_to_phys((unsigned long)(x))
+#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
+#define MAP_NR(addr) ((__pa(addr) - PHYS_OFFSET) >> PAGE_SHIFT)
#endif
#ifndef __ARCH_ARM_POSIX_TYPES_H
#define __ARCH_ARM_POSIX_TYPES_H
+#if defined(__KERNEL__)
+#include <linux/config.h>
+#endif /* __KERNEL__ */
+
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
-#ifdef __KERNEL__
-#define UID16_COMPAT_NEEDED
+#if defined(__KERNEL__) && defined(CONFIG_UID16)
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
-#endif /* __KERNEL__ */
+#endif /* __KERNEL__ && CONFIG_UID16 */
#ifdef __GNUC__
typedef long long __kernel_loff_t;
eor r0, r0, #0x44 << 24
eor r0, r0, #0x01 << 16
eor r0, r0, #0xA1 << 8
- movs r0, r0, lsr #4
+ movs r0, r0, lsr #5
mcreq p15, 0, r0, c7, c5, 0 @ flush I cache
mrceq p15, 0, r0, c1, c0
orreq r0, r0, #1 << 12
# define CPU_NAME sa110
# endif
# endif
+# ifdef CONFIG_CPU_SA1100
+# ifdef CPU_NAME
+# undef MULTI_CPU
+# define MULTI_CPU
+# else
+# define CPU_NAME sa1100
+# endif
+# endif
#endif
#ifndef MULTI_CPU
unsigned long arm_lr;
unsigned long arm_pc;
unsigned long arm_cpsr;
+ unsigned long fault_address;
};
unsigned long __unused5;
};
-/* Someone please add a glibc/arm compatible stat64 struct here. */
+/* This matches struct stat64 in glibc2.1, hence the absolutely
+ * insane amounts of padding around dev_t's.
+ */
+struct stat64 {
+ unsigned short st_dev;
+ unsigned char __pad0[10];
+
+ unsigned long st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned short st_rdev;
+ unsigned char __pad3[10];
+
+ long long st_size;
+ unsigned long st_blksize;
+
+ unsigned long st_blocks; /* Number 512-byte blocks allocated. */
+ unsigned long __pad4; /* future possible st_blocks high bits */
+
+ unsigned long st_atime;
+ unsigned long __pad5;
+
+ unsigned long st_mtime;
+ unsigned long __pad6;
+
+ unsigned long st_ctime;
+ unsigned long __pad7; /* will be high 32 bits of ctime someday */
+
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
#endif
#define __HAVE_ARCH_MEMSET
extern void __memzero(void *ptr, __kernel_size_t n);
-extern void __memset(void *ptr, int v, __kernel_size_t n);
#define memset(p,v,n) \
({ \
if (__builtin_constant_p((v)) && (v) == 0) \
__memzero((p),(n)); \
else \
- __memset((p),(v),(n)); \
+ memset((p),(v),(n)); \
} \
(p); \
})
#define MACH_TYPE_LACIE_NAS 13
#define MACH_TYPE_CLPS7500 14
#define MACH_TYPE_SHARK 15
+#define MACH_TYPE_SA1100 16
/*
* Sort out a definition for machine_arch_type
# define machine_is_co285() (0)
#endif
+#ifdef CONFIG_ARCH_SA1100
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_SA1100
+# endif
+# define machine_is_sa1100() (machine_arch_type == MACH_TYPE_SA1100
+#else
+# define machine_is_sa1100() (0)
+#endif
+
#ifndef machine_arch_type
#define machine_arch_type __machine_arch_type
#endif
* This file contains the system call numbers.
*/
-#define __NR_setup (__NR_SYSCALL_BASE+ 0) /* used only by init, to get system going */
#define __NR_exit (__NR_SYSCALL_BASE+ 1)
#define __NR_fork (__NR_SYSCALL_BASE+ 2)
#define __NR_read (__NR_SYSCALL_BASE+ 3)
#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
#define __NR_break (__NR_SYSCALL_BASE+ 17)
-#define __NR_oldstat (__NR_SYSCALL_BASE+ 18)
+
#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
#define __NR_mount (__NR_SYSCALL_BASE+ 21)
#define __NR_stime (__NR_SYSCALL_BASE+ 25)
#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
-#define __NR_oldfstat (__NR_SYSCALL_BASE+ 28)
+
#define __NR_pause (__NR_SYSCALL_BASE+ 29)
#define __NR_utime (__NR_SYSCALL_BASE+ 30)
#define __NR_stty (__NR_SYSCALL_BASE+ 31)
#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
-#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76)
+#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
#define __NR_select (__NR_SYSCALL_BASE+ 82)
#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
-#define __NR_oldlstat (__NR_SYSCALL_BASE+ 84)
+
#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
/* 188 reserved */
/* 189 reserved */
#define __NR_vfork (__NR_SYSCALL_BASE+190)
-#define __NR_getrlimit (__NR_SYSCALL_BASE+191)
+#define __NR_getrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
#ifndef __ARCH_I386_POSIX_TYPES_H
#define __ARCH_I386_POSIX_TYPES_H
+#if defined(__KERNEL__)
+#include <linux/config.h>
+#endif /* __KERNEL__ */
+
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
-#ifdef __KERNEL__
-#define UID16_COMPAT_NEEDED
+#if defined(__KERNEL__) && defined(CONFIG_UID16)
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
#endif /* __KERNEL__ */
#ifndef __ARCH_M68K_POSIX_TYPES_H
#define __ARCH_M68K_POSIX_TYPES_H
+#if defined(__KERNEL__)
+#include <linux/config.h>
+#endif /* __KERNEL__ */
+
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
-#ifdef __KERNEL__
-#define UID16_COMPAT_NEEDED
+#if defined(__KERNEL__) && defined(CONFIG_UID16)
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
#endif /* __KERNEL__ */
-/* $Id: a.out.h,v 1.12 1998/02/05 14:20:00 jj Exp $ */
+/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */
#ifndef __SPARC_A_OUT_H__
#define __SPARC_A_OUT_H__
#ifdef __KERNEL__
-#include <linux/config.h>
-#include <asm/btfixup.h>
+#include <asm/page.h>
-#ifdef CONFIG_SUN4
-
-#define STACK_TOP (0xefffe000UL)
-
-#else
-
-extern unsigned long stack_top;
-
-# ifndef MODULE
-
- BTFIXUPDEF_SETHI_INIT(stack_top,0xeffff000)
-
-# define STACK_TOP ((unsigned long)BTFIXUP_SETHI(stack_top))
-
-# else /* MODULE */
-
-# define STACK_TOP (stack_top)
-
-# endif /* MODULE */
-
-#endif /* !CONFIG_SUN4 */
+#define STACK_TOP (PAGE_OFFSET - PAGE_SIZE)
#endif /* __KERNEL__ */
#define ASIZ_task_exec_domain 0x00000004
#define AOFF_task_need_resched 0x00000014
#define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_avg_slice 0x00000018
+#define ASIZ_task_avg_slice 0x00000004
+#define AOFF_task_lock_depth 0x0000001c
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000020
#define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000024
#define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
-#define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_policy 0x00000028
+#define ASIZ_task_policy 0x00000004
+#define AOFF_task_mm 0x0000002c
+#define ASIZ_task_mm 0x00000004
+#define AOFF_task_active_mm 0x00000030
+#define ASIZ_task_active_mm 0x00000004
+#define AOFF_task_has_cpu 0x00000034
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x00000038
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
-#define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
-#define ASIZ_task_prev_task 0x00000004
#define AOFF_task_run_list 0x0000003c
#define ASIZ_task_run_list 0x00000008
-#define AOFF_task_binfmt 0x00000044
+#define AOFF_task_next_task 0x00000044
+#define ASIZ_task_next_task 0x00000004
+#define AOFF_task_prev_task 0x00000048
+#define ASIZ_task_prev_task 0x00000004
+#define AOFF_task_last_processor 0x0000004c
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000050
#define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x00000048
+#define AOFF_task_exit_code 0x00000054
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000004c
+#define AOFF_task_exit_signal 0x00000058
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000050
+#define AOFF_task_pdeath_signal 0x0000005c
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000054
+#define AOFF_task_personality 0x00000060
#define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x0000005c
+#define AOFF_task_pid 0x00000068
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000060
+#define AOFF_task_pgrp 0x0000006c
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000064
+#define AOFF_task_tty_old_pgrp 0x00000070
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x00000068
+#define AOFF_task_session 0x00000074
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x0000006c
+#define AOFF_task_leader 0x00000078
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000070
+#define AOFF_task_p_opptr 0x0000007c
#define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000074
+#define AOFF_task_p_pptr 0x00000080
#define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x00000078
+#define AOFF_task_p_cptr 0x00000084
#define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x0000007c
+#define AOFF_task_p_ysptr 0x00000088
#define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000080
+#define AOFF_task_p_osptr 0x0000008c
#define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000084
+#define AOFF_task_pidhash_next 0x00000090
#define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x00000088
+#define AOFF_task_pidhash_pprev 0x00000094
#define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_wait_chldexit 0x0000008c
+#define AOFF_task_wait_chldexit 0x00000098
#define ASIZ_task_wait_chldexit 0x00000010
-#define AOFF_task_vfork_sem 0x0000009c
+#define AOFF_task_vfork_sem 0x000000a8
#define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x000000a0
-#define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000a4
+#define AOFF_task_rt_priority 0x000000ac
#define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000a8
+#define AOFF_task_it_real_value 0x000000b0
#define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000ac
+#define AOFF_task_it_prof_value 0x000000b4
#define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000b0
+#define AOFF_task_it_virt_value 0x000000b8
#define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000b4
+#define AOFF_task_it_real_incr 0x000000bc
#define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000b8
+#define AOFF_task_it_prof_incr 0x000000c0
#define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000bc
+#define AOFF_task_it_virt_incr 0x000000c4
#define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000c0
+#define AOFF_task_real_timer 0x000000c8
#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000d4
+#define AOFF_task_times 0x000000dc
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000e4
+#define AOFF_task_start_time 0x000000ec
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000e8
+#define AOFF_task_per_cpu_utime 0x000000f0
#define ASIZ_task_per_cpu_utime 0x00000004
-#define AOFF_task_min_flt 0x000000f0
+#define AOFF_task_min_flt 0x000000f8
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000000f4
+#define AOFF_task_maj_flt 0x000000fc
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000000f8
+#define AOFF_task_nswap 0x00000100
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000000fc
+#define AOFF_task_cmin_flt 0x00000104
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000100
+#define AOFF_task_cmaj_flt 0x00000108
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000104
+#define AOFF_task_cnswap 0x0000010c
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x0000010a
-#define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x0000010c
-#define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x0000010e
-#define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x00000110
-#define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x00000112
-#define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000114
-#define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x00000116
-#define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x00000118
-#define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x0000011c
+#define AOFF_task_uid 0x00000114
+#define ASIZ_task_uid 0x00000004
+#define AOFF_task_euid 0x00000118
+#define ASIZ_task_euid 0x00000004
+#define AOFF_task_suid 0x0000011c
+#define ASIZ_task_suid 0x00000004
+#define AOFF_task_fsuid 0x00000120
+#define ASIZ_task_fsuid 0x00000004
+#define AOFF_task_gid 0x00000124
+#define ASIZ_task_gid 0x00000004
+#define AOFF_task_egid 0x00000128
+#define ASIZ_task_egid 0x00000004
+#define AOFF_task_sgid 0x0000012c
+#define ASIZ_task_sgid 0x00000004
+#define AOFF_task_fsgid 0x00000130
+#define ASIZ_task_fsgid 0x00000004
+#define AOFF_task_ngroups 0x00000134
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000120
-#define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x00000160
+#define AOFF_task_groups 0x00000138
+#define ASIZ_task_groups 0x00000080
+#define AOFF_task_cap_effective 0x000001b8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000164
+#define AOFF_task_cap_inheritable 0x000001bc
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000168
+#define AOFF_task_cap_permitted 0x000001c0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x0000016c
+#define AOFF_task_user 0x000001c4
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000170
+#define AOFF_task_rlim 0x000001c8
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000001c0
+#define AOFF_task_used_math 0x00000218
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000001c2
+#define AOFF_task_comm 0x0000021a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000001d4
+#define AOFF_task_link_count 0x0000022c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000001d8
+#define AOFF_task_tty 0x00000230
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000001dc
+#define AOFF_task_semundo 0x00000234
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000001e0
+#define AOFF_task_semsleeping 0x00000238
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x000001e8
+#define AOFF_task_thread 0x00000240
#define ASIZ_task_thread 0x00000388
-#define AOFF_task_fs 0x00000570
+#define AOFF_task_fs 0x000005c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x00000574
+#define AOFF_task_files 0x000005cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_mm 0x00000578
-#define ASIZ_task_mm 0x00000004
-#define AOFF_task_active_mm 0x0000057c
-#define ASIZ_task_active_mm 0x00000004
-#define AOFF_task_sigmask_lock 0x00000580
+#define AOFF_task_sigmask_lock 0x000005d0
#define ASIZ_task_sigmask_lock 0x00000000
-#define AOFF_task_sig 0x00000580
+#define AOFF_task_sig 0x000005d0
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x00000584
+#define AOFF_task_signal 0x000005d4
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x0000058c
+#define AOFF_task_blocked 0x000005dc
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000594
+#define AOFF_task_sigqueue 0x000005e4
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x00000598
+#define AOFF_task_sigqueue_tail 0x000005e8
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x0000059c
+#define AOFF_task_sas_ss_sp 0x000005ec
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000005a0
+#define AOFF_task_sas_ss_size 0x000005f0
#define ASIZ_task_sas_ss_size 0x00000004
+#define AOFF_task_parent_exec_id 0x000005f4
+#define ASIZ_task_parent_exec_id 0x00000004
+#define AOFF_task_self_exec_id 0x000005f8
+#define ASIZ_task_self_exec_id 0x00000004
+#define AOFF_task_exit_sem 0x000005fc
+#define ASIZ_task_exit_sem 0x0000001c
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
#define ASIZ_thread_core_exec 0x00000020
#define AOFF_thread_new_signal 0x00000380
#define ASIZ_thread_new_signal 0x00000004
+#define AOFF_thread_refcount 0x00000384
+#define ASIZ_thread_refcount 0x00000004
#else /* CONFIG_SMP */
#define ASIZ_task_exec_domain 0x00000004
#define AOFF_task_need_resched 0x00000014
#define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_avg_slice 0x00000018
+#define ASIZ_task_avg_slice 0x00000004
+#define AOFF_task_lock_depth 0x0000001c
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000020
#define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000024
#define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
-#define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_policy 0x00000028
+#define ASIZ_task_policy 0x00000004
+#define AOFF_task_mm 0x0000002c
+#define ASIZ_task_mm 0x00000004
+#define AOFF_task_active_mm 0x00000030
+#define ASIZ_task_active_mm 0x00000004
+#define AOFF_task_has_cpu 0x00000034
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x00000038
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
-#define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
-#define ASIZ_task_prev_task 0x00000004
#define AOFF_task_run_list 0x0000003c
#define ASIZ_task_run_list 0x00000008
-#define AOFF_task_binfmt 0x00000044
+#define AOFF_task_next_task 0x00000044
+#define ASIZ_task_next_task 0x00000004
+#define AOFF_task_prev_task 0x00000048
+#define ASIZ_task_prev_task 0x00000004
+#define AOFF_task_last_processor 0x0000004c
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000050
#define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x00000048
+#define AOFF_task_exit_code 0x00000054
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000004c
+#define AOFF_task_exit_signal 0x00000058
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000050
+#define AOFF_task_pdeath_signal 0x0000005c
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000054
+#define AOFF_task_personality 0x00000060
#define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x0000005c
+#define AOFF_task_pid 0x00000068
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000060
+#define AOFF_task_pgrp 0x0000006c
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000064
+#define AOFF_task_tty_old_pgrp 0x00000070
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x00000068
+#define AOFF_task_session 0x00000074
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x0000006c
+#define AOFF_task_leader 0x00000078
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000070
+#define AOFF_task_p_opptr 0x0000007c
#define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000074
+#define AOFF_task_p_pptr 0x00000080
#define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x00000078
+#define AOFF_task_p_cptr 0x00000084
#define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x0000007c
+#define AOFF_task_p_ysptr 0x00000088
#define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000080
+#define AOFF_task_p_osptr 0x0000008c
#define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000084
+#define AOFF_task_pidhash_next 0x00000090
#define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x00000088
+#define AOFF_task_pidhash_pprev 0x00000094
#define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_wait_chldexit 0x0000008c
+#define AOFF_task_wait_chldexit 0x00000098
#define ASIZ_task_wait_chldexit 0x00000018
-#define AOFF_task_vfork_sem 0x000000a4
+#define AOFF_task_vfork_sem 0x000000b0
#define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x000000a8
-#define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000ac
+#define AOFF_task_rt_priority 0x000000b4
#define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000b0
+#define AOFF_task_it_real_value 0x000000b8
#define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000b4
+#define AOFF_task_it_prof_value 0x000000bc
#define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000b8
+#define AOFF_task_it_virt_value 0x000000c0
#define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000bc
+#define AOFF_task_it_real_incr 0x000000c4
#define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000c0
+#define AOFF_task_it_prof_incr 0x000000c8
#define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000c4
+#define AOFF_task_it_virt_incr 0x000000cc
#define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000c8
+#define AOFF_task_real_timer 0x000000d0
#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000dc
+#define AOFF_task_times 0x000000e4
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000ec
+#define AOFF_task_start_time 0x000000f4
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000f0
+#define AOFF_task_per_cpu_utime 0x000000f8
#define ASIZ_task_per_cpu_utime 0x00000080
-#define AOFF_task_min_flt 0x000001f0
+#define AOFF_task_min_flt 0x000001f8
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000001f4
+#define AOFF_task_maj_flt 0x000001fc
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000001f8
+#define AOFF_task_nswap 0x00000200
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000001fc
+#define AOFF_task_cmin_flt 0x00000204
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000200
+#define AOFF_task_cmaj_flt 0x00000208
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000204
+#define AOFF_task_cnswap 0x0000020c
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x0000020a
-#define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x0000020c
-#define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x0000020e
-#define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x00000210
-#define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x00000212
-#define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000214
-#define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x00000216
-#define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x00000218
-#define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x0000021c
+#define AOFF_task_uid 0x00000214
+#define ASIZ_task_uid 0x00000004
+#define AOFF_task_euid 0x00000218
+#define ASIZ_task_euid 0x00000004
+#define AOFF_task_suid 0x0000021c
+#define ASIZ_task_suid 0x00000004
+#define AOFF_task_fsuid 0x00000220
+#define ASIZ_task_fsuid 0x00000004
+#define AOFF_task_gid 0x00000224
+#define ASIZ_task_gid 0x00000004
+#define AOFF_task_egid 0x00000228
+#define ASIZ_task_egid 0x00000004
+#define AOFF_task_sgid 0x0000022c
+#define ASIZ_task_sgid 0x00000004
+#define AOFF_task_fsgid 0x00000230
+#define ASIZ_task_fsgid 0x00000004
+#define AOFF_task_ngroups 0x00000234
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000220
-#define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x00000260
+#define AOFF_task_groups 0x00000238
+#define ASIZ_task_groups 0x00000080
+#define AOFF_task_cap_effective 0x000002b8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000264
+#define AOFF_task_cap_inheritable 0x000002bc
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000268
+#define AOFF_task_cap_permitted 0x000002c0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x0000026c
+#define AOFF_task_user 0x000002c4
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000270
+#define AOFF_task_rlim 0x000002c8
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000002c0
+#define AOFF_task_used_math 0x00000318
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000002c2
+#define AOFF_task_comm 0x0000031a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000002d4
+#define AOFF_task_link_count 0x0000032c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000002d8
+#define AOFF_task_tty 0x00000330
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000002dc
+#define AOFF_task_semundo 0x00000334
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000002e0
+#define AOFF_task_semsleeping 0x00000338
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x000002e8
+#define AOFF_task_thread 0x00000340
#define ASIZ_task_thread 0x00000388
-#define AOFF_task_fs 0x00000670
+#define AOFF_task_fs 0x000006c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x00000674
+#define AOFF_task_files 0x000006cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_mm 0x00000678
-#define ASIZ_task_mm 0x00000004
-#define AOFF_task_active_mm 0x0000067c
-#define ASIZ_task_active_mm 0x00000004
-#define AOFF_task_sigmask_lock 0x00000680
+#define AOFF_task_sigmask_lock 0x000006d0
#define ASIZ_task_sigmask_lock 0x00000008
-#define AOFF_task_sig 0x00000688
+#define AOFF_task_sig 0x000006d8
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x0000068c
+#define AOFF_task_signal 0x000006dc
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000694
+#define AOFF_task_blocked 0x000006e4
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x0000069c
+#define AOFF_task_sigqueue 0x000006ec
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x000006a0
+#define AOFF_task_sigqueue_tail 0x000006f0
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x000006a4
+#define AOFF_task_sas_ss_sp 0x000006f4
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000006a8
+#define AOFF_task_sas_ss_size 0x000006f8
#define ASIZ_task_sas_ss_size 0x00000004
+#define AOFF_task_parent_exec_id 0x000006fc
+#define ASIZ_task_parent_exec_id 0x00000004
+#define AOFF_task_self_exec_id 0x00000700
+#define ASIZ_task_self_exec_id 0x00000004
+#define AOFF_task_exit_sem 0x00000704
+#define ASIZ_task_exit_sem 0x00000024
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
#define ASIZ_thread_core_exec 0x00000020
#define AOFF_thread_new_signal 0x00000380
#define ASIZ_thread_new_signal 0x00000004
+#define AOFF_thread_refcount 0x00000384
+#define ASIZ_thread_refcount 0x00000004
#endif /* CONFIG_SMP */
--- /dev/null
+#ifndef _SPARC_IPCBUF_H
+#define _SPARC_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values (so that this structure matches
+ * sparc64 ipc64_perm)
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ unsigned short __pad1;
+ __kernel_mode_t mode;
+ unsigned short __pad2;
+ unsigned short seq;
+ unsigned long long __unused1;
+ unsigned long long __unused2;
+};
+
+#endif /* _SPARC_IPCBUF_H */
--- /dev/null
+#ifndef _SPARC64_MSGBUF_H
+#define _SPARC64_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ unsigned int __pad1;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned int __pad2;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned int __pad3;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_MSGBUF_H */
* assume GCC is being used.
*/
-/* When cross-compilation is no longer an issue, fix this. */
-#if defined(__svr4__) || defined(__ELF__)
typedef unsigned int __kernel_size_t;
-#else
-typedef long unsigned int __kernel_size_t;
-#endif /* !(__svr4__ || __ELF__) */
-
typedef int __kernel_ssize_t;
typedef long int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_daddr_t;
typedef long __kernel_off_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+#ifdef __KERNEL__
+#define UID16_COMPAT_NEEDED
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+#endif /* __KERNEL__ */
#ifdef __GNUC__
typedef long long __kernel_loff_t;
-/* $Id: processor.h,v 1.75 2000/01/07 20:21:42 davem Exp $
+/* $Id: processor.h,v 1.76 2000/01/09 09:13:38 anton Exp $
* include/asm-sparc/processor.h
*
* Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
#include <asm/segment.h>
#include <asm/btfixup.h>
#include <asm/page.h>
+#include <asm/atomic.h>
/*
* Bus types
mm_segment_t current_ds;
struct exec core_exec; /* just what it says. */
int new_signal;
+ atomic_t refcount; /* used for sun4c only */
};
#define SPARC_FLAG_KTHREAD 0x1 /* task is a kernel thread */
/* Allocation and freeing of basic task resources. */
BTFIXUPDEF_CALL(struct task_struct *, alloc_task_struct, void)
BTFIXUPDEF_CALL(void, free_task_struct, struct task_struct *)
+BTFIXUPDEF_CALL(void, get_task_struct, struct task_struct *)
#define alloc_task_struct() BTFIXUP_CALL(alloc_task_struct)()
#define free_task_struct(tsk) BTFIXUP_CALL(free_task_struct)(tsk)
-
-/* XXX Anton, here is where you implement get_task_struct et al. */
+#define get_task_struct(tsk) BTFIXUP_CALL(get_task_struct)(tsk)
#define init_task (init_task_union.task)
#define init_stack (init_task_union.stack)
--- /dev/null
+#ifndef _SPARC_SEMBUF_H
+#define _SPARC_SEMBUF_H
+
+/*
+ * The semid64_ds structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ unsigned int __pad1;
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned int __pad2;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_SEMBUF_H */
--- /dev/null
+#ifndef _SPARC_SHMBUF_H
+#define _SPARC_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ unsigned int __pad1;
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned int __pad2;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned int __pad3;
+ __kernel_time_t shm_ctime; /* last change time */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _SPARC_SHMBUF_H */
-/* $Id: unistd.h,v 1.60 2000/01/05 07:37:50 jj Exp $ */
+/* $Id: unistd.h,v 1.63 2000/01/12 11:47:40 anton Exp $ */
#ifndef _SPARC_UNISTD_H
#define _SPARC_UNISTD_H
#define __NR_sigaltstack 28 /* Common */
#define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */
#define __NR_utime 30 /* Implemented via utimes() under SunOS */
-/* #define __NR_stty 31 Implemented via ioctl() under SunOS */
-/* #define __NR_gtty 32 Implemented via ioctl() under SunOS */
+#define __NR_lchown32 31 /* Linux sparc32 specific */
+#define __NR_fchown32 32 /* Linux sparc32 specific */
#define __NR_access 33 /* Common */
#define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */
-/* #define __NR_ftime 35 Implemented via gettimeofday() in SunOS */
+#define __NR_chown32 35 /* Linux sparc32 specific */
#define __NR_sync 36 /* Common */
#define __NR_kill 37 /* Common */
#define __NR_stat 38 /* Common */
#define __NR_dup 41 /* Common */
#define __NR_pipe 42 /* Common */
#define __NR_times 43 /* Implemented via getrusage() in SunOS */
-/* #define __NR_profil 44 Common */
+#define __NR_getuid32 44 /* Linux sparc32 specific */
#define __NR_umount2 45 /* Linux Specific */
#define __NR_setgid 46 /* Implemented via setregid() in SunOS */
#define __NR_getgid 47 /* Common */
#define __NR_getegid 50 /* SunOS calls getgid() */
#define __NR_acct 51 /* Common */
/* #define __NR_ni_syscall 52 ENOSYS under SunOS */
-/* #define __NR_mctl 53 SunOS specific */
+#define __NR_getgid32 53 /* Linux sparc32 specific */
#define __NR_ioctl 54 /* Common */
#define __NR_reboot 55 /* Common */
#define __NR_mmap2 56 /* Linux sparc32 Specific */
#define __NR_vfork 66 /* Common */
#define __NR_pread 67 /* Linux Specific */
#define __NR_pwrite 68 /* Linux Specific */
-/* #define __NR_sbrk 69 SunOS Specific */
-/* #define __NR_sstk 70 SunOS Specific */
+#define __NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */
+#define __NR_getegid32 70 /* Linux sparc32, sstk under SunOS */
#define __NR_mmap 71 /* Common */
-/* #define __NR_vadvise 72 SunOS Specific */
+#define __NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */
#define __NR_munmap 73 /* Common */
#define __NR_mprotect 74 /* Common */
-/* #define __NR_madvise 75 SunOS Specific */
+#define __NR_setregid32 75 /* Linux sparc32, madvise under SunOS */
#define __NR_vhangup 76 /* Common */
#define __NR_truncate64 77 /* Linux sparc32 Specific */
-/* #define __NR_mincore 78 SunOS Specific */
+#define __NR_getgroups32 78 /* Linux sparc32, mincore under SunOS */
#define __NR_getgroups 79 /* Common */
#define __NR_setgroups 80 /* Common */
#define __NR_getpgrp 81 /* Common */
-/* #define __NR_setpgrp 82 setpgid, same difference... */
+#define __NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */
#define __NR_setitimer 83 /* Common */
#define __NR_ftruncate64 84 /* Linux sparc32 Specific */
#define __NR_swapon 85 /* Common */
#define __NR_getitimer 86 /* Common */
-/* #define __NR_gethostname 87 SunOS Specific */
+#define __NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */
#define __NR_sethostname 88 /* Common */
-/* #define __NR_getdtablesize 89 SunOS Specific */
+#define __NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */
#define __NR_dup2 90 /* Common */
-/* #define __NR_getdopt 91 SunOS Specific */
+#define __NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */
#define __NR_fcntl 92 /* Common */
#define __NR_select 93 /* Common */
-/* #define __NR_setdopt 94 SunOS Specific */
+#define __NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */
#define __NR_fsync 95 /* Common */
#define __NR_setpriority 96 /* Common */
#define __NR_socket 97 /* Common */
#define __NR_rt_sigtimedwait 105 /* Linux Specific */
#define __NR_rt_sigqueueinfo 106 /* Linux Specific */
#define __NR_rt_sigsuspend 107 /* Linux Specific */
-/* #define __NR_sigvec 108 SunOS Specific */
-/* #define __NR_sigblock 109 SunOS Specific */
-/* #define __NR_sigsetmask 110 SunOS Specific */
-/* #define __NR_sigpause 111 SunOS Specific */
+#define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */
+#define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */
+#define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */
+#define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */
/* #define __NR_sigstack 112 SunOS Specific */
#define __NR_recvmsg 113 /* Common */
#define __NR_sendmsg 114 /* Common */
#define __NR_syslog 207 /* Linux Specific */
/* #define __NR_olduname 208 Linux Specific */
/* #define __NR_iopl 209 Linux Specific - i386 specific, unused */
-#define __NR_idle 210 /* Linux Specific */
+/* #define __NR_idle 210 Linux Specific - was sys_idle, now unused */
/* #define __NR_vm86 211 Linux Specific - i386 specific, unused */
#define __NR_waitpid 212 /* Linux Specific */
#define __NR_swapoff 213 /* Linux Specific */
* some others too.
*/
#define __NR__exit __NR_exit
-static __inline__ _syscall0(int,idle)
static __inline__ _syscall0(int,pause)
static __inline__ _syscall0(int,sync)
static __inline__ _syscall0(pid_t,setsid)
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000020
-#define AOFF_task_vfork_sem 0x00000100
+#define AOFF_task_vfork_sem 0x00000120
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000108
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000110
+#define AOFF_task_rt_priority 0x00000128
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000118
+#define AOFF_task_it_real_value 0x00000130
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000120
+#define AOFF_task_it_prof_value 0x00000138
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000128
+#define AOFF_task_it_virt_value 0x00000140
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000130
+#define AOFF_task_it_real_incr 0x00000148
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000138
+#define AOFF_task_it_prof_incr 0x00000150
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000140
+#define AOFF_task_it_virt_incr 0x00000158
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000148
+#define AOFF_task_real_timer 0x00000160
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000170
+#define AOFF_task_times 0x00000188
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x00000190
+#define AOFF_task_start_time 0x000001a8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x00000198
+#define AOFF_task_per_cpu_utime 0x000001b0
#define ASIZ_task_per_cpu_utime 0x00000008
-#define AOFF_task_min_flt 0x000001a8
+#define AOFF_task_min_flt 0x000001c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000001b0
+#define AOFF_task_maj_flt 0x000001c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000001b8
+#define AOFF_task_nswap 0x000001d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000001c0
+#define AOFF_task_cmin_flt 0x000001d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000001c8
+#define AOFF_task_cmaj_flt 0x000001e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000001d0
+#define AOFF_task_cnswap 0x000001e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000001dc
+#define AOFF_task_uid 0x000001f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000001e0
+#define AOFF_task_euid 0x000001f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000001e4
+#define AOFF_task_suid 0x000001fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000001e8
+#define AOFF_task_fsuid 0x00000200
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000001ec
+#define AOFF_task_gid 0x00000204
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000001f0
+#define AOFF_task_egid 0x00000208
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000001f4
+#define AOFF_task_sgid 0x0000020c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000001f8
+#define AOFF_task_fsgid 0x00000210
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000001fc
+#define AOFF_task_ngroups 0x00000214
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000200
+#define AOFF_task_groups 0x00000218
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000280
+#define AOFF_task_cap_effective 0x00000298
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000284
+#define AOFF_task_cap_inheritable 0x0000029c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000288
+#define AOFF_task_cap_permitted 0x000002a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000290
+#define AOFF_task_user 0x000002a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000298
+#define AOFF_task_rlim 0x000002b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000338
+#define AOFF_task_used_math 0x00000350
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000033a
+#define AOFF_task_comm 0x00000352
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000034c
+#define AOFF_task_link_count 0x00000364
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000350
+#define AOFF_task_tty 0x00000368
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000358
+#define AOFF_task_semundo 0x00000370
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000360
+#define AOFF_task_semsleeping 0x00000378
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000370
+#define AOFF_task_thread 0x00000380
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000007d0
+#define AOFF_task_fs 0x000007e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000007d8
+#define AOFF_task_files 0x000007e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000007e0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000007e8
-#define ASIZ_task_active_mm 0x00000008
#define AOFF_task_sigmask_lock 0x000007f0
#define ASIZ_task_sigmask_lock 0x00000000
#define AOFF_task_sig 0x000007f0
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000028
-#define AOFF_task_vfork_sem 0x00000108
+#define AOFF_task_vfork_sem 0x00000128
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000110
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000118
+#define AOFF_task_rt_priority 0x00000130
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000120
+#define AOFF_task_it_real_value 0x00000138
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000128
+#define AOFF_task_it_prof_value 0x00000140
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000130
+#define AOFF_task_it_virt_value 0x00000148
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000138
+#define AOFF_task_it_real_incr 0x00000150
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000140
+#define AOFF_task_it_prof_incr 0x00000158
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000148
+#define AOFF_task_it_virt_incr 0x00000160
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000150
+#define AOFF_task_real_timer 0x00000168
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000178
+#define AOFF_task_times 0x00000190
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x00000198
+#define AOFF_task_start_time 0x000001b0
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001a0
+#define AOFF_task_per_cpu_utime 0x000001b8
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003a0
+#define AOFF_task_min_flt 0x000003b8
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003a8
+#define AOFF_task_maj_flt 0x000003c0
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003b0
+#define AOFF_task_nswap 0x000003c8
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003b8
+#define AOFF_task_cmin_flt 0x000003d0
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003c0
+#define AOFF_task_cmaj_flt 0x000003d8
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003c8
+#define AOFF_task_cnswap 0x000003e0
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003d4
+#define AOFF_task_uid 0x000003ec
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003d8
+#define AOFF_task_euid 0x000003f0
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003dc
+#define AOFF_task_suid 0x000003f4
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003e0
+#define AOFF_task_fsuid 0x000003f8
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003e4
+#define AOFF_task_gid 0x000003fc
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003e8
+#define AOFF_task_egid 0x00000400
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003ec
+#define AOFF_task_sgid 0x00000404
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003f0
+#define AOFF_task_fsgid 0x00000408
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003f4
+#define AOFF_task_ngroups 0x0000040c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x000003f8
+#define AOFF_task_groups 0x00000410
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000478
+#define AOFF_task_cap_effective 0x00000490
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x0000047c
+#define AOFF_task_cap_inheritable 0x00000494
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000480
+#define AOFF_task_cap_permitted 0x00000498
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000488
+#define AOFF_task_user 0x000004a0
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000490
+#define AOFF_task_rlim 0x000004a8
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000530
+#define AOFF_task_used_math 0x00000548
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x00000532
+#define AOFF_task_comm 0x0000054a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x00000544
+#define AOFF_task_link_count 0x0000055c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000548
+#define AOFF_task_tty 0x00000560
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000550
+#define AOFF_task_semundo 0x00000568
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000558
+#define AOFF_task_semsleeping 0x00000570
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000560
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009c0
+#define AOFF_task_fs 0x000009e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009c8
+#define AOFF_task_files 0x000009e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000009d0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000009d8
-#define ASIZ_task_active_mm 0x00000008
-#define AOFF_task_sigmask_lock 0x000009e0
+#define AOFF_task_sigmask_lock 0x000009f0
#define ASIZ_task_sigmask_lock 0x00000001
-#define AOFF_task_sig 0x000009e8
+#define AOFF_task_sig 0x000009f8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x000009f0
+#define AOFF_task_signal 0x00000a00
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x000009f8
+#define AOFF_task_blocked 0x00000a08
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a00
+#define AOFF_task_sigqueue 0x00000a10
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a08
+#define AOFF_task_sigqueue_tail 0x00000a18
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a10
+#define AOFF_task_sas_ss_sp 0x00000a20
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a18
+#define AOFF_task_sas_ss_size 0x00000a28
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a20
+#define AOFF_task_parent_exec_id 0x00000a30
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a24
+#define AOFF_task_self_exec_id 0x00000a34
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000a28
+#define AOFF_task_exit_sem 0x00000a38
#define ASIZ_task_exit_sem 0x00000038
-#define ASIZ_task 0x00000a60
+#define ASIZ_task 0x00000a70
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000030
-#define AOFF_task_vfork_sem 0x00000110
+#define AOFF_task_vfork_sem 0x00000130
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000118
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000120
+#define AOFF_task_rt_priority 0x00000138
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000128
+#define AOFF_task_it_real_value 0x00000140
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000130
+#define AOFF_task_it_prof_value 0x00000148
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000138
+#define AOFF_task_it_virt_value 0x00000150
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000140
+#define AOFF_task_it_real_incr 0x00000158
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000148
+#define AOFF_task_it_prof_incr 0x00000160
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000150
+#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000158
+#define AOFF_task_real_timer 0x00000170
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000180
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001a0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001a8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003a8
+#define AOFF_task_min_flt 0x000003c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003b0
+#define AOFF_task_maj_flt 0x000003c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003b8
+#define AOFF_task_nswap 0x000003d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003c0
+#define AOFF_task_cmin_flt 0x000003d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003c8
+#define AOFF_task_cmaj_flt 0x000003e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003d0
+#define AOFF_task_cnswap 0x000003e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003dc
+#define AOFF_task_uid 0x000003f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003e0
+#define AOFF_task_euid 0x000003f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003e4
+#define AOFF_task_suid 0x000003fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003e8
+#define AOFF_task_fsuid 0x00000400
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003ec
+#define AOFF_task_gid 0x00000404
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003f0
+#define AOFF_task_egid 0x00000408
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003f4
+#define AOFF_task_sgid 0x0000040c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003f8
+#define AOFF_task_fsgid 0x00000410
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003fc
+#define AOFF_task_ngroups 0x00000414
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000400
+#define AOFF_task_groups 0x00000418
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000480
+#define AOFF_task_cap_effective 0x00000498
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000484
+#define AOFF_task_cap_inheritable 0x0000049c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000488
+#define AOFF_task_cap_permitted 0x000004a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000490
+#define AOFF_task_user 0x000004a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000498
+#define AOFF_task_rlim 0x000004b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000538
+#define AOFF_task_used_math 0x00000550
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000053a
+#define AOFF_task_comm 0x00000552
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000054c
+#define AOFF_task_link_count 0x00000564
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000550
+#define AOFF_task_tty 0x00000568
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000558
+#define AOFF_task_semundo 0x00000570
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000560
+#define AOFF_task_semsleeping 0x00000578
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000570
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009d0
+#define AOFF_task_fs 0x000009e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009d8
+#define AOFF_task_files 0x000009e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000009e0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000009e8
-#define ASIZ_task_active_mm 0x00000008
#define AOFF_task_sigmask_lock 0x000009f0
#define ASIZ_task_sigmask_lock 0x0000000c
#define AOFF_task_sig 0x00000a00
-/* $Id: floppy.h,v 1.23 1999/09/21 14:39:34 davem Exp $
+/* $Id: floppy.h,v 1.24 2000/01/09 15:16:34 ecd Exp $
* asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
struct linux_ebus_device *edev = 0;
unsigned long config = 0;
unsigned long auxio_reg;
- unsigned char cfg;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
return sun_floppy_types[0];
/* Enable PC-AT mode. */
- cfg = ns87303_readb(config, ASC);
- cfg |= 0xc0;
- ns87303_writeb(config, ASC, cfg);
+ ns87303_modify(config, ASC, 0, 0xc0);
#ifdef PCI_FDC_SWAP_DRIVES
/*
* Set the drive exchange bit in FCR on NS87303,
* make shure other bits are sane before doing so.
*/
- cfg = ns87303_readb(config, FER);
- cfg &= ~(FER_EDM);
- ns87303_writeb(config, FER, cfg);
- cfg = ns87303_readb(config, ASC);
- cfg &= ~(ASC_DRV2_SEL);
- ns87303_writeb(config, ASC, cfg);
- cfg = ns87303_readb(config, FCR);
- cfg |= FCR_LDE;
- ns87303_writeb(config, FCR, cfg);
+ ns87303_modify(config, FER, FER_EDM, 0);
+ ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
+ ns87303_modify(config, FCR, 0, FCR_LDE);
cfg = sun_floppy_types[0];
sun_floppy_types[0] = sun_floppy_types[1];
--- /dev/null
+#ifndef _SPARC64_IPCBUF_H
+#define _SPARC64_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_IPCBUF_H */
--- /dev/null
+#ifndef _SPARC64_MSGBUF_H
+#define _SPARC64_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_MSGBUF_H */
-/* $Id: ns87303.h,v 1.2 1998/09/13 15:38:50 ecd Exp $
+/* $Id: ns87303.h,v 1.3 2000/01/09 15:16:34 ecd Exp $
* ns87303.h: Configuration Register Description for the
* National Semiconductor PC87303 (SuperIO).
*
#define FCR_LDE 0x10 /* Logical Drive Exchange */
#define FCR_ZWS_ENA 0x20 /* Enable short host read/write in ECP/EPP */
-/* Printer Controll Register (PCR) bits */
+/* Printer Control Register (PCR) bits */
#define PCR_EPP_ENABLE 0x01
#define PCR_EPP_IEEE 0x02 /* Enable EPP Version 1.9 (IEEE 1284) */
#define PCR_ECP_ENABLE 0x04
#define ASC_LPT_IRQ7 0x01 /* Allways use IRQ7 for LPT */
#define ASC_DRV2_SEL 0x02 /* Logical Drive Exchange controlled by TDR */
+#define FER_RESERVED 0x00
+#define FAR_RESERVED 0x00
+#define PTR_RESERVED 0x73
+#define FCR_RESERVED 0xc4
+#define PCR_RESERVED 0x10
+#define KRR_RESERVED 0x00
+#define PMC_RESERVED 0x98
+#define TUP_RESERVED 0xfb
+#define SIP_RESERVED 0x00
+#define ASC_RESERVED 0x18
+#define CS0CF0_RESERVED 0x00
+#define CS0CF1_RESERVED 0x08
+#define CS1CF0_RESERVED 0x00
+#define CS1CF1_RESERVED 0x08
+
#ifdef __KERNEL__
#include <asm/system.h>
#include <asm/io.h>
-static __inline__ void ns87303_writeb(unsigned long port, int index,
- unsigned char value)
+static __inline__ int ns87303_modify(unsigned long port, unsigned int index,
+ unsigned char clr, unsigned char set)
{
+ static unsigned char reserved[] = {
+ FER_RESERVED, FAR_RESERVED, PTR_RESERVED, FCR_RESERVED,
+ PCR_RESERVED, KRR_RESERVED, PMC_RESERVED, TUP_RESERVED,
+ SIP_RESERVED, ASC_RESERVED, CS0CF0_RESERVED, CS0CF1_RESERVED,
+ CS1CF0_RESERVED, CS1CF1_RESERVED
+ };
unsigned long flags;
+ unsigned char value;
+
+ if (index > 0x0d)
+ return -EINVAL;
save_flags(flags); cli();
outb(index, port);
+ value = inb(port + 1);
+ value &= ~(reserved[index] | clr);
+ value |= set;
outb(value, port + 1);
outb(value, port + 1);
restore_flags(flags);
-}
-static __inline__ unsigned char ns87303_readb(unsigned long port, int index)
-{
- outb(index, port);
- return inb(port + 1);
+ return 0;
}
#endif /* __KERNEL__ */
-/* $Id: parport.h,v 1.5 1999/08/30 10:14:52 davem Exp $
+/* $Id: parport.h,v 1.6 2000/01/09 15:16:34 ecd Exp $
* parport.h: sparc64 specific parport initialization and dma.
*
* Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be)
#define __maybe_initdata __initdata
#endif
-#undef HAVE_SLOW_DEVICES
-
#define PARPORT_PC_MAX_PORTS PARPORT_MAX
static struct linux_ebus_dma *sparc_ebus_dmas[PARPORT_PC_MAX_PORTS];
writel(EBUS_DCSR_RESET, &sparc_ebus_dmas[dmanr]->dcsr);
udelay(1);
dcsr = EBUS_DCSR_BURST_SZ_16 | EBUS_DCSR_TCI_DIS |
- EBUS_DCSR_EN_CNT;
+ EBUS_DCSR_EN_CNT | EBUS_DCSR_INT_EN;
writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
}
writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
dcsr = readl(&sparc_ebus_dmas[dmanr]->dcsr);
- if (dcsr & EBUS_DCSR_ERR_PEND) {
+ if (dcsr & EBUS_DCSR_ERR_PEND)
reset_dma(dmanr);
- dcsr &= ~(EBUS_DCSR_ERR_PEND);
- }
- writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
}
}
static __inline__ int
get_dma_residue(unsigned int dmanr)
{
- unsigned int dcsr;
int res;
res = readl(&sparc_ebus_dmas[dmanr]->dbcr);
- if (res != 0) {
- dcsr = readl(&sparc_ebus_dmas[dmanr]->dcsr);
+ if (res != 0)
reset_dma(dmanr);
- writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
- }
return res;
}
if (!strcmp(edev->prom_name, "ecpp")) {
unsigned long base = edev->resource[0].start;
unsigned long config = edev->resource[1].start;
- unsigned char cfg;
sparc_ebus_dmas[count] =
(struct linux_ebus_dma *)
edev->resource[2].start;
reset_dma(count);
+ /* Configure IRQ to Push Pull, Level Low */
/* Enable ECP, set bit 2 of the CTR first */
outb(0x04, base + 0x02);
- cfg = ns87303_readb(config, PCR);
- cfg |= (PCR_ECP_ENABLE | PCR_ECP_CLK_ENA);
- ns87303_writeb(config, PCR, cfg);
+ ns87303_modify(config, PCR,
+ PCR_EPP_ENABLE |
+ PCR_IRQ_ODRAIN,
+ PCR_ECP_ENABLE |
+ PCR_ECP_CLK_ENA |
+ PCR_IRQ_POLAR);
/* CTR bit 5 controls direction of port */
- cfg = ns87303_readb(config, PTR);
- cfg |= PTR_LPT_REG_DIR;
- ns87303_writeb(config, PTR, cfg);
-
- /* Configure IRQ to Push Pull, Level Low */
- cfg = ns87303_readb(config, PCR);
- cfg &= ~(PCR_IRQ_ODRAIN);
- cfg |= PCR_IRQ_POLAR;
- ns87303_writeb(config, PCR, cfg);
-
-#ifndef HAVE_SLOW_DEVICES
- /* Enable Zero Wait State for ECP */
- cfg = ns87303_readb(config, FCR);
- cfg |= FCR_ZWS_ENA;
- ns87303_writeb(config, FCR, cfg);
-#endif
+ ns87303_modify(config, PTR,
+ 0, PTR_LPT_REG_DIR);
if (parport_pc_probe_port(base, base + 0x400,
edev->irqs[0],
*/
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0UL
+#define PCIBIOS_MIN_MEM 0UL
+
struct pci_dev;
/* Allocate and map kernel buffer using consistant mode DMA for PCI device.
typedef int __kernel_daddr_t;
typedef long __kernel_off_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+#ifdef __KERNEL__
+#define UID16_COMPAT_NEEDED
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+#endif /* __KERNEL__ */
/* Note this piece of asymmetry from the v9 ABI. */
typedef int __kernel_suseconds_t;
--- /dev/null
+#ifndef _SPARC64_SEMBUF_H
+#define _SPARC64_SEMBUF_H
+
+/*
+ * The semid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_SEMBUF_H */
--- /dev/null
+#ifndef _SPARC64_SHMBUF_H
+#define _SPARC64_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _SPARC64_SHMBUF_H */
-/* $Id: unistd.h,v 1.37 2000/01/05 07:37:55 jj Exp $ */
+/* $Id: unistd.h,v 1.39 2000/01/11 17:34:05 jj Exp $ */
#ifndef _SPARC64_UNISTD_H
#define _SPARC64_UNISTD_H
#define __NR_sigaltstack 28 /* Common */
#define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */
#define __NR_utime 30 /* Implemented via utimes() under SunOS */
-/* #define __NR_stty 31 Implemented via ioctl() under SunOS */
-/* #define __NR_gtty 32 Implemented via ioctl() under SunOS */
+/* #define __NR_lchown32 31 Linux sparc32 specific */
+/* #define __NR_fchown32 32 Linux sparc32 specific */
#define __NR_access 33 /* Common */
#define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */
-/* #define __NR_ftime 35 Implemented via gettimeofday() in SunOS */
+/* #define __NR_chown32 35 Linux sparc32 specific */
#define __NR_sync 36 /* Common */
#define __NR_kill 37 /* Common */
#define __NR_stat 38 /* Common */
#define __NR_dup 41 /* Common */
#define __NR_pipe 42 /* Common */
#define __NR_times 43 /* Implemented via getrusage() in SunOS */
-/* #define __NR_profil 44 Common */
+/* #define __NR_getuid32 44 Linux sparc32 specific */
#define __NR_umount2 45 /* Linux Specific */
#define __NR_setgid 46 /* Implemented via setregid() in SunOS */
#define __NR_getgid 47 /* Common */
#define __NR_getegid 50 /* SunOS calls getgid() */
#define __NR_acct 51 /* Common */
#define __NR_memory_ordering 52 /* Linux Specific */
-/* #define __NR_mctl 53 SunOS specific */
+/* #define __NR_getgid32 53 Linux sparc32 specific */
#define __NR_ioctl 54 /* Common */
#define __NR_reboot 55 /* Common */
/* #define __NR_mmap2 56 Linux sparc32 Specific */
#define __NR_vfork 66 /* Common */
#define __NR_pread 67 /* Linux Specific */
#define __NR_pwrite 68 /* Linux Specific */
-/* #define __NR_sbrk 69 SunOS Specific */
-/* #define __NR_sstk 70 SunOS Specific */
+/* #define __NR_geteuid32 69 Linux sparc32, sbrk under SunOS */
+/* #define __NR_getegid32 70 Linux sparc32, sstk under SunOS */
#define __NR_mmap 71 /* Common */
-/* #define __NR_vadvise 72 SunOS Specific */
+/* #define __NR_setreuid32 72 Linux sparc32, vadvise under SunOS */
#define __NR_munmap 73 /* Common */
#define __NR_mprotect 74 /* Common */
-/* #define __NR_madvise 75 SunOS Specific */
+/* #define __NR_setregid32 75 Linux sparc32, madvise under SunOS */
#define __NR_vhangup 76 /* Common */
/* #define __NR_truncate64 77 Linux sparc32 Specific */
-/* #define __NR_mincore 78 SunOS Specific */
+/* #define __NR_getgroups32 78 Linux sparc32, mincore under SunOS */
#define __NR_getgroups 79 /* Common */
#define __NR_setgroups 80 /* Common */
#define __NR_getpgrp 81 /* Common */
-/* #define __NR_setpgrp 82 setpgid, same difference... */
+/* #define __NR_setgroups32 82 Linux sparc32, setpgrp under SunOS */
#define __NR_setitimer 83 /* Common */
/* #define __NR_ftruncate64 84 Linux sparc32 Specific */
#define __NR_swapon 85 /* Common */
#define __NR_getitimer 86 /* Common */
-/* #define __NR_gethostname 87 SunOS Specific */
+/* #define __NR_setuid32 87 Linux sparc32, gethostname under SunOS */
#define __NR_sethostname 88 /* Common */
-/* #define __NR_getdtablesize 89 SunOS Specific */
+/* #define __NR_setgid32 89 Linux sparc32, getdtablesize under SunOS */
#define __NR_dup2 90 /* Common */
-/* #define __NR_getdopt 91 SunOS Specific */
+/* #define __NR_setfsuid32 91 Linux sparc32, getdopt under SunOS */
#define __NR_fcntl 92 /* Common */
#define __NR_select 93 /* Common */
-/* #define __NR_setdopt 94 SunOS Specific */
+/* #define __NR_setfsgid32 94 Linux sparc32, setdopt under SunOS */
#define __NR_fsync 95 /* Common */
#define __NR_setpriority 96 /* Common */
#define __NR_socket 97 /* Common */
#define __NR_rt_sigtimedwait 105 /* Linux Specific */
#define __NR_rt_sigqueueinfo 106 /* Linux Specific */
#define __NR_rt_sigsuspend 107 /* Linux Specific */
-/* #define __NR_sigvec 108 SunOS Specific */
-/* #define __NR_sigblock 109 SunOS Specific */
-/* #define __NR_sigsetmask 110 SunOS Specific */
-/* #define __NR_sigpause 111 SunOS Specific */
+#define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */
+#define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */
+#define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */
+#define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */
/* #define __NR_sigstack 112 SunOS Specific */
#define __NR_recvmsg 113 /* Common */
#define __NR_sendmsg 114 /* Common */
*order[HFS_HDR_MAX]; /* 'descr' ordered by offset */
};
+/* header layout for netatalk's v1 appledouble file format */
+struct hfs_nat_hdr {
+ hfs_lword_t magic;
+ hfs_lword_t version;
+ hfs_byte_t homefs[16];
+ hfs_word_t entries;
+ hfs_byte_t descrs[12*5];
+ hfs_byte_t real_name[255]; /* id=3 */
+ hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */
+ hfs_byte_t old_info[16]; /* id=7 */
+ hfs_u8 finderinfo[32]; /* id=9 */
+};
+
/*
* Default header layout for Netatalk and AppleDouble
*/
#ifndef _LINUX_HIGHUID_H
#define _LINUX_HIGHUID_H
+#include <linux/config.h>
#include <linux/types.h>
/*
* general notes:
*
- * UID16_COMPAT_NEEDED is defined in include/asm-{arch}/posix_types.h
- * if the given architecture needs to support backwards compatibility
- * for old system calls.
+ * CONFIG_UID16 is defined if the given architecture needs to
+ * support backwards compatibility for old system calls.
*
- * old_uid_t and old_gid_t are only used if UID16_COMPAT_NEEDED
- * is defined.
+ * kernel code should use uid_t and gid_t at all times when dealing with
+ * kernel-private data.
+ *
+ * old_uid_t and old_gid_t are only used if CONFIG_UID16 is defined.
*
* uid16_t and gid16_t are used on all architectures. (when dealing
* with structures hard coded to 16 bits, such as in filesystems)
*/
-#ifdef UID16_COMPAT_NEEDED
+#ifdef CONFIG_UID16
/*
* This is the "overflow" UID and GID. They are used to signify uid/gid
#define NEW_TO_OLD_UID(uid) high2lowuid(uid)
#define NEW_TO_OLD_GID(gid) high2lowgid(gid)
+/* specific to fs/stat.c */
#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
#define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
#define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
+/* specific to kernel/signal.c */
+#ifdef UID16_SIGINFO_COMPAT_NEEDED
+#define SET_SIGINFO_UID16(var, uid) var = high2lowuid(uid)
+#else
+#define SET_SIGINFO_UID16(var, uid) do { ; } while (0)
+#endif
+
#else
#define SET_UID16(var, uid) do { ; } while (0)
#define SET_STAT_UID(stat, uid) (stat).st_uid = uid
#define SET_STAT_GID(stat, gid) (stat).st_gid = gid
-#define high2lowuid(x) (x)
+#define SET_SIGINFO_UID16(var, uid) do { ; } while (0)
-#endif /* UID16_COMPAT_NEEDED */
+#endif /* CONFIG_UID16 */
/*
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H
+#include <linux/config.h>
+
/* These macros are used to mark some functions or
* initialized data (doesn't apply to uninitialized data)
* as `initialization' functions. The kernel can take this
unsigned long driver_data; /* Data private to the driver */
};
-#define PCI_ID(vendor,device) (((vendor)<<16) | (device))
-
struct pci_driver {
struct list_head node;
char *name;
void pci_insert_device(struct pci_dev *, struct pci_bus *);
void pci_remove_device(struct pci_dev *);
struct pci_driver *pci_dev_driver(struct pci_dev *);
-
-/*
- * simple PCI probing for drivers (drivers/pci/helper.c)
- */
-
-struct pci_simple_probe_entry;
-typedef int (*pci_simple_probe_callback) (struct pci_dev *dev, int match_num,
- const struct pci_simple_probe_entry *ent,
- void *drvr_data);
-
-struct pci_simple_probe_entry {
- unsigned short vendor; /* vendor id, PCI_ANY_ID, or 0 for last entry */
- unsigned short device; /* device id, PCI_ANY_ID, or 0 for last entry */
- unsigned short subsys_vendor; /* subsystem vendor id, 0 for don't care */
- unsigned short subsys_device; /* subsystem device id, 0 for don't care */
- void *dev_data; /* driver-private, entry-specific data */
-};
-
-int pci_simple_probe (const struct pci_simple_probe_entry *list,
- size_t match_limit, pci_simple_probe_callback cb,
- void *drvr_data);
-
-
+struct pci_device_id *pci_match_device(struct pci_device_id *ids, struct pci_dev *dev);
/*
* If the system does not have PCI, clearly these return errors. Define
extern inline void pci_set_master(struct pci_dev *dev) { }
extern inline int pci_enable_device(struct pci_dev *dev) { return 0; }
-extern inline int pci_simple_probe (const struct pci_simple_probe_entry *list,
- size_t match_limit, pci_simple_probe_callback cb, void *drvr_data)
-{ return 0; }
-
#endif /* !CONFIG_PCI */
/*
O_TARGET := kernel.o
O_OBJS = sched.o dma.o fork.o exec_domain.o panic.o printk.o sys.o \
module.o exit.o itimer.o info.o time.o softirq.o resource.o \
- sysctl.o acct.o capability.o ptrace.o timer.o uid16.o
+ sysctl.o acct.o capability.o ptrace.o timer.o
OX_OBJS += signal.o
+ifeq ($(CONFIG_UID16),y)
+O_OBJS += uid16.o
+endif
+
ifeq ($(CONFIG_KMOD),y)
O_OBJS += kmod.o
endif
#include <linux/mmzone.h>
#include <linux/mm.h>
#include <linux/capability.h>
+#include <linux/highuid.h>
#if defined(CONFIG_PROC_FS)
#include <linux/proc_fs.h>
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(brw_page);
+#ifdef CONFIG_UID16
+EXPORT_SYMBOL(fs_overflowuid);
+EXPORT_SYMBOL(fs_overflowgid);
+#endif
+
/* all busmice */
EXPORT_SYMBOL(add_mouse_randomness);
EXPORT_SYMBOL(fasync_helper);
info->si_code = 0;
info->si_pid = 0;
info->si_uid = 0;
- SET_UID16(info->si_uid16, 0);
+ SET_SIGINFO_UID16(info->si_uid16, 0);
} else {
struct signal_queue *q, **pp;
pp = ¤t->sigqueue;
info->si_code = 0;
info->si_pid = 0;
info->si_uid = 0;
- SET_UID16(info->si_uid16, 0);
+ SET_SIGINFO_UID16(info->si_uid16, 0);
}
}
q->info.si_code = SI_USER;
q->info.si_pid = current->pid;
q->info.si_uid = current->uid;
- SET_UID16(q->info.si_uid16, current->uid);
+ SET_SIGINFO_UID16(q->info.si_uid16, current->uid);
break;
case 1:
q->info.si_signo = sig;
q->info.si_code = SI_KERNEL;
q->info.si_pid = 0;
q->info.si_uid = 0;
- SET_UID16(q->info.si_uid16, 0);
+ SET_SIGINFO_UID16(q->info.si_uid16, 0);
break;
default:
q->info = *info;
info.si_code = SI_USER;
info.si_pid = current->pid;
info.si_uid = current->uid;
- SET_UID16(info.si_uid16, current->uid);
+ SET_SIGINFO_UID16(info.si_uid16, current->uid);
return kill_something_info(sig, &info, pid);
}
* Copyright (C) 1991, 1992 Linus Torvalds
*/
+#include <linux/config.h>
#include <linux/mm.h>
#include <linux/utsname.h>
#include <linux/mman.h>
#include <asm/uaccess.h>
#include <asm/io.h>
+#ifdef CONFIG_UID16
+
/*
* this is where the system-wide overflow UID and GID are defined, for
* architectures that now have 32-bit UID/GID but didn't in the past
int overflowuid = DEFAULT_OVERFLOWUID;
int overflowgid = DEFAULT_OVERFLOWGID;
+#endif /* CONFIG_UID16 */
+
/*
* the same as above, but for filesystems which can only store a 16-bit
* UID and GID. as such, this is needed on all architectures
{KERN_MAX_THREADS, "threads-max", &max_threads, sizeof(int),
0644, NULL, &proc_dointvec},
{KERN_RANDOM, "random", NULL, 0, 0555, random_table},
+#ifdef CONFIG_UID16
{KERN_OVERFLOWUID, "overflowuid", &overflowuid, sizeof(int), 0644, NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL,
&minolduid, &maxolduid},
{KERN_OVERFLOWGID, "overflowgid", &overflowgid, sizeof(int), 0644, NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL,
&minolduid, &maxolduid},
+#endif /* CONFIG_UID16 */
{0}
};
#endif /* SLAB_DEBUG_SUPPORT */
+#define SLAB_CACHE_NAME_LEN 20 /* max name length for a slab cache */
+
/* Cache struct - manages a cache.
* First four members are commonly referenced during an alloc/free operation.
*/
size_t c_colour; /* cache colouring range */
size_t c_colour_next;/* cache colouring */
unsigned long c_failures;
- const char *c_name;
+ char c_name[SLAB_CACHE_NAME_LEN];
struct kmem_cache_s *c_nextp;
kmem_cache_t *c_index_cachep;
#if SLAB_STATS
/* Create a cache:
* Returns a ptr to the cache on success, NULL on failure.
* Cannot be called within a int, but can be interrupted.
- * NOTE: The 'name' is assumed to be memory that is _not_ going to disappear.
*/
kmem_cache_t *
kmem_cache_create(const char *name, size_t size, size_t offset,
printk("%sNULL ptr\n", func_nm);
goto opps;
}
+ if (strlen(name) >= SLAB_CACHE_NAME_LEN) {
+ printk("%sname too long\n", func_nm);
+ goto opps;
+ }
if (in_interrupt()) {
printk("%sCalled during int - %s\n", func_nm, name);
goto opps;
cachep->c_ctor = ctor;
cachep->c_dtor = dtor;
cachep->c_magic = SLAB_C_MAGIC;
- cachep->c_name = name; /* Simply point to the name. */
+ /* Copy name over so we don't have problems with unloaded modules */
+ strcpy(cachep->c_name, name);
spin_lock_init(&cachep->c_spinlock);
/* Need the semaphore to access the chain. */
}
/* Shrink a cache. Releases as many slabs as possible for a cache.
- * It is expected this function will be called by a module when it is
- * unloaded. The cache is _not_ removed, this creates too many problems and
- * the cache-structure does not take up much room. A module should keep its
- * cache pointer(s) in unloaded memory, so when reloaded it knows the cache
- * is available. To help debugging, a zero exit status indicates all slabs
- * were released.
+ * To help debugging, a zero exit status indicates all slabs were released.
*/
int
kmem_cache_shrink(kmem_cache_t *cachep)
/*
* Remove a kmem_cache_t object from the slab cache. When returns 0 it
* completed succesfully. -arca
+ *
+ * It is expected this function will be called by a module when it is
+ * unloaded. This will remove the cache completely, and avoid a duplicate
+ * cache being allocated each time a module is loaded and unloaded, if the
+ * module doesn't have persistent in-kernel storage across loads and unloads.
+ *
*/
int kmem_cache_destroy(kmem_cache_t * cachep)
{
do {
/* kswapd is critical to provide GFP_ATOMIC
allocations (not GFP_HIGHMEM ones). */
- if (nr_free_buffer_pages() >= freepages.high)
+ if (nr_free_pages() - nr_free_highpages() >= freepages.high)
break;
if (!do_try_to_free_pages(GFP_KSWAPD, 0))
break;
*
* ROUTE - implementation of the IP router.
*
- * Version: $Id: route.c,v 1.77 2000/01/06 00:41:59 davem Exp $
+ * Version: $Id: route.c,v 1.78 2000/01/13 00:06:58 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_output.c,v 1.114 2000/01/09 02:19:43 davem Exp $
+ * Version: $Id: tcp_output.c,v 1.116 2000/01/13 00:19:49 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
unsigned long timeout;
/* Stay within the limit we were given */
- timeout = tp->ato;
+ timeout = (tp->ato << 1) >> 1;
if (timeout > max_timeout)
timeout = max_timeout;
timeout += jiffies;
*
* This is the one possible way that we can delay an
* ACK and have tp->ato indicate that we are in
- * quick ack mode, so clear it.
+ * quick ack mode, so clear it. It is also the only
+ * possible way for ato to be zero, when ACK'ing a
+ * SYNACK because we've taken no ATO measurement yet.
*/
- if(tcp_in_quickack_mode(tp))
+ if (tcp_in_quickack_mode(tp))
tcp_exit_quickack_mode(tp);
+ if (!tp->ato)
+ tp->ato = tp->rto;
tcp_send_delayed_ack(sk, HZ/2);
return;
}