Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1382443pxm; Thu, 24 Feb 2022 01:54:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY1Si0ESN/cizsfbw5TQLYGnKSlVieDkUEG1HGCxbEDkdkmoT40AS4un1ILa3jGEUM4D5J X-Received: by 2002:a17:906:35da:b0:6b8:9f07:f15d with SMTP id p26-20020a17090635da00b006b89f07f15dmr1582246ejb.552.1645696473920; Thu, 24 Feb 2022 01:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645696473; cv=none; d=google.com; s=arc-20160816; b=Smf279LXNGrgGHmI6jyiyR+GfaCSHN4mIv3fIzFfJQeg3RvvnoEgvDe1F3OTgPwayT pBe36bJaL97IMP1ze6y3XNn7opCgP9gOM26r694wtHUIhcui0cClCTEol9EKZdUXkozT bFJ85aIJwZXoZmhj3hn2K1WHXOW6mnb/9KqhHTSAQNLxVrrNtSOYRjIBNYsy6w0dgOqO ZvNkNEQMoKsBv5+QdQbuaum8gSFGvhG2AxTokFF1DV3VuaFdiAfAuTuHufhGWopAB45L wguVisiwok6gt+f1NE6rves60F14nce8/8wPvMpXqpQWdeJO3qSD2N76kzJYRdp4O1TQ rHfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=G2sZ6BNM1gcQDm2d49l01wE6s5q6b5I7Mt1kvm+6lLg=; b=Svm5P4J4bH5fl2RMK5W9j653NVuNjYVqZPB7rjl6UwzWr+0Ovv15avbhBbTA9ooSnd NOIASOj3at9P2AiayavKXNWIiATtY3KHLT74RJKkn3/HafNKkIv/KTqsLwpXX2ipB9Mm Lzbca3TkMA7prP4b/+/SSB2bLl2neiEzuoUVfjyEfsTWwimG0eInfiw7vfaXoLdPfSrw 58uare9yiYb51YRflZjL9EfY+RwRirjI4Q35C3wxY3aQv4UEsKxO8hlzIKLjFBKF4Sth 25qEhK0MkKDQhB7ytrY7sDDPrHOCs0oax0NrKpvRyHcM1ztbpudLPLm2IhWFkEfZoswr hBTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10si1265639ejk.368.2022.02.24.01.54.10; Thu, 24 Feb 2022 01:54:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbiBXI4g (ORCPT + 99 others); Thu, 24 Feb 2022 03:56:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232255AbiBXI4V (ORCPT ); Thu, 24 Feb 2022 03:56:21 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E22051693A7 for ; Thu, 24 Feb 2022 00:55:44 -0800 (PST) Received: from mail-wr1-f54.google.com ([209.85.221.54]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MyK1E-1oAjpL13zI-00yj9n; Thu, 24 Feb 2022 09:55:43 +0100 Received: by mail-wr1-f54.google.com with SMTP id s1so1817228wrg.10; Thu, 24 Feb 2022 00:55:43 -0800 (PST) X-Gm-Message-State: AOAM5321tyNBm9si7/U2bh+owVFO3S3s7EY1xq1BIhtkM+T4O3XuKdus ulUcIWUNOFAhvHR94BJeMzS9bskE9DK3XTR+73c= X-Received: by 2002:adf:a446:0:b0:1ed:c41b:cf13 with SMTP id e6-20020adfa446000000b001edc41bcf13mr1436356wra.407.1645692942849; Thu, 24 Feb 2022 00:55:42 -0800 (PST) MIME-Version: 1.0 References: <20220223135820.2252470-1-anders.roxell@linaro.org> <20220223135820.2252470-2-anders.roxell@linaro.org> <1645670923.t0z533n7uu.astroid@bobo.none> <1645678884.dsm10mudmp.astroid@bobo.none> In-Reply-To: <1645678884.dsm10mudmp.astroid@bobo.none> From: Arnd Bergmann Date: Thu, 24 Feb 2022 09:55:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] powerpc: fix build errors To: Nicholas Piggin Cc: Anders Roxell , Michael Ellerman , Arnd Bergmann , Linux Kernel Mailing List , linuxppc-dev , "# 3.4.x" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:T/CJqf+iu6c4Xf/EuExSSIm06x9aJ6WDKLfHNQtRXGxumPmu8z7 EtaQl1Z0OVFx3hD9xVfSk3eRxxqK0eDOxVy8EUSuPcpQidkbZwG+8irxVhaM9vs6YM/o1Rs sB/rlEnbewRor2D65FUH5k7JNB6Tz/vp0LJE7ZJ8kaXHE7X7teQaks2/GOxm/Mvb7Yrs76F ZBF+9AU17HrltlODwbYaA== X-UI-Out-Filterresults: notjunk:1;V03:K0:F4t8QFQao90=:ey40bacQ5mfWz8RK5g5UwL SiVhD7idP+Ixsg1lrrgW/V7adc1Lyj1s+cZgGL2fgDuyJXNarYJduIvau3CxLJJT4XhJJszy8 FY+wjla7xEv5tqNOtGNZnon/Uyw/6G033boDPMn8rRhLoRhFxjBkPLzzwOJ5JYCC7ueV1/G9u NehYSMLQK7Jyh2RhghVaUlhSQIIX+CSkNcbcHnwbVrxTP+mfKYWbvciQmamUeF8Ik2+yn9oby xTVhqH6nsnBCX7mBEkckrmdyFIbOX0BizuJTsm43frank9MRynHEcy83XGVXTjG1yGHaOTk6H TV9bbE9AWFj7uipo2+ZiorONqX9/3VHOe126hgYOG2xxb25sV3YWg1sDUmET/QRxo3itUhtRH /ajyN4jdXvycVWSjtmyoB7TxyDj0iVLDa2JLmt4MGQKLsKE3Er4qXqz+sbsjIWNOPGJ7ian6t 86zdnv2XRarL7JGvGYIWb/cy2VrccTi4nmyEb9MxwFLG2U6zPmGLvGwWEf7Otfa7MvxVBZpwr 1inoieouBzNnv2YeUMzSEDys8t4UT5R42eDPbOgzCr4bBq8MaNtGo5Olg9rdEy/v5DDt8GR6i v3FDmj9fpRp/RAEF03WG4bVRNlbIB1+l+ZzddZWDQylKT44xHr4mFgZl9tfxllaC09L0IUBXJ Iq++m2tuXRPN1m4HkB1sbrcx61oDzpB+3pywWhIjszIZw2/6xp6vhuZNPTGPFkh1AYS+vhMsv W5dPElvxsepOhkrvccuGoa20pCsqwH3lXMobJfdr8rBhboRSmN6oJjFEmZ8FYwGig5EK80uWO hZEwhWHt39uvw8LNfrrr94wKKbsum5EJU+wnT0we1wwi/N8L7U= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 24, 2022 at 6:05 AM Nicholas Piggin wrote: > Excerpts from Nicholas Piggin's message of February 24, 2022 12:54 pm: > > > > Not sure on the outlook for GCC fix. Either way unfortunately we have > > toolchains in the wild now that will explode, so we might have to take > > your patches for the time being. > > Perhaps not... Here's a hack that seems to work around the problem. > > The issue of removing -many from the kernel and replacing it with > appropriate architecture versions is an orthogonal one (that we > should do). Either way this hack should be able to allow us to do > that as well, on these problem toolchains. > > But for now it just uses -many as the trivial regression fix to get > back to previous behaviour. I don't think the previous behavior is what you want to be honest. We had the same thing on Arm a few years ago when binutils started enforcing this more strictly, and it does catch actual bugs. I think annotating individual inline asm statements is the best choice here, as that documents what the intention is. There is one more bug in this series that I looked at with Anders, but he did not send a patch for that so far: static void dummy_perf(struct pt_regs *regs) { #if defined(CONFIG_FSL_EMB_PERFMON) mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE); #elif defined(CONFIG_PPC64) || defined(CONFIG_PPC_BOOK3S_32) if (cur_cpu_spec->pmc_type == PPC_PMC_IBM) mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO)); #else mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE); #endif } Here, the assembler correctly flags the mtpmr/mfpmr as an invalid instruction for a combined 6xx kernel: As far as I can tell, these are only available on e300 but not the others, and instead of the compile-time check for CONFIG_FSL_EMB_PERFMON, there needs to be some runtime check to use the first method on 83xx but the #elif one on the other 6xx machines. Arnd