)]}'
{
  "commit": "56fb4df6da76c35dca22036174e2d1edef83ff1f",
  "tree": "b39f152ec9ed682edceca965a85680fd4bf736a7",
  "parents": [
    "3c936465249f863f322154ff1aaa628b84ee5750"
  ],
  "author": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sun Feb 26 23:24:22 2006 -0800"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@sunset.davemloft.net",
    "time": "Mon Mar 20 01:11:16 2006 -0800"
  },
  "message": "[SPARC64]: Elminate all usage of hard-coded trap globals.\n\nUltraSPARC has special sets of global registers which are switched to\nfor certain trap types.  There is one set for MMU related traps, one\nset of Interrupt Vector processing, and another set (called the\nAlternate globals) for all other trap types.\n\nFor what seems like forever we\u0027ve hard coded the values in some of\nthese trap registers.  Some examples include:\n\n1) Interrupt Vector global %g6 holds current processors interrupt\n   work struct where received interrupts are managed for IRQ handler\n   dispatch.\n\n2) MMU global %g7 holds the base of the page tables of the currently\n   active address space.\n\n3) Alternate global %g6 held the current_thread_info() value.\n\nSuch hardcoding has resulted in some serious issues in many areas.\nThere are some code sequences where having another register available\nwould help clean up the implementation.  Taking traps such as\ncross-calls from the OBP firmware requires some trick code sequences\nwherein we have to save away and restore all of the special sets of\nglobal registers when we enter/exit OBP.\n\nWe were also using the IMMU TSB register on SMP to hold the per-cpu\narea base address, which doesn\u0027t work any longer now that we actually\nuse the TSB facility of the cpu.\n\nThe implementation is pretty straight forward.  One tricky bit is\ngetting the current processor ID as that is different on different cpu\nvariants.  We use a stub with a fancy calling convention which we\npatch at boot time.  The calling convention is that the stub is\nbranched to and the (PC - 4) to return to is in register %g1.  The cpu\nnumber is left in %g6.  This stub can be invoked by using the\n__GET_CPUID macro.\n\nWe use an array of per-cpu trap state to store the current thread and\nphysical address of the current address space\u0027s page tables.  The\nTRAP_LOAD_THREAD_REG loads %g6 with the current thread from this\ntable, it uses __GET_CPUID and also clobbers %g1.\n\nTRAP_LOAD_IRQ_WORK is used by the interrupt vector processing to load\nthe current processor\u0027s IRQ software state into %g6.  It also uses\n__GET_CPUID and clobbers %g1.\n\nFinally, TRAP_LOAD_PGD_PHYS loads the physical address base of the\ncurrent address space\u0027s page tables into %g7, it clobbers %g1 and uses\n__GET_CPUID.\n\nMany refinements are possible, as well as some tuning, with this stuff\nin place.\n\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a73553ae7e53b76d04d979227bee32f26a9ddd91",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/entry.S",
      "new_id": "906b64ffdb1bc6a3c2f23ebf8ed44e528c791967",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/entry.S"
    },
    {
      "type": "modify",
      "old_id": "567dbb765c3494bc16ba97e3ff820d45577e9b05",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/etrap.S",
      "new_id": "8b3b6d720ed52ac605ccf95782c8183fec2ac0c0",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/etrap.S"
    },
    {
      "type": "modify",
      "old_id": "d00e20693be1024d4099d32ad33e67b7ba8c2eee",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/head.S",
      "new_id": "82ce5bced9c70defe5d553583feec4919aadba4d",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/head.S"
    },
    {
      "type": "modify",
      "old_id": "f7490ef629b9337cb762d1004c24aa3da9ec22fd",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/irq.c",
      "new_id": "3e48af2769d4801065e2176f90b57508edac2d18",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/irq.c"
    },
    {
      "type": "modify",
      "old_id": "213eb4a9d8a41e4cd4652e1836848123db755582",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/rtrap.S",
      "new_id": "5a62ec5d531cd2ef3dd23f2d3103a712ef33a8bb",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/rtrap.S"
    },
    {
      "type": "modify",
      "old_id": "158bd31e15b790f255a81e2d23e024baf7157dca",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/setup.c",
      "new_id": "59a70301a6cf65aeebc0195191595064e5d95bea",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/setup.c"
    },
    {
      "type": "modify",
      "old_id": "d2d3369e7b5dc2a18424959073f8c96099168f24",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/smp.c",
      "new_id": "8c245859d2126166bc530fc8eba75741253c8f4d",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/smp.c"
    },
    {
      "type": "modify",
      "old_id": "782d8c4973e4515a28e7c464ef5d344aa10b248c",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/trampoline.S",
      "new_id": "18c333f841e3e6defba9a56c5f986ced78b2ea63",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/trampoline.S"
    },
    {
      "type": "modify",
      "old_id": "8d44ae5a15e32f11e8ebee392ecb67a350799fa3",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/traps.c",
      "new_id": "f47f4874253cb12e8897f047814292b96aed5da5",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/traps.c"
    },
    {
      "type": "modify",
      "old_id": "44b9e6fed09fc11679bab27e833e8e8e6df37b08",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/tsb.S",
      "new_id": "50752c518773d3897a68143e7ca5282101049c76",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/tsb.S"
    },
    {
      "type": "modify",
      "old_id": "56f060c8fbf0fc65bcd465718a06cd24741130e3",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/ttable.S",
      "new_id": "2fb7a33993c0d57299327756f14fbc076b498362",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/ttable.S"
    },
    {
      "type": "modify",
      "old_id": "f5d93aa99cbb1659e2adb7986410a4c0b0c0c81b",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/winfixup.S",
      "new_id": "de588036df4300f965ef0a9cbc03bdad7d61cad3",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/winfixup.S"
    },
    {
      "type": "modify",
      "old_id": "22791f29552e5b3dac954f61ac2156fda113a3aa",
      "old_mode": 33188,
      "old_path": "arch/sparc64/mm/ultra.S",
      "new_id": "a87394824ec2d7dd300bf0593e53906637837fe1",
      "new_mode": 33188,
      "new_path": "arch/sparc64/mm/ultra.S"
    },
    {
      "type": "modify",
      "old_id": "f7c0faede8b872bbac0e152345c9b86ca2b68634",
      "old_mode": 33188,
      "old_path": "include/asm-sparc64/cpudata.h",
      "new_id": "6c57cbb9a7d13b4676c13902d3f949b5157e2b6b",
      "new_mode": 33188,
      "new_path": "include/asm-sparc64/cpudata.h"
    },
    {
      "type": "modify",
      "old_id": "af254e5818348095aa62c841ede600765a4a9065",
      "old_mode": 33188,
      "old_path": "include/asm-sparc64/system.h",
      "new_id": "26c0807af3e4c8b2dcad873f141f9d7dd5cb9224",
      "new_mode": 33188,
      "new_path": "include/asm-sparc64/system.h"
    },
    {
      "type": "modify",
      "old_id": "2784f80094c335202bfd55545be06ae2600ef906",
      "old_mode": 33188,
      "old_path": "include/asm-sparc64/ttable.h",
      "new_id": "f557db4faf84f58130b53321845df60837e9cddb",
      "new_mode": 33188,
      "new_path": "include/asm-sparc64/ttable.h"
    }
  ]
}
