From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A942BC432BE for ; Wed, 4 Aug 2021 18:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F48860560 for ; Wed, 4 Aug 2021 18:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240337AbhHDShu (ORCPT ); Wed, 4 Aug 2021 14:37:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240332AbhHDSht (ORCPT ); Wed, 4 Aug 2021 14:37:49 -0400 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE69C06179E for ; Wed, 4 Aug 2021 11:37:36 -0700 (PDT) Received: by mail-vs1-xe2b.google.com with SMTP id t29so1559184vsr.5 for ; Wed, 04 Aug 2021 11:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4v3mD/G2snz9EPb0n2yEtj1B1wrpxfXSkVM/rZ+bK44=; b=UiEa1uta1KUv8TDKZIseoNOvN58KiK/nQxRPJnKuD5lTZrBcITzinwOi4xZm8Cf4H7 UiXfhR3HHnQsZdXRk1ePk1j0+K+W3KAgbIxU6qZuLGNoAozeTSlsHGPoM7wZY5MDzNcr nveFZTkbRVI2YLs8FY39dWLY7KkMtLVbsWaz+tBzVbl9V8lH0yCJF0cQPx2vikXmRrG2 nUuq5oRb71+g/PXYHLEFMPSy6yT9mfdb8ACD9+l7s9e9iPFbUwtqj7AiMeAevCmCZCCb JjlI17bXqD6S7+vljkvff8HX3byQ9kVXLeGHgLOhEdUm9VXdFRVnY2TRpbfwZKlBgO1i O3Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4v3mD/G2snz9EPb0n2yEtj1B1wrpxfXSkVM/rZ+bK44=; b=K3qRnoZEvsf4q9/H4Wlv9jGb/GRZjqPjar4CBw0pz9ixAMzZMv0Q49HHhqft6xK+h1 1V6wgMhiM+kI1pwNArPF9rgdDymdiH6ftqFsuzrJheYW0OoCyqEcBLaJnDqNl1wSn76w xHSg9J4rBP4u53wFC9uWvlRo6I3xy1X0PqJbz0XllNZsTDusEz7IEKt75oB5yjK45ivi OOjMWVwStMiYHHCDjfF/mKSc26Aq0WlmoOCIa8ypuQjArBsqhUsLA13xUermLdv7KYeh 6PJfSSg8qCtXjYtuwgtiJg1igJBEXl1sB17bejfkt3Yb1YIQkkWlM0mLR0UvRsXuMeCd k7xw== X-Gm-Message-State: AOAM532aqbkCG2MpdKHmCfXC8KxEaibVUxKBjQc+fuv3F417Q/QIyXyN 6q5iYcdLqABl8SO4pBnB/QFCgbUntN9pJA/8uZGLqA== X-Google-Smtp-Source: ABdhPJxf7txyKVStc9ONgBFPDBEr31m+shBvV8OvMRDu9d7Qql+uwVOjtKWRAB+wjysr6bHm+4qOzLKEIRe9Sx5O90o= X-Received: by 2002:a67:f60e:: with SMTP id k14mr1496697vso.30.1628102255703; Wed, 04 Aug 2021 11:37:35 -0700 (PDT) MIME-Version: 1.0 References: <20210730144922.29111-1-semen.protsenko@linaro.org> <20210730144922.29111-13-semen.protsenko@linaro.org> <15871f8ced3c757fad1ab3b6e62c4e64@misterjones.org> <87k0l1w8y5.wl-maz@kernel.org> In-Reply-To: <87k0l1w8y5.wl-maz@kernel.org> From: Sam Protsenko Date: Wed, 4 Aug 2021 21:37:24 +0300 Message-ID: Subject: Re: [PATCH 12/12] arm64: dts: exynos: Add Exynos850 SoC support To: Marc Zyngier Cc: Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Rob Herring , Stephen Boyd , Michael Turquette , Jiri Slaby , Greg Kroah-Hartman , Charles Keepax , Ryu Euiyoul , Tom Gall , Sumit Semwal , John Stultz , Amit Pundir , devicetree , linux-arm Mailing List , linux-clk , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linux Samsung SOC , "open list:SERIAL DRIVERS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, 4 Aug 2021 at 18:01, Marc Zyngier wrote: > > On Wed, 04 Aug 2021 15:39:38 +0100, > Sam Protsenko wrote: > > > > You are also missing the hypervisor virtual timer interrupt. > > > > > > > Checked SoC TRM, there is no PPI for hypervisor virtual timer > > interrupt, and no mentioning of it at all. Likewise, I checked ARMv8 > > ARM and TRM, almost no description of it. Also, I checked other > > platforms, and seems like everyone does the same (having only 4 > > interrupts). And I wasn't able to find any documentation on that, so I > > guess I'll leave it as is, if you don't mind. > > I *do* mind, and other DTs being wrong isn't a good enough excuse! ;-) > > From the ARMv8 ARM (ARM DDI 0487G.b) > > D11.2.4 Timers > > In an implementation of the Generic Timer that includes EL3, if EL3 > can use AArch64, the following timers are implemented: > > * An EL1 physical timer, that: > - In Secure state, can be accessed from EL1. > - In Non-secure state, can be accessed from EL1 unless those > accesses are trapped to EL2. > When this timer can be accessed from EL1, an EL1 control > determines whether it can be accessed from EL0. > * A Non-secure EL2 physical timer. > * A Secure EL3 physical timer. An EL3 control determines whether this > register is accessible from Secure EL1. > * An EL1 virtual timer. > * When FEAT_VHE is implemented, a Non-secure EL2 virtual timer. > * When FEAT_SEL2 is implemented, a Secure EL2 physical timer. > * When FEAT_SEL2 is implemented, a Secure EL2 virtual timer. > > > Cortex-A55 being an ARMv8.2 implementation, it has FEAT_VHE, and thus > it does have a NS-EL2 virtual timer. This is further confirmed by the > TRM which documents CNTHV*_EL2 as valid system registers[1]. > > So the timer exists, the signal is routed out of the core, and it > is likely that it is connected to the GIC. > > If the designers have omitted it, then it needs to be documented as > such. > Ok, I've checked thoroughly all docs again, and it seems like there is no dedicated PPI number for this "EL2 Hypervisor Virtual Timer" in Exynos850 SoC. The timer instance itself might exist of course, but interrupt line is probably wasn't connected to GIC by SoC designers, at least it's not documented. Moreover, from [1,2] it looks like if it were existing it would have been PPI=12 (INTID=28). But in GIC-400 TRM this PPI is assigned to "Legacy FIQ signal", and all there is no PPI for Hypervisor Virtual Timer documented there as well. In Exynos850 TRM the source for this PPI's interrupt source is marked as "-", which means it's not used. So if you know something that I don't know -- please point me out the doc where this PPI line is documented. Otherwise I can add the comment to device tree, stating that this interrupt line is not present in SoC's GIC, i.e. something like this: 8<------------------------------------------------------------------------------->8 timer { compatible = "arm,armv8-timer"; interrupts = , , , ; /* Hypervisor Virtual Timer PPI is not present in this SoC GIC */ }; 8<------------------------------------------------------------------------------->8 Is that ok with you? [1] https://developer.arm.com/documentation/102379/0000/The-processor-timers?lang=en [2] https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py#150 > Thanks, > > M. > > [1] https://developer.arm.com/documentation/100442/0100/register-descriptions/aarch64-system-registers/aarch64-architectural-system-register-summary > > -- > Without deviation from the norm, progress is not possible. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1A76C4338F for ; Wed, 4 Aug 2021 18:39:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AACF60560 for ; Wed, 4 Aug 2021 18:39:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7AACF60560 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5No2Qfi7eEsDMF+dB7IoqoO20v4n8RznYArWMvHjRtA=; b=M16WrsOjr0WyBf CQq3hQC4MaRWknXmv3DEA7Uc9Gn1dDWHQvSvtbtLDUEt4DPnTnXO0rkkxDmp0/wBYXRwMX9U9qBGG RBfITBaAfQiTafqyDMKPtymZoVlHifPF2C51i//BH07cNx+eGVBtYOTNczsc3EgEk51f3OrHe96Za lpps3bqVT8wzBuZVzqXIDv/MEzhOcO2ChteiXXURLx8TmSTjJVbRl8JEdUcJZqN0mF4FZamGwco9k dPTcJgShkR+xdoxphF3tfTc0RdblRlhZdbryTuMUujhZHYFdoJkJ5VQ7yLFIJUV7Xug3kignIYPMz wIhKv1wGZjl2JhX9n9mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBLlu-007BHJ-DT; Wed, 04 Aug 2021 18:37:42 +0000 Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBLlq-007BG5-Da for linux-arm-kernel@lists.infradead.org; Wed, 04 Aug 2021 18:37:40 +0000 Received: by mail-vs1-xe2d.google.com with SMTP id a8so1561529vsl.4 for ; Wed, 04 Aug 2021 11:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4v3mD/G2snz9EPb0n2yEtj1B1wrpxfXSkVM/rZ+bK44=; b=UiEa1uta1KUv8TDKZIseoNOvN58KiK/nQxRPJnKuD5lTZrBcITzinwOi4xZm8Cf4H7 UiXfhR3HHnQsZdXRk1ePk1j0+K+W3KAgbIxU6qZuLGNoAozeTSlsHGPoM7wZY5MDzNcr nveFZTkbRVI2YLs8FY39dWLY7KkMtLVbsWaz+tBzVbl9V8lH0yCJF0cQPx2vikXmRrG2 nUuq5oRb71+g/PXYHLEFMPSy6yT9mfdb8ACD9+l7s9e9iPFbUwtqj7AiMeAevCmCZCCb JjlI17bXqD6S7+vljkvff8HX3byQ9kVXLeGHgLOhEdUm9VXdFRVnY2TRpbfwZKlBgO1i O3Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4v3mD/G2snz9EPb0n2yEtj1B1wrpxfXSkVM/rZ+bK44=; b=Jc7RIwPB5mhXgclSFudarD/DG6cBDpx2m35X1Fkeg9nlVLAWxbIQrGs259FkoQOxEQ yx03WxQOqJ1Y1J+On0GLgGSKm4RF2X/S1LR8ToLPOQQATGqpZJHTyOOWlCF39O2jHLtW gORe5R54vu1bVjRiwamvUdYG7yHd/mtkQ9tPU6sS6CYXu58eYMMHi614QD7LL/nJXqiA CnA7BzXaJI8bzYQIj8bCv20Hvojygrh4swQMcry3oJ4tVEQzD3wCZMlbWSozUVrpbiYQ KpkuVOpSkCqkaBhIxC/n88vqF+JzGv6UJXlz2M0ukCPatmnr1iR+c8TKkLDFJwQ5XP9k k0Rw== X-Gm-Message-State: AOAM531nOxEYPa5S1aMATd5L86FXJ4MZ3Q7bzC6b4OBss1UldUjTa6oe XRjwjgfrhM3D2rddu1MNVvoI1t48rbZrbaqRP+vHEg== X-Google-Smtp-Source: ABdhPJxf7txyKVStc9ONgBFPDBEr31m+shBvV8OvMRDu9d7Qql+uwVOjtKWRAB+wjysr6bHm+4qOzLKEIRe9Sx5O90o= X-Received: by 2002:a67:f60e:: with SMTP id k14mr1496697vso.30.1628102255703; Wed, 04 Aug 2021 11:37:35 -0700 (PDT) MIME-Version: 1.0 References: <20210730144922.29111-1-semen.protsenko@linaro.org> <20210730144922.29111-13-semen.protsenko@linaro.org> <15871f8ced3c757fad1ab3b6e62c4e64@misterjones.org> <87k0l1w8y5.wl-maz@kernel.org> In-Reply-To: <87k0l1w8y5.wl-maz@kernel.org> From: Sam Protsenko Date: Wed, 4 Aug 2021 21:37:24 +0300 Message-ID: Subject: Re: [PATCH 12/12] arm64: dts: exynos: Add Exynos850 SoC support To: Marc Zyngier Cc: Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Rob Herring , Stephen Boyd , Michael Turquette , Jiri Slaby , Greg Kroah-Hartman , Charles Keepax , Ryu Euiyoul , Tom Gall , Sumit Semwal , John Stultz , Amit Pundir , devicetree , linux-arm Mailing List , linux-clk , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linux Samsung SOC , "open list:SERIAL DRIVERS" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210804_113738_531097_BCC269F4 X-CRM114-Status: GOOD ( 32.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 4 Aug 2021 at 18:01, Marc Zyngier wrote: > > On Wed, 04 Aug 2021 15:39:38 +0100, > Sam Protsenko wrote: > > > > You are also missing the hypervisor virtual timer interrupt. > > > > > > > Checked SoC TRM, there is no PPI for hypervisor virtual timer > > interrupt, and no mentioning of it at all. Likewise, I checked ARMv8 > > ARM and TRM, almost no description of it. Also, I checked other > > platforms, and seems like everyone does the same (having only 4 > > interrupts). And I wasn't able to find any documentation on that, so I > > guess I'll leave it as is, if you don't mind. > > I *do* mind, and other DTs being wrong isn't a good enough excuse! ;-) > > From the ARMv8 ARM (ARM DDI 0487G.b) > > D11.2.4 Timers > > In an implementation of the Generic Timer that includes EL3, if EL3 > can use AArch64, the following timers are implemented: > > * An EL1 physical timer, that: > - In Secure state, can be accessed from EL1. > - In Non-secure state, can be accessed from EL1 unless those > accesses are trapped to EL2. > When this timer can be accessed from EL1, an EL1 control > determines whether it can be accessed from EL0. > * A Non-secure EL2 physical timer. > * A Secure EL3 physical timer. An EL3 control determines whether this > register is accessible from Secure EL1. > * An EL1 virtual timer. > * When FEAT_VHE is implemented, a Non-secure EL2 virtual timer. > * When FEAT_SEL2 is implemented, a Secure EL2 physical timer. > * When FEAT_SEL2 is implemented, a Secure EL2 virtual timer. > > > Cortex-A55 being an ARMv8.2 implementation, it has FEAT_VHE, and thus > it does have a NS-EL2 virtual timer. This is further confirmed by the > TRM which documents CNTHV*_EL2 as valid system registers[1]. > > So the timer exists, the signal is routed out of the core, and it > is likely that it is connected to the GIC. > > If the designers have omitted it, then it needs to be documented as > such. > Ok, I've checked thoroughly all docs again, and it seems like there is no dedicated PPI number for this "EL2 Hypervisor Virtual Timer" in Exynos850 SoC. The timer instance itself might exist of course, but interrupt line is probably wasn't connected to GIC by SoC designers, at least it's not documented. Moreover, from [1,2] it looks like if it were existing it would have been PPI=12 (INTID=28). But in GIC-400 TRM this PPI is assigned to "Legacy FIQ signal", and all there is no PPI for Hypervisor Virtual Timer documented there as well. In Exynos850 TRM the source for this PPI's interrupt source is marked as "-", which means it's not used. So if you know something that I don't know -- please point me out the doc where this PPI line is documented. Otherwise I can add the comment to device tree, stating that this interrupt line is not present in SoC's GIC, i.e. something like this: 8<------------------------------------------------------------------------------->8 timer { compatible = "arm,armv8-timer"; interrupts = , , , ; /* Hypervisor Virtual Timer PPI is not present in this SoC GIC */ }; 8<------------------------------------------------------------------------------->8 Is that ok with you? [1] https://developer.arm.com/documentation/102379/0000/The-processor-timers?lang=en [2] https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py#150 > Thanks, > > M. > > [1] https://developer.arm.com/documentation/100442/0100/register-descriptions/aarch64-system-registers/aarch64-architectural-system-register-summary > > -- > Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel