aboutsummaryrefslogtreecommitdiff
path: root/arch/metag/kernel/cachepart.c
AgeCommit message (Collapse)Author
2014-07-18metag: cachepart: Fix failure checkAndrey Utkin
[linux-3.16-rc5/arch/metag/kernel/cachepart.c:102]: (style) Checking if unsigned variable 'thread_cache_size' is less than zero. Source code is if (thread_cache_size < 0) pr_emerg("Can't read %s cache size\n", cache_type ? "DCACHE" : "ICACHE"); but unsigned int thread_cache_size; Function get_thread_cache_size returns an error code as (unsigned int) -1. Change get_thread_cache_size() to return signed int, and its result is stored into signed int variable. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80361 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-06-27metag: panic if cache aliasing possibleJames Hogan
If the cache and page size configuration allows for cache aliasing to occur we warn on boot, but the log messages are easy to miss and will result is random crashes occuring in userland. Let's panic too in this case so that the user immediately knows they need to fix the cache configuration or configured page size. Also fix the warning messages which display the cache and page sizes to include newlines, and add the word "Potential" since an actual cache alias hasn't been detected. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-15metag: cachepart: fix get_global_dcache_size() typoJames Hogan
Compilation is broken when the kernel is destined to live in the global part of the virtual address space: arch/metag/kernel/cachepart.c In function 'get_thread_cache_size': arch/metag/kernel/cachepart.c +71 : error: implicit declaration of function 'get_global_dache_size' Fix the typo. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-15metag: cachepart: take into account small cache bitsJames Hogan
The CORE_CONFIG2 register has bits to indicate that the data or code cache is small, i.e. that the size described in the field should be divided by 64. Take this into account in get_icache_size() and get_dcache_size(). Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: SMP supportJames Hogan
Add SMP support for metag. This allows Linux to take control of multiple hardware threads on a single Meta core, treating them as separate Linux CPUs. Signed-off-by: James Hogan <james.hogan@imgtec.com>