]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.40pre2 2.3.40pre2
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:30:08 +0000 (15:30 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:30:08 +0000 (15:30 -0500)
203 files changed:
Documentation/Configure.help
Documentation/highuid.txt
arch/alpha/config.in
arch/alpha/defconfig
arch/alpha/kernel/core_mcpcia.c
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head-sa1100.S [new file with mode: 0644]
arch/arm/boot/compressed/head-victor.S [deleted file]
arch/arm/boot/compressed/head.S
arch/arm/config.in
arch/arm/def-configs/a5k
arch/arm/def-configs/footbridge
arch/arm/def-configs/rpc
arch/arm/defconfig
arch/arm/kernel/armksyms.c
arch/arm/kernel/bios32.c
arch/arm/kernel/bios32.h
arch/arm/kernel/calls.S
arch/arm/kernel/debug-armv.S
arch/arm/kernel/dec21285.c
arch/arm/kernel/entry-armo.S
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/head-armv.S
arch/arm/kernel/process.c
arch/arm/kernel/setup.c
arch/arm/kernel/signal.c
arch/arm/kernel/sys_arm.c
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/lib/Makefile
arch/arm/lib/bitops.S [deleted file]
arch/arm/lib/changebit.S [new file with mode: 0644]
arch/arm/lib/checksum.S [deleted file]
arch/arm/lib/clearbit.S [new file with mode: 0644]
arch/arm/lib/copy_page.S [new file with mode: 0644]
arch/arm/lib/csumipv6.S [new file with mode: 0644]
arch/arm/lib/csumpartial.S [new file with mode: 0644]
arch/arm/lib/csumpartialcopy.S [new file with mode: 0644]
arch/arm/lib/csumpartialcopyuser.S [new file with mode: 0644]
arch/arm/lib/findbit.S [new file with mode: 0644]
arch/arm/lib/getconsdata.c
arch/arm/lib/io-footbridge.S
arch/arm/lib/memchr.S [new file with mode: 0644]
arch/arm/lib/memcpy.S [new file with mode: 0644]
arch/arm/lib/memset.S [new file with mode: 0644]
arch/arm/lib/memzero.S [new file with mode: 0644]
arch/arm/lib/setbit.S [new file with mode: 0644]
arch/arm/lib/strchr.S [new file with mode: 0644]
arch/arm/lib/string.S [deleted file]
arch/arm/lib/strrchr.S [new file with mode: 0644]
arch/arm/lib/system.c [deleted file]
arch/arm/lib/testchangebit.S [new file with mode: 0644]
arch/arm/lib/testclearbit.S [new file with mode: 0644]
arch/arm/lib/testsetbit.S [new file with mode: 0644]
arch/arm/lib/uaccess.S
arch/arm/mm/fault-armv.c
arch/arm/mm/fault-common.c
arch/arm/mm/init.c
arch/arm/mm/mm-armo.c
arch/arm/mm/mm-armv.c
arch/arm/mm/mm-sa1100.c
arch/arm/mm/proc-arm6,7.S
arch/arm/mm/proc-sa110.S
arch/arm/vmlinux-armv.lds.in
arch/i386/config.in
arch/i386/defconfig
arch/i386/kernel/pci-i386.c
arch/m68k/config.in
arch/ppc/config.in
arch/ppc/configs/common_defconfig
arch/ppc/configs/gemini_defconfig
arch/ppc/configs/oak_defconfig
arch/ppc/configs/pmac_defconfig
arch/ppc/configs/walnut_defconfig
arch/ppc/defconfig
arch/sparc/ap1000/apmmu.c
arch/sparc/kernel/process.c
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sunos_asm.S
arch/sparc/kernel/systbls.S
arch/sparc/mm/loadmmu.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/ioctl32.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/sys_sparc.c
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/solaris/entry64.S
arch/sparc64/solaris/fs.c
arch/sparc64/solaris/misc.c
arch/sparc64/solaris/systbl.S
drivers/acorn/block/mfmhd.c
drivers/acorn/scsi/Config.in
drivers/char/Config.in
drivers/char/pcmcia/Config.in
drivers/net/Config.in
drivers/net/pcmcia/Config.in
drivers/net/pcmcia/tulip_cb.c
drivers/net/tokenring/olympic.c
drivers/net/tokenring/olympic.h
drivers/parport/Config.in
drivers/parport/parport_pc.c
drivers/pci/Makefile
drivers/pci/helper.c [deleted file]
drivers/pci/pci.c
drivers/pci/pcisyms.c
drivers/pci/setup-res.c
drivers/pci/syscall.c
drivers/pcmcia/cs.c
drivers/pcmcia/ricoh.h
drivers/pcmcia/ti113x.h
drivers/pcmcia/yenta.c
drivers/sbus/char/envctrl.c
drivers/usb/Config.in
drivers/usb/acm.c
drivers/usb/hub.c
drivers/usb/mousedev.c
drivers/usb/ohci-hcd.c
drivers/usb/ohci-hcd.h
drivers/usb/ov511.c
drivers/usb/usb-serial.c
drivers/usb/usb.h
drivers/video/dummycon.c
fs/hfs/ChangeLog
fs/hfs/extent.c
fs/hfs/file.c
fs/hfs/hfs_btree.h
fs/hfs/inode.c
fs/namei.c
fs/ncpfs/ioctl.c
fs/smbfs/ioctl.c
include/asm-alpha/posix_types.h
include/asm-arm/arch-arc/serial.h
include/asm-arm/arch-arc/system.h
include/asm-arm/arch-cl7500/system.h
include/asm-arm/arch-ebsa110/system.h
include/asm-arm/arch-ebsa285/io.h
include/asm-arm/arch-ebsa285/irq.h
include/asm-arm/arch-ebsa285/system.h
include/asm-arm/arch-nexuspci/system.h
include/asm-arm/arch-rpc/system.h
include/asm-arm/arch-sa1100/hardware.h
include/asm-arm/arch-sa1100/ide.h [new file with mode: 0644]
include/asm-arm/arch-sa1100/memory.h
include/asm-arm/arch-sa1100/param.h
include/asm-arm/arch-sa1100/serial.h
include/asm-arm/arch-sa1100/system.h
include/asm-arm/arch-sa1100/uncompress.h [new file with mode: 0644]
include/asm-arm/checksum.h
include/asm-arm/div64.h
include/asm-arm/io.h
include/asm-arm/iomd.h
include/asm-arm/page.h
include/asm-arm/posix_types.h
include/asm-arm/proc-armv/uncompress.h
include/asm-arm/proc-fns.h
include/asm-arm/sigcontext.h
include/asm-arm/stat.h
include/asm-arm/string.h
include/asm-arm/system.h
include/asm-arm/unistd.h
include/asm-i386/posix_types.h
include/asm-m68k/posix_types.h
include/asm-sparc/a.out.h
include/asm-sparc/asm_offsets.h
include/asm-sparc/ipcbuf.h [new file with mode: 0644]
include/asm-sparc/msgbuf.h [new file with mode: 0644]
include/asm-sparc/posix_types.h
include/asm-sparc/processor.h
include/asm-sparc/sembuf.h [new file with mode: 0644]
include/asm-sparc/shmbuf.h [new file with mode: 0644]
include/asm-sparc/unistd.h
include/asm-sparc64/asm_offsets.h
include/asm-sparc64/floppy.h
include/asm-sparc64/ipcbuf.h [new file with mode: 0644]
include/asm-sparc64/msgbuf.h [new file with mode: 0644]
include/asm-sparc64/ns87303.h
include/asm-sparc64/parport.h
include/asm-sparc64/pci.h
include/asm-sparc64/posix_types.h
include/asm-sparc64/sembuf.h [new file with mode: 0644]
include/asm-sparc64/shmbuf.h [new file with mode: 0644]
include/asm-sparc64/unistd.h
include/linux/hfs_fs.h
include/linux/highuid.h
include/linux/init.h
include/linux/pci.h
kernel/Makefile
kernel/ksyms.c
kernel/signal.c
kernel/sys.c
kernel/sysctl.c
mm/slab.c
mm/vmscan.c
net/ipv4/route.c
net/ipv4/tcp_output.c

index 8725dcb62da8de937185f0a68242b5b80340d4bd..36dad9a23f207e0f7df1593c726993667459dc90 100644 (file)
@@ -8002,7 +8002,7 @@ CONFIG_USB_ACM
   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
@@ -8014,6 +8014,33 @@ CONFIG_USB_SERIAL
   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
index 23d27de7f8c9205a0824aba6893cf186df33a3f6..ce7c17b7b3800a15581c1bd8b6a9dd12b1ee5fbb 100644 (file)
@@ -17,11 +17,6 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
   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
@@ -33,7 +28,7 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
   uses the 32-bit UID system calls properly otherwise.
 
   This affects at least:
-       SunOS emulation - now fixed?
+       SunOS emulation
        Solaris emulation
        iBCS on Intel
 
@@ -62,8 +57,8 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
 
   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,
@@ -76,3 +71,9 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
 - 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
index 6830ee64994c9a7ff49b5d5d351525b57f124a11..ce5c0853e731742cc88b0b05549a828e4095cc6c 100644 (file)
@@ -2,6 +2,9 @@
 # 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
@@ -180,6 +183,12 @@ fi
 
 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
index b80c36954fc868a8e2c6bd118a6d4b6cdb905603..d996415290c264d61562c31ffdc0fa45abeea60b 100644 (file)
@@ -321,11 +321,11 @@ CONFIG_PSMOUSE=y
 # 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
 
 #
index 4b165940dd535bd24b8dfe789aaa082130b5cad5..847958212449f7a2655adcda7732af169c25361d 100644 (file)
@@ -560,12 +560,14 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
 
        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;
index 2c81731b963b2f614629a901a49da51a206438ee..0df16ffa48cfa93c1bfd04923a06e6ac042cebf3 100644 (file)
@@ -136,7 +136,7 @@ MACHINE              = nexuspci
 ARCHDIR                 = nexuspci
 endif
 
-ifeq ($(CONFIG_ARCH_SA1100),u)
+ifeq ($(CONFIG_ARCH_SA1100),y)
 MACHINE                 = sa1100
 ARCHDIR                 = sa1100
 endif
@@ -146,7 +146,7 @@ HEAD                := arch/arm/kernel/head-$(PROCESSOR).o \
 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)
index 8a100eb779979c3ac057373b897321bb8015f4b5..d2992a49185135068e8be0b2b5061276a5e49261 100644 (file)
@@ -44,9 +44,9 @@ ZTEXTADDR      = 0x40200000
 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
@@ -91,7 +91,7 @@ font.o:               $(FONTC)
 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
 
diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S
new file mode 100644 (file)
index 0000000..90018e5
--- /dev/null
@@ -0,0 +1,65 @@
+/* 
+ * 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
+
+
diff --git a/arch/arm/boot/compressed/head-victor.S b/arch/arm/boot/compressed/head-victor.S
deleted file mode 100644 (file)
index e556383..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
index e87c0a72e9699c31d47c9da223146fd2e6453c71..796f812abd942bcb21b16155760de377911b8822 100644 (file)
@@ -77,10 +77,10 @@ start:
                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
@@ -144,10 +144,10 @@ reloc_start:      add     r8, r5, r0
        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
 
index e1d54c4e7f0ec5831fcbcaa68a05353578c969f1..be7102698b32656997c701ba1a93c04f8e71a26f 100644 (file)
@@ -6,6 +6,8 @@ mainmenu_name "Linux Kernel Configuration"
 
 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
@@ -44,7 +46,6 @@ if [ "$CONFIG_ADDIN_FOOTBRIDGE" = "y" ]; then
 fi
 
 if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
-   define_bool CONFIG_CPU_SA1100 y
    choice 'SA1100 implementation' \
           "Brutus              CONFIG_SA1100_BRUTUS \
            Empeg               CONFIG_SA1100_EMPEG \
@@ -93,7 +94,11 @@ else
         "$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
@@ -110,7 +115,7 @@ fi
 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
 
 #
@@ -123,8 +128,8 @@ else
    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
@@ -273,11 +278,10 @@ bool 'Verbose user fault messages' CONFIG_DEBUG_USER
 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
index 8b402a59ec3ebd5d8e740953e845bac0f232aa1f..21a6488eb2f566f0b4108aab8677f53f6aea5c2b 100644 (file)
@@ -3,6 +3,11 @@
 #
 CONFIG_ARM=y
 
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
 #
 # System and processor type
 #
@@ -12,22 +17,10 @@ CONFIG_ARCH_A5K=y
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_FOOTBRIDGE is not set
 CONFIG_ARCH_ACORN=y
-# CONFIG_ISA_DMA is not set
 # CONFIG_CPU_32 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
@@ -43,17 +36,38 @@ CONFIG_NET=y
 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
@@ -66,11 +80,19 @@ CONFIG_BLK_DEV_IDE=y
 #
 # 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
 
 #
@@ -82,16 +104,14 @@ CONFIG_BLK_DEV_LOOP=m
 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
@@ -102,26 +122,33 @@ 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
@@ -130,27 +157,43 @@ CONFIG_MOUSE=y
 # 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
@@ -158,9 +201,13 @@ CONFIG_FBCON_CFB2=y
 CONFIG_FBCON_CFB4=y
 CONFIG_FBCON_CFB8=y
 # CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-# CONFIG_FBCON_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
+CONFIG_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
 
 #
@@ -168,7 +215,7 @@ 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
@@ -184,15 +231,17 @@ 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
@@ -201,7 +250,6 @@ CONFIG_INET=y
 # 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
@@ -214,7 +262,7 @@ CONFIG_INET=y
 # CONFIG_HAMRADIO is not set
 
 #
-# IrDA subsystem support
+# IrDA (infrared) support
 #
 # CONFIG_IRDA is not set
 
@@ -222,9 +270,18 @@ CONFIG_INET=y
 # 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
@@ -234,96 +291,52 @@ 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
@@ -338,12 +351,14 @@ CONFIG_SCSI_EESOXSCSI=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_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
@@ -352,6 +367,7 @@ CONFIG_PROC_FS=y
 # 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
 
 #
@@ -359,8 +375,7 @@ CONFIG_EXT2_FS=y
 #
 # 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
@@ -369,12 +384,10 @@ CONFIG_LOCKD=y
 #
 # 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
@@ -410,6 +423,7 @@ CONFIG_NLS=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
 
@@ -418,8 +432,8 @@ CONFIG_NLS=y
 #
 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
index fa410d522c4af8cb6699394eb3c25dcdfa337734..e43a8d2a9a42e948807f9fea7e60d35a3276ac73 100644 (file)
@@ -3,6 +3,11 @@
 #
 CONFIG_ARM=y
 
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
 #
 # System and processor type
 #
@@ -23,11 +28,6 @@ CONFIG_CPU_32v4=y
 CONFIG_CPU_SA110=y
 CONFIG_PCI=y
 CONFIG_ISA_DMA=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
 # CONFIG_ALIGNMENT_TRAP is not set
 
 #
@@ -45,6 +45,8 @@ CONFIG_SYSVIPC=y
 # 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
@@ -60,7 +62,7 @@ CONFIG_PARPORT_PC_FIFO=y
 # 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
@@ -97,15 +99,20 @@ CONFIG_IDEDISK_MULTI_MODE=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_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
@@ -113,8 +120,8 @@ CONFIG_BLK_DEV_CY82C693=y
 # 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
@@ -135,6 +142,7 @@ CONFIG_MD_RAID5=m
 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
 
@@ -176,7 +184,8 @@ CONFIG_SERIAL=y
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
 CONFIG_PRINTER=m
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_PPDEV is not set
@@ -189,12 +198,17 @@ 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
@@ -212,12 +226,33 @@ CONFIG_RTC=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
@@ -226,41 +261,70 @@ CONFIG_RTC=y
 # 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
@@ -377,12 +441,13 @@ CONFIG_VORTEX=y
 # 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
@@ -393,27 +458,40 @@ CONFIG_DEC_ELCP=m
 # 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
@@ -423,10 +501,12 @@ CONFIG_SLIP_MODE_SLIP6=y
 #
 # 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
@@ -441,30 +521,33 @@ CONFIG_SOUND=m
 # 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
@@ -482,10 +565,11 @@ CONFIG_WAVEARTIST_DMA2=7
 # 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
@@ -497,10 +581,12 @@ CONFIG_JOLIET=y
 # 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
 
 #
@@ -510,7 +596,7 @@ CONFIG_EXT2_FS=y
 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
index 904bb0724433c94ea26b148a88e9c60ab0d65bf5..a22e1d99258583bfab1decd1070bffbe3065b7cf 100644 (file)
@@ -3,6 +3,11 @@
 #
 CONFIG_ARM=y
 
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
 #
 # System and processor type
 #
@@ -12,21 +17,14 @@ CONFIG_ARCH_RPC=y
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_FOOTBRIDGE is not set
 CONFIG_ARCH_ACORN=y
-# CONFIG_ISA_DMA is not set
 CONFIG_CPU_32=y
 # CONFIG_CPU_26 is not set
-# CONFIG_CPU_ARM2 is not set
-# CONFIG_CPU_ARM3 is not set
-# CONFIG_CPU_ARM6 is not set
-# CONFIG_CPU_ARM7 is not set
+CONFIG_CPU_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
@@ -43,16 +41,39 @@ CONFIG_SYSVIPC=y
 # 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
@@ -65,11 +86,22 @@ CONFIG_BLK_DEV_IDE=y
 #
 # 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
 
 #
@@ -83,14 +115,12 @@ CONFIG_BLK_DEV_INITRD=y
 # 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
@@ -99,25 +129,36 @@ CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_SERIAL=y
 # CONFIG_SERIAL_CONSOLE is not set
-# CONFIG_SERIAL_EXTENDED is not set
 CONFIG_ATOMWIDE_SERIAL=y
 CONFIG_DUALSP_SERIAL=y
+# CONFIG_SERIAL_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
@@ -126,27 +167,44 @@ CONFIG_MOUSE=y
 # 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
@@ -162,6 +220,7 @@ CONFIG_FBCON_CFB32=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
@@ -178,7 +237,7 @@ 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
@@ -194,15 +253,17 @@ 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
@@ -211,7 +272,6 @@ CONFIG_SKB_LARGE=y
 # 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
@@ -224,7 +284,7 @@ CONFIG_SKB_LARGE=y
 # CONFIG_HAMRADIO is not set
 
 #
-# IrDA subsystem support
+# IrDA (infrared) support
 #
 # CONFIG_IRDA is not set
 
@@ -232,39 +292,72 @@ CONFIG_SKB_LARGE=y
 # 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
@@ -283,6 +376,7 @@ CONFIG_CHR_DEV_SG=y
 #
 # 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
@@ -296,6 +390,7 @@ 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
@@ -314,6 +409,7 @@ CONFIG_SCSI_IMM=m
 # 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
@@ -342,32 +438,37 @@ CONFIG_SCSI_OAK1=m
 # 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
@@ -385,10 +486,12 @@ CONFIG_SOUND_VIDC=m
 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
@@ -399,6 +502,7 @@ CONFIG_PROC_FS=y
 # 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
 
 #
@@ -415,12 +519,17 @@ CONFIG_LOCKD=y
 #
 # 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
@@ -456,6 +565,7 @@ CONFIG_NLS_ISO8859_6=m
 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
 
@@ -467,5 +577,4 @@ CONFIG_DEBUG_ERRORS=y
 # CONFIG_DEBUG_USER is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_MAGIC_SYSRQ=y
-# CONFIG_ARTHUR is not set
-# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_LL=y
index 2aba351c25dc4f98f304f12b5855aa4c99c74903..e43a8d2a9a42e948807f9fea7e60d35a3276ac73 100644 (file)
@@ -3,6 +3,11 @@
 #
 CONFIG_ARM=y
 
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
 #
 # System and processor type
 #
@@ -17,23 +22,13 @@ CONFIG_ARCH_EBSA285=y
 # 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
@@ -58,15 +53,35 @@ CONFIG_BINFMT_ELF=y
 # 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
@@ -79,23 +94,40 @@ CONFIG_BLK_DEV_IDE=y
 #
 # 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
@@ -110,6 +142,7 @@ CONFIG_MD_RAID5=m
 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
 
@@ -139,6 +172,7 @@ CONFIG_PARIDE_KBIC=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
 
 #
@@ -150,31 +184,38 @@ CONFIG_SERIAL=y
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
+CONFIG_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
@@ -185,29 +226,105 @@ CONFIG_RTC=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
@@ -223,6 +340,7 @@ CONFIG_FBCON_CFB24=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=y
 # CONFIG_FBCON_FONTWIDTH8_ONLY is not set
 CONFIG_FBCON_FONTS=y
@@ -238,8 +356,9 @@ CONFIG_FONT_ACORN_8x8=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
@@ -257,15 +376,17 @@ CONFIG_IP_ALIAS=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
@@ -274,7 +395,6 @@ CONFIG_SKB_LARGE=y
 # 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
@@ -287,7 +407,7 @@ CONFIG_SKB_LARGE=y
 # CONFIG_HAMRADIO is not set
 
 #
-# IrDA subsystem support
+# IrDA (infrared) support
 #
 # CONFIG_IRDA is not set
 
@@ -295,9 +415,18 @@ CONFIG_SKB_LARGE=y
 # 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
@@ -312,11 +441,13 @@ CONFIG_VORTEX=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
@@ -327,31 +458,55 @@ CONFIG_DEC_ELCP=m
 # 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
@@ -362,32 +517,37 @@ CONFIG_SLIP_MODE_SLIP6=y
 # 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
@@ -405,24 +565,28 @@ CONFIG_WAVEARTIST_DMA2=7
 # 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
 
 #
@@ -432,7 +596,7 @@ CONFIG_EXT2_FS=y
 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
@@ -441,12 +605,17 @@ CONFIG_LOCKD=y
 #
 # 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
@@ -482,6 +651,7 @@ CONFIG_NLS_ISO8859_2=m
 # 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
 
@@ -490,7 +660,7 @@ CONFIG_NLS_ISO8859_15=m
 #
 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
index cdd7a9821eaa639dc8cf8e5b2103c3039899d758..0caf4bf26057f6c6de5bd925f7a7d812280bdcae 100644 (file)
@@ -16,6 +16,7 @@
 #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>
@@ -29,8 +30,6 @@ extern void outswb(unsigned int port, const void *to, int len);
 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
  */
@@ -125,7 +124,6 @@ EXPORT_SYMBOL(cpu_cache_purge_area);
 EXPORT_SYMBOL(__machine_arch_type);
 
        /* networking */
-EXPORT_SYMBOL(csum_partial_copy);
 EXPORT_SYMBOL(csum_partial_copy_nocheck);
 EXPORT_SYMBOL(__csum_ipv6_magic);
 
@@ -172,8 +170,7 @@ EXPORT_SYMBOL_NOVERS(strpbrk);
 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);
index b9b7d57b4078da5cd7c9bbd6cc85fa37eb3bf3d7..4ce3079b471c98ec15994a9551517e588c258054 100644 (file)
@@ -33,8 +33,8 @@ void pcibios_report_device_errors(void)
                        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);
        }
 }
 
@@ -162,9 +162,10 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq)
  */
 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;
 
                /*
@@ -220,6 +221,7 @@ static u8 __init no_swizzle(struct pci_dev *dev, u8 *pin)
        return 0;
 }
 
+#ifdef CONFIG_FOOTBRIDGE
 /* ebsa285 host-specific stuff */
 static int irqmap_ebsa285[] __initdata = { IRQ_IN1, IRQ_IN0, IRQ_PCI, IRQ_IN3 };
 
@@ -255,7 +257,7 @@ static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, 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];
@@ -313,17 +315,53 @@ static struct hw_pci netwinder_pci __initdata = {
        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;
@@ -346,12 +384,14 @@ void __init pcibios_init(void)
        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)
@@ -363,7 +403,17 @@ 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)
 {
 }
index fb311745201f2dd33f468bd38e0c4aba8545c599..9a4380732566a62d0230fd0689941db5bab17c67 100644 (file)
@@ -7,3 +7,4 @@ struct hw_pci {
 };
 
 void __init dc21285_init(void);
+void __init plx90x0_init(void);
index 201a271e0dcb12a21f00ab58309b8ad6b4862dbf..d8d416c4e6d7f93cb832751eb6d939815dc556f0 100644 (file)
 /* 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 */
@@ -93,7 +93,7 @@
                .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)
index fef1489b7cd945a0cc3ae403cb671153410d15ea..5802dac708eff349c7bd57ddd87ce884adeb52d7 100644 (file)
 #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
index dc7cc054ee981d2fb8528734e9037c2f6ec09aa4..6158e995a83f2f9256d6c234e747118a0ea85dcc 100644 (file)
@@ -220,7 +220,9 @@ void __init dc21285_init(void)
 #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);
@@ -244,7 +246,7 @@ void __init dc21285_init(void)
                                (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);
index 5d9ce0ac6622b5f107ea5ad5602d6deac8e5abc4..f2dc9e36cd27a816473e1d580480509cfe02112e 100644 (file)
@@ -535,7 +535,6 @@ Ldata_unknown:      @ Part of jumptable
                mov     r0, r1
                mov     r1, r4
                mov     r2, r3
-       mov r3, lr
                b       baddataabort
 
 Ldata_ldrstr_post:
index 6d4107ede00486954ce56026e6563e2747ddf86d..f4f03ee9354a925d41599de9af47562bc8559502 100644 (file)
@@ -429,7 +429,10 @@ __und_invalid:     sub     sp, sp, #S_FRAME_SIZE
                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]
@@ -466,6 +469,7 @@ fpe_not_present:
                add     r5, r5, r4, lsl #2
                str     r5, [sp, r6, lsr #14]           @ Save reg
                mov     pc, r9
+#endif
 
 /*
  * SVC mode handlers
@@ -685,11 +689,11 @@ ENTRY(__switch_to)
                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
 
index bdf6de6b3807fa8dec313c4f1f659cf11cac235b..2be1a601216025107795e2ca6656bd186c9168b7 100644 (file)
@@ -3,6 +3,9 @@
  * 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
@@ -16,9 +19,9 @@
 
                .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
@@ -74,65 +77,71 @@ ret_from_exception:
 /*=============================================================================
  * 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)
 
@@ -150,67 +159,49 @@ ENTRY(sys_call_table)
 @ 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
index 2996d89aff324253828e2f33fb20d0cfb8ac0fff..35e71a4a95870cd0d9bcbbf244a28dc76970f5a8 100644 (file)
@@ -69,7 +69,7 @@ ENTRY(_stext)
  *  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'
@@ -83,7 +83,7 @@ __entry:      teq     r0, #0
                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
@@ -94,16 +94,11 @@ __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
 
                /*
@@ -126,6 +121,9 @@ __mmap_switched:
 
                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)
@@ -137,16 +135,16 @@ __mmap_switched:
  * 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
@@ -157,13 +155,22 @@ __create_page_tables:
                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
@@ -174,8 +181,11 @@ __create_page_tables:
                 * 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
@@ -273,7 +283,7 @@ __lookup_processor_type:
  * 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
@@ -284,7 +294,6 @@ __lookup_architecture_type:
                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
@@ -330,20 +339,20 @@ __arch_types_start:
                @ 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
@@ -398,9 +407,16 @@ __arch_types_start:
                .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:
index 9afacbde35aa805b2a6d27df8c25bde88ed13c21..46afd59387421f3f6b70407234d0f88c802943bb 100644 (file)
@@ -50,13 +50,13 @@ void enable_hlt(void)
 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);
@@ -114,6 +114,7 @@ void machine_halt(void)
 
 void machine_power_off(void)
 {
+       arch_power_off();
 }
 
 void show_regs(struct pt_regs * regs)
@@ -284,7 +285,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
 int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
 {
        if (current->used_math)
-               memcpy(fp, &current->thread.fpstate.soft, sizeof (fp));
+               memcpy(fp, &current->thread.fpstate.soft, sizeof (*fp));
 
        return current->used_math;
 }
index a060bf4d9dc13029cbb4e924a4d5c6f0d293d7ef..a2f7292f6a39c8ee64dc1359fa9a8f6e7f5c28af 100644 (file)
@@ -54,13 +54,13 @@ struct meminfo meminfo;
 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 **);
 };
@@ -201,7 +201,7 @@ parse_cmdline(char **cmdline_p, char *from)
                                meminfo.nr_banks = 0;
                        }
 
-                       start = 0;
+                       start = PHYS_OFFSET;
                        size  = memparse(from + 4, &from);
                        if (*from == '@')
                                start = memparse(from + 1, &from);
@@ -250,17 +250,18 @@ static void __init setup_initrd(unsigned int start, unsigned int size)
 }
 
 #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)
 
@@ -277,10 +278,10 @@ static unsigned int __init find_bootmap_pfn(unsigned int bootmap_pages)
         */
 #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;
                }
@@ -373,7 +374,7 @@ static void __init setup_bootmem(void)
 #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
 }
@@ -528,16 +529,66 @@ fixup_coebsa285(struct machine_desc *desc, struct param_struct *params,
                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
 }
 
@@ -565,7 +616,7 @@ static struct machine_desc machine_desc[] __initdata = {
                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,
@@ -627,9 +678,15 @@ static struct machine_desc machine_desc[] __initdata = {
                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
        }
 };
 
index 46affebf6d97ed4aebc72119561d8a1f6657629c..f9fbd25368b668874e17a4e50242498e1fb7f389 100644 (file)
@@ -278,6 +278,7 @@ setup_sigcontext(struct sigcontext *sc, /*struct _fpstate *fpstate,*/
 
        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;
index 408149bc51dc1e33c26d244d29ce502b74a27f74..5e989663b9c8f6755a92c0641f29d48deb11231d 100644 (file)
@@ -79,12 +79,26 @@ out:
        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;
@@ -112,6 +126,10 @@ out:
        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 {
@@ -251,48 +269,11 @@ out:
        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;
@@ -331,15 +312,15 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
        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);
        
@@ -354,4 +335,3 @@ asmlinkage int sys_pause(void)
        schedule();
        return -ERESTARTNOHAND;
 }
-
index c48c62108b124887293301f938d2f236913eb90a..67c2597e69d267a63f0c6b736ca5965af8715ed3 100644 (file)
@@ -112,7 +112,7 @@ void do_gettimeofday(struct timeval *tv)
 
        /*
         * 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;
index 26ecfa1947af2871efd7ddd70c9d3298cf812261..ac15651d3936e2e2cde108d9d22995f6d5ea2c77 100644 (file)
@@ -187,10 +187,11 @@ void die(const char *str, struct pt_regs *regs, int err)
                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;
@@ -241,11 +242,10 @@ asmlinkage void do_unexp_fiq (struct pt_regs *regs)
 }
 
 /*
- * 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)
 {
@@ -255,7 +255,8 @@ 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);
@@ -279,6 +280,9 @@ asmlinkage void math_state_restore (void)
        current->used_math = 1;
 }
 
+/*
+ * Handle some more esoteric system calls
+ */
 asmlinkage int arm_syscall (int no, struct pt_regs *regs)
 {
        switch (no) {
@@ -295,7 +299,7 @@ asmlinkage int arm_syscall (int no, struct pt_regs *regs)
 
        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;
@@ -308,7 +312,7 @@ asmlinkage int arm_syscall (int no, struct pt_regs *regs)
                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);
@@ -357,16 +361,19 @@ asmlinkage void arm_invalidptr(const char *function, int size)
                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;
 
@@ -385,10 +392,10 @@ asmlinkage void baddataabort(int code, unsigned long instr, struct pt_regs *regs
                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)
 {
@@ -425,6 +432,19 @@ asmlinkage void __div0(void)
        __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);
index 9a22fe08f3d375bb2ea2b7b22b48b6168ca45a56..5046a3377b23e6a2fd210cb85be352ec59d040d9 100644 (file)
@@ -5,8 +5,14 @@
 #
 
 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
@@ -25,13 +31,21 @@ endif
 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:
@@ -42,5 +56,3 @@ constants.h: getconsdata.o extractconstants.pl
 
 getconsdata.o: getconsdata.c
        $(CC) $(CFLAGS) -c getconsdata.c
-
-checksum.o string.o: constants.h
diff --git a/arch/arm/lib/bitops.S b/arch/arm/lib/bitops.S
deleted file mode 100644 (file)
index 4c1f4b0..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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
diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S
new file mode 100644 (file)
index 0000000..8005fd4
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/checksum.S b/arch/arm/lib/checksum.S
deleted file mode 100644 (file)
index ae78b65..0000000
+++ /dev/null
@@ -1,734 +0,0 @@
-/*
- * 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})
diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S
new file mode 100644 (file)
index 0000000..d936ab5
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S
new file mode 100644 (file)
index 0000000..16c4326
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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
+
+
diff --git a/arch/arm/lib/csumipv6.S b/arch/arm/lib/csumipv6.S
new file mode 100644 (file)
index 0000000..76e7d26
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * 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})
+
diff --git a/arch/arm/lib/csumpartial.S b/arch/arm/lib/csumpartial.S
new file mode 100644 (file)
index 0000000..2406dfb
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/csumpartialcopy.S b/arch/arm/lib/csumpartialcopy.S
new file mode 100644 (file)
index 0000000..7289619
--- /dev/null
@@ -0,0 +1,257 @@
+/*
+ * 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
+
+
diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S
new file mode 100644 (file)
index 0000000..f698c0d
--- /dev/null
@@ -0,0 +1,419 @@
+/*
+ * 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
diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S
new file mode 100644 (file)
index 0000000..e165190
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * 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
index 5b46baad047f17f395fe73c5ea30aae3671a7156..aaa7a7ad202d3f77f8804c602cda336bd80283b2 100644 (file)
 #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)
index 0734c60429299c3329d9b6414a169d0d77b777d6..98f75125877130273eed35e77956518b31bb1925 100644 (file)
@@ -6,7 +6,9 @@
 
                .macro  ioaddr, rd,rn
                add     \rd, \rn, #pcio_high
+               .if     pcio_low
                add     \rd, \rd, #pcio_low
+               .endif
                .endm
 
 ENTRY(insl)
diff --git a/arch/arm/lib/memchr.S b/arch/arm/lib/memchr.S
new file mode 100644 (file)
index 0000000..d52abe5
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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})
+
diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S
new file mode 100644 (file)
index 0000000..ae5307d
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ * 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
+
+
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
new file mode 100644 (file)
index 0000000..b7202e8
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/memzero.S b/arch/arm/lib/memzero.S
new file mode 100644 (file)
index 0000000..59ec365
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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
diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S
new file mode 100644 (file)
index 0000000..b4319b4
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/strchr.S b/arch/arm/lib/strchr.S
new file mode 100644 (file)
index 0000000..fbde248
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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})
+
+
diff --git a/arch/arm/lib/string.S b/arch/arm/lib/string.S
deleted file mode 100644 (file)
index ff809fd..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * 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
-
-
diff --git a/arch/arm/lib/strrchr.S b/arch/arm/lib/strrchr.S
new file mode 100644 (file)
index 0000000..ad5a460
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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})
+
+
diff --git a/arch/arm/lib/system.c b/arch/arm/lib/system.c
deleted file mode 100644 (file)
index f3b32cd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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");
-}
diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S
new file mode 100644 (file)
index 0000000..d3dd482
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S
new file mode 100644 (file)
index 0000000..4318653
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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)
+
+
diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S
new file mode 100644 (file)
index 0000000..760b664
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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)
+
+
index 898d2ef772d6b5c4cc200680de6645775a250ec0..00f987b5f06feb937e40e0623af86b2337578a04 100644 (file)
 #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
 
@@ -285,12 +277,10 @@ USER(             strgebt r3, [r0], #1)                   @ May fault
 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
@@ -546,7 +536,6 @@ USER(               ldrget  r3, [r1], #0)                   @ May fault
                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
@@ -557,7 +546,6 @@ USER(               ldrget  r3, [r1], #0)                   @ May fault
                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
@@ -592,7 +580,6 @@ USER(               strnebt r2, [r0], #1)
                mov     r0, #0
                LOADREGS(fd,sp!, {r1, pc})
 
-#ifndef TESTING
                .section .fixup,"ax"
                .align  0
 9001:          LOADREGS(fd,sp!, {r0, pc})
@@ -656,5 +643,4 @@ USER(               ldrbt   r3, [r1], #1)
                .previous
 
                .align
-#endif
 
index 8715ea271a956cab7c963b065dccf85315a90d7a..5151591b8e80cce5616a5317ffb92427a3bf602a 100644 (file)
@@ -29,6 +29,8 @@
 #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
@@ -118,17 +120,18 @@ static int proc_alignment_read(char *page, char **start, off_t off,
  * 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;
@@ -308,116 +311,99 @@ do_alignment_exception(struct pt_regs *regs)
        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);
        }
 }
 
index e516261ed64ff83445bdd6bda0bbc619f4583b0b..d04808ffa2f3a88b9ee80c8da0f8dbb440fede83 100644 (file)
@@ -6,7 +6,7 @@
  */
 #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
@@ -79,7 +79,7 @@ kernel_page_fault(unsigned long addr, int write_access, struct pt_regs *regs,
        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;
@@ -127,7 +127,7 @@ good_area:
                goto do_sigbus;
 
        up(&mm->mmap_sem);
-       return;
+       return 0;
 
        /*
         * Something tried to access memory that isn't in our memory map..
@@ -138,6 +138,7 @@ bad_area:
 
        /* 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
@@ -145,7 +146,7 @@ bad_area:
                        tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode);
 #endif
                force_sig(SIGSEGV, tsk);
-               return;
+               return 0;
        }
 
 no_context:
@@ -156,11 +157,11 @@ 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:
        /*
@@ -173,6 +174,7 @@ 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);
@@ -180,6 +182,7 @@ do_sigbus:
        /* Kernel mode? Handle exceptions or die */
        if (!user_mode(regs))
                goto no_context;
+       return 0;
 }
 
 
index 17972e427a186ba041c6d724a33fdc3e01f144cf..bc4cf1ed1818b712d9b7f10560ccf80e830b4258 100644 (file)
@@ -168,7 +168,8 @@ void show_mem(void)
 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)
@@ -193,7 +194,24 @@ void __init paging_init(void)
        /*
         * 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);
 
        /*
@@ -339,10 +357,11 @@ void free_initmem(void)
 #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);
index 680a52948badfe0c79700a030817ea5b1a78f2b9..a5d4cdfe89589fb61a4cefec458a9d03cb3b3670 100644 (file)
@@ -134,20 +134,6 @@ pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset)
        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
index ee4750c626e6cc2b2a1fdc25ad40a999126715b0..76d1015077992306d67be42e91e6f826843432cc 100644 (file)
@@ -46,6 +46,15 @@ static int __init nowrite_setup(char *__unused)
        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);
 
@@ -218,7 +227,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, int domain, int prot)
  * 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));
 }
@@ -273,73 +282,76 @@ static void __init create_mapping(struct map_desc *md)
        }
 }
 
-/*
- * 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
@@ -347,18 +359,16 @@ void __init pagetable_init(void)
         */
        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);
 
@@ -382,6 +392,7 @@ void __init create_memmap_holes(void)
        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)
@@ -409,7 +420,7 @@ void __init create_memmap_holes(void)
 
                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;
        }
 
index eba2984b6b187691522e87ffc65f14d6ef6549fc..c6f9f2e8b7acc7f0957c4dc38a808df402f1b06a 100644 (file)
@@ -6,11 +6,11 @@
  * 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
@@ -56,6 +60,7 @@ struct mem_desc mem_desc[] __initdata = {
 
 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)
index d453269d2ab50edf008d254e9d69e16539db6b69..23508c197ed174df069510a98f95e832ab49f302 100644 (file)
@@ -134,14 +134,10 @@ ENTRY(cpu_arm7_data_abort)
                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
@@ -468,7 +464,7 @@ ENTRY(arm6_processor_functions)
                .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
 
 /*
index 2d57b103053685604890f4decb79caa3e37ef74d..5431f14a04ea59f8977cf963d86ac0ca7e88e16b 100644 (file)
@@ -16,6 +16,7 @@
  * 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
@@ -56,7 +57,7 @@ cpu_sa110_flush_cache_all_r2:
                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
@@ -74,7 +75,7 @@ cpu_sa1100_flush_cache_all_r2:
                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
@@ -321,7 +322,7 @@ ENTRY(cpu_sa110_set_pgd)
                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
@@ -338,7 +339,7 @@ ENTRY(cpu_sa1100_set_pgd)
                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
@@ -430,8 +431,12 @@ ENTRY(cpu_sa110_do_idle)
 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
 
index f83109875daa57230c8bf68a7724ab69950514c9..93b8946e7ec8b608f6c9ebf5eef35b2a7ffde006 100644 (file)
@@ -6,82 +6,84 @@ OUTPUT_ARCH(arm)
 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) }
 }
index 7d56f423d12acae1c851d87cc223d8dc3333c5fe..bf0f961958df6605339ba8662fe96de80dce7fa2 100644 (file)
@@ -7,6 +7,8 @@ mainmenu_name "Linux Kernel Configuration"
 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
@@ -106,7 +108,7 @@ fi
 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
index dfc2249816da93d8fb343e378682d3a66aadb4be..fc9a921a5c78ee6b303ad5af3deffdbd410878dd 100644 (file)
@@ -398,11 +398,11 @@ CONFIG_PSMOUSE=y
 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
 
index 27715f16a6b4a682c38a8f6d0464331862db807c..ee2edca1e87b815dcfcb2a33d1594426695c3bb4 100644 (file)
@@ -108,13 +108,13 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
                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);
index 2d60956943270fb228b083bb019a0b3aa60eb436..52a083750a13efa38e69da6841d1d21ad4572b1f 100644 (file)
@@ -2,6 +2,9 @@
 # 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
index 60373a13bbab2994ca9ae5eadc5816e9256ae4a1..2f2f7977e2e397de7b5579a955c8d8610cbe311c 100644 (file)
@@ -112,7 +112,11 @@ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 
 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
 
index 9776262747b0ffb4c11aff9602b6324c47d449c1..795aa5b833e1a2d5d16bb613c37011008faf5b33 100644 (file)
@@ -45,11 +45,7 @@ CONFIG_KCORE_ELF=y
 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
index ed12c36a14c8455989cb4bc0d953c0fbddf6e1e6..9850f61d839a3782ebd569726c827b04a133688a 100644 (file)
@@ -47,11 +47,7 @@ CONFIG_BINFMT_ELF=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
index c24514195bf9bc3bfa838c45123a29a454c98f2f..5fe9be3760f07cb26dd5ee06de767d76760c6d6e 100644 (file)
@@ -40,11 +40,7 @@ CONFIG_SYSVIPC=y
 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
index 514843d00c731a1b8f5416ef360464a086cfa062..e2b7c31bd8b525cc6bfba41463b5e7f76586dccf 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_SYSVIPC=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=m
+CONFIG_HOTPLUG=y
 
 #
 # PCMCIA/Cardbus support
index cdcb915bedb29ba1558b45699076c4c986eff64d..931e1a7a9036db757321292a06807475d427be1d 100644 (file)
@@ -40,11 +40,7 @@ CONFIG_SYSVIPC=y
 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
index 2a3aac0f73d0597be13cd3cae9456da739929ffe..08acbd87419fb7fce4513d88c3b2e873fc4b49d9 100644 (file)
@@ -45,11 +45,7 @@ CONFIG_KCORE_ELF=y
 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
index 1de5dc89a1612ccdfe8787e1d678efbf011b7bdc..425f23b8cbd78428743e8d5dfdf2b17550860ec8 100644 (file)
@@ -908,7 +908,6 @@ static void __init map_kernel(void)
                                (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);
index 195f26df5502ddf45c6007f4f1713dc05a5496c3..1be5a02e39901749a55248d4f161288a66e87aa5 100644 (file)
@@ -1,4 +1,4 @@
-/*  $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)
@@ -503,6 +503,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
 #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;
 
index 42c36eaa2b8e9f5e99a3979640b27a1e38d7dc60..6943aa4e6f6db38d68357c121c4861c90f0c60e1 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -125,10 +125,6 @@ EXPORT_SYMBOL_NOVERS(___up_write);
 
 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);
index 0c4e9a6732a16986efc6c1a9b026d779787bdb51..913630e66b7c44c4c4476c8c4074aa53bb5e9866 100644 (file)
@@ -1,4 +1,4 @@
-/* $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.
  *
@@ -33,10 +33,10 @@ C_LABEL(sunos_getpid):
        /* 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)
@@ -45,10 +45,10 @@ C_LABEL(sunos_getuid):
        /* 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)
index d4be69030beca78c572d69deb3ce405942318927..6da3c3f2125c58aed3c304ef3d5623ed97e20f12 100644 (file)
@@ -1,4 +1,4 @@
-/* $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
@@ -63,7 +63,7 @@ sys_call_table:
 /*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
@@ -83,7 +83,7 @@ sunos_sys_table:
        .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
@@ -104,8 +104,8 @@ sunos_sys_table:
        .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
@@ -119,9 +119,9 @@ sunos_sys_table:
        .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
index 3b2074c76ee0b47e02bef53c384b014b8d5ae03b..3338666e842fec73ffbb6ca6c0aa97762a2ff80c 100644 (file)
@@ -1,4 +1,4 @@
-/* $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.
@@ -19,8 +19,6 @@
 #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;
index c365cf0d5bacac226b90d1813a4f30e90c593fd1..616fbe599be6dfab8f1db96368a9e9e11dc7a002 100644 (file)
@@ -1,10 +1,11 @@
-/* $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>
@@ -44,9 +47,6 @@
 
 #include <asm/btfixup.h>
 
-/* #define DEBUG_MAP_KERNEL */
-/* #define PAGESKIP_DEBUG */
-
 enum mbus_module srmmu_modtype;
 unsigned int hwbug_bitmask;
 int vac_cache_size;
@@ -55,6 +55,8 @@ int vac_badbits;
 
 extern struct resource sparc_iomap;
 
+extern unsigned long last_valid_pfn;
+
 #ifdef __SMP__
 #define FLUSH_BEGIN(mm)
 #define FLUSH_END
@@ -63,9 +65,6 @@ extern struct resource sparc_iomap;
 #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 *)
 
@@ -96,95 +95,9 @@ char *srmmu_name;
 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.
@@ -198,91 +111,6 @@ static inline unsigned long srmmu_swap(unsigned long *addr, unsigned long value)
 /* 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)
 {
@@ -290,31 +118,13 @@ 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); }
@@ -360,13 +170,7 @@ static inline pte_t srmmu_pte_mkyoung(pte_t pte)     { return __pte(pte_val(pte)
  * 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)); }
@@ -378,47 +182,17 @@ static pte_t srmmu_mk_pte_io(unsigned long page, pgprot_t pgprot, int space)
 
 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)
@@ -444,26 +218,6 @@ static inline pte_t *srmmu_pte_offset(pmd_t * dir, unsigned long address)
        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;
@@ -857,7 +611,7 @@ void srmmu_unmapioaddr(unsigned long virt_addr)
        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();
 }
 
@@ -879,6 +633,11 @@ static void srmmu_free_task_struct(struct task_struct *tsk)
        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);
@@ -1235,8 +994,6 @@ extern void viking_flush_sig_insns(struct mm_struct *mm, unsigned long addr);
 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);
@@ -1276,7 +1033,7 @@ static void srmmu_set_pte_nocache_hyper(pte_t *ptep, pte_t pteval)
 
 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();
 }
@@ -1291,57 +1048,23 @@ static void hypersparc_switch_mm(struct mm_struct *old_mm,
                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)
@@ -1353,13 +1076,20 @@ static inline void srmmu_allocate_ptable_skeleton(unsigned long start, unsigned
        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;
        }
@@ -1408,94 +1138,34 @@ void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end)
                        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. */
@@ -1504,44 +1174,10 @@ static void __init do_large_mapping(unsigned long vaddr, unsigned long phys_base
        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)
@@ -1549,20 +1185,11 @@ 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;
 }
 
@@ -1579,245 +1206,35 @@ static inline void memprobe_error(char *msg)
  */
 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 */
@@ -1840,32 +1257,33 @@ unsigned long __init srmmu_paging_init(unsigned long start_mem, unsigned long en
                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);
@@ -1876,22 +1294,27 @@ unsigned long __init srmmu_paging_init(unsigned long start_mem, unsigned long en
        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)
@@ -2012,7 +1435,7 @@ static void hypersparc_destroy_context(struct mm_struct *mm)
                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);
@@ -2883,7 +2306,7 @@ void __init ld_mmu_srmmu(void)
        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);
 
@@ -2934,12 +2357,11 @@ void __init ld_mmu_srmmu(void)
        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);
 
index c450261e38d67d03d942eee76d2e871bac7ec159..132a115a614749bf31478818778965b46e32eb43 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -1148,21 +1148,23 @@ static void sun4c_free_task_struct_hw(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_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)
@@ -1171,21 +1173,28 @@ 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)
@@ -2719,6 +2728,7 @@ void __init ld_mmu_sun4c(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);
index f62e3506d12748149dd2c89a7d9581fd42ca8fd4..225780f9d1487a804db3666f4f7dadfed755ed19 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -768,9 +768,9 @@ sunos_getpid:
        /* 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]
@@ -778,9 +778,9 @@ sunos_getuid:
        /* 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]
index ef0fb3e94b4e995c16d5de4e769c0d2bc43e8abe..cba5cfac3bd244050878504319b5af17393980b1 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -594,6 +594,8 @@ static inline int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long ar
                        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;
                }
        }
@@ -667,7 +669,7 @@ static inline int hdio_getgeo(unsigned int fd, unsigned long arg)
                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 {
@@ -715,7 +717,7 @@ static inline int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned lon
                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 {
@@ -826,8 +828,10 @@ static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                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)
@@ -851,8 +855,10 @@ static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                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 {
@@ -896,6 +902,9 @@ static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
        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);
@@ -1064,8 +1073,10 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                        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:
@@ -1097,8 +1108,10 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                        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:
@@ -1221,6 +1234,9 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                default:
                        break;
        }
+       if (err)
+               err = -EFAULT;
+
 out:   if (karg) kfree(karg);
        return err;
 }
@@ -1396,8 +1412,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                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);
@@ -1422,7 +1437,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
        case MTIOCSETCONFIG32:
                break;
        }
-       return err;
+       return err ? -EFAULT: 0;
 }
 
 struct cdrom_read32 {
@@ -1438,11 +1453,21 @@ struct cdrom_read_audio32 {
        __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;
@@ -1477,6 +1502,17 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
                        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;
@@ -1502,11 +1538,15 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
        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 {
@@ -1558,7 +1598,7 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
                }
                break;
        }
-       return err;
+       return err ? -EFAULT : 0;
 }
 
 extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
@@ -1835,6 +1875,7 @@ asmlinkage int sys32_ioctl(unsigned int fd, 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;
                
index c102a62058d1ec6dbef1378aa2a21386935ff154..01fea4f5961e0db5273ec8a01c88b66a68edd42c 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -228,6 +228,11 @@ int pci_assign_resource(struct pci_dev *dev, int i)
        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")) {
index d66086bfa9c87eb21d8816f8ea4eba50fea6afc4..c12b5182df1739bdc0ee471b5f4369bbf731b070 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -1278,6 +1278,11 @@ static void __init psycho_iommu_init(struct pci_controller_info *p)
        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;
index 3788f71d3561407ad83775e2df0ff2ff1009fb39..7409b3164cbfecc71be2c24e813641344fde5087 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -1148,6 +1148,7 @@ static void __init sabre_iommu_init(struct pci_controller_info *p,
        }
        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;
index 4b461fbeebe04439b2fe8298781847910462e371..34db8d056aa244ccc4626b833d4c9152c0a917d9 100644 (file)
@@ -1,4 +1,4 @@
-/* $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.
  *
@@ -20,7 +20,7 @@ sys32_mmap:
 
        .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
@@ -32,20 +32,6 @@ sys32_chmod:
        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
index 486a09d9915276e9add23580a4c29350aa91b2b8..af4743ec127aa266917041fc9485a0ebff20e811 100644 (file)
@@ -1,4 +1,4 @@
-/* $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
@@ -22,6 +22,7 @@
 #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>
@@ -98,7 +99,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
                        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:
@@ -118,7 +119,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
                        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;
@@ -136,7 +137,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
                        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;
index f9be1320ee4e9b92290546bb3c82e0812812fb1d..51e68a412a958cfc21df76db54e3d6698803cf1a 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -43,6 +43,7 @@
 #include <linux/stat.h>
 #include <linux/filter.h>
 #include <linux/highmem.h>
+#include <linux/highuid.h>
 
 #include <asm/types.h>
 #include <asm/ipc.h>
@@ -191,6 +192,17 @@ struct semid_ds32 {
         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;
@@ -208,16 +220,51 @@ struct msqid_ds32
         __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..
@@ -245,6 +292,34 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr)
             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);
@@ -270,10 +345,10 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr)
                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);
@@ -357,6 +432,34 @@ static int do_sys32_msgctl (int first, int second, void *uptr)
            (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;
@@ -377,10 +480,10 @@ static int do_sys32_msgctl (int first, int second, void *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);
@@ -423,12 +526,45 @@ static int do_sys32_shmctl (int first, int second, void *uptr)
        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);
@@ -462,10 +598,10 @@ static int do_sys32_shmctl (int first, int second, void *uptr)
                } 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);
@@ -1244,8 +1380,8 @@ static int cp_new_stat32(struct inode *inode, struct stat32 *statbuf)
        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);
@@ -1853,91 +1989,6 @@ sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 *uinfo)
        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;
@@ -1968,43 +2019,6 @@ asmlinkage long sys32_times(struct tms32 *tbuf)
        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)
 
index 27355da96dde42884a60a727fe4184a5bf29268f..073ba40a53b1f0885326b04df469daa6fd45286e 100644 (file)
@@ -1,4 +1,4 @@
-/* $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
@@ -64,7 +64,7 @@ sys_call_table32:
 /*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
@@ -99,8 +99,8 @@ sys_call_table:
 /*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
@@ -143,7 +143,7 @@ sunos_sys_table:
        .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
@@ -164,8 +164,8 @@ sunos_sys_table:
        .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
@@ -179,9 +179,9 @@ sunos_sys_table:
        .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
index 53d825e6dfe5915fc3ae329338bd9b6941128f82..eb9cf3d261f2d21fbf6cc7098736f57c9993a852 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -183,15 +183,15 @@ solaris_getpid:
 
        .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]
 
index 86b0df2831a22b179dd5f9b453818ff29d30200e..e15ef157c006773a9c56ac3794a49c24bdc07e52 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -708,71 +708,6 @@ asmlinkage int solaris_ulimit(int cmd, int val)
        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)
index a07fc7cc2abddaf0782cc670cb4c1df3a3f2fea7..04e67690767e6ec3a666751c16059e35594c4418 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -401,18 +401,6 @@ asmlinkage int solaris_sysconf(int id)
        }
 }
 
-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;
index 7c7c7b8b1092e1daf41abd9a1c67ba7ac578b10d..17562bafd282d0184b5eb24c8789fa3e6f319b73 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -40,7 +40,7 @@ solaris_sys_table:
        .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      */
@@ -230,8 +230,8 @@ solaris_sys_table:
        .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     */
index f9eef09873787062393a826f30a6f2c8db4da9bd..fb440ae10d1528bf37356d52dbb7903230812c3a 100644 (file)
 
 #define MAJOR_NR       MFM_ACORN_MAJOR
 #include <linux/blk.h>
+#include <linux/blkpg.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -975,7 +976,7 @@ static void mfm_request(void)
        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();
@@ -1210,24 +1211,6 @@ static int mfm_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long a
                        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);
 
@@ -1248,7 +1231,13 @@ static int mfm_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long a
                        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;
@@ -1421,11 +1410,6 @@ int mfm_init (void)
 {
        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;
@@ -1448,6 +1432,12 @@ int mfm_init (void)
                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");
 
@@ -1456,7 +1446,7 @@ int mfm_init (void)
        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
index 28030bc32d1f65d142575c2bf42227f76d6e5537..60a5e0a805e59ca7db482f35617346e6bdea9758 100644 (file)
@@ -6,12 +6,12 @@ if [ "$CONFIG_SCSI_ACORNSCSI_3" != "n" ]; then
    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
index 7d2d0c8e7cf06a971bbf330bd47651abb77fa3cd..9eaf6ba9af3d4f6f6b923791e0a924123c2695fa 100644 (file)
@@ -216,7 +216,7 @@ if [ "$CONFIG_DRM" = "y" ]; then
   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
 
index 7a32e5d553b93e41ad8342d61ad221485bee3692..484d537649cf4f08d4b20911741667b52ad9637d 100644 (file)
@@ -2,10 +2,8 @@
 # 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
@@ -15,14 +13,19 @@ else
    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
index 20dce7ec45a88cf25f82fbff4a6374fecb1e71c4..03bdfcbe69171dd042fa2459179f747cc07ad6ce 100644 (file)
@@ -261,6 +261,6 @@ fi
 
 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
index 243b5c89648aeb20f46a81a4269a8c2c9ebed344..d9164e476990ddfbbb3316752b2da7df54b1bfbe 100644 (file)
@@ -31,12 +31,14 @@ if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
    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
index 37e05bfd35671fbc86a73453f1e77b59b983b716..e982eb4e9d229cb6e6ddfa24c7811cca9764a15f 100644 (file)
@@ -3161,27 +3161,20 @@ struct pci_driver tulip_ops = {
        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:
index 8f1f6cce018dae51dfefca3ad90ab4cc90af8921..1c9dbdc10c69b6d8510b26eaf4dd687d959e7b05 100644 (file)
  *  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
@@ -69,6 +70,7 @@
 #include <linux/stddef.h>
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/spinlock.h>
 #include <net/checksum.h>
 
 #include <asm/io.h>
@@ -86,7 +88,7 @@
  */
 
 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)",
@@ -251,6 +253,8 @@ static int __init olympic_init(struct net_device *dev)
                }
        }
 
+       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));
@@ -757,6 +761,8 @@ static void olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        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) ; 
 
@@ -835,15 +841,20 @@ static void olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        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;
        }
 
@@ -860,10 +871,12 @@ static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
                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;
+       } 
 
 }
        
index d5a06423abcf71334f1ff7c79e793e56177e337c..293438128d76155bcc0ec8c7b89c20bb0c0159ad 100644 (file)
@@ -245,6 +245,8 @@ struct olympic_private {
        __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;
 
index 3297568f0f0670be2fce3ea902a48875f28073d6..d2af7d8f6756ba88a8b9efcb190156e61f323e71 100644 (file)
@@ -14,7 +14,7 @@ if [ "$CONFIG_PARPORT" != "n" ]; then
    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
index 3b7b80b5e20c00347300a50a456705696afb25f3..57e6ac684190d003d99b100dc8a116e30b17e33e 100644 (file)
@@ -740,7 +740,7 @@ size_t parport_pc_ecp_write_block_pio (struct parport *port,
                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++) {
index f1709045fd7b727248ef75dd57e7a0fe8a8f2be5..945b19bd49973ef9cdefe17cb7532b3f3eadbf93 100644 (file)
@@ -24,7 +24,7 @@ ifdef CONFIG_PROC_FS
 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
diff --git a/drivers/pci/helper.c b/drivers/pci/helper.c
deleted file mode 100644 (file)
index cd21631..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * $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;
-}
-
-
index b2767548e2b3848be772bbbade940da1bc975f2c..3725563e9ce3cf6e8623f1d48dc9dbcf859fcc52 100644 (file)
@@ -202,7 +202,7 @@ pci_enable_device(struct pci_dev *dev)
 
 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) {
index fb38bede2a50114985194ed79d24cb188b9d3e6e..64b6a0f3eca66129ef7e6c3189ad5c1dae6da489 100644 (file)
@@ -6,6 +6,7 @@
  *     Copyright 1998 Martin Mares
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <asm/dma.h>   /* isa_dma_bridge_buggy */
@@ -23,7 +24,6 @@ EXPORT_SYMBOL(pci_find_class);
 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);
index 1284c9aa876289ac7304931790ae0e40d9649967..84639a5a2a8178649ec160260bf2d2b0421ee6d7 100644 (file)
@@ -69,7 +69,6 @@ pci_assign_resource(struct pci_dev *dev, int i)
        }
 
        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));
index a58098024c477c624185a457a4111a1490c65d6a..c935efd9a9335475e5c43d23f1fa4437db7d26fd 100644 (file)
@@ -120,7 +120,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
                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;
@@ -129,7 +129,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
                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;
index a04245762eb2b6f267bc9a0dc41007c6df6d8605..af28f4ef5cb5f5fbf24609b35bb5a190bdcbabe6 100644 (file)
@@ -743,7 +743,7 @@ static int alloc_io_space(socket_info_t *s, u_int attr, ioaddr_t *base,
        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;
index 2228b4769d9174c186f5949c5a1d7f348653f4bf..b3c3bfd687ea871f11222b13ba8e3ff0e69313e3 100644 (file)
@@ -30,6 +30,8 @@
 #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 */
index 5564462ab65d9f9a99b4cc3f31c648e398be6e9b..b8664c6b5495dba78e786f35cd9ffd236ccc8b3f 100644 (file)
@@ -30,6 +30,7 @@
 #ifndef _LINUX_TI113X_H
 #define _LINUX_TI113X_H
 
+#include <linux/config.h>
 
 /* Register definitions for TI 113X PCI-to-CardBus bridges */
 
index 465df600251ae656e09f9b88d1f57f161266fc07..68cf713cef1e6e8e798dd23cd01df3feeb639854 100644 (file)
@@ -603,11 +603,11 @@ static void yenta_allocate_res(pci_socket_t *socket, int nr, unsigned type)
        }
 
        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;
        }
                
index 92f064f2594f96758bc3855662aff4365c0bfccd..602c7b670796a5ebebc0d49f870a5837da4af29f 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -29,8 +29,8 @@
 #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)
index 13b426c9d3ff52f365aa3f73e355ccdad340d803..2125f4e114bdd8f3d5451c458371ed36a58d0056 100644 (file)
@@ -23,6 +23,13 @@ comment 'USB Devices'
    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
index 70a4d593d726cb1133588ce498059f6c3692fc25..9f759baf83d35e12aca290796dc38819089a60af 100644 (file)
 
 #include "usb.h"
 
+/*
+ * CMSPAR, some architectures can't have space and mark parity.
+ */
+
+#ifndef CMSPAR
+#define CMSPAR                 0
+#endif
+
 /*
  * Major and minor numbers.
  */
@@ -180,7 +188,7 @@ static void acm_ctrl_irq(struct urb *urb)
 
                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");
index de7c65674e9e48818a0ac7405bc07f2de6d55770..c066c3c43291967358cb92d8075694b8cade64bb 100644 (file)
@@ -48,13 +48,11 @@ static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
                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)
 {
@@ -359,7 +357,8 @@ static void usb_hub_port_connect_change(struct usb_device *hub, int port)
        }
 
        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 */
@@ -392,6 +391,8 @@ static void usb_hub_events(void)
        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
@@ -444,14 +445,32 @@ static void usb_hub_events(void)
                        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:
index 3d3a76caf025f6a539d1bed7116f0b42b9acf35f..c10b76557b91c2750c125d3d487df2ce6993c40e 100644 (file)
@@ -53,7 +53,7 @@ struct mousedev_list {
        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;
 };
index e95d66e961b0cfd123785710514958a0a8b0c87f..b084489ed040eeb3329377d418ce2bb165c5b41e 100644 (file)
@@ -47,6 +47,7 @@
 #include <asm/system.h>
 
 #undef DEBUG
+#define OHCI_USE_NPS
 
 #include "usb.h"
 #include "ohci-hcd.h"
@@ -154,8 +155,9 @@ void ep_print_int_eds (ohci_t * ohci, char * str) {
                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");
        }
@@ -174,7 +176,7 @@ static int sohci_return_urb (urb_t * urb)
 {
        urb_priv_t * urb_priv = urb->hcpriv;
        urb_t * urbt;
-       unsigned int flags;
+       unsigned long flags;
        int i;
        
        /* just to be sure */
@@ -245,7 +247,7 @@ static int sohci_submit_urb (urb_t * urb)
        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;
        
@@ -346,7 +348,7 @@ static int sohci_submit_urb (urb_t * urb)
  
 static int sohci_unlink_urb (urb_t * urb)
 {
-       unsigned int flags;
+       unsigned long flags;
        ohci_t * ohci;
        DECLARE_WAITQUEUE (wait, current);
        
@@ -412,7 +414,7 @@ static int sohci_alloc_dev (struct usb_device *usb_dev)
   
 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);
@@ -566,9 +568,9 @@ static int ep_link (ohci_t * ohci, ed_t * edi)
                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));
                }
@@ -588,8 +590,8 @@ static int ep_link (ohci_t * ohci, ed_t * edi)
                                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;
@@ -622,27 +624,27 @@ static int ep_unlink (ohci_t * ohci, ed_t * ed)
        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;
       
@@ -653,9 +655,9 @@ static int ep_unlink (ohci_t * ohci, ed_t * ed)
                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;
                                        }
@@ -670,7 +672,7 @@ static int ep_unlink (ohci_t * ohci, ed_t * ed)
        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;
@@ -679,9 +681,9 @@ static int ep_unlink (ohci_t * ohci, ed_t * 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);
-                                               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;
                                                }
@@ -800,7 +802,7 @@ static void td_fill (unsigned int info, void * data, int len, urb_t * urb, int t
        
        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; 
@@ -900,7 +902,7 @@ static td_t * dl_reverse_done_list (ohci_t * ohci)
        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);
        
@@ -927,7 +929,7 @@ static td_t * dl_reverse_done_list (ohci_t * ohci)
 
                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;
@@ -941,7 +943,7 @@ static td_t * dl_reverse_done_list (ohci_t * ohci)
  
 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;
@@ -951,16 +953,16 @@ static void dl_del_list (ohci_t  * ohci, unsigned int frame)
        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) 
@@ -1013,7 +1015,7 @@ static void dl_done_list (ohci_t * ohci, td_t * td_list)
        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;
@@ -1071,8 +1073,8 @@ static void dl_done_list (ohci_t * ohci, td_t * td_list)
                
                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 */
@@ -1185,9 +1187,9 @@ static int rh_send_irq (ohci_t * ohci, void * rh_data, int rh_len)
        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;
   
@@ -1313,8 +1315,10 @@ static int rh_submit_urb (urb_t * urb)
 
                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;
                
@@ -1489,6 +1493,13 @@ static int hc_start (ohci_t * ohci)
        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 */
        
@@ -1516,7 +1527,7 @@ static void hc_interrupt (int irq, void * __ohci, struct pt_regs * r)
        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 (&regs->intrstatus) & readl (&regs->intrenable))) == 0)
@@ -1578,7 +1589,7 @@ static ohci_t * hc_alloc_ohci (void * mem_base)
 
        bus = usb_alloc_bus (&sohci_device_operations);
        if (!bus) {
-               free_pages ((unsigned int) ohci, 1);
+               free_pages ((unsigned long) ohci, 1);
                return NULL;
        }
 
@@ -1614,7 +1625,7 @@ static void hc_release_ohci (ohci_t * ohci)
        /* unmap the IO address space */
        iounmap (ohci->regs);
        
-       free_pages ((unsigned int) ohci, 1);    
+       free_pages ((unsigned long) ohci, 1);   
 }
 
 /*-------------------------------------------------------------------------*/
@@ -1625,7 +1636,7 @@ static void hc_release_ohci (ohci_t * ohci)
 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) {
@@ -1655,15 +1666,15 @@ static int hc_found_ohci (int irq, void * mem_base)
 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");
index c9267f53351f2eb4e3de190cc49227a0e531d9d0..f3d71154f0afad4660eaf76e33dab68b5b79e1bc 100644 (file)
@@ -314,6 +314,13 @@ struct virt_root_hub {
 #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))  
  
index 8657eaa93bc7b43c6a0f72322fddc0738bf7fb59..d4647844541fea3c23e9512e7d24b0d099ea21db 100644 (file)
@@ -326,12 +326,16 @@ int ov511_i2c_read(struct usb_device *dev, unsigned char reg)
        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
        }
 }
 
@@ -373,6 +377,19 @@ static void ov511_dump_regs( struct usb_device *dev)
        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)
 {
@@ -394,7 +411,9 @@ int ov511_set_packet_size(struct usb_ov511 *ov511, int size)
 {
        int alt, multiplier, err;
                
+#if 0
        PDEBUG("set packet size: %d\n", size);
+#endif
        
        switch (size) {
                case 992:
@@ -455,21 +474,116 @@ int ov511_set_packet_size(struct usb_ov511 *ov511, int size)
        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
@@ -478,42 +592,102 @@ utility I wrote.  That's a much faster way for figuring out how
 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
 }
@@ -552,13 +726,18 @@ static int ov511_move_data(struct usb_ov511 *ov511, urb_t *urb)
                     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);
                        }
                    }
@@ -568,8 +747,10 @@ static int ov511_move_data(struct usb_ov511 *ov511, urb_t *urb)
                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;
                }
@@ -589,15 +770,18 @@ static int ov511_move_data(struct usb_ov511 *ov511, urb_t *urb)
                  }
 
                        /* 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;
                        }
@@ -619,18 +803,6 @@ static void ov511_isoc_irq(struct urb *urb)
        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;
@@ -639,17 +811,10 @@ static void ov511_isoc_irq(struct urb *urb)
        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;
@@ -672,178 +837,6 @@ static int ov511_init_isoc(struct usb_ov511 *ov511)
        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 */
@@ -1000,15 +993,6 @@ static int ov511_open(struct video_device *dev, int flags)
        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;
@@ -1069,9 +1053,9 @@ static long ov511_write(struct video_device *dev, const char *buf, unsigned long
 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:
                {
@@ -1127,7 +1111,7 @@ static int ov511_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
                {
                        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 */
@@ -1206,9 +1190,11 @@ static int ov511_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
                        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;
@@ -1221,8 +1207,15 @@ static int ov511_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
 
                        /* 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;
@@ -1239,8 +1232,9 @@ static int ov511_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
                        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;
@@ -1343,7 +1337,7 @@ static long ov511_read(struct video_device *dev, char *buf, unsigned long count,
 
 restart:
        while (frame->grabstate == FRAME_GRABBING) {
-               interruptible_sleep_on(&frame->wq);
+               interruptible_sleep_on(&ov511->frame[frmx].wq);
                if (signal_pending(current))
                        return -EINTR;
        }
@@ -1428,10 +1422,49 @@ static struct video_device ov511_template = {
        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) {
@@ -1463,36 +1496,31 @@ static int ov511_configure(struct usb_ov511 *ov511)
        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:
index 78e3ecdb3fa764343158af6986cfc5fbb1488487..5666a10f7ed718467de37be23b154c0e393a63db 100644 (file)
 #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
@@ -221,6 +217,7 @@ struct usb_serial_device_type {
 
 
 /* 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);
@@ -228,6 +225,7 @@ static void generic_serial_put_char (struct tty_struct *tty, unsigned char ch);
 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",
@@ -246,15 +244,15 @@ static struct usb_serial_device_type generic_device = {
        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;
@@ -278,7 +276,7 @@ static struct usb_serial_device_type belkin_device = {
 #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;
@@ -302,7 +300,7 @@ static struct usb_serial_device_type peracom_device = {
 #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);
@@ -348,7 +346,7 @@ static struct usb_serial_device_type whiteheat_device = {
 #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);
@@ -383,18 +381,20 @@ static struct usb_serial_device_type handspring_device = {
    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
@@ -735,7 +735,7 @@ static void serial_unthrottle (struct tty_struct * tty)
 }
 
 
-#if defined(CONFIG_BELKIN_SERIAL) || defined(CONFIG_PERACOM_SERIAL)
+#if defined(CONFIG_USB_SERIAL_BELKIN) || defined(CONFIG_USB_SERIAL_PERACOM)
 /*****************************************************************************
  * eTek specific driver functions
  *****************************************************************************/
@@ -780,11 +780,11 @@ static void etek_serial_close(struct tty_struct *tty, struct file * filp)
        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
  *****************************************************************************/
@@ -947,10 +947,10 @@ static int  whiteheat_startup (struct usb_serial_state *serial)
        /* 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
  ******************************************************************************/
@@ -1014,7 +1014,7 @@ static void visor_unthrottle (struct tty_struct * tty)
 
        return;
 }
-#endif /* CONFIG_VISOR_SERIAL*/
+#endif /* CONFIG_USB_SERIAL_VISOR*/
 
 
 /*****************************************************************************
index 51da0394057263bca187c8bf98962d4e9357247d..96a1bf07584f437b3fa3acc162b9e12ef81254f1 100644 (file)
@@ -788,13 +788,13 @@ void usb_show_device(struct usb_device *);
 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)
 
 
 /*
index 05b2b73eac2bee80234a2863b87b02161a664279..9b54b6a76448918e1077618fe6ad75f5a5eff4b0 100644 (file)
@@ -25,7 +25,7 @@
 #define DUMMY_ROWS     25
 #endif
 
-static const char *__init dummycon_startup(void)
+static const char *dummycon_startup(void)
 {
     return "dummy device";
 }
index 11c7d85063029a0b14f52445ce88ae8d597b0d61..723f2232d8fad458772b7ad2a2054d5d969d00a9 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 3c92e7defa54fb7b582101a3c749dfa68be58c64..eca17bc6360a38df4ebbe3d3cff0e00d304e4b99 100644 (file)
@@ -523,7 +523,7 @@ static void shrink_fork(struct hfs_fork *fork, int ablocks)
  * 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;
@@ -535,8 +535,8 @@ static void grow_fork(struct hfs_fork *fork, int ablocks)
 
        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 */
@@ -550,7 +550,7 @@ static void grow_fork(struct hfs_fork *fork, int ablocks)
        /* 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 */
@@ -574,7 +574,7 @@ static void grow_fork(struct hfs_fork *fork, int ablocks)
                unlock_bitmap(mdb);
                if (err) {
                        relse_ext(ext);
-                       return;
+                       return -1;
                }
        
                zero_blocks(mdb, start, len);
@@ -600,7 +600,7 @@ more_extents:
                unlock_bitmap(mdb);
                if (!len || err) {
                        relse_ext(ext);
-                       return;
+                       return -1;
                }
                zero_blocks(mdb, start, len);
 
@@ -617,7 +617,7 @@ more_extents:
                                lock_bitmap(mdb);
                                hfs_clear_vbm_bits(mdb, start, len);
                                unlock_bitmap(mdb);
-                               return;
+                               return -1;
                        }
                }
                blocks = (fork->psize += len * ablksz);
@@ -625,7 +625,7 @@ more_extents:
        }
        set_cache(fork, ext);
        relse_ext(ext);
-       return;
+       return 0;
 }
 
 /*================ Global functions ================*/
@@ -738,11 +738,8 @@ int hfs_extent_map(struct hfs_fork *fork, int block, int create)
        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)
index 943249478c094a1e669dd6be8834e4970d014ee6..d5edeac45f44ea4c1c57ded04f9e97b70d407d01 100644 (file)
@@ -28,7 +28,7 @@ static hfs_rwret_t hfs_file_read(struct file *, char *, hfs_rwarg_t,
 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 ================*/
 
@@ -61,7 +61,7 @@ struct inode_operations hfs_file_inode_operations = {
        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 */
@@ -124,19 +124,37 @@ struct buffer_head *hfs_getblk(struct hfs_fork *fork, int block, int create)
 }
 
 /*
- * 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()
  *
@@ -146,8 +164,7 @@ static int hfs_bmap(struct inode * inode, int block)
  * '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)
 {
index 7f7aea6007550230bf781ce7aeb83b9d6a70e98c..97423b350179414778cc57dbb9a7dfc79683ea3b 100644 (file)
 #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 */
@@ -70,7 +84,12 @@ struct BTHdrRec {
        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 */
 };
 
 /*
@@ -129,6 +148,8 @@ struct hfs_bnode {
                                        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
@@ -176,6 +197,7 @@ struct hfs_btree {
        int                     lock;
        hfs_wait_queue          wait;
        int                     dirt;
+       int                     keySize;   
        /* Fields from the BTHdrRec in native byte-order: */
        hfs_u32                 bthRoot;
        hfs_u32                 bthNRecs;
index 8fde9117d83dcb20ebdc644599668825b2b6ec4b..af09655a0a6db1b7599774ea0ca3558421a66753 100644 (file)
@@ -44,14 +44,18 @@ static void init_file_inode(struct inode *inode, hfs_u8 fork)
        }
 
        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;
index 599c873e6b3bc65fc10e18b8bf40e4b5a4fdc851..97f8232d4dc2dadb77255a1d1b674b32cb5cc409 100644 (file)
@@ -780,16 +780,14 @@ asmlinkage long sys_mknod(const char * filename, int mode, dev_t dev)
        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 */
@@ -815,10 +813,9 @@ asmlinkage long sys_mknod(const char * filename, int mode, dev_t dev)
                }
                break;
        }
+       unlock_kernel();
        putname(tmp);
 
-out:
-       unlock_kernel();
        return error;
 }
 
@@ -870,14 +867,14 @@ asmlinkage long sys_mkdir(const char * pathname, int mode)
        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;
 }
 
@@ -965,14 +962,15 @@ asmlinkage long sys_rmdir(const char * pathname)
        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;
 }
 
@@ -1018,14 +1016,14 @@ asmlinkage long sys_unlink(const char * pathname)
        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;
 }
 
@@ -1068,21 +1066,20 @@ asmlinkage long sys_symlink(const char * oldname, const char * newname)
 {
        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;
 }
 
@@ -1156,21 +1153,21 @@ asmlinkage long sys_link(const char * oldname, const char * newname)
 {
        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;
 }
 
@@ -1327,21 +1324,20 @@ asmlinkage long sys_rename(const char * oldname, const char * newname)
 {
        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;
 }
 
index 7ab0d889aeaddd444b5e01d0581e72c3a335433c..0a361b6c3b71b61a52a01b2eb5051d791f896dd7 100644 (file)
@@ -144,7 +144,7 @@ int ncp_ioctl(struct inode *inode, struct file *filp,
                    && (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:
index b721b7785d6701f951ff5774eac5d00a7b1fd6df..6ea26fe25565bd2e7b767fb79b52d42f02145b8e 100644 (file)
@@ -28,7 +28,7 @@ smb_ioctl(struct inode *inode, struct file *filp,
        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);
index 6bbf1e5f4c94666ab34f6b6f4ce41f673bacde95..431f8d7af63ecea1cccccb4dd621b612cfc43762 100644 (file)
@@ -28,13 +28,18 @@ typedef char *              __kernel_caddr_t;
 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__
index c068ac62ff51ef150d54927a855baa5d316399f4..16d5bd73be89edf68b5a521049fd9a7ddcd121a3 100644 (file)
 #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 */
 
index e881146168be321aa88d8160e36681ff1972aac1..7f204b1f5a4100e71a395a58d99dbb3bff9c3f47 100644 (file)
@@ -20,7 +20,8 @@
 
 #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)
 {
index 767730a4cdad1a30899470cc18f46c49fbe1be09..201c5c30594c4bf2195936fc80bb4aa369fe20c2 100644 (file)
@@ -24,4 +24,6 @@
 #define arch_do_idle()                         \
        outb(0, IOMD_SUSMODE)
 
+#define arch_power_off()       do { } while (0)
+
 #endif
index 05e2be70719cceb9aa86d601b0ce4208497032c8..39f4c84a4c64537411778ea1f2f13b9927505b91 100644 (file)
@@ -7,6 +7,7 @@
 #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)
 {
index 7861f8470aefd305fbe584d6bba2430f07a02b43..877625fa8aa899fda82fbde5f791172ab92c0685 100644 (file)
@@ -16,7 +16,7 @@
  * 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
@@ -91,7 +91,7 @@ extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
 #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;                                                   \
index 195aad743e1277b3b35a5fca204e648c331cd18a..3a4faaf24c53519c1785c048d03d1168bf179446 100644 (file)
@@ -44,8 +44,19 @@ static int isa_irq = -1;
 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;
index ee7573804c7c775ed335e11bba5ac89dac26661c..ace6afbd6efc018adaf3c65b27ec561efb79af37 100644 (file)
@@ -9,6 +9,7 @@
 #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)
 {
index c1605d3fa3252bba95251e5fd8465cdff4805c1c..2f8fc9eacc4bacfb214664057f87b64c30099ccd 100644 (file)
@@ -8,5 +8,6 @@
 
 #define arch_do_idle()         do { } while (0)
 #define arch_reset(mode)       do { } while (0)
+#define arch_power_off()       do { } while (0)
 
 #endif
index c40aadcadecf2621488c7d565b51db1d81d15e99..c5100fd1ad39a987fbe5d2a2cefe3929a1fbea72 100644 (file)
@@ -7,7 +7,8 @@
 #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)
 {
index 407641aa9b5004954e1698094b6b7753477d2844..86358d96b48c6d550a0082a2e80b8db0d705905a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
  */
@@ -12,7 +12,7 @@
 /* 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*()
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
new file mode 100644 (file)
index 0000000..3c39c1d
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * 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
+
index 884157c86405d7e4348005135d2c5e5b27804f1d..4c2126208ef5ee6fb6163839516d39f48538a71f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
index 3444dc74cda4d50a2be0f7009a67b84a54bb85b5..f0ea52b17da2fa308bf656b46d67833f0f11716e 100644 (file)
@@ -1,3 +1,3 @@
 /*
- * linux/include/asm-arm/arch-ebsa110/param.h
+ * linux/include/asm-arm/arch-sa1100/param.h
  */
index f57de7f4a75e8d5bdf329d5c3a5f9120c94c9893..83db935a5d10913648ac165143cf149184a0368c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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.
index 24072c298d67fa972f46a853671a4b740d40fd68..49b4bdca29b8f8fbddccd5e698e4618acd3230cf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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>
 
@@ -25,6 +25,9 @@
 #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
@@ -41,3 +44,7 @@
 "      mcr     p15, 0, %0, c15, c1, 2  @ Reenable clock switching \n" \
        : : "r" (&ICIP) : "cc" ); \
        } while (0)
+#endif
+
+#define arch_power_off()       do { } while (0)
+
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
new file mode 100644 (file)
index 0000000..0fa4a10
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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()
+
index b827c490ceb94bc0840cf8a5901383134dc1ac13..5e1fb87929431d6299bae7c2ad8237ad5ee1f1ed 100644 (file)
@@ -4,7 +4,7 @@
  * 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
@@ -37,37 +37,25 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum);
 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
@@ -86,10 +74,10 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
        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;
 }
 
 /*
@@ -130,7 +118,17 @@ static inline unsigned short int
 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;
 }
 
 
index fc473b6f0603609c20960e7ccbd379fde49dd721..27fec4ee6aeda2aae4b61250a3d498cbcddde7a1 100644 (file)
@@ -1,32 +1,13 @@
 #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
index 96dc9883de56712b1b46d1f81d811c92c7f4d62e..7e2192902fcaaf1cd29b6adf3692a05ce2fbe2ad 100644 (file)
@@ -42,10 +42,6 @@ extern void insl(unsigned int port, void *from, int len);
 
 #ifdef __KERNEL__
 
-#ifndef NULL
-#define NULL   ((void *) 0)
-#endif
-
 #include <asm/arch/memory.h>
 
 extern __inline__ unsigned long virt_to_phys(volatile void *x)
@@ -86,6 +82,14 @@ extern void _memcpy_fromio(void *, unsigned long, unsigned long);
 extern void _memcpy_toio(unsigned long, const void *, unsigned long);
 extern void _memset_io(unsigned long, int, unsigned long);
 
+#define __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.
@@ -151,11 +155,11 @@ out:
 #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,
index 299b4c5a089e902a7cccf17be7908969f2e2be6a..9726cd55ded093c1476d71ef10d25c6029ab2d8a 100644 (file)
@@ -11,7 +11,7 @@
 #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)
@@ -42,7 +50,7 @@
 #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)
@@ -59,7 +67,7 @@
 #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)
@@ -71,7 +79,7 @@
 #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
@@ -84,7 +92,7 @@
 #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)
index 7ea5157ec6e980ff9520e5533c8ff0c38950a861..f46fadbb8a58fd7e519fbfc1c28afc1e0b102475 100644 (file)
@@ -69,9 +69,9 @@ extern void __bug(const char *file, int line, void *data);
 
 #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
 
index 284c7f6ffe1e72c2e25b58fe09c5143e7d3dfc8e..bb383ff4ea9ed1fef415edfcac70ec10043b9e75 100644 (file)
@@ -9,6 +9,10 @@
 #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
@@ -37,11 +41,10 @@ typedef unsigned short              __kernel_gid16_t;
 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;
index acce2de35e44b9cf7e23f8301997c97d1587f30e..e67566d5d40b042d9bdc7cc8b08d90cbf755d190 100644 (file)
@@ -11,7 +11,7 @@ static inline void proc_decomp_setup (void)
        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
index 6bbe53e7c7faf6d1a1d28402f7e5ec6d8f1afbd1..703f653b8f5c3bd11bc70574f28640c1a0eadb8d 100644 (file)
 #   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
index 6ce49457fd29f5bb4b95a109c760f8b2fd06a17b..fc0b80b6a6fcf21728910bccb87f509c719f10f9 100644 (file)
@@ -27,6 +27,7 @@ struct sigcontext {
        unsigned long arm_lr;
        unsigned long arm_pc;
        unsigned long arm_cpsr;
+       unsigned long fault_address;
 };
 
 
index 970e0eb625654580691cf9b818700a0451950127..5346b02236876007fc5c315f7e9d1b44d6964b4a 100644 (file)
@@ -38,5 +38,40 @@ struct stat {
        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
index 5d631341e82e4147d69ccf4d56f948f46c2b68ca..72b89fa70e4e678614d66519746fa0539d24e8d1 100644 (file)
@@ -19,7 +19,6 @@ extern char * strchr(const char * s, int c);
 #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)                                                  \
        ({                                                              \
@@ -27,7 +26,7 @@ extern void __memset(void *ptr, int v, __kernel_size_t n);
                        if (__builtin_constant_p((v)) && (v) == 0)      \
                                __memzero((p),(n));                     \
                        else                                            \
-                               __memset((p),(v),(n));                  \
+                               memset((p),(v),(n));                    \
                }                                                       \
                (p);                                                    \
        })
index 8725ad8066abec72ba182d3947efdf1bc2adc395..9c9b95d8ae01f306f7b19f4ac453c01b52f414b5 100644 (file)
@@ -42,6 +42,7 @@ extern unsigned int __machine_arch_type;
 #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
@@ -124,6 +125,18 @@ extern unsigned int __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
index 95d6384431e29f3897d5b393909b96eba915a338..ca6da3e13207e783202643007899d91d266d2ce4 100644 (file)
@@ -7,7 +7,6 @@
  * 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)
@@ -25,7 +24,7 @@
 #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)
@@ -35,7 +34,7 @@
 #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)
@@ -83,7 +82,7 @@
 #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)
@@ -91,7 +90,7 @@
 #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)
index a2a4e32bc5b7bcb8b32cfa5c6809ecc434b40337..07137313820280a78cb3f24198d1f831c0e321d4 100644 (file)
@@ -1,6 +1,10 @@
 #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
@@ -29,8 +33,7 @@ typedef unsigned short        __kernel_gid16_t;
 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__ */
index 8e2bfff707340fca0311bb8685e9b30e9e0e06f3..60718fdea9a143318559e49f94bd187fb5de3b62 100644 (file)
@@ -1,6 +1,10 @@
 #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
@@ -29,8 +33,7 @@ typedef unsigned short        __kernel_gid16_t;
 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__ */
index 25ddaf086515261c07dceba11c10c74c34b8b3e4..e4e83eb0161ed7e490a5237653420197bd598286 100644 (file)
@@ -1,4 +1,4 @@
-/* $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__
 
@@ -89,30 +89,9 @@ struct relocation_info /* used when header.a_machtype == M_SPARC */
 
 #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__ */
 
index 1eda0d28069b31e4b53ded4575cdf11766feef8b..58f26364cd22bffe5393f4b665998c5538e6d641 100644 (file)
 #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 */
 
diff --git a/include/asm-sparc/ipcbuf.h b/include/asm-sparc/ipcbuf.h
new file mode 100644 (file)
index 0000000..9bef02d
--- /dev/null
@@ -0,0 +1,31 @@
+#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 */
diff --git a/include/asm-sparc/msgbuf.h b/include/asm-sparc/msgbuf.h
new file mode 100644 (file)
index 0000000..8cec9ad
--- /dev/null
@@ -0,0 +1,31 @@
+#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 */
index 4ec1751504c041226a4d4fa875a074e5ebe3b549..ec8ad3f747bd4a06cd40b765b00c792b9f18ae96 100644 (file)
@@ -7,13 +7,7 @@
  * 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;
@@ -31,6 +25,15 @@ typedef short                  __kernel_nlink_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;
index 8505ce5d4900a5a65bc07616b9aabe5c5d756e4f..a74493500b352a490f92fd946c69df5953a5c75a 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -22,6 +22,7 @@
 #include <asm/segment.h>
 #include <asm/btfixup.h>
 #include <asm/page.h>
+#include <asm/atomic.h>
 
 /*
  * Bus types
@@ -88,6 +89,7 @@ struct thread_struct {
        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 */
@@ -201,11 +203,11 @@ extern struct task_struct *last_task_used_math;
 /* 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)
diff --git a/include/asm-sparc/sembuf.h b/include/asm-sparc/sembuf.h
new file mode 100644 (file)
index 0000000..47b2ef9
--- /dev/null
@@ -0,0 +1,25 @@
+#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 */
diff --git a/include/asm-sparc/shmbuf.h b/include/asm-sparc/shmbuf.h
new file mode 100644 (file)
index 0000000..1ff9da8
--- /dev/null
@@ -0,0 +1,42 @@
+#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 */
index 757012fc546d7261e971c74002a45abe4af9ea45..ed2de7ca9ce5c2d98ed5a5c8c14270a0318a135d 100644 (file)
@@ -1,4 +1,4 @@
-/* $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                                      */
@@ -59,7 +59,7 @@
 #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                                      */
@@ -68,7 +68,7 @@
 #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                              */
@@ -416,7 +416,6 @@ return -1; \
  * 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)
index 8c36daca12760730d2dc0be6b6a0d7142887702d..07dfc1d30b001051bc77509faf9b68c60dd80857 100644 (file)
 #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
index fda381c484571a057602fa862800612963950cf0..9a7fd950a9414739a1c4eb4a88bc861cfe50051a 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -574,7 +574,6 @@ static unsigned long __init sun_floppy_init(void)
                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) {
@@ -669,9 +668,7 @@ static unsigned long __init sun_floppy_init(void)
                        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
                /*
@@ -682,15 +679,9 @@ static unsigned long __init sun_floppy_init(void)
                         * 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];
diff --git a/include/asm-sparc64/ipcbuf.h b/include/asm-sparc64/ipcbuf.h
new file mode 100644 (file)
index 0000000..9c5bf1b
--- /dev/null
@@ -0,0 +1,28 @@
+#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 */
diff --git a/include/asm-sparc64/msgbuf.h b/include/asm-sparc64/msgbuf.h
new file mode 100644 (file)
index 0000000..55c101b
--- /dev/null
@@ -0,0 +1,27 @@
+#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 */
index cfd159a5a80b95f7b8a98df814923297d003eb14..89ac8c4ad36d6a41fa5dd2ff4be8c206a0e30a77 100644 (file)
@@ -1,4 +1,4 @@
-/* $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).
  *
@@ -45,7 +45,7 @@
 #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__ */
index 67a0da1fa13b66774041e0eda002bcced9b78a81..97aeaf7f6ebb3eaa81e38c5672125a3d71c8bd7c 100644 (file)
@@ -1,4 +1,4 @@
-/* $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)
@@ -19,8 +19,6 @@
 #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];
@@ -33,7 +31,7 @@ reset_dma(unsigned int dmanr)
        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);
 }
 
@@ -62,11 +60,8 @@ disable_dma(unsigned int dmanr)
                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);
        }
 }
 
@@ -105,15 +100,11 @@ set_dma_count(unsigned int dmanr, unsigned int count)
 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;
 }
 
@@ -136,36 +127,25 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
                        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],
index 98f706e017375547cf9b4df1940fd83ed13617b8..4131b698fcb5c9516182c1055e5f22e4c83364b9 100644 (file)
@@ -9,6 +9,9 @@
  */
 #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.
index e0836990a8ae07017710bbeb9c75bd257ba2d1bf..47415f2cc38a5a8c9f41cc55f2c6aab781876c29 100644 (file)
@@ -29,6 +29,15 @@ typedef unsigned int           __kernel_nlink_t;
 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;
diff --git a/include/asm-sparc64/sembuf.h b/include/asm-sparc64/sembuf.h
new file mode 100644 (file)
index 0000000..99f04e4
--- /dev/null
@@ -0,0 +1,22 @@
+#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 */
diff --git a/include/asm-sparc64/shmbuf.h b/include/asm-sparc64/shmbuf.h
new file mode 100644 (file)
index 0000000..61c2ef4
--- /dev/null
@@ -0,0 +1,38 @@
+#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 */
index 8c9b29bc6ffceb33ac1c12dc2f83bbf6f2d859ca..c022947dfbbfaa517eb81dee492afef5b9aa39c3 100644 (file)
@@ -1,4 +1,4 @@
-/* $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                                      */
@@ -59,7 +59,7 @@
 #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                                      */
@@ -68,7 +68,7 @@
 #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                                      */
index ef2bc41052cd1a8e223ec67f2d9d6dd731b2ffe5..4c9543a5d7631baac6fbd76895800666beb4200d 100644 (file)
@@ -140,6 +140,19 @@ struct hfs_hdr_layout {
                        *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
  */
index 98b07c7f7b4c34e53676fa06a836129617e06455..26e9d57c87571fab3233007ab8f4da61e226f234 100644 (file)
@@ -1,24 +1,26 @@
 #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
@@ -54,11 +56,19 @@ extern int overflowgid;
 #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)
@@ -71,9 +81,9 @@ extern int overflowgid;
 #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 */
 
 
 /*
index 28bcbbc86f188dfa4d8b30c07c312f595c541973..4d4e6e156bd6720e9f6f783768788ebe1f3ab3b1 100644 (file)
@@ -1,6 +1,8 @@
 #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
index a8cfb2cfb186c7b32c27d05f477323bab6e47195..a78ca599f4fe07e2e7707b6631e2cc3ecf9aed3e 100644 (file)
@@ -509,8 +509,6 @@ struct pci_device_id {
        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;
@@ -526,29 +524,7 @@ void pci_unregister_driver(struct pci_driver *);
 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
@@ -585,10 +561,6 @@ unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
 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 */
 
 /*
index 2e88d36902408992e66fc0eb59b4f07f083ec76f..270692eb2b84573277ec169ab93151d00f62e0f0 100644 (file)
 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
index cb42b9c3a68f3b38f2c755c1f54bcf585a7ec089..4decd70ea08af3ca15a8571c479691d0fddd108b 100644 (file)
@@ -42,6 +42,7 @@
 #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>
@@ -430,6 +431,11 @@ EXPORT_SYMBOL(__down_trylock);
 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);
index 868ff5854fb8291a3287eb9bf100051997559991..6e0730512a9118a99772299c9dc1745471d83e0f 100644 (file)
@@ -144,7 +144,7 @@ printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid,
                        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 = &current->sigqueue;
@@ -180,7 +180,7 @@ printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid,
                                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);
                        }
                }
 
@@ -343,7 +343,7 @@ printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
                                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;
@@ -351,7 +351,7 @@ printk("SIG queue (%s:%d): %d ", t->comm, t->pid, 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;
@@ -802,7 +802,7 @@ sys_kill(int pid, int sig)
        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);
 }
index fde0159ff2307cac52217b6de51afb8b03a96d6a..b32516614d5f80feaf66984ac30977741e4ab737 100644 (file)
@@ -4,6 +4,7 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/utsname.h>
 #include <linux/mman.h>
@@ -17,6 +18,8 @@
 #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
@@ -25,6 +28,8 @@
 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
index fd4970e582eb8ba4b01f186c9790c3b1d50c6248..28f881570dcc6e66e03ecae718a015f4ccee0516 100644 (file)
@@ -247,12 +247,14 @@ static ctl_table kern_table[] = {
        {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}
 };
 
index 41e19028a0e8917985419afadc6f4e9877f8388d..57caac781546aa4d7fefb1173954e861b838e6cf 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -216,6 +216,8 @@ typedef struct kmem_bufctl_s {
 
 #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.
  */
@@ -241,7 +243,7 @@ struct kmem_cache_s {
        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
@@ -667,7 +669,6 @@ kmem_cache_cal_waste(unsigned long gfporder, size_t size, size_t extra,
 /* 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,
@@ -687,6 +688,10 @@ 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;
@@ -948,7 +953,8 @@ printk("%s: Left_over:%d Align:%d Size:%d\n", name, left_over, offset, size);
        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. */
@@ -1026,12 +1032,7 @@ static int __kmem_cache_shrink(kmem_cache_t *cachep)
 }
 
 /* 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)
@@ -1049,6 +1050,12 @@ 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)
 {
index 7e064d0fadf73a4c30886c1129b361e3ead1e19a..3a5f4fbbeeaff4d07b601b3d389a88c5cb3811f6 100644 (file)
@@ -503,7 +503,7 @@ int kswapd(void *unused)
                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;
index 782e3d9ae58096da747785b5e0286b3ff97bcb69..70209a5fe19ebf6b5b34a05b80e5e0a7cff46263 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             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>
index 4b034191fb725aa42f77893da0918f43d212d660..e3d884dda316598f1bd81576f9652b1fb7f2da15 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             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>
@@ -1031,7 +1031,7 @@ void tcp_send_delayed_ack(struct sock *sk, int max_timeout)
        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;
@@ -1070,10 +1070,14 @@ void tcp_send_ack(struct sock *sk)
                         *
                         * 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;
                }