diff options
Diffstat (limited to 'meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch')
-rw-r--r-- | meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch new file mode 100644 index 00000000..5a4d203d --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Disable tree-loop-distribute-patterns CFLAG | ||
2 | |||
3 | Issue: CR-1086247 | ||
4 | |||
5 | GCC 10.2.0 added -ftree-loop-distribute-patterns by default with -O2. This | ||
6 | is causing a condition where the kernel will no longer boot. | ||
7 | |||
8 | This is a temporary workaround until we can identify the true cause of | ||
9 | the boot failure. | ||
10 | |||
11 | Symtoms: | ||
12 | |||
13 | earlycon: uartlite_a0 at MMIO 0x40600000 (options '115200n8') | ||
14 | printk: bootconsole [uartlite_a0] enabled | ||
15 | cma: Reserved 16 MiB at 0xaec00000 | ||
16 | Linux version 5.10.0-xilinx-v2020.2 (oe-user@oe-host) (microblazeel-xilinx-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.0.20200730) #1 Mon Mar 1 12:58:36 UTC 2021 | ||
17 | setup_memory: max_mapnr: 0x40000 | ||
18 | setup_memory: min_low_pfn: 0x80000 | ||
19 | setup_memory: max_low_pfn: 0xb0000 | ||
20 | setup_memory: max_pfn: 0xc0000 | ||
21 | Zone ranges: | ||
22 | DMA [mem 0x0000000080000000-0x00000000afffffff] | ||
23 | Normal empty | ||
24 | HighMem [mem 0x00000000b0000000-0x00000000bfffffff] | ||
25 | Movable zone start for each node | ||
26 | Early memory node ranges | ||
27 | node 0: [mem 0x0000000080000000-0x00000000bfffffff] | ||
28 | Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff] | ||
29 | <hang> | ||
30 | |||
31 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
32 | |||
33 | diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile | ||
34 | index bb980891816d..e368c35ad21c 100644 | ||
35 | --- a/arch/microblaze/Makefile | ||
36 | +++ b/arch/microblaze/Makefile | ||
37 | @@ -48,6 +48,10 @@ CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | ||
38 | # r31 holds current when in kernel mode | ||
39 | KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-y) $(CPUFLAGS-1) $(CPUFLAGS-2) | ||
40 | |||
41 | +# GCC 10.x now has -ftree-loop-distribute-patterns by default in -O2 | ||
42 | +# This causes a boot failure, so disable it | ||
43 | +KBUILD_CFLAGS += -fno-tree-loop-distribute-patterns | ||
44 | + | ||
45 | head-y := arch/microblaze/kernel/head.o | ||
46 | libs-y += arch/microblaze/lib/ | ||
47 | core-y += arch/microblaze/kernel/ | ||