Oh it is only on the trunk of GCC so to some extend it caught a regression in 
GCC :).

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Wednesday, September 8, 2021 2:36 PM
To: Maxim Kuvyrkov; Linus Torvalds; Alex Deucher
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [CI-NOTIFY]: TCWG Bisect 
tcwg_kernel/gnu-master-arm-mainline-allmodconfig - Build # 28 - Successful!

Filed as 
https://urldefense.proofpoint.com/v2/url?u=https-3A__gcc.gnu.org_PR102245&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=Q4Md2buFVTtZ6Y0h2OJ0uRuXgt3gqEoy7kSSvYveMRQ&s=MC8RIVMy1kXaEYsoCOZd9Xjvw2ee1luiyJOXYpocseg&e=
  .

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Wednesday, September 8, 2021 2:31 PM
To: Maxim Kuvyrkov; Linus Torvalds; Alex Deucher
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [CI-NOTIFY]: TCWG Bisect 
tcwg_kernel/gnu-master-arm-mainline-allmodconfig - Build # 28 - Successful!

Ok, I am now able to reproduce it with:

#define shiftCB_DISABLE_FAULT_ON_UNMAPPED_ACCESS1 0
#define maskCB_DISABLE_FAULT_ON_UNMAPPED_ACCESS1 1L

#define REG_FIELD_MASK(a,b) (mask##b)
#define REG_FIELD_SHIFT(a,b) (shift##b)

#define REG_SET_FIELD(orig_val, reg, field, field_val)                  \
        (((orig_val) & ~REG_FIELD_MASK(reg, field)) |                   \
         (REG_FIELD_MASK(reg, field) & ((field_val) << REG_FIELD_SHIFT(reg, 
field))))



int f(_Bool enable)
{
  int tmp = 0;
  tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
                      CB_DISABLE_FAULT_ON_UNMAPPED_ACCESS1,
                      enable);
  return tmp;
}

This is definitely a false warning. I will be filing a bug upstream in a few 
minutes.

Thanks,
Andrew

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Wednesday, September 8, 2021 1:29 PM
To: Maxim Kuvyrkov; Linus Torvalds; Alex Deucher
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [CI-NOTIFY]: TCWG Bisect 
tcwg_kernel/gnu-master-arm-mainline-allmodconfig - Build # 28 - Successful!

I think this is a false positive.
It is doing:
#define shift 2
#define mask (1ul<<(shift))

#define REG_FIELD_MASK(a,b) (mask)
#define REG_FIELD_SHIFT(a,b) (shift)

#define REG_SET_FIELD(orig_val, reg, field, field_val)                  \
        (((orig_val) & ~REG_FIELD_MASK(reg, field)) |                   \
         (REG_FIELD_MASK(reg, field) & ((field_val) << REG_FIELD_SHIFT(reg, 
field))))



int f(_Bool enable)
{
  int tmp = 0;
  tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
                      CB_DISABLE_FAULT_ON_UNMAPPED_ACCESS,
                      enable);
  return tmp;

}


But I could not get GCC to warn.  I think a toolchain person should look at the 
preprocessed source to see what is happening.

Thanks,
Andrew Pinski

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Maxim Kuvyrkov <maxim.kuvyr...@linaro.org>
Sent: Wednesday, September 8, 2021 2:30 AM
To: Linus Torvalds; Alex Deucher
Cc: linaro-toolchain
Subject: [EXT] Re: [CI-NOTIFY]: TCWG Bisect 
tcwg_kernel/gnu-master-arm-mainline-allmodconfig - Build # 28 - Successful!

External Email

----------------------------------------------------------------------
Hi Linus,

As expected, kernel builds started failing in less-common configurations.  In 
this particular case the culprit is amdgpu driver when built for 32-bit ARM in 
allmodconfig configuration using tip-of-trunk GCC.

Hi Alex, [picking your name from “git log drivers/gpu/drm/amd/amdgpu/amdgpu.h”],

Would you please take a look?  Let me know if the problem doesn’t reproduce for 
you, and I’ll help to investigate.


00:22:45 In file included from drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:29:
00:22:45 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c: In function ‘gmc_v6_0_set_prt’:
00:22:45 drivers/gpu/drm/amd/amdgpu/amdgpu.h:1227:53: error: ‘<<’ in boolean 
context, did you mean ‘<’? [-Werror=int-in-bool-context]
00:22:45  1227 |          (REG_FIELD_MASK(reg, field) & ((field_val) << 
REG_FIELD_SHIFT(reg, field))))
00:22:45       |                                        
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00:22:45 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:430:15: note: in expansion of 
macro ‘REG_SET_FIELD’
00:22:45   430 |         tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
00:22:45       |               ^~~~~~~~~~~~~
00:22:45 cc1: all warnings being treated as errors
00:22:45 make[4]: *** [scripts/Makefile.build:277: 
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.o] Error 1
00:40:28 make[4]: Target '__build' not remade because of errors.
00:40:28 make[3]: *** [scripts/Makefile.build:540: drivers/gpu/drm/amd/amdgpu] 
Error 2
00:41:17 make[3]: Target '__build' not remade because of errors.
00:41:17 make[2]: *** [scripts/Makefile.build:540: drivers/gpu/drm] Error 2
00:41:17 make[2]: Target '__build' not remade because of errors.
00:41:17 make[1]: *** [scripts/Makefile.build:540: drivers/gpu] Error 2
00:41:17 make[1]: Target '__build' not remade because of errors.
00:41:17 make: *** [Makefile:1872: drivers] Error 2
00:41:17 make: Target '__all' not remade because of errors.

Regards,

--
Maxim Kuvyrkov
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linaro.org&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=bcbggZZWC56u4q8MITx_3s-oLHlmtyzcI3FltbGjFlI&e=

> On 8 Sep 2021, at 11:40, ci_not...@linaro.org wrote:
>
> Successfully identified regression in *linux* in CI configuration 
> tcwg_kernel/gnu-master-arm-mainline-allmodconfig.  So far, this commit has 
> regressed CI configurations:
> - tcwg_kernel/gnu-master-arm-mainline-allmodconfig
>
> Culprit:
> <cut>
> commit 3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151
> Author: Linus Torvalds <torva...@linux-foundation.org>
> Date:   Sun Sep 5 11:24:05 2021 -0700
>
>    Enable '-Werror' by default for all kernel builds
>
>    ... but make it a config option so that broken environments can disable
>    it when required.
>
>    We really should always have a clean build, and will disable specific
>    over-eager warnings as required, if we can't fix them.  But while I
>    fairly religiously enforce that in my own tree, it doesn't get enforced
>    by various build robots that don't necessarily report warnings.
>
>    So this just makes '-Werror' a default compiler flag, but allows people
>    to disable it for their configuration if they have some particular
>    issues.
>
>    Occasionally, new compiler versions end up enabling new warnings, and it
>    can take a while before we have them fixed (or the warnings disabled if
>    that is what it takes), so the config option allows for that situation.
>
>    Hopefully this will mean that I get fewer pull requests that have new
>    warnings that were not noticed by various automation we have in place.
>
>    Knock wood.
>
>    Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
> </cut>
>
> Results regressed to (for first_bad == 
> 3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151)
> # reset_artifacts:
> -10
> # build_abe binutils:
> -9
> # build_abe stage1:
> -5
> # build_abe qemu:
> -2
> # linux_n_obj:
> 21769
> # First few build errors in logs:
>
> from (for last_good == fd47ff55c9c31101fcc06d20cb381da3d4089bd5)
> # reset_artifacts:
> -10
> # build_abe binutils:
> -9
> # build_abe stage1:
> -5
> # build_abe qemu:
> -2
> # linux_n_obj:
> 29880
> # linux build successful:
> all
>
> Artifacts of last_good build: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_build-2Dfd47ff55c9c31101fcc06d20cb381da3d4089bd5_&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=nqSVmUcfYIWFClXL9_360w4ylnuu2uFaIlfg7pMC2eM&e=
> Artifacts of first_bad build: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_build-2D3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151_&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=G35T9l9MUJapS23pmvecgkON3Pt1aIBhg_qoco1Y7vw&e=
> Build top page/logs: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=QoN6XQwwGGCP3353ZCwMVQjKybaUMCB8F6RC2j_RA8g&e=
>
> Configuration details:
>
>
> Reproduce builds:
> <cut>
> mkdir investigate-linux-3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151
> cd investigate-linux-3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151
>
> git clone 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.linaro.org_toolchain_jenkins-2Dscripts&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=C3zCGWz0Mvx4ZkFme7SVQZmzu5PmWVeMzMXv8kcozt0&e=
>
> mkdir -p artifacts/manifests
> curl -o artifacts/manifests/build-baseline.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_manifests_build-2Dbaseline.sh&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=UZK5cTg0r4e7pbq7RNd23OsuH_hdeWxei_kom5Sueu0&e=
>   --fail
> curl -o artifacts/manifests/build-parameters.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_manifests_build-2Dparameters.sh&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=V1QBea-AaewU1NIrRQ3mHf1JwL3g5Y-D2I8rR7dn2b4&e=
>   --fail
> curl -o artifacts/test.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_test.sh&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=pYt5p4xasGpDNnQDOKrZLZReJaWB82sFwn_9InDwfrc&e=
>   --fail
> chmod +x artifacts/test.sh
>
> # Reproduce the baseline build (build all pre-requisites)
> ./jenkins-scripts/tcwg_kernel-build.sh @@ 
> artifacts/manifests/build-baseline.sh
>
> # Save baseline build state (which is then restored in artifacts/test.sh)
> mkdir -p ./bisect
> rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ 
> --exclude /linux/ ./ ./bisect/baseline/
>
> cd linux
>
> # Reproduce first_bad build
> git checkout --detach 3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151
> ../artifacts/test.sh
>
> # Reproduce last_good build
> git checkout --detach fd47ff55c9c31101fcc06d20cb381da3d4089bd5
> ../artifacts/test.sh
>
> cd ..
> </cut>
>
> History of pending regressions and results: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.linaro.org_toolchain_ci_base-2Dartifacts.git_log_-3Fh-3Dlinaro-2Dlocal_ci_tcwg-5Fkernel_gnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=AX39vbtaWvCsIsaoHxMZbgvV7Hoy79BNOjHwBeAWuqg&e=
>
> Artifacts: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_artifact_artifacts_&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=4n_sC92C6UWuqOYHHSoi42pqOD1Tr83WBtqqJ0WPiGo&e=
> Build log: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fkernel-2Dgnu-2Dbisect-2Dgnu-2Dmaster-2Darm-2Dmainline-2Dallmodconfig_28_consoleText&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=PrK9V3PWFnmXtkGR4JRcZkLBlWhdMDM2IPqIZsRO2qU&e=
>
> Full commit (up to 1000 lines):
> <cut>
> commit 3fe617ccafd6f5bb33c2391d6f4eeb41c1fd0151
> Author: Linus Torvalds <torva...@linux-foundation.org>
> Date:   Sun Sep 5 11:24:05 2021 -0700
>
>    Enable '-Werror' by default for all kernel builds
>
>    ... but make it a config option so that broken environments can disable
>    it when required.
>
>    We really should always have a clean build, and will disable specific
>    over-eager warnings as required, if we can't fix them.  But while I
>    fairly religiously enforce that in my own tree, it doesn't get enforced
>    by various build robots that don't necessarily report warnings.
>
>    So this just makes '-Werror' a default compiler flag, but allows people
>    to disable it for their configuration if they have some particular
>    issues.
>
>    Occasionally, new compiler versions end up enabling new warnings, and it
>    can take a while before we have them fixed (or the warnings disabled if
>    that is what it takes), so the config option allows for that situation.
>
>    Hopefully this will mean that I get fewer pull requests that have new
>    warnings that were not noticed by various automation we have in place.
>
>    Knock wood.
>
>    Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
> ---
> Makefile     |  3 +++
> init/Kconfig | 14 ++++++++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 6bc1c5b17a62..d45fc2edf186 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -785,6 +785,9 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG)      := 
> -fstack-protector-strong
>
> KBUILD_CFLAGS += $(stackp-flags-y)
>
> +KBUILD_CFLAGS-$(CONFIG_WERROR) += -Werror
> +KBUILD_CFLAGS += $(KBUILD_CFLAGS-y)
> +
> ifdef CONFIG_CC_IS_CLANG
> KBUILD_CPPFLAGS += -Qunused-arguments
> # The kernel builds with '-std=gnu89' so use of GNU extensions is acceptable.
> diff --git a/init/Kconfig b/init/Kconfig
> index e708180e9a59..8cb97f141b70 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -137,6 +137,20 @@ config COMPILE_TEST
>         here. If you are a user/distributor, say N here to exclude useless
>         drivers to be distributed.
>
> +config WERROR
> +     bool "Compile the kernel with warnings as errors"
> +     default y
> +     help
> +       A kernel build should not cause any compiler warnings, and this
> +       enables the '-Werror' flag to enforce that rule by default.
> +
> +       However, if you have a new (or very old) compiler with odd and
> +       unusual warnings, or you have some architecture with problems,
> +       you may need to disable this config option in order to
> +       successfully build the kernel.
> +
> +       If in doubt, say Y.
> +
> config UAPI_HEADER_TEST
>       bool "Compile test UAPI headers"
>       depends on HEADERS_INSTALL && CC_CAN_LINK
> </cut>

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=3SIswy3Zze4DQV1eWknNsMoyQcvNDjLb6bESKfKZOlA&s=gJmhI8Jlp_S2jgmVEjJGRXDKIqt7Fjz71CMUAHIUiUw&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=GgHZO90BaFBEYv_Szr307D4Yf4uCYylO3mQl6SPSeb4&s=cHcWW107PbmTc0JEBayK_4kUA6_BcAsgDlR8Fgc_bwI&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=QiEqLF6DJYYRMLfblIs5vW5Lqh3dTsatq4wJSYOH9YE&s=op9Lrv6EajKGKm_xtKkyJcSDfxnsV2Hbly2rVDa8a0A&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwIF-g&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=Q4Md2buFVTtZ6Y0h2OJ0uRuXgt3gqEoy7kSSvYveMRQ&s=_kYckuA3u9bvmnrOX1yxl-1FUJMZmhRLRbxoSMVkamk&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to