From ede6c6c0434a266a1712ffe807f4e31e229948df Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Jul 2022 20:09:43 +0200 Subject: [PATCH] buf.h: Fix declaration of unmapped_buf For architectures with a small-data area, the __read_mostly section must present at the object declaration. (emaste note: This does not appear to have an affect within FreeBSD, but may be needed by downstream projects that handle __read_mostly / __section(".data.read_mostly") differently.) Pull Request: https://github.com/freebsd/freebsd-src/pull/608 --- sys/sys/buf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/buf.h b/sys/sys/buf.h index fa930487235f..6147f6d26ca1 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -522,7 +522,8 @@ extern int bdwriteskip; extern int dirtybufferflushes; extern int altbufferflushes; extern int nswbuf; /* Number of swap I/O buffer headers. */ -extern caddr_t unmapped_buf; /* Data address for unmapped buffers. */ +extern caddr_t __read_mostly unmapped_buf; /* Data address for unmapped + buffers. */ static inline int buf_mapped(struct buf *bp)