Re: [PATCH] Fix J-core aic warning spam
Rob Landley <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4/19/23 06:53, Geert Uytterhoeven wrote: > On Wed, Apr 19, 2023 at 12:25 PM John Paul Adrian Glaubitz > <[email protected]> wrote: >> I just wanted to perform a test build of the J2 kernel, but I'm getting lots of error messages >> from the assembler about unknown opcodes when trying to build j2_defconfig. > > Looks like upstream gcc does not support -mj2, and thus the build fails > with "unknown opcode" due to the use of "cas.l". > Disabling CONFIG_SMP in j2_defconfig fixes/works around that. Sorry I fell behind, busy week, catching up... > Just checked with Arnd on IRC, who says opcodes/sh-opc.h was last updated > in a meaningful way back in 2005... The gcc developers still wanted physical copyright assignment signatures on paper when we were submitting the j2 stuff upstream, and we had trouble getting those from multiple developers on 3 continents, so appeasing them went on the todo heap. The kernel should build without the -mj2? (Or at least used to? Commit f208b87b48d5 was tested at the time?) The j2 instruction set is mostly sh2 with a couple backported instructions from sh3 (more efficient bit shifts), and it'll work fine with the old sh2 versions (just less efficiently). The other new instruction is cmpxchg (ala cas.l), but I thought we'd hardwired the literal hex bytes into the kernel build so you didn't need the toolchain to know about the new instruction? (It was only used directly in two places.) It's quite possible somebody went "ew, don't do that" and thus it was "improved" not to work with generally available toolchains. (I've only tested with the j2 toolchain in forever...) In theory a single processor j2 build won't use cmpxchg, and should run on the hardware just fine... Rob