![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com) 0004 * 0005 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> 0006 */ 0007 #ifndef __ASM_ARC_ASSERTS_H 0008 #define __ASM_ARC_ASSERTS_H 0009 0010 /* Helpers to sanitize config options. */ 0011 0012 void chk_opt_strict(char *opt_name, bool hw_exists, bool opt_ena); 0013 void chk_opt_weak(char *opt_name, bool hw_exists, bool opt_ena); 0014 0015 /* 0016 * Check required config option: 0017 * - panic in case of OPT enabled but corresponding HW absent. 0018 * - warn in case of OPT disabled but corresponding HW exists. 0019 */ 0020 #define CHK_OPT_STRICT(opt_name, hw_exists) \ 0021 ({ \ 0022 chk_opt_strict(#opt_name, hw_exists, IS_ENABLED(opt_name)); \ 0023 }) 0024 0025 /* 0026 * Check optional config option: 0027 * - panic in case of OPT enabled but corresponding HW absent. 0028 */ 0029 #define CHK_OPT_WEAK(opt_name, hw_exists) \ 0030 ({ \ 0031 chk_opt_weak(#opt_name, hw_exists, IS_ENABLED(opt_name)); \ 0032 }) 0033 0034 #endif /* __ASM_ARC_ASSERTS_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |