Skip to content

Commit eb58738

Browse files
committed
ACPI: processor: idle: Add module import namespace
Add a new module import namespace called ACPI_PROCESSOR_IDLE for functions exported from the non-modular part of the ACPI processor driver to the modular part of it. Export acpi_processor_claim_cst_control() and acpi_processor_evaluate_cst() in that namespace to hide them from unrelated modules. They are also used by the intel_idle driver, but it is non-modular, so it can call them regardless of the way the symbols are exported. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/3376499.aeNJFYEL58@rafael.j.wysocki
1 parent 7a8c994 commit eb58738

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/acpi/acpi_processor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ bool acpi_processor_claim_cst_control(void)
815815
cst_control_claimed = true;
816816
return true;
817817
}
818-
EXPORT_SYMBOL_GPL(acpi_processor_claim_cst_control);
818+
EXPORT_SYMBOL_NS_GPL(acpi_processor_claim_cst_control, "ACPI_PROCESSOR_IDLE");
819819

820820
/**
821821
* acpi_processor_evaluate_cst - Evaluate the processor _CST control method.
@@ -994,5 +994,5 @@ int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu,
994994

995995
return ret;
996996
}
997-
EXPORT_SYMBOL_GPL(acpi_processor_evaluate_cst);
997+
EXPORT_SYMBOL_NS_GPL(acpi_processor_evaluate_cst, "ACPI_PROCESSOR_IDLE");
998998
#endif /* CONFIG_ACPI_PROCESSOR_CSTATE */

drivers/acpi/processor_idle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,3 +1453,5 @@ int acpi_processor_power_exit(struct acpi_processor *pr)
14531453
pr->flags.power_setup_done = 0;
14541454
return 0;
14551455
}
1456+
1457+
MODULE_IMPORT_NS("ACPI_PROCESSOR_IDLE");

0 commit comments

Comments
 (0)