Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp3651420pja; Tue, 31 Mar 2020 02:50:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsA0T0odL7nlbwPYEy38T4LnfYpRpkYsqlpRoVTiwzv9SmI44TTlOLxXYV6nPT/WGpxNQhx X-Received: by 2002:aca:ab4b:: with SMTP id u72mr1537502oie.26.1585648227580; Tue, 31 Mar 2020 02:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585648227; cv=none; d=google.com; s=arc-20160816; b=Ywt00G7kMWUKzbpKBUurM9sk4I5/FW+ZM5kNE0DHyhYfQhddqBwc+AVbDRhLg11Hbl OuWCVqPRzxR2EcW63VZ+SWYn4CDRgrHLdED12f+2LJifFLpNn4wUSLLkFQxRj+WGfWbc sUsgbCUqXyfx+OCB0TBKIKkw0auU7DPZ24Je72Mj/eKBKaDTya3q/DLqaHzWgxYaTDL3 jBv0tc5Pzj04aLcgMdHbFX1Lu/MG3nQcJfA7kGrfer8Sv1XU+zLmqfAA3Yh5UsaNEOLZ /WIvHzo38h3/GIWRxKgk5icObHcRiSxPQqkLfIY/aqHkgjfT8C9dEQkKgjOyORr84+EC umsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=1wLMVDxa6PXQvBvY5Ssw+izceFt5diPMaqIezePv6AE=; b=t5Jvj9HOCO1dJJFdbu0yxas9L7a4qlnkQDSOYyWBfS6jIJ0fFyH/nOkJlh5xmbadvb 5/1BvZa6chxqAdwNMTJsz3wTtDP7Ms5gMJOta50zpOqptEAYDwwWkEU+d+zoE4+z8cY+ cZl3qlZ5Qy69gLry+CG0OkrP9OzCRzbvepXJv/HrWO7/EG5jaOgWL9FYn2qf976jvn1V 7DXUqoNopoE2lfv4pi2oK2ygROGXdDI+ocyyX/LaVvG4I+aXUhuXjCs5WGIg9Q3NsaHu 0PU0NVXA0kUuLmhVzc9q3ZKbGl2NLhRXKQMajkGE97STYEL9zsG/eOU9zMf6apef1L5m wmIA== 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 h7si7366705oia.277.2020.03.31.02.50.15; Tue, 31 Mar 2020 02:50:27 -0700 (PDT) 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 S1730397AbgCaJt4 (ORCPT + 99 others); Tue, 31 Mar 2020 05:49:56 -0400 Received: from 59-120-53-16.HINET-IP.hinet.net ([59.120.53.16]:14590 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730131AbgCaJtz (ORCPT ); Tue, 31 Mar 2020 05:49:55 -0400 Received: from ATCSQR.andestech.com (localhost [127.0.0.2] (may be forged)) by ATCSQR.andestech.com with ESMTP id 02V9XJJ1065696 for ; Tue, 31 Mar 2020 17:33:19 +0800 (GMT-8) (envelope-from tesheng@andestech.com) Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 02V9W6MH065446; Tue, 31 Mar 2020 17:32:06 +0800 (GMT-8) (envelope-from tesheng@andestech.com) Received: from atcsqa06.andestech.com (10.0.15.65) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Tue, 31 Mar 2020 17:32:58 +0800 From: Eric Lin To: CC: , , , , , , , , , , , , , , , , , , Eric Lin Subject: [PATCH 0/3] Highmem support for 32-bit RISC-V Date: Tue, 31 Mar 2020 17:32:38 +0800 Message-ID: <20200331093241.3728-1-tesheng@andestech.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.15.65] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 02V9W6MH065446 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With Highmem support, the kernel can map more than 1GB physical memory. This patchset implements Highmem for RV32, referencing to mostly nds32 and others like arm and mips, and it has been tested on Andes A25MP platform. Eric Lin (3): riscv/mm: Add pkmap region and CONFIG_HIGHMEM riscv/mm: Implement kmap() and kmap_atomic() riscv/mm: Add pkmap in print_vm_layout() arch/riscv/Kconfig | 18 +++++++ arch/riscv/include/asm/fixmap.h | 9 +++- arch/riscv/include/asm/highmem.h | 49 +++++++++++++++++ arch/riscv/include/asm/pgtable.h | 27 ++++++++++ arch/riscv/mm/Makefile | 1 + arch/riscv/mm/highmem.c | 74 +++++++++++++++++++++++++ arch/riscv/mm/init.c | 92 ++++++++++++++++++++++++++++++-- 7 files changed, 266 insertions(+), 4 deletions(-) create mode 100644 arch/riscv/include/asm/highmem.h create mode 100644 arch/riscv/mm/highmem.c -- 2.17.0