mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
15 lines
449 B
C
15 lines
449 B
C
/* 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 */
|