)]}'
{
  "commit": "75f1cdf1dda92cae037ec848ae63690d91913eac",
  "tree": "9c12705002ebfa2d75333c20a19d0ac15f1db1d9",
  "parents": [
    "ad32e8cb86e7894aac51c8963eaa9f36bb8a4e14"
  ],
  "author": {
    "name": "FUJITA Tomonori",
    "email": "fujita.tomonori@lab.ntt.co.jp",
    "time": "Tue Nov 10 19:46:20 2009 +0900"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Tue Nov 10 12:32:07 2009 +0100"
  },
  "message": "x86: Handle HW IOMMU initialization failure gracefully\n\nIf HW IOMMU initialization fails (Intel VT-d often does this,\ntypically due to BIOS bugs), we fall back to nommu. It doesn\u0027t\nwork for the majority since nowadays we have more than 4GB\nmemory so we must use swiotlb instead of nommu.\n\nThe problem is that it\u0027s too late to initialize swiotlb when HW\nIOMMU initialization fails. We need to allocate swiotlb memory\nearlier from bootmem allocator. Chris explained the issue in\ndetail:\n\n  http://marc.info/?l\u003dlinux-kernel\u0026m\u003d125657444317079\u0026w\u003d2\n\nThe current x86 IOMMU initialization sequence is too complicated\nand handling the above issue makes it more hacky.\n\nThis patch changes x86 IOMMU initialization sequence to handle\nthe above issue cleanly.\n\nThe new x86 IOMMU initialization sequence are:\n\n1. we initialize the swiotlb (and setting swiotlb to 1) in the case\n   of (max_pfn \u003e MAX_DMA32_PFN \u0026\u0026 !no_iommu). dma_ops is set to\n   swiotlb_dma_ops or nommu_dma_ops. if swiotlb usage is forced by\n   the boot option, we finish here.\n\n2. we call the detection functions of all the IOMMUs\n\n3. the detection function sets x86_init.iommu.iommu_init to the\n   IOMMU initialization function (so we can avoid calling the\n   initialization functions of all the IOMMUs needlessly).\n\n4. if the IOMMU initialization function doesn\u0027t need to swiotlb\n   then sets swiotlb to zero (e.g. the initialization is\n   sucessful).\n\n5. if we find that swiotlb is set to zero, we free swiotlb\n   resource.\n\nSigned-off-by: FUJITA Tomonori \u003cfujita.tomonori@lab.ntt.co.jp\u003e\nCc: chrisw@sous-sol.org\nCc: dwmw2@infradead.org\nCc: joerg.roedel@amd.com\nCc: muli@il.ibm.com\nLKML-Reference: \u003c1257849980-22640-10-git-send-email-fujita.tomonori@lab.ntt.co.jp\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "878b307157665e60b3ff6a0005add8e5b4fe5add",
      "old_mode": 33188,
      "old_path": "arch/x86/include/asm/iommu.h",
      "new_id": "df42a712361f0c304c816b79f8ca85366a04aa23",
      "new_mode": 33188,
      "new_path": "arch/x86/include/asm/iommu.h"
    },
    {
      "type": "modify",
      "old_id": "0285521e0a991d09dbf3fd01e85489f068083d3f",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/amd_iommu.c",
      "new_id": "66237fde758fd020d66230c987c510200a82bc10",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/amd_iommu.c"
    },
    {
      "type": "modify",
      "old_id": "c41aabddaa2a511a9691b6fbc238323c97e4568b",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/amd_iommu_init.c",
      "new_id": "0d4581e602a42858ee23a384d305ecf6a54cb375",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/amd_iommu_init.c"
    },
    {
      "type": "modify",
      "old_id": "03933cf0b63ced2dfcb3a119588653933275bc06",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/aperture_64.c",
      "new_id": "e0dfb6856aa297ef9349dc36c3b5cef93b5abbf0",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/aperture_64.c"
    },
    {
      "type": "modify",
      "old_id": "47bd419ea4d23b50e0f1b671a66061a01c1abe78",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/pci-calgary_64.c",
      "new_id": "833f491440b9c6b9cab7fffde007afe29f63669f",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/pci-calgary_64.c"
    },
    {
      "type": "modify",
      "old_id": "bed05e2e589052d5f1f1c7e7b16f60d8b1d500ca",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/pci-dma.c",
      "new_id": "a234e63c26565709dde5f9cb3e79ac5e9bca77b4",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/pci-dma.c"
    },
    {
      "type": "modify",
      "old_id": "0410bd30060d1ac19bad2e1f87d127c6d32c6ddb",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/pci-gart_64.c",
      "new_id": "919182e15d1e125124d3a4dd46eb5f07f199e589",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/pci-gart_64.c"
    },
    {
      "type": "modify",
      "old_id": "a3933d4330cd31f1ec4c6797f5e892279d9d6c7f",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/pci-nommu.c",
      "new_id": "875e3822ae61c27a0e6fa46f857887e7bef4400f",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/pci-nommu.c"
    },
    {
      "type": "modify",
      "old_id": "ea20ef7ca523371e66382e24f794ebce55f2bbc1",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/pci-swiotlb.c",
      "new_id": "17ce4221bd030ca0ca9e43c2e3251201425b2d90",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/pci-swiotlb.c"
    },
    {
      "type": "modify",
      "old_id": "bce9cd7c755a81b8a35d65dcd7a6b5723a854107",
      "old_mode": 33188,
      "old_path": "drivers/pci/dmar.c",
      "new_id": "437399667e5afb093f965a930f2cc67f3c89faf0",
      "new_mode": 33188,
      "new_path": "drivers/pci/dmar.c"
    },
    {
      "type": "modify",
      "old_id": "b1e97e6825009295088d62b183f8136616bbe917",
      "old_mode": 33188,
      "old_path": "drivers/pci/intel-iommu.c",
      "new_id": "43d755a2e14aa8908a22a3ff54c046b86794c4ff",
      "new_mode": 33188,
      "new_path": "drivers/pci/intel-iommu.c"
    },
    {
      "type": "modify",
      "old_id": "0c12d7cce300d1c8cc465993b3c04e38693fe2d3",
      "old_mode": 33188,
      "old_path": "lib/swiotlb.c",
      "new_id": "e6755a0574fbc3014bf45a7c4bc3cb3c13e81411",
      "new_mode": 33188,
      "new_path": "lib/swiotlb.c"
    }
  ]
}
