Skip to content

Commit 9a8b3d5

Browse files
committed
Merge tag 'mips_5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer: - added support for QCN550x (ath79) - enabled KCSAN - removed TX39XX support - various cleanups and fixes * tag 'mips_5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (31 commits) MIPS: Fix build error for loongson64 and sgi-ip27 MIPS: ingenic: correct unit node address MIPS: Fix wrong comments in asm/prom.h MIPS: Remove redundant definitions of device_tree_init() MIPS: Remove redundant check in device_tree_init() MIPS: pgalloc: fix memory leak caused by pgd_free() MIPS: RB532: fix return value of __setup handler MIPS: Only use current_stack_pointer on GCC MIPS: boot/compressed: Use array reference for image bounds mips: cdmm: Fix refcount leak in mips_cdmm_phys_base mips: remove reference to "newer Loongson-3" mips: Always permit to build u-boot images MIPS: Sanitise Cavium switch cases in TLB handler synthesizers DEC: Limit PMAX memory probing to R3k systems mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n MIPS: fix fortify panic when copying asm exception handlers mips: ralink: fix a refcount leak in ill_acc_of_setup() mips: Implement "current_stack_pointer" MIPS: Remove TX39XX support MIPS: Modernize READ_IMPLIES_EXEC ...
2 parents 34af78c + f8f9f21 commit 9a8b3d5

File tree

119 files changed

+194
-2455
lines changed

Some content is hidden

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

119 files changed

+194
-2455
lines changed

arch/mips/Kbuild.platforms

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ platform-$(CONFIG_SIBYTE_SB1250) += sibyte/
3232
platform-$(CONFIG_SIBYTE_BCM1x55) += sibyte/
3333
platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/
3434
platform-$(CONFIG_SNI_RM) += sni/
35-
platform-$(CONFIG_MACH_TX39XX) += txx9/
3635
platform-$(CONFIG_MACH_TX49XX) += txx9/
3736
platform-$(CONFIG_MACH_VR41XX) += vr41xx/
3837

arch/mips/Kconfig

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config MIPS
44
default y
55
select ARCH_32BIT_OFF_T if !64BIT
66
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
7+
select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000
78
select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
89
select ARCH_HAS_FORTIFY_SOURCE
910
select ARCH_HAS_KCOV
@@ -101,6 +102,7 @@ config MIPS
101102
select TRACE_IRQFLAGS_SUPPORT
102103
select VIRT_TO_BUS
103104
select ARCH_HAS_ELFCORE_COMPAT
105+
select HAVE_ARCH_KCSAN if 64BIT
104106

105107
config MIPS_FIXUP_BIGPHYS_ADDR
106108
bool
@@ -511,6 +513,7 @@ config MACH_LOONGSON64
511513
select USE_OF
512514
select BUILTIN_DTB
513515
select PCI_HOST_GENERIC
516+
select HAVE_ARCH_NODEDATA_EXTENSION if NUMA
514517
help
515518
This enables the support of Loongson-2/3 family of machines.
516519

@@ -707,6 +710,7 @@ config SGI_IP27
707710
select WAR_R10000_LLSC
708711
select MIPS_L1_CACHE_SHIFT_7
709712
select NUMA
713+
select HAVE_ARCH_NODEDATA_EXTENSION
710714
help
711715
This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
712716
workstations. To compile a Linux kernel that runs on these, say Y
@@ -926,9 +930,6 @@ config SNI_RM
926930
Technology and now in turn merged with Fujitsu. Say Y here to
927931
support this machine type.
928932

929-
config MACH_TX39XX
930-
bool "Toshiba TX39 series based machines"
931-
932933
config MACH_TX49XX
933934
bool "Toshiba TX49 series based machines"
934935
select WAR_TX49XX_ICACHE_INDEX_INV
@@ -1343,19 +1344,14 @@ config LOONGSON3_ENHANCEMENT
13431344
new Loongson-3 machines only, please say 'Y' here.
13441345

13451346
config CPU_LOONGSON3_WORKAROUNDS
1346-
bool "Old Loongson-3 LLSC Workarounds"
1347+
bool "Loongson-3 LLSC Workarounds"
13471348
default y if SMP
13481349
depends on CPU_LOONGSON64
13491350
help
13501351
Loongson-3 processors have the llsc issues which require workarounds.
13511352
Without workarounds the system may hang unexpectedly.
13521353

1353-
Newer Loongson-3 will fix these issues and no workarounds are needed.
1354-
The workarounds have no significant side effect on them but may
1355-
decrease the performance of the system so this option should be
1356-
disabled unless the kernel is intended to be run on old systems.
1357-
1358-
If unsure, please say Y.
1354+
Say Y, unless you know what you are doing.
13591355

13601356
config CPU_LOONGSON3_CPUCFG_EMULATION
13611357
bool "Emulate the CPUCFG instruction on older Loongson cores"
@@ -1583,12 +1579,6 @@ config CPU_R3000
15831579
might be a safe bet. If the resulting kernel does not work,
15841580
try to recompile with R3000.
15851581

1586-
config CPU_TX39XX
1587-
bool "R39XX"
1588-
depends on SYS_HAS_CPU_TX39XX
1589-
select CPU_SUPPORTS_32BIT_KERNEL
1590-
select CPU_R3K_TLB
1591-
15921582
config CPU_VR41XX
15931583
bool "R41xx"
15941584
depends on SYS_HAS_CPU_VR41XX
@@ -1915,9 +1905,6 @@ config SYS_HAS_CPU_P5600
19151905
config SYS_HAS_CPU_R3000
19161906
bool
19171907

1918-
config SYS_HAS_CPU_TX39XX
1919-
bool
1920-
19211908
config SYS_HAS_CPU_VR41XX
19221909
bool
19231910

@@ -2148,7 +2135,7 @@ config PAGE_SIZE_8KB
21482135

21492136
config PAGE_SIZE_16KB
21502137
bool "16kB"
2151-
depends on !CPU_R3000 && !CPU_TX39XX
2138+
depends on !CPU_R3000
21522139
help
21532140
Using 16kB page size will result in higher performance kernel at
21542141
the price of higher memory consumption. This option is available on
@@ -2167,7 +2154,7 @@ config PAGE_SIZE_32KB
21672154

21682155
config PAGE_SIZE_64KB
21692156
bool "64kB"
2170-
depends on !CPU_R3000 && !CPU_TX39XX
2157+
depends on !CPU_R3000
21712158
help
21722159
Using 64kB page size will result in higher performance kernel at
21732160
the price of higher memory consumption. This option is available on
@@ -2235,7 +2222,7 @@ config CPU_HAS_PREFETCH
22352222

22362223
config CPU_GENERIC_DUMP_TLB
22372224
bool
2238-
default y if !(CPU_R3000 || CPU_TX39XX)
2225+
default y if !CPU_R3000
22392226

22402227
config MIPS_FP_SUPPORT
22412228
bool "Floating Point support" if EXPERT
@@ -2255,7 +2242,7 @@ config MIPS_FP_SUPPORT
22552242
config CPU_R2300_FPU
22562243
bool
22572244
depends on MIPS_FP_SUPPORT
2258-
default y if CPU_R3000 || CPU_TX39XX
2245+
default y if CPU_R3000
22592246

22602247
config CPU_R3K_TLB
22612248
bool
@@ -2520,13 +2507,51 @@ config CPU_HAS_SYNC
25202507
#
25212508
# CPU non-features
25222509
#
2510+
2511+
# Work around the "daddi" and "daddiu" CPU errata:
2512+
#
2513+
# - The `daddi' instruction fails to trap on overflow.
2514+
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2515+
# erratum #23
2516+
#
2517+
# - The `daddiu' instruction can produce an incorrect result.
2518+
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2519+
# erratum #41
2520+
# "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2521+
# #15
2522+
# "MIPS R4400PC/SC Errata, Processor Revision 1.0", erratum #7
2523+
# "MIPS R4400MC Errata, Processor Revision 1.0", erratum #5
25232524
config CPU_DADDI_WORKAROUNDS
25242525
bool
25252526

2527+
# Work around certain R4000 CPU errata (as implemented by GCC):
2528+
#
2529+
# - A double-word or a variable shift may give an incorrect result
2530+
# if executed immediately after starting an integer division:
2531+
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2532+
# erratum #28
2533+
# "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2534+
# #19
2535+
#
2536+
# - A double-word or a variable shift may give an incorrect result
2537+
# if executed while an integer multiplication is in progress:
2538+
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2539+
# errata #16 & #28
2540+
#
2541+
# - An integer division may give an incorrect result if started in
2542+
# a delay slot of a taken branch or a jump:
2543+
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2544+
# erratum #52
25262545
config CPU_R4000_WORKAROUNDS
25272546
bool
25282547
select CPU_R4400_WORKAROUNDS
25292548

2549+
# Work around certain R4400 CPU errata (as implemented by GCC):
2550+
#
2551+
# - A double-word or a variable shift may give an incorrect result
2552+
# if executed immediately after starting an integer division:
2553+
# "MIPS R4400MC Errata, Processor Revision 1.0", erratum #10
2554+
# "MIPS R4400MC Errata, Processor Revision 2.0 & 3.0", erratum #4
25302555
config CPU_R4400_WORKAROUNDS
25312556
bool
25322557

@@ -2536,13 +2561,13 @@ config CPU_R4X00_BUGS64
25362561

25372562
config MIPS_ASID_SHIFT
25382563
int
2539-
default 6 if CPU_R3000 || CPU_TX39XX
2564+
default 6 if CPU_R3000
25402565
default 0
25412566

25422567
config MIPS_ASID_BITS
25432568
int
25442569
default 0 if MIPS_ASID_BITS_VARIABLE
2545-
default 6 if CPU_R3000 || CPU_TX39XX
2570+
default 6 if CPU_R3000
25462571
default 8
25472572

25482573
config MIPS_ASID_BITS_VARIABLE
@@ -2685,6 +2710,9 @@ config NUMA
26852710
config SYS_SUPPORTS_NUMA
26862711
bool
26872712

2713+
config HAVE_ARCH_NODEDATA_EXTENSION
2714+
bool
2715+
26882716
config RELOCATABLE
26892717
bool "Relocatable kernel"
26902718
depends on SYS_SUPPORTS_RELOCATABLE
@@ -3202,6 +3230,10 @@ config MIPS32_N32
32023230

32033231
If unsure, say N.
32043232

3233+
config CC_HAS_MNO_BRANCH_LIKELY
3234+
def_bool y
3235+
depends on $(cc-option,-mno-branch-likely)
3236+
32053237
menu "Power management options"
32063238

32073239
config ARCH_HIBERNATION_POSSIBLE

arch/mips/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
158158
# CPU-dependent compiler/assembler options for optimization.
159159
#
160160
cflags-$(CONFIG_CPU_R3000) += -march=r3000
161-
cflags-$(CONFIG_CPU_TX39XX) += -march=r3900
162161
cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
163162
cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
164163
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
@@ -340,14 +339,12 @@ drivers-$(CONFIG_PM) += arch/mips/power/
340339
boot-y := vmlinux.bin
341340
boot-y += vmlinux.ecoff
342341
boot-y += vmlinux.srec
343-
ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0)
344342
boot-y += uImage
345343
boot-y += uImage.bin
346344
boot-y += uImage.bz2
347345
boot-y += uImage.gz
348346
boot-y += uImage.lzma
349347
boot-y += uImage.lzo
350-
endif
351348
boot-y += vmlinux.itb
352349
boot-y += vmlinux.gz.itb
353350
boot-y += vmlinux.bz2.itb
@@ -359,9 +356,7 @@ bootz-y := vmlinuz
359356
bootz-y += vmlinuz.bin
360357
bootz-y += vmlinuz.ecoff
361358
bootz-y += vmlinuz.srec
362-
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
363359
bootz-y += uzImage.bin
364-
endif
365360
bootz-y += vmlinuz.itb
366361

367362
#

arch/mips/ath25/ar2315.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int ar2315_misc_irq_map(struct irq_domain *d, unsigned irq,
112112
return 0;
113113
}
114114

115-
static struct irq_domain_ops ar2315_misc_irq_domain_ops = {
115+
static const struct irq_domain_ops ar2315_misc_irq_domain_ops = {
116116
.map = ar2315_misc_irq_map,
117117
};
118118

arch/mips/ath25/ar5312.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int ar5312_misc_irq_map(struct irq_domain *d, unsigned irq,
116116
return 0;
117117
}
118118

119-
static struct irq_domain_ops ar5312_misc_irq_domain_ops = {
119+
static const struct irq_domain_ops ar5312_misc_irq_domain_ops = {
120120
.map = ar5312_misc_irq_map,
121121
};
122122

arch/mips/ath79/early_printk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ static void prom_putchar_init(void)
121121
case REV_ID_MAJOR_QCA9558:
122122
case REV_ID_MAJOR_TP9343:
123123
case REV_ID_MAJOR_QCA956X:
124+
case REV_ID_MAJOR_QCN550X:
124125
_prom_putchar = prom_putchar_ar71xx;
125126
break;
126127

arch/mips/ath79/setup.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ static void __init ath79_detect_sys_type(void)
168168
rev = id & QCA956X_REV_ID_REVISION_MASK;
169169
break;
170170

171+
case REV_ID_MAJOR_QCN550X:
172+
ath79_soc = ATH79_SOC_QCA956X;
173+
chip = "550X";
174+
rev = id & QCA956X_REV_ID_REVISION_MASK;
175+
break;
176+
171177
case REV_ID_MAJOR_TP9343:
172178
ath79_soc = ATH79_SOC_TP9343;
173179
chip = "9343";
@@ -263,8 +269,3 @@ void __init arch_init_irq(void)
263269
{
264270
irqchip_init();
265271
}
266-
267-
void __init device_tree_init(void)
268-
{
269-
unflatten_and_copy_device_tree();
270-
}

arch/mips/boot/compressed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
3838
KCOV_INSTRUMENT := n
3939
GCOV_PROFILE := n
4040
UBSAN_SANITIZE := n
41+
KCSAN_SANITIZE := n
4142

4243
# decompressor objects (linked with vmlinuz)
4344
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o

arch/mips/boot/compressed/decompress.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ unsigned long free_mem_ptr;
2626
unsigned long free_mem_end_ptr;
2727

2828
/* The linker tells us where the image is. */
29-
extern unsigned char __image_begin, __image_end;
29+
extern unsigned char __image_begin[], __image_end[];
3030

3131
/* debug interfaces */
3232
#ifdef CONFIG_DEBUG_ZBOOT
@@ -91,9 +91,9 @@ void decompress_kernel(unsigned long boot_heap_start)
9191
{
9292
unsigned long zimage_start, zimage_size;
9393

94-
zimage_start = (unsigned long)(&__image_begin);
95-
zimage_size = (unsigned long)(&__image_end) -
96-
(unsigned long)(&__image_begin);
94+
zimage_start = (unsigned long)(__image_begin);
95+
zimage_size = (unsigned long)(__image_end) -
96+
(unsigned long)(__image_begin);
9797

9898
puts("zimage at: ");
9999
puthex(zimage_start);
@@ -121,7 +121,7 @@ void decompress_kernel(unsigned long boot_heap_start)
121121
dtb_size = fdt_totalsize((void *)&__appended_dtb);
122122

123123
/* last four bytes is always image size in little endian */
124-
image_size = get_unaligned_le32((void *)&__image_end - 4);
124+
image_size = get_unaligned_le32((void *)__image_end - 4);
125125

126126
/* The device tree's address must be properly aligned */
127127
image_size = ALIGN(image_size, STRUCT_ALIGNMENT);

arch/mips/boot/dts/ingenic/jz4780.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@
510510
#address-cells = <1>;
511511
#size-cells = <1>;
512512

513-
eth0_addr: eth-mac-addr@0x22 {
513+
eth0_addr: eth-mac-addr@22 {
514514
reg = <0x22 0x6>;
515515
};
516516
};

0 commit comments

Comments
 (0)