From nobody Wed Feb 11 05:02:10 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2BA2326AAAB for ; Tue, 3 Feb 2026 21:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770152749; cv=none; b=HqXltdkTcun5rw6HjzhItdclVpc8vWAkYFWkpxElA8pdIgQzaC9IsViZh/Z4u6pzQzftv3zfjNF91EUcA9MGBA+6zutNpF2yLE0tXODKeKSoOLwEFnG4Sjy0pod1i/9WmK4v7f2bVCngIKfzT5bJFmBFMrtx1upmYalVIfRrKvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770152749; c=relaxed/simple; bh=xmUCOlm9OwpsAmbF5bHmt3N6r/h7CrR/K5NFN6KlqJA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MyEmzO/WbjyEh7Cl+xZSfhDLkSgg7nlTG5FXf+ho17JA2h/uD6SBorFc+Vq6dsVB6RnS65lXcSzFqD1CXQHmNglG1Q5g7hwHsMKkRRATsW3zlWq4/20xf+BQgmzH7SL2OswQrGwTyWZKOt7NzLxqTDSBBN+NMy+o8Ad6dIVrn44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TbCm1lV+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TbCm1lV+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC44DC116D0; Tue, 3 Feb 2026 21:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770152748; bh=xmUCOlm9OwpsAmbF5bHmt3N6r/h7CrR/K5NFN6KlqJA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TbCm1lV+nPWD8krh1LhcMBRcoMjzI3XVqcUDOJt+dnEZ9xFjDyULnGrzPNKSG1zu9 mCF+y/8n7w/tnHJJN2A5Wu8theLALwXKildzk65T7Z8WVJIizfcOiST9uUf3UNbcVv e3mW7rUDlSND+YpT3n6DvpRouFxIuXpHlmfm4qdB/71y+CNYTC9JHNzCvkEsIDUKRU 57WoHSM24opI6A4ZWuW8vaTFdSlBgjhRZ1a7j4hnt78ZceeAH9PxeiHRflx1SbADsU 120pAeT3zKMTLTjCZotSsb2A2UHx1FysU18iCY3kZad3baeSfGdXlJ2XoQweX74nEb 1uVp8SGH/fTpg== From: Thomas Gleixner To: Anup Patel Cc: Yingjun Ni , pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier Subject: [PATCH] irqchip/msi-lib: Refuse initialization when irq_write_msi_msg() is missing In-Reply-To: <87ldh93cn1.ffs@tglx> References: <20260203080256.9401-2-yingjun.ni@riscv-computing.com> <87ecn23q6e.ffs@tglx> <87ldh93cn1.ffs@tglx> Date: Tue, 03 Feb 2026 22:05:44 +0100 Message-ID: <87a4xp35cn.ffs@tglx> 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" MSI parent domains rely on the fact that the top level device domain provides a irq_write_msi_msg() callback. Check for that and if missing warn and refuse to initialize the device doma= in. Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-msi-lib.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/irqchip/irq-msi-lib.c +++ b/drivers/irqchip/irq-msi-lib.c @@ -48,6 +48,9 @@ bool msi_lib_init_dev_msi_info(struct de return false; } =20 + if (WARN_ON_ONCE(!chip->irq_write_msi_msg)) + return false; + required_flags =3D pops->required_flags; =20 /* Is the target domain bus token supported? */