)]}'
{
  "commit": "7ecb37f62fe58e3e4d9b03443b92d213b2c108ce",
  "tree": "87a0b315ded72ce270f2eab5ac0f846e6394f203",
  "parents": [
    "e6c4dcb308160115287afd87afb63b5684d75a5b"
  ],
  "author": {
    "name": "Madhavan Srinivasan",
    "email": "maddy@linux.vnet.ibm.com",
    "time": "Thu Nov 02 17:42:26 2017 +0530"
  },
  "committer": {
    "name": "Michael Ellerman",
    "email": "mpe@ellerman.id.au",
    "time": "Fri Nov 03 09:38:05 2017 +1100"
  },
  "message": "powerpc/perf: Fix core-imc hotplug callback failure during imc initialization\n\nCall trace observed during boot:\n\n  nest_capp0_imc performance monitor hardware support registered\n  nest_capp1_imc performance monitor hardware support registered\n  core_imc memory allocation for cpu 56 failed\n  Unable to handle kernel paging request for data at address 0xffa400010\n  Faulting instruction address: 0xc000000000bf3294\n  0:mon\u003e e\n  cpu 0x0: Vector: 300 (Data Access) at [c000000ff38ff8d0]\n      pc: c000000000bf3294: mutex_lock+0x34/0x90\n      lr: c000000000bf3288: mutex_lock+0x28/0x90\n      sp: c000000ff38ffb50\n     msr: 9000000002009033\n     dar: ffa400010\n   dsisr: 80000\n    current \u003d 0xc000000ff383de00\n    paca    \u003d 0xc000000007ae0000\t softe: 0\t irq_happened: 0x01\n      pid   \u003d 13, comm \u003d cpuhp/0\n  Linux version 4.11.0-39.el7a.ppc64le (mockbuild@ppc-058.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Oct 3 07:42:44 EDT 2017\n  0:mon\u003e t\n  [c000000ff38ffb80] c0000000002ddfac perf_pmu_migrate_context+0xac/0x470\n  [c000000ff38ffc40] c00000000011385c ppc_core_imc_cpu_offline+0x1ac/0x1e0\n  [c000000ff38ffc90] c000000000125758 cpuhp_invoke_callback+0x198/0x5d0\n  [c000000ff38ffd00] c00000000012782c cpuhp_thread_fun+0x8c/0x3d0\n  [c000000ff38ffd60] c0000000001678d0 smpboot_thread_fn+0x290/0x2a0\n  [c000000ff38ffdc0] c00000000015ee78 kthread+0x168/0x1b0\n  [c000000ff38ffe30] c00000000000b368 ret_from_kernel_thread+0x5c/0x74\n\nWhile registering the cpuhoplug callbacks for core-imc, if we fails\nin the cpuhotplug online path for any random core (either because opal call to\ninitialize the core-imc counters fails or because memory allocation fails for\nthat core), ppc_core_imc_cpu_offline() will get invoked for other cpus who\nsuccessfully returned from cpuhotplug online path.\n\nBut in the ppc_core_imc_cpu_offline() path we are trying to migrate the event\ncontext, when core-imc counters are not even initialized. Thus creating the\nabove stack dump.\n\nAdd a check to see if core-imc counters are enabled or not in the cpuhotplug\noffline path before migrating the context to handle this failing scenario.\n\nFixes: 885dcd709ba9 (\"powerpc/perf: Add nest IMC PMU support\")\nSigned-off-by: Madhavan Srinivasan \u003cmaddy@linux.vnet.ibm.com\u003e\nSigned-off-by: Anju T Sudhakar \u003canju@linux.vnet.ibm.com\u003e\nSigned-off-by: Michael Ellerman \u003cmpe@ellerman.id.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "92ae5de0bbacadc4764e2fd53dc5548ec6adb749",
      "old_mode": 33188,
      "old_path": "arch/powerpc/perf/imc-pmu.c",
      "new_id": "36344117c680b9e0500b345c18f98d11cb246134",
      "new_mode": 33188,
      "new_path": "arch/powerpc/perf/imc-pmu.c"
    }
  ]
}
