Thread (9 messages) 9 messages, 4 authors, 8d ago

Re: [PATCH] lib/fonts: Avoid unncessary 64-bit math in font code

From: Ethan Nelson-Moore <hidden>
Date: 2026-06-08 04:51:03
Also in: dri-devel

On Sun, Jun 7, 2026 at 2:02 PM Helge Deller [off-list ref] wrote:
The text display code used in the Risc PC kernel image decompression
code uses arch/arm/boot/compressed/font.c, which includes
lib/fonts/font_acorn_8x8.c, which further includes <linux/font.h>.

Since commit 97df8960240a ("lib/fonts: Provide helpers for calculating
glyph pitch and size") <linux/font.h> contains inline functions that
require __do_div64, which is not linked into the ARM kernel
decompressor. This makes Risc PC zImages fail to build.

There is no need to use 64-bit division code here, so resolve this issue
by using plain standard addition and shift maths.
Hi, Helge,

I can confirm that this patch fixes the issue. Thank you for your
thorough investigation.

Ethan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help