cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

pci_debug.h (722B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _S390_ASM_PCI_DEBUG_H
      3#define _S390_ASM_PCI_DEBUG_H
      4
      5#include <asm/debug.h>
      6
      7extern debug_info_t *pci_debug_msg_id;
      8extern debug_info_t *pci_debug_err_id;
      9
     10#define zpci_dbg(imp, fmt, args...)				\
     11	debug_sprintf_event(pci_debug_msg_id, imp, fmt, ##args)
     12
     13#define zpci_err(text...)							\
     14	do {									\
     15		char debug_buffer[16];						\
     16		snprintf(debug_buffer, 16, text);				\
     17		debug_text_event(pci_debug_err_id, 0, debug_buffer);		\
     18	} while (0)
     19
     20static inline void zpci_err_hex_level(int level, void *addr, int len)
     21{
     22	debug_event(pci_debug_err_id, level, addr, len);
     23}
     24
     25static inline void zpci_err_hex(void *addr, int len)
     26{
     27	zpci_err_hex_level(0, addr, len);
     28}
     29
     30#endif