Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1320512pxf; Fri, 9 Apr 2021 05:47:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX0WSc/PdVRfBYegSMNhP6ugh1UhBPSJ3Y8Y/swuPaKrYFTye+3oVdhoNw4Y8+4TReBTXu X-Received: by 2002:a63:f546:: with SMTP id e6mr13251435pgk.299.1617972467415; Fri, 09 Apr 2021 05:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617972467; cv=none; d=google.com; s=arc-20160816; b=lWC/PgEyeUMA0DdGeCLKnucdq1yX21a91poJzVuWLKxy0z1AYsdMUuLVfSjIwi7Wmg pPjFirWOUminRXVfWIo6GHk43reTz6ukMMgYfaU9V7eq9jM0N9mVBhMlrGNJ6BjBvz2K qqX6kO4R4Tq7Jgak27cmLORrEzXhoUDh75gSGr2aJu0esO7RbGhgb8qa3Pzfaa+iAu6s 4QzFBpinRZ0x7zS3+s1p/XuTcXdeM+lQy8La6G+PHiOb3uaYgM8epH7sXL6rEc9Bydv5 IKyD34otDRjO6HDGVcD7R1DDxdFjs0O+5anwPSaHm4b68fBFxH00uD4oXbfQIpL2wOPf 6wqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=f+xd8ydLnyzhrcApE0s32pZuwoI7owl2AW9EUlJO53w=; b=C1Q/oE25oZkfl6RlMeMNZ99enU2thHoaq2j7ggVfcVJsSaW78akcF8YEaZkh0nDMGb HimipBImZ8hjRXU1tCRAOUSglOaz4LsVO8c6nk57ouCVuuDoRkTohGRYvENhOuh2pd34 sMplZIzNWKJ5FntsIl47crZCBt6whbtxk1RwRpuY+fRAzYsaJADBmit9SoymKpaxHKuT 89OcLh16XSjGC+K6P2H3Q3dmvJUtg0rAje3pNuC9RJOGYImroMn3WnLu2KguWBdp/YtU 3L3ciN4iF8uIvzPkp3NrsWxMISVtdyR8d7uJCKfulMG7VOhw7Pebb2k16GtuJvQNoDQL eMBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GaJWPoMg; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si2580318pfv.323.2021.04.09.05.47.35; Fri, 09 Apr 2021 05:47:47 -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=@redhat.com header.s=mimecast20190719 header.b=GaJWPoMg; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232855AbhDIMqk (ORCPT + 99 others); Fri, 9 Apr 2021 08:46:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51100 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233693AbhDIMqj (ORCPT ); Fri, 9 Apr 2021 08:46:39 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> 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