mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 23:46:09 +07:00
692f66f26a
Patch series "kexec/fadump: remove dependency with CONFIG_KEXEC and reuse crashkernel parameter for fadump", v4. Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel parameter can be a reused, for memory reservation, by such architecture specific infrastructure. This patchset removes dependency with CONFIG_KEXEC for crashkernel parameter and vmcoreinfo related code as it can be reused without kexec support. Also, crashkernel parameter is reused instead of fadump_reserve_mem to reserve memory for fadump. The first patch moves crashkernel parameter parsing and vmcoreinfo related code under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE. The second patch reuses the definitions of append_elf_note() & final_note() functions under CONFIG_CRASH_CORE in IA64 arch code. The third patch removes dependency on CONFIG_KEXEC for firmware-assisted dump (fadump) in powerpc. The next patch reuses crashkernel parameter for reserving memory for fadump, instead of the fadump_reserve_mem parameter. This has the advantage of using all syntaxes crashkernel parameter supports, for fadump as well. The last patch updates fadump kernel documentation about use of crashkernel parameter. This patch (of 5): Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel parameter can be a reused, for memory reservation, by such architecture specific infrastructure. But currently, code related to vmcoreinfo and parsing of crashkernel parameter is built under CONFIG_KEXEC_CORE. This patch introduces CONFIG_CRASH_CORE and moves the above mentioned code under this config, allowing code reuse without dependency on CONFIG_KEXEC. There is no functional change with this patch. Link: http://lkml.kernel.org/r/149035338104.6881.4550894432615189948.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com> Acked-by: Dave Young <dyoung@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
527 lines
14 KiB
C
527 lines
14 KiB
C
#ifndef __KERNEL_PRINTK__
|
|
#define __KERNEL_PRINTK__
|
|
|
|
#include <stdarg.h>
|
|
#include <linux/init.h>
|
|
#include <linux/kern_levels.h>
|
|
#include <linux/linkage.h>
|
|
#include <linux/cache.h>
|
|
|
|
extern const char linux_banner[];
|
|
extern const char linux_proc_banner[];
|
|
|
|
#define PRINTK_MAX_SINGLE_HEADER_LEN 2
|
|
|
|
static inline int printk_get_level(const char *buffer)
|
|
{
|
|
if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
|
|
switch (buffer[1]) {
|
|
case '0' ... '7':
|
|
case 'd': /* KERN_DEFAULT */
|
|
case 'c': /* KERN_CONT */
|
|
return buffer[1];
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static inline const char *printk_skip_level(const char *buffer)
|
|
{
|
|
if (printk_get_level(buffer))
|
|
return buffer + 2;
|
|
|
|
return buffer;
|
|
}
|
|
|
|
static inline const char *printk_skip_headers(const char *buffer)
|
|
{
|
|
while (printk_get_level(buffer))
|
|
buffer = printk_skip_level(buffer);
|
|
|
|
return buffer;
|
|
}
|
|
|
|
#define CONSOLE_EXT_LOG_MAX 8192
|
|
|
|
/* printk's without a loglevel use this.. */
|
|
#define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT
|
|
|
|
/* We show everything that is MORE important than this.. */
|
|
#define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */
|
|
#define CONSOLE_LOGLEVEL_MIN 1 /* Minimum loglevel we let people use */
|
|
#define CONSOLE_LOGLEVEL_QUIET 4 /* Shhh ..., when booted with "quiet" */
|
|
#define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
|
|
#define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
|
|
|
|
/*
|
|
* Default used to be hard-coded at 7, we're now allowing it to be set from
|
|
* kernel config.
|
|
*/
|
|
#define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT
|
|
|
|
extern int console_printk[];
|
|
|
|
#define console_loglevel (console_printk[0])
|
|
#define default_message_loglevel (console_printk[1])
|
|
#define minimum_console_loglevel (console_printk[2])
|
|
#define default_console_loglevel (console_printk[3])
|
|
|
|
static inline void console_silent(void)
|
|
{
|
|
console_loglevel = CONSOLE_LOGLEVEL_SILENT;
|
|
}
|
|
|
|
static inline void console_verbose(void)
|
|
{
|
|
if (console_loglevel)
|
|
console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
|
|
}
|
|
|
|
/* strlen("ratelimit") + 1 */
|
|
#define DEVKMSG_STR_MAX_SIZE 10
|
|
extern char devkmsg_log_str[];
|
|
struct ctl_table;
|
|
|
|
struct va_format {
|
|
const char *fmt;
|
|
va_list *va;
|
|
};
|
|
|
|
/*
|
|
* FW_BUG
|
|
* Add this to a message where you are sure the firmware is buggy or behaves
|
|
* really stupid or out of spec. Be aware that the responsible BIOS developer
|
|
* should be able to fix this issue or at least get a concrete idea of the
|
|
* problem by reading your message without the need of looking at the kernel
|
|
* code.
|
|
*
|
|
* Use it for definite and high priority BIOS bugs.
|
|
*
|
|
* FW_WARN
|
|
* Use it for not that clear (e.g. could the kernel messed up things already?)
|
|
* and medium priority BIOS bugs.
|
|
*
|
|
* FW_INFO
|
|
* Use this one if you want to tell the user or vendor about something
|
|
* suspicious, but generally harmless related to the firmware.
|
|
*
|
|
* Use it for information or very low priority BIOS bugs.
|
|
*/
|
|
#define FW_BUG "[Firmware Bug]: "
|
|
#define FW_WARN "[Firmware Warn]: "
|
|
#define FW_INFO "[Firmware Info]: "
|
|
|
|
/*
|
|
* HW_ERR
|
|
* Add this to a message for hardware errors, so that user can report
|
|
* it to hardware vendor instead of LKML or software vendor.
|
|
*/
|
|
#define HW_ERR "[Hardware Error]: "
|
|
|
|
/*
|
|
* DEPRECATED
|
|
* Add this to a message whenever you want to warn user space about the use
|
|
* of a deprecated aspect of an API so they can stop using it
|
|
*/
|
|
#define DEPRECATED "[Deprecated]: "
|
|
|
|
/*
|
|
* Dummy printk for disabled debugging statements to use whilst maintaining
|
|
* gcc's format checking.
|
|
*/
|
|
#define no_printk(fmt, ...) \
|
|
({ \
|
|
do { \
|
|
if (0) \
|
|
printk(fmt, ##__VA_ARGS__); \
|
|
} while (0); \
|
|
0; \
|
|
})
|
|
|
|
#ifdef CONFIG_EARLY_PRINTK
|
|
extern asmlinkage __printf(1, 2)
|
|
void early_printk(const char *fmt, ...);
|
|
#else
|
|
static inline __printf(1, 2) __cold
|
|
void early_printk(const char *s, ...) { }
|
|
#endif
|
|
|
|
#ifdef CONFIG_PRINTK_NMI
|
|
extern void printk_nmi_enter(void);
|
|
extern void printk_nmi_exit(void);
|
|
#else
|
|
static inline void printk_nmi_enter(void) { }
|
|
static inline void printk_nmi_exit(void) { }
|
|
#endif /* PRINTK_NMI */
|
|
|
|
#ifdef CONFIG_PRINTK
|
|
asmlinkage __printf(5, 0)
|
|
int vprintk_emit(int facility, int level,
|
|
const char *dict, size_t dictlen,
|
|
const char *fmt, va_list args);
|
|
|
|
asmlinkage __printf(1, 0)
|
|
int vprintk(const char *fmt, va_list args);
|
|
|
|
asmlinkage __printf(5, 6) __cold
|
|
int printk_emit(int facility, int level,
|
|
const char *dict, size_t dictlen,
|
|
const char *fmt, ...);
|
|
|
|
asmlinkage __printf(1, 2) __cold
|
|
int printk(const char *fmt, ...);
|
|
|
|
/*
|
|
* Special printk facility for scheduler/timekeeping use only, _DO_NOT_USE_ !
|
|
*/
|
|
__printf(1, 2) __cold int printk_deferred(const char *fmt, ...);
|
|
|
|
/*
|
|
* Please don't use printk_ratelimit(), because it shares ratelimiting state
|
|
* with all other unrelated printk_ratelimit() callsites. Instead use
|
|
* printk_ratelimited() or plain old __ratelimit().
|
|
*/
|
|
extern int __printk_ratelimit(const char *func);
|
|
#define printk_ratelimit() __printk_ratelimit(__func__)
|
|
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
|
unsigned int interval_msec);
|
|
|
|
extern int printk_delay_msec;
|
|
extern int dmesg_restrict;
|
|
extern int kptr_restrict;
|
|
|
|
extern int
|
|
devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,
|
|
size_t *lenp, loff_t *ppos);
|
|
|
|
extern void wake_up_klogd(void);
|
|
|
|
char *log_buf_addr_get(void);
|
|
u32 log_buf_len_get(void);
|
|
void log_buf_vmcoreinfo_setup(void);
|
|
void __init setup_log_buf(int early);
|
|
__printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
|
|
void dump_stack_print_info(const char *log_lvl);
|
|
void show_regs_print_info(const char *log_lvl);
|
|
extern void printk_safe_init(void);
|
|
extern void printk_safe_flush(void);
|
|
extern void printk_safe_flush_on_panic(void);
|
|
#else
|
|
static inline __printf(1, 0)
|
|
int vprintk(const char *s, va_list args)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline __printf(1, 2) __cold
|
|
int printk(const char *s, ...)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline __printf(1, 2) __cold
|
|
int printk_deferred(const char *s, ...)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int printk_ratelimit(void)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
|
unsigned int interval_msec)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static inline void wake_up_klogd(void)
|
|
{
|
|
}
|
|
|
|
static inline char *log_buf_addr_get(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline u32 log_buf_len_get(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void log_buf_vmcoreinfo_setup(void)
|
|
{
|
|
}
|
|
|
|
static inline void setup_log_buf(int early)
|
|
{
|
|
}
|
|
|
|
static inline __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...)
|
|
{
|
|
}
|
|
|
|
static inline void dump_stack_print_info(const char *log_lvl)
|
|
{
|
|
}
|
|
|
|
static inline void show_regs_print_info(const char *log_lvl)
|
|
{
|
|
}
|
|
|
|
static inline void printk_safe_init(void)
|
|
{
|
|
}
|
|
|
|
static inline void printk_safe_flush(void)
|
|
{
|
|
}
|
|
|
|
static inline void printk_safe_flush_on_panic(void)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
extern asmlinkage void dump_stack(void) __cold;
|
|
|
|
#ifndef pr_fmt
|
|
#define pr_fmt(fmt) fmt
|
|
#endif
|
|
|
|
/*
|
|
* These can be used to print at the various log levels.
|
|
* All of these will print unconditionally, although note that pr_debug()
|
|
* and other debug macros are compiled out unless either DEBUG is defined
|
|
* or CONFIG_DYNAMIC_DEBUG is set.
|
|
*/
|
|
#define pr_emerg(fmt, ...) \
|
|
printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_alert(fmt, ...) \
|
|
printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_crit(fmt, ...) \
|
|
printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_err(fmt, ...) \
|
|
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_warning(fmt, ...) \
|
|
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_warn pr_warning
|
|
#define pr_notice(fmt, ...) \
|
|
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_info(fmt, ...) \
|
|
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
|
/*
|
|
* Like KERN_CONT, pr_cont() should only be used when continuing
|
|
* a line with no newline ('\n') enclosed. Otherwise it defaults
|
|
* back to KERN_DEFAULT.
|
|
*/
|
|
#define pr_cont(fmt, ...) \
|
|
printk(KERN_CONT fmt, ##__VA_ARGS__)
|
|
|
|
/* pr_devel() should produce zero code unless DEBUG is defined */
|
|
#ifdef DEBUG
|
|
#define pr_devel(fmt, ...) \
|
|
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_devel(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
|
|
/* If you are writing a driver, please use dev_dbg instead */
|
|
#if defined(CONFIG_DYNAMIC_DEBUG)
|
|
#include <linux/dynamic_debug.h>
|
|
|
|
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
|
|
#define pr_debug(fmt, ...) \
|
|
dynamic_pr_debug(fmt, ##__VA_ARGS__)
|
|
#elif defined(DEBUG)
|
|
#define pr_debug(fmt, ...) \
|
|
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_debug(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
/*
|
|
* Print a one-time message (analogous to WARN_ONCE() et al):
|
|
*/
|
|
|
|
#ifdef CONFIG_PRINTK
|
|
#define printk_once(fmt, ...) \
|
|
({ \
|
|
static bool __print_once __read_mostly; \
|
|
bool __ret_print_once = !__print_once; \
|
|
\
|
|
if (!__print_once) { \
|
|
__print_once = true; \
|
|
printk(fmt, ##__VA_ARGS__); \
|
|
} \
|
|
unlikely(__ret_print_once); \
|
|
})
|
|
#define printk_deferred_once(fmt, ...) \
|
|
({ \
|
|
static bool __print_once __read_mostly; \
|
|
bool __ret_print_once = !__print_once; \
|
|
\
|
|
if (!__print_once) { \
|
|
__print_once = true; \
|
|
printk_deferred(fmt, ##__VA_ARGS__); \
|
|
} \
|
|
unlikely(__ret_print_once); \
|
|
})
|
|
#else
|
|
#define printk_once(fmt, ...) \
|
|
no_printk(fmt, ##__VA_ARGS__)
|
|
#define printk_deferred_once(fmt, ...) \
|
|
no_printk(fmt, ##__VA_ARGS__)
|
|
#endif
|
|
|
|
#define pr_emerg_once(fmt, ...) \
|
|
printk_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_alert_once(fmt, ...) \
|
|
printk_once(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_crit_once(fmt, ...) \
|
|
printk_once(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_err_once(fmt, ...) \
|
|
printk_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_warn_once(fmt, ...) \
|
|
printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_notice_once(fmt, ...) \
|
|
printk_once(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_info_once(fmt, ...) \
|
|
printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_cont_once(fmt, ...) \
|
|
printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__)
|
|
|
|
#if defined(DEBUG)
|
|
#define pr_devel_once(fmt, ...) \
|
|
printk_once(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_devel_once(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
/* If you are writing a driver, please use dev_dbg instead */
|
|
#if defined(DEBUG)
|
|
#define pr_debug_once(fmt, ...) \
|
|
printk_once(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_debug_once(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
/*
|
|
* ratelimited messages with local ratelimit_state,
|
|
* no local ratelimit_state used in the !PRINTK case
|
|
*/
|
|
#ifdef CONFIG_PRINTK
|
|
#define printk_ratelimited(fmt, ...) \
|
|
({ \
|
|
static DEFINE_RATELIMIT_STATE(_rs, \
|
|
DEFAULT_RATELIMIT_INTERVAL, \
|
|
DEFAULT_RATELIMIT_BURST); \
|
|
\
|
|
if (__ratelimit(&_rs)) \
|
|
printk(fmt, ##__VA_ARGS__); \
|
|
})
|
|
#else
|
|
#define printk_ratelimited(fmt, ...) \
|
|
no_printk(fmt, ##__VA_ARGS__)
|
|
#endif
|
|
|
|
#define pr_emerg_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_alert_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_crit_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_err_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_warn_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_notice_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
|
#define pr_info_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
|
/* no pr_cont_ratelimited, don't do that... */
|
|
|
|
#if defined(DEBUG)
|
|
#define pr_devel_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_devel_ratelimited(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
/* If you are writing a driver, please use dev_dbg instead */
|
|
#if defined(CONFIG_DYNAMIC_DEBUG)
|
|
/* descriptor check is first to prevent flooding with "callbacks suppressed" */
|
|
#define pr_debug_ratelimited(fmt, ...) \
|
|
do { \
|
|
static DEFINE_RATELIMIT_STATE(_rs, \
|
|
DEFAULT_RATELIMIT_INTERVAL, \
|
|
DEFAULT_RATELIMIT_BURST); \
|
|
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, pr_fmt(fmt)); \
|
|
if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
|
|
__ratelimit(&_rs)) \
|
|
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \
|
|
} while (0)
|
|
#elif defined(DEBUG)
|
|
#define pr_debug_ratelimited(fmt, ...) \
|
|
printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#else
|
|
#define pr_debug_ratelimited(fmt, ...) \
|
|
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
|
#endif
|
|
|
|
extern const struct file_operations kmsg_fops;
|
|
|
|
enum {
|
|
DUMP_PREFIX_NONE,
|
|
DUMP_PREFIX_ADDRESS,
|
|
DUMP_PREFIX_OFFSET
|
|
};
|
|
extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
|
|
int groupsize, char *linebuf, size_t linebuflen,
|
|
bool ascii);
|
|
#ifdef CONFIG_PRINTK
|
|
extern void print_hex_dump(const char *level, const char *prefix_str,
|
|
int prefix_type, int rowsize, int groupsize,
|
|
const void *buf, size_t len, bool ascii);
|
|
#if defined(CONFIG_DYNAMIC_DEBUG)
|
|
#define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \
|
|
dynamic_hex_dump(prefix_str, prefix_type, 16, 1, buf, len, true)
|
|
#else
|
|
extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
|
const void *buf, size_t len);
|
|
#endif /* defined(CONFIG_DYNAMIC_DEBUG) */
|
|
#else
|
|
static inline void print_hex_dump(const char *level, const char *prefix_str,
|
|
int prefix_type, int rowsize, int groupsize,
|
|
const void *buf, size_t len, bool ascii)
|
|
{
|
|
}
|
|
static inline void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
|
const void *buf, size_t len)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
#if defined(CONFIG_DYNAMIC_DEBUG)
|
|
#define print_hex_dump_debug(prefix_str, prefix_type, rowsize, \
|
|
groupsize, buf, len, ascii) \
|
|
dynamic_hex_dump(prefix_str, prefix_type, rowsize, \
|
|
groupsize, buf, len, ascii)
|
|
#elif defined(DEBUG)
|
|
#define print_hex_dump_debug(prefix_str, prefix_type, rowsize, \
|
|
groupsize, buf, len, ascii) \
|
|
print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize, \
|
|
groupsize, buf, len, ascii)
|
|
#else
|
|
static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
|
|
int rowsize, int groupsize,
|
|
const void *buf, size_t len, bool ascii)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif
|