linux/drivers/acpi/acpi_memhotplug.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2004, 2013 Intel Corporation
 * Author: Naveen B S <[email protected]>
 * Author: Rafael J. Wysocki <[email protected]>
 *
 * All rights reserved.
 *
 * ACPI based HotPlug driver that supports Memory Hotplug
 * This driver fields notifications from firmware for memory add
 * and remove operations and alerts the VM of the affected memory
 * ranges.
 */

#include <linux/acpi.h>
#include <linux/memory.h>
#include <linux/memory_hotplug.h>

#include "internal.h"

#define ACPI_MEMORY_DEVICE_CLASS
#define ACPI_MEMORY_DEVICE_HID
#define ACPI_MEMORY_DEVICE_NAME

static const struct acpi_device_id memory_device_ids[] =;

#ifdef CONFIG_ACPI_HOTPLUG_MEMORY

static int acpi_memory_device_add(struct acpi_device *device,
				  const struct acpi_device_id *not_used);
static void acpi_memory_device_remove(struct acpi_device *device);

static struct acpi_scan_handler memory_device_handler =;

struct acpi_memory_info {};

struct acpi_memory_device {};

static acpi_status
acpi_memory_get_resource(struct acpi_resource *resource, void *context)
{}

static void
acpi_memory_free_device_resources(struct acpi_memory_device *mem_device)
{}

static int
acpi_memory_get_device_resources(struct acpi_memory_device *mem_device)
{}

static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
{}

static int acpi_bind_memblk(struct memory_block *mem, void *arg)
{}

static int acpi_bind_memory_blocks(struct acpi_memory_info *info,
				   struct acpi_device *adev)
{}

static int acpi_unbind_memblk(struct memory_block *mem, void *arg)
{}

static void acpi_unbind_memory_blocks(struct acpi_memory_info *info)
{}

static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
{}

static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device)
{}

static void acpi_memory_device_free(struct acpi_memory_device *mem_device)
{}

static int acpi_memory_device_add(struct acpi_device *device,
				  const struct acpi_device_id *not_used)
{}

static void acpi_memory_device_remove(struct acpi_device *device)
{}

static bool __initdata acpi_no_memhotplug;

void __init acpi_memory_hotplug_init(void)
{}

static int __init disable_acpi_memory_hotplug(char *str)
{}
__setup();

#else

static struct acpi_scan_handler memory_device_handler = {
	.ids = memory_device_ids,
};

void __init acpi_memory_hotplug_init(void)
{
	acpi_scan_add_handler(&memory_device_handler);
}

#endif /* CONFIG_ACPI_HOTPLUG_MEMORY */