mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
be433ab8f5
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. Link: https://lkml.kernel.org/r/20241204125444.1734652-6-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Baoquan He <bhe@redhat.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com> Cc: Cornelia Huck <cohuck@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Farman <farman@linux.ibm.com> Cc: Eugenio Pérez <eperezma@redhat.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Janosch Frank <frankja@linux.ibm.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Huth <thuth@redhat.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
35 lines
611 B
C
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 */
|