linux/include/linux/kcore.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * /proc/kcore definitions
   4 */
   5#ifndef _LINUX_KCORE_H
   6#define _LINUX_KCORE_H
   7
   8enum kcore_type {
   9        KCORE_TEXT,
  10        KCORE_VMALLOC,
  11        KCORE_RAM,
  12        KCORE_VMEMMAP,
  13        KCORE_USER,
  14        KCORE_OTHER,
  15        KCORE_REMAP,
  16};
  17
  18struct kcore_list {
  19        struct list_head list;
  20        unsigned long addr;
  21        unsigned long vaddr;
  22        size_t size;
  23        int type;
  24};
  25
  26struct vmcore {
  27        struct list_head list;
  28        unsigned long long paddr;
  29        unsigned long long size;
  30        loff_t offset;
  31};
  32
  33struct vmcoredd_node {
  34        struct list_head list;  /* List of dumps */
  35        void *buf;              /* Buffer containing device's dump */
  36        unsigned int size;      /* Size of the buffer */
  37};
  38
  39#ifdef CONFIG_PROC_KCORE
  40void __init kclist_add(struct kcore_list *, void *, size_t, int type);
  41
  42extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));
  43#else
  44static inline
  45void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
  46{
  47}
  48#endif
  49
  50#endif /* _LINUX_KCORE_H */
  51