git: acce5fa3dbe8 - main - amd64: remove assertion about sizeof(struct pcb)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Mar 2026 22:49:55 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=acce5fa3dbe87ea953fb5060a03859e424398db8
commit acce5fa3dbe87ea953fb5060a03859e424398db8
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-03-19 03:43:01 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-03-20 22:48:42 +0000
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 48bfaa53c7b4..11f9c5b98134 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.