1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)
5 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
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) \
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) \
31 chk_opt_weak(#opt_name, hw_exists, IS_ENABLED(opt_name)); \
34 #endif /* __ASM_ARC_ASSERTS_H */