Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5895443ybh; Wed, 7 Aug 2019 13:19:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqydAQKVZYyfWUAjoIaOYPp1MsZdkNlkoGxhP/lHP2EvXonPKmvmwHFmE3nzty1NdCf8xxty X-Received: by 2002:a17:902:aa93:: with SMTP id d19mr1608068plr.148.1565209158856; Wed, 07 Aug 2019 13:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565209158; cv=none; d=google.com; s=arc-20160816; b=eif9VTaXgw3115O3JCbUNSQis56iZXeIPf0lBTiryESGpqB9dWDzkwsZSqSpd66Zjj U/Iu6M3XKanqmAyBgxpIuV+BXtKVUBI0HNRATNlxQDPT0+gm1+omyvdJhCD/s93LwOr+ 6BQyuUVIdi7UJPfANerm2GKMlFMzZNmYQsSo8++NYfL+XDUiEaeQ1gyvT+p6iF5PzVM6 LT+Im3Y+Gy8hspVAYouSNAkuqYFjpWMKidXRi2B9QmcHJ7NhBGvpseFiPRn6WgFra++1 zP9w2quFu9jKiOTPwblmrVduuPdPWbpXLR0RPzDnRuriMFa8A6KdUkMUxNPmVi+5WDH8 z0ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=XpaIVnkd/BjfYjmfO2aXpXQJdXfWej63oBAOIpZvzZY=; b=doNOCO5JvXmc+MUYiA0XE2c/JHKDGXviraXUFC7orhAD1+yvmkW8EM7Dzp/W+mVpAS 9wklr4rmBCCHz2OdWssBafnYf6Wl+kqTNniLUFZ2m1pvtpgdSddpypc/L8TFCN71kBjT 9pdTK0xjlukUAOdR2WEbIgT+HpLenrZJA8P9FECLyboRrYZMDiZOv6G3rn1AWnYqyU/z uQ16Hbz4N7JvC43iY1/ymNiOxs12Dwl4h26ZAVdG7oj4t8cyzMtAowjmlyXbhY1obF6B fwD8h7+Y4CeF4+ur4qQFMRC85ITL+OSHN/gnFxqeOeqBxNBm1WU5HfMEVsXB+x2/IaQR Z3wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sEN1paER; 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 g18si31032313pgk.246.2019.08.07.13.18.58; Wed, 07 Aug 2019 13:19:18 -0700 (PDT) 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=@kernel.org header.s=default header.b=sEN1paER; 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 S2389390AbfHGURA (ORCPT + 99 others); Wed, 7 Aug 2019 16:17:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:50316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387969AbfHGURA (ORCPT ); Wed, 7 Aug 2019 16:17:00 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2EAC82199C; Wed, 7 Aug 2019 20:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565209019; bh=9jrCLwX3LNqceRPrIp1jyjebmoHx3o9gZO1ZatQ4skM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sEN1paERUMluEqczWXfNlPMKbSdmYQaq4T7rTni0CxSxEnrjjHKQ765sgQWu8A8s0 QKx24YVdqUtvGPcVbdAJxRFJMxYJyV6Ah+0UPLJtP5uaP8snDxXhkkuBKnRyRw75Aq iNGGe6IBLOd1dbfd+9eQdQKz0RAljH5GsNO+CLMo= Date: Wed, 7 Aug 2019 13:16:58 -0700 From: Andrew Morton To: Steven Price Cc: Mark Rutland , x86@kernel.org, Arnd Bergmann , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , James Morse , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org, "Liang, Kan" , "Kirill A. Shutemov" Subject: Re: [PATCH v10 20/22] x86: mm: Convert dump_pagetables to use walk_page_range Message-Id: <20190807131658.08793793a97fa4310af4f495@linux-foundation.org> In-Reply-To: <066fa4ca-5a46-ba86-607f-9c3e16f79cde@arm.com> References: <20190731154603.41797-1-steven.price@arm.com> <20190731154603.41797-21-steven.price@arm.com> <20190806165823.3f735b45a7c4163aca20a767@linux-foundation.org> <066fa4ca-5a46-ba86-607f-9c3e16f79cde@arm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Aug 2019 13:58:21 +0100 Steven Price wrote: > > ./arch/x86/include/asm/pgtable_64_types.h:56:22: error: initializer element is not constant > > #define PTRS_PER_PGD 512 > > ^ > > This is very unhelpful of GCC - it's actually PTRS_PER_P4D which isn't > constant! Well. You had every right to assume that an all-caps macro is a compile-time constant. We are innocent victims of Kirill's c65e774fb3f6af2 ("x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable") which lazily converted these macros into runtime-only, under some Kconfig settings. It should have changed those macros into static inlined lower-case functions.