Skip to content

Commit a4f1ad4

Browse files
committed
Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y
2 parents 1f48215 + e4f2aee commit a4f1ad4

File tree

300 files changed

+3970
-1366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+3970
-1366
lines changed

Documentation/devicetree/bindings/net/ethernet-phy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ properties:
9191
compensate for the board being designed with the lanes
9292
swapped.
9393

94+
enet-phy-lane-no-swap:
95+
$ref: /schemas/types.yaml#/definitions/flag
96+
description:
97+
If set, indicates that PHY will disable swap of the
98+
TX/RX lanes. This property allows the PHY to work correcly after
99+
e.g. wrong bootstrap configuration caused by issues in PCB
100+
layout design.
101+
94102
eee-broken-100tx:
95103
$ref: /schemas/types.yaml#definitions/flag
96104
description:

Documentation/kbuild/gcc-plugins.rst

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ compiler [1]_. They are useful for runtime instrumentation and static analysis.
1111
We can analyse, change and add further code during compilation via
1212
callbacks [2]_, GIMPLE [3]_, IPA [4]_ and RTL passes [5]_.
1313

14-
The GCC plugin infrastructure of the kernel supports all gcc versions from
15-
4.5 to 6.0, building out-of-tree modules, cross-compilation and building in a
16-
separate directory.
17-
Plugin source files have to be compilable by both a C and a C++ compiler as well
18-
because gcc versions 4.5 and 4.6 are compiled by a C compiler,
19-
gcc-4.7 can be compiled by a C or a C++ compiler,
20-
and versions 4.8+ can only be compiled by a C++ compiler.
14+
The GCC plugin infrastructure of the kernel supports building out-of-tree
15+
modules, cross-compilation and building in a separate directory.
16+
Plugin source files have to be compilable by a C++ compiler.
2117

22-
Currently the GCC plugin infrastructure supports only the x86, arm, arm64 and
23-
powerpc architectures.
18+
Currently the GCC plugin infrastructure supports only some architectures.
19+
Grep "select HAVE_GCC_PLUGINS" to find out which architectures support
20+
GCC plugins.
2421

2522
This infrastructure was ported from grsecurity [6]_ and PaX [7]_.
2623

@@ -47,42 +44,39 @@ Files
4744
This is a compatibility header for GCC plugins.
4845
It should be always included instead of individual gcc headers.
4946

50-
**$(src)/scripts/gcc-plugin.sh**
51-
52-
This script checks the availability of the included headers in
53-
gcc-common.h and chooses the proper host compiler to build the plugins
54-
(gcc-4.7 can be built by either gcc or g++).
55-
5647
**$(src)/scripts/gcc-plugins/gcc-generate-gimple-pass.h,
5748
$(src)/scripts/gcc-plugins/gcc-generate-ipa-pass.h,
5849
$(src)/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h,
5950
$(src)/scripts/gcc-plugins/gcc-generate-rtl-pass.h**
6051

6152
These headers automatically generate the registration structures for
62-
GIMPLE, SIMPLE_IPA, IPA and RTL passes. They support all gcc versions
63-
from 4.5 to 6.0.
53+
GIMPLE, SIMPLE_IPA, IPA and RTL passes.
6454
They should be preferred to creating the structures by hand.
6555

6656

6757
Usage
6858
=====
6959

7060
You must install the gcc plugin headers for your gcc version,
71-
e.g., on Ubuntu for gcc-4.9::
61+
e.g., on Ubuntu for gcc-10::
7262

73-
apt-get install gcc-4.9-plugin-dev
63+
apt-get install gcc-10-plugin-dev
7464

7565
Or on Fedora::
7666

7767
dnf install gcc-plugin-devel
7868

79-
Enable a GCC plugin based feature in the kernel config::
69+
Enable the GCC plugin infrastructure and some plugin(s) you want to use
70+
in the kernel config::
8071

81-
CONFIG_GCC_PLUGIN_CYC_COMPLEXITY = y
72+
CONFIG_GCC_PLUGINS=y
73+
CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=y
74+
CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y
75+
...
8276

83-
To compile only the plugin(s)::
77+
To compile the minimum tool set including the plugin(s)::
8478

85-
make gcc-plugins
79+
make scripts
8680

8781
or just run the kernel make and compile the whole kernel with
8882
the cyclomatic complexity GCC plugin.
@@ -91,7 +85,8 @@ the cyclomatic complexity GCC plugin.
9185
4. How to add a new GCC plugin
9286
==============================
9387

94-
The GCC plugins are in $(src)/scripts/gcc-plugins/. You can use a file or a directory
95-
here. It must be added to $(src)/scripts/gcc-plugins/Makefile,
96-
$(src)/scripts/Makefile.gcc-plugins and $(src)/arch/Kconfig.
88+
The GCC plugins are in scripts/gcc-plugins/. You need to put plugin source files
89+
right under scripts/gcc-plugins/. Creating subdirectories is not supported.
90+
It must be added to scripts/gcc-plugins/Makefile, scripts/Makefile.gcc-plugins
91+
and a relevant Kconfig file.
9792
See the cyc_complexity_plugin.c (CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) GCC plugin.

Documentation/locking/locktypes.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,9 @@ preemption. The following substitution works on both kernels::
439439
spin_lock(&p->lock);
440440
p->count += this_cpu_read(var2);
441441

442-
On a non-PREEMPT_RT kernel migrate_disable() maps to preempt_disable()
443-
which makes the above code fully equivalent. On a PREEMPT_RT kernel
444442
migrate_disable() ensures that the task is pinned on the current CPU which
445443
in turn guarantees that the per-CPU access to var1 and var2 are staying on
446-
the same CPU.
444+
the same CPU while the task remains preemptible.
447445

448446
The migrate_disable() substitution is not valid for the following
449447
scenario::
@@ -456,9 +454,8 @@ scenario::
456454
p = this_cpu_ptr(&var1);
457455
p->val = func2();
458456

459-
While correct on a non-PREEMPT_RT kernel, this breaks on PREEMPT_RT because
460-
here migrate_disable() does not protect against reentrancy from a
461-
preempting task. A correct substitution for this case is::
457+
This breaks because migrate_disable() does not protect against reentrancy from
458+
a preempting task. A correct substitution for this case is::
462459

463460
func()
464461
{

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7341,7 +7341,6 @@ L: [email protected]
73417341
S: Maintained
73427342
F: Documentation/kbuild/gcc-plugins.rst
73437343
F: scripts/Makefile.gcc-plugins
7344-
F: scripts/gcc-plugin.sh
73457344
F: scripts/gcc-plugins/
73467345

73477346
GCOV BASED KERNEL PROFILING

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 83
4+
SUBLEVEL = 85
55
EXTRAVERSION =
66
NAME = Dare mighty things
77

arch/arm64/include/asm/kvm_arm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H)
8484

8585
/* TCR_EL2 Registers bits */
86-
#define TCR_EL2_RES1 ((1 << 31) | (1 << 23))
86+
#define TCR_EL2_RES1 ((1U << 31) | (1 << 23))
8787
#define TCR_EL2_TBI (1 << 20)
8888
#define TCR_EL2_PS_SHIFT 16
8989
#define TCR_EL2_PS_MASK (7 << TCR_EL2_PS_SHIFT)
@@ -268,7 +268,7 @@
268268
#define CPTR_EL2_TFP_SHIFT 10
269269

270270
/* Hyp Coprocessor Trap Register */
271-
#define CPTR_EL2_TCPAC (1 << 31)
271+
#define CPTR_EL2_TCPAC (1U << 31)
272272
#define CPTR_EL2_TAM (1 << 30)
273273
#define CPTR_EL2_TTA (1 << 20)
274274
#define CPTR_EL2_TFP (1 << CPTR_EL2_TFP_SHIFT)

arch/arm64/kernel/entry-ftrace.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,17 @@
7777
.endm
7878

7979
SYM_CODE_START(ftrace_regs_caller)
80+
#ifdef BTI_C
81+
BTI_C
82+
#endif
8083
ftrace_regs_entry 1
8184
b ftrace_common
8285
SYM_CODE_END(ftrace_regs_caller)
8386

8487
SYM_CODE_START(ftrace_caller)
88+
#ifdef BTI_C
89+
BTI_C
90+
#endif
8591
ftrace_regs_entry 0
8692
b ftrace_common
8793
SYM_CODE_END(ftrace_caller)

arch/csky/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ asmlinkage void do_trap_illinsn(struct pt_regs *regs)
211211

212212
asmlinkage void do_trap_fpe(struct pt_regs *regs)
213213
{
214-
#ifdef CONFIG_CPU_HAS_FP
214+
#ifdef CONFIG_CPU_HAS_FPU
215215
return fpu_fpe(regs);
216216
#else
217217
do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->pc,
@@ -221,7 +221,7 @@ asmlinkage void do_trap_fpe(struct pt_regs *regs)
221221

222222
asmlinkage void do_trap_priv(struct pt_regs *regs)
223223
{
224-
#ifdef CONFIG_CPU_HAS_FP
224+
#ifdef CONFIG_CPU_HAS_FPU
225225
if (user_mode(regs) && fpu_libc_helper(regs))
226226
return;
227227
#endif

arch/parisc/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
# Mike Shaver, Helge Deller and Martin K. Petersen
1818
#
1919

20+
ifdef CONFIG_PARISC_SELF_EXTRACT
21+
boot := arch/parisc/boot
22+
KBUILD_IMAGE := $(boot)/bzImage
23+
else
2024
KBUILD_IMAGE := vmlinuz
25+
endif
2126

2227
NM = sh $(srctree)/arch/parisc/nm
2328
CHECKFLAGS += -D__hppa__=1

arch/parisc/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ verify "$3"
3939
if [ -n "${INSTALLKERNEL}" ]; then
4040
if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
4141
if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
42+
if [ -x /usr/sbin/${INSTALLKERNEL} ]; then exec /usr/sbin/${INSTALLKERNEL} "$@"; fi
4243
fi
4344

4445
# Default install

arch/parisc/kernel/time.c

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -252,27 +252,13 @@ void __init time_init(void)
252252
static int __init init_cr16_clocksource(void)
253253
{
254254
/*
255-
* The cr16 interval timers are not syncronized across CPUs on
256-
* different sockets, so mark them unstable and lower rating on
257-
* multi-socket SMP systems.
255+
* The cr16 interval timers are not syncronized across CPUs, even if
256+
* they share the same socket.
258257
*/
259258
if (num_online_cpus() > 1 && !running_on_qemu) {
260-
int cpu;
261-
unsigned long cpu0_loc;
262-
cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;
263-
264-
for_each_online_cpu(cpu) {
265-
if (cpu == 0)
266-
continue;
267-
if ((cpu0_loc != 0) &&
268-
(cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
269-
continue;
270-
271-
clocksource_cr16.name = "cr16_unstable";
272-
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
273-
clocksource_cr16.rating = 0;
274-
break;
275-
}
259+
clocksource_cr16.name = "cr16_unstable";
260+
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
261+
clocksource_cr16.rating = 0;
276262
}
277263

278264
/* XXX: We may want to mark sched_clock stable here if cr16 clocks are

arch/powerpc/platforms/pseries/iommu.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,15 +1034,6 @@ static phys_addr_t ddw_memory_hotplug_max(void)
10341034
phys_addr_t max_addr = memory_hotplug_max();
10351035
struct device_node *memory;
10361036

1037-
/*
1038-
* The "ibm,pmemory" can appear anywhere in the address space.
1039-
* Assuming it is still backed by page structs, set the upper limit
1040-
* for the huge DMA window as MAX_PHYSMEM_BITS.
1041-
*/
1042-
if (of_find_node_by_type(NULL, "ibm,pmemory"))
1043-
return (sizeof(phys_addr_t) * 8 <= MAX_PHYSMEM_BITS) ?
1044-
(phys_addr_t) -1 : (1ULL << MAX_PHYSMEM_BITS);
1045-
10461037
for_each_node_by_type(memory, "memory") {
10471038
unsigned long start, size;
10481039
int n_mem_addr_cells, n_mem_size_cells, len;

arch/s390/include/asm/pci_io.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
/* I/O Map */
1616
#define ZPCI_IOMAP_SHIFT 48
17-
#define ZPCI_IOMAP_ADDR_BASE 0x8000000000000000UL
17+
#define ZPCI_IOMAP_ADDR_SHIFT 62
18+
#define ZPCI_IOMAP_ADDR_BASE (1UL << ZPCI_IOMAP_ADDR_SHIFT)
1819
#define ZPCI_IOMAP_ADDR_OFF_MASK ((1UL << ZPCI_IOMAP_SHIFT) - 1)
1920
#define ZPCI_IOMAP_MAX_ENTRIES \
20-
((ULONG_MAX - ZPCI_IOMAP_ADDR_BASE + 1) / (1UL << ZPCI_IOMAP_SHIFT))
21+
(1UL << (ZPCI_IOMAP_ADDR_SHIFT - ZPCI_IOMAP_SHIFT))
2122
#define ZPCI_IOMAP_ADDR_IDX_MASK \
22-
(~ZPCI_IOMAP_ADDR_OFF_MASK - ZPCI_IOMAP_ADDR_BASE)
23+
((ZPCI_IOMAP_ADDR_BASE - 1) & ~ZPCI_IOMAP_ADDR_OFF_MASK)
2324

2425
struct zpci_iomap_entry {
2526
u32 fh;

arch/s390/kernel/setup.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,6 @@ static void __init setup_memory(void)
845845
storage_key_init_range(start, end);
846846

847847
psw_set_key(PAGE_DEFAULT_KEY);
848-
849-
/* Only cosmetics */
850-
memblock_enforce_memory_limit(memblock_end_of_DRAM());
851848
}
852849

853850
/*

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,7 @@ config EFI
19391939
depends on ACPI
19401940
select UCS2_STRING
19411941
select EFI_RUNTIME_WRAPPERS
1942+
select ARCH_USE_MEMREMAP_PROT
19421943
help
19431944
This enables the kernel to use EFI runtime services that are
19441945
available (such as the EFI variable services).

0 commit comments

Comments
 (0)