Received: by 10.223.164.221 with SMTP id h29csp2758583wrb; Thu, 2 Nov 2017 17:25:38 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QJ9UqCQ6dfCAoIPYOSCxuBBIvo2fbQtajftEdD6oeiODncFyup8EW6ek4Tb5pdrFtUwUXl X-Received: by 10.84.132.76 with SMTP id 70mr5098762ple.135.1509668738629; Thu, 02 Nov 2017 17:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509668738; cv=none; d=google.com; s=arc-20160816; b=nyOng4yDDBLxweYxQY5m+FrDxALFLPRHCX9zRNBL1XBG7eTqfeoh+d6fmP/ctrzyTH RlMINEFCjpNrYcpbnSBYhGc1T3OLtaC04CuNJJ+Udl7ob/93wsteEJOVXv0ozlfg9x36 XK52qSGmy2MPUx7Y/9Q9NQ4bXSXwjfMyM8wQlx3wR6vvf2KNij2TgJ1gFaDIj1aMOF0V VN02OXoD9ArCNc0h+JPmvoydKGFFm5YdsP9o8hzvVL5cbjnz2zCsTkDbQyjEM5gFIZqR OygQJAeXjCWfvBzgKstDAeKotpEExKQuVxiW+H+U46ETxtnPIOE9fqnDGwmVWl9cwtTk gRSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to:arc-authentication-results; bh=hV2+AmLpJLcGg6IZylPu1IuaFpEtQ/NvlPiloifnsPI=; b=pLKCYxQrWoiyqxu1XtQ2cc6ZfFZL+xM5lbZl8YiI9bjXlyq3PkRRCX6PKZF25f5CBj 36mxOp7C00ybAqWOftxNlCNgEXBrI2xtw0E1Qqkat3KqofBNFjjNKZh/ex3vw8rt2ZaK ZpelRnsd0c9mjiMzIbeUUXnlLdpr4b1uy+/3hj8F9I4XVc+gEei0U9yJTkjuECNTYMHL r7Xr6OpDSArbDdYJ+NZYCqgU3nKyYA8u6ntWC2NzL85sqsBf/wmPVRHZPoRpN4LRsCcD 5LwIabXyV3TzIr22jAEgGCR3ZwkMXAG3Sam2kjyrizENlp6sN7eKzV8e8VLqzf1NwjBD K9Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si4622238pgd.261.2017.11.02.17.25.25; Thu, 02 Nov 2017 17:25:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934694AbdKCAXi (ORCPT + 96 others); Thu, 2 Nov 2017 20:23:38 -0400 Received: from ozlabs.org ([103.22.144.67]:45437 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbdKCAXh (ORCPT ); Thu, 2 Nov 2017 20:23:37 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 3ySjNl4zyhz9t16; Fri, 3 Nov 2017 11:23:35 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 7ecb37f62fe58e3e4d9b03443b92d213b2c108ce In-Reply-To: <1509624746-5632-1-git-send-email-anju@linux.vnet.ibm.com> To: Anju T Sudhakar From: Michael Ellerman Cc: maddy@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, anju@linux.vnet.ibm.com Subject: Re: [v2] powerpc/perf: Fix core-imc hotplug callback failure during imc initialization Message-Id: <3ySjNl4zyhz9t16@ozlabs.org> Date: Fri, 3 Nov 2017 11:23:35 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-11-02 at 12:12:26 UTC, Anju T Sudhakar wrote: > From: Madhavan Srinivasan > > Call trace observed during boot: > > [ 0.750749] PCI: CLS 0 bytes, default 128 > [ 0.750855] Unpacking initramfs... > [ 1.570445] Freeing initrd memory: 23168K > [ 1.571090] rtas_flash: no firmware flash support > [ 1.573873] nest_capp0_imc performance monitor hardware support registered > [ 1.574006] nest_capp1_imc performance monitor hardware support registered > [ 1.579616] core_imc memory allocation for cpu 56 failed > [ 1.579730] Unable to handle kernel paging request for data at address 0xffa400010 > [ 1.579797] Faulting instruction address: 0xc000000000bf3294 > 0:mon> e > cpu 0x0: Vector: 300 (Data Access) at [c000000ff38ff8d0] > pc: c000000000bf3294: mutex_lock+0x34/0x90 > lr: c000000000bf3288: mutex_lock+0x28/0x90 > sp: c000000ff38ffb50 > msr: 9000000002009033 > dar: ffa400010 > dsisr: 80000 > current = 0xc000000ff383de00 > paca = 0xc000000007ae0000 softe: 0 irq_happened: 0x01 > pid = 13, comm = cpuhp/0 > 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 > 0:mon> t > [c000000ff38ffb80] c0000000002ddfac perf_pmu_migrate_context+0xac/0x470 > [c000000ff38ffc40] c00000000011385c ppc_core_imc_cpu_offline+0x1ac/0x1e0 > [c000000ff38ffc90] c000000000125758 cpuhp_invoke_callback+0x198/0x5d0 > [c000000ff38ffd00] c00000000012782c cpuhp_thread_fun+0x8c/0x3d0 > [c000000ff38ffd60] c0000000001678d0 smpboot_thread_fn+0x290/0x2a0 > [c000000ff38ffdc0] c00000000015ee78 kthread+0x168/0x1b0 > [c000000ff38ffe30] c00000000000b368 ret_from_kernel_thread+0x5c/0x74 > > > While registering the cpuhoplug callbacks for core-imc, if we fails > in the cpuhotplug online path for any random core (either because opal call to > initialize the core-imc counters fails or because memory allocation fails for > that core), ppc_core_imc_cpu_offline() will get invoked for other cpus who > successfully returned from cpuhotplug online path. > > But in the ppc_core_imc_cpu_offline() path we are trying to migrate the event > context, when core-imc counters are not even initialized. Thus creating the > above stack dump. > > Add a check to see if core-imc counters are enabled or not in the cpuhotplug > offline path before migrating the context to handle this failing scenario. > > Signed-off-by: Madhavan Srinivasan > Signed-off-by: Anju T Sudhakar Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/7ecb37f62fe58e3e4d9b03443b92d2 cheers From 1583002117001029285@xxx Fri Nov 03 00:21:01 +0000 2017 X-GM-THRID: 1582766204567645963 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread