mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
powerpc/64: Limit ZONE_DMA32 to 4GiB in swiotlb_detect_4g()
A DMA zone is still needed with swiotlb, for coherent allocations. This doesn't affect platforms that don't use swiotlb or that don't call swiotlb_detect_4g(). Signed-off-by: Scott Wood <scottwood@freescale.com> Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
This commit is contained in:
parent
6397fc3fb0
commit
cf5621032f
1 changed files with 6 additions and 2 deletions
|
@ -106,10 +106,14 @@ int __init swiotlb_setup_bus_notifier(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void swiotlb_detect_4g(void)
|
||||
void __init swiotlb_detect_4g(void)
|
||||
{
|
||||
if ((memblock_end_of_DRAM() - 1) > 0xffffffff)
|
||||
if ((memblock_end_of_DRAM() - 1) > 0xffffffff) {
|
||||
ppc_swiotlb_enable = 1;
|
||||
#ifdef CONFIG_ZONE_DMA32
|
||||
limit_zone_pfn(ZONE_DMA32, (1ULL << 32) >> PAGE_SHIFT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static int __init swiotlb_late_init(void)
|
||||
|
|
Loading…
Reference in a new issue