Re: [PATCH v19 02/13] x86/setup: Use parse_crashkernel_high_low() to simplify code

Borislav Petkov
2021-12-29T10:03:24Z

On Wed, Dec 29, 2021 at 03:27:48PM +0800, Dave Young wrote:
> So I think you can unify the parse_crashkernel* in x86 first with just
> one function. And leave the further improvements to later work. But
> let's see how Boris think about this.

Well, I think this all unnecessary work. Why?

If the goal is to support crashkernel...high,low on arm64, then you
should simply *copy* the functionality on arm64 and be done with it.

Unification is done by looking at code which is duplicated across
architectures and which has been untouched for a while now, i.e., no
new or arch-specific changes are going to it so a unification can be
as simple as trivially switching the architectures to call a generic
function.

What this does is carve out the "generic" parts and then try not to
break existing usage.

Which is a total waste of energy and resources. And it is casting that
functionality in stone so that when x86 wants to change something there,
it should do it in a way not to break arm64. And I fail to see the
advantage of all that. Code sharing ain't it.

So what it should do is simply copy the necessary code to arm64.
Unifications can always be done later, when the dust settles.

IMNSVHO.

--
Regards/Gruss,
Boris.