You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
m68k: merge m68k and m68knommu arch directories
There is a lot of common code that could be shared between the m68k and m68knommu arch branches. It makes sense to merge the two branches into a single directory structure so that we can more easily share that common code. This is a brute force merge, based on a script from Stephen King <sfking@fdwdc.com>, which was originally written by Arnd Bergmann <arnd@arndb.de>. > The script was inspired by the script Sam Ravnborg used to merge the > includes from m68knommu. For those files common to both arches but > differing in content, the m68k version of the file is renamed to > <file>_mm.<ext> and the m68knommu version of the file is moved into the > corresponding m68k directory and renamed <file>_no.<ext> and a small > wrapper file <file>.<ext> is used to select between the two version. Files > that are common to both but don't differ are removed from the m68knommu > tree and files and directories that are unique to the m68knommu tree are > moved to the m68k tree. Finally, the arch/m68knommu tree is removed. > > To select between the the versions of the files, the wrapper uses > > #ifdef CONFIG_MMU > #include <file>_mm.<ext> > #else > #include <file>_no.<ext> > #endif On top of this file merge I have done a simplistic merge of m68k and m68knommu Kconfig, which primarily attempts to keep existing options and menus in place. Other than a handful of options being moved it produces identical .config outputs on m68k and m68knommu targets I tested it on. With this in place there is now quite a bit of scope for merge cleanups in future patches. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2,4 +2,38 @@ menu "Kernel hacking"
|
||||
|
||||
source "lib/Kconfig.debug"
|
||||
|
||||
if !MMU
|
||||
|
||||
config FULLDEBUG
|
||||
bool "Full Symbolic/Source Debugging support"
|
||||
help
|
||||
Enable debugging symbols on kernel build.
|
||||
|
||||
config HIGHPROFILE
|
||||
bool "Use fast second timer for profiling"
|
||||
depends on COLDFIRE
|
||||
help
|
||||
Use a fast secondary clock to produce profiling information.
|
||||
|
||||
config BOOTPARAM
|
||||
bool 'Compiled-in Kernel Boot Parameter'
|
||||
|
||||
config BOOTPARAM_STRING
|
||||
string 'Kernel Boot Parameter'
|
||||
default 'console=ttyS0,19200'
|
||||
depends on BOOTPARAM
|
||||
|
||||
config NO_KERNEL_MSG
|
||||
bool "Suppress Kernel BUG Messages"
|
||||
help
|
||||
Do not output any debug BUG messages within the kernel.
|
||||
|
||||
config BDM_DISABLE
|
||||
bool "Disable BDM signals"
|
||||
depends on (EXPERIMENTAL && COLDFIRE)
|
||||
help
|
||||
Disable the ColdFire CPU's BDM signals.
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
417
arch/m68k/Kconfig.mmu
Normal file
417
arch/m68k/Kconfig.mmu
Normal file
@@ -0,0 +1,417 @@
|
||||
config GENERIC_IOMAP
|
||||
bool
|
||||
default y
|
||||
|
||||
config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
depends on BROKEN && (Q40 || SUN3X)
|
||||
default y
|
||||
|
||||
config ARCH_USES_GETTIMEOFFSET
|
||||
def_bool y
|
||||
|
||||
config EISA
|
||||
bool
|
||||
---help---
|
||||
The Extended Industry Standard Architecture (EISA) bus was
|
||||
developed as an open alternative to the IBM MicroChannel bus.
|
||||
|
||||
The EISA bus provided some of the features of the IBM MicroChannel
|
||||
bus while maintaining backward compatibility with cards made for
|
||||
the older ISA bus. The EISA bus saw limited use between 1988 and
|
||||
1995 when it was made obsolete by the PCI bus.
|
||||
|
||||
Say Y here if you are building a kernel for an EISA-based machine.
|
||||
|
||||
Otherwise, say N.
|
||||
|
||||
config MCA
|
||||
bool
|
||||
help
|
||||
MicroChannel Architecture is found in some IBM PS/2 machines and
|
||||
laptops. It is a bus system similar to PCI or ISA. See
|
||||
<file:Documentation/mca.txt> (and especially the web page given
|
||||
there) before attempting to build an MCA bus kernel.
|
||||
|
||||
config PCMCIA
|
||||
tristate
|
||||
---help---
|
||||
Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
|
||||
computer. These are credit-card size devices such as network cards,
|
||||
modems or hard drives often used with laptops computers. There are
|
||||
actually two varieties of these cards: the older 16 bit PCMCIA cards
|
||||
and the newer 32 bit CardBus cards. If you want to use CardBus
|
||||
cards, you need to say Y here and also to "CardBus support" below.
|
||||
|
||||
To use your PC-cards, you will need supporting software from David
|
||||
Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
|
||||
for location). Please also read the PCMCIA-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
To compile this driver as modules, choose M here: the
|
||||
modules will be called pcmcia_core and ds.
|
||||
|
||||
config AMIGA
|
||||
bool "Amiga support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
This option enables support for the Amiga series of computers. If
|
||||
you plan to use this kernel on an Amiga, say Y here and browse the
|
||||
material available in <file:Documentation/m68k>; otherwise say N.
|
||||
|
||||
config ATARI
|
||||
bool "Atari support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
This option enables support for the 68000-based Atari series of
|
||||
computers (including the TT, Falcon and Medusa). If you plan to use
|
||||
this kernel on an Atari, say Y here and browse the material
|
||||
available in <file:Documentation/m68k>; otherwise say N.
|
||||
|
||||
config MAC
|
||||
bool "Macintosh support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
This option enables support for the Apple Macintosh series of
|
||||
computers (yes, there is experimental support now, at least for part
|
||||
of the series).
|
||||
|
||||
Say N unless you're willing to code the remaining necessary support.
|
||||
;)
|
||||
|
||||
config NUBUS
|
||||
bool
|
||||
depends on MAC
|
||||
default y
|
||||
|
||||
config M68K_L2_CACHE
|
||||
bool
|
||||
depends on MAC
|
||||
default y
|
||||
|
||||
config APOLLO
|
||||
bool "Apollo support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
Say Y here if you want to run Linux on an MC680x0-based Apollo
|
||||
Domain workstation such as the DN3500.
|
||||
|
||||
config VME
|
||||
bool "VME (Motorola and BVM) support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
Say Y here if you want to build a kernel for a 680x0 based VME
|
||||
board. Boards currently supported include Motorola boards MVME147,
|
||||
MVME162, MVME166, MVME167, MVME172, and MVME177. BVME4000 and
|
||||
BVME6000 boards from BVM Ltd are also supported.
|
||||
|
||||
config MVME147
|
||||
bool "MVME147 support"
|
||||
depends on VME
|
||||
help
|
||||
Say Y to include support for early Motorola VME boards. This will
|
||||
build a kernel which can run on MVME147 single-board computers. If
|
||||
you select this option you will have to select the appropriate
|
||||
drivers for SCSI, Ethernet and serial ports later on.
|
||||
|
||||
config MVME16x
|
||||
bool "MVME162, 166 and 167 support"
|
||||
depends on VME
|
||||
help
|
||||
Say Y to include support for Motorola VME boards. This will build a
|
||||
kernel which can run on MVME162, MVME166, MVME167, MVME172, and
|
||||
MVME177 boards. If you select this option you will have to select
|
||||
the appropriate drivers for SCSI, Ethernet and serial ports later
|
||||
on.
|
||||
|
||||
config BVME6000
|
||||
bool "BVME4000 and BVME6000 support"
|
||||
depends on VME
|
||||
help
|
||||
Say Y to include support for VME boards from BVM Ltd. This will
|
||||
build a kernel which can run on BVME4000 and BVME6000 boards. If
|
||||
you select this option you will have to select the appropriate
|
||||
drivers for SCSI, Ethernet and serial ports later on.
|
||||
|
||||
config HP300
|
||||
bool "HP9000/300 and HP9000/400 support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
This option enables support for the HP9000/300 and HP9000/400 series
|
||||
of workstations. Support for these machines is still somewhat
|
||||
experimental. If you plan to try to use the kernel on such a machine
|
||||
say Y here.
|
||||
Everybody else says N.
|
||||
|
||||
config DIO
|
||||
bool "DIO bus support"
|
||||
depends on HP300
|
||||
default y
|
||||
help
|
||||
Say Y here to enable support for the "DIO" expansion bus used in
|
||||
HP300 machines. If you are using such a system you almost certainly
|
||||
want this.
|
||||
|
||||
config SUN3X
|
||||
bool "Sun3x support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
select M68030
|
||||
help
|
||||
This option enables support for the Sun 3x series of workstations.
|
||||
Be warned that this support is very experimental.
|
||||
Note that Sun 3x kernels are not compatible with Sun 3 hardware.
|
||||
General Linux information on the Sun 3x series (now discontinued)
|
||||
is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
|
||||
|
||||
If you don't want to compile a kernel for a Sun 3x, say N.
|
||||
|
||||
config Q40
|
||||
bool "Q40/Q60 support"
|
||||
select MMU_MOTOROLA if MMU
|
||||
help
|
||||
The Q40 is a Motorola 68040-based successor to the Sinclair QL
|
||||
manufactured in Germany. There is an official Q40 home page at
|
||||
<http://www.q40.de/>. This option enables support for the Q40 and
|
||||
Q60. Select your CPU below. For 68LC060 don't forget to enable FPU
|
||||
emulation.
|
||||
|
||||
config SUN3
|
||||
bool "Sun3 support"
|
||||
depends on !MMU_MOTOROLA
|
||||
select MMU_SUN3 if MMU
|
||||
select M68020
|
||||
help
|
||||
This option enables support for the Sun 3 series of workstations
|
||||
(3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires
|
||||
that all other hardware types must be disabled, as Sun 3 kernels
|
||||
are incompatible with all other m68k targets (including Sun 3x!).
|
||||
|
||||
If you don't want to compile a kernel exclusively for a Sun 3, say N.
|
||||
|
||||
config NATFEAT
|
||||
bool "ARAnyM emulator support"
|
||||
depends on ATARI
|
||||
help
|
||||
This option enables support for ARAnyM native features, such as
|
||||
access to a disk image as /dev/hda.
|
||||
|
||||
config NFBLOCK
|
||||
tristate "NatFeat block device support"
|
||||
depends on BLOCK && NATFEAT
|
||||
help
|
||||
Say Y to include support for the ARAnyM NatFeat block device
|
||||
which allows direct access to the hard drives without using
|
||||
the hardware emulation.
|
||||
|
||||
config NFCON
|
||||
tristate "NatFeat console driver"
|
||||
depends on NATFEAT
|
||||
help
|
||||
Say Y to include support for the ARAnyM NatFeat console driver
|
||||
which allows the console output to be redirected to the stderr
|
||||
output of ARAnyM.
|
||||
|
||||
config NFETH
|
||||
tristate "NatFeat Ethernet support"
|
||||
depends on NET_ETHERNET && NATFEAT
|
||||
help
|
||||
Say Y to include support for the ARAnyM NatFeat network device
|
||||
which will emulate a regular ethernet device while presenting an
|
||||
ethertap device to the host system.
|
||||
|
||||
comment "Processor type"
|
||||
|
||||
config M68020
|
||||
bool "68020 support"
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68020
|
||||
processor, say Y. Otherwise, say N. Note that the 68020 requires a
|
||||
68851 MMU (Memory Management Unit) to run Linux/m68k, except on the
|
||||
Sun 3, which provides its own version.
|
||||
|
||||
config M68030
|
||||
bool "68030 support"
|
||||
depends on !MMU_SUN3
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68030
|
||||
processor, say Y. Otherwise, say N. Note that a MC68EC030 will not
|
||||
work, as it does not include an MMU (Memory Management Unit).
|
||||
|
||||
config M68040
|
||||
bool "68040 support"
|
||||
depends on !MMU_SUN3
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68LC040
|
||||
or MC68040 processor, say Y. Otherwise, say N. Note that an
|
||||
MC68EC040 will not work, as it does not include an MMU (Memory
|
||||
Management Unit).
|
||||
|
||||
config M68060
|
||||
bool "68060 support"
|
||||
depends on !MMU_SUN3
|
||||
help
|
||||
If you anticipate running this kernel on a computer with a MC68060
|
||||
processor, say Y. Otherwise, say N.
|
||||
|
||||
config MMU_MOTOROLA
|
||||
bool
|
||||
|
||||
config MMU_SUN3
|
||||
bool
|
||||
depends on MMU && !MMU_MOTOROLA
|
||||
|
||||
config M68KFPU_EMU
|
||||
bool "Math emulation support (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
help
|
||||
At some point in the future, this will cause floating-point math
|
||||
instructions to be emulated by the kernel on machines that lack a
|
||||
floating-point math coprocessor. Thrill-seekers and chronically
|
||||
sleep-deprived psychotic hacker types can say Y now, everyone else
|
||||
should probably wait a while.
|
||||
|
||||
config M68KFPU_EMU_EXTRAPREC
|
||||
bool "Math emulation extra precision"
|
||||
depends on M68KFPU_EMU
|
||||
help
|
||||
The fpu uses normally a few bit more during calculations for
|
||||
correct rounding, the emulator can (often) do the same but this
|
||||
extra calculation can cost quite some time, so you can disable
|
||||
it here. The emulator will then "only" calculate with a 64 bit
|
||||
mantissa and round slightly incorrect, what is more than enough
|
||||
for normal usage.
|
||||
|
||||
config M68KFPU_EMU_ONLY
|
||||
bool "Math emulation only kernel"
|
||||
depends on M68KFPU_EMU
|
||||
help
|
||||
This option prevents any floating-point instructions from being
|
||||
compiled into the kernel, thereby the kernel doesn't save any
|
||||
floating point context anymore during task switches, so this
|
||||
kernel will only be usable on machines without a floating-point
|
||||
math coprocessor. This makes the kernel a bit faster as no tests
|
||||
needs to be executed whether a floating-point instruction in the
|
||||
kernel should be executed or not.
|
||||
|
||||
config ADVANCED
|
||||
bool "Advanced configuration options"
|
||||
---help---
|
||||
This gives you access to some advanced options for the CPU. The
|
||||
defaults should be fine for most users, but these options may make
|
||||
it possible for you to improve performance somewhat if you know what
|
||||
you are doing.
|
||||
|
||||
Note that the answer to this question won't directly affect the
|
||||
kernel: saying N will just cause the configurator to skip all
|
||||
the questions about these options.
|
||||
|
||||
Most users should say N to this question.
|
||||
|
||||
config RMW_INSNS
|
||||
bool "Use read-modify-write instructions"
|
||||
depends on ADVANCED
|
||||
---help---
|
||||
This allows to use certain instructions that work with indivisible
|
||||
read-modify-write bus cycles. While this is faster than the
|
||||
workaround of disabling interrupts, it can conflict with DMA
|
||||
( = direct memory access) on many Amiga systems, and it is also said
|
||||
to destabilize other machines. It is very likely that this will
|
||||
cause serious problems on any Amiga or Atari Medusa if set. The only
|
||||
configuration where it should work are 68030-based Ataris, where it
|
||||
apparently improves performance. But you've been warned! Unless you
|
||||
really know what you are doing, say N. Try Y only if you're quite
|
||||
adventurous.
|
||||
|
||||
config SINGLE_MEMORY_CHUNK
|
||||
bool "Use one physical chunk of memory only" if ADVANCED && !SUN3
|
||||
default y if SUN3
|
||||
select NEED_MULTIPLE_NODES
|
||||
help
|
||||
Ignore all but the first contiguous chunk of physical memory for VM
|
||||
purposes. This will save a few bytes kernel size and may speed up
|
||||
some operations. Say N if not sure.
|
||||
|
||||
config 060_WRITETHROUGH
|
||||
bool "Use write-through caching for 68060 supervisor accesses"
|
||||
depends on ADVANCED && M68060
|
||||
---help---
|
||||
The 68060 generally uses copyback caching of recently accessed data.
|
||||
Copyback caching means that memory writes will be held in an on-chip
|
||||
cache and only written back to memory some time later. Saying Y
|
||||
here will force supervisor (kernel) accesses to use writethrough
|
||||
caching. Writethrough caching means that data is written to memory
|
||||
straight away, so that cache and memory data always agree.
|
||||
Writethrough caching is less efficient, but is needed for some
|
||||
drivers on 68060 based systems where the 68060 bus snooping signal
|
||||
is hardwired on. The 53c710 SCSI driver is known to suffer from
|
||||
this problem.
|
||||
|
||||
config ARCH_DISCONTIGMEM_ENABLE
|
||||
def_bool !SINGLE_MEMORY_CHUNK
|
||||
|
||||
config NODES_SHIFT
|
||||
int
|
||||
default "3"
|
||||
depends on !SINGLE_MEMORY_CHUNK
|
||||
|
||||
config ZORRO
|
||||
bool "Amiga Zorro (AutoConfig) bus support"
|
||||
depends on AMIGA
|
||||
help
|
||||
This enables support for the Zorro bus in the Amiga. If you have
|
||||
expansion cards in your Amiga that conform to the Amiga
|
||||
AutoConfig(tm) specification, say Y, otherwise N. Note that even
|
||||
expansion cards that do not fit in the Zorro slots but fit in e.g.
|
||||
the CPU slot may fall in this category, so you have to say Y to let
|
||||
Linux use these.
|
||||
|
||||
config AMIGA_PCMCIA
|
||||
bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)"
|
||||
depends on AMIGA && EXPERIMENTAL
|
||||
help
|
||||
Include support in the kernel for pcmcia on Amiga 1200 and Amiga
|
||||
600. If you intend to use pcmcia cards say Y; otherwise say N.
|
||||
|
||||
config STRAM_PROC
|
||||
bool "ST-RAM statistics in /proc"
|
||||
depends on ATARI
|
||||
help
|
||||
Say Y here to report ST-RAM usage statistics in /proc/stram.
|
||||
|
||||
config HEARTBEAT
|
||||
bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40
|
||||
default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300
|
||||
help
|
||||
Use the power-on LED on your machine as a load meter. The exact
|
||||
behavior is platform-dependent, but normally the flash frequency is
|
||||
a hyperbolic function of the 5-minute load average.
|
||||
|
||||
# We have a dedicated heartbeat LED. :-)
|
||||
config PROC_HARDWARE
|
||||
bool "/proc/hardware support"
|
||||
help
|
||||
Say Y here to support the /proc/hardware file, which gives you
|
||||
access to information about the machine you're running on,
|
||||
including the model, CPU, MMU, clock speed, BogoMIPS rating,
|
||||
and memory size.
|
||||
|
||||
config ISA
|
||||
bool
|
||||
depends on Q40 || AMIGA_PCMCIA
|
||||
default y
|
||||
help
|
||||
Find out whether you have ISA slots on your motherboard. ISA is the
|
||||
name of a bus system, i.e. the way the CPU talks to the other stuff
|
||||
inside your box. Other bus systems are PCI, EISA, MicroChannel
|
||||
(MCA) or VESA. ISA is an older system, now being displaced by PCI;
|
||||
newer boards don't support it. If you have ISA, say Y, otherwise N.
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
depends on Q40 || AMIGA_PCMCIA
|
||||
default y
|
||||
|
||||
source "drivers/pci/Kconfig"
|
||||
|
||||
source "drivers/zorro/Kconfig"
|
||||
|
||||
@@ -1,43 +1,7 @@
|
||||
config M68K
|
||||
bool
|
||||
default y
|
||||
select HAVE_IDE
|
||||
select HAVE_GENERIC_HARDIRQS
|
||||
select GENERIC_HARDIRQS_NO_DEPRECATED
|
||||
|
||||
config MMU
|
||||
bool
|
||||
default n
|
||||
|
||||
config NO_DMA
|
||||
bool
|
||||
depends on !COLDFIRE
|
||||
default y
|
||||
|
||||
config FPU
|
||||
bool
|
||||
default n
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
default y
|
||||
|
||||
config RWSEM_XCHGADD_ALGORITHM
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAS_ILOG2_U32
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAS_ILOG2_U64
|
||||
bool
|
||||
default n
|
||||
|
||||
config GENERIC_FIND_NEXT_BIT
|
||||
bool
|
||||
default y
|
||||
@@ -46,29 +10,14 @@ config GENERIC_GPIO
|
||||
bool
|
||||
default n
|
||||
|
||||
config GENERIC_HWEIGHT
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_CMOS_UPDATE
|
||||
bool
|
||||
default y
|
||||
|
||||
config TIME_LOW_RES
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_CLOCKEVENTS
|
||||
bool
|
||||
default n
|
||||
|
||||
config NO_IOPORT
|
||||
def_bool y
|
||||
|
||||
config COLDFIRE_SW_A7
|
||||
bool
|
||||
default n
|
||||
@@ -85,12 +34,6 @@ config HAVE_MBAR
|
||||
config HAVE_IPSBAR
|
||||
bool
|
||||
|
||||
source "init/Kconfig"
|
||||
|
||||
source "kernel/Kconfig.freezer"
|
||||
|
||||
menu "Processor type and features"
|
||||
|
||||
choice
|
||||
prompt "CPU"
|
||||
default M68EZ328
|
||||
@@ -630,11 +573,6 @@ config 4KSTACKS
|
||||
running more threads on a system and also reduces the pressure
|
||||
on the VM subsystem for higher order allocations.
|
||||
|
||||
config HZ
|
||||
int
|
||||
default 1000 if CLEOPATRA
|
||||
default 100
|
||||
|
||||
comment "RAM configuration"
|
||||
|
||||
config RAMBASE
|
||||
@@ -803,10 +741,6 @@ endif
|
||||
|
||||
source "kernel/time/Kconfig"
|
||||
|
||||
source "mm/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
config ISA_DMA_API
|
||||
bool
|
||||
depends on !M5272
|
||||
@@ -814,31 +748,3 @@ config ISA_DMA_API
|
||||
|
||||
source "drivers/pcmcia/Kconfig"
|
||||
|
||||
menu "Executable file formats"
|
||||
|
||||
source "fs/Kconfig.binfmt"
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Power management options"
|
||||
|
||||
config PM
|
||||
bool "Power Management support"
|
||||
help
|
||||
Support processor power management modes
|
||||
|
||||
endmenu
|
||||
|
||||
source "net/Kconfig"
|
||||
|
||||
source "drivers/Kconfig"
|
||||
|
||||
source "fs/Kconfig"
|
||||
|
||||
source "arch/m68knommu/Kconfig.debug"
|
||||
|
||||
source "security/Kconfig"
|
||||
|
||||
source "crypto/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
@@ -1,123 +1,7 @@
|
||||
#
|
||||
# m68k/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies. Remember to do have actions
|
||||
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
||||
# this architecture
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
#
|
||||
# Copyright (C) 1994 by Hamish Macdonald
|
||||
#
|
||||
|
||||
KBUILD_DEFCONFIG := multi_defconfig
|
||||
|
||||
# override top level makefile
|
||||
AS += -m68020
|
||||
LDFLAGS := -m m68kelf
|
||||
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
|
||||
ifneq ($(SUBARCH),$(ARCH))
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, \
|
||||
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SUN3
|
||||
LDFLAGS_vmlinux = -N
|
||||
endif
|
||||
|
||||
CHECKFLAGS += -D__mc68000__
|
||||
|
||||
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
|
||||
KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
|
||||
|
||||
# enable processor switch if compiled only for a single cpu
|
||||
ifndef CONFIG_M68020
|
||||
ifndef CONFIG_M68030
|
||||
|
||||
ifndef CONFIG_M68060
|
||||
KBUILD_CFLAGS += -m68040
|
||||
endif
|
||||
|
||||
ifndef CONFIG_M68040
|
||||
KBUILD_CFLAGS += -m68060
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_KGDB
|
||||
# If configured for kgdb support, include debugging infos and keep the
|
||||
# frame pointer
|
||||
KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
|
||||
endif
|
||||
|
||||
ifndef CONFIG_SUN3
|
||||
head-y := arch/m68k/kernel/head.o
|
||||
ifdef CONFIG_MMU
|
||||
include $(srctree)/arch/m68k/Makefile_mm
|
||||
else
|
||||
head-y := arch/m68k/kernel/sun3-head.o
|
||||
include $(srctree)/arch/m68k/Makefile_no
|
||||
endif
|
||||
|
||||
core-y += arch/m68k/kernel/ arch/m68k/mm/
|
||||
libs-y += arch/m68k/lib/
|
||||
|
||||
core-$(CONFIG_Q40) += arch/m68k/q40/
|
||||
core-$(CONFIG_AMIGA) += arch/m68k/amiga/
|
||||
core-$(CONFIG_ATARI) += arch/m68k/atari/
|
||||
core-$(CONFIG_MAC) += arch/m68k/mac/
|
||||
core-$(CONFIG_HP300) += arch/m68k/hp300/
|
||||
core-$(CONFIG_APOLLO) += arch/m68k/apollo/
|
||||
core-$(CONFIG_MVME147) += arch/m68k/mvme147/
|
||||
core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
|
||||
core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
|
||||
core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
|
||||
core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
|
||||
core-$(CONFIG_NATFEAT) += arch/m68k/emu/
|
||||
core-$(CONFIG_M68040) += arch/m68k/fpsp040/
|
||||
core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
|
||||
core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
|
||||
|
||||
all: zImage
|
||||
|
||||
lilo: vmlinux
|
||||
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
|
||||
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
|
||||
cat vmlinux > $(INSTALL_PATH)/vmlinux
|
||||
cp System.map $(INSTALL_PATH)/System.map
|
||||
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
|
||||
|
||||
zImage compressed: vmlinux.gz
|
||||
|
||||
vmlinux.gz: vmlinux
|
||||
|
||||
ifndef CONFIG_KGDB
|
||||
cp vmlinux vmlinux.tmp
|
||||
$(STRIP) vmlinux.tmp
|
||||
gzip -9c vmlinux.tmp >vmlinux.gz
|
||||
rm vmlinux.tmp
|
||||
else
|
||||
gzip -9c vmlinux >vmlinux.gz
|
||||
endif
|
||||
|
||||
bzImage: vmlinux.bz2
|
||||
|
||||
vmlinux.bz2: vmlinux
|
||||
|
||||
ifndef CONFIG_KGDB
|
||||
cp vmlinux vmlinux.tmp
|
||||
$(STRIP) vmlinux.tmp
|
||||
bzip2 -1c vmlinux.tmp >vmlinux.bz2
|
||||
rm vmlinux.tmp
|
||||
else
|
||||
bzip2 -1c vmlinux >vmlinux.bz2
|
||||
endif
|
||||
|
||||
archclean:
|
||||
rm -f vmlinux.gz vmlinux.bz2
|
||||
|
||||
install:
|
||||
sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
|
||||
|
||||
121
arch/m68k/Makefile_mm
Normal file
121
arch/m68k/Makefile_mm
Normal file
@@ -0,0 +1,121 @@
|
||||
#
|
||||
# m68k/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies. Remember to do have actions
|
||||
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
||||
# this architecture
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
#
|
||||
# Copyright (C) 1994 by Hamish Macdonald
|
||||
#
|
||||
|
||||
# override top level makefile
|
||||
AS += -m68020
|
||||
LDFLAGS := -m m68kelf
|
||||
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
|
||||
ifneq ($(SUBARCH),$(ARCH))
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, \
|
||||
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SUN3
|
||||
LDFLAGS_vmlinux = -N
|
||||
endif
|
||||
|
||||
CHECKFLAGS += -D__mc68000__
|
||||
|
||||
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
|
||||
KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
|
||||
|
||||
# enable processor switch if compiled only for a single cpu
|
||||
ifndef CONFIG_M68020
|
||||
ifndef CONFIG_M68030
|
||||
|
||||
ifndef CONFIG_M68060
|
||||
KBUILD_CFLAGS += -m68040
|
||||
endif
|
||||
|
||||
ifndef CONFIG_M68040
|
||||
KBUILD_CFLAGS += -m68060
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_KGDB
|
||||
# If configured for kgdb support, include debugging infos and keep the
|
||||
# frame pointer
|
||||
KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
|
||||
endif
|
||||
|
||||
ifndef CONFIG_SUN3
|
||||
head-y := arch/m68k/kernel/head.o
|
||||
else
|
||||
head-y := arch/m68k/kernel/sun3-head.o
|
||||
endif
|
||||
|
||||
core-y += arch/m68k/kernel/ arch/m68k/mm/
|
||||
libs-y += arch/m68k/lib/
|
||||
|
||||
core-$(CONFIG_Q40) += arch/m68k/q40/
|
||||
core-$(CONFIG_AMIGA) += arch/m68k/amiga/
|
||||
core-$(CONFIG_ATARI) += arch/m68k/atari/
|
||||
core-$(CONFIG_MAC) += arch/m68k/mac/
|
||||
core-$(CONFIG_HP300) += arch/m68k/hp300/
|
||||
core-$(CONFIG_APOLLO) += arch/m68k/apollo/
|
||||
core-$(CONFIG_MVME147) += arch/m68k/mvme147/
|
||||
core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
|
||||
core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
|
||||
core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
|
||||
core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
|
||||
core-$(CONFIG_NATFEAT) += arch/m68k/emu/
|
||||
core-$(CONFIG_M68040) += arch/m68k/fpsp040/
|
||||
core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
|
||||
core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
|
||||
|
||||
all: zImage
|
||||
|
||||
lilo: vmlinux
|
||||
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
|
||||
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
|
||||
cat vmlinux > $(INSTALL_PATH)/vmlinux
|
||||
cp System.map $(INSTALL_PATH)/System.map
|
||||
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
|
||||
|
||||
zImage compressed: vmlinux.gz
|
||||
|
||||
vmlinux.gz: vmlinux
|
||||
|
||||
ifndef CONFIG_KGDB
|
||||
cp vmlinux vmlinux.tmp
|
||||
$(STRIP) vmlinux.tmp
|
||||
gzip -9c vmlinux.tmp >vmlinux.gz
|
||||
rm vmlinux.tmp
|
||||
else
|
||||
gzip -9c vmlinux >vmlinux.gz
|
||||
endif
|
||||
|
||||
bzImage: vmlinux.bz2
|
||||
|
||||
vmlinux.bz2: vmlinux
|
||||
|
||||
ifndef CONFIG_KGDB
|
||||
cp vmlinux vmlinux.tmp
|
||||
$(STRIP) vmlinux.tmp
|
||||
bzip2 -1c vmlinux.tmp >vmlinux.bz2
|
||||
rm vmlinux.tmp
|
||||
else
|
||||
bzip2 -1c vmlinux >vmlinux.bz2
|
||||
endif
|
||||
|
||||
archclean:
|
||||
rm -f vmlinux.gz vmlinux.bz2
|
||||
|
||||
install:
|
||||
sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# arch/m68knommu/Makefile
|
||||
# arch/m68k/Makefile
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
@@ -8,8 +8,6 @@
|
||||
# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com>
|
||||
#
|
||||
|
||||
KBUILD_DEFCONFIG := m5208evb_defconfig
|
||||
|
||||
platform-$(CONFIG_M68328) := 68328
|
||||
platform-$(CONFIG_M68EZ328) := 68EZ328
|
||||
platform-$(CONFIG_M68VZ328) := 68VZ328
|
||||
@@ -82,7 +80,7 @@ cpuclass-$(CONFIG_M68360) := 68360
|
||||
CPUCLASS := $(cpuclass-y)
|
||||
|
||||
ifneq ($(CPUCLASS),$(PLATFORM))
|
||||
CLASSDIR := arch/m68knommu/platform/$(cpuclass-y)/
|
||||
CLASSDIR := arch/m68k/platform/$(cpuclass-y)/
|
||||
endif
|
||||
|
||||
export PLATFORM BOARD MODEL CPUCLASS
|
||||
@@ -114,13 +112,13 @@ KBUILD_CFLAGS += $(cflags-y)
|
||||
KBUILD_CFLAGS += -D__linux__
|
||||
KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
|
||||
|
||||
head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o
|
||||
head-y := arch/m68k/platform/$(cpuclass-y)/head.o
|
||||
|
||||
core-y += arch/m68knommu/kernel/ \
|
||||
arch/m68knommu/mm/ \
|
||||
core-y += arch/m68k/kernel/ \
|
||||
arch/m68k/mm/ \
|
||||
$(CLASSDIR) \
|
||||
arch/m68knommu/platform/$(PLATFORM)/
|
||||
libs-y += arch/m68knommu/lib/
|
||||
arch/m68k/platform/$(PLATFORM)/
|
||||
libs-y += arch/m68k/lib/
|
||||
|
||||
archclean:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -37,6 +38,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -33,6 +34,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -36,6 +37,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,3 +1,4 @@
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
@@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
@@ -1,17 +1,5 @@
|
||||
#
|
||||
# Makefile for the linux kernel.
|
||||
#
|
||||
|
||||
ifndef CONFIG_SUN3
|
||||
extra-y := head.o
|
||||
ifdef CONFIG_MMU
|
||||
include arch/m68k/kernel/Makefile_mm
|
||||
else
|
||||
extra-y := sun3-head.o
|
||||
include arch/m68k/kernel/Makefile_no
|
||||
endif
|
||||
extra-y += vmlinux.lds
|
||||
|
||||
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
|
||||
sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
|
||||
|
||||
devres-y = ../../../kernel/irq/devres.o
|
||||
|
||||
obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
|
||||
|
||||
17
arch/m68k/kernel/Makefile_mm
Normal file
17
arch/m68k/kernel/Makefile_mm
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Makefile for the linux kernel.
|
||||
#
|
||||
|
||||
ifndef CONFIG_SUN3
|
||||
extra-y := head.o
|
||||
else
|
||||
extra-y := sun3-head.o
|
||||
endif
|
||||
extra-y += vmlinux.lds
|
||||
|
||||
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
|
||||
sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
|
||||
|
||||
devres-y = ../../../kernel/irq/devres.o
|
||||
|
||||
obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
|
||||
@@ -1,100 +1,5 @@
|
||||
/*
|
||||
* This program is used to generate definitions needed by
|
||||
* assembly language modules.
|
||||
*
|
||||
* We use the technique used in the OSF Mach kernel code:
|
||||
* generate asm statements containing #defines,
|
||||
* compile this file to assembler, and then extract the
|
||||
* #defines from the assembly-language output.
|
||||
*/
|
||||
|
||||
#define ASM_OFFSETS_C
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/kbuild.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/amigahw.h>
|
||||
#include <linux/font.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* offsets into the task struct */
|
||||
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
|
||||
DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
|
||||
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
|
||||
#ifdef CONFIG_MMU
|
||||
DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
|
||||
#include "asm-offsets_mm.c"
|
||||
#else
|
||||
#include "asm-offsets_no.c"
|
||||
#endif
|
||||
|
||||
/* offsets into the thread struct */
|
||||
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
|
||||
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
|
||||
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
|
||||
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs));
|
||||
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
|
||||
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
|
||||
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
|
||||
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
|
||||
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
|
||||
|
||||
/* offsets into the thread_info struct */
|
||||
DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
|
||||
DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));
|
||||
|
||||
/* offsets into the pt_regs */
|
||||
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
|
||||
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
|
||||
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
|
||||
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
|
||||
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
|
||||
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
|
||||
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
|
||||
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
|
||||
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
|
||||
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
|
||||
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
|
||||
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));
|
||||
/* bitfields are a bit difficult */
|
||||
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
|
||||
|
||||
/* offsets into the irq_cpustat_t struct */
|
||||
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
|
||||
|
||||
/* offsets into the bi_record struct */
|
||||
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
|
||||
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
|
||||
DEFINE(BIR_DATA, offsetof(struct bi_record, data));
|
||||
|
||||
/* offsets into font_desc (drivers/video/console/font.h) */
|
||||
DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
|
||||
DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
|
||||
DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
|
||||
DEFINE(FONT_DESC_HEIGHT, offsetof(struct font_desc, height));
|
||||
DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));
|
||||
DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref));
|
||||
|
||||
/* signal defines */
|
||||
DEFINE(LSIGSEGV, SIGSEGV);
|
||||
DEFINE(LSEGV_MAPERR, SEGV_MAPERR);
|
||||
DEFINE(LSIGTRAP, SIGTRAP);
|
||||
DEFINE(LTRAP_TRACE, TRAP_TRACE);
|
||||
|
||||
/* offsets into the custom struct */
|
||||
DEFINE(CUSTOMBASE, &amiga_custom);
|
||||
DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar));
|
||||
DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr));
|
||||
DEFINE(C_INTENA, offsetof(struct CUSTOM, intena));
|
||||
DEFINE(C_INTREQ, offsetof(struct CUSTOM, intreq));
|
||||
DEFINE(C_SERDATR, offsetof(struct CUSTOM, serdatr));
|
||||
DEFINE(C_SERDAT, offsetof(struct CUSTOM, serdat));
|
||||
DEFINE(C_SERPER, offsetof(struct CUSTOM, serper));
|
||||
DEFINE(CIAABASE, &ciaa);
|
||||
DEFINE(CIABBASE, &ciab);
|
||||
DEFINE(C_PRA, offsetof(struct CIA, pra));
|
||||
DEFINE(ZTWOBASE, zTwoBase);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
100
arch/m68k/kernel/asm-offsets_mm.c
Normal file
100
arch/m68k/kernel/asm-offsets_mm.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* This program is used to generate definitions needed by
|
||||
* assembly language modules.
|
||||
*
|
||||
* We use the technique used in the OSF Mach kernel code:
|
||||
* generate asm statements containing #defines,
|
||||
* compile this file to assembler, and then extract the
|
||||
* #defines from the assembly-language output.
|
||||
*/
|
||||
|
||||
#define ASM_OFFSETS_C
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/kbuild.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/amigahw.h>
|
||||
#include <linux/font.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* offsets into the task struct */
|
||||
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
|
||||
DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
|
||||
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
|
||||
#ifdef CONFIG_MMU
|
||||
DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
|
||||
#endif
|
||||
|
||||
/* offsets into the thread struct */
|
||||
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
|
||||
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
|
||||
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
|
||||
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs));
|
||||
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
|
||||
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
|
||||
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
|
||||
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
|
||||
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
|
||||
|
||||
/* offsets into the thread_info struct */
|
||||
DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
|
||||
DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));
|
||||
|
||||
/* offsets into the pt_regs */
|
||||
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
|
||||
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
|
||||
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
|
||||
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
|
||||
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
|
||||
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
|
||||
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
|
||||
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
|
||||
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
|
||||
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
|
||||
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
|
||||
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));
|
||||
/* bitfields are a bit difficult */
|
||||
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
|
||||
|
||||
/* offsets into the irq_cpustat_t struct */
|
||||
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
|
||||
|
||||
/* offsets into the bi_record struct */
|
||||
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
|
||||
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
|
||||
DEFINE(BIR_DATA, offsetof(struct bi_record, data));
|
||||
|
||||
/* offsets into font_desc (drivers/video/console/font.h) */
|
||||
DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
|
||||
DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
|
||||
DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
|
||||
DEFINE(FONT_DESC_HEIGHT, offsetof(struct font_desc, height));
|
||||
DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));
|
||||
DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref));
|
||||
|
||||
/* signal defines */
|
||||
DEFINE(LSIGSEGV, SIGSEGV);
|
||||
DEFINE(LSEGV_MAPERR, SEGV_MAPERR);
|
||||
DEFINE(LSIGTRAP, SIGTRAP);
|
||||
DEFINE(LTRAP_TRACE, TRAP_TRACE);
|
||||
|
||||
/* offsets into the custom struct */
|
||||
DEFINE(CUSTOMBASE, &amiga_custom);
|
||||
DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar));
|
||||
DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr));
|
||||
DEFINE(C_INTENA, offsetof(struct CUSTOM, intena));
|
||||
DEFINE(C_INTREQ, offsetof(struct CUSTOM, intreq));
|
||||
DEFINE(C_SERDATR, offsetof(struct CUSTOM, serdatr));
|
||||
DEFINE(C_SERDAT, offsetof(struct CUSTOM, serdat));
|
||||
DEFINE(C_SERPER, offsetof(struct CUSTOM, serper));
|
||||
DEFINE(CIAABASE, &ciaa);
|
||||
DEFINE(CIABBASE, &ciab);
|
||||
DEFINE(C_PRA, offsetof(struct CIA, pra));
|
||||
DEFINE(ZTWOBASE, zTwoBase);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,130 +1,5 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file COPYING in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/pgalloc.h>
|
||||
|
||||
void *dma_alloc_coherent(struct device *dev, size_t size,
|
||||
dma_addr_t *handle, gfp_t flag)
|
||||
{
|
||||
struct page *page, **map;
|
||||
pgprot_t pgprot;
|
||||
void *addr;
|
||||
int i, order;
|
||||
|
||||
pr_debug("dma_alloc_coherent: %d,%x\n", size, flag);
|
||||
|
||||
size = PAGE_ALIGN(size);
|
||||
order = get_order(size);
|
||||
|
||||
page = alloc_pages(flag, order);
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
*handle = page_to_phys(page);
|
||||
map = kmalloc(sizeof(struct page *) << order, flag & ~__GFP_DMA);
|
||||
if (!map) {
|
||||
__free_pages(page, order);
|
||||
return NULL;
|
||||
}
|
||||
split_page(page, order);
|
||||
|
||||
order = 1 << order;
|
||||
size >>= PAGE_SHIFT;
|
||||
map[0] = page;
|
||||
for (i = 1; i < size; i++)
|
||||
map[i] = page + i;
|
||||
for (; i < order; i++)
|
||||
__free_page(page + i);
|
||||
pgprot = __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY);
|
||||
if (CPU_IS_040_OR_060)
|
||||
pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
|
||||
else
|
||||
pgprot_val(pgprot) |= _PAGE_NOCACHE030;
|
||||
addr = vmap(map, size, VM_MAP, pgprot);
|
||||
kfree(map);
|
||||
|
||||
return addr;
|
||||
}
|
||||
EXPORT_SYMBOL(dma_alloc_coherent);
|
||||
|
||||
void dma_free_coherent(struct device *dev, size_t size,
|
||||
void *addr, dma_addr_t handle)
|
||||
{
|
||||
pr_debug("dma_free_coherent: %p, %x\n", addr, handle);
|
||||
vfree(addr);
|
||||
}
|
||||
EXPORT_SYMBOL(dma_free_coherent);
|
||||
|
||||
void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
|
||||
size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
switch (dir) {
|
||||
case DMA_TO_DEVICE:
|
||||
cache_push(handle, size);
|
||||
break;
|
||||
case DMA_FROM_DEVICE:
|
||||
cache_clear(handle, size);
|
||||
break;
|
||||
default:
|
||||
if (printk_ratelimit())
|
||||
printk("dma_sync_single_for_device: unsupported dir %u\n", dir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dma_sync_single_for_device);
|
||||
|
||||
void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nents; sg++, i++)
|
||||
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
||||
}
|
||||
EXPORT_SYMBOL(dma_sync_sg_for_device);
|
||||
|
||||
dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_addr_t handle = virt_to_bus(addr);
|
||||
|
||||
dma_sync_single_for_device(dev, handle, size, dir);
|
||||
return handle;
|
||||
}
|
||||
EXPORT_SYMBOL(dma_map_single);
|
||||
|
||||
dma_addr_t dma_map_page(struct device *dev, struct page *page,
|
||||
unsigned long offset, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_addr_t handle = page_to_phys(page) + offset;
|
||||
|
||||
dma_sync_single_for_device(dev, handle, size, dir);
|
||||
return handle;
|
||||
}
|
||||
EXPORT_SYMBOL(dma_map_page);
|
||||
|
||||
int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nents; sg++, i++) {
|
||||
sg->dma_address = sg_phys(sg);
|
||||
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
||||
}
|
||||
return nents;
|
||||
}
|
||||
EXPORT_SYMBOL(dma_map_sg);
|
||||
#ifdef CONFIG_MMU
|
||||
#include "dma_mm.c"
|
||||
#else
|
||||
#include "dma_no.c"
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user