Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp60176pxb; Thu, 15 Apr 2021 22:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylXzRIuw2P2bz9diFpqEzL5QTvpXqB5jLen0I406o1T6wKlRbqERxR3/YAES61g/YU+Ve3 X-Received: by 2002:a05:6402:212:: with SMTP id t18mr8108048edv.165.1618552427015; Thu, 15 Apr 2021 22:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618552427; cv=none; d=google.com; s=arc-20160816; b=Lc1gSYi+BfYTDESqAC07kJuGVnIwSMRjtOESXxYUig/ysBByBhKt+3vqgwa5RxjXBG IennwX8gKv9r7k595L8aakNtNEcMk8fu2V3JNlMSZMJlwwF3D4buDmhQnt6yibATm74y OcfJLqYnSxkATUEM/G/2H1gfaDtWXknskEr4Kd50nHGpHQrWW5oyXJFAnFalBsTZY9N1 y3V4iNTvcuNbZTHesO26UTqy8RELEBzkN5CfO4hivF8EMOR+3Wx6N2FNjtY1Pts3Iy1T 4gtdrJ5oNOsV4PHrSyHO654mzVq2H0zMEwGnCAj2Zh7TzmJI1M9owcLlySTUDhJS9bNk jEBQ== 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:dkim-signature; bh=Wj0LmQcX4T3RD/LCUSwlZuN9U0k4EZ8z0GPjE5eqJ+c=; b=ci/YknzCK7iE+zgU3qnY7doCy5BGD86OG2dSHyY/KkcIrcXEN9GvlMi1FrmMPF+pSV HVfY2DfBVKce6qGepMtMl8RxzvEotYVAY8G+ZP65ObOrfSRbISXkAP6VC4hAspE2lLW6 RnDbXCBdYSJHbkcwDWqBB/PFTiojaG0tYglzkDFRF6uSkDhJ8XpKY8/jf07bcA5U7PmU c64LlITD5dFuiR6FFKYj6tPHJZAtS+zj+8XP5X7tgptZrF9RSe0gJCpcaUG6wzeHVAfe rhwajwkNKxXR/OUFy+d327NIZXhKsa8wzoukemBvMOdzC5Lm91dlrAgYX/sdDjJvq7dH 678A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SeofBIy3; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si3910650ejj.228.2021.04.15.22.53.22; Thu, 15 Apr 2021 22:53: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=@gmail.com header.s=20161025 header.b=SeofBIy3; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237341AbhDPEfK (ORCPT + 99 others); Fri, 16 Apr 2021 00:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234735AbhDPEfJ (ORCPT ); Fri, 16 Apr 2021 00:35:09 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90CE2C061574; Thu, 15 Apr 2021 21:34:45 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id s16so21212373iog.9; Thu, 15 Apr 2021 21:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wj0LmQcX4T3RD/LCUSwlZuN9U0k4EZ8z0GPjE5eqJ+c=; b=SeofBIy31lvaGo4ip2O0oyx2LsxzePZb/9lOB5C9/D+k6qqrK4+LfDdJT4Mtoj5Rw9 QPXKrV/lFBRuv/SJ5LnbvZBDIK6pm+jc6J4mvF8ccSsB6avWE0IHq6EbS2DvYJZXC/jm i0ta7IKIkkgq/MX5hpCxGaA7mixRoz0T2cZ8dMDtx5RrFgFSteRq5nns1W2HlOoVv2fG LB/cwCQ6SO0DLfWqoHzZbzqBqZwM5zF+snorjJSGY8KpJBvNQ+cni0oeEJRFHot9ovle tlVN1aCCYLMa49lJ3RxGzhSTGdpbFQmRearzZmcvCGKONJuOWN4MllJizUsi3PIGCLax i39A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wj0LmQcX4T3RD/LCUSwlZuN9U0k4EZ8z0GPjE5eqJ+c=; b=K+jVVmVxfyp05eJleOor6B8jK2ktteBzMLamMu6L9QVW0R9jgAeWSyQqwVSi7syrFk ibgg8oJlZ6Q7zzdV8MS0/dh/7rqoRnkvMkgAqUfg/WU/wzbjPsbTGi9LZl6WBDGwEHR9 20UId57Av2AXdG7lJzx815VvVJpBlew6RO98KSg92GR4gD9iWd4xtOw6BrCI8ym6nc+F tFsj+tIma00YyIHuwf8o9b2Q4B+3n2bnlyGrZcfwlA62U3pQgfYqz1y4tSH4qKO1qVve Va3ED4gjlfkHgaEDEszXi1pM5Fiz2Uic+NFBS4nj7T3kXogf7bQx5x+Rbe8+7hiJ6bkr Xx5g== X-Gm-Message-State: AOAM530xj1FshBgqnlt7A2g8b6Qn7Ncb9XDMUi8P6+BvMnvnB59AX9Wj l68xtftIuXVWlb0OhAK1ZLZV2yNd5RNOH2qUySI= X-Received: by 2002:a5d:8ad2:: with SMTP id e18mr2068967iot.51.1618547685088; Thu, 15 Apr 2021 21:34:45 -0700 (PDT) MIME-Version: 1.0 References: <20200917000757.1232850-1-Tony.Ambardar@gmail.com> <20200917135437.1238787-1-Tony.Ambardar@gmail.com> In-Reply-To: <20200917135437.1238787-1-Tony.Ambardar@gmail.com> From: Tony Ambardar Date: Thu, 15 Apr 2021 21:34:36 -0700 Message-ID: Subject: Re: [PATCH v3] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h To: Michael Ellerman Cc: Benjamin Herrenschmidt , Paul Mackerras , Arnd Bergmann , linux-arch , linuxppc-dev , LKML , bpf , Stable , Rosen Penev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Michael, The latest version of this patch addressed all feedback I'm aware of when submitted last September, and I've seen no further comments from reviewers since then. Could you please let me know where this stands and if anything further is needed? Kind regards, Tony On Thu, 17 Sept 2020 at 06:54, Tony Ambardar wrote: > > A few archs like powerpc have different errno.h values for macros > EDEADLOCK and EDEADLK. In code including both libc and linux versions of > errno.h, this can result in multiple definitions of EDEADLOCK in the > include chain. Definitions to the same value (e.g. seen with mips) do > not raise warnings, but on powerpc there are redefinitions changing the > value, which raise warnings and errors (if using "-Werror"). > > Guard against these redefinitions to avoid build errors like the following, > first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with > musl 1.1.24: > > In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5, > from ../../include/linux/err.h:8, > from libbpf.c:29: > ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror] > #define EDEADLOCK EDEADLK > > In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10, > from libbpf.c:26: > toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition > #define EDEADLOCK 58 > > cc1: all warnings being treated as errors > > CC: Stable > Reported-by: Rosen Penev > Signed-off-by: Tony Ambardar > --- > v1 -> v2: > * clean up commit description formatting > > v2 -> v3: (per Michael Ellerman) > * drop indeterminate 'Fixes' tags, request stable backports instead > --- > arch/powerpc/include/uapi/asm/errno.h | 1 + > tools/arch/powerpc/include/uapi/asm/errno.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/arch/powerpc/include/uapi/asm/errno.h b/arch/powerpc/include/uapi/asm/errno.h > index cc79856896a1..4ba87de32be0 100644 > --- a/arch/powerpc/include/uapi/asm/errno.h > +++ b/arch/powerpc/include/uapi/asm/errno.h > @@ -2,6 +2,7 @@ > #ifndef _ASM_POWERPC_ERRNO_H > #define _ASM_POWERPC_ERRNO_H > > +#undef EDEADLOCK > #include > > #undef EDEADLOCK > diff --git a/tools/arch/powerpc/include/uapi/asm/errno.h b/tools/arch/powerpc/include/uapi/asm/errno.h > index cc79856896a1..4ba87de32be0 100644 > --- a/tools/arch/powerpc/include/uapi/asm/errno.h > +++ b/tools/arch/powerpc/include/uapi/asm/errno.h > @@ -2,6 +2,7 @@ > #ifndef _ASM_POWERPC_ERRNO_H > #define _ASM_POWERPC_ERRNO_H > > +#undef EDEADLOCK > #include > > #undef EDEADLOCK > -- > 2.25.1 >