1
0
Fork 0
Commit Graph

18 Commits (7291351c00e1977ebfa5a4b3c1e573c878ff7c14)

Author SHA1 Message Date
Shubhrajyoti Datta 7291351c00 microblaze: Prevent the overflow of the start
[ Upstream commit 061d2c1d59 ]

In case the start + cache size is more than the max int the
start overflows.
Prevent the same.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:37:02 +01:00
Michal Simek 2558cd8cab microblaze: Use unsigned type for limit comparison in cache.c
The patch removes warnings:
arch/microblaze/kernel/cpu/cache.c:146:14: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-08 08:37:16 +01:00
Michal Simek 972be324fe microblaze: Initialize temp variable to remove compilation warning
Compilation warning:
arch/microblaze/kernel/cpu/cache.c:148:2: warning:
 'temp' is used uninitialized in this function [-Wuninitialized]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-05-14 09:09:08 +02:00
Michal Simek 6bd55f0bba microblaze: Fix coding style issues
Fix coding style issues reported by checkpatch.pl.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2013-02-12 11:24:45 +01:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Michal Simek 954e8b9599 microblaze: Fix sparse warnings - cache.c
Warning log:
CHECK   arch/microblaze/kernel/cpu/cache.c
arch/microblaze/kernel/cpu/cache.c:522:21: warning: symbol 'wb_msr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:538:21: warning: symbol 'wb_nomsr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:554:21: warning: symbol 'wt_msr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:569:21: warning: symbol 'wt_nomsr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:585:21: warning: symbol 'wt_msr_noirq' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:600:21: warning: symbol 'wt_nomsr_noirq' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-03-09 08:09:58 +01:00
Michal Simek b9dc9e7781 microblaze: Label MB 7.20.d as broken with WB cache
MB version 7.20.d contains fault which is related with WB that's why
error message will be shown.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-03-09 08:09:55 +01:00
Michal Simek ddfbc935ea microblaze: Remove compilation warnings in cache macro
CC      arch/microblaze/kernel/cpu/cache.o
arch/microblaze/kernel/cpu/cache.c: In function '__invalidate_dcache_range_wb':
arch/microblaze/kernel/cpu/cache.c:398: warning: ISO C90 forbids mixed declarations and code
arch/microblaze/kernel/cpu/cache.c: In function '__flush_dcache_range_wb':
arch/microblaze/kernel/cpu/cache.c:509: warning: ISO C90 forbids mixed declara

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13 10:55:47 +02:00
Michal Simek 3274c5707c microblaze: Optimize CACHE_LOOP_LIMITS and CACHE_RANGE_LOOP macros
1. Remove CACHE_ALL_LOOP2 macro because it is identical to CACHE_ALL_LOOP
2. Change BUG_ON to WARN_ON
3. Remove end aligned from CACHE_LOOP_LIMITS.
C implementation do not need aligned end address and ASM code do aligned
in their macros
4. ASM optimized  CACHE_RANGE_LOOP_1/2 macros needs to get aligned end address.
Because end address is compound from start + size, end address is the first address
which is exclude.

Here is the corresponding code which describe it.
+       int align = ~(line_length - 1);
+       end = ((end & align) == end) ? end - line_length : end & align;

a) end is aligned:
it is necessary to subtruct line length because we don't want to work with
next cacheline
b) end address is not aligned:
Just align it to be ready for ASM code.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06 11:22:00 +02:00
Michal Simek c17e1a1ced microblaze: Fix typo fault in cache code
Copy & paste error.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06 11:21:59 +02:00
Michal Simek 22607a2821 microblaze: Add define for ASM_LOOP
It is default option but both options must be measured.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:12:50 +01:00
Frans Pop 4c912c1a33 microblaze: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:09:29 +01:00
Michal Simek 407c1da07d microblaze: Move cache function to cache.c
It is better to have init cache handling on one place.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:07:57 +01:00
Michal Simek 0d670b2472 microblaze: Fix cache loop function for cache range
I create wrong asm code but none test shows that this part of code is wrong.
I am not convinces that were good idea to create asm optimized macros
for caches. The reason is that there is not optimization with previous code
that's why make sense to add old code and do some benchmarking which
functions are faster.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-02-24 13:18:29 +01:00
Michal Simek 2ee2ff875a microblaze: Support for WB cache
Microblaze version 7.20.d is the first MB version which can be run
on MMU linux. Please do not used previous version because they contain
HW bug.
Based on WB support was necessary to redesign whole cache design.
Microblaze versions from 7.20.a don't need to disable IRQ and cache
before working with them that's why there are special structures for it.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:10 +01:00
Michal Simek 44e4e196a9 microblaze: Fix cache_line_lenght
We used cache_line as cache_line_lenght. For this reason
we did cache flushing 4 times longer than was necessary.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:57 +01:00
Michal Simek 6dfb79aa11 microblaze: Do not check use_dcache
It is not necessary to check cpuinfo.use_dcache because
this checking is done in function which call that functions

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-04-23 16:27:31 +02:00
Michal Simek 8beb8503bf microblaze_v8: cache support
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
Acked-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-03-27 14:25:16 +01:00