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

Eric DeVolder eric.devolder at oracle.com
Tue Aug 16 08:23:25 PDT 2022



On 8/12/22 19:24, Baoquan He wrote:
> On 08/12/22 at 04:23pm, Eric DeVolder wrote:
>>
>>
>> On 8/12/22 04:46, Baoquan He wrote:
>>> On 08/08/22 at 10:18am, Eric DeVolder 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>.
>>>
>>> I am sorry, Eric, it looks not so good. I understand you want to pattern
>>> asm/kexe.h, but we need consider reality. Introducing a dozen of empty
>>> header file and not being able to tell when they will be filled doesn't
>>> make sense.
>>>
>>> Includig <asm/crash.h> where needed is much simpler. I doubt if your way
>>> can pass other reviewers' line. Can you reconsider?
>>
>> If I include <asm/crash.h> where needed, which is kernel/crash_core.c, then
>> the other archs will fail build if that file doesn't exist. A couple of
>> options, which do you think is better to pursue?
>>
>> - use asm/kexec.h instead of asm/crash.h; it appears all the architectures
>> already have this file in place
>>
>> - go ahead and put the appropriate crash macros/inline functions into each
>> arch asm/crash.h so that the files are not just empty, and leave the use of
>> asm/crash.h
> 
> I think we can do this in two steps.
> 
> Firstly, make do with asm/kexec.h since all other ARCHes put crash related stuff
> into asm/kexec.h, except of x86.

Baoquan,
I've made the changes to utilizes asm/kexec.h. For x86, I did have to put what I
previously had in asm/crash.h into asm/kexec.h.

> 
> Secondly, clean up to put those crash marco/inline functions into
> asm/crash.h.

Yes, in looking at kexec.h, there is alot of crash items in there that would make for a good cleanup 
pass...

> 
> The 2nd step can be done in a independent patchset. What do you think?
> 

Yes!
eric



More information about the kexec mailing list