From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
x86@kernel.org, akpm@linux-foundation.org,
chenhuacai@loongson.cn, dyoung@redhat.com, jbohac@suse.cz,
lihuafei1@huawei.com, chenhaixiang3@huawei.com
Subject: Re: [PATCH] crash: use macro to add crashk_res into iomem early for specific arch
Date: Sun, 24 Mar 2024 11:27:44 +0100 [thread overview]
Message-ID: <ZgAAIB6H+7+t7YpW@gmail.com> (raw)
In-Reply-To: <Zf/51a+QonYj6sI7@MiWiFi-R3L-srv>
* Baoquan He <bhe@redhat.com> wrote:
> On 03/24/24 at 05:06am, Ingo Molnar wrote:
> >
> > * Baoquan He <bhe@redhat.com> wrote:
> >
> ......snip
> > > ---
> > > arch/x86/include/asm/crash_reserve.h | 2 ++
> > > kernel/crash_reserve.c | 7 +++++++
> > > 2 files changed, 9 insertions(+)
> > >
> > > diff --git a/arch/x86/include/asm/crash_reserve.h b/arch/x86/include/asm/crash_reserve.h
> > > index 152239f95541..4681a543eba3 100644
> > > --- a/arch/x86/include/asm/crash_reserve.h
> > > +++ b/arch/x86/include/asm/crash_reserve.h
> > > @@ -39,4 +39,6 @@ static inline unsigned long crash_low_size_default(void)
> > > #endif
> > > }
> > >
> > > +# define HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY
> > > +
> >
> > Any reason for that stray space?
>
> No clear reason. I saw stray space was added for macro definning when my
> below patch was merged, not sure if this is preferred.
No, it's not preferred - and I don't see any stray spaces added in the
code added by:
> commit 85fcde402db1 ("kexec: split crashkernel reservation code out from crash_core.c")
Anyway, please just remove it.
> And there are a lot of "# define " when searching with 'git grep "#
> define " arch/x86/include/'.
The overwhelming majority of those are not standalone defines like
yours, but nested/conditional defines where the space is justified:
#ifdef CONFIG_X86_32
# define MAX_IO_APICS 64
# define MAX_LOCAL_APIC 256
#else
# define MAX_IO_APICS 128
# define MAX_LOCAL_APIC 32768
#endif
Thanks,
Ingo
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
x86@kernel.org, akpm@linux-foundation.org,
chenhuacai@loongson.cn, dyoung@redhat.com, jbohac@suse.cz,
lihuafei1@huawei.com, chenhaixiang3@huawei.com
Subject: Re: [PATCH] crash: use macro to add crashk_res into iomem early for specific arch
Date: Sun, 24 Mar 2024 11:27:44 +0100 [thread overview]
Message-ID: <ZgAAIB6H+7+t7YpW@gmail.com> (raw)
In-Reply-To: <Zf/51a+QonYj6sI7@MiWiFi-R3L-srv>
* Baoquan He <bhe@redhat.com> wrote:
> On 03/24/24 at 05:06am, Ingo Molnar wrote:
> >
> > * Baoquan He <bhe@redhat.com> wrote:
> >
> ......snip
> > > ---
> > > arch/x86/include/asm/crash_reserve.h | 2 ++
> > > kernel/crash_reserve.c | 7 +++++++
> > > 2 files changed, 9 insertions(+)
> > >
> > > diff --git a/arch/x86/include/asm/crash_reserve.h b/arch/x86/include/asm/crash_reserve.h
> > > index 152239f95541..4681a543eba3 100644
> > > --- a/arch/x86/include/asm/crash_reserve.h
> > > +++ b/arch/x86/include/asm/crash_reserve.h
> > > @@ -39,4 +39,6 @@ static inline unsigned long crash_low_size_default(void)
> > > #endif
> > > }
> > >
> > > +# define HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY
> > > +
> >
> > Any reason for that stray space?
>
> No clear reason. I saw stray space was added for macro definning when my
> below patch was merged, not sure if this is preferred.
No, it's not preferred - and I don't see any stray spaces added in the
code added by:
> commit 85fcde402db1 ("kexec: split crashkernel reservation code out from crash_core.c")
Anyway, please just remove it.
> And there are a lot of "# define " when searching with 'git grep "#
> define " arch/x86/include/'.
The overwhelming majority of those are not standalone defines like
yours, but nested/conditional defines where the space is justified:
#ifdef CONFIG_X86_32
# define MAX_IO_APICS 64
# define MAX_LOCAL_APIC 256
#else
# define MAX_IO_APICS 128
# define MAX_LOCAL_APIC 32768
#endif
Thanks,
Ingo
next prev parent reply other threads:[~2024-03-24 10:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-24 3:35 [PATCH] crash: use macro to add crashk_res into iomem early for specific arch Baoquan He
2024-03-24 3:35 ` Baoquan He
2024-03-24 4:06 ` Ingo Molnar
2024-03-24 4:06 ` Ingo Molnar
2024-03-24 10:00 ` Baoquan He
2024-03-24 10:00 ` Baoquan He
2024-03-24 10:27 ` Ingo Molnar [this message]
2024-03-24 10:27 ` Ingo Molnar
2024-03-25 1:42 ` Baoquan He
2024-03-25 1:42 ` Baoquan He
2024-03-25 1:50 ` [PATCH v2] " Baoquan He
2024-03-25 1:50 ` Baoquan He
2024-03-25 20:29 ` Andrew Morton
2024-03-25 20:29 ` Andrew Morton
2024-03-25 23:35 ` Baoquan He
2024-03-25 23:35 ` Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZgAAIB6H+7+t7YpW@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=chenhaixiang3@huawei.com \
--cc=chenhuacai@loongson.cn \
--cc=dyoung@redhat.com \
--cc=jbohac@suse.cz \
--cc=kexec@lists.infradead.org \
--cc=lihuafei1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.