diff options
author | Juergen Gross <jgross@suse.com> | 2022-06-02 15:05:26 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-06-06 08:06:00 +0200 |
commit | 2130a790ca49763f724ec45cf93b9dd765e2023e (patch) | |
tree | bcb5b510df4a6c9ab4d1f8dc1f4b0eb0831f7161 /include/linux/platform-feature.h | |
parent | f2906aa863381afb0015a9eb7fefad885d4e5a56 (diff) |
kernel: add platform_has() infrastructure
Add a simple infrastructure for setting, resetting and querying
platform feature flags.
Flags can be either global or architecture specific.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Arm64 only
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/linux/platform-feature.h')
-rw-r--r-- | include/linux/platform-feature.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/platform-feature.h b/include/linux/platform-feature.h new file mode 100644 index 000000000000..6ed859928b97 --- /dev/null +++ b/include/linux/platform-feature.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _PLATFORM_FEATURE_H +#define _PLATFORM_FEATURE_H + +#include <linux/bitops.h> +#include <asm/platform-feature.h> + +/* The platform features are starting with the architecture specific ones. */ +#define PLATFORM_FEAT_N (0 + PLATFORM_ARCH_FEAT_N) + +void platform_set(unsigned int feature); +void platform_clear(unsigned int feature); +bool platform_has(unsigned int feature); + +#endif /* _PLATFORM_FEATURE_H */ |