Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2999613pxk; Sun, 6 Sep 2020 23:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3uT5Buzchh2uQVwRvF4jIvzS59RZd2OK4oaoJeBNRXFH7OxvyERBUlyyinEeeeK5YWVeC X-Received: by 2002:a17:906:4755:: with SMTP id j21mr20076980ejs.228.1599459733139; Sun, 06 Sep 2020 23:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599459733; cv=none; d=google.com; s=arc-20160816; b=Vu4swPpNqPeDvDMKwRk504DOORmcm/daWc9AWF62ZbCQkJNol5m3ujelVGXDnJ6h+d RPOcYfvpaEhq7b4ywbHuSQkOSPWmIVr5THWhzlRpbhIGGw7tIfsLx9IQXSv+RWRJTuUU j8jSJ/LrHLuvOr8coYmgXYQfzulG8EPQeUIvjLpqWBnizV9u6h2hEf1WqF4kVLPRWm7R VsLQ1muZBP0Cth2ZhwyBszz5lmwX+S9874uT+mNrZT1BIlAPl82l0OS5xK5FK2blR2XJ ICGsPCYFstk3toXGFi73thpKXkugBPfptMsZ2rlWi6o75bfh/C65MDCup2J4FAt53Jsb H7zw== 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=154Xegxt5UnehHM3GEyDBwA2Y6/TT3SecFSt5D3NeXM=; b=zwavEpVWBUdxZ40HMni/aC4wbtjHDrZl3tm7ivUmTc8GQZMTURNnRsi619Rmyc53/s 0sPOYR11/rH3l1ymwksJn6S8g+s2azOUPdl0EpnwEkFyOWP9yKN3U3J5pm1ZSAWpkfCe RnUY6U4ATd96J+s8Fptox52h/+j6n7s0FvkGykvuvbCtuPLbqfcng25RA2337bfLi+92 2gbxMpy06FVt1wdYZqrgHrLOXg+jDN2Lssm3ioVHI/d0fQNkXyMhl9LmF91OfhMbGVRr M4QpVZijiHwndtOzJEoqjtQ8LsDtP/7M4wHv1c6CRdc8g/d/G4yyrg/aJW/TPjUj2cfR H8fA== 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 g11si8803155edy.476.2020.09.06.23.21.50; Sun, 06 Sep 2020 23:22:13 -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 S1726384AbgIGGS5 (ORCPT + 99 others); Mon, 7 Sep 2020 02:18:57 -0400 Received: from verein.lst.de ([213.95.11.211]:47760 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgIGGS4 (ORCPT ); Mon, 7 Sep 2020 02:18:56 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 90B7E68BFE; Mon, 7 Sep 2020 08:18:53 +0200 (CEST) Date: Mon, 7 Sep 2020 08:18:53 +0200 From: Christoph Hellwig To: Anup Patel Cc: Palmer Dabbelt , Christoph Hellwig , Anup Patel , Paul Walmsley , Albert Ou , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" , Linus Torvalds Subject: Re: [PATCH] RISC-V: Allow drivers to provide custom read_cycles64 for M-mode kernel Message-ID: <20200907061853.GA19038@lst.de> References: <20200904165709.GA32667@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 11:05:48AM +0530, Anup Patel wrote: > Your patch will also break if the SOC specific timer has a 32bit > free-running counter > unlike the 64bit free-running counter found on CLINT. > > I guess it's better to let the SOC timer driver provide the > method/function to read the > free-running counter. Seriously, build the interfaces once you know the consumers. Don't build pie in the sky interfaces just because you can, because that is what creates all the problems. And of coruse at least for IPIs which absolutely are performance criticical we need a standard interface (one that doesn't suck as much as the SBI detour with the four extra context switches). But I guess I have already given up on RISC-V because the incompetency about things like the irq design are just so horrible that it isn't worth bothering any more.