drivers/arm-smmu-v3-nesting: Add module param to skip stage-2
To make testing easier.
Change-Id: I6f2f245d5e977b85f4e310582134efefd68aac0c
Signed-off-by: Mostafa Saleh <smostafa@google.com>
diff --git a/drivers/misc/pkvm/smmuv3_nesting.c b/drivers/misc/pkvm/smmuv3_nesting.c
index 6f941a8..f86e3dd 100644
--- a/drivers/misc/pkvm/smmuv3_nesting.c
+++ b/drivers/misc/pkvm/smmuv3_nesting.c
@@ -38,6 +38,9 @@ extern bool kvm_nvhe_sym(smmu_cpu_stage_2);
static bool smmu_cpu_stage_2;
module_param(smmu_cpu_stage_2, bool, 0);
+static bool skip_stage2;
+module_param(skip_stage2, bool, 0);
+
static int smmuv3_describe_smmuv3(void)
{
struct device_node *np;
@@ -99,6 +102,9 @@ static int smmuv3_nesting_init(void)
int nr_pages = 0;
bool registered;
+ if (skip_stage2)
+ return 0;
+
ret = platform_driver_probe(&smmuv3_nesting_driver, smmuv3_nesting_probe);
registered = !ret;
if (ret)