Print this page
10886 smatch debug macro cleanup in usr/src/uts


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 




  26 #ifndef _FP_H
  27 #define _FP_H
  28 
  29 
  30 #include <sys/note.h>
  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 /*
  37  * Debugging, Error reporting, and tracing
  38  */
  39 #define FP_LOG_SIZE             1024 * 1024
  40 
  41 #define FP_LEVEL_1              0x00001         /* attach/detach PM CPR */
  42 #define FP_LEVEL_2              0x00002         /* startup */
  43 #define FP_LEVEL_3              0x00004         /* state change, discovery */
  44 #define FP_LEVEL_4              0x00008         /* statec/devc to ULPs */
  45 #define FP_LEVEL_5              0x00010         /* FCA UB callbacks */


 109 #define FP_MSG_BUF_CONSOLE_LEVEL_3      (FP_LEVEL_3 | FC_TRACE_LOG_BUF |\
 110                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 111 #define FP_MSG_BUF_CONSOLE_LEVEL_4      (FP_LEVEL_4 | FC_TRACE_LOG_BUF |\
 112                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 113 #define FP_MSG_BUF_CONSOLE_LEVEL_5      (FP_LEVEL_5 | FC_TRACE_LOG_BUF |\
 114                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 115 #define FP_MSG_BUF_CONSOLE_LEVEL_6      (FP_LEVEL_6 | FC_TRACE_LOG_BUF |\
 116                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 117 #define FP_MSG_BUF_CONSOLE_LEVEL_7      (FP_LEVEL_7 | FC_TRACE_LOG_BUF |\
 118                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 119 #define FP_MSG_BUF_CONSOLE_LEVEL_8      (FP_LEVEL_8 | FC_TRACE_LOG_BUF |\
 120                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 121 #define FP_MSG_BUF_CONSOLE_LEVEL_9      (FP_LEVEL_9 | FC_TRACE_LOG_BUF |\
 122                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 123 #ifdef DEBUG
 124 
 125 #define FP_DTRACE               fc_trace_debug
 126 
 127 #else
 128 
 129 #define FP_DTRACE
 130 
 131 #endif
 132 
 133 #define FP_TRACE                fc_trace_debug
 134 
 135 
 136 #ifdef  DEBUG
 137 
 138 #define FP_TRACE_DEFAULT        (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
 139                                 FP_LEVEL_2 | FP_LEVEL_3 |\
 140                                 FP_LEVEL_4 | FP_LEVEL_5 |\
 141                                 FP_LEVEL_6 | FP_LEVEL_7 | FP_LEVEL_9)
 142 
 143 #else
 144 
 145 #define FP_TRACE_DEFAULT        (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
 146                                 FP_LEVEL_2 | FP_LEVEL_3 |\
 147                                 FP_LEVEL_4 | FP_LEVEL_5 |\
 148                                 FP_LEVEL_6 | FP_LEVEL_7 | FP_LEVEL_9)
 149 #endif




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * Copyright 2019 Joyent, Inc.
  28  */
  29 
  30 #ifndef _FP_H
  31 #define _FP_H
  32 
  33 
  34 #include <sys/note.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Debugging, Error reporting, and tracing
  42  */
  43 #define FP_LOG_SIZE             1024 * 1024
  44 
  45 #define FP_LEVEL_1              0x00001         /* attach/detach PM CPR */
  46 #define FP_LEVEL_2              0x00002         /* startup */
  47 #define FP_LEVEL_3              0x00004         /* state change, discovery */
  48 #define FP_LEVEL_4              0x00008         /* statec/devc to ULPs */
  49 #define FP_LEVEL_5              0x00010         /* FCA UB callbacks */


 113 #define FP_MSG_BUF_CONSOLE_LEVEL_3      (FP_LEVEL_3 | FC_TRACE_LOG_BUF |\
 114                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 115 #define FP_MSG_BUF_CONSOLE_LEVEL_4      (FP_LEVEL_4 | FC_TRACE_LOG_BUF |\
 116                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 117 #define FP_MSG_BUF_CONSOLE_LEVEL_5      (FP_LEVEL_5 | FC_TRACE_LOG_BUF |\
 118                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 119 #define FP_MSG_BUF_CONSOLE_LEVEL_6      (FP_LEVEL_6 | FC_TRACE_LOG_BUF |\
 120                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 121 #define FP_MSG_BUF_CONSOLE_LEVEL_7      (FP_LEVEL_7 | FC_TRACE_LOG_BUF |\
 122                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 123 #define FP_MSG_BUF_CONSOLE_LEVEL_8      (FP_LEVEL_8 | FC_TRACE_LOG_BUF |\
 124                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 125 #define FP_MSG_BUF_CONSOLE_LEVEL_9      (FP_LEVEL_9 | FC_TRACE_LOG_BUF |\
 126                                         FC_TRACE_LOG_MSG | FC_TRACE_LOG_CONSOLE)
 127 #ifdef DEBUG
 128 
 129 #define FP_DTRACE               fc_trace_debug
 130 
 131 #else
 132 
 133 #define FP_DTRACE(...)          (void)(0)
 134 
 135 #endif
 136 
 137 #define FP_TRACE                fc_trace_debug
 138 
 139 
 140 #ifdef  DEBUG
 141 
 142 #define FP_TRACE_DEFAULT        (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
 143                                 FP_LEVEL_2 | FP_LEVEL_3 |\
 144                                 FP_LEVEL_4 | FP_LEVEL_5 |\
 145                                 FP_LEVEL_6 | FP_LEVEL_7 | FP_LEVEL_9)
 146 
 147 #else
 148 
 149 #define FP_TRACE_DEFAULT        (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
 150                                 FP_LEVEL_2 | FP_LEVEL_3 |\
 151                                 FP_LEVEL_4 | FP_LEVEL_5 |\
 152                                 FP_LEVEL_6 | FP_LEVEL_7 | FP_LEVEL_9)
 153 #endif