From: Baoquan He <bhe@redhat.com>
To: Kairui Song <kasong@redhat.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, bp@alien8.de,
mingo@redhat.com, hpa@zytor.com, jbohac@suse.cz,
adobriyan@gmail.com, akpm@linux-foundation.org, osandov@fb.com,
bhsharma@redhat.com, dyoung@redhat.com
Subject: Re: [PATCH v2] x86/gart/kcore: Exclude GART aperture from kcore
Date: Wed, 23 Jan 2019 22:14:32 +0800 [thread overview]
Message-ID: <20190123141432.GA19177@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20190102105408.7124-1-kasong@redhat.com>
On 01/02/19 at 06:54pm, Kairui Song wrote:
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 58176b56354e..c8a56f083419 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -14,6 +14,7 @@
> #define pr_fmt(fmt) "AGP: " fmt
>
> #include <linux/kernel.h>
> +#include <linux/kcore.h>
> #include <linux/types.h>
> #include <linux/init.h>
> #include <linux/memblock.h>
> @@ -57,7 +58,7 @@ int fallback_aper_force __initdata;
>
> int fix_aperture __initdata = 1;
>
> -#ifdef CONFIG_PROC_VMCORE
> +#if defined(CONFIG_PROC_VMCORE) || defined(CONFIG_PROC_KCORE)
> /*
> * If the first kernel maps the aperture over e820 RAM, the kdump kernel will
> * use the same range because it will remain configured in the northbridge.
> @@ -66,7 +67,7 @@ int fix_aperture __initdata = 1;
> */
> static unsigned long aperture_pfn_start, aperture_page_count;
>
> -static int gart_oldmem_pfn_is_ram(unsigned long pfn)
> +static int gart_mem_pfn_is_ram(unsigned long pfn)
> {
> return likely((pfn < aperture_pfn_start) ||
> (pfn >= aperture_pfn_start + aperture_page_count));
> @@ -76,7 +77,12 @@ static void exclude_from_vmcore(u64 aper_base, u32 aper_order)
Shouldn't this function name be changed? It's not only handling vmcore
stuff any more, but also kcore. And this function is not excluding, but
resgistering.
Other than this, it looks good to me.
Thanks
Baoquan
> {
> aperture_pfn_start = aper_base >> PAGE_SHIFT;
> aperture_page_count = (32 * 1024 * 1024) << aper_order >> PAGE_SHIFT;
> - WARN_ON(register_oldmem_pfn_is_ram(&gart_oldmem_pfn_is_ram));
> +#ifdef CONFIG_PROC_VMCORE
> + WARN_ON(register_oldmem_pfn_is_ram(&gart_mem_pfn_is_ram));
> +#endif
> +#ifdef CONFIG_PROC_KCORE
> + WARN_ON(register_mem_pfn_is_ram(&gart_mem_pfn_is_ram));
> +#endif
> }
> #else
> static void exclude_from_vmcore(u64 aper_base, u32 aper_order)
next prev parent reply other threads:[~2019-01-23 14:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 10:54 [PATCH v2] x86/gart/kcore: Exclude GART aperture from kcore Kairui Song
2019-01-23 14:14 ` Baoquan He [this message]
2019-01-23 14:50 ` Kairui Song
2019-01-24 2:17 ` Baoquan He
2019-02-19 8:00 ` Kairui Song
2019-03-06 8:48 ` Kairui Song
2019-03-06 9:03 ` 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=20190123141432.GA19177@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhsharma@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=hpa@zytor.com \
--cc=jbohac@suse.cz \
--cc=kasong@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=osandov@fb.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox