~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pstore_zone.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 
  3 #ifndef __PSTORE_ZONE_H_
  4 #define __PSTORE_ZONE_H_
  5 
  6 #include <linux/types.h>
  7 
  8 typedef ssize_t (*pstore_zone_read_op)(char *, size_t, loff_t);
  9 typedef ssize_t (*pstore_zone_write_op)(const char *, size_t, loff_t);
 10 typedef ssize_t (*pstore_zone_erase_op)(size_t, loff_t);
 11 /**
 12  * struct pstore_zone_info - pstore/zone back-end driver structure
 13  *
 14  * @owner:      Module which is responsible for this back-end driver.
 15  * @name:       Name of the back-end driver.
 16  * @total_size: The total size in bytes pstore/zone can use. It must be greater
 17  *              than 4096 and be multiple of 4096.
 18  * @kmsg_size:  The size of oops/panic zone. Zero means disabled, otherwise,
 19  *              it must be multiple of SECTOR_SIZE(512 Bytes).
 20  * @max_reason: Maximum kmsg dump reason to store.
 21  * @pmsg_size:  The size of pmsg zone which is the same as @kmsg_size.
 22  * @console_size:The size of console zone which is the same as @kmsg_size.
 23  * @ftrace_size:The size of ftrace zone which is the same as @kmsg_size.
 24  * @read:       The general read operation. Both of the function parameters
 25  *              @size and @offset are relative value to storage.
 26  *              On success, the number of bytes should be returned, others
 27  *              mean error.
 28  * @write:      The same as @read, but the following error number:
 29  *              -EBUSY means try to write again later.
 30  *              -ENOMSG means to try next zone.
 31  * @erase:      The general erase operation for device with special removing
 32  *              job. Both of the function parameters @size and @offset are
 33  *              relative value to storage.
 34  *              Return 0 on success and others on failure.
 35  * @panic_write:The write operation only used for panic case. It's optional
 36  *              if you do not care panic log. The parameters are relative
 37  *              value to storage.
 38  *              On success, the number of bytes should be returned, others
 39  *              excluding -ENOMSG mean error. -ENOMSG means to try next zone.
 40  */
 41 struct pstore_zone_info {
 42         struct module *owner;
 43         const char *name;
 44 
 45         unsigned long total_size;
 46         unsigned long kmsg_size;
 47         int max_reason;
 48         unsigned long pmsg_size;
 49         unsigned long console_size;
 50         unsigned long ftrace_size;
 51         pstore_zone_read_op read;
 52         pstore_zone_write_op write;
 53         pstore_zone_erase_op erase;
 54         pstore_zone_write_op panic_write;
 55 };
 56 
 57 extern int register_pstore_zone(struct pstore_zone_info *info);
 58 extern void unregister_pstore_zone(struct pstore_zone_info *info);
 59 
 60 #endif
 61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php