Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13588209 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (50 commits)
  x86, mm: Allow ZONE_DMA to be configurable
  x86, NUMA: Trim numa meminfo with max_pfn in a separate loop
  x86, NUMA: Rename setup_node_bootmem() to setup_node_data()
  x86, NUMA: Enable emulation on 32bit too
  x86, NUMA: Enable CONFIG_AMD_NUMA on 32bit too
  x86, NUMA: Rename amdtopology_64.c to amdtopology.c
  x86, NUMA: Make numa_init_array() static
  x86, NUMA: Make 32bit use common NUMA init path
  x86, NUMA: Initialize and use remap allocator from setup_node_bootmem()
  x86-32, NUMA: Add @start and @end to init_alloc_remap()
  x86, NUMA: Remove long 64bit assumption from numa.c
  x86, NUMA: Enable build of generic NUMA init code on 32bit
  x86, NUMA: Move NUMA init logic from numa_64.c to numa.c
  x86-32, NUMA: Update numaq to use new NUMA init protocol
  x86-32, NUMA: Replace srat_32.c with srat.c
  x86-32, NUMA: implement temporary NUMA init shims
  x86, NUMA: Move numa_nodes_parsed to numa.[hc]
  x86-32, NUMA: Move get_memcfg_numa() into numa_32.c
  x86, NUMA: make srat.c 32bit safe
  x86, NUMA: rename srat_64.c to srat.c
  ...
parents ac2941f5 dc382fd5
Loading
Loading
Loading
Loading
+23 −20
Original line number Diff line number Diff line
@@ -112,7 +112,14 @@ config MMU
	def_bool y

config ZONE_DMA
	def_bool y
	bool "DMA memory allocation support" if EXPERT
	default y
	help
	  DMA memory allocation support allows devices with less than 32-bit
	  addressing to allocate within the first 16MB of address space.
	  Disable if no such devices will be used.

	  If unsure, say Y.

config SBUS
	bool
@@ -1164,7 +1171,7 @@ comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
config AMD_NUMA
	def_bool y
	prompt "Old style AMD Opteron NUMA detection"
	depends on X86_64 && NUMA && PCI
	depends on NUMA && PCI
	---help---
	  Enable AMD NUMA node topology detection.  You should say Y here if
	  you have a multi processor AMD system. This uses an old method to
@@ -1191,7 +1198,7 @@ config NODES_SPAN_OTHER_NODES

config NUMA_EMU
	bool "NUMA emulation"
	depends on X86_64 && NUMA
	depends on NUMA
	---help---
	  Enable NUMA emulation. A flat machine will be split
	  into virtual nodes when booted with "numa=fake=N", where N is the
@@ -1213,6 +1220,10 @@ config HAVE_ARCH_BOOTMEM
	def_bool y
	depends on X86_32 && NUMA

config HAVE_ARCH_ALLOC_REMAP
	def_bool y
	depends on X86_32 && NUMA

config ARCH_HAVE_MEMORY_PRESENT
	def_bool y
	depends on X86_32 && DISCONTIGMEM
@@ -1221,13 +1232,9 @@ config NEED_NODE_MEMMAP_SIZE
	def_bool y
	depends on X86_32 && (DISCONTIGMEM || SPARSEMEM)

config HAVE_ARCH_ALLOC_REMAP
	def_bool y
	depends on X86_32 && NUMA

config ARCH_FLATMEM_ENABLE
	def_bool y
	depends on X86_32 && ARCH_SELECT_MEMORY_MODEL && !NUMA
	depends on X86_32 && !NUMA

config ARCH_DISCONTIGMEM_ENABLE
	def_bool y
@@ -1237,20 +1244,16 @@ config ARCH_DISCONTIGMEM_DEFAULT
	def_bool y
	depends on NUMA && X86_32

config ARCH_PROC_KCORE_TEXT
	def_bool y
	depends on X86_64 && PROC_KCORE

config ARCH_SPARSEMEM_DEFAULT
	def_bool y
	depends on X86_64

config ARCH_SPARSEMEM_ENABLE
	def_bool y
	depends on X86_64 || NUMA || (EXPERIMENTAL && X86_32) || X86_32_NON_STANDARD
	select SPARSEMEM_STATIC if X86_32
	select SPARSEMEM_VMEMMAP_ENABLE if X86_64

config ARCH_SPARSEMEM_DEFAULT
	def_bool y
	depends on X86_64

config ARCH_SELECT_MEMORY_MODEL
	def_bool y
	depends on ARCH_SPARSEMEM_ENABLE
@@ -1259,6 +1262,10 @@ config ARCH_MEMORY_PROBE
	def_bool X86_64
	depends on MEMORY_HOTPLUG

config ARCH_PROC_KCORE_TEXT
	def_bool y
	depends on X86_64 && PROC_KCORE

config ILLEGAL_POINTER_VALUE
       hex
       default 0 if X86_32
@@ -1693,10 +1700,6 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
	def_bool y
	depends on MEMORY_HOTPLUG

config HAVE_ARCH_EARLY_PFN_TO_NID
	def_bool X86_64
	depends on NUMA

config USE_PERCPU_NUMA_NODE_ID
	def_bool y
	depends on NUMA
+0 −2
Original line number Diff line number Diff line
@@ -183,8 +183,6 @@ static inline void disable_acpi(void) { }

#define ARCH_HAS_POWER_INIT	1

struct bootnode;

#ifdef CONFIG_ACPI_NUMA
extern int acpi_numa;
extern int x86_acpi_numa_init(void);
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ struct amd_nb_bus_dev_range {

extern const struct pci_device_id amd_nb_misc_ids[];
extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
struct bootnode;

extern bool early_is_amd_nb(u32 value);
extern int amd_cache_northbridges(void);
+6 −3
Original line number Diff line number Diff line
@@ -363,7 +363,12 @@ struct apic {
	 */
	int (*x86_32_early_logical_apicid)(int cpu);

	/* determine CPU -> NUMA node mapping */
	/*
	 * Optional method called from setup_local_APIC() after logical
	 * apicid is guaranteed to be known to initialize apicid -> node
	 * mapping if NUMA initialization hasn't done so already.  Don't
	 * add new users.
	 */
	int (*x86_32_numa_cpu_node)(int cpu);
#endif
};
@@ -537,8 +542,6 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
	return cpuid_apic >> index_msb;
}

extern int default_x86_32_numa_cpu_node(int cpu);

#endif

static inline unsigned int
+9 −4
Original line number Diff line number Diff line
@@ -208,8 +208,7 @@ extern const char * const x86_power_flags[32];
#define test_cpu_cap(c, bit)						\
	 test_bit(bit, (unsigned long *)((c)->x86_capability))

#define cpu_has(c, bit)							\
	(__builtin_constant_p(bit) &&					\
#define REQUIRED_MASK_BIT_SET(bit)					\
	 ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) ||	\
	   (((bit)>>5)==1 && (1UL<<((bit)&31) & REQUIRED_MASK1)) ||	\
	   (((bit)>>5)==2 && (1UL<<((bit)&31) & REQUIRED_MASK2)) ||	\
@@ -219,10 +218,16 @@ extern const char * const x86_power_flags[32];
	   (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) ||	\
	   (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ||	\
	   (((bit)>>5)==8 && (1UL<<((bit)&31) & REQUIRED_MASK8)) ||	\
	   (((bit)>>5)==9 && (1UL<<((bit)&31) & REQUIRED_MASK9)) )	\
	  ? 1 :								\
	   (((bit)>>5)==9 && (1UL<<((bit)&31) & REQUIRED_MASK9)) )

#define cpu_has(c, bit)							\
	(__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 :	\
	 test_cpu_cap(c, bit))

#define this_cpu_has(bit)						\
	(__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : 	\
	 x86_this_cpu_test_bit(bit, (unsigned long *)&cpu_info.x86_capability))

#define boot_cpu_has(bit)	cpu_has(&boot_cpu_data, bit)

#define set_cpu_cap(c, bit)	set_bit(bit, (unsigned long *)((c)->x86_capability))
Loading