Kernel Compile error 6.1.x

Open
#5,765 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux, raspberry-pi

Research direction

Reproduce the reported build using the clone, bcm2711_defconfig, and make -j4 commands, then start with the errors in arch/arm64/include/asm/atomic_ll_sc.h around __CMPXCHG_DBL. Compare the compiler output with the supplied log; done means the kernel build completes without the reported __uint128_t errors.

Written by the indexing model from the issue text.

Description

Describe the bug

I downloaded the current kernel release and I am having a compile error issue:

See log

Steps to reproduce the behaviour

git clone --depth=1 https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel8
make bcm2711_defconfig
make -j4

Device (s)

Raspberry Pi CM4

System

Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 47eee1f0ddcf8811559d51eea1c1bb48335e3e88, stage2

Oct 17 2023 15:39:16
Copyright (c) 2012 Broadcom
version 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 (clean) (release) (start)

Linux corin1 6.1.64-v8+ #1702 SMP PREEMPT Wed Nov 29 14:23:01 GMT 2023 aarch64 GNU/Linux

Logs

DTCO arch/arm64/boot/dts/overlays/rpi-poe.dtbo
DTCO arch/arm64/boot/dts/overlays/rpi-poe-plus.dtbo
In file included from ./arch/arm64/include/asm/lse.h:5,
from ./arch/arm64/include/asm/cmpxchg.h:14,
from ./arch/arm64/include/asm/atomic.h:16,
from ./include/linux/atomic.h:7,
from ./include/asm-generic/bitops/atomic.h:5,
from ./arch/arm64/include/asm/bitops.h:25,
from ./include/linux/bitops.h:68,
from ./include/linux/log2.h:12,
from kernel/bounds.c:13:
./arch/arm64/include/asm/atomic_ll_sc.h: In function ‘__ll_sc__cmpxchg_double’:
./arch/arm64/include/asm/atomic_ll_sc.h:318:38: error: ‘__uint128_t’ undeclared (first use in this function); did you mean ‘int128’?
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (*(__uint128_t )ptr)
| ^~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:325:1: note: in expansion of macro ‘__CMPXCHG_DBL’
325 | __CMPXCHG_DBL( , , , )
| ^~~~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:318:38: note: each undeclared identifier is reported only once for each function it appears in
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (
(__uint128_t )ptr)
| ^~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:325:1: note: in expansion of macro ‘__CMPXCHG_DBL’
325 | __CMPXCHG_DBL( , , , )
| ^~~~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:318:51: error: expected expression before ‘)’ token
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (
(__uint128_t )ptr)
| ^
./arch/arm64/include/asm/atomic_ll_sc.h:325:1: note: in expansion of macro ‘__CMPXCHG_DBL’
325 | __CMPXCHG_DBL( , , , )
| ^~~~~~~~~~~~~
DTCO arch/arm64/boot/dts/overlays/rpi-sense.dtbo
./arch/arm64/include/asm/atomic_ll_sc.h: In function ‘__ll_sc__cmpxchg_double_mb’:
./arch/arm64/include/asm/atomic_ll_sc.h:318:38: error: ‘__uint128_t’ undeclared (first use in this function); did you mean ‘int128’?
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (
(__uint128_t )ptr)
| ^~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:326:1: note: in expansion of macro ‘__CMPXCHG_DBL’
326 | __CMPXCHG_DBL(_mb, dmb ish, l, "memory")
| ^~~~~~~~~~~~~
./arch/arm64/include/asm/atomic_ll_sc.h:318:51: error: expected expression before ‘)’ token
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (
(__uint128_t *)ptr)
| ^
./arch/arm64/include/asm/atomic_ll_sc.h:326:1: note: in expansion of macro ‘__CMPXCHG_DBL’
326 | __CMPXCHG_DBL(_mb, dmb ish, l, "memory")
| ^~~~~~~~~~~~~
DTCO arch/arm64/boot/dts/overlays/rpi-sense-v2.dtbo

Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.