/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)3*4* Author: Eugeniy Paltsev <[email protected]>5*/6#ifndef __ASM_ARC_ASSERTS_H7#define __ASM_ARC_ASSERTS_H89/* Helpers to sanitize config options. */1011void chk_opt_strict(char *opt_name, bool hw_exists, bool opt_ena);12void chk_opt_weak(char *opt_name, bool hw_exists, bool opt_ena);1314/*15* Check required config option:16* - panic in case of OPT enabled but corresponding HW absent.17* - warn in case of OPT disabled but corresponding HW exists.18*/19#define CHK_OPT_STRICT(opt_name, hw_exists) \20({ \21chk_opt_strict(#opt_name, hw_exists, IS_ENABLED(opt_name)); \22})2324/*25* Check optional config option:26* - panic in case of OPT enabled but corresponding HW absent.27*/28#define CHK_OPT_WEAK(opt_name, hw_exists) \29({ \30chk_opt_weak(#opt_name, hw_exists, IS_ENABLED(opt_name)); \31})3233#endif /* __ASM_ARC_ASSERTS_H */343536