Skip to content

Commit

Permalink
m68k: merge mmu and non-mmu bitops.h
Browse files Browse the repository at this point in the history
The following patch merges the mmu and non-mmu versions of the m68k
bitops.h files. Now there is a good deal of difference between the two
files, but none of it is actually an mmu specific difference. It is
all about the specific m68k/coldfire varient we are targeting. So it
makes an awful lot of sense to merge these into a single bitops.h.

There is a number of ways I can see to factor this code. The approach
I have taken here is to keep the various versions of each macro/function
type together. This means that there is some ifdefery with each to handle
each CPU type.

I have added some comments in a couple of appropriate places to try
and make it clear what the differences we are dealing with are.
Specifically the instruction and addressing mode differences we have
to deal with.

The merged form keeps the same underlying optimizations for each CPU
type for all the general bit clear/set/change and find bit operations.
It does switch to using the generic le operations though, instead of
any local varients.

Build tested on ColdFire, 68328, 68360 (which is cpu32) and 68020+.
Run tested on ColdFire and ARAnyM.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
  • Loading branch information
Greg Ungerer committed Jul 25, 2011
1 parent f941f5c commit 171d809
Show file tree
Hide file tree
Showing 5 changed files with 535 additions and 837 deletions.
4 changes: 4 additions & 0 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ config NO_DMA
config ZONE_DMA
bool
default y

config CPU_HAS_NO_BITFIELDS
bool

config HZ
int
default 1000 if CLEOPATRA
Expand Down
3 changes: 3 additions & 0 deletions arch/m68k/Kconfig.nommu
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config GENERIC_CLOCKEVENTS

config M68000
bool
select CPU_HAS_NO_BITFIELDS
help
The Freescale (was Motorola) 68000 CPU is the first generation of
the well known M68K family of processors. The CPU core as well as
Expand All @@ -25,6 +26,7 @@ config M68000

config MCPU32
bool
select CPU_HAS_NO_BITFIELDS
help
The Freescale (was then Motorola) CPU32 is a CPU core that is
based on the 68020 processor. For the most part it is used in
Expand All @@ -34,6 +36,7 @@ config COLDFIRE
bool
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select CPU_HAS_NO_BITFIELDS
help
The Freescale ColdFire family of processors is a modern derivitive
of the 68000 processor family. They are mainly targeted at embedded
Expand Down
Loading

0 comments on commit 171d809

Please sign in to comment.