1. 16 12月, 2009 1 次提交
  2. 04 12月, 2009 1 次提交
  3. 11 11月, 2009 1 次提交
  4. 10 11月, 2009 3 次提交
    • F
      x86: Handle HW IOMMU initialization failure gracefully · 75f1cdf1
      FUJITA Tomonori 提交于
      If HW IOMMU initialization fails (Intel VT-d often does this,
      typically due to BIOS bugs), we fall back to nommu. It doesn't
      work for the majority since nowadays we have more than 4GB
      memory so we must use swiotlb instead of nommu.
      
      The problem is that it's too late to initialize swiotlb when HW
      IOMMU initialization fails. We need to allocate swiotlb memory
      earlier from bootmem allocator. Chris explained the issue in
      detail:
      
        http://marc.info/?l=linux-kernel&m=125657444317079&w=2
      
      The current x86 IOMMU initialization sequence is too complicated
      and handling the above issue makes it more hacky.
      
      This patch changes x86 IOMMU initialization sequence to handle
      the above issue cleanly.
      
      The new x86 IOMMU initialization sequence are:
      
      1. we initialize the swiotlb (and setting swiotlb to 1) in the case
         of (max_pfn > MAX_DMA32_PFN && !no_iommu). dma_ops is set to
         swiotlb_dma_ops or nommu_dma_ops. if swiotlb usage is forced by
         the boot option, we finish here.
      
      2. we call the detection functions of all the IOMMUs
      
      3. the detection function sets x86_init.iommu.iommu_init to the
         IOMMU initialization function (so we can avoid calling the
         initialization functions of all the IOMMUs needlessly).
      
      4. if the IOMMU initialization function doesn't need to swiotlb
         then sets swiotlb to zero (e.g. the initialization is
         sucessful).
      
      5. if we find that swiotlb is set to zero, we free swiotlb
         resource.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      LKML-Reference: <1257849980-22640-10-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      75f1cdf1
    • F
      swiotlb: Defer swiotlb init printing, export swiotlb_print_info() · ad32e8cb
      FUJITA Tomonori 提交于
      This enables us to avoid printing swiotlb memory info when we
      initialize swiotlb. After swiotlb initialization, we could find
      that we don't need swiotlb.
      
      This patch removes the code to print swiotlb memory info in
      swiotlb_init() and exports the function to do that.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      Cc: tony.luck@intel.com
      Cc: benh@kernel.crashing.org
      LKML-Reference: <1257849980-22640-9-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      [ -v2: merge up conflict ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ad32e8cb
    • F
      swiotlb: Add swiotlb_free() function · 5740afdb
      FUJITA Tomonori 提交于
      swiotlb_free() function frees all allocated memory for swiotlb.
      
      We need to initialize swiotlb before IOMMU initialization (x86
      and powerpc needs to allocate memory from bootmem allocator). If
      IOMMU initialization is successful, we need to free swiotlb
      resource (don't want to waste 64MB).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      LKML-Reference: <1257849980-22640-8-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      [ -v2: build fix for the !CONFIG_SWIOTLB case ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5740afdb
  5. 21 8月, 2009 1 次提交
  6. 28 7月, 2009 6 次提交
  7. 08 4月, 2009 7 次提交
  8. 07 4月, 2009 1 次提交
  9. 11 1月, 2009 2 次提交
  10. 07 1月, 2009 1 次提交
  11. 06 1月, 2009 2 次提交
  12. 04 1月, 2009 1 次提交
  13. 03 1月, 2009 1 次提交
    • R
      swiotlb: add missing __init annotations · 79ff56eb
      Roland Dreier 提交于
      Impact: cleanup, reduce kernel size a bit
      
      The current kernel build warns:
      
          WARNING: vmlinux.o(.text+0x11458): Section mismatch in reference from the function swiotlb_alloc_boot() to the function .init.text:__alloc_bootmem_low()
          The function swiotlb_alloc_boot() references
          the function __init __alloc_bootmem_low().
          This is often because swiotlb_alloc_boot lacks a __init
          annotation or the annotation of __alloc_bootmem_low is wrong.
      
          WARNING: vmlinux.o(.text+0x1011f2): Section mismatch in reference from the function swiotlb_late_init_with_default_size() to the function .init.text:__alloc_bootmem_low()
          The function swiotlb_late_init_with_default_size() references
          the function __init __alloc_bootmem_low().
          This is often because swiotlb_late_init_with_default_size lacks a __init
          annotation or the annotation of __alloc_bootmem_low is wrong.
      
      and indeed the functions calling __alloc_bootmem_low() can be marked
      __init as well.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      79ff56eb
  14. 28 12月, 2008 5 次提交
  15. 18 12月, 2008 6 次提交
  16. 17 12月, 2008 1 次提交