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=-9.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 73AE8C41604 for ; Wed, 7 Oct 2020 15:29:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E014D21582 for ; Wed, 7 Oct 2020 15:29:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UAqjg46L"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="S6CgzTNl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=fluxnic.net header.i=@fluxnic.net header.b="XlBlIXP2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E014D21582 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fluxnic.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FXga57ZkVFDMIWiCbf+Vruw6foU0JHRE6c0rbJWaqO8=; b=UAqjg46LPXNNw9Bby4+4Fr3B2 aPO4ywudiGYlBFCLM3CKhMyy/MdtpDngJPJoDOhzbYy1cZAByhxVzNgd+KUk0quimHiv92aADz/qM tyK8YuLnogbPitruQ19RKNAj4MiMZfANdr07yoRQMitGdiXZFztXMOWG2Hpn3QpW2KTdeQlXgBOxf aSkIuga+jxWzvH32i6zDH5czEFIsj78nYnSVF+NM8/i+gWEZjSPVRMGUAivD0LfpXCfTU+MPTmHSa TPDwg+/K0BFWcNyaitRhbIk+2bZ3MIEplBfYgr5E108PL4Yj/njM5ugMttrBV1x7J2QfO0yKT4pL2 e/Fex1yHQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBMY-0003ew-SW; Wed, 07 Oct 2020 15:28:18 +0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBMS-0003e2-O7 for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 15:28:14 +0000 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 43F82EF8F6; Wed, 7 Oct 2020 11:28:08 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=QN4oPpo7r5AuHoDe8KoXoS/XYFw=; b=S6CgzT NlbqD/M7Zrk2gn3GgOKInldXbwNXtl6MYrD6SjHU5HtajwKVGZhrPHkl5A3VUZoD 7BKbOlW/mjPsZBHE8hyEiWmf65A+0QIvTKlioudLm1aPt3P46RQguuG4wVCnG9iI 4CistUVcK8rFVDXe6ZVbtfhaiWgTLVcBTTwfY= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 3CCCEEF8F0; Wed, 7 Oct 2020 11:28:08 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=L0TVhoL+DjICfRPi7Qr/tdqotjFAUziXvn92bdNNe+s=; b=XlBlIXP2v1cceiUL5tYyRJK6AqSkVHhma26EmD2OU8c6JOVMqfHFEqM+jwLUij/8SfQltlbKZS84x5gojdUJS736Ax+T9SvyXNcUGtqtiFBIXh9bnpE1PmbGIi/cI+sXDRTp/WABlxhUFXUBSzAHy3phvBiRwyHZbhBpmu44aN4= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 33A99EF8EF; Wed, 7 Oct 2020 11:28:05 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 5C2C12DA0A99; Wed, 7 Oct 2020 11:28:03 -0400 (EDT) Date: Wed, 7 Oct 2020 11:28:03 -0400 (EDT) From: Nicolas Pitre To: Ard Biesheuvel Subject: Re: [PATCH v2 2/2] ARM: move device tree mapping out of linear region In-Reply-To: <20201007083944.27910-3-ardb@kernel.org> Message-ID: References: <20201007083944.27910-1-ardb@kernel.org> <20201007083944.27910-3-ardb@kernel.org> MIME-Version: 1.0 X-Pobox-Relay-ID: B1ECFA56-08B1-11EB-977F-D609E328BF65-78420484!pb-smtp21.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_112812_970597_0860F490 X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Linus Walleij , Florian Fainelli , Russell King , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 7 Oct 2020, Ard Biesheuvel wrote: > @@ -1078,13 +1078,18 @@ void __init hyp_mode_check(void) > void __init setup_arch(char **cmdline_p) > { > const struct machine_desc *mdesc = NULL; > + void *atags_vaddr; > > if (__atags_pointer) > - atags_vaddr = phys_to_virt(__atags_pointer); > + atags_vaddr = FDT_VIRT_ADDR(__atags_pointer); > > setup_processor(); > - if (atags_vaddr) > + if (atags_vaddr) { > mdesc = setup_machine_fdt(atags_vaddr); If __atags_pointer is zero, you'll end up with atags_vaddr being undefined here. I'm surprised the compiler didn't warn about that. > @@ -947,7 +949,7 @@ static void __init create_mapping(struct map_desc *md) > return; > } > > - if ((md->type == MT_DEVICE || md->type == MT_ROM) && > + if (md->type == MT_DEVICE && > md->virtual >= PAGE_OFFSET && md->virtual < FIXADDR_START && > (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { > pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n", Hmmm... I wonder why MT_ROM was there in the first place. Digging into the history of this particular test (which has seen many slight variations over the years and could probably be simplified further nowdays) I finally found where that MT_ROM condition was introduced: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=457450ab3b94 Oh well... Nicolas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel