diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
commit | 6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch) | |
tree | 0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /arch/arm | |
parent | ecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff) |
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine
status unknown.
Diffstat (limited to 'arch/arm')
63 files changed, 2744 insertions, 1061 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index b49cebfde..9f2e5347a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -19,7 +19,7 @@ ARCHCC := $(word 1,$(CC)) AFLAGS += -mno-fpu CFLAGS_PIPE := -pipe -CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) +CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) -msoft-float ifdef CONFIG_FRAME_POINTER CFLAGS := $(CFLAGS:-fomit-frame-pointer=) @@ -29,11 +29,13 @@ ifdef CONFIG_DEBUG_INFO CFLAGS += -g endif +GZFLAGS = -9 + # Ensure this is ld "2.9.4" or later NEW_LINKER := $(shell if $(LD) --gc-sections --version >/dev/null 2>&1; then echo y; else echo n; fi) ifneq ($(NEW_LINKER),y) -dummy:; @echo '*** 2.3 kernels no longer build correctly with old versions of binutils.' +dummy:; @echo '*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.' @echo '*** Please upgrade your binutils to 2.9.5.' @false endif @@ -45,7 +47,7 @@ NEW_GCC := $(shell if $(CC) --version 2>&1 | grep '^2\.7' > /dev/null; then ech # select flags depending on the compiler # ifeq ($(NEW_GCC),y) -CFLAGS += -mshort-load-bytes -msoft-float +CFLAGS += -mshort-load-bytes CFLAGS_PROC_CPU_26 := -mcpu=arm3 -Os CFLAGS_PROC_CPU_32v3 := -march=armv3 CFLAGS_PROC_CPU_32v4 := -march=armv4 @@ -110,7 +112,7 @@ endif LIBGCC := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -export LIBGCC MACHINE PROCESSOR TEXTADDR +export LIBGCC MACHINE PROCESSOR TEXTADDR GZFLAGS ifeq ($(CONFIG_ARCH_A5K),y) MACHINE = a5k diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 632126213..f8ff4124c 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -89,7 +89,7 @@ $(HEAD): $(HEAD:.o=.S) piggy.o: $(SYSTEM) $(OBJCOPY) $(SYSTEM) piggy - gzip -9 < piggy > piggy.gz + gzip $(GZFLAGS) < piggy > piggy.gz $(LD) -r -o $@ -b binary piggy.gz rm -f piggy piggy.gz diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S index 411a210cf..7b12ecef6 100644 --- a/arch/arm/boot/compressed/head-sa1100.S +++ b/arch/arm/boot/compressed/head-sa1100.S @@ -133,6 +133,5 @@ UART1_BASE: .long 0x80010000 #endif @ Restore initial r0/r1 - @ (r8 preserved) mov r0, r8 mov r1, r9 diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 2c329295d..10c2290a0 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -84,9 +84,7 @@ start: b 1f .word 0x016f2818 @ Magic numbers to help the loader .word start -1: adr r8, start @ get the start address of the code - @ (used for locating the page tables) - +1: /* * some architecture specific code can be inserted * by the linker here, but it should preserve r0, r1 @@ -178,9 +176,13 @@ LC0: .word __bss_start .align 5 cache_on: ldr r1, proc_sa110_type eor r1, r1, r6 - movs r1, r1, lsr #5 + movs r1, r1, lsr #5 @ catch SA110 and SA1100 + beq 1f + ldr r1, proc_sa1110_type + eor r1, r1, r6 + movs r1, r1, lsr #4 movne pc, lr - +1: sub r3, r4, #16384 @ Page directory size bic r3, r3, #0xff @ Align the pointer bic r3, r3, #0x3f @@ -259,6 +261,11 @@ proc_sa110_type: .word 0x4401a100 .size proc_sa110_type, . - proc_sa110_type + .type proc_sa1110_type,#object +proc_sa1110_type: + .word 0x6901b110 + .size proc_sa1110_type, . - proc_sa1110_type + /* * Turn off StrongARM cache and MMU. It is safe to * leave the I-cache on. @@ -273,8 +280,13 @@ proc_sa110_type: .align 5 cache_off: ldr r1, proc_sa110_type eor r1, r1, r6 - movs r1, r1, lsr #5 + movs r1, r1, lsr #5 @ catch SA110 and SA1100 + beq 1f + ldr r1, proc_sa1110_type + eor r1, r1, r6 + movs r1, r1, lsr #4 movne pc, lr +1: mrc p15, 0, r0, c1, c0 bic r0, r0, #0x000d mcr p15, 0, r0, c1, c0 @@ -292,11 +304,15 @@ cache_off: ldr r1, proc_sa110_type */ .align 5 cache_clean_flush: - ldr r1, proc_sa110_type @ SA-110 or SA-1100? + ldr r1, proc_sa110_type + eor r1, r1, r6 + movs r1, r1, lsr #5 @ catch SA110 and SA1100 + beq 1f + ldr r1, proc_sa1110_type eor r1, r1, r6 - movs r1, r1, lsr #5 + movs r1, r1, lsr #4 movne pc, lr - +1: bic r1, pc, #31 add r2, r1, #32768 1: ldr r12, [r1], #32 @ s/w flush D cache diff --git a/arch/arm/config.in b/arch/arm/config.in index 911703fe1..ff683b30b 100644 --- a/arch/arm/config.in +++ b/arch/arm/config.in @@ -1,57 +1,50 @@ # # For a description of the syntax of this configuration file, -# see the Configure script. +# see Documentation/kbuild/config-language.txt. # mainmenu_name "Linux Kernel Configuration" define_bool CONFIG_ARM y - +define_bool CONFIG_SBUS n 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 endmenu + mainmenu_option next_comment -comment 'System and Processor Type' +comment 'System Type' choice 'ARM system type' \ "Archimedes CONFIG_ARCH_ARC \ A5000 CONFIG_ARCH_A5K \ - RiscPC CONFIG_ARCH_RPC \ + Co-EBSA285 CONFIG_ARCH_CO285 \ EBSA-110 CONFIG_ARCH_EBSA110 \ - FootBridge-based CONFIG_FOOTBRIDGE" RiscPC + FootBridge CONFIG_ARCH_FOOTBRIDGE \ + RiscPC CONFIG_ARCH_RPC \ + SA1100-based CONFIG_ARCH_SA1100" RiscPC + # the following are placeholders for when they are fully integrated +# Cirrus CL-PS7500FE CONFIG_ARCH_CLPS7500 \ # LinkUp-L7200 CONFIG_ARCH_L7200 -# SA1100-based CONFIG_ARCH_SA1100 -if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then - bool 'FootBridge in HOST mode' CONFIG_HOST_FOOTBRIDGE - if [ "$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then - define_bool CONFIG_ADDIN_FOOTBRIDGE n - else - define_bool CONFIG_ADDIN_FOOTBRIDGE y - fi -fi - -if [ "$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then +if [ "$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then comment 'Footbridge Implementations' - bool ' Include support for EBSA285' CONFIG_ARCH_EBSA285 - bool ' Include support for CATS' CONFIG_ARCH_CATS - bool ' Include support for NetWinder' CONFIG_ARCH_NETWINDER - bool ' Include support for Compaq Personal Server' CONFIG_ARCH_PERSONAL_SERVER -fi - -if [ "$CONFIG_ADDIN_FOOTBRIDGE" = "y" ]; then - # If we get any other footbridge-based plug-in boards, then - # add your architecture options here - define_bool CONFIG_ARCH_CO285 y + bool ' CATS support' CONFIG_ARCH_CATS + bool ' Compaq Personal Server support' CONFIG_ARCH_PERSONAL_SERVER + bool ' EBSA285 (addin mode) support' CONFIG_ARCH_EBSA285_ADDIN + bool ' EBSA285 (host mode) support' CONFIG_ARCH_EBSA285_HOST + bool ' NetWinder support' CONFIG_ARCH_NETWINDER fi - if [ "$CONFIG_ARCH_SA1100" = "y" ]; then comment 'SA11x0 Implementations' - bool ' Include support for Assabet' CONFIG_SA110_ASSABET + bool ' Include support for Assabet' CONFIG_SA1100_ASSABET + if [ "$CONFIG_SA1100_ASSABET" = "y" ]; then + bool ' Include support for Neponset' CONFIG_ASSABET_NEPONSET + fi bool ' Include support for Bitsy' CONFIG_SA1100_BITSY bool ' Include support for Brutus' CONFIG_SA1100_BRUTUS # bool ' Include support for Empeg' CONFIG_SA1100_EMPEG @@ -62,43 +55,21 @@ if [ "$CONFIG_ARCH_SA1100" = "y" ]; then bool ' Include support for GraphicsClient' CONFIG_SA1100_GRAPHICSCLIENT bool ' Include support for Victor' CONFIG_SA1100_VICTOR # bool ' Include support for Tifon' CONFIG_SA1100_TIFON - define_bool CONFIG_DISCONTIGMEM y +# bool ' Include support for XP860' CONFIG_SA1100_XP860 fi -# -# Select various configuration options depending on the machine type -# Easy check for Acorn-style architectures -# -if [ "$CONFIG_ARCH_ARC" = "y" -o \ - "$CONFIG_ARCH_A5K" = "y" -o \ - "$CONFIG_ARCH_RPC" = "y" ]; then - define_bool CONFIG_ARCH_ACORN y -else - define_bool CONFIG_ARCH_ACORN n -fi - -# -# Figure out whether this system uses 26-bit or 32-bit CPUs. Nobody has -# ever built a machine that can take both, and now that ARM3 is obsolete -# nobody is likely to either. -# +# Figure out whether this system uses 26-bit or 32-bit CPUs. if [ "$CONFIG_ARCH_ARC" = "y" -o \ "$CONFIG_ARCH_A5K" = "y" ]; then define_bool CONFIG_CPU_32 n define_bool CONFIG_CPU_26 y - - # - # Select memory size - # bool '2MB physical memory' CONFIG_PAGESIZE_16 else define_bool CONFIG_CPU_32 y define_bool CONFIG_CPU_26 n fi -# # Select CPU and optimisation dependent on architecture -# if [ "$CONFIG_ARCH_RPC" = "y" ]; then define_bool CONFIG_CPU_32v3 y bool 'Support ARM610' CONFIG_CPU_ARM6 @@ -113,6 +84,10 @@ if [ "$CONFIG_ARCH_EBSA110" = "y" -o \ define_bool CONFIG_CPU_32v4 y define_bool CONFIG_CPU_SA110 y fi +if [ "$CONFIG_ARCH_CLPS7500" = "y" ]; then + define_bool CONFIG_CPU_32v4 y + define_bool CONFIG_CPU_ARM7 y +fi if [ "$CONFIG_ARCH_L7200" = "y" ]; then define_bool CONFIG_CPU_32v4 y define_bool CONFIG_CPU_ARM720 y @@ -122,20 +97,54 @@ if [ "$CONFIG_ARCH_SA1100" = "y" ]; then define_bool CONFIG_CPU_SA1100 y fi -# -# These machines always have PCI -# +# Select various configuration options depending on the machine type +if [ "$CONFIG_ARCH_ARC" = "y" -o \ + "$CONFIG_ARCH_A5K" = "y" -o \ + "$CONFIG_ARCH_RPC" = "y" ]; then + define_bool CONFIG_ARCH_ACORN y +else + define_bool CONFIG_ARCH_ACORN n +fi + +if [ "$CONFIG_ARCH_CO285" = "y" -o \ + "$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then + define_bool CONFIG_FOOTBRIDGE y +else + define_bool CONFIG_FOOTBRIDGE n +fi +if [ "$CONFIG_ARCH_CATS" = "y" -o \ + "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \ + "$CONFIG_ARCH_NETWINDER" = "y" -o \ + "$CONFIG_ARCH_PERSONAL_SERVER" = "y" ]; then + define_bool CONFIG_FOOTBRIDGE_HOST y +else + define_bool CONFIG_FOOTBRIDGE_HOST n +fi +if [ "$CONFIG_ARCH_CO285" = "y" -o \ + "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then + define_bool CONFIG_FOOTBRIDGE_ADDIN y +else + define_bool CONFIG_FOOTBRIDGE_ADDIN n +fi +if [ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \ + "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then + define_bool CONFIG_ARCH_EBSA285 y +fi + +if [ "$CONFIG_ARCH_SA1100" = "y" ]; then + define_bool CONFIG_DISCONTIGMEM y +else + define_bool CONFIG_DISCONTIGMEM n +fi + +# Now handle the bus types if [ "$CONFIG_ARCH_NEXUSPCI" = "y" -o \ - "$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then + "$CONFIG_FOOTBRIDGE_HOST" = "y" ]; then define_bool CONFIG_PCI y - source drivers/pci/Config.in else define_bool CONFIG_PCI n fi -# -# These machines have ISA-DMA -# if [ "$CONFIG_ARCH_CATS" = "y" -o \ "$CONFIG_ARCH_SHARK" = "y" -o \ "$CONFIG_ARCH_NETWINDER" = "y" ]; then @@ -145,15 +154,9 @@ else define_bool CONFIG_ISA n define_bool CONFIG_ISA_DMA n fi - -define_bool CONFIG_SBUS n -define_bool CONFIG_PCMCIA n - -if [ "$CONFIG_CPU_32" = "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then - bool 'Kernel-mode alignment trap handler' CONFIG_ALIGNMENT_TRAP -fi endmenu + mainmenu_option next_comment comment 'Loadable module support' bool 'Enable loadable module support' CONFIG_MODULES @@ -163,53 +166,61 @@ if [ "$CONFIG_MODULES" = "y" ]; then fi endmenu + mainmenu_option next_comment comment 'General setup' +source drivers/pci/Config.in +bool 'Support hot-pluggable devices' CONFIG_HOTPLUG +if [ "$CONFIG_HOTPLUG" = "y" ]; then + source drivers/pcmcia/Config.in +else + define_bool CONFIG_PCMCIA n +fi bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL -tristate 'Math emulation' CONFIG_NWFPE -if [ "$CONFIG_PROC_FS" = "y" ]; then - choice 'Kernel core (/proc/kcore) format' \ +tristate 'NWFPE math emulation' CONFIG_NWFPE +choice 'Kernel core (/proc/kcore) format' \ "ELF CONFIG_KCORE_ELF \ A.OUT CONFIG_KCORE_AOUT" ELF -fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_CPU_32" = "y" ]; then tristate 'RISC OS personality' CONFIG_ARTHUR fi - -source drivers/parport/Config.in - if [ "$CONFIG_ARCH_EBSA110" = "y" -o \ "$CONFIG_ARCH_SA1100" = "y" -o \ - "$CONFIG_ARCH_NETWINDER" = "y" -o \ "$CONFIG_ARCH_PERSONAL_SERVER" = "y" -o \ "$CONFIG_ARCH_CATS" = "y" ]; then - string 'Initial kernel command string' CONFIG_CMDLINE + string 'Default kernel command string' CONFIG_CMDLINE "" fi if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \ "$CONFIG_ARCH_EBSA110" = "y" -o \ "$CONFIG_ARCH_EBSA285" = "y" -o \ - "$CONFIG_ARCH_CO285" = "y" ]; then + "$CONFIG_ARCH_CO285" = "y" -o \ + "$CONFIG_ARCH_SA1100" = "y" ]; then bool 'Timer and CPU usage LEDs' CONFIG_LEDS if [ "$CONFIG_LEDS" = "y" ]; then if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \ "$CONFIG_ARCH_EBSA285" = "y" -o \ - "$CONFIG_ARCH_CO285" = "y" ]; then + "$CONFIG_ARCH_CO285" = "y" -o \ + "$CONFIG_ARCH_SA1100" = "y" ]; then bool ' Timer LED' CONFIG_LEDS_TIMER bool ' CPU usage LED' CONFIG_LEDS_CPU fi fi + if [ "$CONFIG_ARCH_EBSA110" = "y" ]; then + define_bool CONFIG_LEDS_TIMER y + fi +fi +if [ "$CONFIG_CPU_32" = "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then + bool 'Kernel-mode alignment trap handler' CONFIG_ALIGNMENT_TRAP fi endmenu -source drivers/ieee1394/Config.in - -source drivers/i2o/Config.in +source drivers/parport/Config.in source drivers/pnp/Config.in @@ -219,37 +230,9 @@ if [ "$CONFIG_ARCH_ACORN" = "y" ]; then source drivers/acorn/block/Config.in fi -source drivers/char/Config.in -if [ "$CONFIG_ARCH_ACORN" = "y" ]; then - if [ "$CONFIG_BUSMOUSE" = "y" ]; then - if [ "$CONFIG_ARCH_RPC" != "y" ]; then - define_bool CONFIG_KBDMOUSE y - else - define_bool CONFIG_RPCMOUSE y - fi - fi -fi - -#source drivers/misc/Config.in - -if [ "$CONFIG_VT" = "y" ]; then - mainmenu_option next_comment - comment 'Console drivers' - if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then - bool 'VGA text console' CONFIG_VGA_CONSOLE - fi - bool 'Support Frame buffer devices' CONFIG_FB - source drivers/video/Config.in - endmenu -fi - if [ "$CONFIG_NET" = "y" ]; then source net/Config.in - source net/ax25/Config.in - - source net/irda/Config.in - mainmenu_option next_comment comment 'Network device support' @@ -258,16 +241,11 @@ if [ "$CONFIG_NET" = "y" ]; then source drivers/net/Config.in fi endmenu -fi -# mainmenu_option next_comment -# comment 'ISDN subsystem' -# -# tristate 'ISDN support' CONFIG_ISDN -# if [ "$CONFIG_ISDN" != "n" ]; then -# source drivers/isdn/Config.in -# fi -# endmenu + source net/ax25/Config.in + + source net/irda/Config.in +fi mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' @@ -292,6 +270,44 @@ if [ "$CONFIG_SCSI" != "n" ]; then fi endmenu +source drivers/ieee1394/Config.in + +source drivers/i2o/Config.in + +mainmenu_option next_comment +comment 'ISDN subsystem' + +tristate 'ISDN support' CONFIG_ISDN +if [ "$CONFIG_ISDN" != "n" ]; then + source drivers/isdn/Config.in +fi +endmenu + +source drivers/char/Config.in +if [ "$CONFIG_ARCH_ACORN" = "y" -a \ + "$CONFIG_BUSMOUSE" = "y" ]; then + if [ "$CONFIG_ARCH_RPC" != "y" ]; then + define_bool CONFIG_KBDMOUSE y + else + define_bool CONFIG_RPCMOUSE y + fi +fi + +#source drivers/misc/Config.in + +source fs/Config.in + +if [ "$CONFIG_VT" = "y" ]; then + mainmenu_option next_comment + comment 'Console drivers' + if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then + bool 'VGA text console' CONFIG_VGA_CONSOLE + fi + bool 'Support Frame buffer devices' CONFIG_FB + source drivers/video/Config.in + endmenu +fi + if [ "$CONFIG_ARCH_ACORN" = "y" -o \ "$CONFIG_ARCH_CLPS7500" = "y" -o \ "$CONFIG_ARCH_SHARK" = "y" -o \ @@ -306,10 +322,9 @@ if [ "$CONFIG_ARCH_ACORN" = "y" -o \ endmenu fi -source fs/Config.in - source drivers/usb/Config.in + mainmenu_option next_comment comment 'Kernel hacking' @@ -317,7 +332,6 @@ bool 'Compile kernel with frame pointer (for useful debugging)' CONFIG_FRAME_POI bool 'Verbose kernel error messages' CONFIG_DEBUG_ERRORS 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 diff --git a/arch/arm/def-configs/a5k b/arch/arm/def-configs/a5k index 21a6488eb..11a1dfd67 100644 --- a/arch/arm/def-configs/a5k +++ b/arch/arm/def-configs/a5k @@ -94,10 +94,6 @@ 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 - -# -# Additional Block Devices -# CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_MD is not set diff --git a/arch/arm/def-configs/assabet b/arch/arm/def-configs/assabet index 0a2cb7462..4f046fae2 100644 --- a/arch/arm/def-configs/assabet +++ b/arch/arm/def-configs/assabet @@ -10,25 +10,29 @@ CONFIG_UID16=y CONFIG_EXPERIMENTAL=y # -# System and processor type +# System and Processor Type # # CONFIG_ARCH_ARC is not set # CONFIG_ARCH_A5K is not set -# CONFIG_ARCH_RPC is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_FOOTBRIDGE is not set +# CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y + +# +# SA11x0 Implementations +# CONFIG_SA1100_ASSABET=y -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_EMPEG is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_ASSABET_NEPONSET is not set # CONFIG_SA1100_BITSY is not set +# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_PLEB is not set # CONFIG_SA1100_THINCLIENT is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set # CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_TIFON is not set CONFIG_DISCONTIGMEM=y +CONFIG_SA1100_FREQUENCY_SCALE=y +# CONFIG_SA1100_VOLTAGE_SCALE is not set # CONFIG_ARCH_ACORN is not set CONFIG_CPU_32=y # CONFIG_CPU_26 is not set @@ -37,7 +41,8 @@ CONFIG_CPU_SA1100=y # CONFIG_PCI is not set # CONFIG_ISA is not set # CONFIG_ISA_DMA is not set -# CONFIG_ALIGNMENT_TRAP is not set +# CONFIG_SBUS is not set +CONFIG_ALIGNMENT_TRAP=y # # Loadable module support @@ -49,14 +54,14 @@ CONFIG_MODULES=y # # General setup # -# CONFIG_NET is not set +CONFIG_NET=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL 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_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_ARTHUR is not set @@ -69,13 +74,22 @@ CONFIG_CMDLINE="" CONFIG_LEDS=y CONFIG_LEDS_TIMER=y CONFIG_LEDS_CPU=y +CONFIG_HOTPLUG=y + +# +# PC Card support +# +CONFIG_PCMCIA=y +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_SA1100_PCMCIA=y +CONFIG_VIRTUAL_BUS=y # # 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 @@ -91,12 +105,15 @@ CONFIG_LEDS_CPU=y # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set - -# -# Additional Block Devices -# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_LVM is not set # CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_RAID15_DANGEROUS is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_INITRD=y # CONFIG_BLK_DEV_FLASH is not set @@ -152,6 +169,7 @@ CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_FTAPE is not set # CONFIG_DRM is not set # CONFIG_DRM_TDFX is not set +# CONFIG_PCMCIA_SERIAL is not set # CONFIG_AGP is not set # @@ -171,6 +189,7 @@ CONFIG_FB_SA1100=y CONFIG_FBCON_CFB2=y CONFIG_FBCON_CFB4=y CONFIG_FBCON_CFB8=y +CONFIG_FBCON_CFB16=y CONFIG_FBCON_FONTWIDTH8_ONLY=y CONFIG_FBCON_FONTS=y CONFIG_FONT_8x8=y @@ -180,11 +199,176 @@ CONFIG_FONT_8x8=y # CONFIG_FONT_ACORN_8x8 is not set # +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK is not set +# CONFIG_NETFILTER is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_IP_ROUTER is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_ALIAS is not set +# CONFIG_SYN_COOKIES is not set + +# +# (it is safe to leave these untouched) +# +CONFIG_SKB_LARGE=y +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_DECNET is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_BRIDGE is not set +# CONFIG_LLC is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING 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 is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI 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_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR 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=y +# CONFIG_PCMCIA_3C589 is not set +# CONFIG_PCMCIA_3C574 is not set +# CONFIG_PCMCIA_FMVJ18X is not set +CONFIG_PCMCIA_PCNET=y +# CONFIG_PCMCIA_NMCLAN is not set +# CONFIG_PCMCIA_SMC91C92 is not set +# CONFIG_PCMCIA_XIRC2PS is not set +# CONFIG_ARCNET_COM20020_CS is not set +# CONFIG_PCMCIA_IBMTR is not set +# CONFIG_NET_PCMCIA_RADIO is not set +CONFIG_PCMCIA_NETCARD=y + +# # ATA/IDE/MFM/RLL support # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_IDE_MODES is not set +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set +# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set +# CONFIG_BLK_DEV_IDEDISK_IBM is not set +# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set +# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set +# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set +# CONFIG_BLK_DEV_IDEDISK_WD is not set +# CONFIG_BLK_DEV_COMMERIAL is not set +# CONFIG_BLK_DEV_TIVO is not set +CONFIG_BLK_DEV_IDECS=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_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_ISAPNP is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_IDE_MODES is not set # # SCSI support @@ -192,43 +376,135 @@ CONFIG_FONT_8x8=y # CONFIG_SCSI is not set # +# Sound +# +CONFIG_SOUND=y +CONFIG_SOUND_UDA1341=y +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 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_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set + +# # File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_RAMFS 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_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set # CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_NLS is not set +# 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_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set # # USB support diff --git a/arch/arm/def-configs/brutus b/arch/arm/def-configs/brutus index 80a38a0c3..67c4eeafb 100644 --- a/arch/arm/def-configs/brutus +++ b/arch/arm/def-configs/brutus @@ -95,10 +95,6 @@ CONFIG_LEDS_CPU=y # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_LVM is not set @@ -216,10 +212,12 @@ CONFIG_FONT_8x8=y # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_RAMFS 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_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set @@ -227,11 +225,16 @@ CONFIG_PROC_FS=y # CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_NCPFS_NLS is not set # # Partition Types diff --git a/arch/arm/def-configs/ebsa110 b/arch/arm/def-configs/ebsa110 index 42529e789..c2c7e0dcc 100644 --- a/arch/arm/def-configs/ebsa110 +++ b/arch/arm/def-configs/ebsa110 @@ -1,7 +1,8 @@ # -# Automatically generated make config: don't edit +# Automatically generated by make menuconfig: don't edit # CONFIG_ARM=y +# CONFIG_SBUS is not set CONFIG_UID16=y # @@ -10,23 +11,27 @@ CONFIG_UID16=y CONFIG_EXPERIMENTAL=y # -# System and Processor Type +# System Type # # CONFIG_ARCH_ARC is not set # CONFIG_ARCH_A5K is not set -# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_CO285 is not set CONFIG_ARCH_EBSA110=y -# CONFIG_FOOTBRIDGE is not set -# CONFIG_ARCH_ACORN is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set CONFIG_CPU_32=y # CONFIG_CPU_26 is not set CONFIG_CPU_32v4=y CONFIG_CPU_SA110=y +# CONFIG_ARCH_ACORN is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +# CONFIG_DISCONTIGMEM is not set # CONFIG_PCI is not set # CONFIG_ISA is not set # CONFIG_ISA_DMA is not set -# CONFIG_SBUS is not set -# CONFIG_PCMCIA is not set # # Loadable module support @@ -38,6 +43,8 @@ CONFIG_KMOD=y # # General setup # +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set CONFIG_NET=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set @@ -49,6 +56,9 @@ CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y # # Parallel port support @@ -64,17 +74,6 @@ CONFIG_PARPORT_PC_SUPERIO=y # CONFIG_PARPORT_SUNBPP is not set # CONFIG_PARPORT_OTHER is not set CONFIG_PARPORT_1284=y -CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8" -CONFIG_LEDS=y - -# -# I2O device support -# -# CONFIG_I2O 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 @@ -90,12 +89,8 @@ CONFIG_LEDS=y # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set -CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_LVM is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set @@ -105,74 +100,6 @@ CONFIG_BLK_DEV_RAM=y # CONFIG_BLK_DEV_INITRD is not set # -# Character devices -# -# CONFIG_VT is not set -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -CONFIG_SERIAL_EXTENDED=y -# CONFIG_SERIAL_MANY_PORTS is not set -# CONFIG_SERIAL_SHARE_IRQ is not set -# CONFIG_SERIAL_DETECT_IRQ is not set -# CONFIG_SERIAL_MULTIPORT is not set -# CONFIG_HUB6 is not set -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_UNIX98_PTYS is not set -CONFIG_PRINTER=m -# CONFIG_LP_CONSOLE is not set -# CONFIG_PPDEV is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set -# 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=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set -CONFIG_SOFT_WATCHDOG=y -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set - -# -# Video For Linux -# -# CONFIG_VIDEO_DEV 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 -# CONFIG_AGP is not set - -# # Networking options # CONFIG_PACKET=m @@ -194,7 +121,7 @@ CONFIG_IP_ROUTE_FWMARK=y CONFIG_IP_ROUTE_NAT=y # CONFIG_IP_ROUTE_MULTIPATH is not set # CONFIG_IP_ROUTE_TOS is not set -# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_ROUTE_LARGE_TABLES is not set CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y @@ -206,51 +133,46 @@ CONFIG_IP_PNP_BOOTP=y CONFIG_IP_ALIAS=y # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# # CONFIG_SKB_LARGE is not set # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_FTP=m # CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_LIMIT=y +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m # CONFIG_IP_NF_MATCH_MAC is not set -CONFIG_IP_NF_MATCH_MARK=y -CONFIG_IP_NF_MATCH_MULTIPORT=y -CONFIG_IP_NF_MATCH_TOS=y -CONFIG_IP_NF_MATCH_STATE=y -# CONFIG_IP_NF_MATCH_UNCLEAN is not set +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_UNCLEAN=m # CONFIG_IP_NF_MATCH_OWNER is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m # CONFIG_IP_NF_TARGET_MIRROR is not set -CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_TOS=y -CONFIG_IP_NF_TARGET_MARK=y -CONFIG_IP_NF_TARGET_LOG=y +# CONFIG_IP_NF_COMPAT_IPFWADM 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_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -263,16 +185,6 @@ CONFIG_IP_NF_TARGET_LOG=y # CONFIG_NET_SCHED is not set # -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# # Network device support # CONFIG_NETDEVICES=y @@ -281,7 +193,7 @@ CONFIG_NETDEVICES=y # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=m +# CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_ETHERTAP is not set @@ -317,7 +229,7 @@ CONFIG_PPP_ASYNC=y # CONFIG_PPP_SYNC_TTY is not set CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m +# CONFIG_PPPOE is not set # CONFIG_SLIP is not set # @@ -339,6 +251,16 @@ CONFIG_PPPOE=m # CONFIG_WAN is not set # +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# # ATA/IDE/MFM/RLL support # # CONFIG_IDE is not set @@ -351,6 +273,85 @@ CONFIG_PPPOE=m # CONFIG_SCSI is not set # +# I2O device support +# +# CONFIG_I2O 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 + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +CONFIG_SERIAL_EXTENDED=y +# CONFIG_SERIAL_MANY_PORTS is not set +# CONFIG_SERIAL_SHARE_IRQ is not set +# CONFIG_SERIAL_DETECT_IRQ is not set +# CONFIG_SERIAL_MULTIPORT is not set +# CONFIG_HUB6 is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_UNIX98_PTYS is not set +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_JOYSTICK is not set +# CONFIG_QIC02_TAPE is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +CONFIG_SOFT_WATCHDOG=y +# CONFIG_PCWATCHDOG is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set + +# +# Video For Linux +# +# CONFIG_VIDEO_DEV 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 +# CONFIG_AGP is not set + +# # File systems # # CONFIG_QUOTA is not set @@ -370,7 +371,7 @@ CONFIG_AUTOFS4_FS=y # CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set +CONFIG_MINIX_FS=m # CONFIG_NTFS_FS is not set # CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set @@ -399,6 +400,7 @@ CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set # CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set diff --git a/arch/arm/def-configs/footbridge b/arch/arm/def-configs/footbridge index ffe655f5d..af2ccd01a 100644 --- a/arch/arm/def-configs/footbridge +++ b/arch/arm/def-configs/footbridge @@ -138,10 +138,6 @@ CONFIG_PARIDE_ON20=m CONFIG_PARIDE_ON26=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_LVM is not set diff --git a/arch/arm/def-configs/graphicsclient b/arch/arm/def-configs/graphicsclient index 902495c32..11415b363 100644 --- a/arch/arm/def-configs/graphicsclient +++ b/arch/arm/def-configs/graphicsclient @@ -84,10 +84,6 @@ CONFIG_CMDLINE="ip=off" # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_HD_ONLY is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_MD is not set diff --git a/arch/arm/def-configs/lart b/arch/arm/def-configs/lart index d101f4392..2e1cd07b5 100644 --- a/arch/arm/def-configs/lart +++ b/arch/arm/def-configs/lart @@ -1,5 +1,5 @@ # -# Automatically generated make config: don't edit +# Automatically generated by make menuconfig: don't edit # CONFIG_ARM=y CONFIG_UID16=y @@ -10,25 +10,24 @@ CONFIG_UID16=y CONFIG_EXPERIMENTAL=y # -# System and processor type +# System and Processor Type # # CONFIG_ARCH_ARC is not set # CONFIG_ARCH_A5K is not set -# CONFIG_ARCH_RPC is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_FOOTBRIDGE is not set +# CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_EMPEG is not set -# CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_BITSY is not set +# CONFIG_SA1100_BRUTUS is not set CONFIG_SA1100_LART=y -# CONFIG_SA1100_PLEB is not set # CONFIG_SA1100_THINCLIENT is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set # CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_TIFON is not set CONFIG_DISCONTIGMEM=y +CONFIG_SA1100_FREQUENCY_SCALE=m +CONFIG_SA1100_VOLTAGE_SCALE=y # CONFIG_ARCH_ACORN is not set CONFIG_CPU_32=y # CONFIG_CPU_26 is not set @@ -37,6 +36,7 @@ CONFIG_CPU_SA1100=y # CONFIG_PCI is not set # CONFIG_ISA is not set # CONFIG_ISA_DMA is not set +# CONFIG_SBUS is not set CONFIG_ALIGNMENT_TRAP=y # @@ -69,29 +69,38 @@ CONFIG_CMDLINE="console=ttyS0,9600" CONFIG_LEDS=y # CONFIG_LEDS_TIMER is not set CONFIG_LEDS_CPU=y +# CONFIG_HOTPLUG is not set # # I2O device support # # CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set # # Plug and Play configuration # # CONFIG_PNP is not set +# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set - -# -# Additional Block Devices -# +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_LVM is not set # CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_RAID15_DANGEROUS is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_INITRD=y # CONFIG_BLK_DEV_FLASH is not set @@ -144,6 +153,7 @@ CONFIG_SERIAL_SA1100_CONSOLE=y # # CONFIG_FTAPE is not set # CONFIG_DRM is not set +# CONFIG_DRM_TDFX is not set # CONFIG_AGP is not set # @@ -163,18 +173,10 @@ CONFIG_INET=y # CONFIG_NET_IPGRE is not set # CONFIG_IP_ALIAS is not set # CONFIG_SYN_COOKIES is not set - -# -# (it is safe to leave these untouched) -# # CONFIG_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 @@ -230,10 +232,12 @@ CONFIG_NETDEVICES=y # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set CONFIG_PPP_ASYNC=y # CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=y +CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m +# CONFIG_PPPOE is not set CONFIG_SLIP=y CONFIG_SLIP_COMPRESSED=y # CONFIG_SLIP_SMART is not set @@ -270,42 +274,118 @@ CONFIG_SLIP_COMPRESSED=y # CONFIG_SCSI is not set # +# Sound +# +CONFIG_SOUND=m +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 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_VIA82CXXX is not set +CONFIG_SOUND_OSS=m +CONFIG_SOUND_TRACEINIT=y +# CONFIG_SOUND_DMAP is not set +# CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_SGALAXY is not set +# CONFIG_SOUND_ADLIB is not set +# CONFIG_SOUND_ACI_MIXER is not set +# CONFIG_SOUND_CS4232 is not set +# CONFIG_SOUND_SSCAPE is not set +# CONFIG_SOUND_GUS is not set +# CONFIG_SOUND_ICH 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_PAS_JOYSTICK is not set +# CONFIG_SOUND_PSS is not set +# CONFIG_SOUND_SOFTOSS is not set +# CONFIG_SOUND_SB is not set +# CONFIG_SOUND_AWE32_SYNTH is not set +# CONFIG_SOUND_WAVEFRONT is not set +# CONFIG_SOUND_MAUI is not set +# CONFIG_SOUND_YM3812 is not set +# CONFIG_SOUND_OPL3SA1 is not set +# CONFIG_SOUND_OPL3SA2 is not set +# CONFIG_SOUND_YMPCI is not set +# CONFIG_SOUND_UART6850 is not set +# CONFIG_SOUND_AEDSP16 is not set +# CONFIG_SOUND_VIDC is not set +# CONFIG_SOUND_WAVEARTIST is not set +CONFIG_SOUND_SA1100_SSP=m + +# # File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # 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 is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_RAMFS 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_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set -CONFIG_NFS_FS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFS_V3 is not set +# CONFIG_ROOT_NFS is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y +# CONFIG_NFSD_V3 is not set +# CONFIG_SUNRPC is not set +# CONFIG_LOCKD is not set # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types @@ -325,6 +405,6 @@ CONFIG_MSDOS_PARTITION=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set CONFIG_DEBUG_LL=y diff --git a/arch/arm/def-configs/lusl7200 b/arch/arm/def-configs/lusl7200 index 96cc49d3d..18010c899 100644 --- a/arch/arm/def-configs/lusl7200 +++ b/arch/arm/def-configs/lusl7200 @@ -79,10 +79,6 @@ CONFIG_BINFMT_ELF=y # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_LVM is not set diff --git a/arch/arm/def-configs/rpc b/arch/arm/def-configs/rpc index d55bdf89f..afbfda2da 100644 --- a/arch/arm/def-configs/rpc +++ b/arch/arm/def-configs/rpc @@ -91,10 +91,6 @@ CONFIG_BLK_DEV_FD=y # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_LVM is not set diff --git a/arch/arm/def-configs/thinclient b/arch/arm/def-configs/thinclient index 32355662b..5ad898616 100644 --- a/arch/arm/def-configs/thinclient +++ b/arch/arm/def-configs/thinclient @@ -94,10 +94,6 @@ CONFIG_CMDLINE="root=nfs" # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_LVM is not set @@ -336,10 +332,12 @@ CONFIG_SMC9194=y # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_RAMFS 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_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set @@ -347,23 +345,39 @@ CONFIG_PROC_FS=y # CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types diff --git a/arch/arm/def-configs/victor b/arch/arm/def-configs/victor index 569cc458d..2377cc4df 100644 --- a/arch/arm/def-configs/victor +++ b/arch/arm/def-configs/victor @@ -80,10 +80,6 @@ CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_BLK_DEV_CMD640 is not set # CONFIG_IDE_CHIPSETS is not set - -# -# Additional Block Devices -# # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_BLK_DEV_RAM is not set diff --git a/arch/arm/defconfig b/arch/arm/defconfig index af422cd83..4a0c54739 100644 --- a/arch/arm/defconfig +++ b/arch/arm/defconfig @@ -134,10 +134,6 @@ CONFIG_PARIDE_ON20=m CONFIG_PARIDE_ON26=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_MD=y diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index a129ca2f6..7662f42ef 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -17,22 +17,23 @@ O_OBJS_a5k = dma-a5k.o O_OBJS_rpc = dma-rpc.o O_OBJS_ebsa110 = dma-dummy.o O_OBJS_footbridge = dma.o dma-footbridge.o $(ISA_DMA_OBJS) hw-footbridge.o isa.o +O_OBJS_clps7500 = dma-dummy.o O_OBJS_nexuspci = dma-dummy.o -O_OBJS_sa1100 = dma-dummy.o fiq.o +O_OBJS_sa1100 = dma-dummy.o hw-sa1100.o O_OBJS_l7200 = dma-dummy.o fiq.o O_TARGET := kernel.o # Object file lists. -obj-y := arch.o $(ENTRY_OBJ) ioport.o irq.o process.o ptrace.o \ - semaphore.o setup.o signal.o sys_arm.o time.o traps.o \ - $(O_OBJS_$(MACHINE)) +obj-y := arch.o $(ENTRY_OBJ) irq.o process.o ptrace.o \ + semaphore.o setup.o signal.o sys_arm.o time.o \ + traps.o $(O_OBJS_$(MACHINE)) obj-m := obj-n := obj- := -export-objs := armksyms.o dma.o ecard.o hw-footbridge.o leds-$(MACHINE).o +export-objs := armksyms.o dma.o ecard.o hw-footbridge.o hw-sa1100.o leds-$(MACHINE).o obj-$(CONFIG_ARCH_ACORN) += dma.o ecard.o fiq.o time-acorn.o obj-$(CONFIG_DEBUG_LL) += debug-$(PROCESSOR).o diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c index 717ba4ca9..8b67943ce 100644 --- a/arch/arm/kernel/arch.c +++ b/arch/arm/kernel/arch.c @@ -55,6 +55,7 @@ fixup_acorn(struct machine_desc *desc, struct param_struct *params, for (i = 0; i < 4; i++) { mi->bank[i].start = PHYS_OFFSET + (i << 26); + mi->bank[i].node = 0; mi->bank[i].size = params->u1.s.pages_in_bank[i] * params->u1.s.page_size; @@ -122,6 +123,17 @@ static void __init fixup_netwinder(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { +#ifdef CONFIG_ISAPNP + extern int isapnp_disable; + + /* + * We must not use the kernels ISAPnP code + * on the NetWinder - it will reset the settings + * for the WaveArtist chip and render it inoperable. + */ + isapnp_disable = 1; +#endif + if (params->u1.s.nr_pages != 0x2000 && params->u1.s.nr_pages != 0x4000) { printk(KERN_WARNING "Warning: bad NeTTrom parameters " @@ -181,6 +193,7 @@ fixup_coebsa285(struct machine_desc *desc, struct param_struct *params, mi->nr_banks = 1; mi->bank[0].start = PHYS_OFFSET; mi->bank[0].size = boot_memory_end; + mi->bank[0].node = 0; *cmdline = boot_command_line; } @@ -197,7 +210,8 @@ MACHINE_END extern void select_sa1100_io_desc(void); #define SET_BANK(__nr,__start,__size) \ mi->bank[__nr].start = (__start), \ - mi->bank[__nr].size = (__size) + mi->bank[__nr].size = (__size), \ + mi->bank[__nr].node = (((unsigned)(__start) - PHYS_OFFSET) >> 27) static void __init fixup_sa1100(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) @@ -252,7 +266,7 @@ fixup_sa1100(struct machine_desc *desc, struct param_struct *params, setup_initrd(0xc0400000, 4*1024*1024); } - else if (machine_is_thinclient()) { + else if (machine_is_thinclient() || machine_is_graphicsclient()) { SET_BANK( 0, 0xc0000000, 16*1024*1024 ); mi->nr_banks = 1; @@ -312,6 +326,12 @@ MACHINE_START(EMPEG, "empeg MP3 Car Audio Player") FIXUP(fixup_sa1100) MACHINE_END #endif +#ifdef CONFIG_SA1100_GRAPHICSCLIENT +MACHINE_START(GRAPHICSCLIENT, "ADS GraphicsClient") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) + FIXUP(fixup_sa1100) +MACHINE_END +#endif #ifdef CONFIG_SA1100_ITSY MACHINE_START(ITSY, "Compaq Itsy") BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) @@ -349,6 +369,35 @@ MACHINE_START(VICTOR, "VisuAide Victor") FIXUP(fixup_sa1100) MACHINE_END #endif +#ifdef CONFIG_SA1100_XP860 +MACHINE_START(XP860, "XP860") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) + FIXUP(fixup_sa1100) +MACHINE_END +#endif +#endif + +#ifdef CONFIG_ARCH_L7200 + +static void __init +fixup_l7200(struct machine_desc *desc, struct param_struct *params, + char **cmdline, struct meminfo *mi) +{ + mi->nr_banks = 1; + mi->bank[0].start = PHYS_OFFSET; + mi->bank[0].size = (32*1024*1024); + mi->bank[0].node = 0; + + ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); + setup_ramdisk( 1, 0, 0, 8192 ); + setup_initrd( __phys_to_virt(0xf1000000), 0x00162b0d); +} + +MACHINE_START(L7200, "LinkUp Systems L7200SDB") + MAINTAINER("Steve Hill") + BOOT_MEM(0xf0000000, 0x80040000, 0xd0000000) + FIXUP(fixup_l7200) +MACHINE_END #endif #ifdef CONFIG_ARCH_EBSA110 diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 0d2e68846..2fbda24be 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -21,65 +21,94 @@ int have_isa_bridge; extern void hw_init(void); -void pcibios_report_device_errors(int warn) +void pcibios_report_status(u_int status_mask, int warn) { struct pci_dev *dev; pci_for_each_dev(dev) { u16 status; + /* + * ignore host bridge - we handle + * that separately + */ + if (dev->bus->number == 0 && dev->devfn == 0) + continue; + pci_read_config_word(dev, PCI_STATUS, &status); - if ((status & 0xf900) == 0) + status &= status_mask; + if (status == 0) continue; - pci_write_config_word(dev, PCI_STATUS, status & 0xf900); + /* clear the status errors */ + pci_write_config_word(dev, PCI_STATUS, status); if (warn) - printk(KERN_DEBUG "PCI: %02X:%02X: status %04X " - "on %s\n", dev->bus->number, dev->devfn, - status, dev->name); + printk("(%02x:%02x.%d: %04X) ", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), + status); } } /* * We don't use this to fix the device, but initialisation of it. - * It's not the correct use for this, but it works. The actions we - * take are: - * - enable only IO - * - set memory region to start at zero - * - (0x48) enable all memory requests from ISA to be channeled to PCI - * - (0x42) disable ping-pong (as per errata) - * - (0x40) enable PCI packet retry + * It's not the correct use for this, but it works. + * Note that the arbiter/ISA bridge appears to be buggy, specifically in + * the following area: + * 1. park on CPU + * 2. ISA bridge ping-pong + * 3. ISA bridge master handling of target RETRY + * + * Bug 3 is responsible for the sound DMA grinding to a halt. We now + * live with bug 2. */ static void __init pci_fixup_83c553(struct pci_dev *dev) { + /* + * Set memory region to start at address 0, and enable IO + */ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_SPACE_MEMORY); pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO); dev->resource[0].end -= dev->resource[0].start; dev->resource[0].start = 0; + /* + * All memory requests from ISA to be channelled to PCI + */ pci_write_config_byte(dev, 0x48, 0xff); - pci_write_config_byte(dev, 0x42, 0x00); + + /* + * Enable ping-pong on bus master to ISA bridge transactions. + * This improves the sound DMA substantially. The fixed + * priority arbiter also helps (see below). + */ + pci_write_config_byte(dev, 0x42, 0x01); + + /* + * Enable PCI retry + */ pci_write_config_byte(dev, 0x40, 0x22); /* - * We used to set the arbiter to "park on last master" - * (bit 1 set), but unfortunately the CyberPro does not - * park the bus. We must therefore park on CPU. + * We used to set the arbiter to "park on last master" (bit + * 1 set), but unfortunately the CyberPro does not park the + * bus. We must therefore park on CPU. Unfortunately, this + * may trigger yet another bug in the 553. */ - pci_write_config_byte(dev, 0x83, 0x00); + pci_write_config_byte(dev, 0x83, 0x02); /* - * Rotate priorities of each PCI request + * Make the ISA DMA request lowest priority, and disable + * rotating priorities completely. */ - pci_write_config_byte(dev, 0x80, 0xe0); - pci_write_config_byte(dev, 0x81, 0x01); + pci_write_config_byte(dev, 0x80, 0x11); + pci_write_config_byte(dev, 0x81, 0x00); /* - * Route INTA input to IRQ 11, and set - * IRQ11 to be level sensitive. + * Route INTA input to IRQ 11, and set IRQ11 to be level + * sensitive. */ pci_write_config_word(dev, 0x44, 0xb000); outb(0x08, 0x4d1); @@ -193,8 +222,8 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq) pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); } -/* - * Called after each bus is probed, but before its children +/** + * pcibios_fixup_bus - Called after each bus is probed, but before its children * are examined. */ void __init pcibios_fixup_bus(struct pci_bus *bus) @@ -209,6 +238,8 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) else BUG(); + busdata->max_lat = 255; + /* * Walk the devices on this bus, working out what we can * and can't support. @@ -216,6 +247,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) for (walk = walk->next; walk != &bus->devices; walk = walk->next) { struct pci_dev *dev = pci_dev_b(walk); u16 status; + u8 max_lat, min_gnt; pci_read_config_word(dev, PCI_STATUS, &status); @@ -227,6 +259,17 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) busdata->features &= ~PCI_COMMAND_FAST_BACK; /* + * If we encounter a CyberPro 2000, then we disable + * SERR and PERR reporting - this chip doesn't drive the + * parity line correctly. + */ +#if 1 /* !testing */ + if (dev->vendor == PCI_VENDOR_ID_INTERG && + dev->device == PCI_DEVICE_ID_INTERG_2000) + busdata->features &= ~(PCI_COMMAND_SERR | + PCI_COMMAND_PARITY); +#endif + /* * Calculate the maximum devsel latency. */ if (busdata->maxdevsel < (status & PCI_STATUS_DEVSEL_MASK)) @@ -240,6 +283,16 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA || dev->class >> 8 == PCI_CLASS_BRIDGE_EISA) have_isa_bridge = !0; + + /* + * Calculate the maximum latency on this bus. Note + * that we ignore any device which reports its max + * latency is the same as its use. + */ + pci_read_config_byte(dev, PCI_MAX_LAT, &max_lat); + pci_read_config_byte(dev, PCI_MIN_GNT, &min_gnt); + if (max_lat && max_lat != min_gnt && max_lat < busdata->max_lat) + busdata->max_lat = max_lat; } /* @@ -249,6 +302,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) for (walk = walk->next; walk != &bus->devices; walk = walk->next) { struct pci_dev *dev = pci_dev_b(walk); u16 cmd; + u8 min_gnt, latency; /* * architecture specific hacks. I don't really want @@ -263,11 +317,27 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) pci_write_config_dword(dev, 0x40, 0x80000000); /* - * Set latency timer to 32, and a cache line size to 32 bytes. + * Calculate this masters latency timer value. + * This is rather primitive - it does not take + * account of the number of masters in a system + * wanting to use the bus. + */ + pci_read_config_byte(dev, PCI_MIN_GNT, &min_gnt); + if (min_gnt) { + if (min_gnt > busdata->max_lat) + min_gnt = busdata->max_lat; + + latency = (int)min_gnt * 25 / 3; + } else + latency = 32; /* 1us */ + + pci_write_config_byte(dev, PCI_LATENCY_TIMER, latency); + + /* + * Set the cache line size to 32 bytes. * Also, set system error enable, parity error enable. * Disable ROM. */ - pci_write_config_byte(dev, PCI_LATENCY_TIMER, 32); pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8); pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -520,15 +590,6 @@ void __init pcibios_init(void) pci_assign_unassigned_resources(); 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) @@ -544,10 +605,18 @@ void pcibios_align_resource(void *data, struct resource *res, unsigned long size { } +/** + * pcibios_set_master - Setup device for bus mastering. + * @dev: PCI device to be setup + */ void pcibios_set_master(struct pci_dev *dev) { } +/** + * pcibios_enable_device - Enable I/O and memory. + * @dev: PCI device to be enabled + */ int pcibios_enable_device(struct pci_dev *dev) { u16 cmd, old_cmd; diff --git a/arch/arm/kernel/bios32.h b/arch/arm/kernel/bios32.h index 525af165b..421ec6a79 100644 --- a/arch/arm/kernel/bios32.h +++ b/arch/arm/kernel/bios32.h @@ -10,6 +10,11 @@ struct arm_bus_sysdata { * Maximum devsel for this bus. */ u16 maxdevsel; + /* + * The maximum latency that devices on this + * bus can withstand. + */ + u8 max_lat; }; struct arm_pci_sysdata { diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index eec058522..0db6d0fde 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -119,7 +119,7 @@ .long SYMBOL_NAME(sys_newlstat) .long SYMBOL_NAME(sys_newfstat) .long SYMBOL_NAME(sys_ni_syscall) /* was sys_uname */ -/* 110 */ .long SYMBOL_NAME(sys_iopl) +/* 110 */ .long SYMBOL_NAME(sys_ni_syscall) /* was sys_iopl */ .long SYMBOL_NAME(sys_vhangup) .long SYMBOL_NAME(sys_ni_syscall) .long SYMBOL_NAME(sys_syscall) /* call a syscall */ diff --git a/arch/arm/kernel/debug-armv.S b/arch/arm/kernel/debug-armv.S index 8054f8756..da81b3b05 100644 --- a/arch/arm/kernel/debug-armv.S +++ b/arch/arm/kernel/debug-armv.S @@ -64,7 +64,7 @@ beq 1001b .endm -#elif defined(CONFIG_HOST_FOOTBRIDGE) || defined(CONFIG_ADDIN_FOOTBRIDGE) +#elif defined(CONFIG_FOOTBRIDGE) #ifndef CONFIG_DEBUG_DC21285_PORT /* For NetWinder debugging */ .macro addruart,rx diff --git a/arch/arm/kernel/dec21285.c b/arch/arm/kernel/dec21285.c index bc8a951e2..7fb43c68a 100644 --- a/arch/arm/kernel/dec21285.c +++ b/arch/arm/kernel/dec21285.c @@ -1,9 +1,8 @@ /* * arch/arm/kernel/dec21285.c: PCI functions for DC21285 * - * Copyright (C) 1998-1999 Russell King, Phil Blundell + * Copyright (C) 1998-2000 Russell King, Phil Blundell */ -#include <linux/config.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> @@ -23,7 +22,8 @@ #define MAX_SLOTS 21 extern int setup_arm_irq(int, struct irqaction *); -extern void pcibios_report_device_errors(int warn); +extern void pcibios_report_status(u_int status_mask, int warn); +extern void register_isa_ports(unsigned int, unsigned int, unsigned int); static unsigned long dc21285_base_address(struct pci_dev *dev) @@ -145,86 +145,125 @@ static struct pci_ops dc21285_ops = { dc21285_write_config_dword, }; +static struct timer_list serr_timer; +static struct timer_list perr_timer; + +static void dc21285_enable_error(unsigned long __data) +{ + switch (__data) { + case IRQ_PCI_SERR: + del_timer(&serr_timer); + break; + + case IRQ_PCI_PERR: + del_timer(&perr_timer); + break; + } + + enable_irq(__data); +} + /* * Warn on PCI errors. */ -static void -dc21285_error(int irq, void *dev_id, struct pt_regs *regs) +static void dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs) { - static unsigned long next_warn; - unsigned long cmd = *CSR_PCICMD & 0x0000ffff; - unsigned long ctrl = (*CSR_SA110_CNTL) & 0xffffde07; - unsigned long irqstatus = *CSR_IRQ_RAWSTATUS; - int warn = time_after_eq(jiffies, next_warn); + unsigned int cmd; + unsigned int status; - if (machine_is_netwinder()) - warn = 0; + cmd = *CSR_PCICMD; + status = cmd >> 16; + cmd = cmd & 0xffff; - ctrl |= SA110_CNTL_DISCARDTIMER; + if (status & PCI_STATUS_REC_MASTER_ABORT) { + printk(KERN_DEBUG "PCI: master abort: "); + pcibios_report_status(PCI_STATUS_REC_MASTER_ABORT, 1); + printk("\n"); - if (warn) { - next_warn = jiffies + HZ; - printk(KERN_DEBUG "PCI: "); + cmd |= PCI_STATUS_REC_MASTER_ABORT << 16; } - if (irqstatus & (1 << 31)) { - if (warn) - printk("parity error "); - cmd |= 1 << 31; - } + if (status & PCI_STATUS_REC_TARGET_ABORT) { + printk(KERN_DEBUG "PCI: target abort: "); + pcibios_report_status(PCI_STATUS_SIG_TARGET_ABORT, 1); + printk("\n"); - if (irqstatus & (1 << 30)) { - if (warn) - printk("target abort "); - cmd |= 1 << 28; + cmd |= PCI_STATUS_REC_TARGET_ABORT << 16; } - if (irqstatus & (1 << 29)) { - if (warn) - printk("master abort "); - cmd |= 1 << 29; - } + *CSR_PCICMD = cmd; +} - if (irqstatus & (1 << 28)) { - if (warn) - printk("data parity error "); - cmd |= 1 << 24; - } +static void dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + struct timer_list *timer = dev_id; + unsigned int cntl; - if (irqstatus & (1 << 27)) { - if (warn) - printk("discard timer expired "); - ctrl &= ~SA110_CNTL_DISCARDTIMER; - } + printk(KERN_DEBUG "PCI: system error received: "); + pcibios_report_status(PCI_STATUS_SIG_SYSTEM_ERROR, 1); + printk("\n"); - if (irqstatus & (1 << 23)) { - if (warn) - printk("system error "); - ctrl |= SA110_CNTL_RXSERR; - } + cntl = *CSR_SA110_CNTL & 0xffffdf07; + *CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR; + + /* + * back off this interrupt + */ + disable_irq(irq); + timer->expires = jiffies + HZ; + add_timer(timer); +} - if (warn) - printk("pc=[<%08lX>]\n", instruction_pointer(regs)); +static void dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + printk(KERN_DEBUG "PCI: discard timer expired\n"); + *CSR_SA110_CNTL &= 0xffffde07; +} + +static void dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned int cmd; - pcibios_report_device_errors(warn); + printk(KERN_DEBUG "PCI: data parity error detected: "); + pcibios_report_status(PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY, 1); + printk("\n"); - *CSR_PCICMD = cmd; - *CSR_SA110_CNTL = ctrl; + cmd = *CSR_PCICMD & 0xffff; + *CSR_PCICMD = cmd | 1 << 24; } -static struct irqaction dc21285_error_action = { - dc21285_error, SA_INTERRUPT, 0, "PCI error", NULL, NULL -}; +static void dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + struct timer_list *timer = dev_id; + unsigned int cmd; + + printk(KERN_DEBUG "PCI: parity error detected: "); + pcibios_report_status(PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY, 1); + printk("\n"); + + cmd = *CSR_PCICMD & 0xffff; + *CSR_PCICMD = cmd | 1 << 31; + + /* + * back off this interrupt + */ + disable_irq(irq); + timer->expires = jiffies + HZ; + add_timer(timer); +} void __init dc21285_init(void) { - static struct resource csrmem, csrio; - struct arm_pci_sysdata sysdata; unsigned long cntl; - unsigned int mem_size, pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | + unsigned int mem_size; + unsigned int pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; - int i; + int cfn_mode; + /* + * These registers need to be set up whether we're the + * central function or not. + */ mem_size = (unsigned int)high_memory - PAGE_OFFSET; *CSR_SDRAMBASEMASK = (mem_size - 1) & 0x0ffc0000; *CSR_SDRAMBASEOFFSET = 0; @@ -233,60 +272,93 @@ void __init dc21285_init(void) *CSR_CSRBASEOFFSET = 0; *CSR_PCIADDR_EXTN = 0; -#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); - allocate_resource(&iomem_resource, &csrmem, 128, - 0xf4000000, 0xf8000000, 128, NULL, NULL); - - /* - * Map our SDRAM at a known address in PCI space, just in case - * the firmware had other ideas. Using a nonzero base is - * necessary, since some VGA cards forcefully use PCI addresses - * in the range 0x000a0000 to 0x000c0000. (eg, S3 cards). - */ - *CSR_PCICACHELINESIZE = 0x00002008; - *CSR_PCICSRBASE = csrmem.start; - *CSR_PCICSRIOBASE = csrio.start; - *CSR_PCISDRAMBASE = virt_to_bus((void *)PAGE_OFFSET); - *CSR_PCIROMBASE = 0; - *CSR_PCICMD = pci_cmd | + cfn_mode = __footbridge_cfn_mode(); + + printk(KERN_INFO "PCI: DC21285 footbridge, revision %02lX in " + "%s mode\n", *CSR_CLASSREV & 0xff, cfn_mode ? + "central function" : "addin"); + + if (cfn_mode) { + static struct resource csrmem, csrio; + struct arm_pci_sysdata sysdata; + int i; + + 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); + allocate_resource(&iomem_resource, &csrmem, 128, + 0xf4000000, 0xf8000000, 128, NULL, NULL); + + /* + * Map our SDRAM at a known address in PCI space, just in case + * the firmware had other ideas. Using a nonzero base is + * necessary, since some VGA cards forcefully use PCI addresses + * in the range 0x000a0000 to 0x000c0000. (eg, S3 cards). + */ + *CSR_PCICACHELINESIZE = 0x00002008; + *CSR_PCICSRBASE = csrmem.start; + *CSR_PCICSRIOBASE = csrio.start; + *CSR_PCISDRAMBASE = virt_to_bus((void *)PAGE_OFFSET); + *CSR_PCIROMBASE = 0; + *CSR_PCICMD = pci_cmd | (1 << 31) | (1 << 29) | (1 << 28) | (1 << 24); -#endif - printk(KERN_DEBUG "PCI: DC21285 footbridge, revision %02lX\n", - *CSR_CLASSREV & 0xff); + for (i = 0; i < MAX_NR_BUS; i++) { + sysdata.bus[i].features = PCI_COMMAND_FAST_BACK | + PCI_COMMAND_SERR | + PCI_COMMAND_PARITY; + sysdata.bus[i].maxdevsel = PCI_STATUS_DEVSEL_FAST; + } - for (i = 0; i < MAX_NR_BUS; i++) { - sysdata.bus[i].features = PCI_COMMAND_FAST_BACK | - PCI_COMMAND_SERR | - PCI_COMMAND_PARITY; - sysdata.bus[i].maxdevsel = PCI_STATUS_DEVSEL_FAST; + pci_scan_bus(0, &dc21285_ops, &sysdata); + + pci_cmd |= sysdata.bus[0].features; + + printk("PCI: Fast back to back transfers %sabled\n", + (sysdata.bus[0].features & PCI_COMMAND_FAST_BACK) ? + "en" : "dis"); + + /* + * Clear any existing errors - we aren't + * interested in historical data... + */ + cntl = *CSR_SA110_CNTL & 0xffffde07; + *CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR; + *CSR_PCICMD = pci_cmd | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24; + } else { + /* + * If we are not compiled to accept "add-in" mode, then + * we are using a constant virt_to_bus translation which + * can not hope to cater for the way the host BIOS has + * set up the machine. + */ + panic("PCI: this kernel is compiled for central " + "function mode only"); } - pci_scan_bus(0, &dc21285_ops, &sysdata); + /* + * Initialise PCI error IRQ after we've finished probing + */ + request_irq(IRQ_PCI_ABORT, dc21285_abort_irq, SA_INTERRUPT, "PCI abort", NULL); + request_irq(IRQ_DISCARD_TIMER, dc21285_discard_irq, SA_INTERRUPT, "Discard timer", NULL); + request_irq(IRQ_PCI_DPERR, dc21285_dparity_irq, SA_INTERRUPT, "PCI data parity", NULL); - pci_cmd |= sysdata.bus[0].features; + init_timer(&serr_timer); + init_timer(&perr_timer); - printk("Fast back to back PCI transfers %sabled\n", - (sysdata.bus[0].features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); + serr_timer.data = IRQ_PCI_SERR; + serr_timer.function = dc21285_enable_error; + perr_timer.data = IRQ_PCI_PERR; + perr_timer.function = dc21285_enable_error; - /* - * Clear any existing errors - we aren't - * interested in historical data... - */ - cntl = *CSR_SA110_CNTL & 0xffffde07; - *CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR; - *CSR_PCICMD = pci_cmd | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24; + request_irq(IRQ_PCI_SERR, dc21285_serr_irq, SA_INTERRUPT, + "PCI system error", &serr_timer); + request_irq(IRQ_PCI_PERR, dc21285_parity_irq, SA_INTERRUPT, + "PCI parity error", &perr_timer); - /* - * Initialise PCI error IRQ after we've finished probing - */ - setup_arm_irq(IRQ_PCI_ERR, &dc21285_error_action); + register_isa_ports(DC21285_PCI_MEM, DC21285_PCI_IO, 0); } diff --git a/arch/arm/kernel/dma-a5k.c b/arch/arm/kernel/dma-a5k.c index 84740b6d2..d79013af2 100644 --- a/arch/arm/kernel/dma-a5k.c +++ b/arch/arm/kernel/dma-a5k.c @@ -15,7 +15,9 @@ #include "dma.h" -static struct fiq_handler fh = { NULL, "floppydma", NULL, NULL }; +static struct fiq_handler fh = { + name: "floppydma" +}; int arch_request_dma(dmach_t channel, dma_t *dma, const char *dev_id) { diff --git a/arch/arm/kernel/dma-rpc.c b/arch/arm/kernel/dma-rpc.c index ad9afac30..e1b54233b 100644 --- a/arch/arm/kernel/dma-rpc.c +++ b/arch/arm/kernel/dma-rpc.c @@ -20,7 +20,9 @@ #include "dma.h" -static struct fiq_handler fh = { NULL, "floppydma", NULL, NULL }; +static struct fiq_handler fh = { + name: "floppydma" +}; #if 0 typedef enum { diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index c7d1da3e1..61eb422b2 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -52,6 +52,10 @@ #define oldlatch_init() #endif +#ifndef CONFIG_ARCH_RPC +#define HAVE_EXPMASK +#endif + enum req { req_readbytes, req_reset diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index bffe289ce..5d4f216b6 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -32,7 +32,7 @@ .text -#define PF_TRACESYS 0x20 +#define PT_TRACESYS 0x00000002 @ Bad Abort numbers @ ----------------- @@ -233,14 +233,12 @@ irq_prio_ebsa110: .macro irq_prio_table .endm -#elif defined(CONFIG_HOST_FOOTBRIDGE) || defined(CONFIG_ADDIN_FOOTBRIDGE) +#elif defined(CONFIG_FOOTBRIDGE) #include <asm/dec21285.h> .macro disable_fiq .endm - .equ irq_mask_pci_err_high, IRQ_MASK_PCI_ERR & 0xff000000 - .equ irq_mask_pci_err_low, IRQ_MASK_PCI_ERR & 0x00ffffff .equ dc21285_high, ARMCSR_BASE & 0xff000000 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff @@ -311,10 +309,24 @@ irq_prio_ebsa110: movne \irqnr, #IRQ_CONTX bne 1001f - tst \irqstat, #irq_mask_pci_err_high - tsteq \irqstat, #irq_mask_pci_err_low - movne \irqnr, #IRQ_PCI_ERR + tst \irqstat, #IRQ_MASK_PCI_ABORT + movne \irqnr, #IRQ_PCI_ABORT bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_SERR + movne \irqnr, #IRQ_PCI_SERR + bne 1001f + + tst \irqstat, #IRQ_MASK_DISCARD_TIMER + movne \irqnr, #IRQ_DISCARD_TIMER + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_DPERR + movne \irqnr, #IRQ_PCI_DPERR + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_PERR + movne \irqnr, #IRQ_PCI_PERR 1001: .endm @@ -389,12 +401,25 @@ ENTRY(soft_irq_mask) ldr \irqnr, [r4, #4] @ ICMR = 0xfa050004 ands \irqstat, \irqstat, \irqnr mov \irqnr, #0 - beq 1002f -1001: tst \irqstat, #1 - addeq \irqnr, \irqnr, #1 - moveq \irqstat, \irqstat, lsr #1 - beq 1001b -1002: + beq 1001f + tst \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tsteq \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tsteq \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tst \irqstat, #0x0f + moveq \irqstat, \irqstat, lsr #4 + addeq \irqnr, \irqnr, #4 + tst \irqstat, #0x03 + moveq \irqstat, \irqstat, lsr #2 + addeq \irqnr, \irqnr, #2 + tst \irqstat, #0x01 + addeqs \irqnr, \irqnr, #1 +1001: .endm .macro irq_prio_table @@ -441,7 +466,8 @@ ENTRY(soft_irq_mask) .macro restore_user_regs ldr r0, [sp, #S_PSR] @ Get calling cpsr - msr cpsr_c, #I_BIT | MODE_SVC @ disable IRQs + mov ip, #I_BIT | MODE_SVC + msr cpsr_c, ip @ disable IRQs msr spsr, r0 @ save in spsr_svc ldmia sp, {r0 - lr}^ @ Get calling r0 - lr mov r0, r0 @@ -592,9 +618,10 @@ __dabt_svc: sub sp, sp, #S_FRAME_SIZE bl cpu_data_abort #endif msr cpsr_c, r9 - mov r3, sp + mov r2, sp bl SYMBOL_NAME(do_DataAbort) - msr cpsr_c, #I_BIT | MODE_SVC + mov r0, #I_BIT | MODE_SVC + msr cpsr_c, r0 ldr r0, [sp, #S_PSR] msr spsr, r0 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr @@ -636,7 +663,8 @@ __und_svc: sub sp, sp, #S_FRAME_SIZE mov r1, sp @ struct pt_regs *regs bl SYMBOL_NAME(do_undefinstr) -1: msr cpsr_c, #I_BIT | MODE_SVC +1: mov r0, #I_BIT | MODE_SVC + msr cpsr_c, r0 ldr lr, [sp, #S_PSR] @ Get SVC cpsr msr spsr, lr ldmia sp, {r0 - pc}^ @ Restore SVC registers @@ -675,8 +703,9 @@ __dabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go #else bl cpu_data_abort #endif - msr cpsr_c, #MODE_SVC @ Enable interrupts - mov r3, sp + mov r2, #MODE_SVC + msr cpsr_c, r2 @ Enable interrupts + mov r2, sp adrsvc al, lr, ret_from_sys_call b SYMBOL_NAME(do_DataAbort) @@ -720,9 +749,10 @@ call_fpe: get_current_task r10 add r10, r10, #TSS_FPESAVE @ r10 = workspace ldr pc, [r4] @ Call FP module USR entry point -fpundefinstr: mov r0, lr +fpundefinstr: mov r0, #MODE_SVC + msr cpsr_c, r0 @ Enable interrupts + mov r0, lr mov r1, sp - msr cpsr_c, #MODE_SVC @ Enable interrupts adrsvc al, lr, ret_from_sys_call b SYMBOL_NAME(do_undefinstr) @@ -736,7 +766,8 @@ __pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go stmdb r8, {sp, lr}^ @ Save sp_usr lr_usr alignment_trap r4, r7, __temp_abt zero_fp - msr cpsr_c, #MODE_SVC @ Enable interrupts + mov r0, #MODE_SVC + msr cpsr_c, r0 @ Enable interrupts mov r0, r5 @ address (pc) mov r1, sp @ regs bl SYMBOL_NAME(do_PrefetchAbort) @ call abort handler @@ -816,7 +847,8 @@ vector_IRQ: @ @ @ now branch to the relevent MODE handling routine @ - msr spsr_c, #I_BIT | MODE_SVC @ switch to SVC_32 mode + mov r13, #I_BIT | MODE_SVC + msr spsr_c, r13 @ switch to SVC_32 mode and lr, lr, #15 ldr lr, [pc, lr, lsl #2] @@ -856,7 +888,8 @@ vector_data: @ @ @ now branch to the relevent MODE handling routine @ - msr spsr_c, #I_BIT | MODE_SVC @ switch to SVC_32 mode + mov r13, #I_BIT | MODE_SVC + msr spsr_c, r13 @ switch to SVC_32 mode and lr, lr, #15 ldr lr, [pc, lr, lsl #2] @@ -897,7 +930,8 @@ vector_prefetch: @ @ now branch to the relevent MODE handling routine @ - msr spsr_c, #I_BIT | MODE_SVC @ switch to SVC_32 mode + mov r13, #I_BIT | MODE_SVC + msr spsr_c, r13 @ switch to SVC_32 mode ands lr, lr, #15 ldreq lr, .LCtab_pabt @@ -924,7 +958,8 @@ vector_undefinstr: @ @ now branch to the relevent MODE handling routine @ - msr spsr_c, #I_BIT | MODE_SVC @ switch to SVC_32 mode + mov r13, #I_BIT | MODE_SVC + msr spsr_c, r13 @ switch to SVC_32 mode and lr, lr, #15 ldr lr, [pc, lr, lsl #2] diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 97fcfc522..b4fbfe628 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -94,9 +94,9 @@ vector_swi: save_user_regs bcs 2f get_current_task ip - ldr ip, [ip, #TSK_FLAGS] @ check for syscall tracing + ldr ip, [ip, #TSK_PTRACE] @ check for syscall tracing adr tbl, SYMBOL_NAME(sys_call_table) - tst ip, #PF_TRACESYS + tst ip, #PT_TRACESYS ldreq pc, [tbl, scno, lsl #2] @ call sys routine ldr tip, [sp, #S_IP + S_OFF] @ save old IP diff --git a/arch/arm/kernel/hw-footbridge.c b/arch/arm/kernel/hw-footbridge.c index f47e169c5..08aac078e 100644 --- a/arch/arm/kernel/hw-footbridge.c +++ b/arch/arm/kernel/hw-footbridge.c @@ -662,12 +662,13 @@ static void __init cats_hw_init(void) #endif -void __init hw_init(void) +/* + * Initialise any other hardware after we've got the PCI bus + * initialised. We may need the PCI bus to talk to this other + * hardware. + */ +static int __init hw_init(void) { - extern void register_isa_ports(unsigned int, unsigned int, - unsigned int); - register_isa_ports(DC21285_PCI_MEM, DC21285_PCI_IO, 0); - #ifdef CONFIG_ARCH_NETWINDER /* * this ought to have a better home... @@ -678,7 +679,6 @@ void __init hw_init(void) */ if (machine_is_netwinder()) { unsigned long flags; - extern int isapnp_disable; wb977_init(); cpld_init(); @@ -687,21 +687,13 @@ void __init hw_init(void) spin_lock_irqsave(&gpio_lock, flags); gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); spin_unlock_irqrestore(&gpio_lock, flags); - -#ifdef CONFIG_ISAPNP - /* - * We must not use the kernels ISAPnP code - * on the NetWinder - it will reset the settings - * for the WaveArtist chip and render it inoperable. - */ - isapnp_disable = 1; -#endif } #endif #ifdef CONFIG_ARCH_CATS if (machine_is_cats()) cats_hw_init(); #endif - - leds_event(led_start); + return 0; } + +__initcall(hw_init); diff --git a/arch/arm/kernel/hw-sa1100.c b/arch/arm/kernel/hw-sa1100.c new file mode 100644 index 000000000..539bb721b --- /dev/null +++ b/arch/arm/kernel/hw-sa1100.c @@ -0,0 +1,135 @@ +/* + * arch/arm/kernel/hw-sa1100.c + * + * SA1100-dependent machine specifics + * + * Copyright (C) 2000 Nicolas Pitre <nico@cam.org> + * + * This will certainly contain more stuff with time... like power management, + * special hardware autodetection, etc. + * + */ +#include <linux/config.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/sched.h> + +#include <asm/delay.h> +#include <asm/hardware.h> + + +/* + * SA1100 GPIO edge detection for IRQs: + * IRQs are generated on Falling-Edge, Rising-Edge, or both. + * This must be called *before* the appropriate IRQ is registered. + * Use this instead of directly setting GRER/GFER. + */ + +int GPIO_IRQ_rising_edge; +int GPIO_IRQ_falling_edge; + +void set_GPIO_IRQ_edge( int gpio_mask, int edge ) +{ + if( edge & GPIO_FALLING_EDGE ) + GPIO_IRQ_falling_edge |= gpio_mask; + else + GPIO_IRQ_falling_edge &= ~gpio_mask; + if( edge & GPIO_RISING_EDGE ) + GPIO_IRQ_rising_edge |= gpio_mask; + else + GPIO_IRQ_rising_edge &= ~gpio_mask; +} + +EXPORT_SYMBOL(set_GPIO_IRQ_edge); + + +#ifdef CONFIG_SA1100_ASSABET + +unsigned long BCR_value = BCR_DB1110; +unsigned long SCR_value = SCR_INIT; +EXPORT_SYMBOL(BCR_value); +EXPORT_SYMBOL(SCR_value); + +/* + * Read System Configuration "Register" + * (taken from "Intel StrongARM SA-1110 Microprocessor Development Board + * User's Guide", section 4.4.1) + * + * This same scan is performed in arch/arm/boot/compressed/head-sa1100.S + * to set up the serial port for decompression status messages. We + * repeat it here because the kernel may not be loaded as a zImage, and + * also because it's a hassle to communicate the SCR value to the kernel + * from the decompressor. + */ + +void __init get_assabet_scr(void) +{ + unsigned long flags, scr, i; + + save_flags_cli(flags); + GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */ + GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */ + GPDR &= ~(0x3fc); /* Configure GPIO 9:2 as inputs */ + for(i = 100; i--; scr = GPLR); /* Read GPIO 9:2 */ + GPDR |= 0x3fc; /* restore correct pin direction */ + restore_flags(flags); + scr &= 0x3fc; /* save as system configuration byte. */ + + SCR_value = scr; +} + +#endif /* CONFIG_SA1100_ASSABET */ + + +#ifdef CONFIG_SA1111 + +void __init sa1111_init(void){ + unsigned long id=SKID; + + if((id & SKID_ID_MASK) == SKID_SA1111_ID) + printk(KERN_INFO "SA-1111 Microprocessor Companion Chip: " + "silicon revision %x, metal revision %x\n", + (id & SKID_SIREV_MASK)>>4, (id & SKID_MTREV_MASK)); + else { + printk(KERN_ERR "Could not detect SA-1111!\n"); + return; + } + + /* First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: + * (SA-1110 Developer's Manual, section 9.1.2.1) + */ + GAFR |= GPIO_GPIO27; + GPDR |= GPIO_GPIO27; + TUCR = TUCR_3_6864MHz; + + /* Now, set up the PLL and RCLK in the SA-1111: */ + SKCR = SKCR_PLL_BYPASS | SKCR_RDYEN | SKCR_OE_EN; + udelay(100); + SKCR = SKCR_PLL_BYPASS | SKCR_RCLKEN | SKCR_RDYEN | SKCR_OE_EN; + + /* SA-1111 Register Access Bus should now be available. Clocks for + * any other SA-1111 functional blocks must be enabled separately + * using the SKPCR. + */ +} + +#endif + + +static void __init hw_sa1100_init(void) +{ + if( machine_is_assabet() ){ + if(machine_has_neponset()){ +#ifdef CONFIG_ASSABET_NEPONSET + LEDS = WHOAMI; + sa1111_init(); +#else + printk( "Warning: Neponset detected but full support " + "hasn't been configured in the kernel\n" ); +#endif + } + } +} + +module_init(hw_sa1100_init); diff --git a/arch/arm/kernel/ioport.c b/arch/arm/kernel/ioport.c deleted file mode 100644 index 07a52ba8e..000000000 --- a/arch/arm/kernel/ioport.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * linux/arch/arm/kernel/ioport.c - * - * IO permission support for ARM. - */ - -#include <linux/config.h> -#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/types.h> -#include <linux/ioport.h> -#include <linux/mm.h> - -#include <asm/pgtable.h> -#include <asm/uaccess.h> - -#ifdef CONFIG_CPU_32 -asmlinkage int sys_iopl(unsigned long turn_on) -{ - if (turn_on && !capable(CAP_SYS_RAWIO)) - return -EPERM; - - /* - * We only support an on_off approach - */ - modify_domain(DOMAIN_IO, turn_on ? DOMAIN_MANAGER : DOMAIN_CLIENT); - - return 0; -} -#else -asmlinkage int sys_iopl(unsigned long turn_on) -{ - return -ENOSYS; -} -#endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 1b26ced94..7a761b7c6 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -15,7 +15,7 @@ * IRQ's are in fact implemented a bit like signal handlers for the kernel. * Naturally it's not a 1:1 relation, but there are similarities. */ -#include <linux/config.h> /* for CONFIG_DEBUG_ERRORS */ +#include <linux/config.h> #include <linux/ptrace.h> #include <linux/errno.h> #include <linux/kernel_stat.h> @@ -33,13 +33,6 @@ #include <asm/io.h> #include <asm/system.h> -#ifndef SMP -#define irq_enter(cpu, irq) (++local_irq_count[cpu]) -#define irq_exit(cpu, irq) (--local_irq_count[cpu]) -#else -#error SMP not supported -#endif - #ifndef cliIF #define cliIF() #endif @@ -85,6 +78,7 @@ struct irqdesc { }; static struct irqdesc irq_desc[NR_IRQS]; +static volatile unsigned long irq_err_count; /* * Get architecture specific interrupt handlers @@ -133,8 +127,8 @@ int get_irq_list(char *buf) action = irq_desc[i].action; if (!action) continue; - p += sprintf(p, "%3d: %10u %s", - i, kstat_irqs(i), action->name); + p += sprintf(p, "%3d: %10u ", i, kstat_irqs(i)); + p += sprintf(p, " %s", action->name); for (action = action->next; action; action = action->next) { p += sprintf(p, ", %s", action->name); } @@ -144,6 +138,7 @@ int get_irq_list(char *buf) #ifdef CONFIG_ARCH_ACORN p += get_fiq_list(p); #endif + p += sprintf(p, "Err: %10lu\n", irq_err_count); return p - buf; } @@ -181,10 +176,17 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) { struct irqdesc * desc; struct irqaction * action; - int status, cpu; + int cpu; irq = fixup_irq(irq); + /* + * Some hardware gives randomly wrong interrupts. Rather + * than crashing, do something sensible. + */ + if (irq >= NR_IRQS) + goto bad_irq; + desc = irq_desc + irq; spin_lock(&irq_controller_lock); @@ -197,10 +199,11 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) desc->triggered = 1; /* Return with this interrupt masked if no action */ - status = 0; action = desc->action; if (action) { + int status = 0; + if (desc->nomask) { spin_lock(&irq_controller_lock); desc->unmask(irq); @@ -237,9 +240,15 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) if (softirq_state[cpu].active & softirq_state[cpu].mask) do_softirq(); + return; + +bad_irq: + irq_err_count += 1; + printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq); + return; } -#if defined(CONFIG_ARCH_ACORN) +#ifdef CONFIG_ARCH_ACORN void do_ecard_IRQ(int irq, struct pt_regs *regs) { struct irqdesc * desc; diff --git a/arch/arm/kernel/leds-ebsa110.c b/arch/arm/kernel/leds-ebsa110.c index eb286347b..7b2c886ef 100644 --- a/arch/arm/kernel/leds-ebsa110.c +++ b/arch/arm/kernel/leds-ebsa110.c @@ -13,7 +13,7 @@ #include <asm/leds.h> #include <asm/system.h> -void ebsa110_leds_event(led_event_t ledevt) +static void ebsa110_leds_event(led_event_t ledevt) { unsigned long flags; diff --git a/arch/arm/kernel/leds-footbridge.c b/arch/arm/kernel/leds-footbridge.c index 05f232f57..4fa2237eb 100644 --- a/arch/arm/kernel/leds-footbridge.c +++ b/arch/arm/kernel/leds-footbridge.c @@ -46,7 +46,7 @@ static void ebsa285_leds_event(led_event_t evt) switch (evt) { case led_start: hw_led_state = XBUS_LED_RED | XBUS_LED_GREEN; -#ifndef CONFIG_LEDS_IDLE +#ifndef CONFIG_LEDS_CPU hw_led_state |= XBUS_LED_AMBER; #endif led_state |= LED_STATE_ENABLED; @@ -223,11 +223,12 @@ static void dummy_leds_event(led_event_t evt) { } -static void __init -init_leds_event(led_event_t evt) -{ - leds_event = dummy_leds_event; +void (*leds_event)(led_event_t) = dummy_leds_event; + +EXPORT_SYMBOL(leds_event); +static int __init leds_init(void) +{ #ifdef CONFIG_FOOTBRIDGE if (machine_is_ebsa285() || machine_is_co285()) leds_event = ebsa285_leds_event; @@ -237,9 +238,9 @@ init_leds_event(led_event_t evt) leds_event = netwinder_leds_event; #endif - leds_event(evt); -} + leds_event(led_start); -void (*leds_event)(led_event_t) = init_leds_event; + return 0; +} -EXPORT_SYMBOL(leds_event); +__initcall(leds_init); diff --git a/arch/arm/kernel/leds-sa1100.c b/arch/arm/kernel/leds-sa1100.c new file mode 100644 index 000000000..ef6918d7c --- /dev/null +++ b/arch/arm/kernel/leds-sa1100.c @@ -0,0 +1,333 @@ +/* + * linux/arch/arm/kernel/leds-sa1100.c + * + * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu> + * + * Original (leds-footbridge.c) by Russell King + * + * Added Brutus LEDs support + * Nicolas Pitre, Mar 19, 2000 + * + * Added LART LED support + * Erik Mouw (J.A.K.Mouw@its.tudelft.nl), April 21, 2000 + * + * + * Assabet uses the LEDs as follows: + * - Green - toggles state every 50 timer interrupts + * - Red - on if system is not idle + * + * Brutus uses the LEDs as follows: + * - D3 (Green, GPIO9) - toggles state every 50 timer interrupts + * - D17 (Red, GPIO20) - on if system is not idle + * - D4 (Green, GPIO8) - misc function + * + * LART uses the LED as follows: + * - GPIO23 is the LED, on if system is not idle + * You can use both CONFIG_LEDS_CPU and CONFIG_LEDS_TIMER at the same + * time, but in that case the timer events will still dictate the + * pace of the LED. + * + */ +#include <linux/config.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/spinlock.h> + +#include <asm/hardware.h> +#include <asm/leds.h> +#include <asm/system.h> + + +#define LED_STATE_ENABLED 1 +#define LED_STATE_CLAIMED 2 + +static unsigned int led_state; +static unsigned int hw_led_state; + + +#ifdef CONFIG_SA1100_ASSABET + +#define BCR_LED_MASK (BCR_LED_GREEN | BCR_LED_RED) + +static void assabet_leds_event(led_event_t evt) +{ + unsigned long flags; + + save_flags_cli(flags); + + switch (evt) { + case led_start: + hw_led_state = BCR_LED_RED | BCR_LED_GREEN; + led_state = LED_STATE_ENABLED; + break; + + case led_stop: + led_state &= ~LED_STATE_ENABLED; + break; + + case led_claim: + led_state |= LED_STATE_CLAIMED; + hw_led_state = BCR_LED_RED | BCR_LED_GREEN; + break; + + case led_release: + led_state &= ~LED_STATE_CLAIMED; + hw_led_state = BCR_LED_RED | BCR_LED_GREEN; + break; + +#ifdef CONFIG_LEDS_TIMER + case led_timer: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state ^= BCR_LED_GREEN; + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state |= BCR_LED_RED; + break; + + case led_idle_end: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state &= ~BCR_LED_RED; + break; +#endif + + case led_green_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~BCR_LED_GREEN; + break; + + case led_green_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= BCR_LED_GREEN; + break; + + case led_amber_on: + break; + + case led_amber_off: + break; + + case led_red_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~BCR_LED_RED; + break; + + case led_red_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= BCR_LED_RED; + break; + + default: + break; + } + + if (led_state & LED_STATE_ENABLED) + BCR = BCR_value = (BCR_value & ~BCR_LED_MASK) | hw_led_state; + + restore_flags(flags); +} + +#endif /* CONFIG_SA1100_ASSABET */ + +#ifdef CONFIG_SA1100_BRUTUS + +#define LED_D3 GPIO_GPIO(9) +#define LED_D4 GPIO_GPIO(8) +#define LED_D17 GPIO_GPIO(20) +#define LED_MASK (LED_D3|LED_D4|LED_D17) + +static void brutus_leds_event(led_event_t evt) +{ + unsigned long flags; + + save_flags_cli(flags); + + switch (evt) { + case led_start: + hw_led_state = LED_MASK; + led_state = LED_STATE_ENABLED; + break; + + case led_stop: + led_state &= ~LED_STATE_ENABLED; + break; + + case led_claim: + led_state |= LED_STATE_CLAIMED; + hw_led_state = LED_MASK; + break; + + case led_release: + led_state &= ~LED_STATE_CLAIMED; + hw_led_state = LED_MASK; + break; + +#ifdef CONFIG_LEDS_TIMER + case led_timer: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state ^= LED_D3; + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state |= LED_D17; + break; + + case led_idle_end: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state &= ~LED_D17; + break; +#endif + + case led_green_on: + hw_led_state &= ~LED_D4; + break; + + case led_green_off: + hw_led_state |= LED_D4; + break; + + case led_amber_on: + break; + + case led_amber_off: + break; + + case led_red_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~LED_D17; + break; + + case led_red_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= LED_D17; + break; + + default: + break; + } + + if (led_state & LED_STATE_ENABLED) { + GPSR = hw_led_state; + GPCR = hw_led_state ^ LED_MASK; + } + + restore_flags(flags); +} + +#endif /* CONFIG_SA1100_BRUTUS */ + +#ifdef CONFIG_SA1100_LART + +#define LED_23 GPIO_GPIO23 +#define LED_MASK (LED_23) + + +static void lart_leds_event(led_event_t evt) +{ + unsigned long flags; + + save_flags_cli(flags); + + switch(evt) { + case led_start: + hw_led_state = LED_MASK; + led_state = LED_STATE_ENABLED; + break; + + case led_stop: + led_state &= ~LED_STATE_ENABLED; + break; + + case led_claim: + led_state |= LED_STATE_CLAIMED; + hw_led_state = LED_MASK; + break; + + case led_release: + led_state &= ~LED_STATE_CLAIMED; + hw_led_state = LED_MASK; + break; + +#ifdef CONFIG_LEDS_TIMER + case led_timer: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state ^= LED_23; + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + /* The LART people like the LED to be off when the + system is idle... */ + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state &= ~LED_23; + break; + + case led_idle_end: + /* ... and on if the system is not idle */ + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state |= LED_23; + break; +#endif + + case led_red_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~LED_23; + break; + + case led_red_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= LED_23; + break; + + default: + break; + } + + /* Now set the GPIO state, or nothing will happen at all */ + if (led_state & LED_STATE_ENABLED) { + GPSR = hw_led_state; + GPCR = hw_led_state ^ LED_MASK; + } + + restore_flags(flags); +} + +#endif /* CONFIG_SA1100_LART */ + +static void dummy_leds_event(led_event_t evt) +{ +} + +void (*leds_event)(led_event_t) = dummy_leds_event; + +EXPORT_SYMBOL(leds_event); + +static int __init +sa1100_leds_init(void) +{ +#ifdef CONFIG_SA1100_ASSABET + if (machine_is_assabet()) + leds_event = assabet_leds_event; +#endif +#ifdef CONFIG_SA1100_BRUTUS + if (machine_is_brutus()) + leds_event = brutus_leds_event; +#endif +#ifdef CONFIG_SA1100_LART + if (machine_is_lart()) + leds_event = lart_leds_event; +#endif + + leds_event(led_start); + return 0; +} + +__initcall(sa1100_leds_init); diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index c7ace10b5..40b3b9e72 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -353,10 +353,12 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) pid_t __ret; __asm__ __volatile__( - "mov r0, %1 @ kernel_thread sys_clone\n" -" mov r1, #0\n" - __syscall(clone)"\n" -" mov %0, r0" + "mov r0, %1 @ kernel_thread sys_clone + mov r1, #0 + "__syscall(clone)" + teq r0, #0 @ if we are the child + moveq fp, #0 @ ensure that fp is zero + mov %0, r0" : "=r" (__ret) : "Ir" (flags | CLONE_VM) : "r0", "r1"); if (__ret == 0) diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 0ace4c898..1684c5f5f 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -393,10 +393,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ret = -EPERM; if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -419,9 +419,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; if (child->p_pptr != current) { REMOVE_LINKS(child); child->p_pptr = current; @@ -432,7 +432,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED) { if (request != PTRACE_KILL) @@ -486,9 +486,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if ((unsigned long) data > _NSIG) goto out; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; wake_up_process (child); /* make sure single-step breakpoint is gone. */ @@ -515,7 +515,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if ((unsigned long) data > _NSIG) goto out; child->thread.debug.nsaved = -1; - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; wake_up_process(child); child->exit_code = data; /* give it a chance to run. */ @@ -568,7 +568,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); wake_up_process (child); child->exit_code = data; REMOVE_LINKS(child); @@ -590,8 +590,8 @@ out: asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff --git a/arch/arm/kernel/semaphore.c b/arch/arm/kernel/semaphore.c index a2ec71526..93a370f2d 100644 --- a/arch/arm/kernel/semaphore.c +++ b/arch/arm/kernel/semaphore.c @@ -290,68 +290,95 @@ struct rw_semaphore *rwsem_wake_writer(struct rw_semaphore *sem) * need to convert that sequence back into the C sequence when * there is contention on the semaphore. * - * r0 contains the semaphore pointer on entry. Save the C-clobbered - * registers (r0 to r3, ip and lr) except r0 in the cases where it - * is used as a return value.. + * ip contains the semaphore pointer on entry. Save the C-clobbered + * registers (r0 to r3 and lr), but not ip, as we use it as a return + * value in some cases.. */ asm(" .section .text.lock, \"ax\" .align 5 .globl __down_failed __down_failed: - stmfd sp!, {r0 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bl __down - ldmfd sp!, {r0 - r3, ip, pc} + ldmfd sp!, {r0 - r3, pc} .align 5 .globl __down_interruptible_failed __down_interruptible_failed: - stmfd sp!, {r1 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bl __down_interruptible - ldmfd sp!, {r1 - r3, ip, pc} + mov ip, r0 + ldmfd sp!, {r0 - r3, pc} .align 5 .globl __down_trylock_failed __down_trylock_failed: - stmfd sp!, {r1 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bl __down_trylock - ldmfd sp!, {r1 - r3, ip, pc} + mov ip, r0 + ldmfd sp!, {r0 - r3, pc} .align 5 .globl __up_wakeup __up_wakeup: - stmfd sp!, {r0 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bl __up - ldmfd sp!, {r0 - r3, ip, pc} + ldmfd sp!, {r0 - r3, pc} .align 5 .globl __down_read_failed __down_read_failed: - stmfd sp!, {r0 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bcc 1f - bl down_read_failed_biased - ldmfd sp!, {r0 - r3, ip, pc} -1: bl down_read_failed - /***/ +1: bl down_read_failed_biased + ldmfd sp!, {r0 - r3, pc} +2: bl down_read_failed + mrs r1, cpsr + orr r2, r1, #128 + msr cpsr_c, r2 + ldr r3, [r0] + subs r3, r3, #1 + str r3, [r0] + msr cpsr_c, r1 + ldmplfd sp!, {r0 - r3, pc} + bcc 2b + b 1b .align 5 .globl __down_write_failed __down_write_failed: - stmfd sp!, {r0 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip bcc 1f - bl down_write_failed_biased - ldmfd sp!, {r0 - r3, ip, pc} -1: bl down_write_failed - /***/ +1: bl down_write_failed_biased + ldmfd sp!, {r0 - r3, pc} +2: bl down_write_failed + mrs r1, cpsr + orr r2, r1, #128 + msr cpsr_c, r2 + ldr r3, [r0] + subs r3, r3, #"RW_LOCK_BIAS_STR" + str r3, [r0] + msr cpsr_c, r1 + ldmeqfd sp!, {r0 - r3, pc} + bcc 2b + b 1b .align 5 .globl __rwsem_wake __rwsem_wake: - stmfd sp!, {r0 - r3, ip, lr} + stmfd sp!, {r0 - r3, lr} + mov r0, ip beq 1f bl rwsem_wake_readers - ldmfd sp!, {r0 - r3, ip, pc} + ldmfd sp!, {r0 - r3, pc} 1: bl rwsem_wake_writer - ldmfd sp!, {r0 - r3, ip, pc} + ldmfd sp!, {r0 - r3, pc} .previous "); diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index ec67dcbd0..1f4295540 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -124,11 +124,11 @@ static void __init setup_processor(void) #ifdef MULTI_CPU processor = *list->proc; +#endif printk("Processor: %s %s revision %d\n", proc_info.manufacturer, proc_info.cpu_name, (int)processor_id & 15); -#endif sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); @@ -164,24 +164,6 @@ static struct machine_desc * __init setup_architecture(unsigned int nr) return list; } -static unsigned long __init memparse(char *ptr, char **retptr) -{ - unsigned long ret = simple_strtoul(ptr, retptr, 0); - - switch (**retptr) { - case 'M': - case 'm': - ret <<= 10; - case 'K': - case 'k': - ret <<= 10; - (*retptr)++; - default: - break; - } - return ret; -} - /* * Initial parsing of the command line. We need to pick out the * memory size. We look for mem=size@start, where start and size @@ -217,6 +199,7 @@ parse_cmdline(struct meminfo *mi, char **cmdline_p, char *from) mi->bank[mi->nr_banks].start = start; mi->bank[mi->nr_banks].size = size; + mi->bank[mi->nr_banks].node = 0; mi->nr_banks += 1; } c = *from++; @@ -378,6 +361,7 @@ void __init setup_arch(char **cmdline_p) if (meminfo.nr_banks == 0) { meminfo.nr_banks = 1; meminfo.bank[0].start = PHYS_OFFSET; + meminfo.bank[0].node = 0; if (params) meminfo.bank[0].size = params->u1.s.nr_pages << PAGE_SHIFT; else @@ -393,8 +377,8 @@ void __init setup_arch(char **cmdline_p) saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; parse_cmdline(&meminfo, cmdline_p, from); bootmem_init(&meminfo); - request_standard_resources(&meminfo, mdesc); paging_init(&meminfo); + request_standard_resources(&meminfo, mdesc); #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 15f8fb4cb..431dd96c1 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -512,7 +512,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index c79b323a9..bdb725551 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -154,21 +154,29 @@ static inline void do_set_rtc(void) static void do_leds(void) { - static unsigned int count = 50; - static int last_pid; - - if (current->pid != last_pid) { - last_pid = current->pid; - if (last_pid) - leds_event(led_idle_end); - else - leds_event(led_idle_start); +#ifdef CONFIG_LEDS_CPU + { + static int last_pid; + + if (current->pid != last_pid) { + last_pid = current->pid; + if (last_pid) + leds_event(led_idle_end); + else + leds_event(led_idle_start); + } } - - if (--count == 0) { - count = 50; - leds_event(led_timer); +#endif +#ifdef CONFIG_LEDS_TIMER + { + static unsigned int count = 50; + + if (--count == 0) { + count = 50; + leds_event(led_timer); + } } +#endif } #else #define do_leds() diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S index 8005fd49a..adb847670 100644 --- a/arch/arm/lib/changebit.S +++ b/arch/arm/lib/changebit.S @@ -9,18 +9,15 @@ .text /* Purpose : Function to change a bit - * Prototype: int change_bit(int bit,int *addr) + * Prototype: int change_bit(int bit, void *addr) */ ENTRY(change_bit) - and r2, r0, #7 - mov r3, #1 - mov r3, r3, lsl r2 - SAVEIRQS(ip) - DISABLEIRQS(ip) + and r2, r0, #7 + mov r3, #1 + mov r3, r3, lsl r2 + save_and_disable_irqs ip, r2 ldrb r2, [r1, r0, lsr #3] eor r2, r2, r3 strb r2, [r1, r0, lsr #3] - RESTOREIRQS(ip) + restore_irqs ip RETINSTR(mov,pc,lr) - - diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S index d936ab549..d63947520 100644 --- a/arch/arm/lib/clearbit.S +++ b/arch/arm/lib/clearbit.S @@ -8,19 +8,20 @@ #include <asm/assembler.h> .text -@ Purpose : Function to clear a bit -@ Prototype: int clear_bit(int bit,int *addr) +/* + * Purpose : Function to clear a bit + * Prototype: int clear_bit(int bit, void *addr) + */ ENTRY(clear_bit) and r2, r0, #7 mov r3, #1 mov r3, r3, lsl r2 - SAVEIRQS(ip) - DISABLEIRQS(ip) + save_and_disable_irqs ip, r2 ldrb r2, [r1, r0, lsr #3] bic r2, r2, r3 strb r2, [r1, r0, lsr #3] - RESTOREIRQS(ip) + restore_irqs ip RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S index 3544ac89d..5b570f199 100644 --- a/arch/arm/lib/findbit.S +++ b/arch/arm/lib/findbit.S @@ -1,65 +1,53 @@ /* - * linux/arch/arm/lib/bitops.S + * linux/arch/arm/lib/findbit.S * - * Copyright (C) 1995-1996 Russell King + * Copyright (C) 1995-2000 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); - +/* + * Purpose : Find a 'zero' bit + * Prototype: int find_first_zero_bit(void *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 + mov r2, #0 +.bytelp: ldrb r3, [r0, r2, lsr #3] + eors r3, r3, #0xff @ invert bits + bne .found @ any now set - found zero bit + add r2, r2, #8 @ next bit pointer + cmp r2, r1 @ any more? + bcc .bytelp + add r0, r1, #1 @ no free bits 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) +/* + * Purpose : Find next 'zero' bit + * Prototype: int find_next_zero_bit(void *addr, int maxbit, int offset) + */ ENTRY(find_next_zero_bit) - tst r2, #7 - beq Lfindzbit1lp @ If new byte, goto old routine + ands ip, r2, #7 + beq .bytelp @ If new byte, goto old routine ldrb r3, [r0, r2, lsr#3] - orr r3, r3, #0xFF00 @ Set top bits so we wont get confused - str r4, [sp, #-4]! - and r4, r2, #7 - mov r3, r3, lsr r4 @ Shift right by no. of bits - ldr r4, [sp], #4 - and r3, r3, #0xFF - teq r3, #0xFF - orreq r2, r2, #7 + eor r3, r3, #0xff @ now looking for a 1 bit + movs r3, r3, lsr ip @ shift off unused bits + orreq r2, r2, #7 @ if zero, then no bits here + addeq r2, r2, #1 @ align bit pointer + beq .bytelp @ loop for next bit + +/* + * One or more bits in the LSB of r3 are assumed to be set. + */ +.found: tst r3, #0x0f + addeq r2, r2, #4 + movne r3, r3, lsl #4 + tst r3, #0x30 + addeq r2, r2, #2 + movne r3, r3, lsl #2 + tst r3, #0x40 addeq r2, r2, #1 - beq Lfindzbit1lp @ If all bits are set, goto old routine - b Lfoundzbit + mov r0, r2 + RETINSTR(mov,pc,lr) + diff --git a/arch/arm/lib/getconsdata.c b/arch/arm/lib/getconsdata.c index 8b6a0affa..aa5efa1cd 100644 --- a/arch/arm/lib/getconsdata.c +++ b/arch/arm/lib/getconsdata.c @@ -1,7 +1,7 @@ /* * linux/arch/arm/lib/getconsdata.c * - * Copyright (C) 1995-1998 Russell King + * Copyright (C) 1995-2000 Russell King */ #include <linux/config.h> #include <linux/sched.h> @@ -25,16 +25,12 @@ #define OFF_TSK(n) (unsigned long)&(((struct task_struct *)0)->n) #define OFF_MM(n) (unsigned long)&(((struct mm_struct *)0)->n) -unsigned long TSK_STATE = OFF_TSK(state); -unsigned long TSK_FLAGS = OFF_TSK(flags); -unsigned long TSK_NEED_RESCHED = OFF_TSK(need_resched); unsigned long TSK_SIGPENDING = OFF_TSK(sigpending); unsigned long TSK_ADDR_LIMIT = OFF_TSK(addr_limit); +unsigned long TSK_NEED_RESCHED = OFF_TSK(need_resched); +unsigned long TSK_PTRACE = OFF_TSK(ptrace); unsigned long TSK_USED_MATH = OFF_TSK(used_math); -unsigned long MM = OFF_TSK(mm); -unsigned long PGD = OFF_MM(pgd); - unsigned long TSS_SAVE = OFF_TSK(thread.save); unsigned long TSS_FPESAVE = OFF_TSK(thread.fpstate.soft.save); #ifdef CONFIG_CPU_32 diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S index b4319b4c3..745bdce4e 100644 --- a/arch/arm/lib/setbit.S +++ b/arch/arm/lib/setbit.S @@ -8,19 +8,20 @@ #include <asm/assembler.h> .text -@ Purpose : Function to set a bit -@ Prototype: int set_bit(int bit,int *addr) +/* + * Purpose : Function to set a bit + * Prototype: int set_bit(int bit, void *addr) + */ ENTRY(set_bit) and r2, r0, #7 mov r3, #1 mov r3, r3, lsl r2 - SAVEIRQS(ip) - DISABLEIRQS(ip) + save_and_disable_irqs ip, r2 ldrb r2, [r1, r0, lsr #3] orr r2, r2, r3 strb r2, [r1, r0, lsr #3] - RESTOREIRQS(ip) + restore_irqs ip RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S index d3dd48216..c627cf99d 100644 --- a/arch/arm/lib/testchangebit.S +++ b/arch/arm/lib/testchangebit.S @@ -12,14 +12,13 @@ ENTRY(test_and_change_bit) add r1, r1, r0, lsr #3 and r3, r0, #7 mov r0, #1 - SAVEIRQS(ip) - DISABLEIRQS(ip) + save_and_disable_irqs ip, r2 ldrb r2, [r1] tst r2, r0, lsl r3 eor r2, r2, r0, lsl r3 - moveq r0, #0 strb r2, [r1] - RESTOREIRQS(ip) + restore_irqs ip + moveq r0, #0 RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S index 431865302..3a678e7ff 100644 --- a/arch/arm/lib/testclearbit.S +++ b/arch/arm/lib/testclearbit.S @@ -10,16 +10,15 @@ ENTRY(test_and_clear_bit) add r1, r1, r0, lsr #3 @ Get byte offset - and r3, r0, #7 @ Get bit offset + and r3, r0, #7 @ Get bit offset mov r0, #1 - SAVEIRQS(ip) - DISABLEIRQS(ip) + save_and_disable_irqs ip, r2 ldrb r2, [r1] tst r2, r0, lsl r3 bic r2, r2, r0, lsl r3 - moveq r0, #0 strb r2, [r1] - RESTOREIRQS(ip) + restore_irqs ip + moveq r0, #0 RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S index 760b6649d..2b59febea 100644 --- a/arch/arm/lib/testsetbit.S +++ b/arch/arm/lib/testsetbit.S @@ -12,14 +12,13 @@ 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) + save_and_disable_irqs ip, r2 ldrb r2, [r1] tst r2, r0, lsl r3 orr r2, r2, r0, lsl r3 - moveq r0, #0 strb r2, [r1] - RESTOREIRQS(ip) + restore_irqs ip + moveq r0, #0 RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S index 00f987b5f..e95160e38 100644 --- a/arch/arm/lib/uaccess.S +++ b/arch/arm/lib/uaccess.S @@ -538,13 +538,18 @@ USER( ldrget r3, [r1], #0) @ May fault .section .fixup,"ax" .align 0 - /* We took an exception. Zero out the buffer and pretend no - data was copied. */ -9001: ldr r0, [sp], #4 - ldr r1, [sp] - teq r1, #0 + /* + * We took an exception. r0 contains a pointer to + * the byte not copied. + */ +9001: ldr r2, [sp], #4 @ void *to + sub r2, r0, r2 @ bytes copied + ldr r1, [sp], #4 @ unsigned long count + subs r4, r1, r2 @ bytes left to copy + movne r1, r4 blne SYMBOL_NAME(__memzero) - LOADREGS(fd,sp!, {r0, r4 - r7, pc}) + mov r0, r4 + LOADREGS(fd,sp!, {r4 - r7, pc}) .previous /* Prototype: int __arch_clear_user(void *addr, size_t sz) diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 26d7f1058..faedecd2d 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile @@ -22,6 +22,9 @@ ifeq ($(CONFIG_CPU_32),y) ifeq ($(CONFIG_CPU_ARM7),y) P_OBJS += proc-arm6,7.o endif + ifeq ($(CONFIG_CPU_ARM720),y) + P_OBJS += proc-arm720.o + endif ifeq ($(CONFIG_CPU_SA110),y) P_OBJS += proc-sa110.o endif @@ -41,5 +44,6 @@ fault-armv.o: fault-common.c fault-armo.o: fault-common.c proc-arm2,3.o: ../lib/constants.h proc-arm6,7.o: ../lib/constants.h +proc-arm720.o: ../lib/constants.h proc-sa110.o: ../lib/constants.h diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 310107678..b21bc1d8a 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c @@ -9,8 +9,10 @@ #include <linux/interrupt.h> #include <linux/errno.h> #include <linux/pci.h> +#include <linux/init.h> #include <asm/io.h> +#include <asm/pgtable.h> #include <asm/pgalloc.h> /* @@ -19,6 +21,8 @@ * whether this could be called from an interrupt context or not. For * now, we expressly forbid it, especially as some of the stuff we do * here is not interrupt context safe. + * + * Note that this does *not* zero the allocated area! */ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) { @@ -36,15 +40,21 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) if (!page) goto no_page; - memset((void *)page, 0, size); - clean_cache_area(page, size); - - *dma_handle = virt_to_bus((void *)page); - ret = __ioremap(virt_to_phys((void *)page), size, 0); if (ret) { /* free wasted pages */ unsigned long end = page + (PAGE_SIZE << order); + + /* + * we need to ensure that there are no + * cachelines in use, or worse dirty in + * this area. + */ + dma_cache_inv(page, size); + dma_cache_inv(ret, size); + + *dma_handle = virt_to_bus((void *)page); + page += size; while (page < end) { free_page(page); diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 13336c008..c3d03f251 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -250,6 +250,8 @@ do_alignment(unsigned long addr, int error_code, struct pt_regs *regs) } } +if (addr != eaddr) +printk("PC = %08lx, instr = %08x, addr = %08lx, eaddr = %08lx\n", instruction_pointer(regs), instr, addr, eaddr); if (LDST_L_BIT(instr)) { regs->uregs[rd] = get_unaligned((unsigned long *)eaddr); if (rd == 15) @@ -383,29 +385,38 @@ static const struct fsr_info { "more information\n" asmlinkage void -do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs) +do_DataAbort(unsigned long addr, int error_code, struct pt_regs *regs, int fsr) { - const struct fsr_info *inf; + const struct fsr_info *inf = fsr_info + (fsr & 15); - if (user_mode(regs) && addr == regs->ARM_pc) { + if (addr == regs->ARM_pc) + goto weirdness; + + if (!inf->fn) + goto bad; + + if (!inf->fn(addr, error_code, regs)) + return; +bad: + force_sig(inf->sig, current); + die_if_kernel(inf->name, regs, fsr); + return; + +weirdness: + if (user_mode(regs)) { static int first = 1; - if (first) { + 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; - } + first = 0; return; } - inf = fsr_info + (fsr & 15); - - if (!inf->fn || inf->fn(addr, error_code, regs)) { - force_sig(inf->sig, current); - die_if_kernel(inf->name, regs, fsr); - } + if (!inf->fn || inf->fn(addr, error_code, regs)) + goto bad; } asmlinkage int diff --git a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c index 14cf5a925..385937708 100644 --- a/arch/arm/mm/fault-common.c +++ b/arch/arm/mm/fault-common.c @@ -16,6 +16,10 @@ static void show_pte(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; + if (!mm) + mm = &init_mm; + + printk(KERN_ALERT "pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); printk(KERN_ALERT "*pgd = %08lx", pgd_val(*pgd)); @@ -52,39 +56,78 @@ static void show_pte(struct mm_struct *mm, unsigned long addr) printk("\n"); } -/* - * Oops. The kernel tried to access some bad page. We'll have to - * terminate things with extreme prejudice. - */ -static void -kernel_page_fault(unsigned long addr, int write_access, struct pt_regs *regs, - struct task_struct *tsk, struct mm_struct *mm) +static int __do_page_fault(struct mm_struct *mm, unsigned long addr, int mode, struct task_struct *tsk) { - char *reason; + struct vm_area_struct *vma; + int fault, mask; + + vma = find_vma(mm, addr); + fault = -2; /* bad map area */ + if (!vma) + goto out; + if (vma->vm_start > addr) + goto check_stack; - if (addr < PAGE_SIZE) - reason = "NULL pointer dereference"; + /* + * Ok, we have a good vm_area for this + * memory access, so we can handle it. + */ +good_area: + if (READ_FAULT(mode)) /* read? */ + mask = VM_READ|VM_EXEC; else - reason = "paging request"; + mask = VM_WRITE; - printk(KERN_ALERT "Unable to handle kernel %s at virtual address %08lx\n", - reason, addr); - if (!mm) - mm = &init_mm; + fault = -1; /* bad access type */ + if (!(vma->vm_flags & mask)) + goto out; - printk(KERN_ALERT "pgd = %p\n", mm->pgd); - show_pte(mm, addr); - die("Oops", regs, write_access); + /* + * If for any reason at all we couldn't handle + * the fault, make sure we exit gracefully rather + * than endlessly redo the fault. + */ +survive: + fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(mode)); - do_exit(SIGKILL); + /* + * Handle the "normal" cases first - successful and sigbus + */ + switch (fault) { + case 2: + tsk->maj_flt++; + return fault; + case 1: + tsk->min_flt++; + case 0: + return fault; + } + + fault = -3; /* out of memory */ + if (tsk->pid != 1) + goto out; + + /* + * If we are out of memory for pid1, + * sleep for a while and retry + */ + tsk->policy |= SCHED_YIELD; + schedule(); + goto survive; + +check_stack: + if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) + goto good_area; +out: + return fault; } static int do_page_fault(unsigned long addr, int mode, struct pt_regs *regs) { struct task_struct *tsk; struct mm_struct *mm; - struct vm_area_struct *vma; unsigned long fixup; + int fault; tsk = current; mm = tsk->mm; @@ -97,57 +140,77 @@ static int do_page_fault(unsigned long addr, int mode, struct pt_regs *regs) goto no_context; down(&mm->mmap_sem); - vma = find_vma(mm, addr); - if (!vma) - goto bad_area; - if (vma->vm_start <= addr) - goto good_area; - if (!(vma->vm_flags & VM_GROWSDOWN) || expand_stack(vma, addr)) - goto bad_area; + fault = __do_page_fault(mm, addr, mode, tsk); + up(&mm->mmap_sem); /* - * Ok, we have a good vm_area for this memory access, so - * we can handle it.. + * Handle the "normal" case first */ -good_area: - if (READ_FAULT(mode)) { /* read? */ - if (!(vma->vm_flags & (VM_READ|VM_EXEC))) - goto bad_area; - } else { - if (!(vma->vm_flags & VM_WRITE)) - goto bad_area; - } + if (fault > 0) + return 0; /* - * If for any reason at all we couldn't handle the fault, - * make sure we exit gracefully rather than endlessly redo - * the fault. + * We had some memory, but were unable to + * successfully fix up this page fault. */ - if (!handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(mode))) + if (fault == 0) goto do_sigbus; - up(&mm->mmap_sem); - return 0; - /* - * Something tried to access memory that isn't in our memory map.. - * Fix it, but check if it's kernel or user first.. + * If we are in kernel mode at this point, we + * have no context to handle this fault with. */ -bad_area: - up(&mm->mmap_sem); + if (!user_mode(regs)) + goto no_context; + + if (fault == -3) { + /* + * We ran out of memory, or some other thing happened to + * us that made us unable to handle the page fault gracefully. + */ + printk("VM: killing process %s\n", tsk->comm); + do_exit(SIGKILL); + } else { + /* + * Something tried to access memory that isn't in our memory map.. + * User mode accesses just cause a SIGSEGV + */ + struct siginfo si; + +#ifdef CONFIG_DEBUG_USER + printk(KERN_DEBUG "%s: unhandled page fault at pc=0x%08lx, " + "lr=0x%08lx (bad address=0x%08lx, code %d)\n", + tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode); +#endif - /* 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 - printk("%s: memory violation at pc=0x%08lx, lr=0x%08lx (bad address=0x%08lx, code %d)\n", - tsk->comm, regs->ARM_pc, regs->ARM_lr, addr, mode); -#endif - force_sig(SIGSEGV, tsk); - return 0; + si.si_signo = SIGSEGV; + si.si_code = fault == -1 ? SEGV_ACCERR : SEGV_MAPERR; + si.si_addr = (void *)addr; + force_sig_info(SIGSEGV, &si, tsk); } + return 0; + + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->thread.address = addr; + tsk->thread.error_code = mode; + tsk->thread.trap_no = 14; + force_sig(SIGBUS, tsk); + + /* Kernel mode? Handle exceptions or die */ + if (user_mode(regs)) + return 0; no_context: /* Are we prepared to handle this kernel fault? */ @@ -160,29 +223,16 @@ no_context: return 0; } - kernel_page_fault(addr, mode, regs, tsk, mm); - return 0; - -do_sigbus: /* - * We ran out of memory, or some other thing happened to us that made - * us unable to handle the page fault gracefully. + * Oops. The kernel tried to access some bad page. We'll have to + * terminate things with extreme prejudice. */ - up(&mm->mmap_sem); + printk(KERN_ALERT "Unable to handle kernel %s at virtual address %08lx\n", + (addr < PAGE_SIZE) ? "NULL pointer dereference" : "paging request", addr); - /* - * 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); + show_pte(mm, addr); + die("Oops", regs, mode); + do_exit(SIGKILL); - /* Kernel mode? Handle exceptions or die */ - if (!user_mode(regs)) - goto no_context; return 0; } - - diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 61feb6a55..e269e146c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -31,16 +31,23 @@ #include "map.h" +#ifndef CONFIG_DISCONTIGMEM +#define NR_NODES 1 +#else +#define NR_NODES 4 +#endif + #ifdef CONFIG_CPU_32 #define TABLE_OFFSET (PTRS_PER_PTE) #else #define TABLE_OFFSET 0 #endif + #define TABLE_SIZE ((TABLE_OFFSET + PTRS_PER_PTE) * sizeof(void *)) static unsigned long totalram_pages; pgd_t swapper_pg_dir[PTRS_PER_PGD]; -extern int _stext, _text, _etext, _edata, _end; +extern char _stext, _text, _etext, _end, __init_begin, __init_end; /* * The sole use of this is to pass memory configuration @@ -173,6 +180,12 @@ void show_mem(void) show_buffers(); } +struct node_info { + unsigned int start; + unsigned int end; + int bootmap_pages; +}; + #define O_PFN_DOWN(x) ((x) >> PAGE_SHIFT) #define V_PFN_DOWN(x) O_PFN_DOWN(__pa(x)) @@ -183,34 +196,24 @@ void show_mem(void) #define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \ (((unsigned long)(s)) & PAGE_MASK)) +/* + * FIXME: We really want to avoid allocating the bootmap bitmap + * over the top of the initrd. Hopefully, this is located towards + * the start of a bank, so if we allocate the bootmap bitmap at + * the end, we won't clash. + */ static unsigned int __init -find_bootmap_pfn(struct meminfo *mi, unsigned int bootmap_pages) +find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages) { unsigned int start_pfn, bank, bootmap_pfn; start_pfn = V_PFN_UP(&_end); bootmap_pfn = 0; - /* - * FIXME: We really want to avoid allocating the bootmap - * over the top of the initrd. - */ -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) { - if (__pa(initrd_end) > mi->end) { - printk ("initrd extends beyond end of memory " - "(0x%08lx > 0x%08lx) - disabling initrd\n", - __pa(initrd_end), mi->end); - initrd_start = 0; - initrd_end = 0; - } - } -#endif - for (bank = 0; bank < mi->nr_banks; bank ++) { unsigned int start, end; - if (mi->bank[bank].size == 0) + if (mi->bank[bank].node != node) continue; start = O_PFN_UP(mi->bank[bank].start); @@ -239,99 +242,224 @@ find_bootmap_pfn(struct meminfo *mi, unsigned int bootmap_pages) } /* - * Initialise one node of the bootmem allocator. For now, we - * only initialise node 0. Notice that we have a bootmem - * bitmap per node. + * Scan the memory info structure and pull out: + * - the end of memory + * - the number of nodes + * - the pfn range of each node + * - the number of bootmem bitmap pages */ -static void __init setup_bootmem_node(int node, struct meminfo *mi) +static unsigned int __init +find_memend_and_nodes(struct meminfo *mi, struct node_info *np) { - unsigned int end_pfn, start_pfn, bootmap_pages, bootmap_pfn; - unsigned int i; + unsigned int i, bootmem_pages = 0, memend_pfn = 0; - if (node != 0) /* only initialise node 0 for now */ - return; + for (i = 0; i < NR_NODES; i++) { + np[i].start = -1U; + np[i].end = 0; + np[i].bootmap_pages = 0; + } - start_pfn = O_PFN_UP(PHYS_OFFSET); - end_pfn = O_PFN_DOWN(mi->end); - bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); - bootmap_pfn = find_bootmap_pfn(mi, bootmap_pages); + for (i = 0; i < mi->nr_banks; i++) { + unsigned long start, end; + int node; + + if (mi->bank[i].size == 0) { + /* + * Mark this bank with an invalid node number + */ + mi->bank[i].node = -1; + continue; + } + + node = mi->bank[i].node; + + if (node >= numnodes) { + numnodes = node + 1; + + /* + * Make sure we haven't exceeded the maximum number + * of nodes that we have in this configuration. If + * we have, we're in trouble. (maybe we ought to + * limit, instead of bugging?) + */ + if (numnodes > NR_NODES) + BUG(); + } + + /* + * Get the start and end pfns for this bank + */ + start = O_PFN_UP(mi->bank[i].start); + end = O_PFN_DOWN(mi->bank[i].start + mi->bank[i].size); + + if (np[node].start > start) + np[node].start = start; + + if (np[node].end < end) + np[node].end = end; + + if (memend_pfn < end) + memend_pfn = end; + } /* - * Initialise the boot-time allocator + * Calculate the number of pages we require to + * store the bootmem bitmaps. */ - init_bootmem_node(node, bootmap_pfn, start_pfn, end_pfn); + for (i = 0; i < numnodes; i++) { + if (np[i].end == 0) + continue; + + np[i].bootmap_pages = bootmem_bootmap_pages(np[i].end - + np[i].start); + bootmem_pages += np[i].bootmap_pages; + } /* - * Register all available RAM with the bootmem allocator. + * This doesn't seem to be used by the Linux memory + * manager any more. If we can get rid of it, we + * also get rid of some of the stuff above as well. */ - for (i = 0; i < mi->nr_banks; i++) - if (mi->bank[i].size) - free_bootmem_node(node, mi->bank[i].start, - PFN_SIZE(mi->bank[i].size) << PAGE_SHIFT); + max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); + mi->end = memend_pfn << PAGE_SHIFT; - reserve_bootmem_node(node, bootmap_pfn << PAGE_SHIFT, - bootmap_pages << PAGE_SHIFT); + return bootmem_pages; } -/* - * Initialise the bootmem allocator. - */ -void __init bootmem_init(struct meminfo *mi) +static int __init check_initrd(struct meminfo *mi) { - unsigned int i, node; + int initrd_node = -2; +#ifdef CONFIG_BLK_DEV_INITRD /* - * Calculate the physical address of the top of memory. - * Note that there are no guarantees assumed about the - * ordering of the bank information. + * Make sure that the initrd is within a valid area of + * memory. */ - mi->end = 0; - for (i = 0; i < mi->nr_banks; i++) { - unsigned long end; + if (initrd_start) { + unsigned long phys_initrd_start, phys_initrd_end; + unsigned int i; + + phys_initrd_start = __pa(initrd_start); + phys_initrd_end = __pa(initrd_end); - if (mi->bank[i].size != 0) { - end = mi->bank[i].start + mi->bank[i].size; - if (mi->end < end) - mi->end = end; + for (i = 0; i < mi->nr_banks; i++) { + unsigned long bank_end; + + bank_end = mi->bank[i].start + mi->bank[i].size; + + if (mi->bank[i].start <= phys_initrd_start && + phys_initrd_end <= bank_end) + initrd_node = mi->bank[i].node; } } - max_low_pfn = O_PFN_DOWN(mi->end - PHYS_OFFSET); + if (initrd_node == -1) { + printk(KERN_ERR "initrd (0x%08lx - 0x%08lx) extends beyond " + "physical memory - disabling initrd\n", + initrd_start, initrd_end); + initrd_start = initrd_end = 0; + } +#endif - /* - * Setup each node - */ - for (node = 0; node < numnodes; node++) - setup_bootmem_node(node, mi); + return initrd_node; +} +/* + * Reserve the various regions of node 0 + */ +static inline void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages) +{ /* * Register the kernel text and data with bootmem. * Note that this can only be in node 0. */ - reserve_bootmem_node(0, V_PFN_DOWN(&_stext) << PAGE_SHIFT, - PFN_RANGE(&_stext, &_end) << PAGE_SHIFT); + reserve_bootmem_node(0, __pa(&_stext), &_end - &_stext); #ifdef CONFIG_CPU_32 /* * Reserve the page tables. These are already in use, * and can only be in node 0. */ - reserve_bootmem_node(0, V_PFN_DOWN(swapper_pg_dir) << PAGE_SHIFT, - PFN_SIZE(PTRS_PER_PGD * sizeof(void *)) << PAGE_SHIFT); + reserve_bootmem_node(0, __pa(swapper_pg_dir), + PTRS_PER_PGD * sizeof(void *)); #endif -#ifdef CONFIG_BLK_DEV_INITRD /* - * This may be in any bank. Currently, we assume that - * it is in bank 0. + * And don't forget to reserve the allocator bitmap, + * which will be freed later. */ - if (initrd_start) - reserve_bootmem_node(0, V_PFN_DOWN(initrd_start) << PAGE_SHIFT, - PFN_RANGE(initrd_start, initrd_end) << PAGE_SHIFT); + reserve_bootmem_node(0, bootmap_pfn << PAGE_SHIFT, + bootmap_pages << PAGE_SHIFT); +} + +/* + * Register all available RAM in this node with the bootmem allocator. + */ +static inline void free_bootmem_node_bank(int node, struct meminfo *mi) +{ + int bank; + + for (bank = 0; bank < mi->nr_banks; bank++) + if (mi->bank[bank].node == node) + free_bootmem_node(node, mi->bank[bank].start, + mi->bank[bank].size); +} + +/* + * Initialise the bootmem allocator for all nodes. This is called + * early during the architecture specific initialisation. + */ +void __init bootmem_init(struct meminfo *mi) +{ + struct node_info node_info[NR_NODES], *np = node_info; + unsigned int bootmap_pages, bootmap_pfn, map_pg; + int node, initrd_node; + + bootmap_pages = find_memend_and_nodes(mi, np); + bootmap_pfn = find_bootmap_pfn(0, mi, bootmap_pages); + initrd_node = check_initrd(mi); + + map_pg = bootmap_pfn; + + for (node = 0; node < numnodes; node++, np++) { + /* + * If there are no pages in this node, ignore it. + * Note that node 0 must always have some pages. + */ + if (np->end == 0) { + if (node == 0) + BUG(); + continue; + } + + /* + * Initialise the bootmem allocator. + */ + init_bootmem_node(node, map_pg, np->start, np->end); + free_bootmem_node_bank(node, mi); + map_pg += np->bootmap_pages; + + /* + * If this is node 0, we need to reserve some areas ASAP - + * we may use bootmem on node 0 to setup the other nodes. + */ + if (node == 0) + reserve_node_zero(bootmap_pfn, bootmap_pages); + } + + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_node >= 0) + reserve_bootmem_node(initrd_node, __pa(initrd_start), + initrd_end - initrd_start); #endif + + if (map_pg != bootmap_pfn + bootmap_pages) + BUG(); } /* - * paging_init() sets up the page tables... + * paging_init() sets up the page tables, initialises the zone memory + * maps, and sets up the zero page, bad page and bad page tables. */ void __init paging_init(struct meminfo *mi) { @@ -378,11 +506,23 @@ void __init paging_init(struct meminfo *mi) * The size of this node has already been determined. * If we need to do anything fancy with the allocation * of this memory to the zones, now is the time to do - * it. For now, we don't touch zhole_size. + * it. */ zone_size[0] = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT); + /* + * For each bank in this node, calculate the size of the + * holes. holes = node_size - sum(bank_sizes_in_node) + */ + zhole_size[0] = zone_size[0]; + for (i = 0; i < mi->nr_banks; i++) { + if (mi->bank[i].node != node) + continue; + + zhole_size[0] -= mi->bank[i].size >> PAGE_SHIFT; + } + free_area_init_node(node, pgdat, zone_size, bdata->node_boot_start, zhole_size); } @@ -399,31 +539,6 @@ void __init paging_init(struct meminfo *mi) empty_bad_pte_table = ((pte_t *)bad_table) + TABLE_OFFSET; } -static inline void free_unused_mem_map(void) -{ - struct page *page, *end; - - end = mem_map + max_mapnr; - - for (page = mem_map; page < end; page++) { - unsigned long low, high; - - if (!PageSkip(page)) - continue; - - low = PAGE_ALIGN((unsigned long)(page + 1)); - if (page->next_hash < page) - high = ((unsigned long)end) & PAGE_MASK; - else - high = ((unsigned long)page->next_hash) & PAGE_MASK; - - while (low < high) { - ClearPageReserved(mem_map + MAP_NR(low)); - low += PAGE_SIZE; - } - } -} - /* * mem_init() marks the free areas in the mem_map and tells us how much * memory is free. This is done after various parts of the system have @@ -431,7 +546,6 @@ static inline void free_unused_mem_map(void) */ void __init mem_init(void) { - extern char __init_begin, __init_end; unsigned int codepages, datapages, initpages; int i, node; @@ -443,8 +557,7 @@ void __init mem_init(void) max_mapnr = MAP_NR(high_memory); /* - * We may have non-contiguous memory. Setup the PageSkip stuff, - * and mark the areas of mem_map which can be freed + * We may have non-contiguous memory. */ if (meminfo.nr_banks != 1) create_memmap_holes(&meminfo); @@ -500,8 +613,6 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s) void free_initmem(void) { - extern char __init_begin, __init_end; - printk("Freeing unused kernel memory:"); free_area((unsigned long)(&__init_begin), diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index f58bc66f5..34bd51366 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -411,50 +411,41 @@ void __init pagetable_init(struct meminfo *mi) } /* - * The mem_map array can get very big. Mark the end of the valid mem_map - * banks with PG_skip, and setup the address validity bitmap. + * The mem_map array can get very big. Free the unused area of the memory map. */ -void __init create_memmap_holes(struct meminfo *mi) +static inline void free_unused_memmap_node(int node, struct meminfo *mi) { - unsigned int start_pfn, end_pfn = -1; - struct page *pg = NULL; + unsigned long bank_start, prev_bank_end = 0; unsigned int i; -#define PFN(x) (((x) - PHYS_OFFSET) >> PAGE_SHIFT) -#define free_bootmem(s,sz) free_bootmem(((s)<<PAGE_SHIFT)+PHYS_OFFSET, (sz)<<PAGE_SHIFT) - + /* + * [FIXME] This relies on each bank being in address order. This + * may not be the case, especially if the user has provided the + * information on the command line. + */ for (i = 0; i < mi->nr_banks; i++) { - if (mi->bank[i].size == 0) + if (mi->bank[i].size == 0 || mi->bank[i].node != node) continue; - start_pfn = PFN(mi->bank[i].start); + bank_start = mi->bank[i].start & PAGE_MASK; /* - * subtle here - if we have a full bank, then - * start_pfn == end_pfn, and we don't want to - * set PG_skip, or next_hash + * If we had a previous bank, and there is a space + * between the current bank and the previous, free it. */ - if (pg && start_pfn != end_pfn) { - set_bit(PG_skip, &pg->flags); - pg->next_hash = mem_map + start_pfn; - - start_pfn = PFN(PAGE_ALIGN(__pa(pg + 1))); - end_pfn = PFN(__pa(pg->next_hash) & PAGE_MASK); + if (prev_bank_end && prev_bank_end != bank_start) + free_bootmem_node(node, prev_bank_end, + bank_start - prev_bank_end); - if (end_pfn != start_pfn) - free_bootmem(start_pfn, end_pfn - start_pfn); - - pg = NULL; - } - - end_pfn = PFN(mi->bank[i].start + mi->bank[i].size); - - if (end_pfn != PFN(mi->end)) - pg = mem_map + end_pfn; + prev_bank_end = PAGE_ALIGN(mi->bank[i].start + + mi->bank[i].size); } +} - if (pg) { - set_bit(PG_skip, &pg->flags); - pg->next_hash = NULL; - } +void __init create_memmap_holes(struct meminfo *mi) +{ + int node; + + for (node = 0; node < numnodes; node++) + free_unused_memmap_node(node, mi); } diff --git a/arch/arm/mm/mm-footbridge.c b/arch/arm/mm/mm-footbridge.c index b67cdec33..b11d55a1b 100644 --- a/arch/arm/mm/mm-footbridge.c +++ b/arch/arm/mm/mm-footbridge.c @@ -29,7 +29,7 @@ * You can then access the PCI bus at 0xe0000000 and 0xffe00000. */ -#ifdef CONFIG_HOST_FOOTBRIDGE +#ifdef CONFIG_FOOTBRIDGE_HOST /* * The mapping when the footbridge is in host mode. diff --git a/arch/arm/mm/mm-l7200.c b/arch/arm/mm/mm-l7200.c new file mode 100644 index 000000000..14dc5c6e4 --- /dev/null +++ b/arch/arm/mm/mm-l7200.c @@ -0,0 +1,25 @@ +/* + * arch/arm/mm/mm-lusl7200.c + * + * Extra MM routines for LUSL7200 architecture + * + * Copyright (C) 2000 Steven J. Hill + */ + +#include <linux/init.h> + +#include <asm/hardware.h> +#include <asm/page.h> +#include <asm/proc/domain.h> +#include <asm/setup.h> + +#include "map.h" + +#define SIZE(x) (sizeof(x) / sizeof(x[0])) + +struct map_desc io_desc[] __initdata = { + { IO_BASE, IO_START, IO_SIZE, DOMAIN_IO, 0, 1 ,0 ,0}, + { IO_BASE_2, IO_START_2, IO_SIZE_2, DOMAIN_IO, 0, 1 ,0 ,0}, +}; + +unsigned int __initdata io_desc_size = SIZE(io_desc); diff --git a/arch/arm/mm/mm-sa1100.c b/arch/arm/mm/mm-sa1100.c index 9d9306dd4..328364e56 100644 --- a/arch/arm/mm/mm-sa1100.c +++ b/arch/arm/mm/mm-sa1100.c @@ -11,13 +11,14 @@ * Memory is listed physically now. * * 2000/04/07 Nicolas Pitre <nico@cam.org> - * Reworked for real-time selection of memory definitions + * Reworked for run-time selection of memory definitions * */ #include <linux/config.h> #include <linux/mm.h> #include <linux/init.h> +#include <linux/bootmem.h> #include <asm/pgtable.h> #include <asm/page.h> @@ -44,7 +45,9 @@ static struct map_desc assabet_io_desc[] __initdata = { #ifdef CONFIG_SA1100_ASSABET { 0xd0000000, 0x00000000, 0x02000000, DOMAIN_IO, 1, 1, 0, 0 }, /* Flash bank 0 */ + { 0xd4000000, 0x10000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* System Registers */ { 0xdc000000, 0x12000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* Board Control Register */ + { 0xd8000000, 0x40000000, 0x00800000, DOMAIN_IO, 1, 1, 0, 0 }, /* SA-1111 */ SA1100_STD_IO_MAPPING #endif }; @@ -141,3 +144,20 @@ void __init select_sa1100_io_desc(void) } } +#ifdef CONFIG_DISCONTIGMEM + +/* + * Our node_data structure for discontigous memory. + * There is 4 possible nodes i.e. the 4 SA1100 RAM banks. + */ + +static bootmem_data_t node_bootmem_data[4]; + +pg_data_t sa1100_node_data[4] = +{ { bdata: &node_bootmem_data[0] }, + { bdata: &node_bootmem_data[1] }, + { bdata: &node_bootmem_data[2] }, + { bdata: &node_bootmem_data[3] } }; + +#endif + diff --git a/arch/arm/mm/proc-arm6,7.S b/arch/arm/mm/proc-arm6,7.S index c2f4f2346..5d7605b85 100644 --- a/arch/arm/mm/proc-arm6,7.S +++ b/arch/arm/mm/proc-arm6,7.S @@ -93,37 +93,30 @@ ENTRY(cpu_arm7_flush_tlb_page) * Purpose : obtain information about current aborted instruction * * Returns : r0 = address of abort - * : r1 = FSR - * : r2 != 0 if writing + * : r1 != 0 if writing + * : r3 = FSR * : sp = pointer to registers */ -Lukabttxt: .ascii "Unknown data abort code %d [pc=%p, *pc=%p] LR=%p\0" - .align - -msg: .ascii "DA*%p=%p\n\0" - .align - ENTRY(cpu_arm6_data_abort) ldr r4, [r0] @ read instruction causing problem - mov r2, r4, lsr #19 @ r2 b1 = L - and r1, r4, #14 << 24 - and r2, r2, #2 @ check read/write bit - teq r1, #4 << 23 + mov r1, r4, lsr #19 @ r1 b1 = L + and r2, r4, #14 << 24 + and r1, r1, #2 @ check read/write bit + teq r2, #8 << 24 @ was it ldm/stm bne Ldata_simple - Ldata_ldmstm: tst r4, #1 << 21 @ check writeback bit beq Ldata_simple mov r7, #0x11 orr r7, r7, r7, lsl #8 and r0, r4, r7 - and r1, r4, r7, lsl #1 - add r0, r0, r1, lsr #1 - and r1, r4, r7, lsl #2 - add r0, r0, r1, lsr #2 - and r1, r4, r7, lsl #3 - add r0, r0, r1, lsr #3 + and r2, r4, r7, lsl #1 + add r0, r0, r2, lsr #1 + and r2, r4, r7, lsl #2 + add r0, r0, r2, lsr #2 + and r2, r4, r7, lsl #3 + add r0, r0, r2, lsr #3 add r0, r0, r0, lsr #8 add r0, r0, r0, lsr #4 and r7, r0, #15 @ r7 = no. of registers to transfer. @@ -134,16 +127,16 @@ Ldata_ldmstm: tst r4, #1 << 21 @ check writeback bit addeq r7, r0, r7, lsl #2 @ Do correction (signed) Ldata_saver7: str r7, [sp, r5, lsr #14] @ Put register Ldata_simple: mrc p15, 0, r0, c6, c0, 0 @ get FAR - mrc p15, 0, r1, c5, c0, 0 @ get FSR - and r1, r1, #255 + mrc p15, 0, r3, c5, c0, 0 @ get FSR + and r3, r3, #255 mov pc, lr ENTRY(cpu_arm7_data_abort) ldr r4, [r0] @ read instruction causing problem - mov r2, r4, lsr #19 @ r2 b1 = L - and r1, r4, #15 << 24 - and r2, r2, #2 @ check read/write bit - add pc, pc, r1, lsr #22 @ Now branch to the relevent processing routine + mov r1, r4, lsr #19 @ r1 b1 = L + and r2, r4, #15 << 24 + and r1, r1, #2 @ check read/write bit + add pc, pc, r2, lsr #22 @ Now branch to the relevent processing routine movs pc, lr b Ldata_unknown @@ -162,7 +155,7 @@ ENTRY(cpu_arm7_data_abort) b Ldata_simple @ ldc rd, [rn, #m] b Ldata_unknown Ldata_unknown: @ Part of jumptable - mov r0, r1 + mov r0, r2 mov r1, r4 mov r2, r3 b baddataabort @@ -172,13 +165,13 @@ Ldata_lateldrpreconst: tst r4, #1 << 21 @ check writeback bit beq Ldata_simple Ldata_lateldrpostconst: - movs r1, r4, lsl #20 @ Get offset + movs r2, r4, lsl #20 @ Get offset beq Ldata_simple and r5, r4, #15 << 16 @ Get Rn ldr r0, [sp, r5, lsr #14] tst r4, #1 << 23 @ U bit - subne r7, r0, r1, lsr #20 - addeq r7, r0, r1, lsr #20 + subne r7, r0, r2, lsr #20 + addeq r7, r0, r2, lsr #20 b Ldata_saver7 Ldata_lateldrprereg: @@ -186,7 +179,7 @@ Ldata_lateldrprereg: beq Ldata_simple Ldata_lateldrpostreg: and r5, r4, #15 - ldr r1, [sp, r5, lsl #2] @ Get Rm + ldr r2, [sp, r5, lsl #2] @ Get Rm mov r3, r4, lsr #7 ands r3, r3, #31 and r6, r4, #0x70 @@ -194,7 +187,7 @@ Ldata_lateldrpostreg: add pc, pc, r6 mov r0, r0 - mov r1, r1, lsl r3 @ 0: LSL #!0 + mov r2, r2, lsl r3 @ 0: LSL #!0 b 1f b 1f @ 1: LSL #0 mov r0, r0 @@ -202,25 +195,25 @@ Ldata_lateldrpostreg: mov r0, r0 b 1f @ 3: MUL? mov r0, r0 - mov r1, r1, lsr r3 @ 4: LSR #!0 + mov r2, r2, lsr r3 @ 4: LSR #!0 b 1f - mov r1, r1, lsr #32 @ 5: LSR #32 + mov r2, r2, lsr #32 @ 5: LSR #32 b 1f b 1f @ 6: MUL? mov r0, r0 b 1f @ 7: MUL? mov r0, r0 - mov r1, r1, asr r3 @ 8: ASR #!0 + mov r2, r2, asr r3 @ 8: ASR #!0 b 1f - mov r1, r1, asr #32 @ 9: ASR #32 + mov r2, r2, asr #32 @ 9: ASR #32 b 1f b 1f @ A: MUL? mov r0, r0 b 1f @ B: MUL? mov r0, r0 - mov r1, r1, ror r3 @ C: ROR #!0 + mov r2, r2, ror r3 @ C: ROR #!0 b 1f - mov r1, r1, rrx @ D: RRX + mov r2, r2, rrx @ D: RRX b 1f mov r0, r0 @ E: MUL? mov r0, r0 @@ -230,8 +223,8 @@ Ldata_lateldrpostreg: 1: and r5, r4, #15 << 16 @ Get Rn ldr r0, [sp, r5, lsr #14] tst r4, #1 << 23 @ U bit - subne r7, r0, r1 - addeq r7, r0, r1 + subne r7, r0, r2 + addeq r7, r0, r2 b Ldata_saver7 /* @@ -254,7 +247,8 @@ ENTRY(cpu_arm7_proc_init) ENTRY(cpu_arm6_proc_fin) ENTRY(cpu_arm7_proc_fin) - msr cpsr_c, #F_BIT | I_BIT | SVC_MODE + mov r0, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, r0 mov r0, #0x31 @ ....S..DP...M mcr p15, 0, r0, c1, c0, 0 @ disable caches mov pc, lr @@ -364,7 +358,8 @@ cpu_arm710_name: .section ".text.init", #alloc, #execinstr -__arm6_setup: msr cpsr_c, #F_BIT | I_BIT | SVC_MODE +__arm6_setup: mov r0, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, r0 mov r0, #0 mcr p15, 0, r0, c7, c0 @ flush caches on v3 mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 @@ -375,7 +370,8 @@ __arm6_setup: msr cpsr_c, #F_BIT | I_BIT | SVC_MODE orr r0, r0, #0x100 mov pc, lr -__arm7_setup: msr cpsr_c, #F_BIT | I_BIT | SVC_MODE +__arm7_setup: mov r0, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, r0 mov r0, #0 mcr p15, 0, r0, c7, c0 @ flush caches on v3 mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S new file mode 100644 index 000000000..738ff9a43 --- /dev/null +++ b/arch/arm/mm/proc-arm720.S @@ -0,0 +1,398 @@ +/* + * linux/arch/arm/mm/proc-arm720.S: MMU functions for ARM720 + * + * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) + * Rob Scott (rscott@mtrob.fdns.net) + * + * These are the low level assembler for performing cache and TLB + * functions on the ARM720T. + * + * Changelog: + * 05-09-2000 SJH Created by moving 720 specific functions + * out of 'proc-arm6,7.S' per RSK discussion + */ +#include <linux/linkage.h> +#include <asm/assembler.h> +#include <asm/procinfo.h> +#include <asm/errno.h> +#include "../lib/constants.h" + +/* + * Function: arm720_flush_cache_all (void) + * : arm720_flush_cache_page (unsigned long address, int size, + * int flags) + * + * Params : address Area start address + * : size size of area + * : flags b0 = I cache as well + * + * Purpose : Flush all cache lines + */ +ENTRY(cpu_arm720_flush_cache_all) +ENTRY(cpu_arm720_flush_cache_area) +ENTRY(cpu_arm720_flush_cache_entry) +ENTRY(cpu_arm720_flush_icache_area) +ENTRY(cpu_arm720_flush_icache_page) +ENTRY(cpu_arm720_cache_wback_area) +ENTRY(cpu_arm720_cache_purge_area) + mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 @ flush cache + mov pc, lr + +ENTRY(cpu_arm720_clean_cache_area) +ENTRY(cpu_arm720_flush_ram_page) + mov pc, lr + +/* + * Function: arm720_flush_tlb_all (void) + * + * Purpose : flush all TLB entries in all caches + */ +ENTRY(cpu_arm720_flush_tlb_all) + mov r0, #0 + mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) + mov pc, lr + +/* + * Function: arm720_flush_tlb_page (unsigned long address, int end, int flags) + * + * Params : address Area start address + * : end Area end address + * : flags b0 = I cache as well + * + * Purpose : flush a TLB entry + */ +ENTRY(cpu_arm720_flush_tlb_area) +1: mcr p15, 0, r0, c8, c7, 1 @ flush TLB (v4) + add r0, r0, #4096 + cmp r0, r1 + blt 1b + mov pc, lr + +/* + * Function: arm720_flush_tlb_page (unsigned long address, int flags) + * + * Params : address Address + * : flags b0 = I-TLB as well + * + * Purpose : flush a TLB entry + */ +ENTRY(cpu_arm720_flush_tlb_page) + mcr p15, 0, r0, c8, c7, 1 @ flush TLB (v4) + mov pc, lr + +/* + * Function: arm720_data_abort () + * + * Params : r0 = address of aborted instruction + * + * Purpose : obtain information about current aborted instruction + * + * Returns : r0 = address of abort + * : r1 != 0 if writing + * : r3 = FSR + * : sp = pointer to registers + */ + +Ldata_ldmstm: tst r4, #1 << 21 @ check writeback bit + beq Ldata_simple + mov r7, #0x11 + orr r7, r7, r7, lsl #8 + and r0, r4, r7 + and r2, r4, r7, lsl #1 + add r0, r0, r2, lsr #1 + and r2, r4, r7, lsl #2 + add r0, r0, r2, lsr #2 + and r2, r4, r7, lsl #3 + add r0, r0, r2, lsr #3 + add r0, r0, r0, lsr #8 + add r0, r0, r0, lsr #4 + and r7, r0, #15 @ r7 = no. of registers to transfer. + and r5, r4, #15 << 16 @ Get Rn + ldr r0, [sp, r5, lsr #14] @ Get register + tst r4, #1 << 23 @ U bit + subne r7, r0, r7, lsl #2 + addeq r7, r0, r7, lsl #2 @ Do correction (signed) +Ldata_saver7: str r7, [sp, r5, lsr #14] @ Put register +Ldata_simple: mrc p15, 0, r0, c6, c0, 0 @ get FAR + mrc p15, 0, r3, c5, c0, 0 @ get FSR + and r3, r3, #15 + mov pc, lr + +ENTRY(cpu_arm720_data_abort) + ldr r4, [r0] @ read instruction causing problem + mov r1, r4, lsr #19 @ r1 b1 = L + and r2, r4, #15 << 24 + and r1, r1, #2 @ check read/write bit + add pc, pc, r2, lsr #22 @ Now branch to the relevent processing routine + movs pc, lr + + b Ldata_unknown + b Ldata_unknown + b Ldata_unknown + b Ldata_unknown + b Ldata_lateldrpostconst @ ldr rd, [rn], #m + b Ldata_lateldrpreconst @ ldr rd, [rn, #m] @ RegVal + b Ldata_lateldrpostreg @ ldr rd, [rn], rm + b Ldata_lateldrprereg @ ldr rd, [rn, rm] + b Ldata_ldmstm @ ldm*a rn, <rlist> + b Ldata_ldmstm @ ldm*b rn, <rlist> + b Ldata_unknown + b Ldata_unknown + b Ldata_simple @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m + b Ldata_simple @ ldc rd, [rn, #m] + b Ldata_unknown +Ldata_unknown: @ Part of jumptable + mov r0, r2 + mov r1, r4 + mov r2, r3 + b baddataabort + + +Ldata_lateldrpreconst: + tst r4, #1 << 21 @ check writeback bit + beq Ldata_simple +Ldata_lateldrpostconst: + movs r2, r4, lsl #20 @ Get offset + beq Ldata_simple + and r5, r4, #15 << 16 @ Get Rn + ldr r0, [sp, r5, lsr #14] + tst r4, #1 << 23 @ U bit + subne r7, r0, r2, lsr #20 + addeq r7, r0, r2, lsr #20 + b Ldata_saver7 + +Ldata_lateldrprereg: + tst r4, #1 << 21 @ check writeback bit + beq Ldata_simple +Ldata_lateldrpostreg: + and r5, r4, #15 + ldr r2, [sp, r5, lsl #2] @ Get Rm + mov r3, r4, lsr #7 + ands r3, r3, #31 + and r6, r4, #0x70 + orreq r6, r6, #8 + add pc, pc, r6 + mov r0, r0 + + mov r2, r2, lsl r3 @ 0: LSL #!0 + b 1f + b 1f @ 1: LSL #0 + mov r0, r0 + b 1f @ 2: MUL? + mov r0, r0 + b 1f @ 3: MUL? + mov r0, r0 + mov r2, r2, lsr r3 @ 4: LSR #!0 + b 1f + mov r2, r2, lsr #32 @ 5: LSR #32 + b 1f + b 1f @ 6: MUL? + mov r0, r0 + b 1f @ 7: MUL? + mov r0, r0 + mov r2, r2, asr r3 @ 8: ASR #!0 + b 1f + mov r2, r2, asr #32 @ 9: ASR #32 + b 1f + b 1f @ A: MUL? + mov r0, r0 + b 1f @ B: MUL? + mov r0, r0 + mov r2, r2, ror r3 @ C: ROR #!0 + b 1f + mov r2, r2, rrx @ D: RRX + b 1f + mov r0, r0 @ E: MUL? + mov r0, r0 + mov r0, r0 @ F: MUL? + + +1: and r5, r4, #15 << 16 @ Get Rn + ldr r0, [sp, r5, lsr #14] + tst r4, #1 << 23 @ U bit + subne r7, r0, r2 + addeq r7, r0, r2 + b Ldata_saver7 + +/* + * Function: arm720_check_bugs (void) + * : arm720_proc_init (void) + * : arm720_proc_fin (void) + * : arm720_proc_do_idle (void) + * + * Notes : This processor does not require these + */ +ENTRY(cpu_arm720_check_bugs) + mrs ip, cpsr + bic ip, ip, #F_BIT + msr cpsr, ip + mov pc, lr + +ENTRY(cpu_arm720_proc_init) + mov pc, lr + +ENTRY(cpu_arm720_proc_fin) + mrs r0, cpsr + orr r0, r0, #F_BIT | I_BIT + msr cpsr, r0 + mov r0, #0x31 @ ....S..DP...M + mcr p15, 0, r0, c1, c0, 0 @ disable caches + mov pc, lr + +ENTRY(cpu_arm720_do_idle) + mov r0, #-EINVAL + mov pc, lr + +/* + * Function: arm720_set_pgd(unsigned long pgd_phys) + * Params : pgd_phys Physical address of page table + * Purpose : Perform a task switch, saving the old process' state and restoring + * the new. + */ +ENTRY(cpu_arm720_set_pgd) + mov r1, #0 + mcr p15, 0, r1, c7, c7, 0 @ flush cache + mcr p15, 0, r0, c2, c0, 0 @ update page table ptr + mcr p15, 0, r1, c8, c7, 0 @ flush TLB (v4) + mov pc, lr + +/* + * Function: arm720_set_pmd () + * + * Params : r0 = Address to set + * : r1 = value to set + * + * Purpose : Set a PMD and flush it out of any WB cache + */ +ENTRY(cpu_arm720_set_pmd) + tst r1, #3 + orrne r1, r1, #16 @ Updatable bit is + str r1, [r0] @ always set on ARM720 + mov pc, lr + +/* + * Function: arm720_set_pte(pte_t *ptep, pte_t pte) + * Params : r0 = Address to set + * : r1 = value to set + * Purpose : Set a PTE and flush it out of any WB cache + */ + .align 5 +ENTRY(cpu_arm720_set_pte) + str r1, [r0], #-1024 @ linux version + + eor r1, r1, #LPTE_PRESENT | LPTE_YOUNG | LPTE_WRITE | LPTE_DIRTY + + bic r2, r1, #0xff0 + bic r2, r2, #3 + orr r2, r2, #HPTE_TYPE_SMALL + + tst r1, #LPTE_USER | LPTE_EXEC @ User or Exec? + orrne r2, r2, #HPTE_AP_READ + + tst r1, #LPTE_WRITE | LPTE_DIRTY @ Write and Dirty? + orreq r2, r2, #HPTE_AP_WRITE + + tst r1, #LPTE_PRESENT | LPTE_YOUNG @ Present and Young + movne r2, #0 + + str r2, [r0] @ hardware version + + mcr p15, 0, r0, c7, c7, 0 @ flush cache + mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) + mov pc, lr + +/* + * Function: arm720_reset + * Params : r0 = address to jump to + * Notes : This sets up everything for a reset + */ +ENTRY(cpu_arm720_reset) + mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 @ flush cache + mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) + mov pc, lr + + +cpu_armvlsi_name: + .asciz "ARM/VLSI" +cpu_arm720_name: + .asciz "ARM 720" + .align + + .section ".text.init", #alloc, #execinstr + +__arm720_setup: mov r0, #0 + mcr p15, 0, r0, c7, c7, 0 @ flush caches on v4 + mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) + mcr p15, 0, r4, c2, c0 @ load page table pointer + mov r0, #0x1f @ Domains 0, 1 = client + mcr p15, 0, r0, c3, c0 @ load domain access register + + /* Set CP15 Control reg bits (RSBLDPWCAM) */ + mov r0, #0x7d @ ...LDPWC.M + orr r0, r0, #0x100 @ .S.LDPWC.M + mov pc, lr @ __ret (head-armv.S) + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm720_processor_functions, #object +ENTRY(arm720_processor_functions) + .word cpu_arm720_data_abort + .word cpu_arm720_check_bugs + .word cpu_arm720_proc_init + .word cpu_arm720_proc_fin + .word cpu_arm720_flush_cache_all + .word cpu_arm720_flush_cache_area + .word cpu_arm720_flush_cache_entry + .word cpu_arm720_clean_cache_area + .word cpu_arm720_flush_ram_page + .word cpu_arm720_flush_tlb_all + .word cpu_arm720_flush_tlb_area + .word cpu_arm720_set_pgd + .word cpu_arm720_set_pmd + .word cpu_arm720_set_pte + .word cpu_arm720_reset + .word cpu_arm720_flush_icache_area + .word cpu_arm720_cache_wback_area + .word cpu_arm720_cache_purge_area + .word cpu_arm720_flush_tlb_page + .word cpu_arm720_do_idle + .word cpu_arm720_flush_icache_page + .size arm720_processor_functions, . - arm720_processor_functions + + .type cpu_arm720_info, #object +cpu_arm720_info: + .long cpu_armvlsi_name + .long cpu_arm720_name + .size cpu_arm720_info, . - cpu_arm720_info + + .type cpu_arch_name, #object +cpu_arch_name: .asciz "armv4" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: .asciz "v4" + .size cpu_elf_name, . - cpu_elf_name + .align + +/* + * See /include/asm-arm for a definition of this structure. + */ + + .section ".proc.info", #alloc, #execinstr + + .type __arm720_proc_info, #object +__arm720_proc_info: + .long 0x41807200 @ cpu_val + .long 0xffffff00 @ cpu_mask + .long 0x00000c12 @ __cpu_mmu_flags + b __arm720_setup @ --cpu_flush + .long cpu_arch_name @ arch_name + .long cpu_elf_name @ elf_name + .long HWCAP_SWP | HWCAP_26BIT @ elf_hwcap + .long cpu_arm720_info @ info + .long arm720_processor_functions + .size __arm720_proc_info, . - __arm720_proc_info diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index ac5d0735e..8c7a6b749 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S @@ -7,6 +7,9 @@ * functions on the StrongARM-110, StrongARM-1100 and StrongARM-1110. * * Note that SA1100 and SA1110 share everything but their name and CPU ID. + * + * 12-jun-2000, Erik Mouw (J.A.K.Mouw@its.tudelft.nl): + * Flush the read buffer at context switches */ #include <linux/linkage.h> #include <asm/assembler.h> @@ -82,6 +85,7 @@ cpu_sa1100_flush_cache_all_r2: mov ip, #0 teq r2, #0 mcrne p15, 0, ip, c7, c5, 0 @ flush I cache + mcr p15, 0, r1, c9, c0, 0 @ flush RB mcr p15, 0, ip, c7, c10, 4 @ drain WB mov pc, lr @@ -300,19 +304,18 @@ ENTRY(cpu_sa1100_flush_icache_page) * Params : r0 = address of aborted instruction * Purpose : obtain information about current aborted instruction * Returns : r0 = address of abort - * : r1 = FSR - * : r2 != 0 if writing + * : r1 != 0 if writing + * : r3 = FSR */ .align 5 ENTRY(cpu_sa110_data_abort) ENTRY(cpu_sa1100_data_abort) - ldr r2, [r0] @ read instruction causing problem + ldr r1, [r0] @ read instruction causing problem mrc p15, 0, r0, c6, c0, 0 @ get FAR - mov r2, r2, lsr #19 @ b1 = L - and r3, r2, #0x69 << 2 - and r2, r2, #2 - mrc p15, 0, r1, c5, c0, 0 @ get FSR - and r1, r1, #255 + mov r1, r1, lsr #19 @ b1 = L + and r1, r1, #2 + mrc p15, 0, r3, c5, c0, 0 @ get FSR + and r3, r3, #255 mov pc, lr .align 5 @@ -351,6 +354,7 @@ ENTRY(cpu_sa1100_set_pgd) flush_1100_dcache r3, ip, r1 mov r1, #0 mcr p15, 0, r1, c7, c5, 0 @ flush I cache + mcr p15, 0, r1, c9, c0, 0 @ flush RB mcr p15, 0, r1, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c8, c7, 0 @ flush TLBs @@ -423,7 +427,8 @@ ENTRY(cpu_sa1100_proc_init) ENTRY(cpu_sa110_proc_fin) stmfd sp!, {r1, lr} - msr cpsr_c, #F_BIT | I_BIT | SVC_MODE + mov ip, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, ip bl cpu_sa110_flush_cache_all @ clean caches 1: mov r0, #0 mcr p15, 0, r0, c15, c2, 2 @ Disable clock switching @@ -435,7 +440,8 @@ ENTRY(cpu_sa110_proc_fin) ENTRY(cpu_sa1100_proc_fin) stmfd sp!, {r1, lr} - msr cpsr_c, #F_BIT | I_BIT | SVC_MODE + mov ip, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, ip bl cpu_sa1100_flush_cache_all @ clean caches b 1b @@ -501,7 +507,11 @@ cpu_sa1110_name: .section ".text.init", #alloc, #execinstr -__sa110_setup: msr cpsr_c, #F_BIT | I_BIT | SVC_MODE +__sa1100_setup: @ Allow read-buffer operations from userland + mcr p15, 0, r0, c9, c0, 5 + +__sa110_setup: mov r0, #F_BIT | I_BIT | SVC_MODE + msr cpsr_c, r0 mov r0, #0 mcr p15, 0, r0, c7, c7 @ flush I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 @@ -623,7 +633,7 @@ __sa1100_proc_info: .long 0x4401a110 .long 0xfffffff0 .long 0x00000c02 - b __sa110_setup + b __sa1100_setup .long cpu_arch_name .long cpu_elf_name .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT @@ -636,7 +646,7 @@ __sa1110_proc_info: .long 0x6901b110 .long 0xfffffff0 .long 0x00000c02 - b __sa110_setup + b __sa1100_setup .long cpu_arch_name .long cpu_elf_name .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT |