1 /**************************************************************************
3 * Copyright (c) 2000-2002 Alacritech, Inc. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following
14 * disclaimer in the documentation and/or other materials provided
15 * with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY ALACRITECH, INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALACRITECH, INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
27 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * The views and conclusions contained in the software and documentation
31 * are those of the authors and should not be interpreted as representing
32 * official policies, either expressed or implied, of Alacritech, Inc.
34 **************************************************************************/
39 * All debug and assertion-based definitions and macros are included
40 * in this file for the SLICOSS driver.
42 #ifndef _SLIC_DEBUG_H_
43 #define _SLIC_DEBUG_H_
45 #ifdef SLIC_DEFAULT_LOG_LEVEL
47 #define SLICLEVEL KERN_DEBUG
49 #define SLIC_DISPLAY printk
50 #define DBG_ERROR(n, args...) SLIC_DISPLAY(KERN_EMERG n, ##args)
52 #define SLIC_DEBUG_MESSAGE 1
53 #if SLIC_DEBUG_MESSAGE
54 /*#define DBG_MSG(n, args...) SLIC_DISPLAY(SLICLEVEL n, ##args)*/
55 #define DBG_MSG(n, args...)
57 #define DBG_MSG(n, args...)
64 #if SLIC_ASSERT_ENABLED
66 #define VALID_ADDRESS(p) (1)
68 #define VALID_ADDRESS(p) (((u32)(p) & 0x80000000) || ((u32)(p) == 0))
74 DBG_ERROR("ASSERT() Failure: file %s, function %s line %d\n",\
75 __FILE__, __func__, __LINE__); \
81 #define ASSERTMSG(a,msg) \
84 DBG_ERROR("ASSERT() Failure: file %s, function %s"\
86 __FILE__, __func__, __LINE__, (msg)); \
96 #define ASSERTMSG(a, msg)
98 #endif /* SLIC_ASSERT_ENABLED */
100 #endif /* _SLIC_DEBUG_H_ */