As of today we check SLC status before each call of __slc_rgn_op()
or __slc_entire_op(). So move status check into __slc_rgn_op()
and __slc_entire_op().
As we need to check status before *each* function execution and we
call slc_entire_op() and slc_rgn_op() from different places we add
this check directly into SLC entire/line functions instead of
their callers to avoid code duplication.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+ if (!slc_exists)
+ return;
+
ctrl = read_aux_reg(ARC_AUX_SLC_CTRL);
if (!(op & OP_FLUSH)) /* i.e. OP_INV */
ctrl = read_aux_reg(ARC_AUX_SLC_CTRL);
if (!(op & OP_FLUSH)) /* i.e. OP_INV */
unsigned int ctrl;
unsigned long end;
unsigned int ctrl;
unsigned long end;
+ if (!slc_exists)
+ return;
+
/*
* The Region Flush operation is specified by CTRL.RGN_OP[11..9]
* - b'000 (default) is Flush,
/*
* The Region Flush operation is specified by CTRL.RGN_OP[11..9]
* - b'000 (default) is Flush,
{
__ic_entire_invalidate();
{
__ic_entire_invalidate();
- if (is_isa_arcv2() && slc_exists)
__slc_entire_op(OP_INV);
}
__slc_entire_op(OP_INV);
}
if (!is_isa_arcv2() || !ioc_exists)
__dc_line_op(start, end - start, OP_INV);
if (!is_isa_arcv2() || !ioc_exists)
__dc_line_op(start, end - start, OP_INV);
- if (is_isa_arcv2() && slc_exists && !ioc_exists)
+ if (is_isa_arcv2() && !ioc_exists)
__slc_rgn_op(start, end - start, OP_INV);
}
__slc_rgn_op(start, end - start, OP_INV);
}
if (!is_isa_arcv2() || !ioc_exists)
__dc_line_op(start, end - start, OP_FLUSH);
if (!is_isa_arcv2() || !ioc_exists)
__dc_line_op(start, end - start, OP_FLUSH);
- if (is_isa_arcv2() && slc_exists && !ioc_exists)
+ if (is_isa_arcv2() && !ioc_exists)
__slc_rgn_op(start, end - start, OP_FLUSH);
}
__slc_rgn_op(start, end - start, OP_FLUSH);
}
{
__dc_entire_op(OP_FLUSH_N_INV);
{
__dc_entire_op(OP_FLUSH_N_INV);
- if (is_isa_arcv2() && slc_exists)
__slc_entire_op(OP_FLUSH_N_INV);
}
__slc_entire_op(OP_FLUSH_N_INV);
}
{
__dc_entire_op(OP_FLUSH);
{
__dc_entire_op(OP_FLUSH);
- if (is_isa_arcv2() && slc_exists)
__slc_entire_op(OP_FLUSH);
}
__slc_entire_op(OP_FLUSH);
}