)]}'
{
  "commit": "253101e69e217e02802b6f7de453cb6b209f1dfa",
  "tree": "7a5267c05ea313a181af44e5d7f2e8ffb202b2dc",
  "parents": [
    "957d2605426531e763d35c0d8984f34a8d9dd5c3"
  ],
  "author": {
    "name": "Carl-Daniel Hailfinger",
    "email": "c-d.hailfinger.devel.2006@gmx.net",
    "time": "Wed Mar 31 23:55:06 2010 +0000"
  },
  "committer": {
    "name": "Carl-Daniel Hailfinger",
    "email": "c-d.hailfinger.devel.2006@gmx.net",
    "time": "Wed Mar 31 23:55:06 2010 +0000"
  },
  "message": "Refine and fix the delay loop calculation\n\nThe current delay loop calculation is still from revision 1 of flashrom,\nand since then it had a logic bug which caused all delays to be twice as\nlong as intended.\n\nFix the delay duration.\n\nProtect against delay loop overflows.\n\nDetect a non-working delay loop.\n\nChange the delay loop itself to ensure clever compiler optimizers won\u0027t\neliminate it (as happens with clang/llvm in the current code). Some\npeople suggested machine-specific asm, but the empty asm statement with\nthe loop counter as register/memory input has the benefit of being\nperfectly cross-platform and working in gcc and clang.\n\nIf time goes backwards (catastrophical NTP time difference, manual\ntime change), timing measurements were shot because the new-old time\nsubtraction yielded negative numbers which weren\u0027t handled correctly\nbecause the variable is unsigned. Work around that issue (a fix is\nmathematically impossible).\n\nIf time goes forward too fast, pick the biggest possible timing\nmeasurement with a guaranteed overflow avoidance for all timing\ncalculations.\n\nCheck four times if the calculated timing is at most 10% too fast. This\naddresses OS scheduler interactions, e.g. being scheduled out during\nmeasurement which inflates measurements.\n\nIf the timing looks like garbage, recalculate the timer values up to\nfour times before giving up.\n\nAvoid division by zero in rare cases where timing measurements for a 250\nms delay returned 0 us elapsed.\n\nCorresponding to flashrom svn r990.\n\nSigned-off-by: Carl-Daniel Hailfinger \u003cc-d.hailfinger.devel.2006@gmx.net\u003e\nAcked-by: Maciej Pijanka \u003cmaciej.pijanka@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ac580177528c3c4ace90e26b01e7f55e98f47c88",
      "old_mode": 33188,
      "old_path": "udelay.c",
      "new_id": "ff6620ae39a3f4b79f367a7345ebb4fa6b3898f1",
      "new_mode": 33188,
      "new_path": "udelay.c"
    }
  ]
}
