Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2880231rwi; Fri, 21 Oct 2022 08:54:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6u3g2DlFG+IgH3mk/95UrpPv82cdiCCNbDhs5OneaeCFGpFVHB6mvlXG9TEAXoTxqpQhuT X-Received: by 2002:a17:90b:1d0f:b0:20d:1ec3:f732 with SMTP id on15-20020a17090b1d0f00b0020d1ec3f732mr22462107pjb.84.1666367683483; Fri, 21 Oct 2022 08:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666367683; cv=none; d=google.com; s=arc-20160816; b=k/uSzRB516o15bJJfyKnDLmdtdJfSnDs0GXApaCWxopbPNOm/yiOZ4n9ItAZle79G2 07gelTUasOH2XnsZM/AkkNyV/Rp5TwsJPezscld6D95pYqJ+4E9SIxO3OQardTIMgAYV C5Ibd3mR0kpDDwEkW38KR8qa7oPU73fTszY/COwWntW5G7G2d6T7+sBYFDtZXsXXlf36 TLwSGyMjeW4V4V8j8NRN9cJR0tg6fIq+53GfDTtgTjG0sFxu2b1dObT0CqHC8NwmjTXk nM054rg7subd5ldvo4G5b4fWOOI7IKVPM2Duxnxob9mDPC8343dA20DXgZ80/alk3Jz+ 78Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8SU05xoaN9oOrS8EvCUFTbfivbrpO/opHcBLYsegYmM=; b=kcM4xZYNSC3IXuwB2PMutWpHBsmaLONCUHGKyAMjRGNsMGn4B2YrQ5z6VuBTooFpbs 9vJZUZXe/aO5v7G/dvLkPGx73QoCfURckq9oYeJKCYe/oLq55Rvo0VM3U1dR78MnZKc3 9Gf7v9vfKd0r2h6iIXCD6KMW1MrwpjTRVw/+J+M0Ih6Og2qxdHmagQerfq4zXhpYtO5t RICXAMOWKqVAnI+1P7vBy+hZDPJHcECQsNRlJ60JPIXvgfXE7+AbKUteLbV3As7Pt2Z8 emqU6hHlGuQZyet+pfWtaPAiO1HTb0wQfb0K/MfrKWKwfZu1Q3KvUm31RuUlgIRXsHqf iUAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UrWLQAdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a056a0002c600b0056615a18b20si23364542pft.250.2022.10.21.08.54.30; Fri, 21 Oct 2022 08:54:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UrWLQAdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230294AbiJUPuM (ORCPT + 99 others); Fri, 21 Oct 2022 11:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbiJUPtw (ORCPT ); Fri, 21 Oct 2022 11:49:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1420645B; Fri, 21 Oct 2022 08:49:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 27022B82C4C; Fri, 21 Oct 2022 15:44:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FDAAC433D6; Fri, 21 Oct 2022 15:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666367052; bh=q8ls2LNGHBE9YWymLdLMlQ2IxqZGMv1zYqPQcuccnGs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UrWLQAdqSLoknVsteHxzfPn6ANs22mAgP7iVgHdxb6FSWPq+xP2d8E1d1BTuDUpt7 QevlJABcdtJtHhzv/c54bBVFI1BVfrIgm9suYSmsZVLdgEILvCsor06WtlakfOGg+H hlcZh+cIV10LpsKmYrV0toLf4MMwVU9K/Z8fDRPg= Date: Fri, 21 Oct 2022 17:44:10 +0200 From: Greg KH To: Joe Korty Cc: Marc Zyngier , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] arm64: arch_timer: XGene-1 has 31 bit, not 32 bit, arch timer. Message-ID: References: <20221021153424.GA25677@zipoli.concurrent-rt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021153424.GA25677@zipoli.concurrent-rt.com> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 21, 2022 at 11:34:24AM -0400, Joe Korty wrote: > arm64: XGene-1 has a 31 bit, not a 32 bit, arch timer. > > Fixes: 012f188504528b8cb32f441ac3bd9ea2eba39c9e ("clocksource/drivers/arm_arch_timer: > Work around broken CVAL implementations") > > Testing: > On an 8-cpu Mustang, the following sequence no longer locks up the system: > > echo 0 >/proc/sys/kernel/watchdog > for i in {0..7}; do taskset -c $i echo hi there $i; done > > Stable: > To be applied to 5.16 and above, once accepted by mainline. > > Signed-off-by: Joe Korty > > Index: b/drivers/clocksource/arm_arch_timer.c > =================================================================== > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -805,7 +805,7 @@ static u64 __arch_timer_check_delta(void > const struct midr_range broken_cval_midrs[] = { > /* > * XGene-1 implements CVAL in terms of TVAL, meaning > - * that the maximum timer range is 32bit. Shame on them. > + * that the maximum timer range is 31bit. Shame on them. > */ > MIDR_ALL_VERSIONS(MIDR_CPU_MODEL(ARM_CPU_IMP_APM, > APM_CPU_PART_POTENZA)), > @@ -813,8 +813,8 @@ static u64 __arch_timer_check_delta(void > }; > > if (is_midr_in_range_list(read_cpuid_id(), broken_cval_midrs)) { > - pr_warn_once("Broken CNTx_CVAL_EL1, limiting width to 32bits"); > - return CLOCKSOURCE_MASK(32); > + pr_warn_once("Broken CNTx_CVAL_EL1, limiting width to 31bits"); > + return CLOCKSOURCE_MASK(31); > } > #endif > return CLOCKSOURCE_MASK(arch_counter_get_width()); This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.