Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3091949pxk; Mon, 7 Sep 2020 03:00:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmYz8G9LXErmJskctpu0JqaGzAPtk9fEVEhnwMgY3kTcv/YH1UCCSjgBMr/6xMIXYxkKth X-Received: by 2002:aa7:da09:: with SMTP id r9mr21236505eds.7.1599472821853; Mon, 07 Sep 2020 03:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599472821; cv=none; d=google.com; s=arc-20160816; b=mZFIjZ+aAxw/L0k/pM4OK8ChsFogFzmPYsrPzzse3eWjNUmoFDXf64PpK8w/SDi3ej zULm8D+mnkz7teyzNft7+VaEd3LFRS52P10rsbBmjeiU9Kcpy9Md3jLXFZBPoDl22sgm huahutax9ID6h5XLgIlFLV+eLLdFixxs574OWLbLIEsiBCLlCxWJFg7FFxhvBnd0aa0R AcGu3sz0UZvdfF43lP7x4gSKFN1ML4NVYIs/N2/KWF0ZMHseG+wvdLdzQ+9683gYTbZ4 ghnuSmXeyK54IhO6QcXAsV0rUnQ7jRXqF0zwd4yF8KmrnbUevJB+F+dVnvJsDSYzEyRu Di+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c5DC9nZOly/sIshwJMs/T2M9xGwEixaZIQAAMhdaTd8=; b=OEXYhVO1vPrjf9wREesbEAVwSFeFfR40Q9AJPo3vRaGR3aVo1VVJ9W1ynK3Uqgwiaj HCVWHo+O57vhBbVednKYO0RRgBUECzCjIeFDOtTQS7g09hcO0g8lq/Lsa+40ssX/WGU/ Q92kdmNqH3F8R2fvb4dVRlZ18jnknh0CWxyuBDpFJz8lwiAksGV/A59agDZvr2NNC50t rFqOxLrvo7WVy39drEXIJjMpUpQBuLODmmIdsnv4dJSDDwn8gczbjyckJrYx9/sNM/c5 Afvc6LuVP2x9yr4aIRpJ7GtUZUb0MwNgRedcqW/ZZPLLyTsljIEwxONbqIIiNsSdURz9 rDnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Q9Ew4Z8q; 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 f14si9032918ejj.86.2020.09.07.02.59.58; Mon, 07 Sep 2020 03:00:21 -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; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Q9Ew4Z8q; 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 S1728381AbgIGJ7U (ORCPT + 99 others); Mon, 7 Sep 2020 05:59:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbgIGJ7S (ORCPT ); Mon, 7 Sep 2020 05:59:18 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FDA6C061573 for ; Mon, 7 Sep 2020 02:59:17 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id b79so13584281wmb.4 for ; Mon, 07 Sep 2020 02:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c5DC9nZOly/sIshwJMs/T2M9xGwEixaZIQAAMhdaTd8=; b=Q9Ew4Z8qiML0wcPyFpDAyE5dpHUOzyp540W51+cevWVCR86uUG0WM3UoGPOMrCzrdY i/B7wUL9G6iwwXzGVL/bq31OOpMm5DJ4n7oJjbejnbb6QKktJfkHIfpjtO2AEy3gYx4K pha94kU99hLIeq4c++tfUtg939fZT2efkzPxuPOHILGi7ci1b8AKeLHuGUwARbudSFpQ m4FC4mUwYNIa5u3RD0ksuO6SvW7DrJDrm0MjqM++v+OWPvqQ1TLmyVLX79NCB4kfuMzL iUeShqpbB51uBhrAXG2J2zDHW2aECCHGqzgHOaj5hGsnp8D79wCGgDOyp0mQs4NXBuqG Qk9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c5DC9nZOly/sIshwJMs/T2M9xGwEixaZIQAAMhdaTd8=; b=sG5cJpVduAy03ps3SYFR8KttAR97hpAYr041MMbl97Opfwhr1VlTPFSBOHRYkG6Oqb oDFRJJQQioh2C4//gMDU90jINxDpLMn/igVTrL5iIGy5puSKY8xmzbt6oJpQFW+HVO00 G2xAJrYRSml0TScI/La8maHA2LnVRSeiHhTQIk0IHUYPZemKE2fs73Bd7JoJrKu9UmT9 EsNgECTe75aDsvQNZaf/oxMgX/9Xr5SdSWBiAwtMOJ3sarAee89K0+TXaDF3XS6JJxjU q9Kx0zrjigv6TLf5I7/ePEtKrK+tKXWOPtpuGGg5MNkSzxTOMmguqYKmXDiOA5g7J+Q9 WPJA== X-Gm-Message-State: AOAM530YeOtxwssRvAV4LodXC9RpwVGVH24333ZmJKQMEP6hsUEFpyVE xbJ+5gRcpcA7Eu6jLcL3GPdLPfYYnDHFeXC05WLQkg== X-Received: by 2002:a1c:234d:: with SMTP id j74mr19248120wmj.157.1599472756116; Mon, 07 Sep 2020 02:59:16 -0700 (PDT) MIME-Version: 1.0 References: <20200904165709.GA32667@lst.de> <20200907061853.GA19038@lst.de> In-Reply-To: <20200907061853.GA19038@lst.de> From: Anup Patel Date: Mon, 7 Sep 2020 15:29:04 +0530 Message-ID: Subject: Re: [PATCH] RISC-V: Allow drivers to provide custom read_cycles64 for M-mode kernel To: Christoph Hellwig Cc: Palmer Dabbelt , Anup Patel , Paul Walmsley , Albert Ou , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 7, 2020 at 11:48 AM Christoph Hellwig wrote: > > 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. Most of us are aware of these issues. The SBI IPI call will eventually become fallback option once we have standard mechanism for IPI in RISC-V privilege spec. Until then we try our best to support all existing RISC-V systems out there. This also means we end-up supporting existing SOC specific timers and IPI injection mechanisms. Regards, Anup