From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43FCBC43460 for ; Fri, 9 Apr 2021 12:46:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D764B610FC for ; Fri, 9 Apr 2021 12:46:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D764B610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 69C376B0092; Fri, 9 Apr 2021 08:46:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 64BC56B0093; Fri, 9 Apr 2021 08:46:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EF6B6B0095; Fri, 9 Apr 2021 08:46:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 379376B0092 for ; Fri, 9 Apr 2021 08:46:27 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F20DE1DE6 for ; Fri, 9 Apr 2021 12:46:26 +0000 (UTC) X-FDA: 78012801972.35.4AFE3C0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf06.hostedemail.com (Postfix) with ESMTP id DDC51C0007D6 for ; Fri, 9 Apr 2021 12:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617972386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f+xd8ydLnyzhrcApE0s32pZuwoI7owl2AW9EUlJO53w=; b=GaJWPoMglnlAgQCXI7OcXeO5TQahdIFieDJk2+/BCUK6nFnriICROpneTD0z6VJnPIlkQn D2R0+7jAgaoNTXeT2i3wqUIFOEt5JEL/f3DAAkkSc2uORsyMp33pcfxl3bNimmnzG/Qnzb Ih4VO0xRresXwV8X0lsEZRz0zCVznIQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-gNrwR-0SPUSqTDOnc5osug-1; Fri, 09 Apr 2021 08:46:22 -0400 X-MC-Unique: gNrwR-0SPUSqTDOnc5osug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92EB28030A0; Fri, 9 Apr 2021 12:46:20 +0000 (UTC) Received: from [10.36.115.11] (ovpn-115-11.ams2.redhat.com [10.36.115.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 618F819C66; Fri, 9 Apr 2021 12:46:18 +0000 (UTC) Subject: Re: [PATCH v7] RISC-V: enable XIP To: Mike Rapoport , Alex Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Vitaly Wool References: <20210409065115.11054-1-alex@ghiti.fr> <3500f3cb-b660-5bbc-ae8d-0c9770e4a573@ghiti.fr> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Fri, 9 Apr 2021 14:46:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DDC51C0007D6 X-Stat-Signature: ytxn6dtsm5ncfdz9n56ff8upf7r7b5no Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617972387-325545 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: >>> Also, will that memory properly be exposed in the resource tree as >>> System RAM (e.g., /proc/iomem) ? Otherwise some things (/proc/kcore) >>> won't work as expected - the kernel won't be included in a dump. > > Do we really need a XIP kernel to included in kdump? > And does not it sound weird to expose flash as System RAM in /proc/iomem? ;-) See my other mail, maybe we actually want something different. > >> I have just checked and it does not appear in /proc/iomem. >> >> Ok your conclusion would be to have struct page, I'm going to implement this >> version then using memblock as you described. > > I'm not sure this is required. With XIP kernel text never gets into RAM, so > it does not seem to require struct page. > > XIP by definition has some limitations relatively to "normal" operation, > so lack of kdump could be one of them. I agree. > > I might be wrong, but IMHO, artificially creating a memory map for part of > flash would cause more problems in the long run. Can you elaborate? > > BTW, how does XIP account the kernel text on other architectures that > implement it? Interesting point, I thought XIP would be something new on RISC-V (well, at least to me :) ). If that concept exists already, we better mimic what existing implementations do. -- Thanks, David / dhildenb