Commit 8b136018 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

mm: rename CONFIG_PGTABLE_MAPPING to CONFIG_ZSMALLOC_PGTABLE_MAPPING



Rename the Kconfig variable to clarify the scope.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: Gao Xiang <xiang@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Kelley <mikelley@microsoft.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Link: http://lkml.kernel.org/r/20200414131348.444715-11-hch@lst.de


Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8f87cc93
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -81,7 +81,7 @@ CONFIG_PARTITION_ADVANCED=y
CONFIG_BINFMT_MISC=y
CONFIG_BINFMT_MISC=y
CONFIG_CMA=y
CONFIG_CMA=y
CONFIG_ZSMALLOC=m
CONFIG_ZSMALLOC=m
CONFIG_PGTABLE_MAPPING=y
CONFIG_ZSMALLOC_PGTABLE_MAPPING=y
CONFIG_NET=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_UNIX=y
+1 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@
 * zsmalloc mapping modes
 * zsmalloc mapping modes
 *
 *
 * NOTE: These only make a difference when a mapped object spans pages.
 * NOTE: These only make a difference when a mapped object spans pages.
 * They also have no effect when PGTABLE_MAPPING is selected.
 * They also have no effect when ZSMALLOC_PGTABLE_MAPPING is selected.
 */
 */
enum zs_mapmode {
enum zs_mapmode {
	ZS_MM_RW, /* normal read-write mapping */
	ZS_MM_RW, /* normal read-write mapping */
+1 −1
Original line number Original line Diff line number Diff line
@@ -705,7 +705,7 @@ config ZSMALLOC
	  returned by an alloc().  This handle must be mapped in order to
	  returned by an alloc().  This handle must be mapped in order to
	  access the allocated space.
	  access the allocated space.


config PGTABLE_MAPPING
config ZSMALLOC_PGTABLE_MAPPING
	bool "Use page table mapping to access object in zsmalloc"
	bool "Use page table mapping to access object in zsmalloc"
	depends on ZSMALLOC
	depends on ZSMALLOC
	help
	help
+4 −4
Original line number Original line Diff line number Diff line
@@ -293,7 +293,7 @@ struct zspage {
};
};


struct mapping_area {
struct mapping_area {
#ifdef CONFIG_PGTABLE_MAPPING
#ifdef CONFIG_ZSMALLOC_PGTABLE_MAPPING
	struct vm_struct *vm; /* vm area for mapping object that span pages */
	struct vm_struct *vm; /* vm area for mapping object that span pages */
#else
#else
	char *vm_buf; /* copy buffer for objects that span pages */
	char *vm_buf; /* copy buffer for objects that span pages */
@@ -1113,7 +1113,7 @@ static struct zspage *find_get_zspage(struct size_class *class)
	return zspage;
	return zspage;
}
}


#ifdef CONFIG_PGTABLE_MAPPING
#ifdef CONFIG_ZSMALLOC_PGTABLE_MAPPING
static inline int __zs_cpu_up(struct mapping_area *area)
static inline int __zs_cpu_up(struct mapping_area *area)
{
{
	/*
	/*
@@ -1151,7 +1151,7 @@ static inline void __zs_unmap_object(struct mapping_area *area,
	unmap_kernel_range(addr, PAGE_SIZE * 2);
	unmap_kernel_range(addr, PAGE_SIZE * 2);
}
}


#else /* CONFIG_PGTABLE_MAPPING */
#else /* CONFIG_ZSMALLOC_PGTABLE_MAPPING */


static inline int __zs_cpu_up(struct mapping_area *area)
static inline int __zs_cpu_up(struct mapping_area *area)
{
{
@@ -1233,7 +1233,7 @@ static void __zs_unmap_object(struct mapping_area *area,
	pagefault_enable();
	pagefault_enable();
}
}


#endif /* CONFIG_PGTABLE_MAPPING */
#endif /* CONFIG_ZSMALLOC_PGTABLE_MAPPING */


static int zs_cpu_prepare(unsigned int cpu)
static int zs_cpu_prepare(unsigned int cpu)
{
{