From mboxrd@z Thu Jan 1 00:00:00 1970 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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 D204FC43217 for ; Thu, 23 Sep 2021 09:42:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD97161241 for ; Thu, 23 Sep 2021 09:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240223AbhIWJn6 (ORCPT ); Thu, 23 Sep 2021 05:43:58 -0400 Received: from elvis.franken.de ([193.175.24.41]:39110 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240224AbhIWJn5 (ORCPT ); Thu, 23 Sep 2021 05:43:57 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1mTLFI-00072a-02; Thu, 23 Sep 2021 11:42:24 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 7A2D7C1CE2; Thu, 23 Sep 2021 11:36:28 +0200 (CEST) Date: Thu, 23 Sep 2021 11:36:28 +0200 From: Thomas Bogendoerfer To: Paul Cercueil Cc: Huacai Chen , Jiaxun Yang , Nick Desaulniers , Tiezhu Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, list@opendingux.net, clang-built-linux@googlegroups.com Subject: Re: [PATCH v2] MIPS: Avoid macro redefinitions Message-ID: <20210923093628.GC7289@alpha.franken.de> References: <20210913213415.527306-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210913213415.527306-1-paul@crapouillou.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 10:34:15PM +0100, Paul Cercueil wrote: > To be able to compile the kernel with LTO, the assembler macros cannot > be declared in the global scope, or the compiler will complain about > redefined macros. > > Update the code so that macros are defined then undefined when they are > used. > > Note that virt support was added in 2.24 and xpa in 2.25. So we still > need the TOOLCHAIN defines for them. > > Signed-off-by: Paul Cercueil > --- > > Notes: > v2: Removed commented undef line > > arch/mips/include/asm/ginvt.h | 11 +- > .../asm/mach-loongson64/loongson_regs.h | 12 ++ > arch/mips/include/asm/mipsregs.h | 190 +++++++++++------- > arch/mips/include/asm/msa.h | 34 +++- > 4 files changed, 155 insertions(+), 92 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]