Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2843520lqp; Mon, 25 Mar 2024 10:45:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwoYXMlE9bRXjEWgSKzhShWBhvwBfr+z9tW7zQ19dOVj7cKiOv85snzp7I8mY7ZIoTLg+frDn08ufEhigK/98DSUqI5xck8G+2F2127w== X-Google-Smtp-Source: AGHT+IFNdE9hUCs6EoFBaigVKF5GO21r2mued3Yd4a5ambtD3Gc2opkLjx3TPtYRloyD57cLBhYr X-Received: by 2002:ac8:5ac4:0:b0:431:5241:2f14 with SMTP id d4-20020ac85ac4000000b0043152412f14mr551190qtd.16.1711388732070; Mon, 25 Mar 2024 10:45:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711388709; cv=pass; d=google.com; s=arc-20160816; b=MBVlXkrS4VK7vFv8erb7qj/v2mx4xFokW4QRo1GBqqqE13l3mhbxza0S35rix2/YAY xZF5hudu9af7Y/zuTUXciKeVF6yiZ7y/UhYwAquEte9UvD69fttPHHpqPY70ZeVomwA9 tuJqwzcNBLmXLar0NdExAA2hn/+rbguXQgRfYF7G6jsm4q7iHE91Fvg2M1BU/6E6/XF1 tE9BFhm55gXsYmAGZgXCpGMVcBTlkEBCfqas+F45f2/M+lL+y2JQCUpCyweUPvsi3U7D QW/P6QScDdiFgWa6Gteq2i+e42OQNDOkoDvmmJ6sBJ/CVz5lMJAEfKQHPlbx/Ntggswy isZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=mM3Aek+lFZliT/6oGDzRAoNmH5d7DJUIvvvkDS/u/Os=; fh=m+lkMSgpAsPrsBPjNkIveMqClHfEKCUqtpjmyG590AA=; b=Nkgk6LDQzePhq2xRQkebRLsU3fkzTa/wb2rxGHqdFSXsNNwmuz+Fewj5o1wSmbOUuL UN7ZKqbxAuQGm3StpaqWFivV9CayVwn7IbGpYyzLyTrHYAlfmT8Qv4oJlrmyR3e65VaQ YBipyQ8Wb3Qfehir17GxZwI7svJGy0wa/so7bKfGIUrtqqcq4sQkjwWQzej5DHPV7PIA FmjfjL7P6YaHJFuvuQ+FS7vjj/utoV+qfah80QpoLRXnB9MkPjQlQ1+QJaF3dkDwk9J8 lkI+lFBCyvJ7ztUkpgmz1M6CGlAXuHciVDaS508vGEyfe7bEAsni/JwzTfkDAxfzth72 MJaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNkwfSJE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l13-20020a05622a050d00b00430f04b686dsi5693118qtx.416.2024.03.25.10.45.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNkwfSJE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D7011C3F4E5 for ; Mon, 25 Mar 2024 17:45:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02FB94A31; Mon, 25 Mar 2024 16:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NNkwfSJE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B2531C36 for ; Mon, 25 Mar 2024 16:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385617; cv=none; b=tpxeWXEFE4YszgtmMFQdU4cc1JpbDl4wnRtTSg8PRM/z9ozKHINDS83PgoXZ/pTY0oT6m0ZklarAT0Kc3GGY9Orwy85mXyx0r9z57nO9qOId6ezf1Zf1fQrYfes0hBimAju3cw32hhCSppw6tfbdeAWYhd+BhzES9fXGaT/oNyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385617; c=relaxed/simple; bh=WannNMe3KRyek8xiVd2Lz4G8sK7Q+T+16cLq3DmwwLY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n+h1N2vQ3VrtvmP4ZsaWITZFruIsDCRAOs6MtRpH7D0I8QkLJfCQgACtWH725eEnis7cyxmE0CPnYxd5C0GFyiHHR3CkxL1dpsKopiBql43YgDI3S8uXSuPw/KDDS1gQfHUKaRveIUN5Cikc0hHL4Xc4bmfvhW1xX4qiXci4Nrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NNkwfSJE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14753C433C7; Mon, 25 Mar 2024 16:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711385616; bh=WannNMe3KRyek8xiVd2Lz4G8sK7Q+T+16cLq3DmwwLY=; h=From:To:Cc:Subject:Date:From; b=NNkwfSJEyxR2lSdn0xvBDIKqvHePa4ALFOJx27WKPZ18OXsNUL15K1RStdQpEqjnn dqh8zQjpyHZCvtc/xHKm8uAUDMpKy5TuN9/sZ8Q1lyb9YdXlwq6hKHEHTDhAm1tDfX ijOcSX1Up+8aRWTh7vneNw+makOWEqX5gTnmbpA7lS2oBXiKBNbGkiQakSgPHsiWfL P2Jv01ZU+1/bLblzTvNrJHvVOU1wMD4BNRpJxCGt1AQajCplrb976zH4Uv598uMAEA +zYd9bndRQ37zcSBlmohp48Ops3f96nIKv/M1xwpJTr4C0tM3oMr6GqcwnLBR5FjNM EtYlFF5Un9RRQ== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] riscv: improve nommu and timer-clint Date: Tue, 26 Mar 2024 00:40:16 +0800 Message-ID: <20240325164021.3229-1-jszhang@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit As is known, the sophgo CV1800B contains so called little core, which is C906 w/o MMU, so I want to run nommu linux on it. This series is the result of the bring up. After this series, w/ proper dts, we can run nommu linux on milkv duo's little core. First of all, patch1 removes the PAGE_OFFSET hardcoding by introducing DRAM_BASE Kconfig option. The following patches try to improve the get_cycles and timer-clint by always using TIME CSR, because Per the riscv privileged spec, "The time CSR is a read-only shadow of the memory-mapped mtime register", "On RV32I the timeh CSR is a read-only shadow of the upper 32 bits of the memory-mapped mtime register, while time shadows only the lower 32 bits of mtime.". The last patch adds T-Head C9xxx clint support to timer-clint driver. Jisheng Zhang (5): riscv: nommu: remove PAGE_OFFSET hardcoding riscv: nommu: use CSR_TIME* for get_cycles* implementation clocksource/drivers/timer-clint: Remove clint_time_val clocksource/drivers/timer-clint: Use get_cycles() clocksource/drivers/timer-clint: Add T-Head C9xx clint support arch/riscv/Kconfig | 8 +++- arch/riscv/include/asm/clint.h | 26 ------------ arch/riscv/include/asm/timex.h | 40 ------------------- drivers/clocksource/timer-clint.c | 66 ++++++++++++------------------- 4 files changed, 32 insertions(+), 108 deletions(-) delete mode 100644 arch/riscv/include/asm/clint.h -- 2.43.0