From patchwork Tue Feb 11 13:56:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WangYuli X-Patchwork-Id: 13969506 Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19CA323099C; Tue, 11 Feb 2025 13:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.207.19.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739282260; cv=none; b=BK7OH9cKR3u3gKMgiT0OvxlPSssI3uBRl0Wg/6u3zE7jExBxLPqxHDv+BACj7o9LC2uae/BmdTH/fBe+AsaKIPVE37FqtFk+ef7lHMbnXW4PuQRTBRPFHrlcgt6xdUWigpWogDXoh/olfhqyKbTD9sYX0h3TLYtob05fA6bN7SU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739282260; c=relaxed/simple; bh=XnACgguGEi7l2F/dWtns8iHU9CdKd5Rbri/Os+TWzuE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rmALtIR0MWRns5Z4uYfHXBSln7C7dgIgPXblW+T90O4QrEd0MH7RxYsarfM6VJgnucCAdPdZtFPYZySpafQx02lcEU1GztQy6y/wo57Z1Ux0GWUUUYDYGV/DSFMgw6EkJTHXHaVYbAUnUBq9ohiVM46dMAeKzGJQsLEWaZghT+Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=WtM57xM+; arc=none smtp.client-ip=54.207.19.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="WtM57xM+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1739282194; bh=MOQCraMni4cLE1auXuOnn748f2GO/MU4imVh9/6YM1A=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=WtM57xM+S873o5QSDorJ4alNrM8tMSW1tFzPZSyVQuFYzWYIarJX+a5nN6VpnrBDo dkAbwjk+sycF2N4Id5aKIHbnMomtVsAgUfY66IgiirlL+BLjq5QJ8DGaYqbw2LfBr5 iUqQPeyrQtM4lamEXm2YBSa4Njk+qFkPgFjzSMS8= X-QQ-mid: bizesmtpip2t1739282184t243xhs X-QQ-Originating-IP: npKmLwuEa8p5dg5WWLccJs9AiidgISrmzEcpd0HuIow= Received: from localhost.localdomain ( [localhost]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 11 Feb 2025 21:56:22 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 15678477366880975103 From: WangYuli To: tsbogend@alpha.franken.de Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, macro@orcam.me.uk, masahiroy@kernel.org, jiaxun.yang@flygoat.com, zhanjun@uniontech.com, guanwentao@uniontech.com, WangYuli Subject: [PATCH 0/2] MIPS: Explicitly check KBUILD_SYM32=n Date: Tue, 11 Feb 2025 21:56:16 +0800 Message-ID: <41107E6D3A125047+20250211135616.1807966-1-wangyuli@uniontech.com> X-Mailer: git-send-email 2.47.2 Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpip:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-QQ-XMAILINFO: MABkn+BX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QQ-RECHKSPAM: 0 During make module_install, the need_compiler variable becomes 0, so Makefile.compiler isn't included. This results in call cc-option-yn returning nothing. Add a check for KBUILD_SYM32=n to avoid the "CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32" error when KBUILD_SYM32 is unset (meaning it's not 'y' or 'n'). Moreover, I also identified an unnecessary check for KBUILD_SYM32 in this Makefile section. Eliminate it for code simplification. NOTE: It is particularly important to note that this code fix does not imply that we have resolved the problem entirely. In fact, the entire application of cc-option and its auxiliary commands within the kernel codebase currently carries significant risk. When we execute make modules_install, the Makefile for the corresponding architecture under arch/subarches/Makefile is invariably included. Within these files, there are numerous usages of cc-option and its auxiliary commands, all of which will return empty strings. The reason other architectures can successfully complete compilation under these circumstances is purely because they do not, unlike MIPS, check the return values of cc-option and its auxiliary commands within their Makefiles and halt the compilation process when the expected results are not received. A feasible approach to remediation might be to encapsulate all usages of cc-option and its auxiliary commands within conditional statements across all architecture Makefiles, preventing their execution entirely during make modules_install. However, this would lead to a massive number of inelegant modifications, and these broader implications may require deliberation by Masahiro Yamada. Regardless, this does not preclude us from addressing the issue on MIPS first. WangYuli (2): MIPS: Eliminate Redundant KBUILD_SYM32 Checks MIPS: Explicitly check KBUILD_SYM32=n arch/mips/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)