Re: Unbootable system after fresh install on Sun Ultra 45 workstation
I wonder if the code in
https://github.com/torvalds/linux/blob/a5806cd506af5a7c19bcd596e4708b5c464bfd21/arch/sparc/lib/crc32_glue.c#L62
should be returning non 0 when it lacks HWCAP_SPARC_CRYPTO or fails
the CFR_CRC32C checks.
static int __init crc32_sparc_init(void)
{
unsigned long cfr;
if (!(sparc64_elf_hwcap & HWCAP_SPARC_CRYPTO))
return 0; <=== here
__asm__ __volatile__("rd %%asr26, %0" : "=r" (cfr));
if (!(cfr & CFR_CRC32C))
return 0; <=== and here
static_branch_enable(&have_crc32c_opcode);
pr_info("Using sparc64 crc32c opcode optimized CRC32C implementation\n");
return 0;
}
arch_initcall(crc32_sparc_init);
On Mon, May 19, 2025 at 6:24 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
>
> Hi Marcelo,
>
> On Mon, 2025-05-19 at 18:17 +0200, Marcelo Bezerra wrote:
> > Blacklisting that module did indeed fix the issue and the system booted.
>
> Thanks a lot for confirming this!
>
> > Not sure what the ideal fix would be for this. I suspect this should
> > affect other machines lacking that instructions, and not only this
> > ultra45.
>
> Good question. Ideally, the sparc64-specific variant of crc32 should
> probably unload itself if it doesn't find any supported hardware.
>
> Adrian
>
> --
> .''`. John Paul Adrian Glaubitz
> : :' : Debian Developer
> `. `' Physicist
> `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: