1. 14 12月, 2009 1 次提交
  2. 17 11月, 2009 2 次提交
  3. 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
      x86: GART: Convert gart_iommu_hole_init() to use iommu_init hook · de957628
      FUJITA Tomonori 提交于
      This changes gart_iommu_hole_init() to set gart_iommu_init() to
      iommu_init hook if gart_iommu_hole_init() finds the GART IOMMU.
      
      We can kill the code to check if we found the IOMMU in
      gart_iommu_init() since gart_iommu_hole_init() sets
      gart_iommu_init() only when it found the IOMMU.
      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-4-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      de957628
    • J
      x86: GART: pci-gart_64.c: Use correct length in strncmp · 41855b77
      Joe Perches 提交于
      Signed-off-by: NJoe Perches <joe@perches.com>
      Cc: <stable@kernel.org> # .3x.x
      LKML-Reference: <1257818330.12852.72.camel@Joe-Laptop.home>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      41855b77
  4. 08 11月, 2009 1 次提交
    • F
      x86: Use x86_platform for iommu_shutdown · 338bac52
      FUJITA Tomonori 提交于
      This patch cleans up pci_iommu_shutdown() a bit to use
      x86_platform (similar to how IA64 initializes an IOMMU driver).
      
      This adds iommu_shutdown() to x86_platform to avoid calling
      every IOMMUs' shutdown functions in pci_iommu_shutdown() in
      order. The IOMMU shutdown functions are platform specific (we
      don't have multiple different IOMMU hardware) so the current way
      is pointless.
      
      An IOMMU driver sets x86_platform.iommu_shutdown to the shutdown
      function if necessary.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: joerg.roedel@amd.com
      LKML-Reference: <20091027163358F.fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      338bac52
  5. 12 10月, 2009 1 次提交
  6. 28 7月, 2009 1 次提交
  7. 09 7月, 2009 1 次提交
  8. 06 6月, 2009 1 次提交
    • M
      x86: enable GART-IOMMU only after setting up protection methods · fe2245c9
      Mark Langsdorf 提交于
      The current code to set up the GART as an IOMMU enables GART
      translations before it removes the aperture from the kernel memory
      map, sets the GART PTEs to UC, sets up the guard and scratch
      pages, or does a wbinvd().  This leaves the possibility of cache
      aliasing open and can cause system crashes.
      
      Re-order the code so as to enable the GART translations only
      after all safeguards are in place and the tlb has been flushed.
      
      AMD has tested this patch on both Istanbul systems and 1st
      generation Opteron systems with APG enabled and seen no adverse
      effects.  Istanbul systems with HT Assist enabled sometimes
      see MCE errors due to cache artifacts with the unmodified
      code.
      Signed-off-by: NMark Langsdorf <mark.langsdorf@amd.com>
      Cc: <stable@kernel.org>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Cc: akpm@linux-foundation.org
      Cc: jbarnes@virtuousgeek.org
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fe2245c9
  9. 15 4月, 2009 1 次提交
  10. 30 1月, 2009 1 次提交
  11. 06 1月, 2009 3 次提交
  12. 30 12月, 2008 1 次提交
  13. 18 12月, 2008 1 次提交
  14. 03 12月, 2008 2 次提交
  15. 29 10月, 2008 1 次提交
    • J
      x86, gart: fix gart detection for Fam11h CPUs · 87c6f401
      Joerg Roedel 提交于
      Impact: fix AMD Family 11h boot hangs / USB device problems
      
      The AMD Fam11h CPUs have a K8 northbridge. This northbridge is different
      from other family's because it lacks GART support (as I just learned).
      
      But the kernel implicitly expects a GART if it finds an AMD northbridge.
      
      Fix this by removing the Fam11h northbridge id from the scan list of K8
      northbridges. This patch also changes the message in the GART driver
      about missing K8 northbridges to tell that the GART is missing which is
      the correct information in this case.
      Reported-by: NJouni Malinen <jkmalinen@gmail.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      87c6f401
  16. 17 10月, 2008 2 次提交
  17. 05 10月, 2008 1 次提交
  18. 28 9月, 2008 3 次提交
  19. 25 9月, 2008 3 次提交
    • F
      x86 gart: remove unnecessary initialization · 1615965e
      FUJITA Tomonori 提交于
      There is no point to have such initialization in struct dma_mapping_ops.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1615965e
    • F
      x86: restore old GART alloc_coherent behavior · 1d990882
      FUJITA Tomonori 提交于
      Currently, GART alloc_coherent tries to allocate pages with GFP_DMA32
      for a device having dma_masks > 24bit < 32bits. If GART gets an
      address that a device can't access to, GART try to map the address to
      a virtual I/O address that the device can access to.
      
      But Andi pointed out, "The GART is somewhere in the 4GB range so you
      cannot use it to map anything < 4GB. Also GART is pretty small."
      
      http://lkml.org/lkml/2008/9/12/43
      
      That is, it's possible that GART doesn't have virtual I/O address
      space that a device can access to. The above behavior doesn't work for
      a device having dma_masks > 24bit < 32bits.
      
      This patch restores old GART alloc_coherent behavior (before the
      alloc_coherent rewrite).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1d990882
    • F
      revert "x86: make GART to respect device's dma_mask about virtual mappings" · ecef533e
      FUJITA Tomonori 提交于
      This reverts:
      
      commit bee44f29
      Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Date:   Fri Sep 12 19:42:35 2008 +0900
      
          x86: make GART to respect device's dma_mask about virtual mappings
      
      I wrote the above commit to fix a GART alloc_coherent regression, that
      can't handle a device having dma_masks > 24bit < 32bits, introduced by
      the alloc_coherent rewrite:
      
        http://lkml.org/lkml/2008/8/12/200
      
      After the alloc_coherent rewrite, GART alloc_coherent tried to
      allocate pages with GFP_DMA32. If GART got an address that a device
      can't access to, GART mapped the address to a virtual I/O address. But
      GART mapping mechanism didn't take account of dma mask, so GART could
      use a virtual I/O address that the device can't access to again.
      
      Alan pointed out:
      
      " This is indeed a specific problem found with things like older
        AACRAID where control blocks must be below 31bits and the GART
        is above 0x80000000. "
      
      The above commit modified GART mapping mechanism to take care of dma
      mask. But Andi pointed out, "The GART is somewhere in the 4GB range so
      you cannot use it to map anything < 4GB. Also GART is pretty small."
      
      http://lkml.org/lkml/2008/9/12/43
      
      That means it's possible that GART doesn't have virtual I/O address
      space that a device can access to. The above commit (to modify GART
      mapping mechanism to take care of dma mask) can't fix the regression
      reliably so let's avoid making GART more complicated.
      
      We need a solution that always works for dma_masks > 24bit <
      32bits. That's how GART worked before the alloc_coherent rewrite.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NJoerg Roedel <joerg.roedel@amd.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ecef533e
  20. 23 9月, 2008 1 次提交
  21. 22 9月, 2008 1 次提交
  22. 19 9月, 2008 1 次提交
  23. 14 9月, 2008 2 次提交
  24. 10 9月, 2008 1 次提交
  25. 05 9月, 2008 1 次提交
  26. 22 8月, 2008 3 次提交