diff options
author | Jan Beulich <JBeulich@suse.com> | 2012-05-16 13:06:26 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-18 08:13:37 (GMT) |
commit | 20167d3421a089a1bf1bd680b150dc69c9506810 (patch) | |
tree | 3338cb5455b31473630679061fcd96addc8ac7e2 /lib/iommu-helper.c | |
parent | 3e7f3db001de6133db1c385c92eec944409a8b4f (diff) | |
download | linux-fsl-qoriq-20167d3421a089a1bf1bd680b150dc69c9506810.tar.xz |
x86-64: Fix accounting in kernel_physical_mapping_init()
When finding a present and acceptable 2M/1G mapping, the number
of pages mapped this way shouldn't be incremented (as it was
already incremented when the earlier part of the mapping was
established). Instead, last_map_addr needs to be updated in this
case.
Further, address increments were wrong in one place each in both
phys_pmd_init() and phys_pud_init() (lacking the aligning down
to the respective page boundary).
As we're now doing the same calculation several times, fold it
into a single instance using a local variable (matching how
kernel_physical_mapping_init() itself does it at the PGD level).
Observed during code inspection, not because of an actual
problem.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/4FB3C27202000078000841A0@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/iommu-helper.c')
0 files changed, 0 insertions, 0 deletions