Files
cubelinux-kernel/drivers/iommu/generic_pt/fmt/iommu_template.h
T
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

49 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES
*
* Template to build the iommu module and kunit from the format and
* implementation headers.
*
* The format should have:
* #define PT_FMT <name>
* #define PT_SUPPORTED_FEATURES (BIT(PT_FEAT_xx) | BIT(PT_FEAT_yy))
* And optionally:
* #define PT_FORCE_ENABLED_FEATURES ..
* #define PT_FMT_VARIANT <suffix>
*/
#include <linux/args.h>
#include <linux/stringify.h>
#ifdef PT_FMT_VARIANT
#define PTPFX_RAW \
CONCATENATE(CONCATENATE(PT_FMT, _), PT_FMT_VARIANT)
#else
#define PTPFX_RAW PT_FMT
#endif
#define PTPFX CONCATENATE(PTPFX_RAW, _)
#define _PT_FMT_H PT_FMT.h
#define PT_FMT_H __stringify(_PT_FMT_H)
#define _PT_DEFS_H CONCATENATE(defs_, _PT_FMT_H)
#define PT_DEFS_H __stringify(_PT_DEFS_H)
#include <linux/generic_pt/common.h>
#include PT_DEFS_H
#include "../pt_defs.h"
#include PT_FMT_H
#include "../pt_common.h"
#ifndef GENERIC_PT_KUNIT
#include "../iommu_pt.h"
#else
/*
* The makefile will compile the .c file twice, once with GENERIC_PT_KUNIT set
* which means we are building the kunit modle.
*/
#include "../kunit_generic_pt.h"
#include "../kunit_iommu_pt.h"
#endif