[PATCH 1/5] or1k: Add functions for entire cache operations

2016-11-25 Thread Martin Erik Werner
Add functions for flushing and invalidating whole cache. Since we don't have system calls that can operate on anything more than a single cache line, these simply retrieves the cache size and iterates over the full size, invalidating each line. The current implementation assumes that there's only

[PATCH 0/5] or1k: Optimisation and implementation of cache manager functions

2016-11-25 Thread Martin Erik Werner
These patches are mainly optimisation changes to the or1k cache manager functions. They were made for use on our custom boards, but should be applicable to or1k in general. We have used and tested these patches as part of a larger set of changes for our boards on the 4.11 branch on top of rtems co

[PATCH 5/5] or1k: Avoid multiple iterations over cache

2016-11-25 Thread Martin Erik Werner
Previously, if the cache range operations were called with a range that was larger than the cache size, this would lead to multiple iterations over the cache, which is unnecessary. Limit this so that if the range is larger than the cache size, the operations will only iterate over the whole cache

[PATCH 4/5] or1k: Remove secondary functions in cache manager

2016-11-25 Thread Martin Erik Werner
Move the code of the _CPU_OR1K_Cache_{enable,disable}_* functions into the equivalent exported _CPU_cache_{enable,disable}_* functions instead, and then delete them, in order to reduce the code indirection and aid readability. This does not touch the currently unused prefetch, writeback, and lock

[PATCH 3/5] or1k: Avoid excessive ISR toggle in cache manager

2016-11-25 Thread Martin Erik Werner
Previously _ISR_Local_{disable,enable}() was executed twice for each cache line operation, and since operations over the entire cache were implemented by calling the single-line operations in a loop, this made those operations rather costly. Fix the double-toggle by calling _OR1K_mtspr() directly,

[PATCH 2/5] or1k: Indent & comment fix in cache.c

2016-11-25 Thread Martin Erik Werner
* Fix indentation of variable declarations. * Change commented-out asm -> __asm__ to meet c99 standard if uncommented. --- c/src/lib/libcpu/or1k/shared/cache/cache.c | 39 +++--- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/c/src/lib/libcpu/or1k/shared

Re: [PATCH] rtems/gdb: Fix powerpc builds on FreeBSD.

2016-11-25 Thread Joel Sherrill
This has had great support from the gdb developers. Did any of the other targets show an issue? I think this got applied to the 7.12 branch and master, right? --joel On Fri, Nov 25, 2016 at 2:58 AM, Chris Johns wrote: > This patch add a GDB patch to the gdb-7.12 build so the PowerPC > builds

[PATCH] rtems/gdb: Fix powerpc builds on FreeBSD.

2016-11-25 Thread Chris Johns
This patch add a GDB patch to the gdb-7.12 build so the PowerPC builds on FreeBSD. https://sourceware.org/bugzilla/show_bug.cgi?id=20863 --- rtems/config/tools/rtems-gdb-7.12-1.cfg | 5 + 1 file changed, 5 insertions(+) diff --git a/rtems/config/tools/rtems-gdb-7.12-1.cfg b/rtems/config/to