Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp58075ybr; Fri, 22 May 2020 00:34:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH0Hh0Z8ouRRPBtFXxbQBBcfhtrXZP03cyKJ7bq/K+ovD3h+20LN+gul8sBerw+JEB4TP0 X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr1981361edv.203.1590132871701; Fri, 22 May 2020 00:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590132871; cv=none; d=google.com; s=arc-20160816; b=oNCSlJZCLvTgFxhMPUHItzspRnfWEMbjWlSAtoldrqzdTEvXHu5FhM+/OGWwI1OkA6 63u4S1l4fgm1Il4/j/a5+57D1IRfEeYOasrERXfXppbhewEXWjM/emKL+kFb3vSRLlHW aZYWKfEEV//4bU7KntZ2QE3Yj4TMGgu+1cN6Izprt7hjoeStWHrQ07pJLufqhuen7qr4 m8Nzj0ycOdoPuMigI6RK4willKPqJ/6vcEKehXD5DqXDh1eMLUIaZbSX/ykBloGSqNqw 0nYhjOtWF3tKDGfFQVwd8hbOk+1eqcFZxjXTgxVsnGDePKWXNWTXtJsCJWkCaY21Oa0W lycA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DRDrGi+p4L7RDFQ/xNztBIhb0aJ401HO4L6608emYU4=; b=R9ELhpc4KNoXnvJJ8f+j1y3IcMkHGJkOwXAP8qvbzKgXHUAM2GkV/kf6Zee/+BxxV8 sJbMf7Md6/6TAZpENSuBJ27YJTSH3f5s6GvzO8jhgB5w7fZtOi/5WPOTq6UvEJroXVMf PZx2uogFT83Ze/8JFp8HwbeJjD86j7wKn/e64zPdE4tb6i2nsI1AqEgU1iBB0Ax8Wj0Y ofIwmL2KVZJGon+J32ll8weMFz5hsD7tnbnwssNVhw3epKwOW5tTKElL3I7Oh7I3txsl A5qCrE5tJMJ62Z12vdUn/K6VKwe6wFaSUF2qCL+vOc1vB4vHwoTVyCY38kIHMWyd7M8g sD9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si4188841edb.445.2020.05.22.00.34.09; Fri, 22 May 2020 00:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728747AbgEVHbI (ORCPT + 99 others); Fri, 22 May 2020 03:31:08 -0400 Received: from elvis.franken.de ([193.175.24.41]:34138 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728254AbgEVHbF (ORCPT ); Fri, 22 May 2020 03:31:05 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1jc28y-0003HE-00; Fri, 22 May 2020 09:31:00 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 4401BC015D; Fri, 22 May 2020 09:30:14 +0200 (CEST) Date: Fri, 22 May 2020 09:30:14 +0200 From: Thomas Bogendoerfer To: Serge Semin Cc: Serge Semin , Alexey Malahov , Paul Burton , Ralf Baechle , Greg Kroah-Hartman , Arnd Bergmann , Rob Herring , devicetree@vger.kernel.org, afzal mohammed , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 13/13] mips: cevt-r4k: Update the r4k-clockevent frequency in sync with CPU Message-ID: <20200522073014.GI7331@alpha.franken.de> References: <20200521140725.29571-1-Sergey.Semin@baikalelectronics.ru> <20200521140725.29571-14-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521140725.29571-14-Sergey.Semin@baikalelectronics.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 05:07:24PM +0300, Serge Semin wrote: > Due to being embedded into the CPU cores MIPS count/compare timer > frequency is changed together with the CPU clocks alteration. > In case if frequency really changes the kernel clockevent framework > must be notified, otherwise the kernel timers won't work correctly. > Fix this by calling clockevents_update_freq() for each r4k clockevent > handlers registered per available CPUs. > > Traditionally MIPS r4k-clock are clocked with CPU frequency divided by 2. > But this isn't true for some of the platforms. Due to this we have to save > the basic CPU frequency, so then use it to scale the initial timer > frequency (mips_hpt_frequency) and pass the updated value further to the > clockevent framework. > > Signed-off-by: Serge Semin > Cc: Alexey Malahov > Cc: Thomas Bogendoerfer > Cc: Paul Burton > Cc: Ralf Baechle > Cc: Greg Kroah-Hartman > Cc: Arnd Bergmann > Cc: Rob Herring > Cc: devicetree@vger.kernel.org > --- > arch/mips/kernel/cevt-r4k.c | 44 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]