diff options
author | Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 2018-03-21 15:58:58 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-03-21 17:06:54 +0300 |
commit | 246ba284ecd4c6da7a7e15c6455bd3d43dc6f33e (patch) | |
tree | bbabdc1be170a1b5b5e0411a0d07c2fe2828b748 /arch/arc | |
parent | bf8974eda40e7954a3f279fb54a95d938c0d3bba (diff) |
ARC: Cache: Move PAE exists check into slc_upper_region_init()
Move check for PAE existence into slc_upper_region_init()
instead of its caller as more appropriate place.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/lib/cache.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c index b08c2111c8b..031ebd7765f 100644 --- a/arch/arc/lib/cache.c +++ b/arch/arc/lib/cache.c @@ -193,6 +193,14 @@ static void __slc_entire_op(const int op) static void slc_upper_region_init(void) { /* + * ARC_AUX_SLC_RGN_START1 and ARC_AUX_SLC_RGN_END1 register exist + * only if PAE exists in current HW. So we had to check pae_exist + * before using them. + */ + if (!pae_exists()) + return; + + /* * ARC_AUX_SLC_RGN_END1 and ARC_AUX_SLC_RGN_START1 are always == 0 * as we don't use PAE40. */ @@ -334,12 +342,7 @@ void cache_init(void) if (is_isa_arcv2() && ioc_exists) arc_ioc_setup(); - /* - * ARC_AUX_SLC_RGN_START1 and ARC_AUX_SLC_RGN_END1 register exist - * only if PAE exists in current HW. So we had to check pae_exist - * before using them. - */ - if (is_isa_arcv2() && slc_exists() && pae_exists()) + if (is_isa_arcv2() && slc_exists()) slc_upper_region_init(); } |