From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B28C8C433F5 for ; Wed, 15 Sep 2021 03:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9159861214 for ; Wed, 15 Sep 2021 03:51:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236259AbhIODwn (ORCPT ); Tue, 14 Sep 2021 23:52:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbhIODwk (ORCPT ); Tue, 14 Sep 2021 23:52:40 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B30C061574 for ; Tue, 14 Sep 2021 20:51:22 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id w19so1393304pfn.12 for ; Tue, 14 Sep 2021 20:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=572jzkGxeL6YfJP3ZwAjXGhaawSUrfiEVlgivE5LFtc=; b=Qc1YKpfBh+BXdNeqFWOt9SMUtxZO32kP42rboAkSjl99bKxGkrwXTiWlTW2QF9VKNV eHWcBDFqviXzU6Ysxqj5Kd9wBxwE+gR39muUsdlccQ7f8k/IBYaj+lUvQnH+pjJsIHNL bDJQnijNX1yETGxIl22sGgFIBIYFlAG3ZDhjaNevHYgz5K7GGznNG3MePLno2L18F3tL MM/1OCijAmh7DiKVDjlkETdjwREs+Z9lxAKrO1q0ZRqhIJcJvz/31cITusOFaO88rOPR TjtIYSF5jgRxWerpVXe+3M/4p7Wt/pWdKR6ySLX+hwEw4keASVkLgovzlwWQrgONme69 elUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=572jzkGxeL6YfJP3ZwAjXGhaawSUrfiEVlgivE5LFtc=; b=4Qk7LbCNDfKUCmDcPQ0makV9nTG/gg/4Z9gvTcDS//kJ1YqHWeHnL4xv8/n/kydh55 KCjGflvFiwNdltEFiPc9rMKc0j14lZOX0/vmcKVcBdpocpa44CgFH10fqgfvspfQvyqw 5ZEpJGDeys+6PC4RAUfiyVEqgHCJNVjp22M9LUuk+SWwaemwvJu4I3oNTPgc3cnvzf4x HoHrB61fwdgmBI5Eo5gTYLLP/6MQsGX1ZzE9HwnHqGskzDsZs6u9sszTm9oX/h1kmPqL tGwVOLzXrYuHcV4LU36bp4iruY0smUffNlFbfwoyNQyuB2k8EYStQdyG+0UnUl+k6gHf WKsw== X-Gm-Message-State: AOAM532XSZMYUnXqPLFjo7x6uC77iLIvMx2PknWbj66qpLhqyHXKI2s+ 91paalcoofXsz4I5wuQnyQ== X-Google-Smtp-Source: ABdhPJwS9T+vc3XhGASS4drRS336qlUtgAJ4PtZWtSSh4cQIzXsfF6HxEHPBJOPK4lqmgQx9cSjACA== X-Received: by 2002:a05:6a00:1147:b029:3e0:8c37:938e with SMTP id b7-20020a056a001147b02903e08c37938emr8101968pfm.65.1631677882118; Tue, 14 Sep 2021 20:51:22 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id x13sm8602357pfp.133.2021.09.14.20.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:51:21 -0700 (PDT) From: Pingfan Liu To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Pingfan Liu , Sumit Garg , Catalin Marinas , Will Deacon , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Marc Zyngier , Julien Thierry , Kees Cook , Masahiro Yamada , Sami Tolvanen , Petr Mladek , Andrew Morton , Wang Qing , "Peter Zijlstra (Intel)" , Santosh Sivaraj Subject: [PATCH 0/5] watchdog_hld cleanup and async model for arm64 Date: Wed, 15 Sep 2021 11:50:58 +0800 Message-Id: <20210915035103.15586-1-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hard lockup detector is helpful to diagnose unpaired irq enable/disable. Sumit has tried with a series, and the last one is V5 [1]. Since it lasts a long time without any update, I takes a retry, which addresses the delay intialization of watchdog_hld. There is an obstacle to integrate arm64 hw perf event into watchdog_hld. When lockup_detector_init()->watchdog_nmi_probe(), on arm64, PMU is not ready until device_initcall(armv8_pmu_driver_init). And it is deeply integrated with the driver model and cpuhp. Hence it is hard to push the initialization of armv8_pmu_driver_init() before smp_init(). But it is easy to take an opposite approach by enabling watchdog_hld to get the capability of PMU async. The async model is achieved by introducing an extra parameter notifier of watchdog_nmi_probe(). In this series, [1-2/5] are trivial cleanup. [3-5/5] is for this async model. [1]: http://lore.kernel.org/linux-arm-kernel/1610712101-14929-1-git-send-email-sumit.garg@linaro.org Cc: Sumit Garg Cc: Catalin Marinas Cc: Will Deacon Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Marc Zyngier Cc: Julien Thierry Cc: Kees Cook Cc: Masahiro Yamada Cc: Sami Tolvanen Cc: Petr Mladek Cc: Andrew Morton Cc: Wang Qing Cc: "Peter Zijlstra (Intel)" Cc: Santosh Sivaraj To: linux-arm-kernel@lists.infradead.org To: linux-kernel@vger.kernel.org Pingfan Liu (5): kernel/watchdog: remove useless WATCHDOG_DEFAULT kernel/watchdog_hld: clarify the condition in hardlockup_detector_event_create() kernel/watchdog: adapt the watchdog_hld interface for async model kernel/watchdog_hld: simplify the detecting of hld watchdog arm64/watchdog_hld: enable hard lockup on arm64 platform arch/arm64/Kconfig | 3 ++ arch/arm64/include/asm/perf_event.h | 5 ++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 14 ++++- arch/arm64/kernel/watchdog_hld.c | 83 +++++++++++++++++++++++++++++ drivers/perf/arm_pmu.c | 5 ++ include/linux/nmi.h | 20 ++++--- kernel/watchdog.c | 69 ++++++++++++++++++------ kernel/watchdog_hld.c | 26 +++------ 9 files changed, 181 insertions(+), 45 deletions(-) create mode 100644 arch/arm64/kernel/watchdog_hld.c -- 2.31.1