Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2225101pxb; Mon, 12 Apr 2021 18:34:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdMgkWH1lkTOlVJl57pxb3nMDKEelgQZUpW+1SLQ6VXMjdp+OZ5QvjBVHOpk3Ky9UoAF68 X-Received: by 2002:a17:902:e846:b029:ea:ce42:186f with SMTP id t6-20020a170902e846b02900eace42186fmr13462163plg.6.1618277668201; Mon, 12 Apr 2021 18:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618277668; cv=none; d=google.com; s=arc-20160816; b=XgL0trzAlUKzmQoR3+oSfT+jlNHrek8ejGF/sY6A8dxs74/pmjF3fc5rYkr4HX757S W+KzWqMh8ucovkG+CBvPgWX4edn/VKsptdjjXdUOz/kK8crHu7cOskv2JtlpgfjCwXZ+ Z9i5GhNK2jbaKi1mhTyfogpzjQZ+TTu9PBoOKenzSMvwk79OeDTbci93skRNGgPWORg6 jZRSP1D+W1I9LGAxMN+DUzt5iajDD6urfI2YK+mCfzv+GyZiFnoZuTzBxMMzOPXpafyr LBoprkjTd8sptyWbGQ4i9E0tpXvwauxxY6u6OBoGM2i+QGnbw4ks6VAE3L+kgeDcEC+v l7jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CiuSat9oXZrDkfWovQuP0xZcrshIInhP+XNXeKoyYAc=; b=Fpq1CdBJv60iQJQJd5rqI8HmibYoQGv7agBtlMlyQQJa2Gibpfviekwu2eT9bOnL0A gXiGPCHWUHxhEcwbObwolN3rT7WBy/NkkhSG0UYNuyT3ASyFtP/Zh9dP5RQOfkijzQeF V6HrqFoUmfhRMhnBsqjrU9B92RJ8JMGyRmRjF3UYey5YLot70bJG6QmL7eaT58p3WVqK HkLZur8NQL6zv0a23dWSydfWVzx+mAsj4l074JO1/FqMlNNQ/xErsEd49k7qQ3FxCXsk dN2P9uD3fB62kThm6QEG+Yg4gtSi3hWMImK4ycqvq6/HpP8n18NgzzTKnQwsEp8g6+H0 q67g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMZbkkfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si15257505plo.14.2021.04.12.18.34.12; Mon, 12 Apr 2021 18:34:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMZbkkfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240817AbhDLMBr (ORCPT + 99 others); Mon, 12 Apr 2021 08:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240810AbhDLMBp (ORCPT ); Mon, 12 Apr 2021 08:01:45 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC20C061574 for ; Mon, 12 Apr 2021 05:01:26 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id r20so15022429ljk.4 for ; Mon, 12 Apr 2021 05:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CiuSat9oXZrDkfWovQuP0xZcrshIInhP+XNXeKoyYAc=; b=kMZbkkfEos6jn8/fUg9ChgrE1JV6VHmZI964BISxF+A0mLoYjNXM5ySjaDvaHi7S38 jCrxVudPC9ylN2+GHo6TNGKZssMG6WS2mB/Um9pEJRzw6fPatU96ElpI8J8uTnab9wUb fDJLG6V6723QIoXbcEzi51vZ151WWT4KFSt2mdTWWfjiYyDENvaE58BOJKTXxzK0hr9i mQu+ngtDUTqMsTsUD2mq7Ch0oex/jxXJ37pe1+3L6OPKNe7QxLZlUBoZAqKNfp+JKpPL uPaLb2qhvJUXc45Yb6gej+b5FvzDiQwwvId5pUUofbn89OMsLmgJTMTzYSXBmL79ovdC KdJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CiuSat9oXZrDkfWovQuP0xZcrshIInhP+XNXeKoyYAc=; b=tCM8YxA023+6WKSUfbFMP/ggyt9Ejy6A7jYrQ+8xp2GelhKBn0jBCbTINmTOh2Y2+F Py0KJbJeVOnMZGykwv9BgC03WLhnNryra5R1iF391L1lMR9w0Qwe4gLBdR59bq77wcxn vRj13c3OK9++wXK8eLdg8qjmFv/YdqtULrFnoU4ktp8+FJPiDRtpQDBhHSxI/u4Wb2ci 49KHN5XLbjalUQOzpQfjNobPh8Zw7LBOKbDhyr7M/mGVYMhWZ8/E4gMSzqBeslq7bSnn dfrB5hnrJ4LXPyLXJSooWTYaGawTWPJUf6WvsYDZEl/iceE3lcteUmDHOpD69sLTEl7V kjaw== X-Gm-Message-State: AOAM5313Gg/oKd3LdMh7mxl/GuIKmK8depU3SWWvTWGKEUZx3uicztRW fCenMfA/+Ed/Snpt46OFsEX7qHNToUIEsOx62lvr7Q== X-Received: by 2002:a2e:5c47:: with SMTP id q68mr18154053ljb.314.1618228884737; Mon, 12 Apr 2021 05:01:24 -0700 (PDT) MIME-Version: 1.0 References: <20210330080615.21938-1-lecopzer.chen@mediatek.com> <20210330083218.22285-1-lecopzer.chen@mediatek.com> In-Reply-To: From: Sumit Garg Date: Mon, 12 Apr 2021 17:31:13 +0530 Message-ID: Subject: Re: [PATCH v5] arm64: Enable perf events based hard lockup detector To: Will Deacon Cc: Alexandru Elisei , Catalin Marinas , Daniel Thompson , Douglas Anderson , Lecopzer Chen , Lecopzer Chen , linux-arm-kernel , Linux Kernel Mailing List , Mark Rutland , Stephen Boyd , yj.chiang@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On Tue, 30 Mar 2021 at 18:00, Sumit Garg wrote: > > On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen wrote: > > > > > > Hi Will, Mark, > > > > > > > > On Fri, 15 Jan 2021 at 17:32, Sumit Garg wrote: > > > > > > > > > > With the recent feature added to enable perf events to use pseudo NMIs > > > > > as interrupts on platforms which support GICv3 or later, its now been > > > > > possible to enable hard lockup detector (or NMI watchdog) on arm64 > > > > > platforms. So enable corresponding support. > > > > > > > > > > One thing to note here is that normally lockup detector is initialized > > > > > just after the early initcalls but PMU on arm64 comes up much later as > > > > > device_initcall(). So we need to re-initialize lockup detection once > > > > > PMU has been initialized. > > > > > > > > > > Signed-off-by: Sumit Garg > > > > > --- > > > > > > > > > > Changes in v5: > > > > > - Fix lockup_detector_init() invocation to be rather invoked from CPU > > > > > binded context as it makes heavy use of per-cpu variables and shouldn't > > > > > be invoked from preemptible context. > > > > > > > > > > > > > Do you have any further comments on this? > > > > Since there aren't any further comments, can you re-pick this feature for 5.13? -Sumit > > > > Lecopzer, > > > > > > > > Does this feature work fine for you now? > > > > > > This really fixes the warning, I have a real hardware for testing this now. > > Thanks for the testing. I assume it as an implicit Tested-by. > > > > but do we need to call lockup_detector_init() for each cpu? > > > > > > In init/main.c, it's only called by cpu 0 for once. > > > > Oh sorry, I just misread the code, please ignore previous mail. > > > > No worries. > > -Sumit > > > > > BRs, > > Lecopzer