From: lijiang <lijiang@redhat.com>
To: Dave Young <dyoung@redhat.com>
Cc: linux-kernel@vger.kernel.org, bhe@redhat.com, x86@kernel.org,
kexec@lists.infradead.org, mingo@redhat.com, bp@alien8.de,
tglx@linutronix.de, akpm@linux-foundation.org
Subject: Re: [PATCH 1/2 v7] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED'
Date: Thu, 22 Nov 2018 16:21:44 +0800 [thread overview]
Message-ID: <1f37d5c8-b919-8163-942a-660e7e7a964d@redhat.com> (raw)
In-Reply-To: <20181122074202.GA8524@dhcp-128-65.nay.redhat.com>
在 2018年11月22日 15:42, Dave Young 写道:
> On 11/15/18 at 05:55pm, Lianbo Jiang wrote:
>> The upstream kernel can not accurately add the e820 reserved type to
>> kdump krenel e820 table.
>>
>> Kdump uses walk_iomem_res_desc() to iterate io resources, then adds
>> the matched resource ranges to the e820 table for kdump kernel. But,
>> when convert the e820 type into the iores descriptor, several e820
>> types are converted to 'IORES_DESC_NONE' in this function e820_type
>> _to_iores_desc(). So the walk_iomem_res_desc() will get unnecessary
>> types(such as E820_TYPE_RAM/E820_TYPE_UNUSABLE/E820_TYPE_KERN) when
>> walk through io resources by the descriptor 'IORES_DESC_NONE'.
>>
>> This patch adds the new I/O resource descriptor 'IORES_DESC_RESERVED'
>> for the iomem resources search interfaces. It is helpful to exactly
>> match the reserved resource ranges when walking through iomem resources.
>>
>> Suggested-by: Dave Young <dyoung@redhat.com>
>> Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
>> ---
>> Changes since v5:
>> 1. Improve the patch log
>>
>> Changes since v6:
>> 1. Modify this patch, and add the new I/O resource descriptor
>> 'IORES_DESC_RESERVED' for the iomem resources search interfaces.
>> 2. Improve patch log.
>>
>> arch/x86/kernel/e820.c | 2 +-
>> include/linux/ioport.h | 1 +
>> 2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
>> index 50895c2f937d..57fafdafb860 100644
>> --- a/arch/x86/kernel/e820.c
>> +++ b/arch/x86/kernel/e820.c
>> @@ -1048,10 +1048,10 @@ static unsigned long __init e820_type_to_iores_desc(struct e820_entry *entry)
>> case E820_TYPE_NVS: return IORES_DESC_ACPI_NV_STORAGE;
>> case E820_TYPE_PMEM: return IORES_DESC_PERSISTENT_MEMORY;
>> case E820_TYPE_PRAM: return IORES_DESC_PERSISTENT_MEMORY_LEGACY;
>> + case E820_TYPE_RESERVED: return IORES_DESC_RESERVED;
>> case E820_TYPE_RESERVED_KERN: /* Fall-through: */
>> case E820_TYPE_RAM: /* Fall-through: */
>> case E820_TYPE_UNUSABLE: /* Fall-through: */
>> - case E820_TYPE_RESERVED: /* Fall-through: */
>> default: return IORES_DESC_NONE;
>> }
>> }
>> diff --git a/include/linux/ioport.h b/include/linux/ioport.h
>> index da0ebaec25f0..6ed59de48bd5 100644
>> --- a/include/linux/ioport.h
>> +++ b/include/linux/ioport.h
>> @@ -133,6 +133,7 @@ enum {
>> IORES_DESC_PERSISTENT_MEMORY_LEGACY = 5,
>> IORES_DESC_DEVICE_PRIVATE_MEMORY = 6,
>> IORES_DESC_DEVICE_PUBLIC_MEMORY = 7,
>> + IORES_DESC_RESERVED = 8,
>> };
>
> There more works for a new iores desc. Originally IORES_DESC_NONE
> is assumed to include reserved e820 type so all code path relates to
> IORES_DESC_NONE should be carefully checked and ensure they still work after
> your changes.
>
Thanks for your reminder.
I'm checking it, and also will resend v7 later. Please ignore this patch.
Regards,
Lianbo
>>
>> /* helpers to define resources */
>> --
>> 2.17.1
>>
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>
> Thanks
> Dave
>
next prev parent reply other threads:[~2018-11-22 8:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 9:55 [PATCH 0/2 v7] add reserved e820 ranges to the kdump kernel e820 table Lianbo Jiang
2018-11-15 9:55 ` [PATCH 1/2 v7] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED' Lianbo Jiang
2018-11-22 7:42 ` Dave Young
2018-11-22 8:21 ` lijiang [this message]
2018-11-15 9:55 ` [PATCH 2/2 v7] x86/kexec_file: add reserved e820 ranges to kdump kernel e820 table Lianbo Jiang
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=1f37d5c8-b919-8163-942a-660e7e7a964d@redhat.com \
--to=lijiang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®