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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8FC6CD8CA9 for ; Tue, 10 Oct 2023 16:37:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233618AbjJJQhC (ORCPT ); Tue, 10 Oct 2023 12:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbjJJQg7 (ORCPT ); Tue, 10 Oct 2023 12:36:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 863A593 for ; Tue, 10 Oct 2023 09:36:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2513DC433C7; Tue, 10 Oct 2023 16:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696955818; bh=W2xIKe9L/LI5ekQDMfwHG7XAOQIQ9z/WMjX7Z1TYmxQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D9B6K+j5Di39Lds6hkOZ3g552VZGLNdd2uYMqqy3T4H2GzrODYEn++a2HFFR6SawY zNfMNqw8HbxH6OK4V7ZDDamXqMKAjx4kBRhOveJBjYNc0OxTwNg/QIAji8kyfxxEPU 6w9RnP72uLoNZ7CUWF0lTHIPn5dMU4Ru7mR/8UaMtmSC0TUykWcBKZbZG2HKAeOYN8 SMw4YuHHdYcBWP4cVKi4LeMvxR1yTo58Mw910astCLG4hVtXiiD8wXtw3Y5RgRIfPL rTgVXP8705qYkFzoNQley5S9SZYkqmQ4J4dKwadbEKJqx4Qczysn4h6wpPOdwLC6gm DVK91u5VfEbAg== Received: from [104.132.1.97] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qqFj4-002rfh-Tw; Tue, 10 Oct 2023 17:36:55 +0100 Date: Tue, 10 Oct 2023 17:36:50 +0100 Message-ID: <874jiymo2l.wl-maz@kernel.org> From: Marc Zyngier To: Yicong Yang Cc: , , , , , , , , , , , Subject: Re: [RFC PATCH 0/3] Add HiSilicon system timer driver In-Reply-To: <20231010123033.23258-1-yangyicong@huawei.com> References: <20231010123033.23258-1-yangyicong@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 104.132.1.97 X-SA-Exim-Rcpt-To: yangyicong@huawei.com, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de, jonathan.cameron@huawei.com, prime.zeng@huawei.com, wanghuiqiang@huawei.com, wangwudi@hisilicon.com, guohanjun@huawei.com, yangyicong@hisilicon.com, linuxarm@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, M. -- Without deviation from the norm, progress is not possible.