Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3118148rdb; Tue, 6 Feb 2024 07:40:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKZHcL32QwH5d9y0thUg8fAUv1/5g8KCxodNKsOU60KEh3qWRN1Bo2RPeQv2eJ4c9ShaTO X-Received: by 2002:a17:902:ec8f:b0:1d9:b407:dd87 with SMTP id x15-20020a170902ec8f00b001d9b407dd87mr1902617plg.21.1707234028596; Tue, 06 Feb 2024 07:40:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707234028; cv=pass; d=google.com; s=arc-20160816; b=Z4u/i5P0wGcem7U2BDj8LcSJsSNL12TgvaFkOrhyMzwwCJrJx5+puyrJjL6LPt9aR4 xu5w2QjxvtrLlAkMRP9G95HpLOQyG+raod5bVdGl+FyfAqmejsz5uE+mU7G/MKdFyATn uioBmFB+hHsPH/kR3G7JcYE182kGr4smpxLVxYnETOiImv+VSrpDV+ymQe1cCo/nvweP ItJqh55O2mqAwAHWUnpbiERS2JJATCsFQqpHJo9bi8Ed644KBWkgqbkbKUcQowba/YCY hJJyqfT3N+y1fW7JfAv8M+hwQ7rFa1NI8WUBzq8WyQCV0mIiQJIHEzYFjRATRkaIcpvG r3Gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=qKkhWsNvK+Yf6kI4LEJHdgZ/rOtYafr8nbB3L4mPx5A=; fh=LjwEc5xMRCxg1H3tlJmA0l1Yfo+OAprCJ/mS/6/8jps=; b=BCYZZHhKKOwbgtK0MIL4KMzSHJFWrQ7OBlhMXBIHKjSgG1XemlOWFiA/0J4xzWQ8oD Ec5gaEks3b6Sxt1ebDxg3cGEbIkwiLGVkY+4i5KLogdQcTydiaK4hsWoAcjz29a0mM1Q Qw+xfIymnpERhxMJ9C0qZPi4R5TTX6LcUyfgDnX4tL1ocSXEfosdtQyUZvQNVsR9RaD4 Tl5ZZUKHXJ7lkGmHjAtLzBvPVCLtAQyjdoGfe7u490QZued2mDOACwujNpy6G06NmwBU zqoU/lep/XdUpBm4n6bPlO/FgbPBdukICmPzR3ZO8+UblYrzaqdMKlUHP1J+SHFZm1Ae X0GA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EabWkIzz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXlfCWUXw8QC69QU1lfP+8filszHv3/3yv3GB/w3rMUIOc5f9sOg1FMEExiF+dOettiJBAQbtMDMqbnJZUk4YGRZBqxgevnStdORSnXeg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h1-20020a170902eec100b001d78fd4af34si1797560plb.533.2024.02.06.07.40.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:40:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EabWkIzz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 84F3F28EB5C for ; Tue, 6 Feb 2024 15:36:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01AB613340B; Tue, 6 Feb 2024 15:36:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EabWkIzz" 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 0D37C133417; Tue, 6 Feb 2024 15:36:39 +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=1707233800; cv=none; b=gtcYDCFEAco0d2OYefk2zlniLiMYC3xyghRZhp5skFnAPM9bqvlWEQm0+sZfjbgvQQ+K8dunHpAHmur4bVJ+4Oc2AqCEFzkeO3zzi83PWSqHtONLp9XXUdwy0oN+3+wZwq/FncSo63hqmUk43GhFCMbjKWXWakRe/M2OePLfrOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707233800; c=relaxed/simple; bh=j9C+lBswAShvcb5jDe8vo+UB5P1oAGzctN0185Tf1GM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ahAAYyZVClZQR0BkD4JcPfY0ZeCm1g8bQvU+XJAUcJOmNnyulTE4T24pSYhgb1jFm/eLAZb/m9cQS0KIQbKuidZNLJNGqAC9d9qs8fEHhIlVWU3ac/l40XAOY3Rlg0RjV1BKqlIyolKy21MtFXiKgqNhs3ihu8u45A3kEaqxGKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EabWkIzz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46CD6C433C7; Tue, 6 Feb 2024 15:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707233799; bh=j9C+lBswAShvcb5jDe8vo+UB5P1oAGzctN0185Tf1GM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EabWkIzzJ1ejuCSKuR7Tu4rv3kKcfeaK1x/Y5wysz33fjtha9SzsGdfB7//PYSnHh xw18kDhot9J49SfviCYLfpQP6ZvmKylpf8eZKnmARq+lUaSci/dOHlOwYeWQy3ERIP s3Zj+FGKjrIZQ+iHZT+M8Oo59xkiYWMUSYJxGhSWl7USlFdE9kJnPvzSJBxqRHtX+g OCBwSAbL8Zn4lzePfhwwNYQ0qxM+7NuEkuU4U692NbN+1kHoT0zpxyr1nIRe85oajt bbLcZhphGWvnBcDvlUxbjau5IQyLpd2S6aNZwjo/0N1aK8oRTVGM3DuGlXPRzTcA1Z 1ajhiD2cdt5dw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Anup Patel , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley Cc: Anup Patel , devicetree@vger.kernel.org, Saravana Kannan , Marc Zyngier , Anup Patel , linux-kernel@vger.kernel.org, Atish Patra , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Andrew Jones Subject: Re: [PATCH v12 19/25] irqchip/riscv-imsic: Add device MSI domain support for platform devices In-Reply-To: <20240127161753.114685-20-apatel@ventanamicro.com> References: <20240127161753.114685-1-apatel@ventanamicro.com> <20240127161753.114685-20-apatel@ventanamicro.com> Date: Tue, 06 Feb 2024 16:36:36 +0100 Message-ID: <87le7xy58b.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Anup Patel writes: > The Linux platform MSI support allows per-device MSI domains so let > us add a platform irqchip driver for RISC-V IMSIC which provides a > base IRQ domain with MSI parent support for platform device domains. > > This driver assumes that the IMSIC state is already initialized by > the IMSIC early driver. > > Signed-off-by: Anup Patel [...] > diff --git a/drivers/irqchip/irq-riscv-imsic-platform.c b/drivers/irqchip/irq-riscv-imsic-platform.c > new file mode 100644 > index 000000000000..65791a6b0727 > --- /dev/null > +++ b/drivers/irqchip/irq-riscv-imsic-platform.c > @@ -0,0 +1,371 @@ [...] > +static int imsic_irq_retrigger(struct irq_data *d) > +{ > + struct imsic_vector *vec = irq_data_get_irq_chip_data(d); > + struct imsic_local_config *local; > + > + if (WARN_ON(vec == NULL)) > + return -ENOENT; > + > + local = per_cpu_ptr(imsic->global.local, vec->cpu); > + writel(vec->local_id, local->msi_va); Change to writel_relaxed().