Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp530922rdg; Tue, 10 Oct 2023 19:11:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFw+Als1sABzmtVs0yjyf/va5qgudq2LuDRF74uAYy5e7DGdyr/9VZqE1fLPpIkucH9UxRT X-Received: by 2002:a17:903:191:b0:1c9:d011:582f with SMTP id z17-20020a170903019100b001c9d011582fmr19341plg.37.1696990311172; Tue, 10 Oct 2023 19:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696990311; cv=none; d=google.com; s=arc-20160816; b=F/MhOXX/8hMuyHh+5cnWsgW3xWThqQYo4t5ekg9OaDhN5agMVB75QpdynN76SSei1a fx/xB9Tz5uicGvod3Vm5gP72nlKNmrWwb8aLcOwOMJ5eJM4MsH0Tm1NCX2Cb8SiY4D7k GCDRdyOq8Lj2tQ/QEHZiXFOsE2pveilvNlKmD41p/XQb2dyo3AzV1tN+lJKeJjFPkhWj 8MVsaewB8qUZO0SNLoqpvvicH0ofO4bl7Ev0QjixPyKO0ohGv+SdPo2Y4sk4nJaTS9dr +ER8FsW7rcWVrRwA1I7TE4m+BYQAPeQgjBUdn1VpVMzFe7ghIyfLLKz+C2PhBXAsbXhW j4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :cc; bh=iTjBgy4XfTYH8DXddWcKtjGPcRvhDwUdKVVYz8lM68Q=; fh=o0KVEflYJ3NNlfNFYyICMRGeicTMJeJPUmPxH05Bn1w=; b=wjBQJXE2uwase3Is/h1P0fzW/vXDJU+BgoT5SZaO+czodv8HUf9U4zpzEJNWWxaI02 oCJVAVL8npcGNKwnCqN5S9quDJAApDiN7n0Yg8IwqTsI3TZoTWpYKp/X4x9OkzjZ6PnJ pz9rZnkHLLKlAmDo9cq+99PZKqO/3hgpbfxJdGYUTt3kBisaxmlHb4YWrv0mT7/wBGHQ xhMtojWNoaBtT+Oi1ewNqjWCtyhZfFulU3uwxaVqB/TGqtjSdua5vLpL6PMG9cwuHc+M tycfOrKCE3FHsj1u0wOI1hcO7RVECKgePauRIjgW1uccP3StWZSFKetsJ52eRYsdS65j C7HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x9-20020a170902ec8900b001c470c5906bsi3167218plg.221.2023.10.10.19.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 19:11:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A5EFD807C651; Tue, 10 Oct 2023 19:10:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344738AbjJKCKQ (ORCPT + 99 others); Tue, 10 Oct 2023 22:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344209AbjJKCKP (ORCPT ); Tue, 10 Oct 2023 22:10:15 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8088E for ; Tue, 10 Oct 2023 19:10:14 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4x2c0KNlzNp95; Wed, 11 Oct 2023 10:06:16 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 11 Oct 2023 10:10:11 +0800 CC: , , , , , , , , , , , Subject: Re: [RFC PATCH 0/3] Add HiSilicon system timer driver To: Marc Zyngier References: <20231010123033.23258-1-yangyicong@huawei.com> <874jiymo2l.wl-maz@kernel.org> From: Yicong Yang Message-ID: Date: Wed, 11 Oct 2023 10:10:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <874jiymo2l.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.5 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 19:10:37 -0700 (PDT) On 2023/10/11 0:36, Marc Zyngier wrote: > On Tue, 10 Oct 2023 13:30:30 +0100, > Yicong Yang wrote: >> >> From: Yicong Yang >> >> HiSilicon system timer is a memory mapped platform timer compatible with >> the arm's generic timer specification. The timer supports both SPI and >> LPI interrupt and can be enumerated through ACPI DSDT table. Since the >> timer is fully compatible with the spec, it can reuse most codes of the >> arm_arch_timer driver. However since the arm_arch_timer driver only >> supports GTDT and SPI interrupt, this series support the HiSilicon system >> timer by: >> >> - refactor some of the arm_arch_timer codes and export the function to >> register a arch memory timer by other drivers >> - retrieve the IO memory and interrupt resource through DSDT in a separate >> driver, then setup and register the clockevent device reuse the arm_arch_timer >> function >> >> Using LPI for the timer is mentioned in BSA Spec section 3.8.1 (DEN0094C 1.0C). > > This strikes me as pretty odd. LPIs are, by definition, *edge* > triggered. The timer interrupt must be *level* triggered. So there > must be some bridge in the middle that is going to regenerate edges on > EOI, and that cannot be architectural. > > What am I missing? In our case, if the timer is working on LPI mode, it's not directly connected to the GIC. It'll be wired to hisi-mbigen irqchip which will send LPIs to the GIC. Thanks.