Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp705826ybz; Wed, 15 Apr 2020 17:08:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJYDCNn08hs0KT63Weg1pw2q/AmbRYDXpJtMht2jfww3w+SjyqNqRiGOnCfbnZHotmarC2h X-Received: by 2002:a50:cf05:: with SMTP id c5mr21651327edk.330.1586995702379; Wed, 15 Apr 2020 17:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586995702; cv=none; d=google.com; s=arc-20160816; b=zJKv448asWXq02SNvhFipBRK3pEEwrRgS94VnMMPmPbOouQZAjo55KrWtKKGmcKL17 I+KguBaSWGzJvR66ZP3DBlS1o+FlIuQdzyHCFkQLgH0oMH4tzYrU5OlPVE3sXIVsbbpP cRyDPy4Evu2MjHsWLnWTxrxBZ/c0//CbDFJRuIcjq0M0uTBhqGJdqltq0g1O4ikn9jJx 4DQdYqEXsneaSdUiYHEt1J/swieXYTlYrgRFQRlErlZKc2pBuMYwz6gkuF6RvFeB0J9r dM4Wy5/34UP0q8I447XxQdKTuCGy3VhRynEdxvFSBg/31g/5vFIUEZhMHF7+Sf3615hC cDKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VoVfmxYHYrGT8FRKsSsoJto7pKs3GSxuLHxpm5XKHFU=; b=m03MI7RZkQbXPG+oyIYm+BYitFvbLfGCcHjC01VbRE7f+LxM72MzOgqpE0FMGCeTLS vzooyBcJNUsujXpJfk6rviB+WcOYopsknSIBGdgzwaukBf0A/HZj1NfOAmQh7vsuqWts 8pmP30S78zxnyQ39leDjhgwVsWtWQ7Z5DVQMKJY4eqyf8bfo5iltnH8L3Xtoeo4woGmw l4Tpmb2OWKVV+gDsQh0sWEH5o/uTnZqX/G9T3pJwe8trZSIPW6ITsKDN8tk4G/SAxeFk ajotUY3AaxkRBZHy3Cq4R7vt/jL4fIRfqc+dIrJ2lIPKQarMOAzFFbpnLEtpGYoX6kXd 5t6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gae2fyGY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si1504332edr.432.2020.04.15.17.07.58; Wed, 15 Apr 2020 17:08:22 -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=@gmail.com header.s=20161025 header.b=gae2fyGY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2636303AbgDONyR (ORCPT + 99 others); Wed, 15 Apr 2020 09:54:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2633539AbgDONyL (ORCPT ); Wed, 15 Apr 2020 09:54:11 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22785C061A0C for ; Wed, 15 Apr 2020 06:54:11 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id m21so1517860pff.13 for ; Wed, 15 Apr 2020 06:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VoVfmxYHYrGT8FRKsSsoJto7pKs3GSxuLHxpm5XKHFU=; b=gae2fyGYNKNIW6QFLLg6S/zYaJs+SzKeTKP5xOkozklzZ3AacLhlprRumbF3uiWLOc yUQkg4FmVVeVhuUbqu79kQh9OtJvjE/Fd3w+TdqFUsxnzwMRH9Exo1pCvrkgXr7XW99F 2x9DRcTEZA2GXaKRhbId0b0tAZGBzwuWABJvDy/zpblHoAIsoLXpvOzXBGrpNE3Yqw/M JqkSP7+zYeHUx4Q/ujWfpbKCvtEoZsaAyeMM77SZb0mJTL6dOIwGFIWfqFz98yRL2BcF +N6SU7lWhfDX9Pq0/xtro15w0XIR1+no/ycot5SnPrRM0yiky3BiwJV9q3gxlgVHUwbe 9Xyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VoVfmxYHYrGT8FRKsSsoJto7pKs3GSxuLHxpm5XKHFU=; b=f9iluRxh3wzTv/x29lgF1HpJLvx2SKkPrTeoYbED1b1jJPDzlIPhDlhDDSYjrxk1nx rzpYXYB1VJrOeANDP4hU7ebol4LNijmsfRBn/o8xZcXDvA9NNT3flfE5s1e/LKs8gumq O3CoE/I9WWpl4lRcv+4JbCpdOniwwZxWGRscjhCcV2tiuhDrbUyFSuNdzjR6I/fSKkLp N7+KrEfaYqWUUV7P+8i74a99HrPMV7k1F4w8dYtwEKoYM10oH0qMtacXM0b7gAC/R6HU vO6kFRMECu2y4LlL6SpM+5k+4+5YL9eoaZJQQm4J3ZZoHB7Nmg6v81u6mpt7NzpH3Wwy JZMg== X-Gm-Message-State: AGi0PuaINmRj6u2vvibTA3LK4oA81xIQLe2dhRrGXmuu73iZC+ltPbfO N/litilY8SHg4VzUyq9dYq4= X-Received: by 2002:a63:c20:: with SMTP id b32mr10710890pgl.75.1586958850568; Wed, 15 Apr 2020 06:54:10 -0700 (PDT) Received: from localhost ([49.207.49.194]) by smtp.gmail.com with ESMTPSA id u18sm14109144pfl.40.2020.04.15.06.54.09 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Apr 2020 06:54:09 -0700 (PDT) Date: Wed, 15 Apr 2020 19:24:07 +0530 From: afzal mohammed To: Arnd Bergmann , Russell King Cc: Alan Kao , Eric Lin , Gary Guo , alex@ghiti.fr, David Abdurachmanov , Anup Patel , "linux-kernel@vger.kernel.org" , Andrew Morton , Steven Price , atish.patra@wdc.com, yash.shah@sifive.com, Albert Ou , Palmer Dabbelt , Greentime Hu , zong.li@sifive.com, Paul Walmsley , Mike Rapoport , Thomas Gleixner , Borislav Petkov , Logan Gunthorpe , linux-riscv@lists.infradead.org Subject: Re: [PATCH 0/3] Highmem support for 32-bit RISC-V Message-ID: <20200415135407.GA6553@afzalpc> References: <20200331093241.3728-1-tesheng@andestech.com> <20200408035118.GA1451@andestech.com> <20200414151748.GA5624@afzalpc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Apr 14, 2020 at 09:29:46PM +0200, Arnd Bergmann wrote: > On Tue, Apr 14, 2020 at 5:17 PM afzal mohammed wrote: > > + rmk [ Forgot to provide context to Russell - this is about implementing VMSPLIT_4G_4G support for 32-bit ARM as a possible replacement of highmem ] > > If no one have yet taken it up, i am interested in doing the work, i > > will sponsor myself :). i will proceed at a slow pace without derailing > > my other things normal. > Thanks for offering to help, it's very much appreciated. Let me know how > it goes and if you have any more detailed questions. Okay, i will proceed initially w/ things that can be done using qemu & available ARM boards. Right now no questions, i will probably be coming up with questions later. Regards afzal > I would recommend starting in a qemu emulated system on a PC host, > you can just set it to emulate a Cortex-A15 or A7, and you can attach > gdb to the qemu instance to see where it crashes (which it inevitably > will). > > You can also start by changing the functions in asm/uaccess.h to > use the linear kernel mapping and memcpy(), like the version in > arch/um/kernel/skas/uaccess.c does. This is slow, but will work on > regardless of whether user space is mapped, and you can do a > generic implementation that works on any architecture and put that > into include/asm-generic/uaccess.h. > > A second step after that could be to unmap user space when entering > the kernel, without any change in the memory layout, this is still > mostly hardware independent and could easily be done in qemu > or any 32-bit ARM CPU. > > Another thing to try early is to move the vmlinux virtual address > from the linear mapping into vmalloc space. This does not require > LPAE either, but it only works on relatively modern platforms that > don't have conflicting fixed mappings there. > > If you get that far, I'll happily buy you a Raspberry Pi 4 with 4GB > for further experiments ;-) > That one can run both 64-bit and 32-bit kernels (with LPAE), > so you'd be able to test the limits and not rely on qemu to find > all bugs such as missing TLB flushes or barriers.