Lines Matching defs:memory

9  * a SPARSEMEM-memory-model system's physical memory in /sysfs.
19 #include <linux/memory.h>
29 #define MEMORY_CLASS_NAME "memory"
113 * Show the first physical section index (number) of this memory block.
294 * covered by a memory block, allowing for identifying which memory blocks
295 * comprise a storage increment. Since a memory block spans complete
372 * Show the memory block size (shared by all memory blocks).
452 * Support for offlining pages of memory
498 * A reference for the returned memory block device is acquired.
543 * register_memory - Setup a sysfs device for a memory block
546 int register_memory(struct memory_block *memory)
550 memory->dev.bus = &memory_subsys;
551 memory->dev.id = memory->start_section_nr / sections_per_block;
552 memory->dev.release = memory_block_release;
553 memory->dev.groups = memory_memblk_attr_groups;
554 memory->dev.offline = memory->state == MEM_OFFLINE;
556 ret = device_register(&memory->dev);
558 put_device(&memory->dev);
561 ret = xa_err(xa_store(&memory_blocks, memory->dev.id, memory,
564 device_unregister(&memory->dev);
608 static void unregister_memory(struct memory_block *memory)
610 if (WARN_ON_ONCE(memory->dev.bus != &memory_subsys))
613 WARN_ON(xa_erase(&memory_blocks, memory->dev.id) == NULL);
616 put_device(&memory->dev);
617 device_unregister(&memory->dev);
621 * Create memory block devices for the given memory area. Start and size
622 * have to be aligned to memory block granularity. Memory block devices
658 * Remove memory block devices for the given memory area. Start and size
659 * have to be aligned to memory block granularity. Memory block devices
684 /* return true if the memory block is offlined, otherwise, return false */
715 * Initialize the sysfs support for memory devices. At the time this function
716 * is called, we cannot have concurrent creation/deletion of memory block
724 /* Validate the configured memory block size */
735 * Create entries for memory sections that were found
742 panic("%s() failed to add memory block: %d\n", __func__,
748 * walk_memory_blocks - walk through all present memory blocks overlapped
751 * @start: start address of the memory range
752 * @size: size of the memory range
754 * @func: callback for each memory section walked
756 * This function walks through all present memory blocks overlapped by the
757 * range [start, start + size), calling func on each memory block.
803 * for_each_memory_block - walk through all present memory blocks
806 * @func: callback for each memory block walked
808 * This function walks through all present memory blocks, calling func on
809 * each memory block.