Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
linux
Commits
4a1d5133
Commit
4a1d5133
authored
21 years ago
by
Patrick Mochel
Browse files
Options
Download
Plain Diff
Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-power
parents
c4e3aa81
21fbda93
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
31 additions
and
1253 deletions
+31
-1253
arch/arm/Kconfig
arch/arm/Kconfig
+2
-18
arch/arm/Makefile
arch/arm/Makefile
+5
-2
arch/arm/kernel/asm-offsets.c
arch/arm/kernel/asm-offsets.c
+4
-4
arch/arm/kernel/time.c
arch/arm/kernel/time.c
+11
-8
arch/arm/mach-arc/Kconfig
arch/arm/mach-arc/Kconfig
+0
-36
arch/arm/mach-arc/Makefile
arch/arm/mach-arc/Makefile
+0
-14
arch/arm/mach-arc/arch.c
arch/arm/mach-arc/arch.c
+0
-40
arch/arm/mach-arc/debug.S
arch/arm/mach-arc/debug.S
+0
-90
arch/arm/mach-arc/dma.c
arch/arm/mach-arc/dma.c
+0
-214
arch/arm/mach-arc/fault.c
arch/arm/mach-arc/fault.c
+0
-66
arch/arm/mach-arc/head.S
arch/arm/mach-arc/head.S
+0
-93
arch/arm/mach-arc/irq.c
arch/arm/mach-arc/irq.c
+0
-153
arch/arm/mach-arc/mm.c
arch/arm/mach-arc/mm.c
+0
-185
arch/arm/mach-arc/oldlatches.c
arch/arm/mach-arc/oldlatches.c
+0
-71
arch/arm/mach-arc/small_page.c
arch/arm/mach-arc/small_page.c
+0
-192
arch/arm/mach-clps711x/irq.c
arch/arm/mach-clps711x/irq.c
+1
-0
arch/arm/mach-pxa/dma.c
arch/arm/mach-pxa/dma.c
+3
-1
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.c
+1
-1
arch/arm/mach-pxa/pm.c
arch/arm/mach-pxa/pm.c
+2
-63
arch/arm/mach-pxa/sleep.S
arch/arm/mach-pxa/sleep.S
+2
-2
No files found.
arch/arm/Kconfig
View file @
4a1d5133
...
...
@@ -97,14 +97,6 @@ config ARCH_ANAKIN
Bosch DAB module
* An audio card ( 4 * 40W, AC97 Codec, I2S)
config ARCH_ARCA5K
bool "Archimedes/A5000"
help
This selects what ARM system you wish to build the kernel for. It
also selects to some extent the CPU type. If you are unsure what
to set this option to, please consult any information supplied with
your system.
config ARCH_CLPS7500
bool "Cirrus-CL-PS7500FE"
...
...
@@ -167,8 +159,6 @@ config ARCH_SHARK
endchoice
source "arch/arm/mach-arc/Kconfig"
source "arch/arm/mach-clps711x/Kconfig"
source "arch/arm/mach-epxa10db/Kconfig"
...
...
@@ -184,7 +174,7 @@ source "arch/arm/mach-sa1100/Kconfig"
# Definitions to make life easier
config ARCH_ACORN
bool
depends on
ARCH_ARCA5K ||
ARCH_RPC
depends on ARCH_RPC
default y
#####################################################################
...
...
@@ -226,12 +216,6 @@ comment "Processor Type"
# Figure out whether this system uses 26-bit or 32-bit CPUs.
config CPU_32
bool
depends on !ARCH_ARCA5K
default y
config CPU_26
bool
depends on ARCH_ARCA5K
default y
# Select CPU types depending on the architecture selected. This selects
...
...
@@ -656,7 +640,7 @@ config FPE_NWFPE_XP
config FPE_FASTFPE
bool "FastFPE math emulation (EXPERIMENTAL)"
depends on
!CPU_26 &&
!CPU_32v3 && EXPERIMENTAL
depends on !CPU_32v3 && EXPERIMENTAL
---help---
Say Y here to include the FAST floating point emulator in the kernel.
This is an experimental much faster emulator which now also has full
...
...
This diff is collapsed.
Click to expand it.
arch/arm/Makefile
View file @
4a1d5133
...
...
@@ -30,6 +30,9 @@ AS += -EB
LD
+=
-EB
endif
check_gcc
=
$(
shell
if
$(CC)
$(1)
-S
-o
/dev/null
-xc
/dev/null
>
/dev/null 2>&1
;
then
echo
"
$(1)
"
;
else
echo
"
$(2)
"
;
fi
)
comma
=
,
# Select CPU dependent flags. Note that order of declaration is important;
# the options further down the list override previous items.
#
...
...
@@ -40,7 +43,7 @@ apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
arch-$(CONFIG_CPU_32v5)
:=
-D__LINUX_ARM_ARCH__
=
5
-march
=
armv5te
arch-$(CONFIG_CPU_32v5)
:=
-D__LINUX_ARM_ARCH__
=
5
$(
call
check_gcc,-march
=
armv5te,-march
=
armv4
-Wa
$(comma)
-mxscale
)
arch-$(CONFIG_CPU_32v4)
:=
-D__LINUX_ARM_ARCH__
=
4
-march
=
armv4
arch-$(CONFIG_CPU_32v3)
:=
-D__LINUX_ARM_ARCH__
=
3
-march
=
armv3
...
...
@@ -53,7 +56,7 @@ tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_ARM926T)
:=
-mtune
=
arm9tdmi
tune-$(CONFIG_CPU_SA110)
:=
-mtune
=
strongarm110
tune-$(CONFIG_CPU_SA1100)
:=
-mtune
=
strongarm1100
tune-$(CONFIG_CPU_XSCALE)
:=
-mtune
=
xscale
tune-$(CONFIG_CPU_XSCALE)
:=
$(
call
check_gcc,-mtune
=
xscale,-mtune
=
strongarm110
)
# Force -mno-fpu to be passed to the assembler. Some versions of gcc don't
# do this with -msoft-float
...
...
This diff is collapsed.
Click to expand it.
arch/arm/kernel/asm-offsets.c
View file @
4a1d5133
...
...
@@ -29,16 +29,16 @@
* GCC 3.0, 3.1: general bad code generation.
* GCC 3.2.0: incorrect function argument offset calculation.
* GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
* (http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=8896)
* (http://gcc.gnu.org/PR8896) and incorrect structure
* initialisation in fs/jffs2/erase.c
*/
#if __GNUC__ < 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ < 95) || \
(__GNUC__ == 2 && __GNUC_MINOR__ == 95 && __GNUC_PATCHLEVEL__ != 0 && \
__GNUC_PATCHLEVEL__ < 3) || \
(__GNUC__ == 3 && __GNUC_MINOR__ < 2) || \
(__GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ < 1)
(__GNUC__ == 3 && __GNUC_MINOR__ < 3)
#error Your compiler is too buggy; it is known to miscompile kernels.
#error Known good compilers: 2.95.3, 2.95.4, 2.96, 3.
2.2+PR8896
#error Known good compilers: 2.95.3, 2.95.4, 2.96, 3.
3
#endif
/* Use marker if you need to separate the values later */
...
...
This diff is collapsed.
Click to expand it.
arch/arm/kernel/time.c
View file @
4a1d5133
...
...
@@ -174,6 +174,9 @@ void do_gettimeofday(struct timeval *tv)
int
do_settimeofday
(
struct
timespec
*
tv
)
{
time_t
wtm_sec
,
sec
=
tv
->
tv_sec
;
long
wtm_nsec
,
nsec
=
tv
->
tv_nsec
;
if
((
unsigned
long
)
tv
->
tv_nsec
>=
NSEC_PER_SEC
)
return
-
EINVAL
;
...
...
@@ -184,21 +187,21 @@ int do_settimeofday(struct timespec *tv)
* wall time. Discover what correction gettimeofday() would have
* done, and then undo it!
*/
tv
->
tv_
nsec
-=
1000
*
(
gettimeoffset
()
+
(
jiffies
-
wall_jiffies
)
*
USECS_PER_JIFFY
)
;
nsec
-=
gettimeoffset
()
*
NSEC_PER_USEC
;
nsec
-=
(
jiffies
-
wall_jiffies
)
*
TICK_NSEC
;
while
(
tv
->
tv_nsec
<
0
)
{
tv
->
tv_nsec
+=
NSEC_PER_SEC
;
tv
->
tv_sec
--
;
}
wtm_sec
=
wall_to_monotonic
.
tv_sec
+
(
xtime
.
tv_sec
-
sec
);
wtm_nsec
=
wall_to_monotonic
.
tv_nsec
+
(
xtime
.
tv_nsec
-
nsec
);
set_normalized_timespec
(
&
xtime
,
sec
,
nsec
);
set_normalized_timespec
(
&
wall_to_monotonic
,
wtm_sec
,
wtm_nsec
);
xtime
.
tv_sec
=
tv
->
tv_sec
;
xtime
.
tv_nsec
=
tv
->
tv_nsec
;
time_adjust
=
0
;
/* stop active adjtime() */
time_status
|=
STA_UNSYNC
;
time_maxerror
=
NTP_PHASE_LIMIT
;
time_esterror
=
NTP_PHASE_LIMIT
;
write_sequnlock_irq
(
&
xtime_lock
);
clock_was_set
();
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/Kconfig
deleted
100644 → 0
View file @
c4e3aa81
menu "Archimedes/A5000 Implementations"
# These architectures will be combined. However, until this
# is complete... Note that the ARC will take precedence over
# A5K
comment "Archimedes/A5000 Implementations (select only ONE)"
config ARCH_ARC
bool "Archimedes"
depends on ARCH_ARCA5K
help
The Acorn Archimedes was an personal computer based on an 8K ARM2
processor, released in 1987. It supported 512K of RAM and 2 800K
floppy disks. Picture and more detailed specifications at
<http://www.computingmuseum.com/museum/archi.htm>.
config ARCH_A5K
bool "A5000"
depends on ARCH_ARCA5K
help
Say Y here to to support the Acorn A5000. Linux can support the
internal IDE disk and CD-ROM interface, serial and parallel port,
and the floppy drive. Note that on some A5000s the floppy is
plugged into the wrong socket on the motherboard.
config PAGESIZE_16
bool "2MB physical memory"
depends on ARCH_ARCA5K
help
Say Y here if your Archimedes or A5000 system has only 2MB of
memory, otherwise say N. The resulting kernel will not run on a
machine with 4MB of memory.
endmenu
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/Makefile
deleted
100644 → 0
View file @
c4e3aa81
#
# Makefile for the linux kernel.
#
# Object file lists.
obj-y
:=
arch.o dma.o fault.o irq.o mm.o oldlatches.o
\
small_page.o
obj-$(CONFIG_DEBUG_LL)
+=
debug.o
extra-y
:=
head.o
AFLAGS_head.o
:=
-DTEXTADDR
=
$(TEXTADDR)
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/arch.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/mach-arc/arch.c
*
* Copyright (C) 1998-2001 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.
*
* Architecture specific fixups.
*/
#include <linux/config.h>
#include <linux/tty.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/mach/map.h>
#include <asm/mach/arch.h>
extern
void
arc_init_irq
(
void
);
#ifdef CONFIG_ARCH_ARC
MACHINE_START
(
ARCHIMEDES
,
"Acorn-Archimedes"
)
MAINTAINER
(
"Dave Gilbert"
)
BOOT_PARAMS
(
0x0207c000
)
INITIRQ
(
arc_init_irq
)
MACHINE_END
#endif
#ifdef CONFIG_ARCH_A5K
MACHINE_START
(
A5K
,
"Acorn-A5000"
)
MAINTAINER
(
"Russell King"
)
BOOT_PARAMS
(
0x0207c000
)
INITIRQ
(
arc_init_irq
)
MACHINE_END
#endif
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/debug.S
deleted
100644 → 0
View file @
c4e3aa81
/*
*
linux
/
arch
/
arm
/
kernel
/
debug
-
armo
.
S
*
*
Copyright
(
C
)
1999
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
.
*
*
26
-
bit
debugging
code
*/
#include <linux/linkage.h>
.
macro
addruart
,
rx
mov
\
rx
,
#
0x03000000
orr
\
rx
,
\
rx
,
#
0x00010000
orr
\
rx
,
\
rx
,
#
0x00000fe0
.
endm
.
macro
senduart
,
rd
,
rx
strb
\
rd
,
[
\
rx
]
.
endm
.
macro
busyuart
,
rd
,
rx
1002
:
ldrb
\
rd
,
[
\
rx
,
#
0x14
]
and
\
rd
,
\
rd
,
#
0x60
teq
\
rd
,
#
0x60
bne
1002
b
.
endm
.
macro
waituart
,
rd
,
rx
1001
:
ldrb
\
rd
,
[
\
rx
,
#
0x18
]
tst
\
rd
,
#
0x10
beq
1001
b
.
endm
.
text
/*
*
Useful
debugging
routines
*/
ENTRY
(
printhex8
)
mov
r1
,
#
8
b
printhex
ENTRY
(
printhex4
)
mov
r1
,
#
4
b
printhex
ENTRY
(
printhex2
)
mov
r1
,
#
2
printhex
:
ldr
r2
,
=
hexbuf
add
r3
,
r2
,
r1
mov
r1
,
#
0
strb
r1
,
[
r3
]
1
:
and
r1
,
r0
,
#
15
mov
r0
,
r0
,
lsr
#
4
cmp
r1
,
#
10
addlt
r1
,
r1
,
#
'0'
addge
r1
,
r1
,
#
'a'
-
10
strb
r1
,
[
r3
,
#-
1
]!
teq
r3
,
r2
bne
1
b
mov
r0
,
r2
b
printascii
.
ltorg
ENTRY
(
printascii
)
addruart
r3
b
2
f
1
:
waituart
r2
,
r3
senduart
r1
,
r3
busyuart
r2
,
r3
teq
r1
,
#
'\n'
moveq
r1
,
#
'\r'
beq
1
b
2
:
teq
r0
,
#
0
ldrneb
r1
,
[
r0
],
#
1
teqne
r1
,
#
0
bne
1
b
mov
pc
,
lr
ENTRY
(
printch
)
addruart
r3
mov
r1
,
r0
mov
r0
,
#
0
b
1
b
.
bss
hexbuf
:
.
space
16
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/dma.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/kernel/dma-arc.c
*
* Copyright (C) 1998-1999 Dave Gilbert / 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.
*
* DMA functions specific to Archimedes and A5000 architecture
*/
#include <linux/config.h>
#include <linux/init.h>
#include <asm/dma.h>
#include <asm/fiq.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/dma.h>
#define DPRINTK(x...) printk(KERN_DEBUG x)
#if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE)
static
void
arc_floppy_data_enable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
DPRINTK
(
"arc_floppy_data_enable_dma
\n
"
);
if
(
dma
->
using_sg
)
BUG
();
switch
(
dma
->
dma_mode
)
{
case
DMA_MODE_READ
:
{
/* read */
extern
unsigned
char
fdc1772_dma_read
,
fdc1772_dma_read_end
;
extern
void
fdc1772_setupdma
(
unsigned
int
count
,
unsigned
int
addr
);
unsigned
long
flags
;
DPRINTK
(
"enable_dma fdc1772 data read
\n
"
);
save_flags
(
flags
);
clf
();
memcpy
((
void
*
)
0x1c
,
(
void
*
)
&
fdc1772_dma_read
,
&
fdc1772_dma_read_end
-
&
fdc1772_dma_read
);
fdc1772_setupdma
(
dma
->
buf
.
length
,
dma
->
buf
.
__address
);
/* Sets data pointer up */
enable_fiq
(
FIQ_FLOPPYDATA
);
restore_flags
(
flags
);
}
break
;
case
DMA_MODE_WRITE
:
{
/* write */
extern
unsigned
char
fdc1772_dma_write
,
fdc1772_dma_write_end
;
extern
void
fdc1772_setupdma
(
unsigned
int
count
,
unsigned
int
addr
);
unsigned
long
flags
;
DPRINTK
(
"enable_dma fdc1772 data write
\n
"
);
save_flags
(
flags
);
clf
();
memcpy
((
void
*
)
0x1c
,
(
void
*
)
&
fdc1772_dma_write
,
&
fdc1772_dma_write_end
-
&
fdc1772_dma_write
);
fdc1772_setupdma
(
dma
->
buf
.
length
,
dma
->
buf
.
__address
);
/* Sets data pointer up */
enable_fiq
(
FIQ_FLOPPYDATA
;
restore_flags
(
flags
);
}
break
;
default:
printk
(
"enable_dma: dma%d not initialised
\n
"
,
channel
);
}
}
static
int
arc_floppy_data_get_dma_residue
(
dmach_t
channel
,
dma_t
*
dma
)
{
extern
unsigned
int
fdc1772_bytestogo
;
/* 10/1/1999 DAG - I presume its the number of bytes left? */
return
fdc1772_bytestogo
;
}
static
void
arc_floppy_cmdend_enable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
/* Need to build a branch at the FIQ address */
extern
void
fdc1772_comendhandler
(
void
);
unsigned
long
flags
;
DPRINTK
(
"arc_floppy_cmdend_enable_dma
\n
"
);
/*printk("enable_dma fdc1772 command end FIQ\n");*/
save_flags
(
flags
);
clf
();
/* B fdc1772_comendhandler */
*
((
unsigned
int
*
)
0x1c
)
=
0xea000000
|
(((
unsigned
int
)
fdc1772_comendhandler
-
(
0x1c
+
8
))
/
4
);
restore_flags
(
flags
);
}
static
int
arc_floppy_cmdend_get_dma_residue
(
dmach_t
channel
,
dma_t
*
dma
)
{
/* 10/1/1999 DAG - Presume whether there is an outstanding command? */
extern
unsigned
int
fdc1772_fdc_int_done
;
/* Explicit! If the int done is 0 then 1 int to go */
return
(
fdc1772_fdc_int_done
==
0
)
?
1
:
0
;
}
static
void
arc_disable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
disable_fiq
(
dma
->
dma_irq
);
}
static
struct
dma_ops
arc_floppy_data_dma_ops
=
{
.
type
=
"FIQDMA"
,
.
enable
=
arc_floppy_data_enable_dma
,
.
disable
=
arc_disable_dma
,
.
residue
=
arc_floppy_data_get_dma_residue
,
};
static
struct
dma_ops
arc_floppy_cmdend_dma_ops
=
{
.
type
=
"FIQCMD"
,
.
enable
=
arc_floppy_cmdend_enable_dma
,
.
disable
=
arc_disable_dma
,
.
residue
=
arc_floppy_cmdend_get_dma_residue
,
};
#endif
#ifdef CONFIG_ARCH_A5K
static
struct
fiq_handler
fh
=
{
.
name
=
"floppydata"
};
static
int
a5k_floppy_get_dma_residue
(
dmach_t
channel
,
dma_t
*
dma
)
{
struct
pt_regs
regs
;
get_fiq_regs
(
&
regs
);
return
regs
.
ARM_r9
;
}
static
void
a5k_floppy_enable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
struct
pt_regs
regs
;
void
*
fiqhandler_start
;
unsigned
int
fiqhandler_length
;
extern
void
floppy_fiqsetup
(
unsigned
long
len
,
unsigned
long
addr
,
unsigned
long
port
);
if
(
dma
->
using_sg
)
BUG
();
if
(
dma
->
dma_mode
==
DMA_MODE_READ
)
{
extern
unsigned
char
floppy_fiqin_start
,
floppy_fiqin_end
;
fiqhandler_start
=
&
floppy_fiqin_start
;
fiqhandler_length
=
&
floppy_fiqin_end
-
&
floppy_fiqin_start
;
}
else
{
extern
unsigned
char
floppy_fiqout_start
,
floppy_fiqout_end
;
fiqhandler_start
=
&
floppy_fiqout_start
;
fiqhandler_length
=
&
floppy_fiqout_end
-
&
floppy_fiqout_start
;
}
if
(
claim_fiq
(
&
fh
))
{
printk
(
"floppydma: couldn't claim FIQ.
\n
"
);
return
;
}
memcpy
((
void
*
)
0x1c
,
fiqhandler_start
,
fiqhandler_length
);
regs
.
ARM_r9
=
dma
->
buf
.
length
;
regs
.
ARM_r10
=
(
unsigned
long
)
dma
->
buf
.
__address
;
regs
.
ARM_fp
=
FLOPPYDMA_BASE
;
set_fiq_regs
(
&
regs
);
enable_fiq
(
dma
->
dma_irq
);
}
static
void
a5k_floppy_disable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
disable_fiq
(
dma
->
dma_irq
);
release_fiq
(
&
fh
);
}
static
struct
dma_ops
a5k_floppy_dma_ops
=
{
.
type
=
"FIQDMA"
,
.
enable
=
a5k_floppy_enable_dma
,
.
disable
=
a5k_floppy_disable_dma
,
.
residue
=
a5k_floppy_get_dma_residue
,
};
#endif
/*
* This is virtual DMA - we don't need anything here
*/
static
void
sound_enable_disable_dma
(
dmach_t
channel
,
dma_t
*
dma
)
{
}
static
struct
dma_ops
sound_dma_ops
=
{
.
type
=
"VIRTUAL"
,
.
enable
=
sound_enable_disable_dma
,
.
disable
=
sound_enable_disable_dma
,
};
void
__init
arch_dma_init
(
dma_t
*
dma
)
{
#if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE)
if
(
machine_is_archimedes
())
{
dma
[
DMA_VIRTUAL_FLOPPY0
].
dma_irq
=
FIQ_FLOPPYDATA
;
dma
[
DMA_VIRTUAL_FLOPPY0
].
d_ops
=
&
arc_floppy_data_dma_ops
;
dma
[
DMA_VIRTUAL_FLOPPY1
].
dma_irq
=
1
;
dma
[
DMA_VIRTUAL_FLOPPY1
].
d_ops
=
&
arc_floppy_cmdend_dma_ops
;
}
#endif
#ifdef CONFIG_ARCH_A5K
if
(
machine_is_a5k
())
{
dma
[
DMA_VIRTUAL_FLOPPY0
].
dma_irq
=
FIQ_FLOPPYDATA
;
dma
[
DMA_VIRTUAL_FLOPPY0
].
d_ops
=
&
a5k_floppy_dma_ops
;
}
#endif
dma
[
DMA_VIRTUAL_SOUND
].
d_ops
=
&
sound_dma_ops
;
}
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/fault.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/mm/fault-armo.c
*
* Copyright (C) 1995 Linus Torvalds
* Modifications for ARM processor (c) 1995-1999 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.
*/
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#define FAULT_CODE_LDRSTRPOST 0x80
#define FAULT_CODE_LDRSTRPRE 0x40
#define FAULT_CODE_LDRSTRREG 0x20
#define FAULT_CODE_LDMSTM 0x10
#define FAULT_CODE_LDCSTC 0x08
#define FAULT_CODE_PREFETCH 0x04
#define FAULT_CODE_WRITE 0x02
#define FAULT_CODE_FORCECOW 0x01
#define DO_COW(m) ((m) & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW))
#define READ_FAULT(m) (!((m) & FAULT_CODE_WRITE))
extern
int
do_page_fault
(
unsigned
long
addr
,
int
mode
,
struct
pt_regs
*
regs
);
extern
void
show_pte
(
struct
mm_struct
*
mm
,
unsigned
long
addr
);
/*
* Handle a data abort. Note that we have to handle a range of addresses
* on ARM2/3 for ldm. If both pages are zero-mapped, then we have to force
* a copy-on-write. However, on the second page, we always force COW.
*/
asmlinkage
void
do_DataAbort
(
unsigned
long
min_addr
,
unsigned
long
max_addr
,
int
mode
,
struct
pt_regs
*
regs
)
{
do_page_fault
(
min_addr
,
mode
,
regs
);
if
((
min_addr
^
max_addr
)
>>
PAGE_SHIFT
)
do_page_fault
(
max_addr
,
mode
|
FAULT_CODE_FORCECOW
,
regs
);
}
asmlinkage
int
do_PrefetchAbort
(
unsigned
long
addr
,
struct
pt_regs
*
regs
)
{
#if 0
if (the memc mapping for this page exists) {
printk ("Page in, but got abort (undefined instruction?)\n");
return 0;
}
#endif
do_page_fault
(
addr
,
FAULT_CODE_PREFETCH
,
regs
);
return
1
;
}
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/head.S
deleted
100644 → 0
View file @
c4e3aa81
/*
*
linux
/
arch
/
arm
/
kernel
/
head
-
armo
.
S
*
*
Copyright
(
C
)
1994
-
2000
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
.
*
*
26
-
bit
kernel
startup
code
*/
#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/mach-types.h>
.
globl
swapper_pg_dir
.
equ
swapper_pg_dir
,
0x0207d000
/*
*
Entry
point
.
*/
__INIT
ENTRY
(
stext
)
__entry
:
cmp
pc
,
#
0x02000000
ldrlt
pc
,
LC0
@
if
0x01800000
,
call
at
0x02080000
teq
r0
,
#
0
@
Check
for
old
calling
method
blne
oldparams
@
Move
page
if
old
adr
r0
,
LC0
ldmib
r0
,
{
r2
-
r5
,
sp
}
@
Setup
stack
mov
r0
,
#
0
1
:
cmp
r2
,
r3
@
Clear
BSS
strcc
r0
,
[
r2
],
#
4
bcc
1
b
bl
detect_proc_type
str
r0
,
[
r4
]
bl
detect_arch_type
str
r0
,
[
r5
]
mov
fp
,
#
0
b
start_kernel
LC0
:
.
word
_stext
.
word
__bss_start
@
r2
.
word
_end
@
r3
.
word
processor_id
@
r4
.
word
__machine_arch_type
@
r5
.
word
init_task_union
+
8192
@
sp
arm2_id
:
.
long
0x41560200
arm250_id
:
.
long
0x41560250
.
align
oldparams
:
mov
r4
,
#
0x02000000
add
r3
,
r4
,
#
0x00080000
add
r4
,
r4
,
#
0x0007c000
1
:
ldmia
r0
!,
{
r5
-
r12
}
stmia
r4
!,
{
r5
-
r12
}
cmp
r4
,
r3
blt
1
b
mov
pc
,
lr
/*
*
We
need
some
way
to
automatically
detect
the
difference
between
*
these
two
machines
.
Unfortunately
,
it
is
not
possible
to
detect
*
the
presence
of
the
SuperIO
chip
,
because
that
will
hang
the
old
*
Archimedes
machines
solid
.
*/
/*
DAG
:
Outdated
,
these
have
been
combined
!!!!!!!
*/
detect_arch_type
:
#if defined(CONFIG_ARCH_ARC)
mov
r0
,
#
MACH_TYPE_ARCHIMEDES
#elif defined(CONFIG_ARCH_A5K)
mov
r0
,
#
MACH_TYPE_A5K
#endif
mov
pc
,
lr
detect_proc_type
:
mov
ip
,
lr
mov
r2
,
#
0xea000000
@
Point
undef
instr
to
continuation
adr
r0
,
continue
-
12
orr
r0
,
r2
,
r0
,
lsr
#
2
mov
r1
,
#
0
str
r0
,
[
r1
,
#
4
]
ldr
r0
,
arm2_id
swp
r2
,
r2
,
[
r1
]
@
check
for
swp
(
ARM2
cant
)
ldr
r0
,
arm250_id
mrc
15
,
0
,
r3
,
c0
,
c0
@
check
for
CP
#
15
(
ARM250
cant
)
mov
r0
,
r3
continue
:
mov
r2
,
#
0xeb000000
@
Make
undef
vector
loop
sub
r2
,
r2
,
#
2
str
r2
,
[
r1
,
#
4
]
mov
pc
,
ip
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/irq.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/mach-arc/irq.c
*
* Copyright (C) 1996 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.
*
* Changelog:
* 24-09-1996 RMK Created
* 10-10-1996 RMK Brought up to date with arch-sa110eval
* 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros
* 11-01-1998 RMK Added mask_and_ack_irq
* 22-08-1998 RMK Restructured IRQ routines
*/
#include <linux/config.h>
#include <linux/init.h>
#include <asm/mach/irq.h>
#include <asm/hardware/ioc.h>
#include <asm/io.h>
#include <asm/system.h>
extern
void
init_FIQ
(
void
);
#ifdef CONFIG_ARCH_ARC
#define a_clf() clf()
#define a_stf() stf()
#else
#define a_clf() do { } while (0)
#define a_stf() do { } while (0)
#endif
static
void
arc_mask_irq_ack_a
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
irq
;
a_clf
();
val
=
ioc_readb
(
IOC_IRQMASKA
);
ioc_writeb
(
val
&
~
mask
,
IOC_IRQMASKA
);
ioc_writeb
(
mask
,
IOC_IRQCLRA
);
a_stf
();
}
static
void
arc_mask_irq_a
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
irq
;
a_clf
();
val
=
ioc_readb
(
IOC_IRQMASKA
);
ioc_writeb
(
val
&
~
mask
,
IOC_IRQMASKA
);
a_stf
();
}
static
void
arc_unmask_irq_a
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
irq
;
a_clf
();
val
=
ioc_readb
(
IOC_IRQMASKA
);
ioc_writeb
(
val
|
mask
,
IOC_IRQMASKA
);
a_stf
();
}
static
void
arc_mask_irq_b
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
(
irq
&
7
);
val
=
ioc_readb
(
IOC_IRQMASKB
);
ioc_writeb
(
val
&
~
mask
,
IOC_IRQMASKB
);
}
static
void
arc_unmask_irq_b
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
(
irq
&
7
);
val
=
ioc_readb
(
IOC_IRQMASKB
);
ioc_writeb
(
val
|
mask
,
IOC_IRQMASKB
);
}
static
void
arc_mask_irq_fiq
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
(
irq
&
7
);
val
=
ioc_readb
(
IOC_FIQMASK
);
ioc_writeb
(
val
&
~
mask
,
IOC_FIQMASK
);
}
static
void
arc_unmask_irq_fiq
(
unsigned
int
irq
)
{
unsigned
int
val
,
mask
;
mask
=
1
<<
(
irq
&
7
);
val
=
ioc_readb
(
IOC_FIQMASK
);
ioc_writeb
(
val
|
mask
,
IOC_FIQMASK
);
}
void
__init
arc_init_irq
(
void
)
{
int
irq
;
ioc_writeb
(
0
,
IOC_IRQMASKA
);
ioc_writeb
(
0
,
IOC_IRQMASKB
);
ioc_writeb
(
0
,
IOC_FIQMASK
);
for
(
irq
=
0
;
irq
<
NR_IRQS
;
irq
++
)
{
switch
(
irq
)
{
case
0
...
6
:
irq_desc
[
irq
].
probe_ok
=
1
;
irq_desc
[
irq
].
valid
=
1
;
irq_desc
[
irq
].
mask_ack
=
arc_mask_irq_ack_a
;
irq_desc
[
irq
].
mask
=
arc_mask_irq_a
;
irq_desc
[
irq
].
unmask
=
arc_unmask_irq_a
;
break
;
case
7
:
irq_desc
[
irq
].
noautoenable
=
1
;
irq_desc
[
irq
].
valid
=
1
;
irq_desc
[
irq
].
mask_ack
=
arc_mask_irq_ack_a
;
irq_desc
[
irq
].
mask
=
arc_mask_irq_a
;
irq_desc
[
irq
].
unmask
=
arc_unmask_irq_a
;
break
;
case
9
...
15
:
irq_desc
[
irq
].
probe_ok
=
1
;
case
8
:
irq_desc
[
irq
].
valid
=
1
;
irq_desc
[
irq
].
mask_ack
=
arc_mask_irq_b
;
irq_desc
[
irq
].
mask
=
arc_mask_irq_b
;
irq_desc
[
irq
].
unmask
=
arc_unmask_irq_b
;
break
;
case
64
...
72
:
irq_desc
[
irq
].
valid
=
1
;
irq_desc
[
irq
].
mask_ack
=
arc_mask_irq_fiq
;
irq_desc
[
irq
].
mask
=
arc_mask_irq_fiq
;
irq_desc
[
irq
].
unmask
=
arc_unmask_irq_fiq
;
break
;
}
}
irq_desc
[
IRQ_KEYBOARDTX
].
noautoenable
=
1
;
init_FIQ
();
}
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/mm.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/mm/mm-armo.c
*
* Copyright (C) 1998-2000 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.
*
* Page table sludge for older ARM processor architectures.
*/
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/page.h>
#include <asm/arch/memory.h>
#include <asm/mach/map.h>
#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))
kmem_cache_t
*
pte_cache
,
*
pgd_cache
;
int
page_nr
;
/*
* Allocate a page table. Note that we place the MEMC
* table before the page directory. This means we can
* easily get to both tightly-associated data structures
* with a single pointer.
*/
static
inline
pgd_t
*
alloc_pgd_table
(
int
priority
)
{
void
*
pg2k
=
kmem_cache_alloc
(
pgd_cache
,
GFP_KERNEL
);
if
(
pg2k
)
pg2k
+=
MEMC_TABLE_SIZE
;
return
(
pgd_t
*
)
pg2k
;
}
void
free_pgd_slow
(
pgd_t
*
pgd
)
{
unsigned
long
tbl
=
(
unsigned
long
)
pgd
;
/*
* CHECKME: are we leaking pte tables here???
*/
tbl
-=
MEMC_TABLE_SIZE
;
kmem_cache_free
(
pgd_cache
,
(
void
*
)
tbl
);
}
pgd_t
*
get_pgd_slow
(
struct
mm_struct
*
mm
)
{
pgd_t
*
new_pgd
,
*
init_pgd
;
pmd_t
*
new_pmd
,
*
init_pmd
;
pte_t
*
new_pte
,
*
init_pte
;
new_pgd
=
alloc_pgd_table
(
GFP_KERNEL
);
if
(
!
new_pgd
)
goto
no_pgd
;
/*
* This lock is here just to satisfy pmd_alloc and pte_lock
*/
spin_lock
(
&
mm
->
page_table_lock
);
/*
* On ARM, first page must always be allocated since it contains
* the machine vectors.
*/
new_pmd
=
pmd_alloc
(
mm
,
new_pgd
,
0
);
if
(
!
new_pmd
)
goto
no_pmd
;
new_pte
=
pte_alloc_map
(
mm
,
new_pmd
,
0
);
if
(
!
new_pte
)
goto
no_pte
;
init_pgd
=
pgd_offset_k
(
0
);
init_pmd
=
pmd_offset
(
init_pgd
,
0
);
init_pte
=
pte_offset_map_nested
(
init_pmd
,
0
);
set_pte
(
new_pte
,
*
init_pte
);
pte_unmap_nested
(
init_pte
);
pte_unmap
(
new_pte
);
/*
* most of the page table entries are zeroed
* wne the table is created.
*/
memcpy
(
new_pgd
+
USER_PTRS_PER_PGD
,
init_pgd
+
USER_PTRS_PER_PGD
,
(
PTRS_PER_PGD
-
USER_PTRS_PER_PGD
)
*
sizeof
(
pgd_t
));
spin_unlock
(
&
mm
->
page_table_lock
);
/* update MEMC tables */
cpu_memc_update_all
(
new_pgd
);
return
new_pgd
;
no_pte:
spin_unlock
(
&
mm
->
page_table_lock
);
pmd_free
(
new_pmd
);
free_pgd_slow
(
new_pgd
);
return
NULL
;
no_pmd:
spin_unlock
(
&
mm
->
page_table_lock
);
free_pgd_slow
(
new_pgd
);
return
NULL
;
no_pgd:
return
NULL
;
}
/*
* No special code is required here.
*/
void
setup_mm_for_reboot
(
char
mode
)
{
}
/*
* This contains the code to setup the memory map on an ARM2/ARM250/ARM3
* machine. This is both processor & architecture specific, and requires
* some more work to get it to fit into our separate processor and
* architecture structure.
*/
void
__init
memtable_init
(
struct
meminfo
*
mi
)
{
pte_t
*
pte
;
int
i
;
page_nr
=
max_low_pfn
;
pte
=
alloc_bootmem_low_pages
(
PTRS_PER_PTE
*
sizeof
(
pte_t
));
pte
[
0
]
=
pfn_pte
((
PAGE_OFFSET
+
491520
)
>>
PAGE_SHIFT
,
PAGE_READONLY
);
pmd_populate
(
&
init_mm
,
pmd_offset
(
swapper_pg_dir
,
0
),
pte
);
for
(
i
=
1
;
i
<
PTRS_PER_PGD
;
i
++
)
pgd_val
(
swapper_pg_dir
[
i
])
=
0
;
}
void
__init
iotable_init
(
struct
map_desc
*
io_desc
)
{
/* nothing to do */
}
/*
* We never have holes in the memmap
*/
void
__init
create_memmap_holes
(
struct
meminfo
*
mi
)
{
}
static
void
pte_cache_ctor
(
void
*
pte
,
kmem_cache_t
*
cache
,
unsigned
long
flags
)
{
memzero
(
pte
,
sizeof
(
pte_t
)
*
PTRS_PER_PTE
);
}
static
void
pgd_cache_ctor
(
void
*
pte
,
kmem_cache_t
*
cache
,
unsigned
long
flags
)
{
pgd_t
*
pgd
=
(
pte
+
MEMC_TABLE_SIZE
);
memzero
(
pgd
,
USER_PTRS_PER_PGD
*
sizeof
(
pgd_t
));
}
void
__init
pgtable_cache_init
(
void
)
{
pte_cache
=
kmem_cache_create
(
"pte-cache"
,
sizeof
(
pte_t
)
*
PTRS_PER_PTE
,
0
,
0
,
pte_cache_ctor
,
NULL
);
if
(
!
pte_cache
)
BUG
();
pgd_cache
=
kmem_cache_create
(
"pgd-cache"
,
MEMC_TABLE_SIZE
+
sizeof
(
pgd_t
)
*
PTRS_PER_PGD
,
0
,
0
,
pgd_cache_ctor
,
NULL
);
if
(
!
pgd_cache
)
BUG
();
}
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/oldlatches.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/kernel/oldlatches.c
*
* Copyright (C) David Alan Gilbert 1995/1996,2000
*
* 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.
*
* Support for the latches on the old Archimedes which control the floppy,
* hard disc and printer
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/arch/oldlatches.h>
static
unsigned
char
latch_a_copy
;
static
unsigned
char
latch_b_copy
;
/* newval=(oldval & ~mask)|newdata */
void
oldlatch_aupdate
(
unsigned
char
mask
,
unsigned
char
newdata
)
{
if
(
machine_is_archimedes
())
{
unsigned
long
flags
;
local_save_flags
(
flags
);
latch_a_copy
=
(
latch_a_copy
&
~
mask
)
|
newdata
;
__raw_writeb
(
latch_a_copy
,
LATCHA_BASE
);
local_restore_flags
(
flags
);
printk
(
"Latch: A = 0x%02x
\n
"
,
latch_a_copy
);
}
else
BUG
();
}
/* newval=(oldval & ~mask)|newdata */
void
oldlatch_bupdate
(
unsigned
char
mask
,
unsigned
char
newdata
)
{
if
(
machine_is_archimedes
())
{
unsigned
long
flags
;
local_save_flags
(
flags
);
latch_b_copy
=
(
latch_b_copy
&
~
mask
)
|
newdata
;
__raw_writeb
(
latch_b_copy
,
LATCHB_BASE
);
local_restore_flags
(
flags
);
printk
(
"Latch: B = 0x%02x
\n
"
,
latch_b_copy
);
}
else
BUG
();
}
static
int
__init
oldlatch_init
(
void
)
{
if
(
machine_is_archimedes
())
{
oldlatch_aupdate
(
0xff
,
0xff
);
/* Thats no FDC reset...*/
oldlatch_bupdate
(
0xff
,
LATCHB_FDCRESET
);
}
return
0
;
}
__initcall
(
oldlatch_init
);
EXPORT_SYMBOL
(
oldlatch_aupdate
);
EXPORT_SYMBOL
(
oldlatch_bupdate
);
This diff is collapsed.
Click to expand it.
arch/arm/mach-arc/small_page.c
deleted
100644 → 0
View file @
c4e3aa81
/*
* linux/arch/arm/mm/small_page.c
*
* Copyright (C) 1996 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.
*
* Changelog:
* 26/01/1996 RMK Cleaned up various areas to make little more generic
* 07/02/1999 RMK Support added for 16K and 32K page sizes
* containing 8K blocks
*/
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/smp.h>
#include <asm/bitops.h>
#include <asm/pgtable.h>
#define PEDANTIC
/*
* Requirement:
* We need to be able to allocate naturally aligned memory of finer
* granularity than the page size. This is typically used for the
* second level page tables on 32-bit ARMs.
*
* Theory:
* We "misuse" the Linux memory management system. We use alloc_page
* to allocate a page and then mark it as reserved. The Linux memory
* management system will then ignore the "offset", "next_hash" and
* "pprev_hash" entries in the mem_map for this page.
*
* We then use a bitstring in the "offset" field to mark which segments
* of the page are in use, and manipulate this as required during the
* allocation and freeing of these small pages.
*
* We also maintain a queue of pages being used for this purpose using
* the "next_hash" and "pprev_hash" entries of mem_map;
*/
struct
order
{
struct
list_head
queue
;
unsigned
int
mask
;
/* (1 << shift) - 1 */
unsigned
int
shift
;
/* (1 << shift) size of page */
unsigned
int
block_mask
;
/* nr_blocks - 1 */
unsigned
int
all_used
;
/* (1 << nr_blocks) - 1 */
};
static
struct
order
orders
[]
=
{
#if PAGE_SIZE == 4096
{
LIST_HEAD_INIT
(
orders
[
0
].
queue
),
2047
,
11
,
1
,
0x00000003
}
#elif PAGE_SIZE == 32768
{
LIST_HEAD_INIT
(
orders
[
0
].
queue
),
2047
,
11
,
15
,
0x0000ffff
},
{
LIST_HEAD_INIT
(
orders
[
1
].
queue
),
8191
,
13
,
3
,
0x0000000f
}
#else
#error unsupported page size
#endif
};
#define USED_MAP(pg) ((pg)->index)
#define TEST_AND_CLEAR_USED(pg,off) (test_and_clear_bit(off, &USED_MAP(pg)))
#define SET_USED(pg,off) (set_bit(off, &USED_MAP(pg)))
static
spinlock_t
small_page_lock
=
SPIN_LOCK_UNLOCKED
;
static
unsigned
long
__get_small_page
(
int
priority
,
struct
order
*
order
)
{
unsigned
long
flags
;
struct
page
*
page
;
int
offset
;
do
{
spin_lock_irqsave
(
&
small_page_lock
,
flags
);
if
(
list_empty
(
&
order
->
queue
))
goto
need_new_page
;
page
=
list_entry
(
order
->
queue
.
next
,
struct
page
,
list
);
again:
#ifdef PEDANTIC
if
(
USED_MAP
(
page
)
&
~
order
->
all_used
)
PAGE_BUG
(
page
);
#endif
offset
=
ffz
(
USED_MAP
(
page
));
SET_USED
(
page
,
offset
);
if
(
USED_MAP
(
page
)
==
order
->
all_used
)
list_del_init
(
&
page
->
list
);
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
return
(
unsigned
long
)
page_address
(
page
)
+
(
offset
<<
order
->
shift
);
need_new_page:
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
page
=
alloc_page
(
priority
);
spin_lock_irqsave
(
&
small_page_lock
,
flags
);
if
(
list_empty
(
&
order
->
queue
))
{
if
(
!
page
)
goto
no_page
;
SetPageReserved
(
page
);
USED_MAP
(
page
)
=
0
;
list_add
(
&
page
->
list
,
&
order
->
queue
);
goto
again
;
}
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
__free_page
(
page
);
}
while
(
1
);
no_page:
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
return
0
;
}
static
void
__free_small_page
(
unsigned
long
spage
,
struct
order
*
order
)
{
unsigned
long
flags
;
struct
page
*
page
;
if
(
virt_addr_valid
(
spage
))
{
page
=
virt_to_page
(
spage
);
/*
* The container-page must be marked Reserved
*/
if
(
!
PageReserved
(
page
)
||
spage
&
order
->
mask
)
goto
non_small
;
#ifdef PEDANTIC
if
(
USED_MAP
(
page
)
&
~
order
->
all_used
)
PAGE_BUG
(
page
);
#endif
spage
=
spage
>>
order
->
shift
;
spage
&=
order
->
block_mask
;
/*
* the following must be atomic wrt get_page
*/
spin_lock_irqsave
(
&
small_page_lock
,
flags
);
if
(
USED_MAP
(
page
)
==
order
->
all_used
)
list_add
(
&
page
->
list
,
&
order
->
queue
);
if
(
!
TEST_AND_CLEAR_USED
(
page
,
spage
))
goto
already_free
;
if
(
USED_MAP
(
page
)
==
0
)
goto
free_page
;
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
}
return
;
free_page:
/*
* unlink the page from the small page queue and free it
*/
list_del_init
(
&
page
->
list
);
spin_unlock_irqrestore
(
&
small_page_lock
,
flags
);
ClearPageReserved
(
page
);
__free_page
(
page
);
return
;
non_small:
printk
(
"Trying to free non-small page from %p
\n
"
,
__builtin_return_address
(
0
));
return
;
already_free:
printk
(
"Trying to free free small page from %p
\n
"
,
__builtin_return_address
(
0
));
}
unsigned
long
get_page_8k
(
int
priority
)
{
return
__get_small_page
(
priority
,
orders
+
1
);
}
void
free_page_8k
(
unsigned
long
spage
)
{
__free_small_page
(
spage
,
orders
+
1
);
}
This diff is collapsed.
Click to expand it.
arch/arm/mach-clps711x/irq.c
View file @
4a1d5133
...
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
#include <linux/list.h>
#include <asm/mach/irq.h>
#include <asm/hardware.h>
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-pxa/dma.c
View file @
4a1d5133
...
...
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <asm/system.h>
...
...
@@ -92,7 +93,7 @@ void pxa_free_dma (int dma_ch)
local_irq_restore
(
flags
);
}
static
void
dma_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
dma_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
int
i
,
dint
=
DINT
;
...
...
@@ -111,6 +112,7 @@ static void dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
}
}
}
return
IRQ_HANDLED
;
}
static
int
__init
pxa_dma_init
(
void
)
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-pxa/generic.c
View file @
4a1d5133
...
...
@@ -103,7 +103,7 @@ EXPORT_SYMBOL(get_lclk_frequency_10khz);
void
pxa_gpio_mode
(
int
gpio_mode
)
{
long
flags
;
unsigned
long
flags
;
int
gpio
=
gpio_mode
&
GPIO_MD_MASK_NR
;
int
fn
=
(
gpio_mode
&
GPIO_MD_MASK_FN
)
>>
8
;
int
gafr
;
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-pxa/pm.c
View file @
4a1d5133
...
...
@@ -11,12 +11,6 @@
* modify it under the terms of the GNU General Public License.
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
#include <linux/errno.h>
#include <asm/hardware.h>
...
...
@@ -81,7 +75,7 @@ int pm_do_suspend(void)
/*
* Temporary solution. This won't be necessary once
* we move pxa support into the serial
/*
driver
* we move pxa support into the serial driver
* Save the FF UART
*/
SAVE
(
FFIER
);
...
...
@@ -175,7 +169,7 @@ int pm_do_suspend(void)
/*
* Temporary solution. This won't be necessary once
* we move pxa support into the serial
/*
driver.
* we move pxa support into the serial driver.
* Restore the FF UART.
*/
RESTORE
(
FFMCR
);
...
...
@@ -207,58 +201,3 @@ unsigned long sleep_phys_sp(void *sp)
{
return
virt_to_phys
(
sp
);
}
#ifdef CONFIG_SYSCTL
/*
* ARGH! ACPI people defined CTL_ACPI in linux/acpi.h rather than
* linux/sysctl.h.
*
* This means our interface here won't survive long - it needs a new
* interface. Quick hack to get this working - use sysctl id 9999.
*/
#warning ACPI broke the kernel, this interface needs to be fixed up.
#define CTL_ACPI 9999
#define ACPI_S1_SLP_TYP 19
/*
* Send us to sleep.
*/
static
int
sysctl_pm_do_suspend
(
void
)
{
int
retval
;
retval
=
pm_send_all
(
PM_SUSPEND
,
(
void
*
)
3
);
if
(
retval
==
0
)
{
retval
=
pm_do_suspend
();
pm_send_all
(
PM_RESUME
,
(
void
*
)
0
);
}
return
retval
;
}
static
struct
ctl_table
pm_table
[]
=
{
{
ACPI_S1_SLP_TYP
,
"suspend"
,
NULL
,
0
,
0600
,
NULL
,
(
proc_handler
*
)
&
sysctl_pm_do_suspend
},
{
0
}
};
static
struct
ctl_table
pm_dir_table
[]
=
{
{
CTL_ACPI
,
"pm"
,
NULL
,
0
,
0555
,
pm_table
},
{
0
}
};
/*
* Initialize power interface
*/
static
int
__init
pm_init
(
void
)
{
register_sysctl_table
(
pm_dir_table
,
1
);
return
0
;
}
__initcall
(
pm_init
);
#endif
This diff is collapsed.
Click to expand it.
arch/arm/mach-pxa/sleep.S
View file @
4a1d5133
...
...
@@ -48,7 +48,7 @@ ENTRY(pxa_cpu_suspend)
str
r0
,
[
r1
]
@
clean
data
cache
bl
cpu_
xscale_
cache_clean_invalidat
e_all
bl
xscale_
flush_kern_cach
e_all
@
Put
the
processor
to
sleep
@
(
also
workaround
for
sighting
28071
)
...
...
@@ -101,7 +101,7 @@ ENTRY(pxa_cpu_suspend)
.
data
.
align
5
ENTRY
(
pxa_cpu_resume
)
mov
r0
,
#
I_BIT
| F_BIT |
MODE_SVC
@
set
SVC
,
irqs
off
mov
r0
,
#
PSR_
I_BIT
|
PSR_
F_BIT |
MODE_SVC
@
set
SVC
,
irqs
off
msr
cpsr_c
,
r0
ldr
r0
,
sleep_save_sp
@
stack
phys
addr
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment