Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arc / include / asm / asserts.h
blob108f33be6aa5469a0f30e97a77a47bf4ad9a0668
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)
5 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
6 */
7 #ifndef __ASM_ARC_ASSERTS_H
8 #define __ASM_ARC_ASSERTS_H
10 /* Helpers to sanitize config options. */
12 void chk_opt_strict(char *opt_name, bool hw_exists, bool opt_ena);
13 void chk_opt_weak(char *opt_name, bool hw_exists, bool opt_ena);
16 * Check required config option:
17 * - panic in case of OPT enabled but corresponding HW absent.
18 * - warn in case of OPT disabled but corresponding HW exists.
20 #define CHK_OPT_STRICT(opt_name, hw_exists) \
21 ({ \
22 chk_opt_strict(#opt_name, hw_exists, IS_ENABLED(opt_name)); \
26 * Check optional config option:
27 * - panic in case of OPT enabled but corresponding HW absent.
29 #define CHK_OPT_WEAK(opt_name, hw_exists) \
30 ({ \
31 chk_opt_weak(#opt_name, hw_exists, IS_ENABLED(opt_name)); \
34 #endif /* __ASM_ARC_ASSERTS_H */