Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4118541imu; Sat, 19 Jan 2019 02:47:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN6y0KLecRgn8YfvdQxeTfD+KMeDhzx5fQ7ZYNdQ50WWDq9n/6rfYgwavpelQCKyPg1VjM5C X-Received: by 2002:aa7:8286:: with SMTP id s6mr22471656pfm.63.1547894832821; Sat, 19 Jan 2019 02:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547894832; cv=none; d=google.com; s=arc-20160816; b=mdjlcM9cwr1nwGXAMbfYQilSJSI94D3XSQsLJAT+d5KJEL0NZVBZ05jOWDlcdkv65/ eIKJshy6KGDV/FmB+raYiZbR0jAlcHDu7mAiNMF/7WGvKsQUXQn7JpJlc2DvckwOiuXF Z8kYscFFSQfuCnSJlpm0I+2t5VhZtc2oX3cFucV6xbv3usuu9D3W1f0+vXnUjB9J9HA6 oX92GOPVhqVd1R4Sl2voFBNNx2uiDY+wBm1EQrHTbb34oymobdd7CgXPcmIOXywvO1bQ yyNJpMHEPSu9PW6X0eV6Y3Dn40JWYnZqjUq/q823Bb+o9XVUQh6PmGtnZ6GkKewWT7tn khAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=X16utiK3fu3/GY0eUWcDWtc3d7tcknqv+WUU1uN/1tM=; b=ZeaTYSYKF5KK+Mf+ffIa0LFt3pby2BDhz9gbnFWzWTg/hBx6IUFFfXj+AjabdDPM57 WPApKZOCZaezTidh5+Q5KKgdVfaLeEOSAf2KIPbzlGUDeygfoONWJHgMigEfFTwYqebu O22+A56JaVR0+rh1IBH8dOsgRhEipItlj+BVJmu8KwUmcDBnLvY7l7S5GDnsQB+pdtSQ YF/tyYIZgiIL9Cz0RJxultT9a2WqEAWpkzT7UB7rrHge+AjFrp25Uf5AHq4bYLF/w5e8 5wL5X78qwYRP7AKfqzfQfUkvZSJRvyciHTZWDWOmPUwDoEmtzgbXtF6lzMGaCKqTglv2 KD3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=b5QJJpHO; 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 p3si6670517plk.424.2019.01.19.02.46.54; Sat, 19 Jan 2019 02:47:12 -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; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=b5QJJpHO; 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 S1727855AbfASKpC (ORCPT + 99 others); Sat, 19 Jan 2019 05:45:02 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40816 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726306AbfASKpB (ORCPT ); Sat, 19 Jan 2019 05:45:01 -0500 Received: by mail-wm1-f65.google.com with SMTP id f188so6680723wmf.5 for ; Sat, 19 Jan 2019 02:45:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X16utiK3fu3/GY0eUWcDWtc3d7tcknqv+WUU1uN/1tM=; b=b5QJJpHO4/3+5TYJj8Rx6qnnl4Kc24RiqlqHC5w7N9V6JSo6Tfo56XrHVI2QbT4XqP IQl/nf5bvHjAmRbiMdbqZH8Y+a3GtsMKObz++LKJqoQ6UDIl8C6iBXkDXWd7QftlsvWf KTqTKfAX4HnS2znLI1giEPSOJM6F1g/6kIsG0K+qPK+8QjV99Vi7OuSMYIzvDaM/aD5J k0a9IyDlV//hJM2RozjYkNK/XObIcBVWkhjpbKkQezmwYmxe27AQcIzBLzK98KtwV5zM 95mM1X+8pxxov4frGR9iQHQhYXzI+NSOYWxHMVhrSFbLf0mxU9NxDwzqm0T13WcdPzph I6FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X16utiK3fu3/GY0eUWcDWtc3d7tcknqv+WUU1uN/1tM=; b=QOdHd24z71UiVbfQT/rqL35t6/8QAb045+W1VTOkLO6JEPSNZy0Yg3aH2BYAy4Tu1o rEh9SNR7yfGpC4kr9y3l6uw0fXsFg/je2wVhlviHSbJnWbR3PBAGIzDe/qLXsNVV+TVE LMlrMeBCweYDp5re3r4n20p36S+eewpiK608S8nQXJysLijoO9bEv0PBi272g1immkeq pt8wkTnIM24859RZp9RJjH0jWGBOM9PQg6jeWeLU/rJqY/aisnXO3Luw8vYtpcDr6F9t WzFeGPifA3ht9aH5NJ1D7V+RBN/PKVpnse7HaVlowv/Qz6akLURNS44VfrIf1NhqOvvH 4w+g== X-Gm-Message-State: AJcUukfuD59Nj4b//DQyyCGEfQ2fSZK7P02iupKaAoC09Y1ulsJoU3Ix CxdNaINNgrg9XCSf6FLI9+4f9KlYm07F28OsvzQ6hw== X-Received: by 2002:a1c:a3c3:: with SMTP id m186mr18409123wme.16.1547894699912; Sat, 19 Jan 2019 02:44:59 -0800 (PST) MIME-Version: 1.0 References: <20190107161047.10516-1-anup@brainfault.org> <20190107161047.10516-6-anup@brainfault.org> <20190115134746.GF13216@infradead.org> In-Reply-To: <20190115134746.GF13216@infradead.org> From: Anup Patel Date: Sat, 19 Jan 2019 16:14:48 +0530 Message-ID: Subject: Re: [PATCH 5/5] RISC-V: Implement compile-time fixed mappings To: Christoph Hellwig Cc: Palmer Dabbelt , Albert Ou , Anup Patel , "linux-kernel@vger.kernel.org List" , Atish Patra , Paul Walmsley , linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 7:17 PM Christoph Hellwig wrote: > > On Mon, Jan 07, 2019 at 09:40:47PM +0530, Anup Patel wrote: > > From: Anup Patel > > > > This patch implements compile-time virtual to physical > > mappings. These compile-time fixed mappings can be used > > by earlycon, ACPI, and early ioremap for creating fixed > > mappings when FIX_EARLYCON_MEM=y. > > > > To start with, we have enabled compile-time fixed > > mappings for earlycon. > > > > Signed-off-by: Anup Patel > > --- > > arch/riscv/Kconfig | 3 ++ > > arch/riscv/include/asm/fixmap.h | 52 +++++++++++++++++++++++++++++++++ > > arch/riscv/mm/init.c | 32 ++++++++++++++++++++ > > 3 files changed, 87 insertions(+) > > create mode 100644 arch/riscv/include/asm/fixmap.h > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index e0d7d61779a6..66094aba9a59 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -86,6 +86,9 @@ config GENERIC_CSUM > > config GENERIC_HWEIGHT > > def_bool y > > > > +config FIX_EARLYCON_MEM > > + def_bool y > > + > > Can you please throw in a prep patch to move FIX_EARLYCON_MEM to > drivers/tty/serial/Kconfig and only select it from the architectures > that use it? > > > + * fixmap.h: compile-time virtual memory allocation > > No need to mention the header name. > > > + */ > > + > > +#ifndef _ASM_RISCV_FIXMAP_H > > +#define _ASM_RISCV_FIXMAP_H > > + > > +#ifndef __ASSEMBLY__ > > As far as I can tell we never include this header from assembly files, > so this ifdef should not be needed. Okay, will drop #ifndef > > > +/* > > + * Here we define all the compile-time 'special' virtual > > + * addresses. The point is to have a constant address at > > + * compile time, but to set the physical address only > > + * in the boot process. > > + * > > + * These 'compile-time allocated' memory buffers are > > + * page-sized. Use set_fixmap(idx,phys) to associate > > + * physical memory with fixmap indices. > > + */ > > Please use up the available 80 chars per line for comments. Sure, will do. Regards, Anup