From acce5fa3dbe87ea953fb5060a03859e424398db8 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 19 Mar 2026 05:43:01 +0200 Subject: [PATCH] amd64: remove assertion about sizeof(struct pcb) We no longer put pcb on stack, it is part of the struct thread. Similarly, we do not put user fpu save area on stack. There is no constraints on the pcb size due to the XSAVE area required alignment. Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55931 --- sys/amd64/amd64/fpu.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 48bfaa53c7b..11f9c5b9813 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -143,13 +143,6 @@ CTASSERT(sizeof(struct savefpu) == 512); CTASSERT(sizeof(struct xstate_hdr) == 64); CTASSERT(sizeof(struct savefpu_ymm) == 832); -/* - * This requirement is to make it easier for asm code to calculate - * offset of the fpu save area from the pcb address. FPU save area - * must be 64-byte aligned. - */ -CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0); - /* * Ensure the copy of XCR0 saved in a core is contained in the padding * area.