)]}'
{
  "commit": "3c5ead52ed68406c0ee789024c4ae581be8bcee4",
  "tree": "cd634aba3710115640b372b4fc49fee5ead75acf",
  "parents": [
    "5c7707554858eca8903706b6df7cba5c0f802244"
  ],
  "author": {
    "name": "Chris Metcalf",
    "email": "cmetcalf@tilera.com",
    "time": "Tue Mar 01 13:30:15 2011 -0500"
  },
  "committer": {
    "name": "Chris Metcalf",
    "email": "cmetcalf@tilera.com",
    "time": "Thu Mar 10 16:10:41 2011 -0500"
  },
  "message": "arch/tile: fix deadlock bugs in rwlock implementation\n\nThe first issue fixed in this patch is that pending rwlock write locks\ncould lock out new readers; this could cause a deadlock if a read lock was\nheld on cpu 1, a write lock was then attempted on cpu 2 and was pending,\nand cpu 1 was interrupted and attempted to re-acquire a read lock.\nThe write lock code was modified to not lock out new readers.\n\nThe second issue fixed is that there was a narrow race window where a tns\ninstruction had been issued (setting the lock value to \"1\") and the store\ninstruction to reset the lock value correctly had not yet been issued.\nIn this case, if an interrupt occurred and the same cpu then tried to\nmanipulate the lock, it would find the lock value set to \"1\" and spin\nforever, assuming some other cpu was partway through updating it.  The fix\nis to enforce an interrupt critical section around the tns/store pair.\n\nIn addition, this change now arranges to always validate that after\na readlock we have not wrapped around the count of readers, which\nis only eight bits.\n\nSince these changes make the rwlock \"fast path\" code heavier weight,\nI decided to move all the rwlock code all out of line, leaving only the\nconventional spinlock code with fastpath inlines.  Since the read_lock\nand read_trylock implementations ended up very similar, I just expressed\nread_lock in terms of read_trylock.\n\nAs part of this change I also eliminate support for the now-obsolete\ntns_atomic mode.\n\nSigned-off-by: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "88efdde8dd2b6c67367272b1f048823c7eb4403c",
      "old_mode": 33188,
      "old_path": "arch/tile/include/asm/spinlock_32.h",
      "new_id": "a8f2c6e31a87666c8578ef6ece328bf675371174",
      "new_mode": 33188,
      "new_path": "arch/tile/include/asm/spinlock_32.h"
    },
    {
      "type": "modify",
      "old_id": "5cd1c4004ecaee49ce19cd55782b8161cf2c5ffc",
      "old_mode": 33188,
      "old_path": "arch/tile/lib/spinlock_32.c",
      "new_id": "cb0999fb64b4ae77f8cb02fd7926a1df7b9a0ae6",
      "new_mode": 33188,
      "new_path": "arch/tile/lib/spinlock_32.c"
    }
  ]
}
