From patchwork Thu Aug 5 19:02:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 12421857 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E7DFAC432BE for ; Thu, 5 Aug 2021 19:03:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F6D461168 for ; Thu, 5 Aug 2021 19:03:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F6D461168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 997A96B0071; Thu, 5 Aug 2021 15:03:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 948EC6B0072; Thu, 5 Aug 2021 15:03:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 725D28D0001; Thu, 5 Aug 2021 15:03:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id 582746B0071 for ; Thu, 5 Aug 2021 15:03:44 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 14698269B2 for ; Thu, 5 Aug 2021 19:03:44 +0000 (UTC) X-FDA: 78441951168.31.FE3843F Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by imf18.hostedemail.com (Postfix) with ESMTP id ADDDF40018AC for ; Thu, 5 Aug 2021 19:03:43 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 462405810AD; Thu, 5 Aug 2021 15:03:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 05 Aug 2021 15:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm1; bh=wTdo21iBPQX8U kFAjwkvjQ0EK84I1J4pRSwJ7mQOzr8=; b=YuF+9bhrhzirasmvngw+F+N/MPIwF u3mw+9QZ1B4MiFo3OT8wBrKfvWpiqjOKrDLnYLRxy+bHMBEZ+pA2ALHoWrhprqZX yhk/PPeXrUOjEwEmNIhtSPu+R1D3PDsnStNBKdpmJSdod2eiiFg+NnBoGD2NRTG5 wGJl1PhZaiju7Kcao4yHJqxarP/HSuoRNFvSJuQlJ8zR3AmtiQ+fmCbYF8VMEy3C kHE5Twb3irrjoPgjKH71t0Q8lDNdyaDcEUiJq+q4seGpEexo85vFsXIrFpcIttoK Jv+BaqPNRylSofoIUJhOPlxaabVUNbg/af6v7hC3LGdPecjuVU04QMalQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=wTdo21iBPQX8UkFAjwkvjQ0EK84I1J4pRSwJ7mQOzr8=; b=KLYqgml+ nv0rwA7/vkJ0ZDg8612bfnM3HTTAHpyqw+RwC+eT+LioA3XmQ7ELdy4tCxBUY64g yxqCmMwNIpOl/Wu1LOGUD1b/fqPpaD941aXu8oliOX1pk3swfd9M0xgelr6jg9x0 vCHag1XB3FygIwVXU4YDlgQOVPDFrIF3Pw2fTFqCEnCTTIBsw26wwK/GlstkkiFB fmcREPjqjdlRO0a9RfiClljJcLB6dh5+uloW6HfZztn/Gjtsh7ddtScZj1NLXZzm OzAn9E0Km8k1az9oXj8UBpbaxoa3KPNn5COz4VfeUQm8nDG7JopsK126y+NcehBK xj7+ZjE21KVjNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfrhgggfestdhqredtredttdenucfhrhhomhepkghiucgj rghnuceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepieejue dvueduuefhgefhheeiuedvtedvuefgieegveetueeiueehtdegudehfeelnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepiihirdihrghnsehsvg hnthdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Aug 2021 15:03:42 -0400 (EDT) From: Zi Yan To: David Hildenbrand , linux-mm@kvack.org Cc: Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan , Andy Lutomirski , x86@kernel.org Subject: [RFC PATCH 01/15] arch: x86: remove MAX_ORDER exceeding SECTION_SIZE check for 32bit vdso. Date: Thu, 5 Aug 2021 15:02:39 -0400 Message-Id: <20210805190253.2795604-2-zi.yan@sent.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805190253.2795604-1-zi.yan@sent.com> References: <20210805190253.2795604-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: ADDDF40018AC Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b=YuF+9bhr; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=KLYqgml+; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf18.hostedemail.com: domain of zi.yan@sent.com designates 66.111.4.229 as permitted sender) smtp.mailfrom=zi.yan@sent.com X-Stat-Signature: jbzt41xx1jy5jhwpomr6x7kkiftuzdw4 X-HE-Tag: 1628190223-167333 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: From: Zi Yan For x86_64, 32bit vdso is compiled for compatibility reason and 32bit SECTION_SIZE_BITS value is used during compilation. It causes compilation time error when MAX_ORDER is increased in the 64bit environment even if it is OK for 64bit SECTION_SIZE_BITS. Remove the check during 32bit vdso compilation. The check still exists during the compilation of other kernel components. Signed-off-by: Zi Yan Cc: Andy Lutomirski Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org --- arch/x86/entry/vdso/Makefile | 1 + include/linux/mmzone.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 05c4abc2fdfd..cad339136ed1 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -156,6 +156,7 @@ KBUILD_CFLAGS_32 += -fno-stack-protector KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls) KBUILD_CFLAGS_32 += -fno-omit-frame-pointer KBUILD_CFLAGS_32 += -DDISABLE_BRANCH_PROFILING +KBUILD_CFLAGS_32 += -DNO_MAX_ORDER_CHECK ifdef CONFIG_RETPOLINE ifneq ($(RETPOLINE_VDSO_CFLAGS),) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6a1d79d84675..c1d914a72489 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1245,9 +1245,12 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, #define SECTION_BLOCKFLAGS_BITS \ ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS) +/* NO_MAX_ORDER_CHECK when compiling x64 32bit VDSO for 64bit system */ +#ifndef NO_MAX_ORDER_CHECK #if (MAX_ORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS #error Allocator MAX_ORDER exceeds SECTION_SIZE #endif +#endif /* NO_MAX_ORDER_CHECK */ static inline unsigned long pfn_to_section_nr(unsigned long pfn) {