Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1269168pxb; Thu, 15 Apr 2021 19:34:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQHbTtsOI3c23zfmtCGYNaKRISDyD6XzjBFo9YwYG2bCXBly1SL7BCSZfb+A8u6TA1ZaDY X-Received: by 2002:a17:906:2704:: with SMTP id z4mr6082200ejc.137.1618540446256; Thu, 15 Apr 2021 19:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618540446; cv=none; d=google.com; s=arc-20160816; b=ghrXCRmGhkiaAYb+LtZjr2C36BG0Jvd6eEZ1L7iChL7eqUez50yy5T0tZnM5Bzb57G ahRPRXhlHSPDpjbuudofhr+Pjqt1sxF48s6bseO3WcF0uFOMt6C9HV2hZ3sWPDkTZ031 rrAaeaL1FpntVxnHA8Q6orKTWXIgThcsL+4ljeGYTuDUjXyc7MNe51IqY+Z62rDwUrza 3aDoXxGH9Z6UQD7Yae0GnyXYJTzi7IElKKvgr7QSn35wmFkoBMt1oXjWh5/FwJpABm8H SJNHyGfaZKx5YN3JB9FoG5bz+7RbDhmpBeuhcUX/c8BwTb0XZ9540h8hfDWnOFxubT9V 6PIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=LH9w1lyeDc3qEQvpujhZu4uQ7f5NJ6v03mLBOzW4/3s=; b=NsOFLIkIJhlChhG/x1SRCSWst2YbX6jdNb0hVAVqWvOR1Rkp70P07yIe6n1m1j4ul7 EYEjdgq7Zg4NTKPqw52SGKOz20hldnDS2kSD8HvZg5iU5Yush9Vz83h6ZfhJKXwM3QFu lnPSn++CJiJdqu0Tb52zXIGl1KzR39eeL+z78ywnPKnMgjkGouaKWqcJsDgAtkEmq4Wy LLKTDpPHdgsA7+2uymcFONp1LrG/Pbj4yz7+HEBo8HzEg0dEWOi9R73dJRyqnPqJjOKG rrtxDbJKLntEGqRCNCEfwGYzanOG2vudbvLl/X08pszX4/DAyRlf7OqSxyZ3c1yypIs9 w8XQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si4034650edd.467.2021.04.15.19.33.43; Thu, 15 Apr 2021 19:34:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237596AbhDPBOZ (ORCPT + 99 others); Thu, 15 Apr 2021 21:14:25 -0400 Received: from regular1.263xmail.com ([211.150.70.195]:55072 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235109AbhDPBOY (ORCPT ); Thu, 15 Apr 2021 21:14:24 -0400 Received: from localhost (unknown [192.168.167.172]) by regular1.263xmail.com (Postfix) with ESMTP id AA5E61CB4; Fri, 16 Apr 2021 09:13:39 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 Received: from [172.16.12.120] (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P18449T140669553202944S1618535618574890_; Fri, 16 Apr 2021 09:13:39 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: X-RL-SENDER: kever.yang@rock-chips.com X-SENDER: yk@rock-chips.com X-LOGIN-NAME: kever.yang@rock-chips.com X-FST-TO: heiko@sntech.de X-RCPT-COUNT: 6 X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 Subject: Re: [RFC] ITS fails to allocate on rk3568/rk3566 To: Marc Zyngier Cc: Peter Geis , Thomas Gleixner , "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , =?UTF-8?Q?Heiko_St=c3=bcbner?= References: <871rbeo7wf.wl-maz@kernel.org> <87y2dmmggt.wl-maz@kernel.org> <87tuoambdb.wl-maz@kernel.org> <871rbdt4tu.wl-maz@kernel.org> <678e9950-dd85-abb2-a104-07a4db1fad49@rock-chips.com> <87k0p4m0gm.wl-maz@kernel.org> From: Kever Yang Message-ID: <8d2e22f5-1c1b-e795-8757-ae078446d961@rock-chips.com> Date: Fri, 16 Apr 2021 09:13:38 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87k0p4m0gm.wl-maz@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2021/4/15 下午4:11, Marc Zyngier wrote: > Hi Kever, > > On Thu, 15 Apr 2021 08:24:33 +0100, > Kever Yang wrote: >> Hi Marc, Peter, >> >>     RK356x GIC has two issues: >> >> 1. GIC only support 32bit address while rk356x supports 8GB DDR SDRAM, >> so we use ZONE_DMA32 to fix this issue; > What transactions does this affect exactly? The GIC on rk356x is a 32bit master, which means all the space its logic need to access should be in the 4GB range. > Only some ITS tables? Or > all of them, including the command queue? What about the configuration > and pending tables associated with the redistributors? > >> 2. GIC version is r1p6-00rel0, RK356x interconnect does not support >> GIC and CPU snoop to each other, hence the GIC does not support the >> shareability feature.  The read of register value for shareability >> feature does not return as expect in GICR and GITS, so we have to >> workaround for it. > How about the cacheability attribute? Can you please provide the exact > set of attributes that this system actually supports for each of the > ITS and redistributor base registers? The shareability attributes in GICR_PENDBASEER, GICR_PROPBASER, GITS_BASERn, GITS_CBASER default value is 0b00, when we set 0b01 then read returns 0b01. Since there is no ACE coherency interface for this GIC controller, all the cacheability in the GIC is not support in hardware. > > Also, please provide errata numbers for these two issues so that we > can properly document them and track the workarounds. What kind of errata do you need, could you please share any kind of example close to this case? We consider this as a SoC implement design instead of a bug, so we will add document in RK356X  TRM to describe the GIC design, but no idea how to provide the errata. Here is the shareabily attribute from ARM GIC architecture specification: Shareability, bits [11:10] (from GITS_CBASER) Indicates the Shareability attributes of accesses to the command queue. The possible values of this field are: 0b00 Non-shareable. 0b01 Inner Shareable. 0b10 Outer Shareable. 0b11 Reserved. Treated as 0b00. It is IMPLEMENTATION DEFINED whether this field has a fixed value or can be programmed by software. Implementing this field with a fixed value is deprecated. On a Warm reset, this field resets to an architecturally UNKNOWN value As you can see, "Implementing this field with a fixed value is deprecated", so software should program this field to '0b00 Non-shareable' if the SoC design does not support the cache shareability. Thanks, - Kever > > Thanks, > > M. >