Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp271891imp; Thu, 21 Feb 2019 00:54:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IYHYRr9ZX1zGd41Xc2xq3YgFTvMDBmvFku3gV9aiWMNi2jNWrw7UjhjslCX4fJ6SIqZ5ByW X-Received: by 2002:a17:902:7d83:: with SMTP id a3mr7369plm.83.1550739259892; Thu, 21 Feb 2019 00:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550739259; cv=none; d=google.com; s=arc-20160816; b=dJMkpz0OH7Gqm3hcohxfH/xahOHRn2cEUVA/PX+NFAJAiD5WlgEgLrh1rPlOBNxF7K zK2L6JVhy27IEcRwwIDuZvFi+rnWon0tshirorGOSHK3KCvQrgjHUgiEYH0yUTK2T32g 24LDQsBy7NKCUhVXLwKNHy7zW8JlGTFWp2f4vLioCWbJgIgjDT1sqqQR51YoxGTltFuG /NL+i2LxwtMt6VHJfn+I44Ibw9oqd8+ZDBDIKikpJKGyVGD9+g6C5t6B9z5x8amYhg6G OHUN/RBJn2sw/jCkXzq3YQrtdV9P/wwYov1ywqiFvHEkxKpcaY9M7q3g2Wf2I2vsJUsM ByKQ== 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:date:from:dkim-signature; bh=yGx0zil6yj1oC8ODCBCtzEQX/NhRvGXa2b8pEHdk1gA=; b=Pav4irSqzpPDYJFMUFyZZkBHrZ9CU3rQPm6K/rIlwfOFEK5Za6gk69RHZUE/MdXqiu 2Cxo5ksGM+mI9S2JJ0znTPWNV4jD6KCa/llK0ZB0O6o3Ed/8DU9E2v065AV8bt7juo5P /AND7WI24OasdLG+FKrgP+fBTTu9V/3qR9DpjJcn01G72XUcEVSEcJqC8NtYLFGcpO7U PmS8t3cMtcRBIh3rMRuUjZf7mGrJS7psy4zU13rXu9scxmhmLwrgoHbLfsTuT67/AesL +yYZGCa9s27sSJuJHzk16snyWRDaH2/VP0S0EvfZStVYaf07zAOKksh42Hqng1KtKkho jzCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lFOKjWte; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si23202791plb.350.2019.02.21.00.54.04; Thu, 21 Feb 2019 00:54:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lFOKjWte; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbfBUIxh (ORCPT + 99 others); Thu, 21 Feb 2019 03:53:37 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46372 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbfBUIxg (ORCPT ); Thu, 21 Feb 2019 03:53:36 -0500 Received: by mail-lj1-f194.google.com with SMTP id v16so23256202ljg.13 for ; Thu, 21 Feb 2019 00:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yGx0zil6yj1oC8ODCBCtzEQX/NhRvGXa2b8pEHdk1gA=; b=lFOKjWteRFOgtiQf50M8NxaZ55EHY9sVIXlwAbZcIyevZ/E2x5jWloSXpTcFLR0C0v srat2zbdFHSq1VIy/3dJF4FXyZ8QNXjAtstWuDXjaxzgA04YSA9sphtMGZVcrDj/g2/b GoSCGfKBZCpyfaI2G6RNSFV18ra5SDwcpwpcD1fRd7kOggeLIYaq6c0/y5/BGjKluKY1 TToOLSJYWIfU8MjgxvCwaMfD/hIaLbYV+Goq/LnGqzH1luttTNfDILTvIKt2/D+BBaHU gUCwwGUnh19V7ej/jP3M/Qdy0Lle/MJDxcC+XHXvYSgpZGITkzwTOke6nvnqiJ1TJFSN UBQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yGx0zil6yj1oC8ODCBCtzEQX/NhRvGXa2b8pEHdk1gA=; b=DnpraME0nccoP339UwB89t9CWcQ2UnOaF6hIj2wGnBJ+u+b32B4me6oiqDY2JiWhbW 36Cc5rcTkVIu0SUUO6aNPIR6JQJgEO2OtjICnU3gHL6x2XaHStFEceC7FwQ9rmqcCrrE +C+PLERRldKCX+HRumvL+YlIXo8WMMKGFNgQCv8iopEFUV3jHjfg7AOtzBEg2GzxIh1C RD08Ygj0ox1xAzokkyRoXxQ7aydN+ssLHZwue1HxyC73VPglrbyqa5VlNlsfROjs7JVR QYv/wF4NylGAQ11Ce67ph2ds/R8yf38Q4aTMEtLdoKuA2JePbMKeKoP4oUc8I/QM76MX Kvpw== X-Gm-Message-State: AHQUAuYk3h15zHwchDGE4EMmj8FLU2sPNy1AzqZ5pECDx+BsXastsNmk ng2c5sbEKEMhr4NIfqldDis= X-Received: by 2002:a2e:2d11:: with SMTP id t17-v6mr23215205ljt.159.1550739214373; Thu, 21 Feb 2019 00:53:34 -0800 (PST) Received: from localhost ([188.162.52.7]) by smtp.gmail.com with ESMTPSA id d70sm6062852lfe.14.2019.02.21.00.53.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Feb 2019 00:53:33 -0800 (PST) From: Yury Norov X-Google-Original-From: Yury Norov Date: Thu, 21 Feb 2019 11:53:31 +0300 To: Palmer Dabbelt Cc: yury.norov@gmail.com, andriy.shevchenko@linux.intel.com, akpm@linux-foundation.org, Arnd Bergmann , dmitry.torokhov@gmail.com, keescook@chromium.org, willy@infradead.org, mpe@ellerman.id.au, linux@rasmusvillemoes.dk, penguin-kernel@I-love.SAKURA.ne.jp, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/6] lib/test_bitmap: switch test_bitmap_parselist to ktime_get() Message-ID: <20190221085331.GA2666@yury-thinkpad> References: <20190220142048.GA20929@yury-thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 20, 2019 at 03:10:44PM -0800, Palmer Dabbelt wrote: > On Wed, 20 Feb 2019 06:20:48 PST (-0800), yury.norov@gmail.com wrote: > > On Wed, Feb 20, 2019 at 03:52:36PM +0200, Andy Shevchenko wrote: > > > On Wed, Feb 20, 2019 at 03:51:01PM +0200, Andy Shevchenko wrote: > > > > On Wed, Feb 20, 2019 at 11:37:03AM +0300, Yury Norov wrote: > > > > > test_bitmap_parselist currently uses get_cycles which is not > > > > > implemented on some platforms, so use ktime_get() instead. > > > > > > > > This sounds like a fix that should go first in the series. > > > > > > Ah, okay, it's already first for test module. > > > Perhaps Fixes tag and actually one or more examples of such architectures? > > > > Hi Andy, thanks for your time on it. > > > > Only arm, arm64, openrisc, riscv and sparc64 #define get_cycles. > > So IIUC, others take stub from include/asm-generic/timex.h. > > Should we (RISC-V) be doing something else? It seems odd to be in such a > minority here, but we do have a ISA-mandated timer so the get_cycles() > implementation is super easy. I think you are completely fine because you are one of those who implement get_cycles(). get_cycles() is the problem for those who use it in generic code because their code surprisingly gets broken on some machines while works OK on others. This is not a problem of any specific arch. For long term, we should inspect the non-arch code and replace get_cycles() with ktime_get() where appropriate, and avoid introducing new get_cycles() uses. > > sparc32, xtensa, m68k, um, and in some cases x86, mips and nios2 > > provide zero-stubs explicitly. > > > > Yury > > > > > -- > > > With Best Regards, > > > Andy Shevchenko > > >