Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp871099pxt; Thu, 5 Aug 2021 13:54:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs7+v1geKoZeIt7hJYAcloY2sUeK9mHPwnjufRIrpuwqUJWIqHz5040rHtykQWj7kEJAJP X-Received: by 2002:a5d:9617:: with SMTP id w23mr21452iol.115.1628196887061; Thu, 05 Aug 2021 13:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628196887; cv=none; d=google.com; s=arc-20160816; b=058Tb5FIHrMT2vxRT3++Apt19hyVwuvl9XCQ4dajaaV3kStSpsdYzkr6QH6RKQaApm Jx8uucBEaru1dpt6ZkduyF5hC7paMjEaHDL94uOqFN1u6JiuZFeZ0EVcHBQ2s9TqjeHk lWR03f3lTnKRsfnkiF8J8kI9uFvm72qASBljWNYs7d007/0QJu6HRwSJkrIsMmII3bUN CvsDpm6lQkZiS7ggf/71XJWyD+y1sqQglfY9iYXhxMdOZup6JfD3CfYi3iTyZe/9C9o6 w6dT1zc/khIvKfvzSSOVLlL7cw2K2YnJW+UWRYtpUPQmVRYZBs6l5oY+f3WkYOVwn2DW xbow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:reply-to :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=wTdo21iBPQX8UkFAjwkvjQ0EK84I1J4pRSwJ7mQOzr8=; b=L0laYcLpdo8OOBhYqfBdZYp5FaB553wq4JKM0ImK01aHwifoIjZATEQzmrE/6MsCr6 6HJGsMpC6H8EdSAq1Bi5px/NG4ZbCmYOf/2PXF0B2+jihII9gGS3TUe19EJpmFtf47el +GBBFIQlK1mSVv3RPB9cZKY7nR6dLY0r39iBui2CU9lAayVGBSpbekaP0f3dAsKjrHhJ rFl/2T4C9ccXR+1X284eBgotRmhPVTxNNmaccGfMdlms1Q1rxzH2kBJPOhSxx27l4NJU 81SiX0v6PHNCJPLgjMQsfQKoLfSjfF56TOXu9sluDIkiQ6mwyiAUgPByM02n6wOx1587 GkUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sent.com header.s=fm1 header.b=YuF+9bhr; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=KLYqgml+; 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=sent.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si3576063jaq.80.2021.08.05.13.54.33; Thu, 05 Aug 2021 13:54: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=@sent.com header.s=fm1 header.b=YuF+9bhr; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=KLYqgml+; 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=sent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241918AbhHETD7 (ORCPT + 99 others); Thu, 5 Aug 2021 15:03:59 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:36005 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241868AbhHETD6 (ORCPT ); Thu, 5 Aug 2021 15:03:58 -0400 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 +=3D -fno-stack-protector KBUILD_CFLAGS_32 +=3D $(call cc-option, -foptimize-sibling-calls) KBUILD_CFLAGS_32 +=3D -fno-omit-frame-pointer KBUILD_CFLAGS_32 +=3D -DDISABLE_BRANCH_PROFILING +KBUILD_CFLAGS_32 +=3D -DNO_MAX_ORDER_CHECK =20 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(s= truct zonelist *zonelist, #define SECTION_BLOCKFLAGS_BITS \ ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS) =20 +/* 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 */ =20 static inline unsigned long pfn_to_section_nr(unsigned long pfn) { --=20 2.30.2