Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2953667pxj; Mon, 14 Jun 2021 10:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBvMvECMYJuRrXivyW1v7IBtGPUhU/hUJTUmpwamLoZx0iYCPUxnlcq8vBr2svq47Xq7kk X-Received: by 2002:a17:907:3d8e:: with SMTP id he14mr16901015ejc.178.1623693216214; Mon, 14 Jun 2021 10:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623693216; cv=none; d=google.com; s=arc-20160816; b=i8cyLnHB0sWTPu442NJB50DAsvhgABg0DY1yMedWlWSgxP96cITkc8tZxwuE2ue5bT NRm8Fp2kMY0bZ65HTMnB4f8dZt3+hLFDLeqQe725Gf0ln21fUfKHCHXv0QlbtuCU2SpQ SHem/EE7uwGLEtA1xzPHGi/TxCgu/4fAS+yT255QhRiXFvtFMVvyektQgrt3ARmUZmhl YoB0LIGeuepQ2qWILDia6t81cRvldV3qUIV+Ham//t4GhsYVYbSwz/Rj7pS0ihEGdybB coo4QNbhJ/LTNGKVG5TP1xSP0nL5SsE3N5cz3kbKKAY+e5SzmUtKL8BvqPUGcsYZg1VQ j/0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=rn/EN2RqBg8TbNlz8V3mXZhHUZelkAYk9jkiOew/PqQ=; b=Q6hGpwQCtvuTrlaJY+D03GhNTqKLT2C1PN3qJ9ud50rUtXkV+nqQfrK9cEbnbeVmSX mBiS5I2dPIGlzGinF1IU/DfxHC7YvIJKxoakoyUSmakRcaJVHZ7S8Ud3OpARrYYiOPWo 7TvqJl5QizDOVGCAqXuCARGq9YmnGgDWD3J8kSCUraWAckitD1vURM3+h1PWWeIvmPbf SLvaPIjFuMQoVoQc8xB+JOVjrgopfMFTAD68AsDAdqQGXm1hSorI1u+SWlteAPltoWV/ y8jbCsl7dWJI58RK80imdtMr7Np1GBqkOAuBbaNEzFp7onAFv0657MiyvHyWm1fzhjFo 41dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CYV9czSk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si11181095edt.8.2021.06.14.10.53.12; Mon, 14 Jun 2021 10:53:36 -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=@kernel.org header.s=k20201202 header.b=CYV9czSk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234150AbhFNRyF (ORCPT + 99 others); Mon, 14 Jun 2021 13:54:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:35992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234031AbhFNRyC (ORCPT ); Mon, 14 Jun 2021 13:54:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 827DE60FEA; Mon, 14 Jun 2021 17:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623693119; bh=w6yEl6RdNBce/fM+QwtQ8kaN8ZBcaj88bvIJYqQiqWE=; h=From:To:Cc:Subject:Date:From; b=CYV9czSkjRP4LdvMU9VxTMqEGCe5n1d/EBSjIvR9gHcyfwJuSRTkmVyYzxr0mPz6T FIkdFELsy/LoTBt/VXXTgJwhKsOk+cUGUH4yXFcIOR4n3I3TzN8iLE7KIDNb85vGLl W+ou9zfbWXYBzbPUnA+PStAK/B8qvyCt2O8SQDuOOFucnuWmHel8OcCBPIR7UhP0DV mXMnXjNCSs1G9gkKBwsBkzsG292IZnCsxGDGikAyOjTvUgeuY9bxtQ/Ipb2QHQjVpy LaxuWv6ITwYHAf8RY8ckaF4CYe4YehO5MntIA5z8cPL6sxLW0EI8ZJEJwiBX8+n6jz rqN/opCt1ylLw== From: guoren@kernel.org To: guoren@kernel.org, anup.patel@wdc.com, palmerdabbelt@google.com, arnd@arndb.de, wens@csie.org, maxime@cerno.tech, drew@beagleboard.org, liush@allwinnertech.com, lazyparser@gmail.com, wefu@redhat.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-sunxi@lists.linux.dev, tech-virt-mem@lists.riscv.org, Guo Ren Subject: [RFC PATCH v3 0/2] riscv: pgtable: Add "PBMT" extension supported Date: Mon, 14 Jun 2021 17:51:05 +0000 Message-Id: <1623693067-53886-1-git-send-email-guoren@kernel.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Ren These patches are a continuation of "riscv: Add DMA_COHERENT support for Allwinner D1". Compared with the previous factory-defined hardware implementation, it now follows the PBMT extension proposal. V2: https://lore.kernel.org/linux-riscv/1622970249-50770-10-git-send-email-guoren@kernel.org/ V1: https://lore.kernel.org/linux-riscv/1621400656-25678-3-git-send-email-guoren@kernel.org/ Changes since v2: - Change to PBMT extension proposal - Add pbmt in dts - Using img hdr for custom memory types moification Changes since v1: - Rebase on linux-5.13-rc4 - Support defconfig for different PTE attributes Guo Ren (2): riscv: pgtable: Add custom protection_map init riscv: pgtable: Add "PBMT" extension supported arch/riscv/Kconfig | 4 +++ arch/riscv/include/asm/image.h | 6 ++-- arch/riscv/include/asm/pgtable-64.h | 8 +++-- arch/riscv/include/asm/pgtable-bits.h | 55 ++++++++++++++++++++++++++-- arch/riscv/include/asm/pgtable.h | 17 ++++----- arch/riscv/kernel/head.S | 6 ++++ arch/riscv/mm/init.c | 68 +++++++++++++++++++++++++++++++++++ mm/mmap.c | 4 +++ 8 files changed, 149 insertions(+), 19 deletions(-) -- 2.7.4