From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 972E0CA62 for ; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720197; cv=none; b=iF2Bue8vxa6Py7Sfd5qhz/iysQHYOIRMbvjwnEPQb3RAuHxOnXSkPRyafbCO9sIFTxm7pZkc0/2ycyperZ7eoOoHYHrl1v9Cbr4afXOz1rIxx3U/HPqZuzf6HoXdaUsPd7nie1kdzvAp2W4MZjxVHStNq+3HTt4nNcrkTAd3ASM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720197; c=relaxed/simple; bh=vT5HWEWDVSNQ6yqs6+L4wLyOHJcKx6Pb2mPJODDrf3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H5kSv2obK0Lua5oTUzUGjlGfWnfvLE5EBUftGwKQiWjdCcoss9fb1pq0bh6Q2VHaFz8TCExPev0fdNpxs9QFgE+iU9rZLujPdsZ4kip9PWqeV+HS0JvhgxlDUAWxbC8iyEYO1IhJUVKzf3udOsTVc5R5eRvfanS0LW9c0XGUU9A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=tm5pX5sx; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="tm5pX5sx" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmF24gkzlgMVl; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720187; x=1730312188; bh=lLIQ5 C+bYk0x61ONWAtWsD3jfb+Sj3p3mOak9EpltxQ=; b=tm5pX5sxehM0xXFe/81ph f3l0xVSf4hzRJzDGfgF1MS5U3EznuHbHyXa5ScfBnNRKxrO0UvW+FLm+Gt9EaKNu ibIj51QYOv2g4F5jc+CThJkbe3k/B2pm+IAZUjZQFc+HVk2UgQ9D7mzNIbjpYIlA lKkT8RXKyW0W/hbGNRerFML2umCNKWriOVt54F0Sgr1JNNj0JYmwBFSHqyhTrx7j tmNBlAL+9JKfMDa/rmZBu7Y8kRw5MUUPZ1T+Odt19QdLsy6X6FljXw01clZN0o/9 weKPS2CPMClt/oy5E+Gdlb2IRIVUw8T/TLCdEUaZpQpHFM11+wVBqKvng5uUoqLt Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id EVPUsGlPxsXH; Mon, 30 Sep 2024 18:16:27 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmB6gMQzlgMVd; Mon, 30 Sep 2024 18:16:26 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 01/21] genirq: Introduce number_of_interrupts() and set_number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:40 -0700 Message-ID: <20240930181600.1684198-2-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Signed-off-by: Bart Van Assche --- include/linux/irqnr.h | 2 ++ kernel/irq/irqdesc.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 3496baa0b07f..a8b2cb6146e8 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -6,6 +6,8 @@ =20 =20 extern int nr_irqs; +int number_of_interrupts(void) __pure; +int set_number_of_interrupts(int nr); extern struct irq_desc *irq_to_desc(unsigned int irq); unsigned int irq_get_next_irq(unsigned int offset); =20 diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 1dee88ba0ae4..8c6280843964 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -141,6 +141,20 @@ static void desc_set_defaults(unsigned int irq, struct= irq_desc *desc, int node, int nr_irqs =3D NR_IRQS; EXPORT_SYMBOL_GPL(nr_irqs); =20 +int number_of_interrupts(void) +{ + return nr_irqs; +} +EXPORT_SYMBOL_GPL(number_of_interrupts); + +int set_number_of_interrupts(int nr) +{ + nr_irqs =3D nr; + + return nr; +} +EXPORT_SYMBOL_GPL(set_number_of_interrupts); + static DEFINE_MUTEX(sparse_irq_lock); static struct maple_tree sparse_irqs =3D MTREE_INIT_EXT(sparse_irqs, MT_FLAGS_ALLOC_RANGE | From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A51F0198E96 for ; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720199; cv=none; b=i1jIH8gWbUu7txyducoKNtPhQ1yOJmTftkOhUfPvpOpbpcLMTXVjqPmpjIZQAz3DtrBXRVA+6OD0LT7LlccFC6XAyx1ygYZ4HWQDUGGkE5NmPLFdseCaQfuJHLDPcvmbGpVmE/pXFmzciOxEx9b6guH5lOp3AP5qpNR7rNIReyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720199; c=relaxed/simple; bh=WDwc8gYRpmtgbBeDHWhLAwhbFk4YkTn2Rhm0f3uqWv8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oj9dlCjlGbuDZBiqbH1f+MsPLIhjphLVawrdonGjIipwvDqww/Br+c1SVfoPwd0XUIxuVwQiFm/i6I6wnAvnaZMDNOJjHGvOexD/rdhRdDFEcLku6Dz5xnLyWq9xKCuwpcf6EEWc0D8SfuMi1MbTR/4hqL+3VSBxp+glHZutTKI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=AnhKnrV/; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="AnhKnrV/" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmH2QxjzlgMVq; Mon, 30 Sep 2024 18:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720189; x=1730312190; bh=VgE4P OwXumHDhbRY9QKpNFZsu6mNBvvMCT12mJbhiPA=; b=AnhKnrV/mSVKjVYVo8tke 33+4elrMc0zFln1DlMfnGIfks0xgQ8vTRHZ2Q4UkAsP9JQLANT56KvDRaa8DLubB X5kGGsahV1uIBD6ByUC/baebWn22tCaerue90UVUkE5nIKYkyVENVxnxAcc1qzDD eKFtN1e7oUen52p9asaY3mJSZ9A/eTpJlq86Vw2Zf1DlbCvnWb4cn1V3XwnUYW5d iKgCa2+QxDtu+91AZc9npFzAeuiTFu8zZ+i+MWcc4aHOsmMkJaH+wVJ0cUsS4k7E 7RZdXuxFjuHaLBs+TtlV+V7nl3ES7RV79He+Lz90IIJ6SQvCJGL57x7uRCxLFs2W A== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id vk56X9ezNWrz; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmC3SH3zlgMVg; Mon, 30 Sep 2024 18:16:27 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 02/21] ARM: Switch to number_of_interrupts() / set_number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:41 -0700 Message-ID: <20240930181600.1684198-3-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() and set_number_of_interrupts() functions instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Russell King Signed-off-by: Bart Van Assche --- arch/arm/kernel/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index dab42d066d06..cac062d5c8d5 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -111,7 +111,7 @@ void handle_IRQ(unsigned int irq, struct pt_regs *regs) * Some hardware gives randomly wrong interrupts. Rather * than crashing, do something sensible. */ - if (unlikely(!irq || irq >=3D nr_irqs)) + if (unlikely(!irq || irq >=3D number_of_interrupts())) desc =3D NULL; else desc =3D irq_to_desc(irq); @@ -151,7 +151,6 @@ void __init init_IRQ(void) #ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs(void) { - nr_irqs =3D machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS; - return nr_irqs; + return set_number_of_interrupts(machine_desc->nr_irqs ? : NR_IRQS); } #endif From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A52371990AE for ; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720199; cv=none; b=jwyRhJsfCIX49YzsW/h7P3vSQpq3Zh/m4NFu4WBh/Nui6qeJWhcdtWdh/qdDaNdI9ItPoSbZSgzk+a3ax9dGHmU9tCv/Q36Jo30V8wydT3G5/3cJ4M5CcrIHGOLunVfY1Q5Dn1zcuS8vjIMagCqvfD3BqUz6eW2+4y1+vbRehUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720199; c=relaxed/simple; bh=5I6wz9M27IcXTxnFZLa/TqfhYhbKFw6K5/l72hHPrFU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DSKYrhTVU23SPBEV5FaVVwNAxqGVJvE2Jq1urC1aMtm4/EY4xc67T3TLVIS4aorIckKBlXW8fQy2pQuIvtHuveOwvlVhOIkRFjsRdM/Vcgk0SNG9Qiina4dryRx1Z7duy2LPyiKYofn1dod2SoDmu1OrWdV9vhH6DLLxYTshetE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=Vq9qMDyH; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="Vq9qMDyH" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmH4wqqzlgMVr; Mon, 30 Sep 2024 18:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720189; x=1730312190; bh=uAc6w J2DvVJs/XUQfbj8AVim8BHt3tJ+/iQnEfFBomo=; b=Vq9qMDyHYgOZsfn2mZs1R ZbzujqBT7Us7f5rnEPpAVwtRW+YX0vrF0Bgw9tJZjdyzZn89AgqtbkiguCAi0WdW lxj+yNR5V24Io6fcne+KCHAMcuMTSP5WUnY73zG0qa3e9LHStI/E64gHYv6Clk3w 4fTxU0bfiGOPmq68MizUwNffERGTzW2yyzOhrteJtnDCXUbsuroZU7NfRll9+qcu xX9rdiL+o3pmakg1SuzVb6OWjCmdceMkah9BeR1GNgKKA2IzBjuwrtWDPBIFuVD2 vte9cgfb6yEvJ30/B3tJ8danUDdvUjLtccE/uaxmi6e/epl2ASnqVY85t7MJhG5t w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 17P_pviP5kvQ; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmD0DCrzlgMVh; Mon, 30 Sep 2024 18:16:27 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Huacai Chen , WANG Xuerui Subject: [PATCH 03/21] LoongArch: Switch to set_number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:42 -0700 Message-ID: <20240930181600.1684198-4-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the set_number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Huacai Chen Cc: WANG Xuerui Signed-off-by: Bart Van Assche --- arch/loongarch/kernel/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/kernel/irq.c b/arch/loongarch/kernel/irq.c index d129039b368b..8eae704ab5e4 100644 --- a/arch/loongarch/kernel/irq.c +++ b/arch/loongarch/kernel/irq.c @@ -92,9 +92,9 @@ int __init arch_probe_nr_irqs(void) int nr_io_pics =3D bitmap_weight(loongson_sysconf.cores_io_master, NR_CPU= S); =20 if (!cpu_has_avecint) - nr_irqs =3D (64 + NR_VECTORS * nr_io_pics); + set_number_of_interrupts(64 + NR_VECTORS * nr_io_pics); else - nr_irqs =3D (64 + NR_VECTORS * (nr_cpu_ids + nr_io_pics)); + set_number_of_interrupts(64 + NR_VECTORS * (nr_cpu_ids + nr_io_pics)); =20 return NR_IRQS_LEGACY; } From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8469199933 for ; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720201; cv=none; b=BtYxRm01PG2wWxuybwWnFxDgYoOLTmSH/IVpB9RVzceacKhL43dhEN7npDW88EEsUsXvrL9gsd4qQCAhZOkgzuNb7fyg+RAUtoA2nhpeU8q1QOf7Lz2iavYprSqCEZWJ1dUbyr+ZIfMQJnirHk/1qrUq9/Lke3EQH7FS4yhJlyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720201; c=relaxed/simple; bh=qfpysv51Zsfrkk0FRiBBsywBaSMTVnlq7M+eczb5k1s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OpytJ6fvvKZmYMn/d6+Yylyvcc0N9AZ8OHPOMt4990l73DpfIa28lp5D8TE2CTdUiAQZVJRxGDDYKi721FxKQcmKw8UUDcmU5N5LxINlNNOm49mabxieSQjJFWmsSiHYCMWVyUeH8qPhHiMKIC41NPluiilzAFmZz0hhHl9vdqs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=ELHSdJJZ; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="ELHSdJJZ" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmJ63wzzlgMVs; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720189; x=1730312190; bh=zaI39 plbOj1b0fMPH7CHurh+dET18cQh8zlGr0HXTtw=; b=ELHSdJJZaYp7FTWNj8JWl 0t9zqDuLCCUrsH5umTrlv12Jm7F2aCziZxfYDTQ7bCdQjriDquPkv296VB96DWgV 7G63LC/njwBukmkiWnhCqv5OtErCw7PbrMPCdEObffF+A2CuxtABZgphJwO/p6VV jM+0nSGrx7inGGU4FDGP3t5fWfbcJj1HdQ/kMlKMV4xwPQnME6TrnyM4zTOaFqLT yBUFs41qDzKhbhSV8E8bf0pgfcELoFUZlHiOkYQlcdjJpliHKaQHbxg+P0lBVdJX U5nUMMgLPuLCZ+34Dh0cveMID7hDcBzblIoCCm1G0Tk3hVSrs6lGTUGyyd3fZAqC Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id b-l6cx9my2_3; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmD5V7ZzlgMVj; Mon, 30 Sep 2024 18:16:28 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 04/21] powerpc/cell: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:43 -0700 Message-ID: <20240930181600.1684198-5-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Bart Van Assche --- arch/powerpc/platforms/cell/axon_msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platform= s/cell/axon_msi.c index 28dc86744cac..b7996bc091e6 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c @@ -112,7 +112,7 @@ static void axon_msi_cascade(struct irq_desc *desc) pr_devel("axon_msi: woff %x roff %x msi %x\n", write_offset, msic->read_offset, msi); =20 - if (msi < nr_irqs && irq_get_chip_data(msi) =3D=3D msic) { + if (msi < number_of_interrupts() && irq_get_chip_data(msi) =3D=3D msic) { generic_handle_irq(msi); msic->fifo_virt[idx] =3D cpu_to_le32(0xffffffff); } else { From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72E97199259 for ; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720200; cv=none; b=NDzaQyC+g4Sj6fyIlA6/QCYU9EsY3xdETWqX4o+LRNCFA8ahj62cNun+tc80lBTxVluaLYyUc8DzTGJxJbujeY0r/g5T6GqWKMHcMwWOVjkEkgcs71iaIeDDlgRd/2so33za6BoLBXzCvU6jj3DCvbSj3sRaZYV5YgWwesbPJSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720200; c=relaxed/simple; bh=ecJZgpHB7/0Jo7fcSCF38GUsYuaoxnJ/C6rGKksXjA4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PD0Fi7AoBLoi61fJRJK3j4Z2r7U5M4u1GH20nhhEyTwwopLYgSvm1EXfUt5u4fVGO0QUt6b0D0BdzUZBk+zHZvSNoZNXZbTFs67gMjNrslwBroAfB61RGfTAQuNQvT9Gf7uHZv/CwqIFsR9sC/yqXi6v/gzz5OcRM5BykyF6QSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=ubH19xX9; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="ubH19xX9" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmJ0K7GzlgMVh; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720189; x=1730312190; bh=pMx0V IzQXMDEPRC6mdzDwP+uRN02UGl7uaT1XJ4pt3M=; b=ubH19xX9+/7TwFma0/wii T7pJjpJNOKS6myfGyMbZOeOmaEN+dpt7PjYty2VApNxuQP0RD1TgAByQJR5vaTHs z9NGfjNbx4QwHFm+G7xjEZGHJB6Leg2RY86GwLfiJYH+6vJUkIciHzkUftQK4eCc S/1xwrZHyln+nKpfgdW7zYu5lSqTaLDiSmpYc/l6DCFyPBfE5SWrsmTBf7jiPX+V 0KG+s1/oTPGj1fHVc2H6NSuZ3ctnju4wD8c68PC96czc4pFh6LSg7FC/KD/pCHJs NOuzlaQEkz5JcwFdIYFl3qL7hoKsM/jR+H0zTk0F676uNNHCGWBI/yFgRXdjI4bw w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id Uf6Xx3EzOx41; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmF2zKjzlgMVd; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Heiko Carstens Subject: [PATCH 05/21] s390/irq: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:44 -0700 Message-ID: <20240930181600.1684198-6-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Heiko Carstens Signed-off-by: Bart Van Assche --- arch/s390/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index 2639a3d12736..f3842d5eb2c3 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -253,7 +253,7 @@ int show_interrupts(struct seq_file *p, void *v) seq_putc(p, '\n'); goto out; } - if (index < nr_irqs) { + if (index < number_of_interrupts()) { show_msi_interrupt(p, index); goto out; } From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7E8519ABCE for ; Mon, 30 Sep 2024 18:16:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720205; cv=none; b=Is8A7GTPDIUTXeC2ChyFvXNwe02YVW1v3Z1I11hdoW/F4QJvZqKwH/69ac7Xi1gw3/G/lygJ1rF2xRz5F5+s+iv4QLg2pR1rZ/8qpsFe2TnlQbgIR8OOjzd3Gq5siErJMPNNxezUS5LAipe8ca71uYRD5c4CB05jA+MXpSAfAEg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720205; c=relaxed/simple; bh=qK+yhVEih4H0ozFaKmGAkd6Fs53sWMLxlTf59tCc8DY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qPMhmzb0oKOKbfeXrj30QLq5F92JIs1WKFBGPlcSN3Lq2duxSMbZGszqdF44IwzYwSFmK2/KPGiWTCMqNDbdpH7VhoTht/7dXZ1iUnkjjeEd/4wQkLp3Qr0E8Y3njIdpWMuBBiZCo6Hur+DptmOoJ5VQALXDSlKuZZSfOeuG7qU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=Oj2zYuN3; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="Oj2zYuN3" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmM16HwzlgMVx; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720191; x=1730312192; bh=3+gCB p2G77lOsXDqUrahPgiTbccwX1nHG5fzQzmYVZQ=; b=Oj2zYuN3Mv+58D0pF6HcQ CwuvFLKgV/Hvgfz9MpWKVYnfd5/U/tGC2hQ241WUYCnHLcsRRwLTEZN06BMBe9Fs 9kjOeMCVHR12R7Xs5GAvIYBfHrR2WQcKhWS/jbVIMn0Vk8d/sxwhB8D9NY2DRMEu sfhm7v3lCTXiNLO/ZG11cuQBNkoQmejS4asJsrAhZCGGmkrWNBm7o8rStP5PdqFA puVokmyTWH4nogtpYuW+UpxMcoOwD1ZzKhlMXkldOLDcf+FQx8GHktDAPFULVpRD Fo+kY1/Le3Xtd+2Kggsb3M0PF7CO+NWKK3oaki6qvlDNOonnzrdR7W2h09Tcbqt/ w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id WjCuzC71WABI; Mon, 30 Sep 2024 18:16:31 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmG0kB1zlgMVc; Mon, 30 Sep 2024 18:16:29 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Ingo Molnar , Borislav Petkov , "Rafael J. Wysocki" Subject: [PATCH 06/21] x86/acpi: Switch to number_of_interrupts() / set_number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:45 -0700 Message-ID: <20240930181600.1684198-7-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() and set_number_of_interrupts() functions instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Ingo Molnar Cc: Borislav Petkov Cc: Rafael J. Wysocki Signed-off-by: Bart Van Assche --- arch/x86/kernel/acpi/boot.c | 6 ++++-- arch/x86/kernel/apic/vector.c | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 4efecac49863..cba2c735dd03 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1171,7 +1171,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) } =20 count =3D acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, - acpi_parse_int_src_ovr, nr_irqs); + acpi_parse_int_src_ovr, + number_of_interrupts()); if (count < 0) { pr_err("Error parsing interrupt source overrides entry\n"); /* TBD: Cleanup to allow fallback to MPS */ @@ -1191,7 +1192,8 @@ static int __init acpi_parse_madt_ioapic_entries(void) mp_config_acpi_legacy_irqs(); =20 count =3D acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, - acpi_parse_nmi_src, nr_irqs); + acpi_parse_nmi_src, + number_of_interrupts()); if (count < 0) { pr_err("Error parsing NMI SRC entry\n"); /* TBD: Cleanup to allow fallback to MPS */ diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 557318145038..cbc68ffadb7a 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -712,8 +712,8 @@ int __init arch_probe_nr_irqs(void) { int nr; =20 - if (nr_irqs > (NR_VECTORS * nr_cpu_ids)) - nr_irqs =3D NR_VECTORS * nr_cpu_ids; + if (number_of_interrupts() > NR_VECTORS * nr_cpu_ids) + set_number_of_interrupts(NR_VECTORS * nr_cpu_ids); =20 nr =3D (gsi_top + nr_legacy_irqs()) + 8 * nr_cpu_ids; #if defined(CONFIG_PCI_MSI) @@ -725,8 +725,8 @@ int __init arch_probe_nr_irqs(void) else nr +=3D gsi_top * 16; #endif - if (nr < nr_irqs) - nr_irqs =3D nr; + if (nr < number_of_interrupts()) + set_number_of_interrupts(nr); =20 /* * We don't know if PIC is present at this point so we need to do From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20B99199FD7 for ; Mon, 30 Sep 2024 18:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720203; cv=none; b=q9sSHfbgHdWGmKo4duaJ5SWKCwkUgm4s2DCFj5BPkMjZJPpR7tAAYhylszdzKtqzLA/7NU0WcOG6aOHWTsbCy8ozgRGp73vEX7k+/ETPNo9isxO2ZOna0w78KoTWuixXpAi7QE1IuGtJjLeNejZHQTCXwsQ0XidjeERBG3hucPA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720203; c=relaxed/simple; bh=wMkbPdQERDjq/9DrfYoNkRWi79b/YzuNtyjQwTcPYPg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=COjFptHBZvt1UYMK2HqIeVvXLJ5qlIb0UPzgERH6V74X1UpRw8u2oiJiJROwqCkvbwTHaURd4NRAgxIhk802KSk7iEyHhmT4kGomZzDIzCEqluMJGFhEA9cq+KKRgnSddSZdQ0zXmRbjoKHlnJowg0kODG54kg7G+wNMxS5Ag9E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=VlIqTFXc; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="VlIqTFXc" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmK6SSMzlgMVv; Mon, 30 Sep 2024 18:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720191; x=1730312192; bh=nJnVm 0N1UucQhw1NIaTwi873TC+brb/Qt9H6/kSM0Yw=; b=VlIqTFXcxp2HH3mntdvOX ChjC7bt/orV1GhKGCireddfFcibGpybu/ZXlFpF6Evm67SM/fKdkxhWnltNwOng9 R+B6ltfRsJrjoLPAqiWke8f3qRn1GtdubuDjny3vP7ztv2eKkKwVCB39LBI3Km/v kgAWQK0EJL9SODxKMbKMn42Lt468HvhLgKf5RIA57HzMDDb+GvjvSOY6/lb0+mEs +Oen5n3PbblSWYw7UCzFw6RtYxDc2id2SeXD1w5Xd1QWZHGNWJEV8UO8Rp0Zwu7F xeqguJsThv6ETHnslh+p3raUdbcnYLZiiO1FjJUq6vjVyhI2Ya+t19qf6oacbP5C A== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 7EKzhqxwEy-s; Mon, 30 Sep 2024 18:16:31 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmG6lZwzlgMVp; Mon, 30 Sep 2024 18:16:30 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Clemens Ladisch Subject: [PATCH 07/21] hpet: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:46 -0700 Message-ID: <20240930181600.1684198-8-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Clemens Ladisch Signed-off-by: Bart Van Assche --- drivers/char/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index e904e476e49a..e618ae66587d 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -195,7 +195,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp) v &=3D ~0xffff; =20 for_each_set_bit(irq, &v, HPET_MAX_IRQ) { - if (irq >=3D nr_irqs) { + if (irq >=3D number_of_interrupts()) { irq =3D HPET_MAX_IRQ; break; } From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0FBC19308C for ; Mon, 30 Sep 2024 18:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720204; cv=none; b=U5CrN/znT/0v6kdcvkbywh857Ff75XSRvPqXZOXtN/BanJdPhWDGGCoOs8HdspqXctQn9fXv1q7ifn3NfPnfzmlPxF3wBG7+0y4GUsSl7M4Ai5sk94CewIH2DpMeDGiQM3Yb5AtdffBgtu9GCVC4F98uXZwQ43PtWjJBXFIVMng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720204; c=relaxed/simple; bh=NJCInSfn9nK72/PFVWrZOJoInnOMjvNenZOn9B14gEo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ub7mGH98pniOIMJwWfHLo/N26kAv5LDFntHcopZM13P02RlMW7kHHpHHUmweXofWzsqwmFw0JKMVZh521AQensSMiTbdG1Ni/6g7Af4aQEgOzL4ujH6xxiZ6UMTVY5D3Odd8vSNewBGQtBJEM2naY0R3MXMasWSSGwg9/FLnhoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=H7PVlgqE; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="H7PVlgqE" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmL2ZCdzlgMVw; Mon, 30 Sep 2024 18:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720192; x=1730312193; bh=/FyHs pQt8YHnPxUibekfAU8vzJWmnNO5YkwG5NK6KRA=; b=H7PVlgqE66PE+YTsFzkYJ KeyesNeoj3IcfYyU+B3HF1o9F5joXmjST/RfDY2n2NN2zB255f/CU0e4Mb2ASxL1 qoBkMETvWe0LuHF9ZaoorF0rpopIYi8TGh1B4eJMadaQ6NHX3+fsO4OtgNK1ioM7 lLHFk1btVd74AGLFr9kQAuPW7b4DkHsR5s8KS7QiVbOpITunjMWiDLGTQRdmWY0j LLnLt2cAfsRZYsf7cgTz5/nFIOfr93o8gDsLyE9V+BOkhGuws0sczjylyyrli1S3 IwwdZbb1pz+h8mdhG/XJfjYNwvBjGLwGRa+R+cxTLJO3QGP0odtQDca4Zg4Z0vy1 Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id tTxNDlfryow6; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmH4YCJzlgMVg; Mon, 30 Sep 2024 18:16:31 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Steffen Klassert Subject: [PATCH 08/21] net: 3com: 3c59x: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:47 -0700 Message-ID: <20240930181600.1684198-9-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Steffen Klassert Signed-off-by: Bart Van Assche --- drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/= 3c59x.c index 082388bb6169..f7f2baf33f50 100644 --- a/drivers/net/ethernet/3com/3c59x.c +++ b/drivers/net/ethernet/3com/3c59x.c @@ -1302,7 +1302,7 @@ static int vortex_probe1(struct device *gendev, void = __iomem *ioaddr, int irq, if (print_info) pr_cont(", IRQ %d\n", dev->irq); /* Tell them about an invalid IRQ. */ - if (dev->irq <=3D 0 || dev->irq >=3D nr_irqs) + if (dev->irq <=3D 0 || dev->irq >=3D number_of_interrupts()) pr_warn(" *** Warning: IRQ %d is unlikely to work! ***\n", dev->irq); =20 From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF39919B5A9 for ; Mon, 30 Sep 2024 18:16:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720207; cv=none; b=XBvrkeISUuWlxUqGJxV9m2FnRzz1allPdakdPPJ1/ShofAcg4HfUCXH1AmhlQOxvrSH6rVVuhGQ6JjqlnmvS2OAjmopRHEaoGS5z2oRdm+PSra0ogrZvLWzDDVjYKhzZMMhioxct3oA9wdGC98/3zqHNY2ZxyKJTouB22aiCcLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720207; c=relaxed/simple; bh=pWaMWkuSllB+CQda9mOKht1N1SvdDwIPgLrD/64Xiyo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pya+xPqayqK71Z6bU4ZtpyHw3InBQna+V4sWLc7vgrfcJyO/RnVxw/Hm+qXSMVk7QdASD82wPOkhWp/kCia1pxm2wD86NyPwIyyTx2tXSd8WITXjkm9yM8hEMN+orUWfwsLd7A8y9lO5B6tR6BR2kqFppEnSRp2WLdklHOsKG0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=FzVJ8H79; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="FzVJ8H79" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmM4Nc9zlgMVj; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720192; x=1730312193; bh=DrwA1 +tnKRpQ5wovrYeDwGrGCejaXWfUOom3syoPYdk=; b=FzVJ8H79Nrtz+S9Scf6rS 7BFjqvdiEGwX/WUni+SLUYabHsMV7CksUkvclXfRJgpn1QOdRkpWIPPA9geUnhSb yqBBP50FaLU7UyaOUbt1a4AMlQcb2aycnIuULsQPRNOou314Z0QeZf6IxYc7EOaF /BakOi9YeCTi4P/AXSj5Oc6/AgCe0Yp8wUbTeTuQ9fhbOvs+rU/rOdMTVNb5leV1 zdU+/tBTFWkQTC7lTIGVJdHqMelUzFYooA/fDQArLEQ89ldk/zpSpw8fmesfXDP0 Cin+Jb7jTHq2rT0mBKk7nIZBD2mGLZtS2cKichmnOud26Yjufx/uyJYdjFj1xNkZ Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id fABHgC3Es83k; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmJ201tzlgMVd; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Thomas Sailer Subject: [PATCH 09/21] net: hamradio: baycom_ser_fdx: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:48 -0700 Message-ID: <20240930181600.1684198-10-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Thomas Sailer Signed-off-by: Bart Van Assche --- drivers/net/hamradio/baycom_ser_fdx.c | 4 ++-- drivers/net/hamradio/scc.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/b= aycom_ser_fdx.c index 646f605e358f..8c6ca1c001d5 100644 --- a/drivers/net/hamradio/baycom_ser_fdx.c +++ b/drivers/net/hamradio/baycom_ser_fdx.c @@ -379,10 +379,10 @@ static int ser12_open(struct net_device *dev) if (!dev || !bc) return -ENXIO; if (!dev->base_addr || dev->base_addr > 0xffff-SER12_EXTENT || - dev->irq < 2 || dev->irq > nr_irqs) { + dev->irq < 2 || dev->irq > number_of_interrupts()) { printk(KERN_INFO "baycom_ser_fdx: invalid portnumber (max %u) " "or irq (2 <=3D irq <=3D %d)\n", - 0xffff-SER12_EXTENT, nr_irqs); + 0xffff-SER12_EXTENT, number_of_interrupts()); return -ENXIO; } if (bc->baud < 300 || bc->baud > 4800) { diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index a9184a78650b..e00cd21422a3 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -1469,7 +1469,7 @@ static void z8530_init(void) printk(KERN_INFO "Init Z8530 driver: %u channels, IRQ", Nchips*2); =09 flag=3D" "; - for (k =3D 0; k < nr_irqs; k++) + for (k =3D 0; k < number_of_interrupts(); k++) if (Ivec[k].used)=20 { printk("%s%d", flag, k); @@ -1735,7 +1735,7 @@ static int scc_net_siocdevprivate(struct net_device *= dev, =20 if (hwcfg.irq =3D=3D 2) hwcfg.irq =3D 9; =20 - if (hwcfg.irq < 0 || hwcfg.irq >=3D nr_irqs) + if (hwcfg.irq < 0 || hwcfg.irq >=3D number_of_interrupts()) return -EINVAL; =09 if (!Ivec[hwcfg.irq].used && hwcfg.irq) @@ -2140,7 +2140,7 @@ static void __exit scc_cleanup_driver(void) } =09 /* To unload the port must be closed so no real IRQ pending */ - for (k =3D 0; k < nr_irqs ; k++) + for (k =3D 0; k < number_of_interrupts() ; k++) if (Ivec[k].used) free_irq(k, NULL); =09 local_irq_enable(); From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93D0919AD87 for ; Mon, 30 Sep 2024 18:16:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720206; cv=none; b=ZlH9oloOpBqXqYbpVO2pkqQ3XrYYX+k+wPzdwKbhC5MWWpMjBY3JyxTwxYs94MzEz30zmRtb82cnJIEoGxENOSTPFju+TSI91gqZXgwuSWayOfhzz89zdJalviW6LFIqSIlRgdMq7W4c2DzPuAI6IjP6XFdAIQhluf29579KTc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720206; c=relaxed/simple; bh=QTc3MD/ym+hbbckp2F+4jL317BCb24PmYXDCOA7O8vk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lMVUd30CCQtaMI+bqs3Tgz4ppSVeNPu986oLQXXnSyjvpQy3TfxrF+2txx7SifZbxZ6ttVhcmyqEFzj6k58u+1NofW4wcRcdEQEAmDBiaB9ZNn6lzJi1//ZkrGDCO3oKXrJYEEGTKF/eCumk96kj4OJ7wCXnQqsPiahNu1qcwG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=2RWEK/ss; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="2RWEK/ss" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmM44vkzlgMVy; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720193; x=1730312194; bh=QTc3M D/ym+hbbckp2F+4jL317BCb24PmYXDCOA7O8vk=; b=2RWEK/ssFhXruppZ7vdvW p9ZmZXA16d6qIEoOfZ8WMSdilsFdPvITkKrxXF08fEV09Crw33hWGWXdwFZVjfbQ 9GYZjdwzSh8ynlaW7h6mlxMCrfj8zewZFM6ebruC1s9WQCRz15UDQMCz0Ee9B9WL TAWTJHM3jp8AdgbmiBo/v1Vl9vF+Z07cu3Nv9i0ygFJPZOo2MVKDADyVJLsYh88R 8noW9lhTBeLzTgjIkmEfIutnMlZZLaVY9QW8OP7pERqqW17lXnJy1AP4xDcqG49U GZpiTu2RNI5CeOA+0BnqESag1bXLTlVg2DN1SuUphEVzMS9B9CjOMn0ZMFdpNtYc g== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id TS-PCJvtT0LI; Mon, 30 Sep 2024 18:16:33 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmJ6cPMzlgMVj; Mon, 30 Sep 2024 18:16:32 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , "Juergen E. Fischer" Subject: [PATCH 10/21] scsi: aha152x: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:49 -0700 Message-ID: <20240930181600.1684198-11-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Juergen E. Fischer Signed-off-by: Bart Van Assche --- drivers/scsi/aha152x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index a0fb330b8df5..cc1456e049c4 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -295,7 +295,7 @@ CMD_INC_RESID(struct scsi_cmnd *cmd, int inc) #else #define IRQ_MIN 9 #if defined(__PPC) -#define IRQ_MAX (nr_irqs-1) +#define IRQ_MAX (number_of_interrupts()-1) #else #define IRQ_MAX 12 #endif From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A70019C55C for ; Mon, 30 Sep 2024 18:16:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720207; cv=none; b=qqbjRE5/7V5ckYC9HB+ovbzSXE8OdBEiNNx2DVl//ZJ9jOmn3awqdRMGkEq5GVhPJusqpiSmFGKssYoOA/Nd1osOjyGvrFNpStmGG7oYBWaDA4HK6P0mJgr5jQJm3PD3zTvUnMhtDgQb9sduvx3hPh5K/1vVQkWSl+fmOF1vH+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720207; c=relaxed/simple; bh=5z28fO5V28Z2opAPJnNqd14EPDLfxMvV4sbkdzlmvBw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KUMjKYMqRDYL867pfGLhKmFI2MwVCPNFBowS+wcPTiQ+4H6co/T22b/8N+jKtFg2cSPpMZqNfKFeKetUn0dYaDMytQDZ1kp6yr65akX9ZTigF/Pipyw/92uG6ycI+owvjlhXpGKSkuVjN31H9Ug2vY8RDRYWb7Ggu3id9yKOmAc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=EHioEd2F; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="EHioEd2F" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmM6JwrzlgMVd; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720194; x=1730312195; bh=0+Ch/ BKiZvV++ve+EGfFUWSvrOjh1lqfEkF+rOd9w5Y=; b=EHioEd2FAqPyyZoZtLa1Z z92La5AOFNDmdaoByzeqbY55rFIogrO99wzbycNg4xxZW2x75/vqnUZw4cP8EJjH kJnRxCxD6DRuaQrF5P0O9yPC4uGctOJ1A7ZrOQZy3cOQOh//F+cE7htWgHH3Abif b+b7jP+6usTr48eFKNTmgadOHMIW9ryN3B87rCCBmSEWEmfRWtxDaSw4vsOP2fS6 w2x0EITKdaIadvKP3UcMqmhzXJu2qCZFQfJ1DzLMKrXCJ1PcnxyT7QOZRYSkgOsv QN3ff0Il8QLhUKzIlIWK+lix4sKeN4Eu5/56dKGQOp6ZhwyIP1JBVpQpRThHaw0W w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id lpu3rqtcFwHO; Mon, 30 Sep 2024 18:16:34 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmK4PKHzlgMVt; Mon, 30 Sep 2024 18:16:33 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 11/21] serial: core: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:50 -0700 Message-ID: <20240930181600.1684198-12-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/tty/serial/serial_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index d94d73e45fb6..fb3915065ecd 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -919,7 +919,7 @@ static int uart_set_info(struct tty_struct *tty, struct= tty_port *port, if (uport->ops->verify_port) retval =3D uport->ops->verify_port(uport, new_info); =20 - if ((new_info->irq >=3D nr_irqs) || (new_info->irq < 0) || + if ((new_info->irq >=3D number_of_interrupts()) || (new_info->irq < 0) || (new_info->baud_base < 9600)) retval =3D -EINVAL; =20 From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C30D19CC20 for ; Mon, 30 Sep 2024 18:16:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720209; cv=none; b=EMKZhvym8vw7EjevVVtgmDsquYh5LpL4zxmm2CQVsWnzp6CHo37LitkJNLrfXLShlz1mpku8Yf6mLlMLBNC4eeYfjtK92EjjopKcft9lcWV2ZCWEEgJR/+qxIWCVfsqWZZn5UiH5ewpDsDz8ysBuYnx4/9fJQjp5Rfh17etGfa8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720209; c=relaxed/simple; bh=/746B1eXYZ4bBzdzOVzZg3wkKT1O/Qxb4H5zg2Odi7c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GXLX2vgUW+7LzBFL0zX127Mn/MhSwsaMFZb40fmw7ouJC6PpRge5ptvvvmRlOWLeWv0XjdRCjbfzrZ+o9kEqb04fI9sr6RySXomU5GmhPTW3e77ZWVHXE0vdIDeoahHPoNUBhXLT+tqQ21K0Q1Ll1gtX4Zvm0/S+89EWyG4cUQ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=kBXnYR7M; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="kBXnYR7M" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmN2JK7zlgMW0; Mon, 30 Sep 2024 18:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720194; x=1730312195; bh=u+sFl u8eJJTe64wgC0yKvq/efAuGCOLY5zAnQdyMmvU=; b=kBXnYR7MQZyOupxy4dX6i CJ+AwilNKpvdn6SBSrMoiy6/+UcJU/BxZ4rSl/9Y6MO3P/++hKZm52so1rLRtYgy 2A2ExCtkWvYSzSLmv5MZhd6ZAnqgyaiywj3iN8Z6XrPE4oLw/NXSo8o5HYvqsWZ4 RQoK1jayIhsNb2AfbJ3+J17TOVTxkk4XF/JMbVWt75425OzzCgqxUgl7XT/XxW2p OVQeMRMD42+k/aYPuPZ2HciVsLAq7aMH61iDy1RCS6KhoUrUIpZj70HBgtZiGSbY m53Q90Jfkf4sYbgujIsIjkfHgUY17IxuFdAjc26Og39Z31JBeLE/2VCD3+EzbiX+ w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id U4kccfj2g-h3; Mon, 30 Sep 2024 18:16:34 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmL17cXzlgMVp; Mon, 30 Sep 2024 18:16:34 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 12/21] serial: 8250: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:51 -0700 Message-ID: <20240930181600.1684198-13-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/= 8250_port.c index 3509af7dc52b..7983526539fb 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3176,7 +3176,7 @@ static void serial8250_config_port(struct uart_port *= port, int flags) static int serial8250_verify_port(struct uart_port *port, struct serial_struct *ser) { - if (ser->irq >=3D nr_irqs || ser->irq < 0 || + if (ser->irq >=3D number_of_interrupts() || ser->irq < 0 || ser->baud_base < 9600 || ser->type < PORT_UNKNOWN || ser->type >=3D ARRAY_SIZE(uart_config) || ser->type =3D=3D PORT_CIRRU= S || ser->type =3D=3D PORT_STARTECH) From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C52A19CC2B for ; Mon, 30 Sep 2024 18:16:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720209; cv=none; b=a3CjSg7L4ri9wIZkHnZ0/+ZG4IIi0lgzmbsZr3OAmRRZcf3A0kXYj0oexwfjQzl73ZOgAwMIw/xB39BL/mHjNHhoRXval9P3N/2kOc9FhMUayR5KoJimgTHNfN9FIMsamKtm54Xn2EcRZJwDt5YijLPV8OydFvnla6uLqUO66BQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720209; c=relaxed/simple; bh=tI5bPvzAI+6GfLvdd7nI58ZuBKGLASunJCp52K+MQPQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZfmEdJOQvnpCEskBsktMsHKNBMsAvkvQfszU/BUu5sQYIn2uJcFIb43dPH6dDc9CqAPtrgOajlXqqfnQegPnbdoWjLCay8/de2I+ikLs2tClnp4wqKDhayEKvHHdnZFemB2pbHtUKbGWESyVDCmPYGTI3DP37O8quObj+y2X2BE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=kuxILmnX; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="kuxILmnX" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmP0YWTzlgMW1; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720195; x=1730312196; bh=geXJO ZcuyEVQCly4ZWEBVD/6rpKCh7arY02+Ime2144=; b=kuxILmnXU/1e9qE3JhSUB vqf4ctYR2LBNSy40rbtyDxk7Nb6zDr4nbvSmUzLzJzkg8BLPzThyRmPI0CY+hhXS gHMCp5mIM5tlflRJ3UbainnU5/YvPTBWO+LS1xsMLRFKJwgzgdvSQG8xTG85c9aw xUAhq7XuiheWFDWHGGwGT43+qHBdLmsgkiCT1MjgRH3CCMlLytOKZ6LzbwamYq9g oJAThtm8cvdo/PzDGgQCoKsX9ezD200DK2yk10xOxKMeaFcCzdVZw6qRM5KoqQ8H Yx1z1O2V3VL/wLgfyz3LJ3MuFEbTENMzz4U1t5yrMnPGGg//Ri4uVh9aUutZ0Wul A== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 0xJoHZjU9MjW; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmL6ZMszlgMVg; Mon, 30 Sep 2024 18:16:34 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 13/21] serial: amba-pl010: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:52 -0700 Message-ID: <20240930181600.1684198-14-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Russell King Signed-off-by: Bart Van Assche --- drivers/tty/serial/amba-pl010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl01= 0.c index eabbf8afc9b5..cd7be4453dd5 100644 --- a/drivers/tty/serial/amba-pl010.c +++ b/drivers/tty/serial/amba-pl010.c @@ -499,7 +499,7 @@ static int pl010_verify_port(struct uart_port *port, st= ruct serial_struct *ser) int ret =3D 0; if (ser->type !=3D PORT_UNKNOWN && ser->type !=3D PORT_AMBA) ret =3D -EINVAL; - if (ser->irq < 0 || ser->irq >=3D nr_irqs) + if (ser->irq < 0 || ser->irq >=3D number_of_interrupts()) ret =3D -EINVAL; if (ser->baud_base < 9600) ret =3D -EINVAL; From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B53651991B8 for ; Mon, 30 Sep 2024 18:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720211; cv=none; b=NNmZ02VElBqjowRmdWbfHR5eKpvHHoHtVHQ0d9SGtPMFtDh/dcTCtgc6T9uEzDeyDPbR/A/ayPBDxzIYq4qOJr+17JR8ayS3PmGsL7NjQBEHvw8FIdGSjk3TSH35xi+lKJx25cygC577V+0LgLeeM0z2YBiA44Avb4aEoUJQEuM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720211; c=relaxed/simple; bh=Dct37ToelrEux3h2L7+66DjOPdMfbwBzGrwXE4KlsYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EHGHxKrdC5yv6Bu0PhjC9/heJBQPVZunXbB/fQf9k2jn9y7gM/DoN5yfG0wT54rcjiB6VWpdEV1Yy5iV6cqj+xtQmORdtFB1EPropsFgn69WKN/FvRxk4I0lIFyufA6CNeIMiPdQ7cJfHW4ex4ETVshcHuiyzP3KxZ+0jiOXJl4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=F8Sfu0ft; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="F8Sfu0ft" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmP4vtmzlgMW2; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720195; x=1730312196; bh=0Nlgx huuD1zprJH35npIR6imXcbz1rH5FfnRv/IoXM8=; b=F8Sfu0ftISzizUgpZZ8X3 HIrFyKxhQHDbtnuKOF1mCmA7zTcPEF8vDzX8nUMCsFScvT3Rt9R0HxWUGptJk8pG j4EarfJ4nSNjNPtts3TdiptKIkRL8QPP+V9WLf7vbTWLSA8S/YhC+TmL9dCIisBG xpZbinXjzanIW103DDVQ7Ju1+j2SJIHaKvlo6v5Q7ob4+4LWchsQbwdZVTDsHFt2 Fz1gMtQyCd3k7R7CCDAA8XG25XXLkhWEaQFzp3VGk2cyxgKevvxT1FS59n6s9EIG vgM7t8ijpGJh+7bfvNvb3Z4i7vPk5Sf92/QhUOO5UKo/q9/Ydb5bm5axKfn/8r2J A== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id KiKa9vRGqDJo; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmM3NpnzlgMVc; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 14/21] serial: amba-pl011: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:53 -0700 Message-ID: <20240930181600.1684198-15-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Russell King Signed-off-by: Bart Van Assche --- drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl01= 1.c index 7d0134ecd82f..6f39323cb652 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2202,7 +2202,7 @@ static int pl011_verify_port(struct uart_port *port, = struct serial_struct *ser) =20 if (ser->type !=3D PORT_UNKNOWN && ser->type !=3D PORT_AMBA) ret =3D -EINVAL; - if (ser->irq < 0 || ser->irq >=3D nr_irqs) + if (ser->irq < 0 || ser->irq >=3D number_of_interrupts()) ret =3D -EINVAL; if (ser->baud_base < 9600) ret =3D -EINVAL; From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA4BD19D082 for ; Mon, 30 Sep 2024 18:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720211; cv=none; b=OWRYEg+uYwDwXLm8uoeFfSJWqiClwpW6nWQ/Be4UvFNliGvxEO+mC7YY4KyEZhUWiuo0s3YmPDgHNEwQkydVU5JRNCe9ELHJcXMYnJ5vPwflvY3937pxN3jjSfoRKPsQc462JQdm/8rlVqE4cu0nd/J40RGYuWxgPNAPFgI8xuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720211; c=relaxed/simple; bh=USEVRV59wrWZF9ktvY4Wt2hvc8UNViV538emReu7Lfc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VjPCDI6xOp768x3zex3qXnnFwvC0yD816gPWeQO+rkCkV6mBXCvn/rJgx64V4quFa/AghkZ4g6HM/H2CxD6Fpl33IszGMEE/dGVcK1hy6pVuwGGmDuZFAuRH3R1Oc6XG8Gn92t5/4O9hG88fqh6Fwbm/bIX4FkK021Ka70+wn2M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=TIwefqC6; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="TIwefqC6" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmQ1zh4zlgMW3; Mon, 30 Sep 2024 18:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720196; x=1730312197; bh=dol9f d1k8nolm+CvUvBoAtlfmUf3G9p/YNW+cEUXfGI=; b=TIwefqC6o5hv0FkNtEQT7 HpxS7riKMnlx8k+RY5/CEYl7rP3dMCUmmKkdP/CwXaEePEjhdXSdo2hzg223VLzm KrtJPEPKRHgzG50AX2DiA2ANzpZsAX3BIFOF748SHVTK37U3fLuD5axcOFXb8bVt w3+3f0kz/csn9EFxMIfR/BU+eO5Qc/UMq37pYFREoqz9cBcw6mLQplORxxXv+j5l 9yt573okHScgz/FZcupHnzBiKdct2crsZpoYjU08Au23kCPnTCoQyENcdBdyojwd O48Q2T9CfY46I/yqevrO93QKGR4Y6AK/ZkOonRf7KH+1qTTo3V9YicKB1LktibJ1 w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 2gzk1gNurX02; Mon, 30 Sep 2024 18:16:36 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmN06lhzlgMVt; Mon, 30 Sep 2024 18:16:35 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 15/21] serial: cpm_uart: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:54 -0700 Message-ID: <20240930181600.1684198-16-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/tty/serial/cpm_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/cpm_uart.c b/drivers/tty/serial/cpm_uart.c index a927478f581d..7ead7277e817 100644 --- a/drivers/tty/serial/cpm_uart.c +++ b/drivers/tty/serial/cpm_uart.c @@ -631,7 +631,7 @@ static int cpm_uart_verify_port(struct uart_port *port, =20 if (ser->type !=3D PORT_UNKNOWN && ser->type !=3D PORT_CPM) ret =3D -EINVAL; - if (ser->irq < 0 || ser->irq >=3D nr_irqs) + if (ser->irq < 0 || ser->irq >=3D number_of_interrupts()) ret =3D -EINVAL; if (ser->baud_base < 9600) ret =3D -EINVAL; From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B570119D8BC for ; Mon, 30 Sep 2024 18:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720213; cv=none; b=Zs8NMyju4iOXpBnqEkgnmiMTPnuPAJs22RccNUhA7efy8aZY246E7m/XGjgxjwcYsgn7JqKqAOwvZ91vaQ2ExNs1GIc6ZKbBuhzpi5tjwhzg+sMCbfR04WV9SPpHjjQk48Y60nDDc2nx5UYzNmk1msUw3zKsjET+pz1/nzoPopI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720213; c=relaxed/simple; bh=elbBnFaboBEhKE8L7Bl7wq8Vh9v9tzVvntJWKlqpPKc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EHxyxzaf5ULGabhPM8mPgGOUpQ12vZuRB9alrz7L6zELm6ceR8aMjarwmKF0NqI4tB/Fdeu1tHBgGD7Y5Lu28xBqiKaN38f+QJmwD4BeUinNEUUONRzRIVyQopGkmWVEF2SM4OH1HngIbq4hm/m2rN4qF3nag2qh1hVGqco1Qig= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=GvONdykt; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="GvONdykt" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmR3KJZzlgMW4; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720197; x=1730312198; bh=DPrnF K0dpYtOOzZYHtSHUmrlCC/d6Z54q8Zc86YJrig=; b=GvONdyktBlMhQU9kjLp1W ue+DMNJVZdtZTR9qCAN45kM/d5h8d+0enBUp/wLKF7Cz78nmbNPwPBoYo0icirDi dpNiI/BbKRClJ08KfIdcOsxMaGwIyjkwGmWGENkdngNf1i2MaBvOTAtvlvWT+oSq 42LZnRdFgTWqc+fZH7wGoXOJnC+eXRcPRwkjfIER7W/Y+wm2cUh/ErSnvVKK9Qj+ SSw7lARJsgccuqF6I76LxgXWmSagbrrd8IYs3SBI1osATueqvpIdWytWPiv9r+HK DfWBZiO6xlNTG/jQtkG14FEiX5DjvCWOy10yO0v1eCjuWfN5smCy/0kSfDsMRU2f g== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id sczgfUcg-IqG; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmN4JxMzlgMVp; Mon, 30 Sep 2024 18:16:36 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Timur Tabi Subject: [PATCH 16/21] serial: ucc_uart: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:55 -0700 Message-ID: <20240930181600.1684198-17-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Timur Tabi Signed-off-by: Bart Van Assche --- drivers/tty/serial/ucc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 53bb8c5ef499..73bdb306a160 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -1045,7 +1045,7 @@ static int qe_uart_verify_port(struct uart_port *port, if (ser->type !=3D PORT_UNKNOWN && ser->type !=3D PORT_CPM) return -EINVAL; =20 - if (ser->irq < 0 || ser->irq >=3D nr_irqs) + if (ser->irq < 0 || ser->irq >=3D number_of_interrupts()) return -EINVAL; =20 if (ser->baud_base < 9600) From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 836AA19D8A8 for ; Mon, 30 Sep 2024 18:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720212; cv=none; b=IkxZq8hpZ/FrJIORMI/n33i5H1yI9XtlUxqQWmMrfPMC4Ko8uC2FkyfRyCAcYZlXmROt1xLjUfCAufXC46ZKLc2o8Uy2uqfcRVmg50VaT4p9anTLDIP3ieAgqS4MpVgxsPfj4Sz9pm6XsFyR3r+9yzZ6B8mtIrXM+ITU7y2dKdo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720212; c=relaxed/simple; bh=8v/58WzxNnxLRb175HPYtfxGGsDNWsrM0Ct3W6UNqa4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sN/Poue5O7Fpr/GGpLoWQTC6yyPbtdq9DCEZ5nmb8lMgfggvZleu3N9zes3HgkLRobTcsT6Ot8B4fFX30cuzOD6//I27nd6fGT+fzpZgvpFbkdreU+5D8sppi/ay+O87fEUxWwNOhT4M1qbJ/l7l5F0q28PCrZNZUxsU5jOJkAg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=rUBOu0W4; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="rUBOu0W4" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmS0TjqzlgMW6; Mon, 30 Sep 2024 18:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720198; x=1730312199; bh=5a6po uSYWdtK1TWtGuOchtoffRMZMEn/NuCrDlZbg1s=; b=rUBOu0W4IXAvJ/LsXRAHj AqXr9VXXuDNVM3//HLCR9jr2G4WYJ5qqZGGTQFtU7r2kY77r1Cj58hapkxKu8f4Q fXfSg5n9ya/zDdzqnIG7GeK8LvTAHWa4/IV0YMuyUYIY6wsJEfu5MsIxZLuRPPrk VAkf/2eZ38PgJODhlrdIUQYUlPf/txE6I6BVRorFSyb4yyV9f0fJj8AC5TXDUA3g tjP2MCWQBPEhW1Jn9HFMlpV0GptXP3SffWbNuHi/n2yCuSZAiiDdXQgp40JlQ4ps jNOJoMfEz+qy8vAg9ubsuZ7TPj0iZvThME3+dNQv6FUIzm9MOPcGHLP/BvkbIvSL w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id gIGuqHPtpyNT; Mon, 30 Sep 2024 18:16:38 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmP3fH3zlgMVg; Mon, 30 Sep 2024 18:16:37 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Yoshinori Sato Subject: [PATCH 17/21] sh: intc: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:56 -0700 Message-ID: <20240930181600.1684198-18-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Yoshinori Sato Signed-off-by: Bart Van Assche --- drivers/sh/intc/virq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sh/intc/virq-debugfs.c b/drivers/sh/intc/virq-debugfs.c index 939915a07d99..09d685cda79e 100644 --- a/drivers/sh/intc/virq-debugfs.c +++ b/drivers/sh/intc/virq-debugfs.c @@ -22,7 +22,7 @@ static int intc_irq_xlate_show(struct seq_file *m, void *= priv) =20 seq_printf(m, "%-5s %-7s %-15s\n", "irq", "enum", "chip name"); =20 - for (i =3D 1; i < nr_irqs; i++) { + for (i =3D 1; i < number_of_interrupts(); i++) { struct intc_map_entry *entry =3D intc_irq_xlate_get(i); struct intc_desc_int *desc =3D entry->desc; =20 From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A9C219DFB3 for ; Mon, 30 Sep 2024 18:16:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720215; cv=none; b=DVEmKi8dScAupR1ztLlHscgsat75aXFHIp90I2wBXa3o88Vyp7ZwzTj8H/Uuc+5lAyzeS4MNZeWPYF/ugUIeiOlV53A+GPvAQHu7EzeqayJ5rfqLpsQTgMywmc8UslojP903xVUpK88maENCOHla4+AX+1dIli6zhGx0U+OUgNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720215; c=relaxed/simple; bh=yY126fpNQKloOUBb/bLXX4qB+ANKr8lK0wYuZzQNHBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hf09tnCisTd4sCpRhIBM7lryK0yxtgIs+/nv1vkUd6D6I620/B6sBYyLb9ssziIiUYiHs/cDnzyWIpfljmQ1Ziod62boSvFKw+Q6ieRB/1X+ciAP+IDHhx8GRCF6ney0gpEs1EqnTD4CDVyosN4xzFEYq9K/7unnZEqgsAFsAV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=tTdg6DMN; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="tTdg6DMN" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmS4lVczlgMVg; Mon, 30 Sep 2024 18:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720198; x=1730312199; bh=pzisv +a5MmI7qfRna2sNh8SvaZCFQQ4DC/6HLiU1P5g=; b=tTdg6DMNcRHFUcJtS1Rse lzrOl4N7AzLG1ozTUmkgJ+qjiCSUgmqNFQcWxPdSSlIwaiyM1VBHEco4b6eABhSx lrR9uCrSXlLZKZyoTBRbL/Jr3jeYzlwJU4HqYEKBJpIDZ0Z/mdZq6oXmXBIu6urS KZ4B8v/6gvKE4qh/pfZX2lmIvwTFlRMc+19HyzRb/QNlFgYay6tikQz2ZDP/8vhG nhTvbgiKL8dyqojTcbP07nj+oV4T5aNjigpBxd/53oYJmwmHEqMk3Tpb1tdhd5Gb W3CDHfGfeP6ZLvQCsXhpsySp5GbpovthmJasJAkr/FlWrSCDjMzUj6f+mUVzJCAH g== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id CoZANu8PyOqr; Mon, 30 Sep 2024 18:16:38 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmQ14YKzlgMVc; Mon, 30 Sep 2024 18:16:38 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Juergen Gross Subject: [PATCH 18/21] xen/events: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:57 -0700 Message-ID: <20240930181600.1684198-19-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Juergen Gross Signed-off-by: Bart Van Assche --- drivers/xen/events/events_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_b= ase.c index 81effbd53dc5..3c020b3f583d 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -411,7 +411,7 @@ static evtchn_port_t evtchn_from_irq(unsigned int irq) { const struct irq_info *info =3D NULL; =20 - if (likely(irq < nr_irqs)) + if (likely(irq < number_of_interrupts())) info =3D info_for_irq(irq); if (!info) return 0; From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9062E19E7C7 for ; Mon, 30 Sep 2024 18:16:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720215; cv=none; b=C9qcFrsojVuLzJzH73IvC4cO1R+a7fpxANlZ8QM4R9SSTjLIHsGlpP7fI0iZv79HPsMXEgnYEOxnsOelN//Pu47ijotjUZEhj8OOVlrllKyUqbZOkb3q+BgG50V/m12l05HvSMUtDnwGqgew2DpfaNCPyHUOa3SmUh1qP4w+KIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720215; c=relaxed/simple; bh=6fIQS+BJHMrDzBCyTvIPpBuxib0fkVZ6ubELXzXbHFY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZMZqulYq1vK64zNe5/f0rbl31NbXg+ZDm+hk57ZZj6joN1pulWfZ//13hAYbKvZQFqmDggecVhfKKnL/DP/vi8ye/0M+3R84Jtj89M6uy0vlREjaPGTj+3bWNjDE1SSYbxn/sWbC/YqwjBEO8ijpvm4eFVRKqao+H9JKmlUCUHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=Eqv4QUeP; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="Eqv4QUeP" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmT5xdlzlgMVc; Mon, 30 Sep 2024 18:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720199; x=1730312200; bh=q/qU6 988jHayCTZFGUCmRfVTMDudmq4NrZK60UHpue4=; b=Eqv4QUeP7nIKFaJVFjNaT rFkJ7hAQgv+MU71xxzrY5AV+FxXwV+GRpPtrntVd8QDNw4w6xKSHMOZ2nOjfS1oF ZuGhu0FhhgnDPbLT4k8/feb6XhbEiEnLOsVUoxiNWiv3n2aCyOYrSfBfsFyEG+U9 2zt7Cd8Ibh2GO8lGl6Oa8IdKZ1FpJdBgth40btNu6CfrJU55mnpE7mAKNLQ1fGOl vKyV7+EExKk9Ehc+bgdfX5vy6HHSPVeqLbSF+S7M2YDyI/qZsEsdyQEhFnTtXeiq ttgKMqBlaI9HmSbYhVow43QeGLhX3PQ2o4GY9jIbQc055t59E4xoNBkuQE5rUTdO Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id fDQiSk2Gn0Hh; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmQ5x09zlgMVt; Mon, 30 Sep 2024 18:16:38 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche , Alexey Dobriyan Subject: [PATCH 19/21] fs/procfs: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:58 -0700 Message-ID: <20240930181600.1684198-20-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Cc: Alexey Dobriyan Signed-off-by: Bart Van Assche --- fs/proc/interrupts.c | 4 ++-- fs/proc/stat.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c index cb0edc7cbf09..90cc6b9a30f5 100644 --- a/fs/proc/interrupts.c +++ b/fs/proc/interrupts.c @@ -11,13 +11,13 @@ */ static void *int_seq_start(struct seq_file *f, loff_t *pos) { - return (*pos <=3D nr_irqs) ? pos : NULL; + return *pos <=3D number_of_interrupts() ? pos : NULL; } =20 static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) { (*pos)++; - if (*pos > nr_irqs) + if (*pos > number_of_interrupts()) return NULL; return pos; } diff --git a/fs/proc/stat.c b/fs/proc/stat.c index da60956b2915..6e22a7bca973 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -76,7 +76,7 @@ static void show_all_irqs(struct seq_file *p) seq_put_decimal_ull(p, " ", kstat_irqs_usr(i)); next =3D i + 1; } - show_irq_gap(p, nr_irqs - next); + show_irq_gap(p, number_of_interrupts() - next); } =20 static int show_stat(struct seq_file *p, void *v) @@ -196,7 +196,7 @@ static int stat_open(struct inode *inode, struct file *= file) unsigned int size =3D 1024 + 128 * num_online_cpus(); =20 /* minimum size to display an interrupt count : 2 bytes */ - size +=3D 2 * nr_irqs; + size +=3D 2 * number_of_interrupts(); return single_open_size(file, show_stat, NULL, size); } =20 From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B972019F120 for ; Mon, 30 Sep 2024 18:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720217; cv=none; b=AYFMVUyIEcwMgXJgZAVFEDlJZ2s2qX75OkpORA8rKOtfTv0sbFlCFx5rgxcCSSbzZ4jNiHhN6p3Grlqk1+/uNvA+Sj0IFraui/RM7tH4QNJpr9vf6cKjrJHLJ26KVCDXT6rFBj+j0Hb90Qat6E4UhLHYnnoH1EUNIRLWxyBCKx8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720217; c=relaxed/simple; bh=O1eOjWCAtNLhnexFpLL5J5PPe+mlIKQu2HmQKu1CPC8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KEbQpVrLEboAzMbMplR/+5G9Rc4Jo4/yceYY4IyQ89qToJFjwCnqQ3IUc3uVNhsGztJovK41ecZmEPZH5c2x3DgK82YG5YtpgK3C2kmRtc9BqdLh7RgIxphaYhILqhD86H0nV7Lmklt1/Y1sgdqrJB7jsa6y5t6+JcBgxlL6WYE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=CHltemIa; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="CHltemIa" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmV4GqJzlgMVp; Mon, 30 Sep 2024 18:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720199; x=1730312200; bh=YrrsL mRHtyzEl2R+JJ0CHpOhsc95BWTuETBby/3SRIY=; b=CHltemIae9YOK0VkowaoW mlTnQMs+vN4UDZPMGXmzJ3VqIxpkINo8+3Cnwf8lsIHiv3+94uH+Y5kjE/qSnjOW mqVz5cDnnGjG/8G9MPaoBxJA2enLaiEsBfIH6GX066icsPJzT5+I6zhBEgbmGNqa bjWQ2D+tBfE0wiwwcN37Oahoz8/rXYh/2VpfI0fk8YeytRl8VJyGNPc/bAuV0+B8 zNtrRg/YqA/eoqFZlmLMZVxsnRbGfJoKdXiRVBDzLkRzQoQkxxV19tGxKlFhDgml 642iBKRNnkbw2ReKKLrZGB/JMse/i+7qOpB3BIh053fuROI/hAQWQlFzvEjXsvIr Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id MMla2CYGmRAR; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmR3QZPzlgMW5; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 20/21] genirq: Switch to number_of_interrupts() Date: Mon, 30 Sep 2024 11:15:59 -0700 Message-ID: <20240930181600.1684198-21-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the number_of_interrupts() function instead of the global variable 'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported global variable into a variable with file scope. Signed-off-by: Bart Van Assche --- include/linux/irqnr.h | 15 ++++++++------- kernel/irq/irqdomain.c | 2 +- kernel/irq/proc.c | 5 +++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index a8b2cb6146e8..81b76949c52e 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -12,7 +12,8 @@ extern struct irq_desc *irq_to_desc(unsigned int irq); unsigned int irq_get_next_irq(unsigned int offset); =20 # define for_each_irq_desc(irq, desc) \ - for (irq =3D 0, desc =3D irq_to_desc(irq); irq < nr_irqs; \ + for (irq =3D 0, desc =3D irq_to_desc(irq); \ + irq < number_of_interrupts(); \ irq++, desc =3D irq_to_desc(irq)) \ if (!desc) \ ; \ @@ -20,17 +21,17 @@ unsigned int irq_get_next_irq(unsigned int offset); =20 =20 # define for_each_irq_desc_reverse(irq, desc) \ - for (irq =3D nr_irqs - 1, desc =3D irq_to_desc(irq); irq >=3D 0; \ - irq--, desc =3D irq_to_desc(irq)) \ + for (irq =3D number_of_interrupts() - 1, desc =3D irq_to_desc(irq); \ + irq >=3D 0; irq--, desc =3D irq_to_desc(irq)) \ if (!desc) \ ; \ else =20 -# define for_each_active_irq(irq) \ - for (irq =3D irq_get_next_irq(0); irq < nr_irqs; \ +# define for_each_active_irq(irq) \ + for (irq =3D irq_get_next_irq(0); irq < number_of_interrupts(); \ irq =3D irq_get_next_irq(irq + 1)) =20 -#define for_each_irq_nr(irq) \ - for (irq =3D 0; irq < nr_irqs; irq++) +#define for_each_irq_nr(irq) \ + for (irq =3D 0; irq < number_of_interrupts(); irq++) =20 #endif diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index e0bff21f30e0..298930f2525a 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1225,7 +1225,7 @@ int irq_domain_alloc_descs(int virq, unsigned int cnt= , irq_hw_number_t hwirq, virq =3D __irq_alloc_descs(virq, virq, cnt, node, THIS_MODULE, affinity); } else { - hint =3D hwirq % nr_irqs; + hint =3D hwirq % number_of_interrupts(); if (hint =3D=3D 0) hint++; virq =3D __irq_alloc_descs(-1, hint, cnt, node, THIS_MODULE, diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 9081ada81c3d..c301dfd7d9d0 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -457,7 +457,7 @@ int __weak arch_show_interrupts(struct seq_file *p, int= prec) } =20 #ifndef ACTUAL_NR_IRQS -# define ACTUAL_NR_IRQS nr_irqs +# define ACTUAL_NR_IRQS number_of_interrupts() #endif =20 int show_interrupts(struct seq_file *p, void *v) @@ -477,7 +477,8 @@ int show_interrupts(struct seq_file *p, void *v) =20 /* print header and calculate the width of the first column */ if (i =3D=3D 0) { - for (prec =3D 3, j =3D 1000; prec < 10 && j <=3D nr_irqs; ++prec) + for (prec =3D 3, j =3D 1000; + prec < 10 && j <=3D number_of_interrupts(); ++prec) j *=3D 10; =20 seq_printf(p, "%*s", prec + 8, ""); From nobody Thu Nov 28 15:46:55 2024 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BD7819EED3 for ; Mon, 30 Sep 2024 18:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720216; cv=none; b=ApgpBoDp64O/3KohM8CsrZQbmNRaaZAQ8hf0Nb1NHXRGmseTCYTruxl3mQ/R1uU3HZdcXRigeplkXFH/6F/bUdOd54xPTv3Da76x8L7dNzhbm4DideQHWQyaS5b4AD95ffpVM6UdhxpobIYS/WAUD5JOYbwtF/XRqC0shuAla58= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720216; c=relaxed/simple; bh=FFNIGd1PTwXL41R/P9rsLH3qrxw/xZOnH4jWZnAlG+s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SIgfV07HmCpN3rYDucV2i4y3MWQ+eEn3dNUDjpiCW8MnyBDfmhii3t2WR6AIvoWFbBPghKkOPH6oaKEyZu39Ksdigxf6oz65nkqeIho26bYJcAfNgfU0tcdotc0WX9HZM9/kU5TbL6L3jdzklVKoPHkXaFdtz6EYtJqoZutHyBU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=AXrxa8dt; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="AXrxa8dt" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4XHTmV2lCszlgMVt; Mon, 30 Sep 2024 18:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727720200; x=1730312201; bh=ZUVil A+1yNgLRbERUpn2nw9/1mhPQfi+T3ff+eFHMH8=; b=AXrxa8dtHPshV3brU2Gtf OSWLs1hH4HD2915CcW0LsotXjP6CP9cZdJtSdwhTN7dMbMURQUooFSlw1QA0ZGSZ NJLX83tbn9NlbYbVf5SycNYfkCkLN1JTnLlfHcjNTSHWMppxtfnPRc+uAPOMmr00 ed0UHrttkNhUs6ReCPZ5CkmnYIuHzvoj9Gktez2bCnwvZ9djQtRDyddRR1tlX0m6 np3wtTe5jxX/NHJdEot61fm6J7hWpQLiL3z/bZnCxe1XhJ50zhKjt7KCKtcnSVq7 NCvY+dZh+3Xd3JH3+cbtGkAIzYL5zGVSRoqEI0cAXG835rywXEsI1wTDCt4X/E60 A== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id y86niYjyHECS; Mon, 30 Sep 2024 18:16:40 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4XHTmS0Dw5zlgMVp; Mon, 30 Sep 2024 18:16:39 +0000 (UTC) From: Bart Van Assche To: Thomas Gleixner Cc: Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH 21/21] genirq: Unexport nr_irqs Date: Mon, 30 Sep 2024 11:16:00 -0700 Message-ID: <20240930181600.1684198-22-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930181600.1684198-1-bvanassche@acm.org> References: <20240930181600.1684198-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Unexport nr_irqs and declare it static now that all code that reads or modifies nr_irqs has been converted to number_of_interrupts() / set_number_of_interrupts(). Signed-off-by: Bart Van Assche --- include/linux/irqnr.h | 1 - kernel/irq/irqdesc.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 81b76949c52e..82060d75642c 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -5,7 +5,6 @@ #include =20 =20 -extern int nr_irqs; int number_of_interrupts(void) __pure; int set_number_of_interrupts(int nr); extern struct irq_desc *irq_to_desc(unsigned int irq); diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 8c6280843964..dea51c641f87 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -138,8 +138,7 @@ static void desc_set_defaults(unsigned int irq, struct = irq_desc *desc, int node, desc_smp_init(desc, node, affinity); } =20 -int nr_irqs =3D NR_IRQS; -EXPORT_SYMBOL_GPL(nr_irqs); +static int nr_irqs =3D NR_IRQS; =20 int number_of_interrupts(void) {