Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp842169pxu; Fri, 4 Dec 2020 17:48:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQT5LZwhICRFe1lmUPfgx4cGI8kQL/wr1kh7bBo0QOrjt3/WT4k+xPOqBWEr5j+qpApTjY X-Received: by 2002:aa7:d297:: with SMTP id w23mr10383624edq.374.1607132922686; Fri, 04 Dec 2020 17:48:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607132922; cv=none; d=google.com; s=arc-20160816; b=ek/NmmMLQuffYLpvidQd9XMoiNsFgfykhO0CE8uUqmbZlWPFUHsVYTUffsJXOElyoh 3uVJlS8q1v26jVWaJYhuwRpkghnuHOoWjM3nqJzfnMol2vwDHFbw9XSUaRzAijYa9lMF Tikn41T7Hm9KwG9lWMNLaHyekJVcOk7Qz++GCT1bOMACNiFtVnhc63RrdZK04AgM4P+Q FzK7pxnx/xKqRVthVkoemkL06zfyxqWwKTSqhB4nObS8ZxY/7SjkEqF9vmTATS233BHd E7lBkGThVz2KYGb0ZC8GWWJStwOV33AggLHM2DypQWs4CXTK5Rh01vmDuiRNXgCOqjfT ZDQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yfnbcXnKaxVtlJzzNRHF0Gxnxvp6ml+K62fOuuwG0xQ=; b=C+G8ZzdNC7vZzYmtIMWjCMj5BTZAeZejrF2UlWKN1RU+pl1Ut8MyTk+nveSkrSZHIc d1MgVj3H86vLn749cxNf1dQ0pmuxaW+KlH1Ci5wlm/ojxiKuGPAnrNrFSE5Z89n7itAH FspQafUpdhBckrxq1LIreMiIHYbnaClN18v3biz6KilIfVltixZEcP2x87vjM5BGZgMT 4rWioPHqKkKk/Ope9+UTc126LtyKCxTZtD8P2lslhcJhXITnKZ5kSVeG4jdPvnLKXyen g/exgIuNf/L7LiwlRCUX/SyZn6Q2Q6K5JgLwfMzdOHcbkfHFdOateC2Bi64jRR4Y/rNc FPkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UOBNKIta; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb2si2450574ejb.489.2020.12.04.17.48.20; Fri, 04 Dec 2020 17:48:42 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=UOBNKIta; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730843AbgLEBpO (ORCPT + 99 others); Fri, 4 Dec 2020 20:45:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34738 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgLEBpO (ORCPT ); Fri, 4 Dec 2020 20:45:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607132628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yfnbcXnKaxVtlJzzNRHF0Gxnxvp6ml+K62fOuuwG0xQ=; b=UOBNKItaXodSjHut27y4LSKlrS9+UyRI+u/Hl7C2G/kJC4WGf5qIpbtRnzhZMIOPJINuvJ W+6rAAG0k5IUBZVEmwLeMEPPparZ1furhFWwTqvBH2qktzaXGzVFGnk6nVrNgc76nHW3P8 znRQJEq+YtM6E4tY1ivMctMtyleAoNA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-4ZINpmTlOnSepeF3G2brOA-1; Fri, 04 Dec 2020 20:43:46 -0500 X-MC-Unique: 4ZINpmTlOnSepeF3G2brOA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D26CC80ED8A; Sat, 5 Dec 2020 01:43:43 +0000 (UTC) Received: from cantor.redhat.com (ovpn-114-119.phx2.redhat.com [10.3.114.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C0F160917; Sat, 5 Dec 2020 01:43:43 +0000 (UTC) From: Jerry Snitselaar To: linux-kernel@vger.kernel.org Cc: linux-integrity@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel test robot , Thomas Gleixner , Jarkko Sakkinen , Jason Gunthorpe , Peter Huewe , James Bottomley , Matthew Garrett , Hans de Goede Subject: [PATCH v3 1/4] irq: export kstat_irqs Date: Fri, 4 Dec 2020 18:43:37 -0700 Message-Id: <20201205014340.148235-2-jsnitsel@redhat.com> In-Reply-To: <20201205014340.148235-1-jsnitsel@redhat.com> References: <20201205014340.148235-1-jsnitsel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To try and detect potential interrupt storms that have been occurring with tpm_tis devices it was suggested to use kstat_irqs() to get the number of interrupts. Since tpm_tis can be built as a module it needs kstat_irqs exported. Reported-by: kernel test robot Cc: Thomas Gleixner Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- include/linux/irqdesc.h | 1 + kernel/irq/irqdesc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 5745491303e0..fff88c1f1ac6 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -153,6 +153,7 @@ static inline void generic_handle_irq_desc(struct irq_desc *desc) } int generic_handle_irq(unsigned int irq); +unsigned int kstat_irqs(unsigned int irq); #ifdef CONFIG_HANDLE_DOMAIN_IRQ /* diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 1a7723604399..12398ef1796b 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -1000,6 +1000,7 @@ unsigned int kstat_irqs(unsigned int irq) sum += *per_cpu_ptr(desc->kstat_irqs, cpu); return sum; } +EXPORT_SYMBOL_GPL(kstat_irqs); /** * kstat_irqs_usr - Get the statistics for an interrupt -- 2.27.0