From patchwork Fri Oct 30 15:17:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11870067 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E0428C4363A for ; Fri, 30 Oct 2020 15:22:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5FBDD20756 for ; Fri, 30 Oct 2020 15:22:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NFGrfvrH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="FFLXIAKB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FBDD20756 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=69ky1ciFrMMa6z6g5H0L6fm7X9D2+Dxbo/fwKHSTh10=; b=NFGrfvrHA9P5hgbkfG+v/krkW ItBp25nubNWseBqAZkgqTJMO+U1eAb2aDaflPVwYxEuUWNBLAQKQnN1WVFk/v3Q/lV8HwIaTRT3Bt Lq/bm36iFxQBKscKat51H8Izp8HmsOYjHPjXnu1MQACOiwl8BKWauy7EGXFMZogRLmYyIblZr0eTd DuK+NMnN1dIUJTNCMRZgCnNvrUt3hCSH4hKusCGwmbjIJhAUe25vW+gL+FOlRB6CBSLVjErOqe0BJ mUJiTydNNCom0qZD6pvF1C+K2P1b43ljeZ/UtXPtSdpnl1ncXEJE9y2+MS9YbWtyRqarEvqbCREaa E4XFyemXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYWE9-0003ce-2c; Fri, 30 Oct 2020 15:22:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYWB2-0002Ym-KA for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 15:18:55 +0000 Received: from localhost.localdomain (HSI-KBW-46-223-126-90.hsi.kabel-badenwuerttemberg.de [46.223.126.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD8CD2151B; Fri, 30 Oct 2020 15:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604071131; bh=PU/541LNe7KQVoj0GelP71V9M6lqpXqIzsKggfodUE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FFLXIAKBFWVd9ecYM21HfZkJplkhfM3bZQ0R7PkQmzardEopUkKhAHjnTqwP+pTiP 2ttCQBI7+h4XcDTtbVlBwD5898pA49vyxKPJujloUB4o6Gickc+yrGhBahg3+OgUsI pEYA6HGniIewW3Cg1KawLRzwLEB06wZJHC4s1qoA= From: Arnd Bergmann To: linux-kernel@vger.kernel.org Subject: [PATCH v2 07/15] parisc: use legacy_timer_tick Date: Fri, 30 Oct 2020 16:17:50 +0100 Message-Id: <20201030151758.1241164-8-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201030151758.1241164-1-arnd@kernel.org> References: <20201030151758.1241164-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_111853_002922_AA3AA8F9 X-CRM114-Status: GOOD ( 19.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sam Creasey , Fenghua Yu , Linus Walleij , Tony Luck , linux-ia64@vger.kernel.org, Parisc List , Arnd Bergmann , Stephen Boyd , Philip Blundell , Helge Deller , Daniel Lezcano , Russell King , Finn Thain , "James E.J. Bottomley" , linux-m68k , John Stultz , Linux ARM , Thomas Gleixner , Greg Ungerer , Joshua Thompson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann parisc has selected CONFIG_GENERIC_CLOCKEVENTS since commit 43b1f6abd590 ("parisc: Switch to generic sched_clock implementation"), but does not appear to actually be using it, and instead calls the low-level timekeeping functions directly. Remove the GENERIC_CLOCKEVENTS select again, and instead convert to the newly added legacy_timer_tick() helper. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann --- Documentation/features/time/clockevents/arch-support.txt | 2 +- arch/parisc/Kconfig | 2 +- arch/parisc/kernel/time.c | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Documentation/features/time/clockevents/arch-support.txt b/Documentation/features/time/clockevents/arch-support.txt index 8287b6aa522e..61a5c9d68c15 100644 --- a/Documentation/features/time/clockevents/arch-support.txt +++ b/Documentation/features/time/clockevents/arch-support.txt @@ -21,7 +21,7 @@ | nds32: | ok | | nios2: | ok | | openrisc: | ok | - | parisc: | ok | + | parisc: | TODO | | powerpc: | ok | | riscv: | ok | | s390: | ok | diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index b234e8154cbd..78b17621ee4a 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -52,7 +52,7 @@ config PARISC select HAVE_REGS_AND_STACK_ACCESS_API select GENERIC_SCHED_CLOCK select HAVE_UNSTABLE_SCHED_CLOCK if SMP - select GENERIC_CLOCKEVENTS + select LEGACY_TIMER_TICK select CPU_NO_EFFICIENT_FFS select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 13d94f0f94a0..08e4d480abe1 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -70,8 +70,6 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) /* gcc can optimize for "read-only" case with a local clocktick */ unsigned long cpt = clocktick; - profile_tick(CPU_PROFILING); - /* Initialize next_tick to the old expected tick time. */ next_tick = cpuinfo->it_value; @@ -86,10 +84,9 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) cpuinfo->it_value = next_tick; /* Go do system house keeping. */ - if (cpu == 0) - xtime_update(ticks_elapsed); - - update_process_times(user_mode(get_irq_regs())); + if (cpu != 0) + ticks_elapsed = 0; + legacy_timer_tick(ticks_elapsed); /* Skip clockticks on purpose if we know we would miss those. * The new CR16 must be "later" than current CR16 otherwise