Re: [PATCH] MIPS: ingenic: Let Config.VI tell whether the icache is virtual

From: Maciej W. Rozycki

Date: Mon Nov 16 2026 - 01:21:04 EST


On Wed, 11 Nov 2026, Hunter Laux wrote:

> >> -#define cpu_has_vtag_icache 1
> >
> > Don't remove it, set it to 0.
>
> The Config.VI probe already reports it correctly, so I left it to the
> probe. Would you prefer the constant anyway?

The sole purpose of the constants is to avoid going for run-time probes,
which cost execution time, and to make the compiler drop execution paths
that won't ever run. It's an optimisation.

Only with platforms where you don't know in advance what CPU features are
going to be present, e.g. where you can swap a CPU module for a different
model and still run the same kernel, the relevant overrides need to be
absent.

Maciej