Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1685787pxb; Thu, 4 Mar 2021 18:47:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJykbNxWWCbd4yXPSMzvHimOeCsQudCwSQT8hNf9YuYOufuryJ/ALIC3Bm5VU+ooTe3yzD6t X-Received: by 2002:a05:6e02:1a03:: with SMTP id s3mr7032744ild.178.1614912456995; Thu, 04 Mar 2021 18:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614912456; cv=none; d=google.com; s=arc-20160816; b=P8OZSW8yrcUOfNLLZ3/JXc8JFGla0vFDt+FM/GLAUKpoe2zXcTtpWFztK9tNp6PcfJ QwfMhCU0S43lo9Jr4N8EOmABKwAJbzYZ3Z5j1V26gbbSvyolf5wG3NvZn9QJ48n74ns0 iWmCEer9R3ld9fmD3c4hVrGS2D23D7pjHZNa/tmw/kESZvXtGRRLoaas3yx413zsHJ/t 3U7UCo7iCKfBXk11YsAib0VkgngtSGtgCVF0D/gZJ9dJiXOgstdByYGR/h31mgiKaY6/ iq4H72jNLJv/1uKvXRAjhQ+qIionoXke0u9kut0orhWAMaiEqBFgjPUdfd1U0H4675Dv q+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=tQ45I8gARg2pvYgbufs4Vn/iGSScr6tplVUhYau0QPA=; b=LIOOP0xqqcZZ846koNygkpUOg0yapMPnHCPFSHZ5eTMouuHOCc5zr6aodmy+5ersd1 1VKtHFXAAdeDuMypIy0lF/S+SdhCbs5IFyHixkIpfr00ScHTi1wwZ4wo6v5DQEHVG9xc 1XUZaZ+oUBYFTtABXDpOnDcg5trQjs7HoZ9u+2MELWU6va/n8SkbebcjvdQVQT9EtleN fEKT92YMerF/AiErWCrxxPfrd0ViYf1UUiqyhQkbyGxYYesWR2C7tLmT8pd9suJa/6WX 0oRIkrnYqltyB46VxLlhvOC6p7GYTy8OkZvShWJnDSOXmKO6FbZ4yNoEzUpNcu3tkgCP ScFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si1231549jak.94.2021.03.04.18.47.24; Thu, 04 Mar 2021 18:47:36 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbhCECqd (ORCPT + 99 others); Thu, 4 Mar 2021 21:46:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbhCECqd (ORCPT ); Thu, 4 Mar 2021 21:46:33 -0500 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 09A0BC061574; Thu, 4 Mar 2021 18:46:33 -0800 (PST) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 9FBF692009C; Fri, 5 Mar 2021 03:46:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 9AAB592009B; Fri, 5 Mar 2021 03:46:31 +0100 (CET) Date: Fri, 5 Mar 2021 03:46:31 +0100 (CET) From: "Maciej W. Rozycki" To: Jiaxun Yang cc: Tiezhu Yang , Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Xuefeng Li Subject: Re: [PATCH] MIPS: Add comment about CONFIG_MIPS32_O32 in loongson3_defconfig when build with Clang In-Reply-To: Message-ID: References: <1614820544-10686-1-git-send-email-yangtiezhu@loongson.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Mar 2021, Jiaxun Yang wrote: > > Huh? Is that a joke? From the o32 psABI's point of view a MIPS64 CPU is > > exactly the same as a MIPS32 one (for whatever ISA revision), so there's > > nothing to support there really other than the CPU/ISA name. > > Clang treat MIPS32 as a different backend so we may need some extra effort.... > > TBH it is a toolchain issue and kernel workaround seems bogus. > > From my point view we can "s/mips64r2/mips32r2" when doing syscall checks > to workaround clang issue instead of disable it for kernel. I had something like this in mind, but obviously that has to be done in a consistent manner across all the possible 64-bit `-march=...' selections, as I suppose that is where the problem comes from. So we'd have to handle things like say `octeon'. But I'd like to see the invocation line to be sure (I could try and check that myself, but I don't have Clang and it's the patch submitter's job anyway to explain things and not the reviewer's to chase them). Maybe we could cheat and wire everything to a single setting so as to keep the hack to the minimum, but we need to know what the right setting is from the Clang people. NB only MIPS IV is special in that it has 32-bit extensions beyond MIPS III but not a corresponding 32-bit ISA. The corresponding 32-bit ISA for MIPS III is MIPS II, and obviously all the modern MIPS ISAs come in pairs. So it's only MIPS IV where o32 may want special support (at the hardware level the ISA had the CP0.Status.XX bit to control the ISA extensions), and I guess only a few people care at this point, though some are present on this mailing list. Maciej