GCC 10 appears to have changed -O2 in order to make compilation time
faster when using -flto, seemingly at the expense of performance, in
particular with regards to how the inliner works. Since -O3 these days
shouldn't have the same set of bugs as 10 years ago, this commit
defaults new kernel compiles to -O3 when using gcc >= 10.
Cc: linux-kbuild(a)vger.kernel.org
Cc: x86(a)kernel.org
Cc: stable(a)vger.kernel.org
Cc: hjl.tools(a)gmail.com
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Jakub Jelinek <jakub(a)redhat.com>
Cc: Oleksandr Natalenko <oleksandr(a)redhat.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Andrew Morton <akpm(a)linux-foundation.org>
Cc: David Laight <David.Laight(a)aculab.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro(a)socionext.com>
Signed-off-by: Jason A. Donenfeld <Jason(a)zx2c4.com>
---
Changes v1->v2:
- [Oleksandr] Remove O3 dependency on ARC.
init/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 9e22ee8fbd75..f76ec3ccc883 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1245,7 +1245,8 @@ config BOOT_CONFIG
choice
prompt "Compiler optimization level"
- default CC_OPTIMIZE_FOR_PERFORMANCE
+ default CC_OPTIMIZE_FOR_PERFORMANCE_O3 if GCC_VERSION >= 100000
+ default CC_OPTIMIZE_FOR_PERFORMANCE if (GCC_VERSION < 100000 || CC_IS_CLANG)
config CC_OPTIMIZE_FOR_PERFORMANCE
bool "Optimize for performance (-O2)"
@@ -1256,7 +1257,6 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
config CC_OPTIMIZE_FOR_PERFORMANCE_O3
bool "Optimize more for performance (-O3)"
- depends on ARC
imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
help
Choosing this option will pass "-O3" to your compiler to optimize
--
2.26.2
This is the start of the stable review cycle for the 4.9.223 release.
There are 18 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.223-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.223-rc1
Thomas Pedersen <thomas(a)adapt-ip.com>
mac80211: add ieee80211_is_any_nullfunc()
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda: Match both PCI ID and SSID for driver blacklist
Jere Leppänen <jere.leppanen(a)nokia.com>
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
MIPS: perf: Remove incorrect odd/even counter handling for I6400
Chuck Lever <chuck.lever(a)oracle.com>
xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
Doug Berger <opendmb(a)gmail.com>
net: systemport: suppress warnings on failed Rx SKB allocations
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: suppress warnings on failed Rx SKB allocations
Nathan Chancellor <natechancellor(a)gmail.com>
lib/mpi: Fix building for powerpc with clang
Florian Fainelli <f.fainelli(a)gmail.com>
net: dsa: b53: Rework ARL bin logic
Jeremie Francois (on alpha) <jeremie.francois(a)gmail.com>
scripts/config: allow colons in option strings for sed
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: protect updating server->dstaddr with a spinlock
Julien Beraud <julien.beraud(a)orolia.com>
net: stmmac: Fix sub-second increment
Xiyu Yang <xiyuyang19(a)fudan.edu.cn>
wimax/i2400m: Fix potential urb refcnt leak
Sebastian Reichel <sebastian.reichel(a)collabora.com>
ASoC: sgtl5000: Fix VAG power-on handling
Tyler Hicks <tyhicks(a)linux.microsoft.com>
selftests/ipc: Fix test failure seen after initial test run
YueHaibing <yuehaibing(a)huawei.com>
iio:ad7797: Use correct attribute_group
Alexey Kardashevskiy <aik(a)ozlabs.ru>
powerpc/pci/of: Parse unassigned resources
Jia He <justin.he(a)arm.com>
vhost: vsock: kick send_pkt worker once device is started
-------------
Diffstat:
Makefile | 4 +--
arch/mips/kernel/perf_event_mipsxx.c | 6 +++-
arch/powerpc/kernel/pci_of_scan.c | 12 ++++++--
drivers/iio/adc/ad7793.c | 2 +-
drivers/net/dsa/b53/b53_common.c | 30 ++++++++++++++++---
drivers/net/dsa/b53/b53_regs.h | 3 ++
drivers/net/ethernet/broadcom/bcmsysport.c | 3 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +-
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 12 +++++---
drivers/net/wimax/i2400m/usb-fw.c | 1 +
drivers/vhost/vsock.c | 5 ++++
fs/cifs/connect.c | 2 ++
include/linux/ieee80211.h | 9 ++++++
lib/mpi/longlong.h | 34 +++++++++++-----------
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 8 ++---
net/mac80211/status.c | 5 ++--
net/mac80211/tx.c | 2 +-
net/sctp/sm_make_chunk.c | 6 +++-
net/sunrpc/xprtrdma/backchannel.c | 12 ++------
net/sunrpc/xprtrdma/verbs.c | 34 +++++++++++++---------
net/sunrpc/xprtrdma/xprt_rdma.h | 2 +-
scripts/config | 5 +++-
sound/pci/hda/hda_intel.c | 9 +++---
sound/soc/codecs/sgtl5000.c | 34 ++++++++++++++++++++++
sound/soc/codecs/sgtl5000.h | 1 +
tools/testing/selftests/ipc/msgque.c | 2 +-
27 files changed, 173 insertions(+), 75 deletions(-)
This is the start of the stable review cycle for the 4.14.180 release.
There are 22 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.180-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.180-rc1
Jiri Slaby <jslaby(a)suse.cz>
cgroup, netclassid: remove double cond_resched
Thomas Pedersen <thomas(a)adapt-ip.com>
mac80211: add ieee80211_is_any_nullfunc()
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda: Match both PCI ID and SSID for driver blacklist
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Reverse the order of trace_types_lock and event_mutex
Jere Leppänen <jere.leppanen(a)nokia.com>
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
Doug Berger <opendmb(a)gmail.com>
net: systemport: suppress warnings on failed Rx SKB allocations
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: suppress warnings on failed Rx SKB allocations
Nathan Chancellor <natechancellor(a)gmail.com>
lib/mpi: Fix building for powerpc with clang
Florian Fainelli <f.fainelli(a)gmail.com>
net: dsa: b53: Rework ARL bin logic
Jeremie Francois (on alpha) <jeremie.francois(a)gmail.com>
scripts/config: allow colons in option strings for sed
Philipp Rudo <prudo(a)linux.ibm.com>
s390/ftrace: fix potential crashes when switching tracers
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: protect updating server->dstaddr with a spinlock
Julien Beraud <julien.beraud(a)orolia.com>
net: stmmac: Fix sub-second increment
Julien Beraud <julien.beraud(a)orolia.com>
net: stmmac: fix enabling socfpga's ptp_ref_clock
Xiyu Yang <xiyuyang19(a)fudan.edu.cn>
wimax/i2400m: Fix potential urb refcnt leak
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry
Matthias Blankertz <matthias.blankertz(a)cetitec.com>
ASoC: rsnd: Fix HDMI channel mapping for multi-SSI mode
Sebastian Reichel <sebastian.reichel(a)collabora.com>
ASoC: sgtl5000: Fix VAG power-on handling
Tyler Hicks <tyhicks(a)linux.microsoft.com>
selftests/ipc: Fix test failure seen after initial test run
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Check return value of pcm_new_ver
Alexey Kardashevskiy <aik(a)ozlabs.ru>
powerpc/pci/of: Parse unassigned resources
Jia He <justin.he(a)arm.com>
vhost: vsock: kick send_pkt worker once device is started
-------------
Diffstat:
Makefile | 4 +--
arch/powerpc/kernel/pci_of_scan.c | 12 ++++++--
arch/s390/kernel/diag.c | 2 +-
arch/s390/kernel/smp.c | 4 +--
arch/s390/kernel/trace.c | 2 +-
drivers/net/dsa/b53/b53_common.c | 30 ++++++++++++++++---
drivers/net/dsa/b53/b53_regs.h | 3 ++
drivers/net/ethernet/broadcom/bcmsysport.c | 3 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +-
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 9 ++++--
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 12 +++++---
drivers/net/wimax/i2400m/usb-fw.c | 1 +
drivers/vhost/vsock.c | 5 ++++
fs/cifs/connect.c | 2 ++
include/linux/ieee80211.h | 9 ++++++
kernel/trace/trace.c | 5 ++++
kernel/trace/trace_events.c | 31 ++++++++++----------
lib/mpi/longlong.h | 34 +++++++++++-----------
net/core/netclassid_cgroup.c | 4 +--
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 8 ++---
net/mac80211/status.c | 5 ++--
net/mac80211/tx.c | 2 +-
net/sctp/sm_make_chunk.c | 6 +++-
scripts/config | 5 +++-
sound/pci/hda/hda_intel.c | 9 +++---
sound/soc/codecs/hdac_hdmi.c | 6 ++--
sound/soc/codecs/sgtl5000.c | 34 ++++++++++++++++++++++
sound/soc/codecs/sgtl5000.h | 1 +
sound/soc/sh/rcar/ssiu.c | 2 +-
sound/soc/soc-topology.c | 4 ++-
tools/testing/selftests/ipc/msgque.c | 2 +-
32 files changed, 182 insertions(+), 79 deletions(-)
This is the start of the stable review cycle for the 4.19.122 release.
There are 32 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.122-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.122-rc1
Daniel Vetter <daniel.vetter(a)ffwll.ch>
drm/atomic: Take the atomic toys away from X
Jiri Slaby <jslaby(a)suse.cz>
cgroup, netclassid: remove double cond_resched
Thomas Pedersen <thomas(a)adapt-ip.com>
mac80211: add ieee80211_is_any_nullfunc()
Hans de Goede <hdegoede(a)redhat.com>
platform/x86: GPD pocket fan: Fix error message when temp-limits are out of range
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda: Match both PCI ID and SSID for driver blacklist
Nick Desaulniers <ndesaulniers(a)google.com>
hexagon: define ioremap_uc
Christoph Hellwig <hch(a)lst.de>
hexagon: clean up ioremap
Tuowen Zhao <ztuowen(a)gmail.com>
mfd: intel-lpss: Use devm_ioremap_uc for MMIO
Tuowen Zhao <ztuowen(a)gmail.com>
lib: devres: add a helper function for ioremap_uc
Aaron Ma <aaron.ma(a)canonical.com>
drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event
Jere Leppänen <jere.leppanen(a)nokia.com>
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
Doug Berger <opendmb(a)gmail.com>
net: systemport: suppress warnings on failed Rx SKB allocations
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: suppress warnings on failed Rx SKB allocations
Nathan Chancellor <natechancellor(a)gmail.com>
lib/mpi: Fix building for powerpc with clang
Jeremie Francois (on alpha) <jeremie.francois(a)gmail.com>
scripts/config: allow colons in option strings for sed
Philipp Rudo <prudo(a)linux.ibm.com>
s390/ftrace: fix potential crashes when switching tracers
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: protect updating server->dstaddr with a spinlock
Matthias Blankertz <matthias.blankertz(a)cetitec.com>
ASoC: rsnd: Fix "status check failed" spam for multi-SSI
Matthias Blankertz <matthias.blankertz(a)cetitec.com>
ASoC: rsnd: Don't treat master SSI in multi SSI setup as parent
Julien Beraud <julien.beraud(a)orolia.com>
net: stmmac: Fix sub-second increment
Julien Beraud <julien.beraud(a)orolia.com>
net: stmmac: fix enabling socfpga's ptp_ref_clock
Xiyu Yang <xiyuyang19(a)fudan.edu.cn>
wimax/i2400m: Fix potential urb refcnt leak
Sandeep Raghuraman <sandy.8925(a)gmail.com>
drm/amdgpu: Correctly initialize thermal controller for GPUs with Powerplay table v0 (e.g Hawaii)
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry
Matthias Blankertz <matthias.blankertz(a)cetitec.com>
ASoC: rsnd: Fix HDMI channel mapping for multi-SSI mode
Matthias Blankertz <matthias.blankertz(a)cetitec.com>
ASoC: rsnd: Fix parent SSI start/stop in multi-SSI mode
Thinh Nguyen <Thinh.Nguyen(a)synopsys.com>
usb: dwc3: gadget: Properly set maxpacket limit
Sebastian Reichel <sebastian.reichel(a)collabora.com>
ASoC: sgtl5000: Fix VAG power-on handling
Tyler Hicks <tyhicks(a)linux.microsoft.com>
selftests/ipc: Fix test failure seen after initial test run
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Check return value of pcm_new_ver
Alexey Kardashevskiy <aik(a)ozlabs.ru>
powerpc/pci/of: Parse unassigned resources
Jia He <justin.he(a)arm.com>
vhost: vsock: kick send_pkt worker once device is started
-------------
Diffstat:
Makefile | 4 +-
arch/hexagon/include/asm/io.h | 12 ++---
arch/hexagon/kernel/hexagon_ksyms.c | 2 +-
arch/hexagon/mm/ioremap.c | 2 +-
arch/powerpc/kernel/pci_of_scan.c | 12 ++++-
arch/s390/kernel/diag.c | 2 +-
arch/s390/kernel/smp.c | 4 +-
arch/s390/kernel/trace.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +-
.../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 26 +++++++++++
drivers/gpu/drm/drm_ioctl.c | 7 ++-
drivers/mfd/intel-lpss.c | 2 +-
drivers/net/ethernet/broadcom/bcmsysport.c | 3 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +-
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 9 ++--
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 12 +++--
drivers/net/wimax/i2400m/usb-fw.c | 1 +
drivers/platform/x86/gpd-pocket-fan.c | 2 +-
drivers/usb/dwc3/core.h | 4 ++
drivers/usb/dwc3/gadget.c | 52 +++++++++++++++++-----
drivers/vhost/vsock.c | 5 +++
fs/cifs/connect.c | 2 +
include/linux/ieee80211.h | 9 ++++
include/linux/io.h | 2 +
lib/devres.c | 19 ++++++++
lib/mpi/longlong.h | 34 +++++++-------
net/core/netclassid_cgroup.c | 4 +-
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 8 ++--
net/mac80211/status.c | 5 +--
net/mac80211/tx.c | 2 +-
net/sctp/sm_make_chunk.c | 6 ++-
scripts/config | 5 ++-
sound/pci/hda/hda_intel.c | 9 ++--
sound/soc/codecs/hdac_hdmi.c | 6 +--
sound/soc/codecs/sgtl5000.c | 34 ++++++++++++++
sound/soc/codecs/sgtl5000.h | 1 +
sound/soc/sh/rcar/ssi.c | 11 ++++-
sound/soc/sh/rcar/ssiu.c | 2 +-
sound/soc/soc-topology.c | 4 +-
tools/testing/selftests/ipc/msgque.c | 2 +-
41 files changed, 250 insertions(+), 86 deletions(-)
Changes since v1:
- Rename memcpy_mcsafe() to copy_safe() since the x86-machine-check
specifics have already been de-emphasized in a previous commit and are
further de-emphasized by these changes. (Linus)
- Move copy_safe() out-of-line since it no longer reverts to plain
memcpy (Linus)
- Move copy_safe() to its own stand-alone compilation unit where it no
longer entangles with arch/x86/lib/memcpy_64.S. This also allows perf
to stop tracking ongoing updates to that file due to copy_safe()
updates. (Linus)
- Move the PowerPC implementation over to the new name.
[1]: http://lore.kernel.org/r/158654083112.1572482.8944305411228188871.stgit@dwi…
---
The primary motivation to go touch memcpy_mcsafe() is that the existing
benefit of doing slow and careful copies is obviated on newer CPUs. That
fact solves the problem of needing to detect machine-check recovery
capability. Now the old "mcsafe_key" opt-in to careful copying can be made
an opt-out from the default fast copy implementation.
The discussion with Linus further made clear that this facility had
already lost its x86-machine-check specificity starting with commit
2c89130a56a ("x86/asm/memcpy_mcsafe: Add write-protection-fault
handling"). The new changes to not require a "careful copy" further
de-emphasizes the role that x86-MCA plays in the implementation to just
one more source of recoverable trap during the operation.
With the above realizations the name "mcsafe" is no longer accurate and
copy_safe() is proposed as its replacement. x86 grows a copy_safe_fast()
implementation as a default implementation that is independent of
detecting the presence of x86-MCA.
---
Dan Williams (2):
copy_safe: Rename memcpy_mcsafe() to copy_safe()
x86/copy_safe: Introduce copy_safe_fast()
arch/powerpc/Kconfig | 2
arch/powerpc/include/asm/string.h | 2
arch/powerpc/include/asm/uaccess.h | 4
arch/powerpc/lib/Makefile | 2
arch/powerpc/lib/copy_safe.S | 4
arch/x86/Kconfig | 2
arch/x86/Kconfig.debug | 2
arch/x86/include/asm/copy_safe.h | 18 ++
arch/x86/include/asm/copy_safe_test.h | 75 +++++++++
arch/x86/include/asm/mcsafe_test.h | 75 ---------
arch/x86/include/asm/string_64.h | 32 ----
arch/x86/include/asm/uaccess_64.h | 21 ---
arch/x86/kernel/cpu/mce/core.c | 9 -
arch/x86/kernel/quirks.c | 10 -
arch/x86/lib/Makefile | 1
arch/x86/lib/copy_safe.c | 66 ++++++++
arch/x86/lib/copy_safe_64.S | 163 ++++++++++++++++++++
arch/x86/lib/memcpy_64.S | 115 --------------
arch/x86/lib/usercopy_64.c | 21 ---
drivers/md/dm-writecache.c | 12 +
drivers/nvdimm/claim.c | 2
drivers/nvdimm/pmem.c | 6 -
include/linux/string.h | 17 +-
include/linux/uio.h | 10 +
lib/Kconfig | 2
lib/iov_iter.c | 36 ++--
tools/arch/x86/include/asm/copy_safe_test.h | 13 ++
tools/arch/x86/include/asm/mcsafe_test.h | 13 --
tools/arch/x86/lib/memcpy_64.S | 115 --------------
tools/objtool/check.c | 5 -
tools/perf/bench/Build | 1
tools/perf/bench/mem-memcpy-x86-64-lib.c | 24 ---
tools/testing/nvdimm/test/nfit.c | 49 +++---
.../testing/selftests/powerpc/copyloops/.gitignore | 2
tools/testing/selftests/powerpc/copyloops/Makefile | 6 -
.../selftests/powerpc/copyloops/copy_safe.S | 0
36 files changed, 429 insertions(+), 508 deletions(-)
rename arch/powerpc/lib/{memcpy_mcsafe_64.S => copy_safe.S} (98%)
create mode 100644 arch/x86/include/asm/copy_safe.h
create mode 100644 arch/x86/include/asm/copy_safe_test.h
delete mode 100644 arch/x86/include/asm/mcsafe_test.h
create mode 100644 arch/x86/lib/copy_safe.c
create mode 100644 arch/x86/lib/copy_safe_64.S
create mode 100644 tools/arch/x86/include/asm/copy_safe_test.h
delete mode 100644 tools/arch/x86/include/asm/mcsafe_test.h
delete mode 100644 tools/perf/bench/mem-memcpy-x86-64-lib.c
rename tools/testing/selftests/powerpc/copyloops/{memcpy_mcsafe_64.S => copy_safe.S} (100%)
base-commit: b8dcd632c06b8706d22934f9bf9bf16a42b1ecc7