aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-07-28 08:55:31 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-07-28 08:55:31 +0000
commit5440e7017a985276d4a46d482a76128e5b739f56 (patch)
tree792eafdb8274cca07df0e00bdf41095293c32faa
parent03eab865aabab1e6737ad0fd1537f7d0a8c3ee02 (diff)
downloadsrc-5440e7017a985276d4a46d482a76128e5b739f56.tar.gz
src-5440e7017a985276d4a46d482a76128e5b739f56.zip
i386: Don't use static DPCPU and VNET defines in i386 modules
As of c84617e8 a similar to 4802a2cb and b6ea4c5a fix should be applied to i386 too. Reviewed by: Differential Revision: https://reviews.freebsd.org/D41195
-rw-r--r--sys/net/vnet.h2
-rw-r--r--sys/sys/pcpu.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index 7eb68ef7410f..0c40c9445aa1 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -281,7 +281,7 @@ extern struct sx vnet_sxlock;
#define VNET_DEFINE(t, n) \
struct _hack; t VNET_NAME(n) __section(VNET_SETNAME) __used
#if defined(KLD_MODULE) && (defined(__aarch64__) || defined(__riscv) \
- || defined(__powerpc64__))
+ || defined(__powerpc64__) || defined(__i386__))
/*
* As with DPCPU_DEFINE_STATIC we are unable to mark this data as static
* in modules on some architectures.
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 9ac4144d3267..070506ca8711 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -86,7 +86,7 @@ extern uintptr_t dpcpu_off[];
#define DPCPU_DEFINE(t, n) \
struct _hack; t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
#if defined(KLD_MODULE) && (defined(__aarch64__) || defined(__riscv) \
- || defined(__powerpc64__))
+ || defined(__powerpc64__) || defined(__i386__))
/*
* On some architectures the compiler will use PC-relative load to
* find the address of DPCPU data with the static keyword. We then