Page MenuHomeFreeBSD

D25867.id75403.diff
No OneTemporary

D25867.id75403.diff

Index: sys/riscv/include/pcpu.h
===================================================================
--- sys/riscv/include/pcpu.h
+++ sys/riscv/include/pcpu.h
@@ -48,7 +48,7 @@
struct pmap *pc_curpmap; /* Currently active pmap */ \
uint32_t pc_pending_ipis; /* IPIs pending to this CPU */ \
uint32_t pc_hart; /* Hart ID */ \
- char __pad[49]
+ char __pad[56] /* Pad to factor of PAGE_SIZE */
#ifdef _KERNEL
Index: sys/riscv/include/pcpu_aux.h
===================================================================
--- sys/riscv/include/pcpu_aux.h
+++ sys/riscv/include/pcpu_aux.h
@@ -46,6 +46,9 @@
* be a multiple of the size of struct pcpu.
*/
_Static_assert(PAGE_SIZE % sizeof(struct pcpu) == 0, "fix pcpu size");
+_Static_assert(offsetof(struct pcpu, __pad) +
+ sizeof(((struct pcpu *)0)->__pad) == sizeof(struct pcpu),
+ "fix pcpu padding");
extern struct pcpu __pcpu[];

File Metadata

Mime Type
text/plain
Expires
Thu, May 14, 4:39 PM (15 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33047034
Default Alt Text
D25867.id75403.diff (903 B)

Event Timeline