Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4337071pxf; Tue, 30 Mar 2021 05:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpAws9R7fnbZFvcwfFe+u0R5NMF5UsaqVkIa5HCdl6o6hIJEvy7IpJGuOdlBhVNcYgy6DL X-Received: by 2002:a17:907:3ea0:: with SMTP id hs32mr32410371ejc.411.1617107684457; Tue, 30 Mar 2021 05:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617107684; cv=none; d=google.com; s=arc-20160816; b=dzsCgaWrKfAuZELYJ1TCqijgvvpGT8wQg+8gBAW/JByvsoS0FEFzEwB7ZiyTnVVbpG V9SNmwv64BTPllEmHQGRuL6AYqrclnk09RJ3HqTFwxrLGaKktD4MmXQGs63E7dCrc66T dVoJ9LCI8E+94srWGlkHJxKaUv7kRFiaBHgT11WfnCc60XmOth7gYQjmFYE346C41ymI JRmLQb/THVdfAEl0h1Y08V7i8SIGoMllligITMxLS+XgQHHSiMC9ysIIGM79YSwLEFRc VhJGe24JqHj0zMJl7gt/pdIRDJe4XBN1+1xHF6vD3BqGr2QbVmfd6uC1VNrn3SHE+/Iw Nw7Q== 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=0zXyI1yetwTGYJFePdX3pdL1jxNBabDK2g4CkJzJcq8=; b=jG8oZiePVnJ/l3jIAOaQurUK2B9cutrgxhZreXQ9uBx3eFW5OiDeN7cmNtGK27BaTQ /6fAQy6HDy5OUm5jY/goX/gkatAR7NQXMcTMS3/h8p6qau1JiTUF8i/yvz+GVv+Dsbp1 zlAMS2jlKLM444iFbgS/Yqb7cu5he5vuUHPQ7XaOBvFxxm83ZQHbK3Zl7mMlgMq0V+Di tx3LOpseUL5s2iP+c8LRFerNJBUHG/tbwBVdGzwi0GgjTS3QDvU2ME/2KhAhtQcGRxAs blcL5dGlJfYu+bVN5rnAot5LScQ5e4s74Li0+4qaC5l5wSpXdhjq5dX3YteS/Zl3bCu7 ZuYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ar+ZnS44; 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 ju22si14157184ejc.514.2021.03.30.05.34.20; Tue, 30 Mar 2021 05:34:44 -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=Ar+ZnS44; 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 S231819AbhC3MbM (ORCPT + 99 others); Tue, 30 Mar 2021 08:31:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbhC3Max (ORCPT ); Tue, 30 Mar 2021 08:30:53 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6215C061574 for ; Tue, 30 Mar 2021 05:30:52 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id g8so23499958lfv.12 for ; Tue, 30 Mar 2021 05:30:52 -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=0zXyI1yetwTGYJFePdX3pdL1jxNBabDK2g4CkJzJcq8=; b=Ar+ZnS44CybblOQvAYvNqov7Oy7ZltCpQE5htgBQ0PS4qrgt6bC/iJeE/rFYp45kSz Du4dzYK8zzUh/fmk3H567+9gJhVRjw1JhnrD/E0mCcEynzbDauBN7teBzwjqHboIbEP5 0ZQYtMYM0zeD89RQjkr48X+NLhWDF6dzuyQF9FYFLismPpfXw3RTKmQl8RtphFCS7GRO GUWywvmExjrhrgZmDsrr3kk7W60t3mKOYpW3eCvJtKD39p5x1ShWdF3hWL5VsCF7uwMu xISeketgQ174JSYOTeaEH8jZso5PsmAuV8GBdUd6JpmhxihuQc0e9knhvJ/vbdzzKTbW fq+Q== 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=0zXyI1yetwTGYJFePdX3pdL1jxNBabDK2g4CkJzJcq8=; b=B6Q5FYp1JCoJW1utc+uuDB5Pm3CCXrMuK3055yhc8JKP9H4udWuXjnkZ+Hm9QXes/R 8n0lIgI1ZWMydKL8oRUvhkKP64QsAKipQVjqOcFe1hE3hlSQZbYy0atmR1FxEihH+1GN CAJmGxZ22VzVrrHN6LP90VYaAxKo9R7Xmw4AGUGYqi6BT17kpgJ67FiPmBIlqxD0EEaE qPE4rNtJ/STQZBmOPqrXKapWuCHGWt3jJbeQ3pySJ84D+Mz8Cih4ddS0RT2RLljFJ02x MOMP17BvUF/CppHnsBGQmyZnJB/mjjiqNmM4axqdj1Dae0cWAuNO+bg8A6fDx0MPnCUz 0Jgw== X-Gm-Message-State: AOAM532Ng+T30Z0NnvuFgn42uXKpHH8Qp3Rz84rCwKKUImM/Gw4sTrT5 2m/RK9dhJPmhJEtLqfLPiy1+E3uI3sGBMi4ZUFzUGw== X-Received: by 2002:ac2:5509:: with SMTP id j9mr19391729lfk.302.1617107451100; Tue, 30 Mar 2021 05:30:51 -0700 (PDT) MIME-Version: 1.0 References: <20210330080615.21938-1-lecopzer.chen@mediatek.com> <20210330083218.22285-1-lecopzer.chen@mediatek.com> In-Reply-To: <20210330083218.22285-1-lecopzer.chen@mediatek.com> From: Sumit Garg Date: Tue, 30 Mar 2021 18:00:39 +0530 Message-ID: Subject: Re: [PATCH v5] arm64: Enable perf events based hard lockup detector To: Lecopzer Chen Cc: Alexandru Elisei , Catalin Marinas , Daniel Thompson , Douglas Anderson , Lecopzer Chen , linux-arm-kernel , Linux Kernel Mailing List , Mark Rutland , Stephen Boyd , Will Deacon , yj.chiang@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > > > > > 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