/* * Copyright (C) 2020-2021 MaxLinear, Inc. * Copyright (C) 2019-2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see http://www.gnu.org/licenses/. * * SPDX-License-Identifier: GPL-2.0-only */ #ifndef __INTEL_KERNEL_LOGGER #define __INTEL_KERNEL_LOGGER /*! \file intel_logger.h * \brief Single place where kernel logger macros for PP are defined. * \warning For security reasons printing filenames, line numbers and any internal info is prihibited! * \warning Do not use printk without logging level! */ //====================== DEBUGGING SWITCHES ======================= // pp_crypto.c //#define PRINT_DEBUG_CRYPTO // toe.c //#define TOE_DBG // pdsp.c //#define PDSP_DEBUG // pp_core_p7.c //#define PP_CORE_DBG // pp_hal_p7.c //#define PP_HAL_DBG // pp_qos_p7.c //#define PP_QOS_DBG // ppsgc_ctl.h, was defined by default #define PPSGC_LOG // spdtst_helper.c, was defined by default #define SPDTST_LOG //====================== LOGGING DEFINITIONS ======================= #define INTEL_EMERG_PRINTK(fmt, args...) pr_emerg( KBUILD_MODNAME " Emergency: " fmt, ## args) /*!< system is unusable */ #define INTEL_ALERT_PRINTK(fmt, args...) pr_alert( KBUILD_MODNAME " Alert: " fmt, ## args) /*!< action must be taken immediately */ #define INTEL_CRIT_PRINTK(fmt, args...) pr_crit( KBUILD_MODNAME " Critical: " fmt, ## args) /*!< critical conditions */ #define INTEL_ERR_PRINTK(fmt, args...) pr_err( KBUILD_MODNAME " Error: " fmt, ## args) /*!< error conditions */ #define INTEL_WARN_PRINTK(fmt, args...) pr_warning( KBUILD_MODNAME " Warn: " fmt, ## args) /*!< warning conditions */ #define INTEL_NOTE_PRINTK(fmt, args...) pr_notice( KBUILD_MODNAME " Note: " fmt, ## args) /*!< normal but significant condition */ #define INTEL_INFO_PRINTK(fmt, args...) pr_info( KBUILD_MODNAME " Info: " fmt, ## args) /*!< informational */ #define INTEL_DBG_PRINTK(fmt, args...) printk( KERN_DEBUG KBUILD_MODNAME " Dbg: " fmt, ## args) /*!< debug-level messages */ #define INTEL_CONT_PRINTK(fmt, args...) pr_cont( fmt, ## args) /*!< continue previous line */ #define INTEL_NEW_LINE_PRINTK() pr_debug( KBUILD_MODNAME ) /*!< new line @em only for debug messages */ /*! Print messages regardless of logging level. Allowed to use only when user requests and output (for example "status" command) */ #define INTEL_JUST_PRINTK(fmt, args...) printk( KBUILD_MODNAME ": " fmt, ## args) #endif //__INTEL_KERNEL_LOGGER