Commit 8c6580bc authored by Tim Gardner's avatar Tim Gardner

Revert "mm: CONFIG_NR_ZONES_EXTENDED"

BugLink: http://bugs.launchpad.net/bugs/1563293

This reverts commit f671c3e6.

This patch never made it upstream. Instead, commit
b11a7b94 ('mm: exclude ZONE_DEVICE from GFP_ZONE_TABLE')
replaced it.
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 5102b0c4
...@@ -1375,10 +1375,8 @@ config NUMA_EMU ...@@ -1375,10 +1375,8 @@ config NUMA_EMU
config NODES_SHIFT config NODES_SHIFT
int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
range 1 10 if !NR_ZONES_EXTENDED range 1 10
range 1 9 if NR_ZONES_EXTENDED default "10" if MAXSMP
default "10" if MAXSMP && !NR_ZONES_EXTENDED
default "9" if MAXSMP && NR_ZONES_EXTENDED
default "6" if X86_64 default "6" if X86_64
default "3" default "3"
depends on NEED_MULTIPLE_NODES depends on NEED_MULTIPLE_NODES
......
...@@ -260,7 +260,6 @@ CONFIG_NFC=m ...@@ -260,7 +260,6 @@ CONFIG_NFC=m
CONFIG_NODES_SHIFT=6 CONFIG_NODES_SHIFT=6
CONFIG_NOZOMI=m CONFIG_NOZOMI=m
CONFIG_NR_CPUS=256 CONFIG_NR_CPUS=256
CONFIG_NR_ZONES_EXTENDED=y
CONFIG_NTB=m CONFIG_NTB=m
# CONFIG_NTFS_RW is not set # CONFIG_NTFS_RW is not set
CONFIG_NUMA=y CONFIG_NUMA=y
......
...@@ -253,7 +253,6 @@ CONFIG_NEW_LEDS=y ...@@ -253,7 +253,6 @@ CONFIG_NEW_LEDS=y
CONFIG_NFC=m CONFIG_NFC=m
CONFIG_NOZOMI=m CONFIG_NOZOMI=m
CONFIG_NR_CPUS=4 CONFIG_NR_CPUS=4
# CONFIG_NR_ZONES_EXTENDED is not set
CONFIG_NTB=m CONFIG_NTB=m
# CONFIG_NTFS_RW is not set # CONFIG_NTFS_RW is not set
CONFIG_NVMEM=m CONFIG_NVMEM=m
......
...@@ -257,7 +257,6 @@ CONFIG_NEW_LEDS=y ...@@ -257,7 +257,6 @@ CONFIG_NEW_LEDS=y
CONFIG_NFC=m CONFIG_NFC=m
CONFIG_NOZOMI=m CONFIG_NOZOMI=m
CONFIG_NR_CPUS=8 CONFIG_NR_CPUS=8
# CONFIG_NR_ZONES_EXTENDED is not set
CONFIG_NTB=m CONFIG_NTB=m
# CONFIG_NTFS_RW is not set # CONFIG_NTFS_RW is not set
CONFIG_NVMEM=m CONFIG_NVMEM=m
......
...@@ -250,7 +250,6 @@ CONFIG_NEW_LEDS=y ...@@ -250,7 +250,6 @@ CONFIG_NEW_LEDS=y
CONFIG_NFC=m CONFIG_NFC=m
CONFIG_NODES_SHIFT=8 CONFIG_NODES_SHIFT=8
CONFIG_NOZOMI=m CONFIG_NOZOMI=m
# CONFIG_NR_ZONES_EXTENDED is not set
CONFIG_NTB=m CONFIG_NTB=m
# CONFIG_NTFS_RW is not set # CONFIG_NTFS_RW is not set
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
......
...@@ -322,29 +322,22 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) ...@@ -322,29 +322,22 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
* 0xe => BAD (MOVABLE+DMA32+HIGHMEM) * 0xe => BAD (MOVABLE+DMA32+HIGHMEM)
* 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA) * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA)
* *
* GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms. * ZONES_SHIFT must be <= 2 on 32 bit platforms.
*/ */
#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4 #if 16 * ZONES_SHIFT > BITS_PER_LONG
/* ZONE_DEVICE is not a valid GFP zone specifier */ #error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer
#define GFP_ZONES_SHIFT 2
#else
#define GFP_ZONES_SHIFT ZONES_SHIFT
#endif
#if 16 * GFP_ZONES_SHIFT > BITS_PER_LONG
#error GFP_ZONES_SHIFT too large to create GFP_ZONE_TABLE integer
#endif #endif
#define GFP_ZONE_TABLE ( \ #define GFP_ZONE_TABLE ( \
(ZONE_NORMAL << 0 * GFP_ZONES_SHIFT) \ (ZONE_NORMAL << 0 * ZONES_SHIFT) \
| (OPT_ZONE_DMA << ___GFP_DMA * GFP_ZONES_SHIFT) \ | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \
| (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * GFP_ZONES_SHIFT) \ | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \
| (OPT_ZONE_DMA32 << ___GFP_DMA32 * GFP_ZONES_SHIFT) \ | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \
| (ZONE_NORMAL << ___GFP_MOVABLE * GFP_ZONES_SHIFT) \ | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \
| (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * GFP_ZONES_SHIFT) \ | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \
| (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * GFP_ZONES_SHIFT) \ | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \
| (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * GFP_ZONES_SHIFT) \ | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \
) )
/* /*
...@@ -369,8 +362,8 @@ static inline enum zone_type gfp_zone(gfp_t flags) ...@@ -369,8 +362,8 @@ static inline enum zone_type gfp_zone(gfp_t flags)
enum zone_type z; enum zone_type z;
int bit = (__force int) (flags & GFP_ZONEMASK); int bit = (__force int) (flags & GFP_ZONEMASK);
z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) & z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) &
((1 << GFP_ZONES_SHIFT) - 1); ((1 << ZONES_SHIFT) - 1);
VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1); VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
return z; return z;
} }
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#define ZONES_SHIFT 1 #define ZONES_SHIFT 1
#elif MAX_NR_ZONES <= 4 #elif MAX_NR_ZONES <= 4
#define ZONES_SHIFT 2 #define ZONES_SHIFT 2
#elif MAX_NR_ZONES <= 8
#define ZONES_SHIFT 3
#else #else
#error ZONES_SHIFT -- too many zones configured adjust calculation #error ZONES_SHIFT -- too many zones configured adjust calculation
#endif #endif
......
...@@ -651,6 +651,8 @@ config IDLE_PAGE_TRACKING ...@@ -651,6 +651,8 @@ config IDLE_PAGE_TRACKING
config ZONE_DEVICE config ZONE_DEVICE
bool "Device memory (pmem, etc...) hotplug support" if EXPERT bool "Device memory (pmem, etc...) hotplug support" if EXPERT
default !ZONE_DMA
depends on !ZONE_DMA
depends on MEMORY_HOTPLUG depends on MEMORY_HOTPLUG
depends on MEMORY_HOTREMOVE depends on MEMORY_HOTREMOVE
depends on X86_64 #arch_add_memory() comprehends device memory depends on X86_64 #arch_add_memory() comprehends device memory
...@@ -664,10 +666,5 @@ config ZONE_DEVICE ...@@ -664,10 +666,5 @@ config ZONE_DEVICE
If FS_DAX is enabled, then say Y. If FS_DAX is enabled, then say Y.
config NR_ZONES_EXTENDED
bool
default n if !64BIT
default y if ZONE_DEVICE && ZONE_DMA && ZONE_DMA32
config FRAME_VECTOR config FRAME_VECTOR
bool bool
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment