Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp208653lqj; Sat, 1 Jun 2024 15:23:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/O8p4HpNs0U2wVZ+8L5nqLWAL2g8XeOqxMjaMZDe5Xv82vxfB0gRGKmt+OIMxqaX0yV8P0ZPARUHxosUJtiOwfbtgLkWDXoFemgm+8Q== X-Google-Smtp-Source: AGHT+IENm6Xqq0kGD45K3hdyQVzOpjW5g7/R/M8fynBMJe1QbU9vCETakykQ5gcjQ+U6zRqWgGIp X-Received: by 2002:a05:620a:400a:b0:792:b96d:370b with SMTP id af79cd13be357-794f5c6e143mr644515385a.13.1717280639058; Sat, 01 Jun 2024 15:23:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717280639; cv=pass; d=google.com; s=arc-20160816; b=pHBc58VhHf2QnQjpaCcp3aQz5lmt5relLHLR7gU8AiHc6cu7Cu4Y/QkIKHpf/ly8lU IXGmpOjMwbFbMASrpBeAmBQUFfOiN//7WWsNpKw33KAYkL0apRI5UTc+83GUZoJofndt enwlW0rEBohAY9X7xNfrEk8QkqyE270wb9CMxHF7SdlPttrCTw2ezmtmAdrX/lP/+sXr FGCE/+g1WSgu9pBwPcp3JHPn0uA+nimEx2sfErBk/HiiyAWAtgX6+7bU/hfaXCaAN5Bg 0TaqlikqN0KKOrU3A0Gi3ljfL8OquLY430cylaWNuFKXbf2qfE/+ObV/IbNa+LdJ37Ur VyUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=WBIgFF3N0Oe7wKE7p8q4zqSzUlHMt9JKrtn291Lde30=; fh=zeGewq4FGm3UotvzgqpOmAaPeEpwXMzXbYXnZ1jE3bk=; b=MQaiEfIBBWb5Kce8i46tezq+lp/6Dg2Ey+BbrP4kzklMDcuDNO8xRwy3mPGAY0mp8r Ui0yt22H0t14UO3Ncf92W7YYr0QtVAc2lZFClIxn1qQ4PCE00ByBAjWfIMoBECzEcA6i nsA7JNY02kn3RJHTFPgqFXPI6dq6CIZV4aj1DFxexArMjiyCIl368KJUy65f+cirMulM 1R/aHdi/r4d0uPjqE3+uuMhM7KirHbRNTXpPG8tEsl7hsEZbHROk2G65YWmU4I4RWxC3 4aP9esepTEqL5BOXEpSJIktwXA/FUuB9cx+d9KNiLQqxghhj8y3pHqXMDMZXtBzzvrCD PFHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-198020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198020-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f3064f48si529045485a.297.2024.06.01.15.23.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 15:23:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-198020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198020-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C4C701C20A2E for ; Sat, 1 Jun 2024 22:23:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D4802BCF5; Sat, 1 Jun 2024 22:23:51 +0000 (UTC) Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6157A1C6BD; Sat, 1 Jun 2024 22:23:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.133.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717280631; cv=none; b=ZGAfQ5LAmTz34NoyGycwmS4Ib0tVX2hD7udsyT3PoBTNmcIades+FMBLcXGwG1np+faisASLvNfLey6NwsAjDvsI30tJ+oKOYHNG9QkZo/4ZHmX/FRAlOvhOuzwyWBt/R905cJUbY1cm3QQ2UC2CxyM2emyfl06506AFiDI9yiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717280631; c=relaxed/simple; bh=a2DEIn9JBgr/CBzEsnUbi8PgL8QTJbR6+n1UoaXTpVU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=TmC3ElvkFC0oXMijhPmutGiHS02MzOFOV9CSNoA9Xg/bRL7BVFWn77eJ3lOGoDDyYWjvJQrRaJH5h1vxJRMgLlgdH8j1dGritLKI/zGU/xeBtypXznS1Hvi+J7B+k4AZiSNSexMfbvGsGtRRWMvxckrj3VAjvoh0iL6RAd5F/bs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk; spf=none smtp.mailfrom=orcam.me.uk; arc=none smtp.client-ip=78.133.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id 1C9C592009C; Sun, 2 Jun 2024 00:23:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 0E79192009B; Sat, 1 Jun 2024 23:23:40 +0100 (BST) Date: Sat, 1 Jun 2024 23:23:39 +0100 (BST) From: "Maciej W. Rozycki" To: Jiaxun Yang cc: Thomas Bogendoerfer , Serge Semin , Daniel Lezcano , Thomas Gleixner , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] MIPS: csrc-r4k: Refine rating computation In-Reply-To: <20240511-mips-clks-v1-1-ddb4a10ee9f9@flygoat.com> Message-ID: References: <20240511-mips-clks-v1-0-ddb4a10ee9f9@flygoat.com> <20240511-mips-clks-v1-1-ddb4a10ee9f9@flygoat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Sat, 11 May 2024, Jiaxun Yang wrote: > Increase frequency addend dividend to 100000000 (10MHz) to The value of 100000000 is AFAICT 100MHz. > diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c > index edc4afc080fa..262896871351 100644 > --- a/arch/mips/kernel/csrc-r4k.c > +++ b/arch/mips/kernel/csrc-r4k.c > @@ -111,7 +111,8 @@ int __init init_r4k_clocksource(void) > return -ENXIO; > > /* Calculate a somewhat reasonable rating value */ > - clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; > + clocksource_mips.rating = 200; > + clocksource_mips.rating += clamp(mips_hpt_frequency / 100000000, 0, 99); And FAOD the code change does match it. Maciej