mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
3f9dfbebdc
Instead of using arch_has_restricted_virtio_memory_access() together with CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, replace those with platform_has() and a new platform feature PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS. 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>
19 lines
596 B
C
19 lines
596 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. */
|
|
|
|
/* Used to enable platform specific DMA handling for virtio devices. */
|
|
#define PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS (0 + PLATFORM_ARCH_FEAT_N)
|
|
|
|
#define PLATFORM_FEAT_N (1 + 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 */
|