diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-01 21:10:29 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-02 19:01:44 -0500 |
commit | 9d128ed17c672b1dffde4a328e9b3ee26d87a8f0 (patch) | |
tree | a7f72e5a2e2efbb2a4b7a011ed487e65ecba75db /drivers/acpi | |
parent | 74bf8efb5fa6e958d2d7c7917b8bb672085ec0c6 (diff) |
ACPI / OSL: Add kerneldoc comments to memory mapping functions
Add kerneldoc comments to acpi_os_map_iomem() and acpi_os_unmap_iomem()
and explain why the latter needs the __ref annotation in one of them
(as suggested by Mathias Krause).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mathias Krause <minipli@googlemail.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/osl.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 32d684af0ec7..d0ecf4efd79d 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -364,6 +364,19 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr) | |||
364 | iounmap(vaddr); | 364 | iounmap(vaddr); |
365 | } | 365 | } |
366 | 366 | ||
367 | /** | ||
368 | * acpi_os_map_iomem - Get a virtual address for a given physical address range. | ||
369 | * @phys: Start of the physical address range to map. | ||
370 | * @size: Size of the physical address range to map. | ||
371 | * | ||
372 | * Look up the given physical address range in the list of existing ACPI memory | ||
373 | * mappings. If found, get a reference to it and return a pointer to it (its | ||
374 | * virtual address). If not found, map it, add it to that list and return a | ||
375 | * pointer to it. | ||
376 | * | ||
377 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this | ||
378 | * routine simply calls __acpi_map_table() to get the job done. | ||
379 | */ | ||
367 | void __iomem *__init_refok | 380 | void __iomem *__init_refok |
368 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) | 381 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) |
369 | { | 382 | { |
@@ -439,6 +452,20 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map) | |||
439 | } | 452 | } |
440 | } | 453 | } |
441 | 454 | ||
455 | /** | ||
456 | * acpi_os_unmap_iomem - Drop a memory mapping reference. | ||
457 | * @virt: Start of the address range to drop a reference to. | ||
458 | * @size: Size of the address range to drop a reference to. | ||
459 | * | ||
460 | * Look up the given virtual address range in the list of existing ACPI memory | ||
461 | * mappings, drop a reference to it and unmap it if there are no more active | ||
462 | * references to it. | ||
463 | * | ||
464 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this | ||
465 | * routine simply calls __acpi_unmap_table() to get the job done. Since | ||
466 | * __acpi_unmap_table() is an __init function, the __ref annotation is needed | ||
467 | * here. | ||
468 | */ | ||
442 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size) | 469 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size) |
443 | { | 470 | { |
444 | struct acpi_ioremap *map; | 471 | struct acpi_ioremap *map; |