lkml.org 
[lkml]   [2013]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is not enough ram for it
    From
    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.


    \
     
     \ /
      Last update: 2013-01-05 00:21    [W:4.129 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site