From 79df9d04736b759aaacadf87ffbcec60920974b2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 16 Oct 2009 16:12:42 +0000 Subject: 2009-10-16 Jennifer Averett * mpc6xx/mmu/bat.c: Resolved bug: It is not an overlap if the batindex being set is the batindex of the overlap. --- c/src/lib/libcpu/powerpc/ChangeLog | 5 +++++ c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 6237343579..bcd971bb23 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-16 Jennifer Averett + + * mpc6xx/mmu/bat.c: Resolved bug: It is not an overlap if the batindex + being set is the batindex of the overlap. + 2009-10-16 Jennifer Averett * shared/include/io.h: Backport change from extern inline to static diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c index 1eb479da8e..e2090fd4a5 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c @@ -380,8 +380,9 @@ setbat (int typ, int bat_index, unsigned long virt, unsigned long phys, init_done = 1; } } - - if (size >= (1 << 17) && (err = check_overlap (typ, virt, size)) >= 0) { + + err = check_overlap (typ, virt, size); + if ((size >= (1 << 17)) && (err >= 0) && (err != bat_index)) { rtems_interrupt_enable (level); printk ("BATs must not overlap; area 0x%08x..0x%08x hits %cBAT %i\n", virt, virt + size, (TYP_I == typ ? 'I' : 'D'), err); -- cgit v1.2.3