mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header
The macro MIN_MEMORY_BLOCK_SIZE is currently defined twice in two .c files, and I need it in a third one to fix a powerpc bug, so let's first move it into a header Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
620917de59
commit
a63fdc5156
@ -28,6 +28,7 @@
|
|||||||
#include <linux/poison.h>
|
#include <linux/poison.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/memory.h>
|
||||||
#include <linux/memory_hotplug.h>
|
#include <linux/memory_hotplug.h>
|
||||||
#include <linux/nmi.h>
|
#include <linux/nmi.h>
|
||||||
#include <linux/gfp.h>
|
#include <linux/gfp.h>
|
||||||
@ -895,8 +896,6 @@ const char *arch_vma_name(struct vm_area_struct *vma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_UV
|
#ifdef CONFIG_X86_UV
|
||||||
#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)
|
|
||||||
|
|
||||||
unsigned long memory_block_size_bytes(void)
|
unsigned long memory_block_size_bytes(void)
|
||||||
{
|
{
|
||||||
if (is_uv_system()) {
|
if (is_uv_system()) {
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
static DEFINE_MUTEX(mem_sysfs_mutex);
|
static DEFINE_MUTEX(mem_sysfs_mutex);
|
||||||
|
|
||||||
#define MEMORY_CLASS_NAME "memory"
|
#define MEMORY_CLASS_NAME "memory"
|
||||||
#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)
|
|
||||||
|
|
||||||
static int sections_per_block;
|
static int sections_per_block;
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
|
#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)
|
||||||
|
|
||||||
struct memory_block {
|
struct memory_block {
|
||||||
unsigned long start_section_nr;
|
unsigned long start_section_nr;
|
||||||
unsigned long end_section_nr;
|
unsigned long end_section_nr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user