mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ACPI, APEI, Fix acpi_pre_map() return value
After we ioremap() a new region, we call __acpi_try_ioremap() to
see whether another thread has already mapped the same region.
This check clobbers "vaddr", so compute the return value of
acpi_pre_map() using the ioremap() result "map->vaddr" instead.
v2:
Modified the unsuitable description of patch.
v3:
Removed unlikely() check and made description simpler.
Signed-off-by: Jin Dongming <[email protected]>
Reviewed-by: Andi Kleen <[email protected]>
Signed-off-by: Huang Ying <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
3a78f96532
commit
bad97c37db
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ static void __iomem *acpi_pre_map(phys_addr_t paddr,
|
|||
list_add_tail_rcu(&map->list, &acpi_iomaps);
|
||||
spin_unlock_irqrestore(&acpi_iomaps_lock, flags);
|
||||
|
||||
return vaddr + (paddr - pg_off);
|
||||
return map->vaddr + (paddr - map->paddr);
|
||||
err_unmap:
|
||||
iounmap(vaddr);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue