)]}'
{
  "commit": "2be23c475af8ae4e25f8bab08d815b17593bd547",
  "tree": "864cf9dca5faaa51c9346a8835c8f101bd5c8fa2",
  "parents": [
    "a387f0f5409276c5cf75eecb61ef6e6896f851b4"
  ],
  "author": {
    "name": "Russell King",
    "email": "rmk+kernel@arm.linux.org.uk",
    "time": "Wed Sep 08 16:27:56 2010 +0100"
  },
  "committer": {
    "name": "Russell King",
    "email": "rmk+kernel@arm.linux.org.uk",
    "time": "Wed Sep 08 16:27:56 2010 +0100"
  },
  "message": "ARM: Ensure PTE modifications via dma_alloc_coherent are visible\n\nDave Hylands reports:\n| We\u0027ve observed a problem with dma_alloc_writecombine when the system\n| is under heavy load (heavy bus traffic).  We\u0027ve managed to reduce the\n| problem to the following snippet, which is run from a kthread in a\n| continuous loop:\n|\n|   void *virtAddr;\n|   dma_addr_t physAddr;\n|   unsigned int numBytes \u003d 256;\n|\n|   for (;;) {\n|       virtAddr \u003d dma_alloc_writecombine(NULL,\n|             numBytes, \u0026physAddr, GFP_KERNEL);\n|       if (virtAddr \u003d\u003d NULL) {\n|          printk(KERN_ERR \"Running out of memory\\n\");\n|          break;\n|       }\n|\n|       /* access DMA memory allocated */\n|       tmp \u003d virtAddr;\n|       *tmp \u003d 0x77;\n|\n|       /* free DMA memory */\n|       dma_free_writecombine(NULL,\n|             numBytes, virtAddr, physAddr);\n|\n|         ...sleep here...\n|     }\n|\n| By itself, the code will run forever with no issues. However, as we\n| increase our bus traffic (typically using DMA) then the *tmp \u003d 0x77\n| line will eventually cause a page fault. If we add a small delay (a\n| few microseconds) before the *tmp \u003d 0x77, then we don\u0027t see a page\n| fault, even under heavy load.\n\nA dsb() is required after modifying the PTE entries to ensure that they\nwill always be visible.  Add this dsb().\n\nReported-by: Dave Hylands \u003cdhylands@gmail.com\u003e\nTested-by: Dave Hylands \u003cdhylands@gmail.com\u003e\nSigned-off-by: Russell King \u003crmk+kernel@arm.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c704eed63c5ddba4c5f849f7ab7b6420008cef21",
      "old_mode": 33188,
      "old_path": "arch/arm/mm/dma-mapping.c",
      "new_id": "4bc43e535d3baadc657df9af504078ff1ae00570",
      "new_mode": 33188,
      "new_path": "arch/arm/mm/dma-mapping.c"
    }
  ]
}
