Messages in this thread | | | Date | Fri, 4 Jan 2013 14:34:28 -0800 | Subject | Re: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is not enough ram for it | From | Yinghai Lu <> |
| |
On Fri, Jan 4, 2013 at 2:26 PM, Shuah Khan <shuahkhan@gmail.com> 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?
and
int __init pci_swiotlb_detect_override(void) { - int use_swiotlb = swiotlb | swiotlb_force; - if (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.
| |