Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp363681ybc; Tue, 12 Nov 2019 02:41:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwFTgOStoeK/mYOlUjAD4q7RaNF+RKEFbZiOZK8iUErAFoYs4eALGunVgBcGQHc9zemCRr4 X-Received: by 2002:a50:90a6:: with SMTP id c35mr31878060eda.22.1573555303234; Tue, 12 Nov 2019 02:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573555303; cv=none; d=google.com; s=arc-20160816; b=fcwwnyT46vXLlhyGHlHfz2C3gxEaku2DTYxZ9O4FY5KWc3yzzlx9A+3Zn8EKRnuXLq Xf1nAzcU1qwRsFQlAKGnBORMMXUVm+u29gYyvUBcjaJR30WhCIiIm3SvhJ5DaihRk4p2 a76uYv66LbkUuzPSh9E1nJ511VO0Uc1UmFWum7UOwMBtZAJYuaan9qBHBt2lyZKKEfzM XC/1kSUhuplLXfTNCvlsyOh7RWNRcwqFv5KGf/wxDxsfGNRpvAJ5JKSNmo6W5Wbtlz6G fTWNMfyR3+PXH7hacQn+JovZnUlFSb+2itJj/EN+UsaMV+d0WLOF4VOygjHtBpdruAaJ 359A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=b82nyRQQRpo9NKDu9c0QNt8QXaLy58x8PDxF6X/KJNU=; b=VPMbcNG/cfIvu5Nt6S1+ML7FAF0vQdSG2QxgqnkJq+R+311o2snXdd8UCO4z0FYD/6 ZrBQZQBTiO0jdjXQbjeiXKM8+VVoHesZtHeherFrTT9wmqDEkZh6RM0XDd3Dm7MpDBzm ELUkLDzaxer1ubZMiLIu4TUjnpLR7NeVDLSGgmAp9queINNRz9zoUYXtrxx+DqiOk9Cd zdF8+3ziPsvpZSwSOYDxrmNbZA6l43A5ykd3XhcU17HO4DR5QZO1CvSW9O03j5Ilq9RO b5MLrcHATl0eXCU0uc5M1DmUlM59w8r87DrFih0NQBobbPIutTU7f/cPBq1Ml/Up1Z2I lizw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si11779887edp.264.2019.11.12.02.41.19; Tue, 12 Nov 2019 02:41:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbfKLKjP (ORCPT + 99 others); Tue, 12 Nov 2019 05:39:15 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:33244 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbfKLKjP (ORCPT ); Tue, 12 Nov 2019 05:39:15 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iUTZm-0007zU-0Z; Tue, 12 Nov 2019 11:39:10 +0100 Date: Tue, 12 Nov 2019 11:39:09 +0100 (CET) From: Thomas Gleixner To: Christoph Hellwig cc: Palmer Dabbelt , Paul Walmsley , Anup Patel , Damien Le Moal , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH 06/12] riscv: add support for MMIO access to the timer registers In-Reply-To: <20191028121043.22934-7-hch@lst.de> Message-ID: References: <20191028121043.22934-1-hch@lst.de> <20191028121043.22934-7-hch@lst.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Oct 2019, Christoph Hellwig wrote: > When running in M-mode we can't use the SBI to set the timer, and > don't have access to the time CSR as that usually is emulated by > M-mode. Instead provide code that directly accesses the MMIO for > the timer. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Anup Patel > --- > arch/riscv/include/asm/sbi.h | 3 ++- > arch/riscv/include/asm/timex.h | 19 +++++++++++++++++-- > drivers/clocksource/timer-riscv.c | 21 +++++++++++++++++---- Acked-by: Thomas Gleixner