From: Toshi Kani <toshi.kani-ZPxbGqLxI0U@public.gmane.org> To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Toshi Kani <toshi.kani-ZPxbGqLxI0U@public.gmane.org>, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Minfei Huang <mhuang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Subject: [PATCH v3 14/17] x86, nvdimm, kexec: Use walk_iomem_res_desc() for iomem search Date: Tue, 5 Jan 2016 11:54:38 -0700 [thread overview] Message-ID: <1452020081-26534-14-git-send-email-toshi.kani@hpe.com> (raw) In-Reply-To: <1452020081-26534-1-git-send-email-toshi.kani-ZPxbGqLxI0U@public.gmane.org> Change the callers of walk_iomem_res() with the following names to use walk_iomem_res(), instead. "ACPI Tables" "ACPI Non-volatile Storage" "Persistent Memory (legacy)" "Crash kernel" Note, the caller of walk_iomem_res() with "GART" will be removed in a later patch. Cc: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org> Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: Minfei Huang <mhuang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Cc: kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Signed-off-by: Toshi Kani <toshi.kani-ZPxbGqLxI0U@public.gmane.org> --- arch/x86/kernel/crash.c | 4 ++-- arch/x86/kernel/pmem.c | 4 ++-- drivers/nvdimm/e820.c | 2 +- kernel/kexec_file.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 2c1910f..082373b 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -588,12 +588,12 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params) /* Add ACPI tables */ cmd.type = E820_ACPI; flags = IORESOURCE_MEM | IORESOURCE_BUSY; - walk_iomem_res("ACPI Tables", flags, 0, -1, &cmd, + walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1, &cmd, memmap_entry_callback); /* Add ACPI Non-volatile Storage */ cmd.type = E820_NVS; - walk_iomem_res("ACPI Non-volatile Storage", flags, 0, -1, &cmd, + walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1, &cmd, memmap_entry_callback); /* Add crashk_low_res region */ diff --git a/arch/x86/kernel/pmem.c b/arch/x86/kernel/pmem.c index 14415af..92f7014 100644 --- a/arch/x86/kernel/pmem.c +++ b/arch/x86/kernel/pmem.c @@ -13,11 +13,11 @@ static int found(u64 start, u64 end, void *data) static __init int register_e820_pmem(void) { - char *pmem = "Persistent Memory (legacy)"; struct platform_device *pdev; int rc; - rc = walk_iomem_res(pmem, IORESOURCE_MEM, 0, -1, NULL, found); + rc = walk_iomem_res_desc(IORES_DESC_PERSISTENT_MEMORY_LEGACY, + IORESOURCE_MEM, 0, -1, NULL, found); if (rc <= 0) return 0; diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c index b0045a5..95825b3 100644 --- a/drivers/nvdimm/e820.c +++ b/drivers/nvdimm/e820.c @@ -55,7 +55,7 @@ static int e820_pmem_probe(struct platform_device *pdev) for (p = iomem_resource.child; p ; p = p->sibling) { struct nd_region_desc ndr_desc; - if (strncmp(p->name, "Persistent Memory (legacy)", 26) != 0) + if (p->desc != IORES_DESC_PERSISTENT_MEMORY_LEGACY) continue; memset(&ndr_desc, 0, sizeof(ndr_desc)); diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index c245085..6e31cea 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -522,10 +522,10 @@ int kexec_add_buffer(struct kimage *image, char *buffer, unsigned long bufsz, /* Walk the RAM ranges and allocate a suitable range for the buffer */ if (image->type == KEXEC_TYPE_CRASH) - ret = walk_iomem_res("Crash kernel", - IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY, - crashk_res.start, crashk_res.end, kbuf, - locate_mem_hole_callback); + ret = walk_iomem_res_desc(crashk_res.desc, + IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY, + crashk_res.start, crashk_res.end, kbuf, + locate_mem_hole_callback); else ret = walk_system_ram_res(0, -1, kbuf, locate_mem_hole_callback);
WARNING: multiple messages have this Message-ID (diff)
From: Toshi Kani <toshi.kani@hpe.com> To: akpm@linux-foundation.org, bp@alien8.de Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dan Williams <dan.j.williams@intel.com>, Dave Young <dyoung@redhat.com>, Minfei Huang <mhuang@redhat.com>, x86@kernel.org, linux-nvdimm@lists.01.org, kexec@lists.infradead.org, Toshi Kani <toshi.kani@hpe.com> Subject: [PATCH v3 14/17] x86,nvdimm,kexec: Use walk_iomem_res_desc() for iomem search Date: Tue, 5 Jan 2016 11:54:38 -0700 [thread overview] Message-ID: <1452020081-26534-14-git-send-email-toshi.kani@hpe.com> (raw) Message-ID: <20160105185438.FG4DykgyuzsS_1C4MsvHlCVc0dRuAJ8jQpVcj9ErU-U@z> (raw) In-Reply-To: <1452020081-26534-1-git-send-email-toshi.kani@hpe.com> Change the callers of walk_iomem_res() with the following names to use walk_iomem_res(), instead. "ACPI Tables" "ACPI Non-volatile Storage" "Persistent Memory (legacy)" "Crash kernel" Note, the caller of walk_iomem_res() with "GART" will be removed in a later patch. Cc: Borislav Petkov <bp@alien8.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Young <dyoung@redhat.com> Cc: Minfei Huang <mhuang@redhat.com> Cc: x86@kernel.org Cc: linux-nvdimm@lists.01.org Cc: kexec@lists.infradead.org Signed-off-by: Toshi Kani <toshi.kani@hpe.com> --- arch/x86/kernel/crash.c | 4 ++-- arch/x86/kernel/pmem.c | 4 ++-- drivers/nvdimm/e820.c | 2 +- kernel/kexec_file.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 2c1910f..082373b 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -588,12 +588,12 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params) /* Add ACPI tables */ cmd.type = E820_ACPI; flags = IORESOURCE_MEM | IORESOURCE_BUSY; - walk_iomem_res("ACPI Tables", flags, 0, -1, &cmd, + walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1, &cmd, memmap_entry_callback); /* Add ACPI Non-volatile Storage */ cmd.type = E820_NVS; - walk_iomem_res("ACPI Non-volatile Storage", flags, 0, -1, &cmd, + walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1, &cmd, memmap_entry_callback); /* Add crashk_low_res region */ diff --git a/arch/x86/kernel/pmem.c b/arch/x86/kernel/pmem.c index 14415af..92f7014 100644 --- a/arch/x86/kernel/pmem.c +++ b/arch/x86/kernel/pmem.c @@ -13,11 +13,11 @@ static int found(u64 start, u64 end, void *data) static __init int register_e820_pmem(void) { - char *pmem = "Persistent Memory (legacy)"; struct platform_device *pdev; int rc; - rc = walk_iomem_res(pmem, IORESOURCE_MEM, 0, -1, NULL, found); + rc = walk_iomem_res_desc(IORES_DESC_PERSISTENT_MEMORY_LEGACY, + IORESOURCE_MEM, 0, -1, NULL, found); if (rc <= 0) return 0; diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c index b0045a5..95825b3 100644 --- a/drivers/nvdimm/e820.c +++ b/drivers/nvdimm/e820.c @@ -55,7 +55,7 @@ static int e820_pmem_probe(struct platform_device *pdev) for (p = iomem_resource.child; p ; p = p->sibling) { struct nd_region_desc ndr_desc; - if (strncmp(p->name, "Persistent Memory (legacy)", 26) != 0) + if (p->desc != IORES_DESC_PERSISTENT_MEMORY_LEGACY) continue; memset(&ndr_desc, 0, sizeof(ndr_desc)); diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index c245085..6e31cea 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -522,10 +522,10 @@ int kexec_add_buffer(struct kimage *image, char *buffer, unsigned long bufsz, /* Walk the RAM ranges and allocate a suitable range for the buffer */ if (image->type == KEXEC_TYPE_CRASH) - ret = walk_iomem_res("Crash kernel", - IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY, - crashk_res.start, crashk_res.end, kbuf, - locate_mem_hole_callback); + ret = walk_iomem_res_desc(crashk_res.desc, + IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY, + crashk_res.start, crashk_res.end, kbuf, + locate_mem_hole_callback); else ret = walk_system_ram_res(0, -1, kbuf, locate_mem_hole_callback);
next prev parent reply other threads:[~2016-01-05 18:54 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-05 18:54 [PATCH v3 01/17] resource: Add System RAM resource type Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 02/17] resource: make resource flags handled properly Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 03/17] resource: Add I/O resource descriptor Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 04/17] x86/e820: Set System RAM type and descriptor Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 05/17] ia64: " Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 19:04 ` Luck, Tony 2016-01-05 18:54 ` [PATCH v3 06/17] arch: Set IORESOURCE_SYSTEM_RAM to System RAM Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-24 18:00 ` Borislav Petkov 2016-01-24 18:00 ` Borislav Petkov 2016-01-05 18:54 ` [PATCH v3 07/17] kexec: " Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-07 12:38 ` Dave Young 2016-01-05 18:54 ` [PATCH v3 08/17] xen, mm: " Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 09/17] drivers: Initialize resource entry to zero Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 20:57 ` Helge Deller 2016-01-05 20:57 ` Helge Deller 2016-01-05 18:54 ` [PATCH v3 10/17] resource: Change walk_system_ram to use System RAM type Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 11/17] arm/samsung: Change s3c_pm_run_res() " Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 12/17] memremap: Change region_intersects() to take @flags and @desc Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-05 18:54 ` [PATCH v3 13/17] resource: Add walk_iomem_res_desc() Toshi Kani 2016-01-05 18:54 ` Toshi Kani [not found] ` <1452020081-26534-1-git-send-email-toshi.kani-ZPxbGqLxI0U@public.gmane.org> 2016-01-05 18:54 ` Toshi Kani [this message] 2016-01-05 18:54 ` [PATCH v3 14/17] x86,nvdimm,kexec: Use walk_iomem_res_desc() for iomem search Toshi Kani 2016-01-07 12:39 ` Dave Young 2016-01-05 18:54 ` [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-07 12:37 ` Dave Young 2016-01-05 18:54 ` [PATCH v3 16/17] resource: Kill walk_iomem_res() Toshi Kani 2016-01-05 18:54 ` Toshi Kani 2016-01-07 12:40 ` Dave Young 2016-01-07 12:40 ` Dave Young 2016-01-05 18:54 ` [PATCH v3 17/17] ACPI/EINJ: Allow memory error injection to NVDIMM Toshi Kani 2016-01-05 18:54 ` Toshi Kani
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=1452020081-26534-14-git-send-email-toshi.kani@hpe.com \ --to=toshi.kani-zpxbgqlxi0u@public.gmane.org \ --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \ --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \ --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \ --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \ --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \ --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \ --cc=mhuang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \ --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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: linkBe 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; as well as URLs for NNTP newsgroup(s).