Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4757354imu; Mon, 12 Nov 2018 16:59:06 -0800 (PST) X-Google-Smtp-Source: AJdET5cSr8aAAX1oa1kkcqOv8Yp7kqjb96E4h1hgK/o3OTzdsmSuloDcG39poQsPg1wuZf5CWnKf X-Received: by 2002:a17:902:d90c:: with SMTP id c12mr3070070plz.52.1542070745947; Mon, 12 Nov 2018 16:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542070745; cv=none; d=google.com; s=arc-20160816; b=ElIyAb+d8fn71Qpp3Q46JwU8JIiir4XbUFqloeH71dy7fuFTz1itlSdeBirkqRfTr/ IEtr6rEZg5KsqiF/B3HVreDSZfxjQKhA7eT6Jt22S8KWowDPACXtjcBPvYV3LhLaTNmu nUeYYqODneVVHa/XdbfrT3aWlBWhQrENelrtoMoyeeVNkHk0YCTrTqX4zfhN6Y4l1Ae7 CcRMJgIWVU2p3QvEvLFbjq2WWDtKpO3IftBvGhHPkShGhwAsUzvLCguMisSbhL6nYLVs 3tGE/LwgGfOjcmGDGrj3qFSSMyV24XCjWIsX8wjT/txt6t1wzx8nZtRVfto1NCbZvt6I 8uJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=KD/9Vojt8uWzRnXDH73JGzZJ0+cXGn1cqS+aSJOmut4=; b=ajZoEEmHwoK64ye7NC3HmXUWapvY3jAS+iU58SzfnVYv5cdMmAf34W0l+dnuDMD+QU AMx206x1GroRxSrZ81hB0DvvxLRZLdlJLQZR9MRoZrS8obs7BCbhLkqyfJBf7B48gkum 0cgP1kPXV09QyM8NpXajh+vHNbcrlnZolNQJk1ypim14a9laKuFH8M07t5SgSqdIs/fv xNrf7ZnN8sqNnGzRi5CCH26Xq3hQ1YnZ5JRSqiFUm/wZ6wt/K8C8mvvvUSLWG9TgmWFr 67QJ3LHPJ/5M2s3f2VeYDfh2Jcxm7MFsnYokW/8/qCCg+SxeIBzKbTVnUv9do0L7Cs8z agoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=GTHEUxqI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si16943076pgc.578.2018.11.12.16.58.50; Mon, 12 Nov 2018 16:59:05 -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=@synopsys.com header.s=mail header.b=GTHEUxqI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730764AbeKMKxi (ORCPT + 99 others); Tue, 13 Nov 2018 05:53:38 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:42382 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbeKMKxi (ORCPT ); Tue, 13 Nov 2018 05:53:38 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 18ADD24E069C; Mon, 12 Nov 2018 16:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1542070679; bh=JBAtCZKMhaaos5LoXb0234KyWwNHGgnu2qmzhcc175c=; h=From:To:CC:Subject:Date:References:From; b=GTHEUxqIfEyHe62Gff96TOAhqMUH6z8KlPy86N/UVY4XE08wULg7R9hzB4SKUoMty Gcazmm5NZHzLOiINlqLoeqaH0jlfOGnjn++g1ceZUIUfCEs3R5PbH4G9AE1kg9zON0 ARB8bPRAZc/+pW1zQfNIv7wUfmzHlZI3B/WZhZMYTGP0ka6JGYEkKyx6ZRYxf/IMgl SpeyJJxzMvOTE3dtW6o5Qkpj8LHwoSB3dQLT9K4iJtP6MScP+Y8eN+D+MAsMleXOdN j6sQsF3yASna4WSFSkhm5ZbtIcNWeYrglqKAh3fhdTJltCTDIJ9O4s9UpVEQ/WUKvR sVHsm3WtgivRA== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id 18D4B3919; Mon, 12 Nov 2018 16:57:55 -0800 (PST) Received: from us01wembx1.internal.synopsys.com ([169.254.1.228]) by us01wehtc1.internal.synopsys.com ([::1]) with mapi id 14.03.0415.000; Mon, 12 Nov 2018 16:57:55 -0800 From: Vineet Gupta To: Florian Fainelli , "linux-kernel@vger.kernel.org" CC: Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Andrew Morton , "Marc Zyngier" , Russell King , Andrey Ryabinin , Andrey Konovalov , Masahiro Yamada , Robin Murphy , Laura Abbott , Stefan Agner , Johannes Weiner , "Greg Hackmann" , Kristina Martsenko , CHANDAN VN , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , "rppt@linux.ibm.com" , "linux@armlinux.org.uk" , "green.hu@gmail.com" , "deanbo422@gmail.com" , "gxt@pku.edu.cn" , "ard.biesheuvel@linaro.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c Thread-Topic: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c Thread-Index: AQHUdVsG6LD9rqw+mkiEXoDtFpj/vg== Date: Tue, 13 Nov 2018 00:57:54 +0000 Message-ID: References: <20181105225431.24485-1-f.fainelli@gmail.com> <20181105225431.24485-7-f.fainelli@gmail.com> <05f56763-1530-933d-2ce3-3653ad4c685f@gmail.com> <04d6d0cb-8e60-88a0-061e-62c7c70024c5@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.144.199.104] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/18 4:52 PM, Florian Fainelli wrote:=0A= > On 11/12/18 4:40 PM, Vineet Gupta wrote:=0A= >> On 11/12/18 4:38 PM, Florian Fainelli wrote:=0A= >>>>> #ifdef CONFIG_BLK_DEV_INITRD=0A= >>>>> - if (initrd_start)=0A= >>>>> - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);= =0A= >>>>> + if (phys_initrd_size) {=0A= >>>>> + memblock_reserve(phys_initrd_start, phys_initrd_size);=0A= >>>>> + initrd_start =3D (unsigned long)__va(phys_initrd_start);=0A= >>>>> + initrd_end =3D initrd_start + phys_initrd_size;=0A= >>>>> + }=0A= >>>>> #endif=0A= >>>> The common code now uses phys_initrd*, and you also use the same in AR= C code, do=0A= >>>> we still need the initrd_* setting here ?=0A= >>>> ARC semantics was using them as PA anyways.=0A= >>> Yes, the generic initrd code expects initrd_start/end to be virtual=0A= >>> addresses, which we now directly derive from phys_initrd_start, that=0A= >>> should really be equivalent.=0A= >> So we can skip this explicit setting above - ARC arch code doesn't acces= s the virt=0A= >> initrd_start=0A= > OK, you are saying we could just have the generic initrd code do this=0A= > assignment instead of having each architecture do it, is that a correct= =0A= > understanding? =0A= =0A= Correct !=0A= =0A= > If so, I suppose it could be done, whether as of this=0A= > patch series or as a follow-up, either way is fine with me.=0A= =0A= If it is not too much trouble, I'd prefer this now. I should have chimed ea= rlier.=0A= =0A= > One possible caveat is if __va() and __phys_to_virt() behave differently= =0A= > (e.g: because of CONFIG_DEBUG_VIRTUAL or other things).=0A= =0A= =0A= Thing is, after your patches, we don't use the vanilla initrd_xxx in arch c= ode any=0A= longer. So this becomes just an implementation detail, which core code may = or=0A= maynot need and if it does, this needs to work already w/o having to set an= ything=0A= in arch code. Agree ?=0A= =0A= Thx,=0A= -Vineet=0A=