1. 10 11月, 2009 7 次提交
    • F
      x86, 32-bit: Fix swiotlb boot crash · 72d03802
      FUJITA Tomonori 提交于
      Ingo Molnar reported this boot crash:
      
      [    8.655620] pata_amd 0000:00:06.0: version 0.4.1
      [    8.660286] BUG: unable to handle kernel NULL pointer dereference at 00000034
      [    8.663572] IP: [<c100617b>] dma_supported+0x3b/0xa4
      [    8.663572] *pde = 00000000
      
      Initialize dma_ops properly in the 32-bit case.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      72d03802
    • 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: intel-iommu: Convert detect_intel_iommu to use iommu_init hook · 9d5ce73a
      FUJITA Tomonori 提交于
      This changes detect_intel_iommu() to set intel_iommu_init() to
      iommu_init hook if detect_intel_iommu() finds 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-6-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      [ -v2: build fix for the !CONFIG_DMAR case ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9d5ce73a
    • F
      x86: amd_iommu: Convert amd_iommu_detect() to use iommu_init hook · ea1b0d39
      FUJITA Tomonori 提交于
      This changes amd_iommu_detect() to set amd_iommu_init to
      iommu_init hook if amd_iommu_detect() finds the AMD IOMMU.
      
      We can kill the code to check if we found the IOMMU in
      amd_iommu_init() since amd_iommu_detect() sets amd_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-5-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea1b0d39
    • 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
    • F
      x86: Calgary: Convert detect_calgary() to use iommu_init hook · d7b9f7be
      FUJITA Tomonori 提交于
      This changes detect_calgary() to set init_calgary() to
      iommu_init hook if detect_calgary() finds the Calgary IOMMU.
      
      We can kill the code to check if we found the IOMMU in
      init_calgary() since detect_calgary() sets init_calgary() only
      when it found the IOMMU.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NMuli Ben-Yehuda <muli@il.ibm.com>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      LKML-Reference: <1257849980-22640-3-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d7b9f7be
    • F
      x86: Add iommu_init to x86_init_ops · d07c1be0
      FUJITA Tomonori 提交于
      We call the detections functions of all the IOMMUs then all
      their initialization functions. The latter is pointless since we
      don't detect multiple different IOMMUs. What we need to do is
      calling the initialization function of the detected IOMMU.
      
      This adds iommu_init hook to x86_init_ops so if an IOMMU
      detection function can set its initialization function to the
      hook.
      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-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d07c1be0
  2. 08 11月, 2009 2 次提交
  3. 12 10月, 2009 1 次提交
  4. 04 10月, 2009 1 次提交
  5. 10 9月, 2009 1 次提交
  6. 03 9月, 2009 1 次提交
  7. 01 9月, 2009 1 次提交
  8. 03 8月, 2009 1 次提交
  9. 28 7月, 2009 1 次提交
  10. 02 7月, 2009 1 次提交
  11. 15 6月, 2009 1 次提交
  12. 01 5月, 2009 1 次提交
  13. 29 4月, 2009 1 次提交
    • F
      Intel IOMMU Pass Through Support · 4ed0d3e6
      Fenghua Yu 提交于
      The patch adds kernel parameter intel_iommu=pt to set up pass through
      mode in context mapping entry. This disables DMAR in linux kernel; but
      KVM still runs on VT-d and interrupt remapping still works.
      
      In this mode, kernel uses swiotlb for DMA API functions but other VT-d
      functionalities are enabled for KVM. KVM always uses multi level
      translation page table in VT-d. By default, pass though mode is disabled
      in kernel.
      
      This is useful when people don't want to enable VT-d DMAR in kernel but
      still want to use KVM and interrupt remapping for reasons like DMAR
      performance concern or debug purpose.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Acked-by: NWeidong Han <weidong@intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      4ed0d3e6
  14. 07 4月, 2009 3 次提交
  15. 21 3月, 2009 1 次提交
  16. 17 3月, 2009 2 次提交
  17. 08 1月, 2009 1 次提交
    • K
      PCI: struct device - replace bus_id with dev_name(), dev_set_name() · 1a927133
      Kay Sievers 提交于
      This patch is part of a larger patch series which will remove
      the "char bus_id[20]" name string from struct device. The device
      name is managed in the kobject anyway, and without any size
      limitation, and just needlessly copied into "struct device".
      
      To set and read the device name dev_name(dev) and dev_set_name(dev)
      must be used. If your code uses static kobjects, which it shouldn't
      do, "const char *init_name" can be used to statically provide the
      name the registered device should have. At registration time, the
      init_name field is cleared, to enforce the use of dev_name(dev) to
      access the device name at a later time.
      
      We need to get rid of all occurrences of bus_id in the entire tree
      to be able to enable the new interface. Please apply this patch,
      and possibly convert any remaining remaining occurrences of bus_id.
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-Off-By: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      1a927133
  18. 06 1月, 2009 1 次提交
  19. 18 12月, 2008 1 次提交
  20. 17 12月, 2008 1 次提交
  21. 05 12月, 2008 1 次提交
  22. 03 12月, 2008 1 次提交
  23. 28 11月, 2008 1 次提交
  24. 25 10月, 2008 1 次提交
  25. 18 10月, 2008 1 次提交
  26. 17 10月, 2008 1 次提交
    • J
      x86: rename iommu_num_pages function to iommu_nr_pages · bdab0ba3
      Joerg Roedel 提交于
      This series of patches re-introduces the iommu_num_pages function so that
      it can be used by each architecture specific IOMMU implementations.  The
      series also changes IOMMU implementations for X86, Alpha, PowerPC and
      UltraSparc.  The other implementations are not yet changed because the
      modifications required are not obvious and I can't test them on real
      hardware.
      
      This patch:
      
      This is a preparation patch for introducing a generic iommu_num_pages function.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Dave Airlie <airlied@linux.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bdab0ba3
  27. 25 9月, 2008 1 次提交
  28. 23 9月, 2008 1 次提交
  29. 19 9月, 2008 1 次提交
  30. 22 8月, 2008 1 次提交