1
linux/arch/blackfin/include/asm
Bernd Schmidt dbdf20db53 Blackfin arch: Faster C implementation of no-MPU CPLB handler
This is a mixture ofcMichael McTernan's patch and the existing cplb-mpu code.

We ditch the old cplb-nompu implementation, which is a good example of
why a good algorithm in a HLL is preferrable to a bad algorithm written in
assembly.  Rather than try to construct a table of all posible CPLBs and
search it, we just create a (smaller) table of memory regions and
their attributes.  Some of the data structures are now unified for both
the mpu and nompu cases.  A lot of needless complexity in cplbinit.c is
removed.

Further optimizations:
  * compile cplbmgr.c with a lot of -ffixed-reg options, and omit saving
    these registers on the stack when entering a CPLB exception.
  * lose cli/nop/nop/sti sequences for some workarounds - these don't
  * make
    sense in an exception context

Additional code unification should be possible after this.

[Mike Frysinger <vapier.adi@gmail.com>:
 - convert CPP if statements to C if statements
 - remove redundant statements
 - use a do...while loop rather than a for loop to get slightly better
   optimization and to avoid gcc "may be used uninitialized" warnings ...
   we know that the [id]cplb_nr_bounds variables will never be 0, so this
   is OK
 - the no-mpu code was the last user of MAX_MEM_SIZE and with that rewritten,
   we can punt it
 - add some BUG_ON() checks to make sure we dont overflow the small
   cplb_bounds array
 - add i/d cplb entries for the bootrom because there is functions/data in
   there we want to access
 - we do not need a NULL trailing entry as any time we access the bounds
   arrays, we use the nr_bounds variable
]

Signed-off-by: Michael McTernan <mmcternan@airvana.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:38 +08:00
..
.gitignore Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
atomic.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
auxvec.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
bfin5xx_spi.h Blackfin arch: cleanup the header file comments 2009-01-07 23:14:38 +08:00
bfin_simple_timer.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
bfin_sport.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
bfin-global.h Blackfin arch: rename cache_lock() to bfin_cache_lock() 2008-11-18 17:48:22 +08:00
bfrom.h Blackfin arch: Update some inline assembly, tweak some register constraints 2009-01-07 23:14:39 +08:00
bitops.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
blackfin.h Blackfin arch: only define HI/LO macros for assembly files 2008-11-18 17:48:22 +08:00
bug.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
bugs.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
byteorder.h blackfin: introduce asm/swab.h 2009-01-06 18:10:28 -08:00
cache.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
cacheflush.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
cdef_LPBlackfin.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
checksum.h Blackfin arch: fix bug - crashes in tcp_v4_send_reset 2009-01-07 23:14:39 +08:00
clocks.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
context.S Blackfin arch: Faster C implementation of no-MPU CPLB handler 2009-01-07 23:14:38 +08:00
cplb.h Blackfin arch: Faster C implementation of no-MPU CPLB handler 2009-01-07 23:14:38 +08:00
cplbinit.h Blackfin arch: Faster C implementation of no-MPU CPLB handler 2009-01-07 23:14:38 +08:00
cpu.h Blackfin arch: delete now unused "cclk" member of blackfin_cpudata 2009-01-07 23:14:38 +08:00
cputime.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
current.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
def_LPBlackfin.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
delay.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
device.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
div64.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
dma-mapping.h Blackfin arch: fix a broken define in dma-mapping 2008-11-18 17:48:22 +08:00
dma.h Blackfin arch: add get_dma_config() func to match set_dma_config() 2009-01-07 23:14:38 +08:00
dpmc.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
early_printk.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
elf.h [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
emergency-restart.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
entry.h Blackfin arch: Faster C implementation of no-MPU CPLB handler 2009-01-07 23:14:38 +08:00
errno.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
fb.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
fcntl.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
fixed_code.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
flat.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
futex.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
gpio.h Blackfin arch: gpio.h split into machine subfolders like already done for BF54x 2009-01-07 23:14:39 +08:00
gptimers.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
hardirq.h Blackfin arch: move ack_bad_irq() prototype to hardirq.h to match other arches 2008-11-18 17:48:22 +08:00
hw_irq.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
io.h Blackfin arch: Use reads/writes instead of ins/outs directly 2009-01-07 23:14:39 +08:00
ioctl.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
ioctls.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
ipcbuf.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
irq_handler.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
irq_regs.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
irq.h Blackfin arch: rename irq_flags to bfin_irq_flags 2008-11-18 17:48:22 +08:00
Kbuild blackfin: introduce asm/swab.h 2009-01-06 18:10:28 -08:00
kdebug.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
kgdb.h Blackfin arch: add supporting for kgdb 2008-10-13 14:07:19 +08:00
kmap_types.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
l1layout.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
linkage.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
local.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
mem_init.h Blackfin arch: fix bugs and unify BFIN_KERNEL_CLOCK option 2009-01-07 23:14:39 +08:00
mem_map.h Blackfin arch: smp patch cleanup from LKML review 2009-01-07 23:14:39 +08:00
mman.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
mmu_context.h Blackfin arch: SMP supporting patchset: Blackfin CPLB related code 2008-11-18 17:48:22 +08:00
mmu.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
module.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
msgbuf.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
mutex-dec.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
mutex.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
nand.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
page_offset.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
page.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
param.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
pci.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
pda.h Blackfin arch: move out irq related functions 2008-11-18 17:48:22 +08:00
percpu.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
pgalloc.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
pgtable.h Blackfin arch: stub out pgprot_noncached() like other people seem to do on nommu 2009-01-07 23:14:39 +08:00
poll.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
portmux.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
posix_types.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
processor.h Blackfin arch: Add basic irq stack checking for Blackfin 2009-01-07 23:14:38 +08:00
ptrace.h Blackfin arch: ptrace - make sure PT_ORIG_R0 and PT_ORIG_P0 offsets are declared 2008-10-09 15:22:56 +08:00
reboot.h Blackfin arch: update header to match new location 2009-01-07 23:14:39 +08:00
resource.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
rwlock.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
scatterlist.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
sections.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
segment.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
sembuf.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
serial.h Blackfin arch: define BASE_BAUD like everyone else 2008-11-18 17:48:22 +08:00
setup.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
shmbuf.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
shmparam.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
sigcontext.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
siginfo.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
signal.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
smp.h Blackfin arch: smp patch cleanup from LKML review 2009-01-07 23:14:39 +08:00
socket.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
sockios.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
spinlock_types.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
spinlock.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
stat.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
statfs.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
string.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
swab.h blackfin: introduce asm/swab.h 2009-01-06 18:10:28 -08:00
system.h Blackfin arch: Update some inline assembly, tweak some register constraints 2009-01-07 23:14:39 +08:00
termbits.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
termios.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
thread_info.h Blackfin arch: Update some inline assembly, tweak some register constraints 2009-01-07 23:14:39 +08:00
time.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
timex.h Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us 2008-10-16 23:55:41 +08:00
tlb.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
tlbflush.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
topology.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
trace.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
traps.h Blackfin arch: Better error handling of unknown exceptions 2008-10-08 14:43:47 +08:00
types.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
uaccess.h Blackfin arch: add __must_check markings to our user functions like other arches 2009-01-07 23:14:38 +08:00
ucontext.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
unaligned.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
unistd.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
user.h Blackfin arch: move include/asm-blackfin header files to arch/blackfin 2008-08-27 10:51:02 +08:00
xor.h Blackfin arch: use generic xor.h 2008-11-18 17:48:22 +08:00