diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-02 10:49:48 -0800 |
|---|---|---|
| committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-07-14 14:48:17 -0700 |
| commit | a78bc8ba43a6d07191a53c85049f0365239f7ac2 (patch) | |
| tree | 94a3a759d06b6512ae01d2513bca9fb84a8b3786 /meta-xilinx-bsp | |
| parent | 39b5f08a7515d7ff1106e3fbc34e373cb4b93af3 (diff) | |
| download | meta-xilinx-a78bc8ba43a6d07191a53c85049f0365239f7ac2.tar.gz | |
Disable tree-loop-distribute-patterns CFLAG
Issue: CR-1086247
GCC 10.2.0 added -ftree-loop-distribute-patterns by default with -O2. This
is causing a condition where the kernel will no longer boot.
This is a temporary workaround until we can identify the true cause of
the boot failure.
Symtoms:
earlycon: uartlite_a0 at MMIO 0x40600000 (options '115200n8')
printk: bootconsole [uartlite_a0] enabled
cma: Reserved 16 MiB at 0xaec00000
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
setup_memory: max_mapnr: 0x40000
setup_memory: min_low_pfn: 0x80000
setup_memory: max_low_pfn: 0xb0000
setup_memory: max_pfn: 0xc0000
Zone ranges:
DMA [mem 0x0000000080000000-0x00000000afffffff]
Normal empty
HighMem [mem 0x00000000b0000000-0x00000000bfffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080000000-0x00000000bfffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
<hang>
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp')
| -rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux/linux-microblaze.inc | 2 | ||||
| -rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch | 47 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-microblaze.inc b/meta-xilinx-bsp/recipes-kernel/linux/linux-microblaze.inc index e23a50e8..4555bc28 100644 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-microblaze.inc +++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-microblaze.inc | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | SRC_URI += "file://mb-no-tree-loop-distribute-patterns.patch" | ||
| 2 | |||
| 1 | # MicroBlaze is a uImage target, but its not called 'uImage' instead it is called 'linux.bin.ub' | 3 | # MicroBlaze is a uImage target, but its not called 'uImage' instead it is called 'linux.bin.ub' |
| 2 | python () { | 4 | python () { |
| 3 | if d.getVar('KERNEL_IMAGETYPE', True).endswith('.ub'): | 5 | if d.getVar('KERNEL_IMAGETYPE', True).endswith('.ub'): |
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch new file mode 100644 index 00000000..5a4d203d --- /dev/null +++ b/meta-xilinx-bsp/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/ | ||
