[PATCH v10 1/8] crash: introduce arch/*/asm/crash.h

Rob Herring robh at kernel.org
Mon Aug 8 08:44:51 PDT 2022


On Mon, Aug 8, 2022 at 9:19 AM Eric DeVolder <eric.devolder at oracle.com> wrote:
>
>
>
> On 8/7/22 22:25, Baoquan He wrote:
> > Hi Eric,
> >
> > On 07/21/22 at 02:17pm, Eric DeVolder wrote:
> >> The use of __weak is being eliminated within kexec sources.
> >> The technique uses macros mapped onto inline functions in
> >> order to replace __weak.
> >>
> >> This patchset was using __weak and so in order to replace
> >> __weak, this patch introduces arch/*/asm/crash.h, patterned
> >> after how kexec is moving away from __weak and to the macro
> >> definitions.
> >
> > Are you going to replace __weak in kexec of arll ARCHes? I don't see
> > your point why all these empty header files are introduced. Wondering
> > what's impacted if not adding these empty files?
>
> Hi Baoquan,
> In this patchset, to file include/linux/crash_core.h I added the line #include <asm/crash.h>.
> I patterned this after how include/linux/kexec.h does #include <asm/kexec.h>.
>
> For kexec, the items that were __weak are refactored into corresponding asm/kexec.h.
>
> I followed suit for crash __weak items. File crash_core.h now #include's asm/crash.h and
> so that file needs to be present for every arch, else build failures ensue. It turns out
> x86_64 already had this file.
>
> At this time, I was not planning on converting the other arch's __weak to asm/crash.h, but at least
> with these empty files, the infrastructure is in place for when that does occur.

asm-generic is the right location for default asm headers. I'm not
really sure you even need them as you mainly seem to be using the
header to enable a feature. That's normally done by the arch selecting
a kconfig option. But as Borislav previously pointed out, you don't
need a new option here if the arch must provide support when kexec and
hotplug are enabled/supported.

Rob



More information about the kexec mailing list