Commit 96bb2d9e authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents 88e4bc32 9ed2c5a7
...@@ -836,3 +836,153 @@ CONFIG_DEBUG_BUGVERBOSE ...@@ -836,3 +836,153 @@ CONFIG_DEBUG_BUGVERBOSE
of the BUG call as well as the EIP and oops trace. This aids of the BUG call as well as the EIP and oops trace. This aids
debugging but costs about 70-100K of memory. debugging but costs about 70-100K of memory.
CONFIG_ZBOOT_ROM
Say Y here if you intend to execute your compressed kernel image (zImage)
directly from ROM or flash. If unsure, say N.
CONFIG_ZBOOT_ROM_TEXT
The base address for zImage. Unless you have special requirements, you
should not change this value.
CONFIG_ZBOOT_ROM_BSS
The base address of 64KiB of read/write memory, which must be available
while the decompressor is running. Unless you have special requirements,
you should not change this value.
CONFIG_CPU_FREQ
CPU clock scaling allows you to change the clock speed of the
running CPU on the fly. This is a nice method to save battery power,
because the lower the clock speed, the less power the CPU
consumes. Note that this driver doesn't automatically change the CPU
clock speed, you need some userland tools (which still have to be
written) to implement the policy. If you don't understand what this
is all about, it's safe to say 'N'.
CONFIG_ARCH_EDB7211
Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
evaluation board.
CONFIG_SA1100_H3100
Say Y here if you intend to run this kernel on the Compaq iPAQ
H3100 handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_SA1100_H3800
Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
series handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_H3600_SLEEVE
Choose this option to enable support for extension packs (sleeves)
for the Compaq iPAQ H3XXX series of handheld computers. This option
is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
packs.
CONFIG_SA1100_GRAPHICSMASTER
Say Y here if you are using an Applied Data Systems Intel(R)
StrongARM(R) SA-1100 based Graphics Master SBC with SA-1111
StrongARM companion chip. See
<http://www.applieddata.net/products_masterSpec.asp> for information
on this system.
CONFIG_SA1100_ADSBITSY
Say Y here if you are using Applied Data Systems Intel(R)
StrongARM(R) 1110 based Bitsy, 3 x 5 inches in size, Compaq - IPAQ -
like platform. See
<http://www.applieddata.net/products_bitsySpec.asp> for more
information.
CONFIG_SA1100_ITSY
Say Y here if you are using the Compaq Itsy experimental pocket
computer. See <http://research.compaq.com/wrl/projects/itsy/> for
more information.
CONFIG_SA1100_HUW_WEBPANEL
Say Y here to support the HuW Webpanel produced by Hoeft & Wessel
AG. English-language website is at
<http://www.hoeft-wessel.de/en.htm>; credits and build instructions
at Documentation/arm/SA1100/HUW_WEBPANEL.
CONFIG_SA1100_PLEB
Say Y here if you are using a Portable Linux Embedded Board
(also known as PLEB). See <http://www.cse.unsw.edu.au/~pleb/>
for more information.
CONFIG_SA1100_SHERMAN
Say Y here to support the Blazie Engineering `Sherman' StrongARM
1110-based SBC, used primarily in assistance products for the
visually impaired. The company is now Freedom Scientific, with
a website at <http://www.freedomscientific.com/index.html>. The
Sherman product, however, appears to have been discontinued.
CONFIG_SA1100_YOPY
Say Y here to support the Yopy PDA. Product information at
<http://www.yopy.com/>. See Documentation/arm/SA110/Yopy
for more.
CONFIG_SA1100_CERF_CPLD
Say Y here to support the Linux CerfPDA development kit from
Intrinsyc. This is a StrongARM-1110-based reference platform for
designing custom PDAs. Product info is at
<http://www.intrinsyc.com/products/referencedesigns/cerfpda.asp>.
CONFIG_SA1100_FREEBIRD
Support the FreeBird board used in Coventive embedded products. See
Documentation/arm/SA1100/Freebird for more.
CONFIG_SA1100_PT_SYSTEM3
Say Y here if you intend to build a kernel suitable to run on
a Pruftechnik Digital Board. For more information see
<http://www.pruftechnik.com>
CONFIG_CPU_ARM926T
This is a variant of the ARM920. It has slightly different
instruction sequences for cache and TLB operations. Curiously,
there is no documentation on it at the ARM corporate website.
Say Y if you want support for the ARM926T processor.
Otherwise, say N.
CONFIG_SA1100_JORNADA720
Say Y here if you want to build a kernel for the HP Jornada 720
handheld computer. See <http://www.hp.com/jornada/products/720>
for details.
CONFIG_SA1100_OMNIMETER
Say Y here if you are using the inhand electronics OmniMeter. See
<http://www.inhandelectronics.com/html/omni1.html> for details.
CONFIG_SA1100_SIMPAD
The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
like CL4 in additional it has a PCMCIA-Slot. For more information
visit <http://www.my-siemens.com or www.siemens.ch>.
CONFIG_ARCH_CDB89712
This is an evaluation board from Cirrus for the CS89712 processor.
The board includes 2 serial ports, Ethernet, IRDA, and expansion
headers. It comes with 16 MB SDRAM and 8 MB flash ROM.
CONFIG_ARCH_AUTCPU12
Say Y if you intend to run the kernel on the autronix autcpu12
board. This board is based on a Cirrus Logic CS89712.
CONFIG_EP72XX_ROM_BOOT
If you say Y here, your CLPS711x-based kernel will use the bootstrap
mode memory map instead of the normal memory map.
Processors derived from the Cirrus CLPS-711X core support two boot
modes. Normal mode boots from the external memory device at CS0.
Bootstrap mode rearranges parts of the memory map, placing an
internal 128 byte bootstrap ROM at CS0. This option performs the
address map changes required to support booting in this mode.
You almost surely want to say N here.
...@@ -5,31 +5,31 @@ ...@@ -5,31 +5,31 @@
# License. See the file "COPYING" in the main directory of this archive # License. See the file "COPYING" in the main directory of this archive
# for more details. # for more details.
# #
# Copyright (C) 1995-2000 Russell King # Copyright (C) 1995-2002 Russell King
# #
SYSTEM =$(TOPDIR)/vmlinux SYSTEM =$(TOPDIR)/vmlinux
ifeq ($(CONFIG_CPU_26),y) ifeq ($(CONFIG_CPU_26),y)
ZTEXTADDR = 0x02080000 ZRELADDR = 0x02080000
PARAMS_PHYS = 0x0207c000 PARAMS_PHYS = 0x0207c000
INITRD_PHYS = 0x02180000 INITRD_PHYS = 0x02180000
INITRD_VIRT = 0x02180000 INITRD_VIRT = 0x02180000
endif endif
ifeq ($(CONFIG_ARCH_RPC),y) ifeq ($(CONFIG_ARCH_RPC),y)
ZTEXTADDR = 0x10008000 ZRELADDR = 0x10008000
PARAMS_PHYS = 0x10000100 PARAMS_PHYS = 0x10000100
INITRD_PHYS = 0x18000000 INITRD_PHYS = 0x18000000
INITRD_VIRT = 0xc8000000 INITRD_VIRT = 0xc8000000
endif endif
ifeq ($(CONFIG_ARCH_CLPS7500),y) ifeq ($(CONFIG_ARCH_CLPS7500),y)
ZTEXTADDR = 0x10008000 ZRELADDR = 0x10008000
endif endif
ifeq ($(CONFIG_ARCH_EBSA110),y) ifeq ($(CONFIG_ARCH_EBSA110),y)
ZTEXTADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000400 PARAMS_PHYS = 0x00000400
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000 INITRD_VIRT = 0xc0800000
...@@ -41,41 +41,34 @@ ZRELADDR = 0x08008000 ...@@ -41,41 +41,34 @@ ZRELADDR = 0x08008000
endif endif
ifeq ($(CONFIG_FOOTBRIDGE),y) ifeq ($(CONFIG_FOOTBRIDGE),y)
ZTEXTADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100 PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000 INITRD_VIRT = 0xc0800000
endif endif
ifeq ($(CONFIG_ARCH_INTEGRATOR),y) ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
ZTEXTADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100 PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000 INITRD_VIRT = 0xc0800000
endif endif
ifeq ($(CONFIG_ARCH_CAMELOT),y) ifeq ($(CONFIG_ARCH_CAMELOT),y)
ZTEXTADDR = 0x00008000 ZRELADDR = 0x00008000
endif endif
ifeq ($(CONFIG_ARCH_NEXUSPCI),y) ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
ZTEXTADDR = 0x40008000 ZRELADDR = 0x40008000
endif endif
ifeq ($(CONFIG_ARCH_L7200),y) ifeq ($(CONFIG_ARCH_L7200),y)
# RAM based kernel
#ZTEXTADDR = 0xf0400000
#ZRELADDR = 0xf0008000
# FLASH based kernel
ZTEXTADDR = 0x00010000
ZRELADDR = 0xf0008000 ZRELADDR = 0xf0008000
ZBSSADDR = 0xf03e0000
endif endif
# The standard locations for stuff on CLPS711x type processors # The standard locations for stuff on CLPS711x type processors
ifeq ($(CONFIG_ARCH_CLPS711X),y) ifeq ($(CONFIG_ARCH_CLPS711X),y)
ZTEXTADDR = 0xc0028000 ZRELADDR = 0xc0028000
PARAMS_PHYS = 0xc0000100 PARAMS_PHYS = 0xc0000100
endif endif
...@@ -90,60 +83,40 @@ INITRD_VIRT = 0xc0300000 ...@@ -90,60 +83,40 @@ INITRD_VIRT = 0xc0300000
endif endif
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
ZTEXTADDR = 0xc0008000
ZRELADDR = 0xc0008000 ZRELADDR = 0xc0008000
ifeq ($(CONFIG_SA1100_VICTOR),y) # No defconfig file to move this into...
ZTEXTADDR = 0x00002000 #ifeq ($(CONFIG_SA1100_YOPY),y)
ZBSSADDR = 0xc0200000 # ZTEXTADDR = 0x00080000
endif # ZBSSADDR = 0xc0200000
ifeq ($(CONFIG_SA1100_SHERMAN),y) #endif
ZTEXTADDR = 0x00050000
ZBSSADDR = 0xc0200000
endif
ifeq ($(CONFIG_SA1100_GRAPHICSCLIENT),y)
ZTEXTADDR = 0xC0200000
endif
ifeq ($(CONFIG_SA1100_GRAPHICSMASTER),y)
ZTEXTADDR = 0xC0400000
endif
ifeq ($(CONFIG_SA1100_ADSBITSY),y)
ZTEXTADDR = 0xC0400000
endif
ifeq ($(CONFIG_SA1100_YOPY),y)
ZTEXTADDR = 0x00080000
ZBSSADDR = 0xc0200000
endif
ifeq ($(CONFIG_SA1111),y) ifeq ($(CONFIG_SA1111),y)
ZRELADDR = 0xc0208000 ZRELADDR = 0xc0208000
endif endif
endif endif
ifeq ($(CONFIG_ARCH_ANAKIN),y) ifeq ($(CONFIG_ARCH_ANAKIN),y)
ZTEXTADDR = 0x20008000 ZRELADDR = 0x20008000
endif endif
ifeq ($(CONFIG_ARCH_IQ80310),y) ifeq ($(CONFIG_ARCH_IQ80310),y)
ZRELADDR = 0xa0008000 ZRELADDR = 0xa0008000
# for serial upload
ZTEXTADDR = 0xa1008000
# for direct flash execution
# ZTEXTADDR = 0x00060000
# ZBSSADDR = 0xa1008000
endif endif
ifeq ($(CONFIG_ARCH_ADIFCC),y) ifeq ($(CONFIG_ARCH_ADIFCC),y)
ZRELADDR = 0xc0008000 ZRELADDR = 0xc0008000
ZTEXTADDR = 0xc1000000
endif endif
# #
# If you don't define ZRELADDR above, # We now have a PIC decompressor implementation. Decompressors running
# then it defaults to ZTEXTADDR # from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# #
ifeq ($(ZRELADDR),) ifeq ($(CONFIG_ZBOOT_ROM),y)
ZRELADDR = $(ZTEXTADDR) ZTEXTADDR =0x$(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR =0x$(CONFIG_ZBOOT_ROM_BSS)
else
ZTEXTADDR =0
ZBSSADDR =ALIGN(4)
endif endif
export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
HEAD = head.o HEAD = head.o
OBJS = misc.o OBJS = misc.o
CFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS $(CFLAGS_BOOT) CFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS $(CFLAGS_BOOT) -fpic
FONTC = $(TOPDIR)/drivers/video/font_acorn_8x8.c FONTC = $(TOPDIR)/drivers/video/font_acorn_8x8.c
ZLDFLAGS = -p -X -T vmlinux.lds ZLDFLAGS = -p -X -T vmlinux.lds
...@@ -65,13 +65,7 @@ ifeq ($(CONFIG_CPU_XSCALE),y) ...@@ -65,13 +65,7 @@ ifeq ($(CONFIG_CPU_XSCALE),y)
OBJS += head-xscale.o OBJS += head-xscale.o
endif endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/; SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/
ifneq ($(ZBSSADDR),)
SEDFLAGS += s/BSS_START/$(ZBSSADDR)/
else
SEDFLAGS += s/BSS_START/ALIGN(4)/
endif
LIBGCC := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) LIBGCC := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
/* This branch is taken if the CPU memory width matches the /* This branch is taken if the CPU memory width matches the
actual device in use. The default at power on is 16 bits actual device in use. The default at power on is 16 bits
so we must be prepared for a mismatch. */ so we must be prepared for a mismatch. */
.section ".start", #alloc, #execinstr .section ".start", "ax"
2: 2:
b 1f b 1f
.word 0xffff .word 0xffff
......
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/arch/excalibur.h> #include <asm/arch/excalibur.h>
.section ".start", #alloc, #execinstr .section ".start", "ax"
mov r7, #MACH_TYPE_CAMELOT mov r7, #MACH_TYPE_CAMELOT
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
.section ".start", #alloc, #execinstr .section ".start", "ax"
ftv_start: ftv_start:
mcr p15, 0, r0, c7, c5, 0 @ flush I cache mcr p15, 0, r0, c7, c5, 0 @ flush I cache
mrc p15, 0, r0, c1, c0 mrc p15, 0, r0, c1, c0
......
#include <asm/mach-types.h> #include <asm/mach-types.h>
.section ".start", #alloc, #execinstr .section ".start", "ax"
mov r7, #MACH_TYPE_INTEGRATOR mov r7, #MACH_TYPE_INTEGRATOR
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#error What am I doing here... #error What am I doing here...
#endif #endif
.section ".start", #alloc, #execinstr .section ".start", "ax"
__L7200_start: __L7200_start:
mov r0, #0x00100000 @ FLASH address of initrd mov r0, #0x00100000 @ FLASH address of initrd
......
/* /*
* linux/arch/arm/boot/compressed/head-netwinder.S * linux/arch/arm/boot/compressed/head-netwinder.S
* *
* Copyright (C) 2000 Russell King * Copyright (C) 2000-2002 Russell King
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#define K(a,b,c) ((a) << 24 | (b) << 12 | (c)) .section ".start", "ax"
.section ".start", #alloc, #execinstr mov r7, #5
mov r8, #0
/*
* check to see if we are running from the correct address.
* If not, we move ourselves in a two stage process. Firstly,
* we copy the start of the kernel (which includes this code)
* to 0x8000, and then jump to this code to continue with the
* rest (since this code will get overwritten).
*/
adr r2, 1f
ldmdb r2, {r9, r10}
and r3, r2, #0xc000
teq r3, #0x8000 @ correctly located?
beq 2f @ skip this code
bic r3, r2, #0xc000
orr r3, r3, #0x8000
mov r0, r3 @ new address if '1'
mov r4, #64 @ number of bytes to copy
sub r5, r10, r9 @ total number of bytes to copy
b 1f
.word _start
.word __bss_start
1:
.rept 4
ldmia r2!, {r6, r9, r10, r11}
stmia r3!, {r6, r9, r10, r11}
.endr
subs r4, r4, #64
bcs 1b
movs r4, r5 @ remaining length
mov r5, #0 @ no more to copy
movne pc, r0 @ jump back to 1 (in the newly copied
@ code)
mov r7, #5 @ only here to fix NeTTroms which dont
mov r8, #2 << 24 @ scheduled for removal in 2.5.xx
orr r8, r8, #5 << 12
2:
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
.section ".start", #alloc, #execinstr .section ".start", "ax"
__SA1100_start: __SA1100_start:
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <asm/assembler.h> #include <asm/assembler.h>
.section ".start", #alloc, #execinstr .section ".start", "ax"
b __beginning b __beginning
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
.section ".start", #alloc, #execinstr .section ".start", "ax"
__XScale_start: __XScale_start:
......
...@@ -132,10 +132,28 @@ not_angel: ...@@ -132,10 +132,28 @@ not_angel:
*/ */
.text .text
1: adr r2, LC0 adr r0, LC0
ldmia r2, {r2, r3, r4, r5, sp} ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp}
subs r0, r0, r1 @ calculate the delta offset
teq r0, #0 @ if delta is zero, we're
beq not_relocated @ running at the address we
@ were linked at.
add r2, r2, r0 @ different address, so we
add r3, r3, r0 @ need to fix up various
add r5, r5, r0 @ pointers.
add r6, r6, r0
add ip, ip, r0
add sp, sp, r0
1: ldr r1, [r6, #0] @ relocate entries in the GOT
add r1, r1, r0 @ table. This fixes up the
str r1, [r6], #4 @ C references.
cmp r6, ip
blt 1b
mov r0, #0 not_relocated: mov r0, #0
1: str r0, [r2], #4 @ clear bss 1: str r0, [r2], #4 @ clear bss
str r0, [r2], #4 str r0, [r2], #4
str r0, [r2], #4 str r0, [r2], #4
...@@ -149,17 +167,26 @@ not_angel: ...@@ -149,17 +167,26 @@ not_angel:
mov r1, sp @ malloc space above stack mov r1, sp @ malloc space above stack
add r2, sp, #0x10000 @ 64k max add r2, sp, #0x10000 @ 64k max
teq r4, r5 @ will we overwrite ourselves? /*
moveq r5, r2 @ decompress after image * Check to see if we will overwrite ourselves.
movne r5, r4 @ decompress to final location * r4 = final kernel address
* r5 = start of this image
* r2 = end of malloc space (and therefore this image)
* We basically want:
* r4 >= r2 -> OK
* r4 + image length <= r5 -> OK
*/
cmp r4, r2
bhs wont_overwrite
add r0, r4, #4096*1024 @ 4MB largest kernel size
cmp r0, r5
bls wont_overwrite
mov r5, r2 @ decompress after malloc space
mov r0, r5 mov r0, r5
mov r3, r7 mov r3, r7
bl SYMBOL_NAME(decompress_kernel) bl SYMBOL_NAME(decompress_kernel)
teq r4, r5 @ do we need to relocate
beq call_kernel @ the kernel?
add r0, r0, #127 add r0, r0, #127
bic r0, r0, #127 @ align the kernel length bic r0, r0, #127 @ align the kernel length
/* /*
...@@ -184,12 +211,26 @@ not_angel: ...@@ -184,12 +211,26 @@ not_angel:
bl cache_clean_flush bl cache_clean_flush
add pc, r5, r0 @ call relocation code add pc, r5, r0 @ call relocation code
/*
* We're not in danger of overwriting ourselves. Do this the simple way.
*
* r4 = kernel execution address
* r7 = architecture ID
*/
wont_overwrite: mov r0, r4
mov r3, r7
bl SYMBOL_NAME(decompress_kernel)
b call_kernel
.type LC0, #object .type LC0, #object
LC0: .word __bss_start LC0: .word LC0 @ r1
.word _end .word __bss_start @ r2
.word _load_addr .word _end @ r3
.word _start .word _load_addr @ r4
.word user_stack+4096 .word _start @ r5
.word _got_start @ r6
.word _got_end @ r7
.word user_stack+4096 @ r8
.size LC0, . - LC0 .size LC0, . - LC0
/* /*
...@@ -518,5 +559,5 @@ memdump: mov r12, r0 ...@@ -518,5 +559,5 @@ memdump: mov r12, r0
reloc_end: reloc_end:
.align .align
.section ".stack" .section ".stack", "aw"
user_stack: .space 4096 user_stack: .space 4096
...@@ -35,29 +35,26 @@ SECTIONS ...@@ -35,29 +35,26 @@ SECTIONS
_etext = .; _etext = .;
.data : { _got_start = .;
*(.data) .got : { *(.got) }
} _got_end = .;
.got.plt : { *(.got.plt) }
.data : { *(.data) }
_edata = .; _edata = .;
. = BSS_START; . = BSS_START;
__bss_start = .; __bss_start = .;
.bss : { .bss : { *(.bss) }
*(.bss)
}
_end = .; _end = .;
.stack : { .stack (NOLOAD) : { *(.stack) }
*(.stack)
}
.stab 0 : { *(.stab) } .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) } .stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) } .stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) } .stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) } .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) } .stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) } .comment 0 : { *(.comment) }
} }
...@@ -433,6 +433,12 @@ else ...@@ -433,6 +433,12 @@ else
define_bool CONFIG_FIQ n define_bool CONFIG_FIQ n
fi fi
# Compressed boot loader in ROM. Yes, we really want to ask about
# TEXT and BSS so we preserve their values in the config files.
bool 'Compressed boot loader in ROM/flash' CONFIG_ZBOOT_ROM
hex 'Compressed ROM boot loader base address' CONFIG_ZBOOT_ROM_TEXT 0
hex 'Compressed ROM boot loader BSS address' CONFIG_ZBOOT_ROM_BSS 0
if [ "$CONFIG_ARCH_SA1100" = "y" -o \ if [ "$CONFIG_ARCH_SA1100" = "y" -o \
"$CONFIG_ARCH_INTEGRATOR" = "y" ]; then "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
dep_bool 'Support CPU clock change (EXPERIMENTAL)' CONFIG_CPU_FREQ $CONFIG_EXPERIMENTAL dep_bool 'Support CPU clock change (EXPERIMENTAL)' CONFIG_CPU_FREQ $CONFIG_EXPERIMENTAL
......
...@@ -139,6 +139,9 @@ CONFIG_ARM_THUMB=y ...@@ -139,6 +139,9 @@ CONFIG_ARM_THUMB=y
# #
# General setup # General setup
# #
CONFIG_ZBOOT_ROM=y
CONFIG_ZBOOT_ROM_TEXT=0x00060000
CONFIG_ZBOOT_ROM_BSS=0xa1008000
CONFIG_PCI=y CONFIG_PCI=y
# CONFIG_ISA is not set # CONFIG_ISA is not set
# CONFIG_ISA_DMA is not set # CONFIG_ISA_DMA is not set
......
...@@ -23,6 +23,9 @@ CONFIG_CPU_32=y ...@@ -23,6 +23,9 @@ CONFIG_CPU_32=y
# CONFIG_CPU_26 is not set # CONFIG_CPU_26 is not set
CONFIG_CPU_32v4=y CONFIG_CPU_32v4=y
CONFIG_CPU_ARM720=y CONFIG_CPU_ARM720=y
CONFIG_ZBOOT_ROM=y
CONFIG_ZBOOT_ROM_TEXT=0x00010000
CONFIG_ZBOOT_ROM_BSS=0xf03e0000
# CONFIG_PCI is not set # CONFIG_PCI is not set
# CONFIG_ISA is not set # CONFIG_ISA is not set
# CONFIG_ISA_DMA is not set # CONFIG_ISA_DMA is not set
......
...@@ -47,6 +47,9 @@ CONFIG_MODULES=y ...@@ -47,6 +47,9 @@ CONFIG_MODULES=y
# #
# General setup # General setup
# #
CONFIG_ZBOOT_ROM=y
CONFIG_ZBOOT_ROM_TEXT=0x00050000
CONFIG_ZBOOT_ROM_BSS=0xc0200000
# CONFIG_NET is not set # CONFIG_NET is not set
# CONFIG_SYSVIPC is not set # CONFIG_SYSVIPC is not set
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
......
...@@ -46,6 +46,9 @@ CONFIG_MODULES=y ...@@ -46,6 +46,9 @@ CONFIG_MODULES=y
# #
# General setup # General setup
# #
CONFIG_ZBOOT_ROM=y
CONFIG_ZBOOT_ROM_TEXT=0x00002000
CONFIG_ZBOOT_ROM_BSS=0xc0200000
# CONFIG_NET is not set # CONFIG_NET is not set
# CONFIG_SYSVIPC is not set # CONFIG_SYSVIPC is not set
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h>
#include <asm/dma.h> #include <asm/dma.h>
......
...@@ -756,7 +756,6 @@ __irq_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -756,7 +756,6 @@ __irq_svc: sub sp, sp, #S_FRAME_SIZE
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
ldr r0, [r8, #TI_FLAGS] @ get flags ldr r0, [r8, #TI_FLAGS] @ get flags
tst r0, #_TIF_NEED_RESCHED tst r0, #_TIF_NEED_RESCHED
ldrne r6, .LCirq_stat
blne svc_preempt blne svc_preempt
preempt_return: preempt_return:
ldr r0, [r8, #TI_PREEMPT] @ read preempt value ldr r0, [r8, #TI_PREEMPT] @ read preempt value
...@@ -770,20 +769,20 @@ preempt_return: ...@@ -770,20 +769,20 @@ preempt_return:
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
svc_preempt: teq r9, #0 @ was preempt count = 0 svc_preempt: teq r9, #0 @ was preempt count = 0
ldreq r6, .LCirq_stat
movne pc, lr @ no movne pc, lr @ no
ldr r0, [r6, #4] @ local_irq_count ldr r0, [r6, #4] @ local_irq_count
ldr r1, [r6, #8] @ local_bh_count ldr r1, [r6, #8] @ local_bh_count
adds r0, r0, r1 adds r0, r0, r1
movne pc, lr movne pc, lr
ldr r1, [r8, #TI_TASK] mov r7, #PREEMPT_ACTIVE
set_cpsr_c r2, #MODE_SVC @ enable IRQs str r7, [r8, #TI_PREEMPT] @ set PREEMPT_ACTIVE
str r0, [r1, #0] @ current->state = TASK_RUNNING 1: set_cpsr_c r2, #MODE_SVC @ enable IRQs
1: bl SYMBOL_NAME(schedule) bl SYMBOL_NAME(schedule)
set_cpsr_c r0, #PSR_I_BIT | MODE_SVC @ disable IRQs set_cpsr_c r0, #PSR_I_BIT | MODE_SVC @ disable IRQs
ldr r0, [r8, #TI_FLAGS] ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS
tst r0, #_TIF_NEED_RESCHED tst r0, #_TIF_NEED_RESCHED
beq preempt_return beq preempt_return @ go again
set_cpsr_c r0, #MODE_SVC @ enable IRQs
b 1b b 1b
#endif #endif
......
...@@ -76,6 +76,9 @@ __do_notify_resume: ...@@ -76,6 +76,9 @@ __do_notify_resume:
* This is how we return from a fork. * This is how we return from a fork.
*/ */
ENTRY(ret_from_fork) ENTRY(ret_from_fork)
#ifdef CONFIG_PREEMPT
bl schedule_tail
#endif
get_thread_info tsk get_thread_info tsk
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
mov why, #1 mov why, #1
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/errno.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -73,7 +73,7 @@ void (*pm_power_off)(void); ...@@ -73,7 +73,7 @@ void (*pm_power_off)(void);
* This is our default idle handler. We need to disable * This is our default idle handler. We need to disable
* interrupts here to ensure we don't miss a wakeup call. * interrupts here to ensure we don't miss a wakeup call.
*/ */
static void default_idle(void) void default_idle(void)
{ {
__cli(); __cli();
if (!need_resched() && !hlt_counter) if (!need_resched() && !hlt_counter)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/errno.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/tlbflush.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
...@@ -255,7 +256,7 @@ static void __init setup_processor(void) ...@@ -255,7 +256,7 @@ static void __init setup_processor(void)
cpu_user = *list->user; cpu_user = *list->user;
#endif #endif
printk("Processor: %s %s revision %d\n", printk("CPU: %s %s revision %d\n",
proc_info.manufacturer, proc_info.cpu_name, proc_info.manufacturer, proc_info.cpu_name,
(int)processor_id & 15); (int)processor_id & 15);
......
...@@ -628,14 +628,12 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) ...@@ -628,14 +628,12 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
case SIGSTOP: { case SIGSTOP: {
struct signal_struct *sig; struct signal_struct *sig;
current->state = TASK_STOPPED;
current->exit_code = signr; current->exit_code = signr;
sig = current->parent->sig; sig = current->parent->sig;
preempt_disable();
current->state = TASK_STOPPED;
if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
notify_parent(current, SIGCHLD); notify_parent(current, SIGCHLD);
schedule(); schedule();
preempt_enable();
continue; continue;
} }
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/errno.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -26,11 +26,10 @@ ...@@ -26,11 +26,10 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/sizes.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#define MB1 1048576 /* one megabyte == size of an MMU section */
extern void clps711x_map_io(void); extern void clps711x_map_io(void);
/* /*
...@@ -56,12 +55,12 @@ static struct map_desc edb7211_io_desc[] __initdata = { ...@@ -56,12 +55,12 @@ static struct map_desc edb7211_io_desc[] __initdata = {
/* virtual, physical, length, domain, r, w, c, b */ /* virtual, physical, length, domain, r, w, c, b */
/* memory-mapped extra keyboard row and CS8900A Ethernet chip */ /* memory-mapped extra keyboard row and CS8900A Ethernet chip */
{ EP7211_VIRT_EXTKBD, EP7211_PHYS_EXTKBD, MB1, DOMAIN_IO, 0, 1, 0, 0 }, { EP7211_VIRT_EXTKBD, EP7211_PHYS_EXTKBD, SZ_1M, DOMAIN_IO, 0, 1, 0, 0 },
{ EP7211_VIRT_CS8900A, EP7211_PHYS_CS8900A, MB1, DOMAIN_IO, 0, 1, 0, 0 }, { EP7211_VIRT_CS8900A, EP7211_PHYS_CS8900A, SZ_1M, DOMAIN_IO, 0, 1, 0, 0 },
/* flash banks */ /* flash banks */
{ EP7211_VIRT_FLASH1, EP7211_PHYS_FLASH1, MB1 * 8, DOMAIN_KERNEL, 0, 1, 0, 0 }, { EP7211_VIRT_FLASH1, EP7211_PHYS_FLASH1, SZ_8M, DOMAIN_KERNEL, 0, 1, 0, 0 },
{ EP7211_VIRT_FLASH2, EP7211_PHYS_FLASH2, MB1 * 8, DOMAIN_KERNEL, 0, 1, 0, 0 }, { EP7211_VIRT_FLASH2, EP7211_PHYS_FLASH2, SZ_8M, DOMAIN_KERNEL, 0, 1, 0, 0 },
LAST_DESC LAST_DESC
}; };
......
...@@ -44,7 +44,7 @@ static pte_t *minicache_pte; ...@@ -44,7 +44,7 @@ static pte_t *minicache_pte;
unsigned long map_page_minicache(unsigned long virt) unsigned long map_page_minicache(unsigned long virt)
{ {
set_pte(minicache_pte, mk_pte_phys(__pa(virt), minicache_pgprot)); set_pte(minicache_pte, mk_pte_phys(__pa(virt), minicache_pgprot));
flush_kern_tlb_page(minicache_address); flush_tlb_kernel_page(minicache_address);
return minicache_address; return minicache_address;
} }
......
...@@ -723,7 +723,6 @@ ENTRY(xscale_processor_functions) ...@@ -723,7 +723,6 @@ ENTRY(xscale_processor_functions)
.word cpu_xscale_set_pgd .word cpu_xscale_set_pgd
.word cpu_xscale_set_pmd .word cpu_xscale_set_pmd
.word cpu_xscale_set_pte .word cpu_xscale_set_pte
.size xscale_processor_functions, . - xscale_processor_functions .size xscale_processor_functions, . - xscale_processor_functions
.type cpu_80200_info, #object .type cpu_80200_info, #object
...@@ -779,6 +778,5 @@ __pxa250_proc_info: ...@@ -779,6 +778,5 @@ __pxa250_proc_info:
.long xscale_processor_functions .long xscale_processor_functions
.long v4wbi_tlb_fns .long v4wbi_tlb_fns
.long v5te_mc_user_fns .long v5te_mc_user_fns
.size __cotulla_proc_info, . - __cotulla_proc_info
.size __pxa250_proc_info, . - __pxa250_proc_info .size __pxa250_proc_info, . - __pxa250_proc_info
...@@ -53,6 +53,7 @@ ENTRY(v3_flush_user_tlb_range) ...@@ -53,6 +53,7 @@ ENTRY(v3_flush_user_tlb_range)
act_mm r3 @ get current->active_mm act_mm r3 @ get current->active_mm
teq r2, r3 @ == mm ? teq r2, r3 @ == mm ?
movne pc, lr @ no, we dont do anything movne pc, lr @ no, we dont do anything
ENTRY(v3_flush_kern_tlb_range)
bic r0, r0, #0x0ff bic r0, r0, #0x0ff
bic r0, r0, #0xf00 bic r0, r0, #0xf00
1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry 1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry
...@@ -87,5 +88,6 @@ ENTRY(v3_tlb_fns) ...@@ -87,5 +88,6 @@ ENTRY(v3_tlb_fns)
.long v3_flush_user_tlb_mm .long v3_flush_user_tlb_mm
.long v3_flush_user_tlb_range .long v3_flush_user_tlb_range
.long v3_flush_user_tlb_page .long v3_flush_user_tlb_page
.long v3_flush_kern_tlb_range
.long v3_flush_kern_tlb_page .long v3_flush_kern_tlb_page
.size v3_tlb_fns, . - v3_tlb_fns .size v3_tlb_fns, . - v3_tlb_fns
...@@ -42,7 +42,7 @@ ENTRY(v4_flush_kern_tlb_all) ...@@ -42,7 +42,7 @@ ENTRY(v4_flush_kern_tlb_all)
/* /*
* v4_flush_user_tlb_range(start, end, mm) * v4_flush_user_tlb_range(start, end, mm)
* *
* Invalidate a range of TLB entries in the specified address space. * Invalidate a range of TLB entries in the specified user address space.
* *
* - start - range start address * - start - range start address
* - end - range end address * - end - range end address
...@@ -85,6 +85,27 @@ ENTRY(v4_flush_user_tlb_page) ...@@ -85,6 +85,27 @@ ENTRY(v4_flush_user_tlb_page)
mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mov pc, lr mov pc, lr
/*
* v4_flush_kerm_tlb_range(start, end)
*
* Invalidate a range of TLB entries in the specified kernel
* address range.
*
* - start - virtual address (may not be aligned)
* - end - virtual address (may not be aligned)
*/
.align 5
ENTRY(v4_flush_kern_tlb_range)
bic r0, r0, #0x0ff
bic r0, r0, #0xf00
1: mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
mcr p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mov pc, lr
/* /*
* v4_flush_kern_tlb_page(kaddr) * v4_flush_kern_tlb_page(kaddr)
* *
...@@ -106,5 +127,6 @@ ENTRY(v4_tlb_fns) ...@@ -106,5 +127,6 @@ ENTRY(v4_tlb_fns)
.long v4_flush_user_tlb_mm .long v4_flush_user_tlb_mm
.long v4_flush_user_tlb_range .long v4_flush_user_tlb_range
.long v4_flush_user_tlb_page .long v4_flush_user_tlb_page
.long v4_flush_kern_tlb_range
.long v4_flush_kern_tlb_page .long v4_flush_kern_tlb_page
.size v4_tlb_fns, . - v4_tlb_fns .size v4_tlb_fns, . - v4_tlb_fns
...@@ -88,7 +88,41 @@ ENTRY(v4wb_flush_user_tlb_page) ...@@ -88,7 +88,41 @@ ENTRY(v4wb_flush_user_tlb_page)
mcr p15, 0, r3, c7, c10, 4 @ drain WB mcr p15, 0, r3, c7, c10, 4 @ drain WB
tst r2, #VM_EXEC tst r2, #VM_EXEC
mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
mov pc, lr
/*
* v4_flush_kerm_tlb_range(start, end)
*
* Invalidate a range of TLB entries in the specified kernel
* address range.
*
* - start - virtual address (may not be aligned)
* - end - virtual address (may not be aligned)
*/
ENTRY(v4wb_flush_kern_tlb_range)
mov r3, #0
mcr p15, 0, r3, c7, c10, 4 @ drain WB
bic r0, r0, #0x0ff
bic r0, r0, #0xf00
mcr p15, 0, r3, c8, c5, 0 @ invalidate I TLB
1: mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
mov pc, lr
/*
* v4_flush_kern_tlb_page(kaddr)
*
* Invalidate the TLB entry for the specified page. The address
* will be in the kernels virtual memory space. Current uses
* only require the D-TLB to be invalidated.
*
* - kaddr - Kernel virtual memory address
*/
ENTRY(v4wb_flush_kern_tlb_page) ENTRY(v4wb_flush_kern_tlb_page)
mcr p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
mov pc, lr mov pc, lr
...@@ -107,14 +141,17 @@ ENTRY(v4wb_flush_kern_tlb_page) ...@@ -107,14 +141,17 @@ ENTRY(v4wb_flush_kern_tlb_page)
*/ */
.align 5 .align 5
ENTRY(v4wbi_flush_user_tlb_range) ENTRY(v4wbi_flush_user_tlb_range)
vma_vm_mm ip, r2
act_mm r3 @ get current->active_mm act_mm r3 @ get current->active_mm
teq r2, r3 @ == mm ? eors r3, ip, r3 @ == mm ?
movne pc, lr @ no, we dont do anything movne pc, lr @ no, we dont do anything
mov r3, #0 mov r3, #0
mcr p15, 0, r3, c7, c10, 4 @ drain WB mcr p15, 0, r3, c7, c10, 4 @ drain WB
vma_vm_flags r2, r2
bic r0, r0, #0x0ff bic r0, r0, #0x0ff
bic r0, r0, #0xf00 bic r0, r0, #0xf00
1: mcr p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry 1: tst r2, #VM_EXEC
mcrne p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
add r0, r0, #PAGE_SZ add r0, r0, #PAGE_SZ
cmp r0, r1 cmp r0, r1
...@@ -140,7 +177,23 @@ ENTRY(v4wbi_flush_user_tlb_page) ...@@ -140,7 +177,23 @@ ENTRY(v4wbi_flush_user_tlb_page)
mcr p15, 0, r3, c7, c10, 4 @ drain WB mcr p15, 0, r3, c7, c10, 4 @ drain WB
tst r2, #VM_EXEC tst r2, #VM_EXEC
mcrne p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry mcrne p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
mov pc, lr
ENTRY(v4wbi_flush_kern_tlb_range)
mov r3, #0
mcr p15, 0, r3, c7, c10, 4 @ drain WB
bic r0, r0, #0x0ff
bic r0, r0, #0xf00
1: mcr p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
mov pc, lr
ENTRY(v4wbi_flush_kern_tlb_page) ENTRY(v4wbi_flush_kern_tlb_page)
mcr p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
mov pc, lr mov pc, lr
...@@ -152,6 +205,7 @@ ENTRY(v4wb_tlb_fns) ...@@ -152,6 +205,7 @@ ENTRY(v4wb_tlb_fns)
.long v4wb_flush_user_tlb_mm .long v4wb_flush_user_tlb_mm
.long v4wb_flush_user_tlb_range .long v4wb_flush_user_tlb_range
.long v4wb_flush_user_tlb_page .long v4wb_flush_user_tlb_page
.long v4wb_flush_kern_tlb_range
.long v4wb_flush_kern_tlb_page .long v4wb_flush_kern_tlb_page
.size v4wb_tlb_fns, . - v4wb_tlb_fns .size v4wb_tlb_fns, . - v4wb_tlb_fns
...@@ -161,5 +215,6 @@ ENTRY(v4wbi_tlb_fns) ...@@ -161,5 +215,6 @@ ENTRY(v4wbi_tlb_fns)
.long v4wbi_flush_user_tlb_mm .long v4wbi_flush_user_tlb_mm
.long v4wbi_flush_user_tlb_range .long v4wbi_flush_user_tlb_range
.long v4wbi_flush_user_tlb_page .long v4wbi_flush_user_tlb_page
.long v4wbi_flush_kern_tlb_range
.long v4wbi_flush_kern_tlb_page .long v4wbi_flush_kern_tlb_page
.size v4wbi_tlb_fns, . - v4wbi_tlb_fns .size v4wbi_tlb_fns, . - v4wbi_tlb_fns
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/config.h> #include <linux/config.h>
/* XXX */ /* XXX */
#include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/signal.h> #include <linux/signal.h>
......
...@@ -71,6 +71,7 @@ sa1100_cs-objs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o sa1111_generic.o ...@@ -71,6 +71,7 @@ sa1100_cs-objs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o
sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o
sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o
sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
......
...@@ -237,6 +237,9 @@ extern void pcmcia_stork_exit(void); ...@@ -237,6 +237,9 @@ extern void pcmcia_stork_exit(void);
extern int pcmcia_system3_init(void); extern int pcmcia_system3_init(void);
extern void pcmcia_system3_exit(void); extern void pcmcia_system3_exit(void);
extern int pcmcia_trizeps_init(void);
extern void pcmcia_trizeps_exit(void);
extern int pcmcia_xp860_init(void); extern int pcmcia_xp860_init(void);
extern void pcmcia_xp860_exit(void); extern void pcmcia_xp860_exit(void);
......
...@@ -1180,6 +1180,9 @@ static int __init sa1100_pcmcia_init(void) ...@@ -1180,6 +1180,9 @@ static int __init sa1100_pcmcia_init(void)
#ifdef CONFIG_SA1100_STORK #ifdef CONFIG_SA1100_STORK
pcmcia_stork_init(); pcmcia_stork_init();
#endif #endif
#ifdef CONFIG_SA1100_TRIZEPS
pcmcia_trizeps_init();
#endif
#ifdef CONFIG_SA1100_XP860 #ifdef CONFIG_SA1100_XP860
pcmcia_xp860_init(); pcmcia_xp860_init();
#endif #endif
......
/*
* drivers/pcmcia/sa1100_trizeps.c
*
* PCMCIA implementation routines for Trizeps
*
* Authors:
* Andreas Hofer <ho@dsa-ac.de>,
* Peter Lueg <pl@dsa-ac.de>,
* Guennadi Liakhovetski <gl@dsa-ac.de>
*
*/
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <asm/hardware.h> // included trizeps.h
#include <asm/system.h>
#include <asm/irq.h>
#include "sa1100_generic.h"
#define NUMBER_OF_TRIZEPS_PCMCIA_SLOTS 1
/**
*
*
******************************************************/
static int trizeps_pcmcia_init(struct pcmcia_init *init)
{
int res;
/* Enable CF bus: */
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_nPCM_ENA_REG);
/* All those are inputs */
GPDR &= ~((GPIO_GPIO(TRIZEPS_GPIO_PCMCIA_CD0))
| (GPIO_GPIO(TRIZEPS_GPIO_PCMCIA_IRQ0)));
/* Set transition detect */
// set_irq_type(SA1100_GPIO_TO_IRQ(GPIO_TRIZEPS_PCMCIA_CD0), IRQT_BOTHEDGE);
set_irq_type(TRIZEPS_IRQ_PCMCIA_IRQ0, IRQT_FALLING);
/* Register SOCKET interrupts */
/* WHY? */
set_irq_type(TRIZEPS_IRQ_PCMCIA_CD0, IRQT_NOEDGE);
res = request_irq( TRIZEPS_IRQ_PCMCIA_CD0, init->handler, SA_INTERRUPT, "PCMCIA_CD0", NULL );
if( res < 0 ) goto irq_err;
//MECR = 0x00060006; // Initialised on trizeps init
// return=sa1100_pcmcia_socket_count (sa1100_generic.c)
// -> number of PCMCIA Slots
// Slot 0 -> Trizeps PCMCIA
// Slot 1 -> Trizeps ISA-Bus
return NUMBER_OF_TRIZEPS_PCMCIA_SLOTS;
irq_err:
printk( KERN_ERR __FUNCTION__ ": PCMCIA Request for IRQ %u failed\n", TRIZEPS_IRQ_PCMCIA_CD0 );
return -1;
}
/**
*
*
******************************************************/
static int trizeps_pcmcia_shutdown(void)
{
printk(">>>>>PCMCIA TRIZEPS shutdown\n");
/* disable IRQs */
free_irq(TRIZEPS_IRQ_PCMCIA_CD0, NULL );
/* Disable CF bus: */
TRIZEPS_BCR_set(TRIZEPS_BCR1, TRIZEPS_nPCM_ENA_REG);
return 0;
}
/**
*
******************************************************/
static int trizeps_pcmcia_socket_state(struct pcmcia_state_array
*state_array){
unsigned long levels;
if (state_array->size < NUMBER_OF_TRIZEPS_PCMCIA_SLOTS) return -1;
memset(state_array->state, 0,
(state_array->size)*sizeof(struct pcmcia_state));
levels = GPLR;
state_array->state[0].detect = ((levels & GPIO_GPIO(TRIZEPS_GPIO_PCMCIA_CD0)) == 0) ? 1 : 0;
state_array->state[0].ready = ((levels & GPIO_GPIO(TRIZEPS_GPIO_PCMCIA_IRQ0)) != 0) ? 1 : 0;
state_array->state[0].bvd1 = ((TRIZEPS_BCR1 & TRIZEPS_PCM_BVD1) !=0 ) ? 1 : 0;
state_array->state[0].bvd2 = ((TRIZEPS_BCR1 & TRIZEPS_PCM_BVD2) != 0) ? 1 : 0;
state_array->state[0].wrprot = 0; // not write protected
state_array->state[0].vs_3v = ((TRIZEPS_BCR1 & TRIZEPS_nPCM_VS1) == 0) ? 1 : 0; //VS1=0 -> vs_3v=1
state_array->state[0].vs_Xv = ((TRIZEPS_BCR1 & TRIZEPS_nPCM_VS2) == 0) ? 1 : 0; //VS2=0 -> vs_Xv=1
return 1; // success
}
/**
*
*
******************************************************/
static int trizeps_pcmcia_get_irq_info(struct pcmcia_irq_info *info){
switch (info->sock) {
case 0:
info->irq=TRIZEPS_IRQ_PCMCIA_IRQ0;
break;
case 1:
// MFTB2 use only one Slot
default:
return -1;
}
return 0;
}
/**
*
*
******************************************************/
static int trizeps_pcmcia_configure_socket(const struct pcmcia_configure *configure)
{
unsigned long flags;
if(configure->sock>1) return -1;
local_irq_save(flags);
switch (configure->vcc) {
case 0:
printk(">>> PCMCIA Power off\n");
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_PCM_V3_EN_REG);
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_PCM_V5_EN_REG);
break;
case 33:
// 3.3V Power on
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_PCM_V3_EN_REG);
TRIZEPS_BCR_set(TRIZEPS_BCR1, TRIZEPS_PCM_V5_EN_REG);
break;
case 50:
// 5.0V Power on
TRIZEPS_BCR_set(TRIZEPS_BCR1, TRIZEPS_PCM_V3_EN_REG);
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_PCM_V5_EN_REG);
break;
default:
printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__,
configure->vcc);
local_irq_restore(flags);
return -1;
}
if (configure->reset)
TRIZEPS_BCR_set(TRIZEPS_BCR1, TRIZEPS_nPCM_RESET_DISABLE); // Reset
else
TRIZEPS_BCR_clear(TRIZEPS_BCR1, TRIZEPS_nPCM_RESET_DISABLE); // no Reset
/*
printk(" vcc=%u vpp=%u -->reset=%i\n",
configure->vcc,
configure->vpp,
((BCR_read(1) & nPCM_RESET_DISABLE)? 1:0));
*/
local_irq_restore(flags);
if (configure->irq) {
enable_irq(TRIZEPS_IRQ_PCMCIA_CD0);
enable_irq(TRIZEPS_IRQ_PCMCIA_IRQ0);
} else {
disable_irq(TRIZEPS_IRQ_PCMCIA_IRQ0);
disable_irq(TRIZEPS_IRQ_PCMCIA_CD0);
}
return 0;
}
static int trizeps_pcmcia_socket_init(int sock)
{
return 0;
}
static int trizeps_pcmcia_socket_suspend(int sock)
{
return 0;
}
/**
* low-level PCMCIA interface
*
******************************************************/
struct pcmcia_low_level trizeps_pcmcia_ops = {
init: trizeps_pcmcia_init,
shutdown: trizeps_pcmcia_shutdown,
socket_state: trizeps_pcmcia_socket_state,
get_irq_info: trizeps_pcmcia_get_irq_info,
configure_socket: trizeps_pcmcia_configure_socket,
socket_init: trizeps_pcmcia_socket_init,
socket_suspend: trizeps_pcmcia_socket_suspend,
};
int __init pcmcia_trizeps_init(void)
{
if (machine_is_trizeps()) {
return sa1100_register_pcmcia(&trizeps_pcmcia_ops);
}
return -ENODEV;
}
void __exit pcmcia_trizeps_exit(void)
{
sa1100_unregister_pcmcia(&trizeps_pcmcia_ops);
}
...@@ -180,7 +180,7 @@ anakinfb_init(void) ...@@ -180,7 +180,7 @@ anakinfb_init(void)
{ {
memset(&fb_info, 0, sizeof(struct fb_info)); memset(&fb_info, 0, sizeof(struct fb_info));
strcpy(fb_info.modename, "AnakinFB"); strcpy(fb_info.modename, "AnakinFB");
fb_info.node = -1; fb_info.node = NODEV;
fb_info.flags = FBINFO_FLAG_DEFAULT; fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.fbops = &anakinfb_ops; fb_info.fbops = &anakinfb_ops;
fb_info.disp = &display; fb_info.disp = &display;
...@@ -192,7 +192,12 @@ anakinfb_init(void) ...@@ -192,7 +192,12 @@ anakinfb_init(void)
memset(&display, 0, sizeof(struct display)); memset(&display, 0, sizeof(struct display));
anakinfb_get_var(&display.var, 0, &fb_info); anakinfb_get_var(&display.var, 0, &fb_info);
display.screen_base = ioremap(VGA_START, VGA_SIZE); if (!(request_mem_region(VGA_START, VGA_SIZE, "vga")))
return -ENOMEM;
if (!(display.screen_base = ioremap(VGA_START, VGA_SIZE))) {
release_mem_region(VGA_START, VGA_SIZE);
return -EIO;
}
display.visual = FB_VISUAL_TRUECOLOR; display.visual = FB_VISUAL_TRUECOLOR;
display.type = FB_TYPE_PACKED_PIXELS; display.type = FB_TYPE_PACKED_PIXELS;
display.type_aux = 0; display.type_aux = 0;
...@@ -209,8 +214,11 @@ anakinfb_init(void) ...@@ -209,8 +214,11 @@ anakinfb_init(void)
display.dispsw = &fbcon_dummy; display.dispsw = &fbcon_dummy;
#endif #endif
if (register_framebuffer(&fb_info) < 0) if (register_framebuffer(&fb_info) < 0) {
iounmap(display.screen_base);
release_mem_region(VGA_START, VGA_SIZE);
return -EINVAL; return -EINVAL;
}
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
return 0; return 0;
......
/*
* linux/include/asm-arm/cacheflush.h
*
* Copyright (C) 2000-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _ASMARM_CACHEFLUSH_H
#define _ASMARM_CACHEFLUSH_H
#include <asm/proc/cache.h>
#endif
...@@ -272,7 +272,7 @@ extern void consistent_sync(void *vaddr, size_t size, int rw); ...@@ -272,7 +272,7 @@ extern void consistent_sync(void *vaddr, size_t size, int rw);
/* /*
* Change "struct page" to physical address. * Change "struct page" to physical address.
*/ */
#ifdef CONFIG_DISCONTIG #ifdef CONFIG_DISCONTIGMEM
#define page_to_phys(page) \ #define page_to_phys(page) \
((((page) - page_zone(page)->zone_mem_map) << PAGE_SHIFT) \ ((((page) - page_zone(page)->zone_mem_map) << PAGE_SHIFT) \
+ page_zone(page)->zone_start_paddr) + page_zone(page)->zone_start_paddr)
......
...@@ -10,11 +10,10 @@ ...@@ -10,11 +10,10 @@
#ifndef _ASMARM_PGALLOC_H #ifndef _ASMARM_PGALLOC_H
#define _ASMARM_PGALLOC_H #define _ASMARM_PGALLOC_H
#include <linux/config.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/proc/cache.h>
#include <asm/proc/pgalloc.h> #include <asm/proc/pgalloc.h>
/* /*
......
...@@ -27,66 +27,3 @@ ...@@ -27,66 +27,3 @@
/* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */ /* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */
#define clean_cache_area(_start,_size) do { } while (0) #define clean_cache_area(_start,_size) do { } while (0)
/*
* TLB flushing:
*
* - flush_tlb_all() flushes all processes TLBs
* - flush_tlb_mm(mm) flushes the specified mm context TLB's
* - flush_tlb_page(vma, vmaddr) flushes one page
* - flush_tlb_range(vma, start, end) flushes a range of pages
*/
#define flush_tlb_all() memc_update_all()
#define flush_tlb_mm(mm) memc_update_mm(mm)
#define flush_tlb_range(vma,start,end) \
do { memc_update_mm(vma->vm_mm); (void)(start); (void)(end); } while (0)
#define flush_tlb_page(vma, vmaddr) do { } while (0)
/*
* The following handle the weird MEMC chip
*/
static inline void memc_update_all(void)
{
struct task_struct *p;
cpu_memc_update_all(init_mm.pgd);
for_each_task(p) {
if (!p->mm)
continue;
cpu_memc_update_all(p->mm->pgd);
}
processor._set_pgd(current->active_mm->pgd);
}
static inline void memc_update_mm(struct mm_struct *mm)
{
cpu_memc_update_all(mm->pgd);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
memc_clear(struct mm_struct *mm, struct page *page)
{
cpu_memc_update_entry(mm->pgd, (unsigned long) page_address(page), 0);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr)
{
cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
{
struct mm_struct *mm = vma->vm_mm;
memc_update_addr(mm, pte, addr);
}
/*
* TLB flushing:
*
* - flush_tlb_all() flushes all processes TLBs
* - flush_tlb_mm(mm) flushes the specified mm context TLB's
* - flush_tlb_page(vma, vmaddr) flushes one page
* - flush_tlb_range(vma, start, end) flushes a range of pages
*/
#define flush_tlb_all() memc_update_all()
#define flush_tlb_mm(mm) memc_update_mm(mm)
#define flush_tlb_range(vma,start,end) \
do { memc_update_mm(vma->vm_mm); (void)(start); (void)(end); } while (0)
#define flush_tlb_page(vma, vmaddr) do { } while (0)
/*
* The following handle the weird MEMC chip
*/
static inline void memc_update_all(void)
{
struct task_struct *p;
cpu_memc_update_all(init_mm.pgd);
for_each_task(p) {
if (!p->mm)
continue;
cpu_memc_update_all(p->mm->pgd);
}
processor._set_pgd(current->active_mm->pgd);
}
static inline void memc_update_mm(struct mm_struct *mm)
{
cpu_memc_update_all(mm->pgd);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
memc_clear(struct mm_struct *mm, struct page *page)
{
cpu_memc_update_entry(mm->pgd, (unsigned long) page_address(page), 0);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr)
{
cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
static inline void
update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
{
struct mm_struct *mm = vma->vm_mm;
memc_update_addr(mm, pte, addr);
}
...@@ -132,108 +132,3 @@ static inline void flush_dcache_page(struct page *page) ...@@ -132,108 +132,3 @@ static inline void flush_dcache_page(struct page *page)
do { \ do { \
cpu_icache_invalidate_range((_s), (_e)); \ cpu_icache_invalidate_range((_s), (_e)); \
} while (0) } while (0)
/*
* TLB Management
* ==============
*
* The arch/arm/mm/tlb-*.S files implement these methods.
*
* The TLB specific code is expected to perform whatever tests it
* needs to determine if it should invalidate the TLB for each
* call. Start addresses are inclusive and end addresses are
* exclusive; it is safe to round these addresses down.
*
* flush_tlb_all()
*
* Invalidate the entire TLB.
*
* flush_tlb_mm(mm)
*
* Invalidate all TLB entries in a particular address
* space.
* - mm - mm_struct describing address space
*
* flush_tlb_range(mm,start,end)
*
* Invalidate a range of TLB entries in the specified
* address space.
* - mm - mm_struct describing address space
* - start - start address (may not be aligned)
* - end - end address (exclusive, may not be aligned)
*
* flush_tlb_page(vaddr,vma)
*
* Invalidate the specified page in the specified address range.
* - vaddr - virtual address (may not be aligned)
* - vma - vma_struct describing address range
*
* flush_kern_tlb_page(kaddr)
*
* Invalidate the TLB entry for the specified page. The address
* will be in the kernels virtual memory space. Current uses
* only require the D-TLB to be invalidated.
* - kaddr - Kernel virtual memory address
*/
struct cpu_tlb_fns {
void (*flush_kern_all)(void);
void (*flush_user_mm)(struct mm_struct *);
void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *);
void (*flush_user_page)(unsigned long, struct vm_area_struct *);
void (*flush_kern_page)(unsigned long);
};
/*
* Convert calls to our calling convention.
*/
#define flush_tlb_all() __cpu_flush_kern_tlb_all()
#define flush_tlb_mm(mm) __cpu_flush_user_tlb_mm(mm)
#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
#define flush_tlb_page(vma,vaddr) __cpu_flush_user_tlb_page(vaddr,vma)
#define flush_kern_tlb_page(kaddr) __cpu_flush_kern_tlb_page(kaddr)
/*
* Now select the calling method
*/
#ifdef MULTI_TLB
extern struct cpu_tlb_fns cpu_tlb;
#define __cpu_flush_kern_tlb_all cpu_tlb.flush_kern_all
#define __cpu_flush_user_tlb_mm cpu_tlb.flush_user_mm
#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
#define __cpu_flush_user_tlb_page cpu_tlb.flush_user_page
#define __cpu_flush_kern_tlb_page cpu_tlb.flush_kern_page
#else
#define __cpu_flush_kern_tlb_all __glue(_TLB,_flush_kern_tlb_all)
#define __cpu_flush_user_tlb_mm __glue(_TLB,_flush_user_tlb_mm)
#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
#define __cpu_flush_user_tlb_page __glue(_TLB,_flush_user_tlb_page)
#define __cpu_flush_kern_tlb_page __glue(_TLB,_flush_kern_tlb_page)
extern void __cpu_flush_kern_tlb_all(void);
extern void __cpu_flush_user_tlb_mm(struct mm_struct *);
extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
extern void __cpu_flush_user_tlb_page(unsigned long, struct vm_area_struct *);
extern void __cpu_flush_kern_tlb_page(unsigned long);
#endif
/*
* if PG_dcache_dirty is set for the page, we need to ensure that any
* cache entries for the kernels virtual memory range are written
* back to the page.
*/
extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte);
/*
* Old ARM MEMC stuff. This supports the reversed mapping handling that
* we have on the older 26-bit machines. We don't have a MEMC chip, so...
*/
#define memc_update_all() do { } while (0)
#define memc_update_mm(mm) do { } while (0)
#define memc_update_addr(mm,pte,log) do { } while (0)
#define memc_clear(mm,physaddr) do { } while (0)
/*
* linux/include/asm-arm/proc-armv/tlbflush.h
*
* Copyright (C) 1999-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/*
* TLB Management
* ==============
*
* The arch/arm/mm/tlb-*.S files implement these methods.
*
* The TLB specific code is expected to perform whatever tests it
* needs to determine if it should invalidate the TLB for each
* call. Start addresses are inclusive and end addresses are
* exclusive; it is safe to round these addresses down.
*
* flush_tlb_all()
*
* Invalidate the entire TLB.
*
* flush_tlb_mm(mm)
*
* Invalidate all TLB entries in a particular address
* space.
* - mm - mm_struct describing address space
*
* flush_tlb_range(mm,start,end)
*
* Invalidate a range of TLB entries in the specified
* address space.
* - mm - mm_struct describing address space
* - start - start address (may not be aligned)
* - end - end address (exclusive, may not be aligned)
*
* flush_tlb_page(vaddr,vma)
*
* Invalidate the specified page in the specified address range.
* - vaddr - virtual address (may not be aligned)
* - vma - vma_struct describing address range
*
* flush_kern_tlb_page(kaddr)
*
* Invalidate the TLB entry for the specified page. The address
* will be in the kernels virtual memory space. Current uses
* only require the D-TLB to be invalidated.
* - kaddr - Kernel virtual memory address
*/
struct cpu_tlb_fns {
void (*flush_kern_all)(void);
void (*flush_user_mm)(struct mm_struct *);
void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *);
void (*flush_user_page)(unsigned long, struct vm_area_struct *);
void (*flush_kern_range)(unsigned long, unsigned long);
void (*flush_kern_page)(unsigned long);
};
/*
* Convert calls to our calling convention.
*/
#define flush_tlb_all() __cpu_flush_kern_tlb_all()
#define flush_tlb_mm(mm) __cpu_flush_user_tlb_mm(mm)
#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
#define flush_tlb_page(vma,vaddr) __cpu_flush_user_tlb_page(vaddr,vma)
#define flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
#define flush_tlb_kernel_page(kaddr) __cpu_flush_kern_tlb_page(kaddr)
/*
* Now select the calling method
*/
#ifdef MULTI_TLB
extern struct cpu_tlb_fns cpu_tlb;
#define __cpu_flush_kern_tlb_all cpu_tlb.flush_kern_all
#define __cpu_flush_user_tlb_mm cpu_tlb.flush_user_mm
#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
#define __cpu_flush_user_tlb_page cpu_tlb.flush_user_page
#define __cpu_flush_kern_tlb_range cpu_tlb.flush_kern_range
#define __cpu_flush_kern_tlb_page cpu_tlb.flush_kern_page
#else
#define __cpu_flush_kern_tlb_all __glue(_TLB,_flush_kern_tlb_all)
#define __cpu_flush_user_tlb_mm __glue(_TLB,_flush_user_tlb_mm)
#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
#define __cpu_flush_user_tlb_page __glue(_TLB,_flush_user_tlb_page)
#define __cpu_flush_kern_tlb_range __glue(_TLB,_flush_kern_tlb_range)
#define __cpu_flush_kern_tlb_page __glue(_TLB,_flush_kern_tlb_page)
extern void __cpu_flush_kern_tlb_all(void);
extern void __cpu_flush_user_tlb_mm(struct mm_struct *);
extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
extern void __cpu_flush_user_tlb_page(unsigned long, struct vm_area_struct *);
extern void __cpu_flush_kern_tlb_range(unsigned long, unsigned long);
extern void __cpu_flush_kern_tlb_page(unsigned long);
#endif
/*
* if PG_dcache_dirty is set for the page, we need to ensure that any
* cache entries for the kernels virtual memory range are written
* back to the page.
*/
extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte);
/*
* ARM processors do not cache TLB tables in RAM.
*/
#define flush_tlb_pgtables(mm,start,end) do { } while (0)
/*
* Old ARM MEMC stuff. This supports the reversed mapping handling that
* we have on the older 26-bit machines. We don't have a MEMC chip, so...
*/
#define memc_update_all() do { } while (0)
#define memc_update_mm(mm) do { } while (0)
#define memc_update_addr(mm,pte,log) do { } while (0)
#define memc_clear(mm,physaddr) do { } while (0)
...@@ -102,6 +102,8 @@ static inline unsigned long __thread_saved_fp(struct thread_info *thread) ...@@ -102,6 +102,8 @@ static inline unsigned long __thread_saved_fp(struct thread_info *thread)
#endif #endif
#define PREEMPT_ACTIVE 0x04000000
/* /*
* thread information flags: * thread information flags:
* TIF_SYSCALL_TRACE - syscall trace active * TIF_SYSCALL_TRACE - syscall trace active
......
/*
* linux/include/asm-arm/tlbflush.h
*
* Copyright (C) 2000-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _ASMARM_TLBFLUSH_H
#define _ASMARM_TLBFLUSH_H
#include <asm-arm/proc/tlbflush.h>
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment