Files
Centos-kernel-stream-9/include/linux/kcore.h
T
Thomas Huth 9d7fe3639e fs/proc/vmcore: move vmcore definitions out of kcore.h
JIRA: https://issues.redhat.com/browse/RHEL-72974

commit 819403c893551c5e93bf9087d334e01bcab5c6b9
Author: David Hildenbrand <david@redhat.com>
Date:   Wed Dec 4 13:54:36 2024 +0100

    fs/proc/vmcore: move vmcore definitions out of kcore.h

    These vmcore defines are not related to /proc/kcore, move them out.

    We'll move "struct vmcoredd_node" to vmcore.c, because it is only used
    internally. While "struct vmcore" is only used internally for now,
    we're planning on using it from inline functions in crash_dump.h next,
    so move it to crash_dump.h.

    While at it, rename "struct vmcore" to "struct vmcore_range", which is a
    more suitable name and will make the usage of it outside of vmcore.c
    clearer.

    Signed-off-by: David Hildenbrand <david@redhat.com>
    Message-Id: <20241204125444.1734652-6-david@redhat.com>
    Acked-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-05-12 13:03:15 +02:00

35 lines
611 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* /proc/kcore definitions
*/
#ifndef _LINUX_KCORE_H
#define _LINUX_KCORE_H
enum kcore_type {
KCORE_TEXT,
KCORE_VMALLOC,
KCORE_RAM,
KCORE_VMEMMAP,
KCORE_USER,
};
struct kcore_list {
struct list_head list;
unsigned long addr;
size_t size;
int type;
};
#ifdef CONFIG_PROC_KCORE
void __init kclist_add(struct kcore_list *, void *, size_t, int type);
extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));
#else
static inline
void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
{
}
#endif
#endif /* _LINUX_KCORE_H */