* [PATCH 0/2] ZONE_DEVICE cleanups
@ 2016-06-25 17:40 Dan Williams
2016-06-25 17:41 ` [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT Dan Williams
2016-06-25 17:41 ` [PATCH 2/2] mm: cleanup ifdef guards for vmem_altmap Dan Williams
0 siblings, 2 replies; 4+ messages in thread
From: Dan Williams @ 2016-06-25 17:40 UTC (permalink / raw)
To: akpm
Cc: Eric Sandeen, linux-nvdimm, linux-kernel, linux-mm, Jeff Moyer,
Vlastimil Babka
Minor cleanups for CONFIG_ZONE_DEVICE.
Andrew, killing the CONFIG_EXPERT dependency might be worth applying for
4.7, but otherwise these can wait for 4.8. These have received a "build
success" notification from the kbuild robot over 58 configs. Please
apply, or ack and I'll queue them with the rest of the libnvdimm-for-4.8
updates.
---
Dan Williams (2):
mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT
mm: cleanup ifdef guards for vmem_altmap
include/linux/memremap.h | 2 +-
kernel/memremap.c | 8 --------
mm/Kconfig | 2 +-
3 files changed, 2 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT
2016-06-25 17:40 [PATCH 0/2] ZONE_DEVICE cleanups Dan Williams
@ 2016-06-25 17:41 ` Dan Williams
2016-06-27 13:39 ` Jeff Moyer
2016-06-25 17:41 ` [PATCH 2/2] mm: cleanup ifdef guards for vmem_altmap Dan Williams
1 sibling, 1 reply; 4+ messages in thread
From: Dan Williams @ 2016-06-25 17:41 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Eric Sandeen, Jeff Moyer, linux-kernel, linux-nvdimm
When it was first introduced CONFIG_ZONE_DEVICE depended on disabling
CONFIG_ZONE_DMA, a configuration choice reserved for "experts".
However, now that the ZONE_DMA conflict has been eliminated it no longer
makes sense to require CONFIG_EXPERT.
Reported-by: Eric Sandeen <sandeen@redhat.com>
Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
mm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 3e2daef3c946..d109a7a0c1c4 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -673,7 +673,7 @@ config IDLE_PAGE_TRACKING
See Documentation/vm/idle_page_tracking.txt for more details.
config ZONE_DEVICE
- bool "Device memory (pmem, etc...) hotplug support" if EXPERT
+ bool "Device memory (pmem, etc...) hotplug support"
depends on MEMORY_HOTPLUG
depends on MEMORY_HOTREMOVE
depends on SPARSEMEM_VMEMMAP
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mm: cleanup ifdef guards for vmem_altmap
2016-06-25 17:40 [PATCH 0/2] ZONE_DEVICE cleanups Dan Williams
2016-06-25 17:41 ` [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT Dan Williams
@ 2016-06-25 17:41 ` Dan Williams
1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2016-06-25 17:41 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, Vlastimil Babka, linux-nvdimm
Now that ZONE_DEVICE depends on SPARSEMEM_VMEMMAP we can simplify some
ifdef guards to just ZONE_DEVICE.
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
include/linux/memremap.h | 2 +-
kernel/memremap.c | 8 --------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/include/linux/memremap.h b/include/linux/memremap.h
index bcaa634139a9..93416196ba64 100644
--- a/include/linux/memremap.h
+++ b/include/linux/memremap.h
@@ -26,7 +26,7 @@ struct vmem_altmap {
unsigned long vmem_altmap_offset(struct vmem_altmap *altmap);
void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns);
-#if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_ZONE_DEVICE)
+#ifdef CONFIG_ZONE_DEVICE
struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start);
#else
static inline struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start)
diff --git a/kernel/memremap.c b/kernel/memremap.c
index 017532193fb1..ddb3247a872a 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -308,12 +308,6 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
if (is_ram == REGION_INTERSECTS)
return __va(res->start);
- if (altmap && !IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP)) {
- dev_err(dev, "%s: altmap requires CONFIG_SPARSEMEM_VMEMMAP=y\n",
- __func__);
- return ERR_PTR(-ENXIO);
- }
-
if (!ref)
return ERR_PTR(-EINVAL);
@@ -401,7 +395,6 @@ void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns)
altmap->alloc -= nr_pfns;
}
-#ifdef CONFIG_SPARSEMEM_VMEMMAP
struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start)
{
/*
@@ -427,5 +420,4 @@ struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start)
return pgmap ? pgmap->altmap : NULL;
}
-#endif /* CONFIG_SPARSEMEM_VMEMMAP */
#endif /* CONFIG_ZONE_DEVICE */
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT
2016-06-25 17:41 ` [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT Dan Williams
@ 2016-06-27 13:39 ` Jeff Moyer
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Moyer @ 2016-06-27 13:39 UTC (permalink / raw)
To: Dan Williams; +Cc: akpm, linux-mm, Eric Sandeen, linux-kernel, linux-nvdimm
Dan Williams <dan.j.williams@intel.com> writes:
> When it was first introduced CONFIG_ZONE_DEVICE depended on disabling
> CONFIG_ZONE_DMA, a configuration choice reserved for "experts".
> However, now that the ZONE_DMA conflict has been eliminated it no longer
> makes sense to require CONFIG_EXPERT.
>
> Reported-by: Eric Sandeen <sandeen@redhat.com>
> Reported-by: Jeff Moyer <jmoyer@redhat.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
> ---
> mm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 3e2daef3c946..d109a7a0c1c4 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -673,7 +673,7 @@ config IDLE_PAGE_TRACKING
> See Documentation/vm/idle_page_tracking.txt for more details.
>
> config ZONE_DEVICE
> - bool "Device memory (pmem, etc...) hotplug support" if EXPERT
> + bool "Device memory (pmem, etc...) hotplug support"
> depends on MEMORY_HOTPLUG
> depends on MEMORY_HOTREMOVE
> depends on SPARSEMEM_VMEMMAP
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-27 13:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-25 17:40 [PATCH 0/2] ZONE_DEVICE cleanups Dan Williams
2016-06-25 17:41 ` [PATCH 1/2] mm: CONFIG_ZONE_DEVICE stop depending on CONFIG_EXPERT Dan Williams
2016-06-27 13:39 ` Jeff Moyer
2016-06-25 17:41 ` [PATCH 2/2] mm: cleanup ifdef guards for vmem_altmap Dan Williams
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).