Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3470855pxb; Sun, 24 Oct 2021 03:07:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFIrAAbhLoU85MjSuYDz+mn7T6/b/HJmUqAU/RUUrEWg+zYl1TmgmWWhw2hxdbxf+zawk1 X-Received: by 2002:a17:903:2282:b0:140:406c:2635 with SMTP id b2-20020a170903228200b00140406c2635mr4460571plh.21.1635070044775; Sun, 24 Oct 2021 03:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635070044; cv=none; d=google.com; s=arc-20160816; b=wfgUfjkmKqi5nVL7dTDa04llLWwWmR2afPhqg9rb9Udl7W4b4ag6Jp9ZQBnE/orEoU kl18hk8jRRPhWaMnLg1Nxo9HoGeOqecO6OlPMJvnm6RRC+oFC6wb/UCqJkhICGl8wSzD 0z9r41RJOc3oo91tdSa9cn8/W5azulzPf74ONTlw/cT4RbEOSxGGc56Q38zFed3aSQih smkxBaatfuWGAYk0tGosFzgX/n0xswmydMXwwlF+gff0x3Yfj6lPMccwB7Zgi6cgWOlf NRZnx6Zp/gkdTAuGY/l6nzuNGcGRpZqmAK1/3fBNo4yUE2DCRb12AebbGQhK7B4tFdDi viYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Zo7IrGxAgdgTM6BVEjXLpovJh1fUY2A49Q5MzI4kwS8=; b=pbcO7RDm7V1VARuz0ZHZWc9P3RIbR0PiYO7Fg9qzlpF6CcQoxNrk8GcuD7qmWcau96 wkis6aw+6XO6BMANaY3X/5unCU5/NBz76I8SQyZfIpIVFpoNgyRd2IJjCv+FyLykWi4n HcYy+rSjLaxyY3XX2N+nf386jRWiAmaTtOTn97Fqop04kojNuuRS+ezir7ZtTja3ZuON 4bMtYAypc4XqdR1zd54gvmqgMhLl9ykJaolUwlsxTpzit9rth5gpR+hswysis446DRy8 L4H+2rgvn2dGo2HAl7HLMCcWXAzAnLq33vbVgiq2xRtDRVXqvVWrhxjNzV9d3AdE7czk Oduw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZYYdsyEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si19107524pfk.186.2021.10.24.03.07.04; Sun, 24 Oct 2021 03:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZYYdsyEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbhJXKHZ (ORCPT + 99 others); Sun, 24 Oct 2021 06:07:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:36538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbhJXKHY (ORCPT ); Sun, 24 Oct 2021 06:07:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4888661040 for ; Sun, 24 Oct 2021 10:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635069904; bh=FouihXTAlUKDdV44bkvCaKVcaK2k/2Yt3weSyr3OdkI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZYYdsyEdD/h6kbTezR2Kqj8G7aVGekAzhvT106t1EfHGSUvdcwrrTF5GXEGhQMLcl Xh18cq6CIs7gZ1CguX995qLVZy2w9yUVmhsNvujSLXpC7dSSVhp+rYT9VfewZscvuO Cgqz1syDL3mPRgK6U4PLFzkQFJDGVd1u3Z3YAqMhyGtm905UUf/rHmAGAYmkIRYUOz jPpUADncF2esXR6j1+CNJRmC5+ZpkHO1PyXgRRQmVMtFktzPFNNnh9GM0OZQLM6Vek fg/BNzWVQ0N94UiP6wFbabnBFhCfNKsg8+TPhKjEeRoDWWGCFns+24ZAW7SbSqNF4d 9EloaIuWzKebA== Received: by mail-ua1-f45.google.com with SMTP id p23so3489792uaa.6 for ; Sun, 24 Oct 2021 03:05:04 -0700 (PDT) X-Gm-Message-State: AOAM530UhSDaIfjf2fZRIgfK4aQxtiHZ3fYMZ8LgLPHbugwcxbOsfaqp SAm7i81I378V2R8v8yKSk4bmAl/Zn3ipiVFXmGM= X-Received: by 2002:a67:fa93:: with SMTP id f19mr9721142vsq.43.1635069903168; Sun, 24 Oct 2021 03:05:03 -0700 (PDT) MIME-Version: 1.0 References: <20211024013303.3499461-1-guoren@kernel.org> <20211024013303.3499461-3-guoren@kernel.org> In-Reply-To: From: Guo Ren Date: Sun, 24 Oct 2021 18:04:52 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V5 2/3] dt-bindings: update riscv plic compatible string To: Anup Patel Cc: Atish Patra , Marc Zyngier , Thomas Gleixner , Palmer Dabbelt , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Rob Herring , "linux-kernel@vger.kernel.org List" , linux-riscv , Guo Ren , Rob Herring , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 24, 2021 at 5:53 PM Anup Patel wrote: > > On Sun, Oct 24, 2021 at 3:05 PM Guo Ren wrote: > > > > On Sun, Oct 24, 2021 at 5:18 PM Anup Patel wrote: > > > > > > On Sun, Oct 24, 2021 at 2:31 PM Guo Ren wrote: > > > > > > > > On Sun, Oct 24, 2021 at 3:35 PM Anup Patel wrote: > > > > > > > > > > On Sun, Oct 24, 2021 at 7:03 AM wrote: > > > > > > > > > > > > From: Guo Ren > > > > > > > > > > > > Add the compatible string "thead,c900-plic" to the riscv plic > > > > > > bindings to support allwinner d1 SOC which contains c906 core. > > > > > > > > > > > > Signed-off-by: Guo Ren > > > > > > Cc: Anup Patel > > > > > > Cc: Atish Patra > > > > > > Cc: Heiko Stuebner > > > > > > Cc: Rob Herring > > > > > > Cc: Rob Herring > > > > > > Cc: Palmer Dabbelt > > > > > > > > > > > > --- > > > > > > > > > > > > Changes since V5: > > > > > > - Add DT list > > > > > > - Fixup compatible string > > > > > > - Remove allwinner-d1 compatible > > > > > > - make dt_binding_check > > > > > > > > > > > > Changes since V4: > > > > > > - Update description in errata style > > > > > > - Update enum suggested by Anup, Heiko, Samuel > > > > > > > > > > > > Changes since V3: > > > > > > - Rename "c9xx" to "c900" > > > > > > - Add thead,c900-plic in the description section > > > > > > --- > > > > > > .../interrupt-controller/sifive,plic-1.0.0.yaml | 15 ++++++++++++--- > > > > > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > > > index 08d5a57ce00f..18b97bfd7954 100644 > > > > > > --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > > > +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > > > @@ -35,6 +35,10 @@ description: > > > > > > contains a specific memory layout, which is documented in chapter 8 of the > > > > > > SiFive U5 Coreplex Series Manual . > > > > > > > > > > > > + The thead,c900-plic couldn't complete masked irq source which has been disabled in > > > > > > + enable register. Add thead_plic_chip which fix up c906-plic irq source completion > > > > > > + problem by unmask/mask wrapper. > > > > > > + > > > > > > > > > > This is an incomplete description about how T-HEAD PLIC is different from > > > > > RISC-V PLIC. > > > > > > > > > > I would suggest the following: > > > > > > > > > > The T-HEAD C9xx SoC implements a modified/custom T-HEAD PLIC specification > > > > > which will mask current IRQ upon read to CLAIM register and will unmask the IRQ > > > > > upon write to CLAIM register. The thead,c900-plic compatible string > > > > > represents the > > > > > custom T-HEAD PLIC specification. > > > > The patch fixup the problem that when "thead,c900-plic" couldn't > > > > complete masked irq source which has been disabled. > > > > > > > > This patch is different from the last one in that there is no > > > > relationship with the auto-mask feature. > > > > > > This patch adds compatible string for T-HEAD PLIC so it > > > should describe how T-HEAD PLIC is different from RISC-V > > > PLIC. The DT bindings document describes HW and not > > > the software work-around implemented using DT bindings. > > > > > > Your irqchip patch uses T-HEAD PLIC compatible string to > > > implement a work-around. > > > > > > In other words, this patch is different from the irqchip patch. > > > > How about below: > > > > The thead,c900-plic compatible string represents the custom T-HEAD > > PLIC specification. > > - It couldn't complete masked irq source which has been disabled in > > enable register. Add thead_plic_chip which fix up c906-plic irq source > > completion problem by unmask/mask wrapper. > > This first bullet is not required because it describes how it is used > in irqchip driver to fix issues. This info has to go in your driver fix > patch. > > > - It implements a modified/custom T-HEAD PLIC specification which > > will mask current IRQ upon read to CLAIM register and will unmask the > > IRQ upon write to CLAIM register. But the feature wasn't utilized by > > software. > > Please don't advertise non-compliance with RISC-V PLIC spec as feature. > > What I had suggest before seems better. Okay, just put these in the description in the next version. The T-HEAD C9xx SoC implements a modified/custom T-HEAD PLIC specification which will mask current IRQ upon read to CLAIM register and will unmask the IRQ upon write to CLAIM register. The thead,c900-plic compatible string represents the custom T-HEAD PLIC specification. > > Regards, > Anup > > > > > > > > > Regards, > > > Anup > > > > > > > > > > > > > > > > > Regards, > > > > > Anup > > > > > > > > > > > maintainers: > > > > > > - Sagar Kadam > > > > > > - Paul Walmsley > > > > > > @@ -42,11 +46,16 @@ maintainers: > > > > > > > > > > > > properties: > > > > > > compatible: > > > > > > - items: > > > > > > + oneOf: > > > > > > + - items: > > > > > > - enum: > > > > > > - - sifive,fu540-c000-plic > > > > > > - - canaan,k210-plic > > > > > > + - sifive,fu540-c000-plic > > > > > > + - canaan,k210-plic > > > > > > - const: sifive,plic-1.0.0 > > > > > > + - items: > > > > > > + - enum: > > > > > > + - allwinner,sun20i-d1-plic > > > > > > + - const: thead,c900-plic > > > > > > > > > > > > reg: > > > > > > maxItems: 1 > > > > > > -- > > > > > > 2.25.1 > > > > > > > > > > > > > > > > > > > > > > -- > > > > Best Regards > > > > Guo Ren > > > > > > > > ML: https://lore.kernel.org/linux-csky/ > > > > > > > > -- > > Best Regards > > Guo Ren > > > > ML: https://lore.kernel.org/linux-csky/ -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/