Re: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is notenough ram for it
From: Yinghai Lu
Date: Fri Jan 04 2013 - 17:34:24 EST
On Fri, Jan 4, 2013 at 2:26 PM, Shuah Khan <shuahkhan@xxxxxxxxx> wrote:
> However, I think regression on existing behavior with a
> panic is a bit of a big hammer. Thie change causes panic on systems
> even when kdump is not enabled, if I understand it correctly.
I don't think so.
+static bool __init enough_mem_for_swiotlb(void)
+ /* do we have less than 1M RAM under 4G ? */
+ return memblock_mem_size(1ULL<<(32-PAGE_SHIFT)) > (1ULL<<20);
enough_mem_for_swiotlb could return false for them?
int __init pci_swiotlb_detect_override(void)
- int use_swiotlb = swiotlb | swiotlb_force;
swiotlb = 1;
+ else if (!enough_mem_for_swiotlb())
+ swiotlb = 0;
- return use_swiotlb;
+ return swiotlb;
it only disable swiotlb when there is less 1M mem under 4G.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/