git: a19bd8e30eba - main - Restore variable aliasing in the context of cpu set operations

2022-01-01 Thread Stefan Eßer
The branch main has been updated by se:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a19bd8e30eba1673782376a93e9787ed9b490e4e

commit a19bd8e30eba1673782376a93e9787ed9b490e4e
Author: Stefan Eßer 
AuthorDate: 2022-01-01 10:41:54 +
Commit: Stefan Eßer 
CommitDate: 2022-01-01 10:58:40 +

Restore variable aliasing in the context of cpu set operations

A simplification of set operations removed side-effects of the
previous code, which are restored by this commit.
---
 sys/kern/kern_rmlock.c | 3 ++-
 sys/kern/sched_4bsd.c  | 6 --
 sys/kern/subr_kdb.c| 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index 5e64f79e3836..08a01fca9827 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -548,7 +548,8 @@ _rm_wlock(struct rmlock *rm)
 
if (CPU_CMP(&rm->rm_writecpus, &all_cpus)) {
/* Get all read tokens back */
-   CPU_ANDNOT(&readcpus, &all_cpus, &rm->rm_writecpus);
+   readcpus = all_cpus;
+   CPU_ANDNOT(&readcpus, &readcpus, &rm->rm_writecpus);
rm->rm_writecpus = all_cpus;
 
/*
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index ae8c77f3aa4a..5233cba95c54 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -1179,7 +1179,8 @@ forward_wakeup(int cpunum)
}
 
if (forward_wakeup_use_mask) {
-   CPU_ANDNOT(&map, &idle_cpus_mask, &dontuse);
+   map = idle_cpu_mask;
+   CPU_ANDNOT(&map, &map, &dontuse);
 
/* If they are both on, compare and use loop if different. */
if (forward_wakeup_use_loop) {
@@ -1365,7 +1366,8 @@ sched_add(struct thread *td, int flags)
kick_other_cpu(td->td_priority, cpu);
} else {
if (!single_cpu) {
-   CPU_ANDNOT(&tidlemsk, &idle_cpus_mask, &hlt_cpus_mask);
+   tidlemsk = idle_cpus_mask;
+   CPU_ANDNOT(&tidlemsk, &tidlemsk, &hlt_cpus_mask);
CPU_CLR(cpuid, &tidlemsk);
 
if (!CPU_ISSET(cpuid, &idle_cpus_mask) &&
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
index 2218c20586f2..14a0205fc098 100644
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -707,7 +707,8 @@ kdb_trap(int type, int code, struct trapframe *tf)
 
if (!SCHEDULER_STOPPED()) {
 #ifdef SMP
-   CPU_ANDNOT(&other_cpus, &all_cpus, &stopped_cpus);
+   other_cpus = all_cpus;
+   CPU_ANDNOT(&other_cpus, &other_cpus, &stopped_cpus);
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
stop_cpus_hard(other_cpus);
 #endif



git: ec3af9d0ca6b - main - sys/kern/sched_4bsd.c: fix typo introduced in previous commit

2022-01-01 Thread Stefan Eßer
The branch main has been updated by se:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ec3af9d0ca6b48d2595bb713a638a9b0ce77b9f7

commit ec3af9d0ca6b48d2595bb713a638a9b0ce77b9f7
Author: Stefan Eßer 
AuthorDate: 2022-01-01 14:33:38 +
Commit: Stefan Eßer 
CommitDate: 2022-01-01 14:33:38 +

sys/kern/sched_4bsd.c: fix typo introduced in previous commit
---
 sys/kern/sched_4bsd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 5233cba95c54..fa6810eb0526 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -1179,7 +1179,7 @@ forward_wakeup(int cpunum)
}
 
if (forward_wakeup_use_mask) {
-   map = idle_cpu_mask;
+   map = idle_cpus_mask;
CPU_ANDNOT(&map, &map, &dontuse);
 
/* If they are both on, compare and use loop if different. */



git: 3640e305019b - main - Welcome 2022, update copyrights.

2022-01-01 Thread Warner Losh
The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3640e305019bed6bf35137234617c0de82c89603

commit 3640e305019bed6bf35137234617c0de82c89603
Author: Warner Losh 
AuthorDate: 2022-01-01 16:49:49 +
Commit: Warner Losh 
CommitDate: 2022-01-01 16:49:49 +

Welcome 2022, update copyrights.

Sponsored by:   Netflix
---
 COPYRIGHT   | 2 +-
 sys/sys/copyright.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/COPYRIGHT b/COPYRIGHT
index 3cf4fa961551..7e88f9ffdb11 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -3,7 +3,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2021 The FreeBSD Project.
+Copyright (c) 1992-2022 The FreeBSD Project.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h
index c9e070859e6c..b749b3babe1e 100644
--- a/sys/sys/copyright.h
+++ b/sys/sys/copyright.h
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
- * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2022 The FreeBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,7 +33,7 @@
 
 /* FreeBSD */
 #define COPYRIGHT_FreeBSD \
-   "Copyright (c) 1992-2021 The FreeBSD Project.\n"
+   "Copyright (c) 1992-2022 The FreeBSD Project.\n"
 
 /* Foundation */
 #defineTRADEMARK_Foundation \



Re: git: 5e6a2d6eb220 - main - Reapply: move libc++ from /usr/lib to /lib [add /usr/lib/libc++.so.1 -> ../../lib/libc++.so.1 ?]

2022-01-01 Thread Ed Maste
On Fri, 31 Dec 2021 at 18:04, John Baldwin  wrote:
>
> However, your point about libcxxrt.so.1 is valid.  It needs to also be moved
> to /lib if libc++.so.1 is moved to /lib.

libcxxrt.so.1 has always been in /lib.



git: c2173903598a - main - route: use NULL for null ptr in getaddr call, not 0

2022-01-01 Thread Ed Maste
The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c2173903598a33122a8006a944158b95dd5e2d80

commit c2173903598a33122a8006a944158b95dd5e2d80
Author: Ed Maste 
AuthorDate: 2021-12-31 18:21:13 +
Commit: Ed Maste 
CommitDate: 2022-01-01 17:02:17 +

route: use NULL for null ptr in getaddr call, not 0

Style(9) prefers NULL.

Sponsored by:   The FreeBSD Foundation
---
 sbin/route/route.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sbin/route/route.c b/sbin/route/route.c
index b16fb6d17a08..ccd0ca84f055 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -893,22 +893,22 @@ newroute(int argc, char **argv)
case K_IFA:
if (!--argc)
usage(NULL);
-   getaddr(RTAX_IFA, *++argv, 0, nrflags);
+   getaddr(RTAX_IFA, *++argv, NULL, nrflags);
break;
case K_IFP:
if (!--argc)
usage(NULL);
-   getaddr(RTAX_IFP, *++argv, 0, nrflags);
+   getaddr(RTAX_IFP, *++argv, NULL, nrflags);
break;
case K_GENMASK:
if (!--argc)
usage(NULL);
-   getaddr(RTAX_GENMASK, *++argv, 0, nrflags);
+   getaddr(RTAX_GENMASK, *++argv, NULL, nrflags);
break;
case K_GATEWAY:
if (!--argc)
usage(NULL);
-   getaddr(RTAX_GATEWAY, *++argv, 0, nrflags);
+   getaddr(RTAX_GATEWAY, *++argv, NULL, nrflags);
gateway = *argv;
break;
case K_DST:
@@ -921,7 +921,7 @@ newroute(int argc, char **argv)
case K_NETMASK:
if (!--argc)
usage(NULL);
-   getaddr(RTAX_NETMASK, *++argv, 0, nrflags);
+   getaddr(RTAX_NETMASK, *++argv, NULL, nrflags);
/* FALLTHROUGH */
case K_NET:
nrflags |= F_FORCENET;
@@ -962,7 +962,7 @@ newroute(int argc, char **argv)
gateway = *argv;
getaddr(RTAX_GATEWAY, *argv, &hp, nrflags);
} else {
-   getaddr(RTAX_NETMASK, *argv, 0, nrflags);
+   getaddr(RTAX_NETMASK, *argv, NULL, nrflags);
nrflags |= F_FORCENET;
}
}
@@ -1233,7 +1233,7 @@ getaddr(int idx, char *str, struct hostent **hpp, int 
nrflags)
switch (idx) {
case RTAX_DST:
nrflags |= F_FORCENET;
-   getaddr(RTAX_NETMASK, str, 0, nrflags);
+   getaddr(RTAX_NETMASK, str, NULL, nrflags);
break;
}
return (0);



git: 430df2abee90 - main - in_pcb: improve inp_next()

2022-01-01 Thread Michael Tuexen
The branch main has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=430df2abee9049c2e4773704190a9f0d1779ff10

commit 430df2abee9049c2e4773704190a9f0d1779ff10
Author: Michael Tuexen 
AuthorDate: 2022-01-01 17:59:47 +
Commit: Michael Tuexen 
CommitDate: 2022-01-01 18:04:10 +

in_pcb: improve inp_next()

If there is no inp to check, exit the loop iterating through them.

Reported by:syzbot+403406a9cbf082b36...@syzkaller.appspotmail.com
Reviewed by:glebius
Sponsored by:   Netflix, Inc.
---
 sys/netinet/in_pcb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index b0ee7aa8f522..03250d5101ff 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1656,6 +1656,8 @@ inp_next(struct inpcb_iterator *ii)
smr_enter(ipi->ipi_smr);
MPASS(inp != II_LIST_FIRST(ipi, hash));
inp = II_LIST_FIRST(ipi, hash);
+   if (inp == NULL)
+   break;
}
}
 



git: 4760956e9ad3 - main - udp: use appropriate pcbinfo when signalling EHOSTDOWN

2022-01-01 Thread Michael Tuexen
The branch main has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4760956e9ad39b940df01477e5a86d06c39ac217

commit 4760956e9ad39b940df01477e5a86d06c39ac217
Author: Michael Tuexen 
AuthorDate: 2022-01-01 18:17:17 +
Commit: Michael Tuexen 
CommitDate: 2022-01-01 18:17:17 +

udp: use appropriate pcbinfo when signalling EHOSTDOWN

MFC after:  3 days
Sponsored by:   Netflix, Inc.
---
 sys/netinet/udp_usrreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 554a042c612e..28a1b3e89a41 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -780,7 +780,7 @@ udp_common_ctlinput(int cmd, struct sockaddr *sa, void *vip,
 
if (PRC_IS_REDIRECT(cmd)) {
/* signal EHOSTDOWN, as it flushes the cached route */
-   in_pcbnotifyall(&V_udbinfo, faddr, EHOSTDOWN, udp_notify);
+   in_pcbnotifyall(pcbinfo, faddr, EHOSTDOWN, udp_notify);
return;
}
 



git: 657fcf5807de - main - udp6: remove assignments not being used

2022-01-01 Thread Michael Tuexen
The branch main has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=657fcf5807deb2fd496f544db78f9ffc4dc7f44f

commit 657fcf5807deb2fd496f544db78f9ffc4dc7f44f
Author: Michael Tuexen 
AuthorDate: 2022-01-01 18:25:47 +
Commit: Michael Tuexen 
CommitDate: 2022-01-01 18:25:47 +

udp6: remove assignments not being used

MFC after:  3 days
Sponsored by:   Netflix, Inc.
---
 sys/netinet6/udp6_usrreq.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index f7c08f8fc96e..2f463da9b01b 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -342,7 +342,6 @@ int
 udp6_input(struct mbuf **mp, int *offp, int proto)
 {
struct mbuf *m = *mp;
-   struct ifnet *ifp;
struct ip6_hdr *ip6;
struct udphdr *uh;
struct inpcb *inp;
@@ -358,8 +357,6 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
 
NET_EPOCH_ASSERT();
 
-   ifp = m->m_pkthdr.rcvif;
-
if (m->m_len < off + sizeof(struct udphdr)) {
m = m_pullup(m, off + sizeof(struct udphdr));
if (m == NULL) {
@@ -1261,10 +1258,8 @@ static void
 udp6_detach(struct socket *so)
 {
struct inpcb *inp;
-   struct inpcbinfo *pcbinfo;
struct udpcb *up;
 
-   pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
inp = sotoinpcb(so);
KASSERT(inp != NULL, ("udp6_detach: inp == NULL"));
 



git: 502d5e8500b9 - main - sctp: improve counting of incoming chunks

2022-01-01 Thread Michael Tuexen
The branch main has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=502d5e8500b9537d90ae225eed2b600ddcef2afd

commit 502d5e8500b9537d90ae225eed2b600ddcef2afd
Author: Michael Tuexen 
AuthorDate: 2022-01-01 19:59:47 +
Commit: Michael Tuexen 
CommitDate: 2022-01-01 19:59:47 +

sctp: improve counting of incoming chunks

MFC after:  3 days
---
 sys/netinet/sctp_input.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index ef1b44c4a3ff..222b69102bef 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -5352,12 +5352,14 @@ sctp_common_input_processing(struct mbuf **mm, int 
iphlen, int offset, int lengt
goto out;
}
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
+   SCTP_STAT_INCR_COUNTER64(sctps_incontrolchunks);
sctp_send_shutdown_complete2(src, dst, sh,
mflowtype, mflowid, fibnum,
vrf_id, port);
goto out;
}
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
+   SCTP_STAT_INCR_COUNTER64(sctps_incontrolchunks);
goto out;
}
if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) {



git: 18f20d5d967a - main - bsddialog: convert bsdinstall/distextract

2022-01-01 Thread Baptiste Daroussin
The branch main has been updated by bapt:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=18f20d5d967ae790f121963e1fcee68d729a529e

commit 18f20d5d967ae790f121963e1fcee68d729a529e
Author: Alfonso Siciliano 
AuthorDate: 2022-01-01 20:50:44 +
Commit: Baptiste Daroussin 
CommitDate: 2022-01-01 20:51:23 +

bsddialog: convert bsdinstall/distextract

Differential Revision:  https://reviews.freebsd.org/D33581
---
 usr.sbin/bsdinstall/distextract/Makefile  |   3 +-
 usr.sbin/bsdinstall/distextract/distextract.c | 180 +-
 2 files changed, 92 insertions(+), 91 deletions(-)

diff --git a/usr.sbin/bsdinstall/distextract/Makefile 
b/usr.sbin/bsdinstall/distextract/Makefile
index 2b7180e28ea0..5e9f2b9e1473 100644
--- a/usr.sbin/bsdinstall/distextract/Makefile
+++ b/usr.sbin/bsdinstall/distextract/Makefile
@@ -2,7 +2,8 @@
 
 BINDIR= ${LIBEXECDIR}/bsdinstall
 PROG=  distextract
-LIBADD=archive dpv dialog m
+CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
+LIBADD=archive bsddialog m
 
 MAN=
 
diff --git a/usr.sbin/bsdinstall/distextract/distextract.c 
b/usr.sbin/bsdinstall/distextract/distextract.c
index 8ad6c7b2c64b..df10c299ab7f 100644
--- a/usr.sbin/bsdinstall/distextract/distextract.c
+++ b/usr.sbin/bsdinstall/distextract/distextract.c
@@ -33,11 +33,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,30 +47,27 @@ __FBSDID("$FreeBSD$");
 /* Data to process */
 static char *distdir = NULL;
 static struct archive *archive = NULL;
-static struct dpv_file_node *dists = NULL;
 
 /* Function prototypes */
 static voidsig_int(int sig);
 static int count_files(const char *file);
-static int extract_files(struct dpv_file_node *file, int out);
+static int extract_files(struct bsddialog_fileminibar *file);
 
-#define _errx(...) (end_dialog(), errx(__VA_ARGS__))
+#define _errx(...) (bsddialog_end(), errx(__VA_ARGS__))
 
 int
 main(void)
 {
char *chrootdir;
char *distributions;
+   unsigned int i;
int retval;
-   size_t config_size = sizeof(struct dpv_config);
-   size_t file_node_size = sizeof(struct dpv_file_node);
+   size_t minibar_size = sizeof(struct bsddialog_fileminibar);
size_t span;
-   struct dpv_config *config;
-   struct dpv_file_node *dist = dists;
-   static char backtitle[] = "FreeBSD Installer";
-   static char title[] = "Archive Extraction";
-   static char aprompt[] = "\n  Overall Progress:";
-   static char pprompt[] = "Extracting distribution files...\n";
+   unsigned int nminibars;
+   struct bsddialog_fileminibar *dists;
+   struct bsddialog_progviewconf pvconf;
+   struct bsddialog_conf conf;
struct sigaction act;
char error[PATH_MAX + 512];
 
@@ -78,17 +76,17 @@ main(void)
if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL)
distdir = __DECONST(char *, "");
 
-   /* Initialize dialog(3) */
-   init_dialog(stdin, stdout);
-   dialog_vars.backtitle = backtitle;
-   dlg_put_backtitle();
-
-   dialog_msgbox("",
-   "Checking distribution archives.\nPlease wait...", 4, 35, FALSE);
-
-   /*
-* Parse $DISTRIBUTIONS into dpv(3) linked-list
-*/
+   if (bsddialog_init() == BSDDIALOG_ERROR)
+   errx(EXIT_FAILURE, "Cannot init libbsdialog");
+   bsddialog_initconf(&conf);
+   bsddialog_backtitle(&conf, __DECONST(char *, "FreeBSD Installer"));
+   bsddialog_infobox(&conf,
+   __DECONST(char *, "Checking distribution archives.\n"
+   "Please wait..."), 4, 35);
+
+   /* Parse $DISTRIBUTIONS */
+   nminibars = 0;
+   dists = NULL;
while (*distributions != '\0') {
span = strcspn(distributions, "\t\n\v\f\r ");
if (span < 1) { /* currently on whitespace */
@@ -97,36 +95,36 @@ main(void)
}
 
/* Allocate a new struct for the distribution */
-   if (dist == NULL) {
-   if ((dist = calloc(1, file_node_size)) == NULL)
-   _errx(EXIT_FAILURE, "Out of memory!");
-   dists = dist;
-   } else {
-   dist->next = calloc(1, file_node_size);
-   if (dist->next == NULL)
-   _errx(EXIT_FAILURE, "Out of memory!");
-   dist = dist->next;
-   }
+   dists = realloc(dists, (nminibars + 1) * minibar_size);
+   if (dists == NULL)
+   _errx(EXIT_FAILURE, "Out of memory!");
 
-   /* Set path */
-   if ((dist->path = malloc(span + 1)) == NULL)
+   /* Set file path */
+   if ((dists[nminibars].path = malloc(span + 1)) == NULL)
_errx(EX

git: e9016c0be83f - main - iwlwifi: clarify page update

2022-01-01 Thread Bjoern A. Zeeb
The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e9016c0be83f9b1d9cf7c2460ee3b041967bb75f

commit e9016c0be83f9b1d9cf7c2460ee3b041967bb75f
Author: Bjoern A. Zeeb 
AuthorDate: 2022-01-01 18:08:31 +
Commit: Bjoern A. Zeeb 
CommitDate: 2022-01-01 20:57:13 +

iwlwifi: clarify page update

Based on some feedback clarify the man page for
- how to load the driver currently
- status of the driver with respect to iwm(4)
and leave a comment to (automatically) add a full list of chipsets
to the man page.

Sponsored by:   The FreeBSD Foundation
MFC after:  3 days
Reviewed by:debdrup
Differential Revision: https://reviews.freebsd.org/D33713
---
 share/man/man4/iwlwifi.4   | 29 -
 share/man/man4/iwlwififw.4 |  4 +++-
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4
index 5d96b263c9e2..1f79319aad61 100644
--- a/share/man/man4/iwlwifi.4
+++ b/share/man/man4/iwlwifi.4
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 27, 2021
+.Dd January 1, 2022
 .Dt iwlwifi 4
 .Os
 .Sh NAME
@@ -35,14 +35,21 @@
 .Nd Intel IEEE 802.11a/b/g/n/ac/ax wireless network driver
 .Sh SYNOPSIS
 To load the driver as a module at boot time, place the following lines in
-.Xr loader.conf 5 :
+.Xr rc.conf 5 :
 .Bd -literal -offset indent
-if_iwlwifi_load="YES"
+kld_list="${kld_list} if_iwlwifi"
 .Ed
 .Pp
 The driver should automatically load any
 .Xr iwlwififw 4
-firmware needed for the particular chipset.
+firmware needed for the particular chipset in that case.
+.Pp
+It is anticipated that the driver will support auto-loading via
+.Xr devmatch 8
+in the future and will need no configuration at all.
+.Pp
+It is discouraged to load the driver from
+.Xr loader 8 .
 .Sh DESCRIPTION
 The
 .Nm
@@ -50,12 +57,14 @@ driver is derived from Intel's Linux iwlwifi driver and 
provides support for
 all chipsets supported by the
 .Em mvm
 part of that driver.
-This superseeds the
+.\" XXX-BZ find way to add full list of chipsets automatically
+.Nm
+will be a successor to
 .Xr iwm 4
-driver which provided support for a subset of these chipsets and still
-complements the
+and may superseed that driver in the future.
+It still complements the
 .Xr iwn 4
-driver supporting older chipsets.
+driver which supports older chipsets.
 .Pp
 The driver uses the
 .\" No LinuxKPI man pages so no .Xr here.
@@ -63,7 +72,9 @@ The driver uses the
 and
 .Em linuxkpi
 compat framework to bridge between the Linux and
-native FreeBSD driver code.
+native FreeBSD driver code as well as to the native
+.Xr net80211 4
+wireless stack.
 .Pp
 While
 .Nm
diff --git a/share/man/man4/iwlwififw.4 b/share/man/man4/iwlwififw.4
index 81daaa02817a..d38d38f28695 100644
--- a/share/man/man4/iwlwififw.4
+++ b/share/man/man4/iwlwififw.4
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 30, 2021
+.Dd January 1, 2022
 .Dt iwlwififw 4
 .Os
 .Sh NAME
@@ -37,6 +37,8 @@
 The
 .Xr iwlwifi 4
 driver should auto-load any firmware needed.
+It is discouraged to load the driver or firmware manually from
+.Xr loader 8 .
 .Sh DESCRIPTION
 Multiple modules provide access to firmware for the various chipset
 models supported by the



Re: git: 18f20d5d967a - main - bsddialog: convert bsdinstall/distextract

2022-01-01 Thread Jessica Clarke
On 1 Jan 2022, at 20:52, Baptiste Daroussin  wrote:
> 
> The branch main has been updated by bapt:
> 
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=18f20d5d967ae790f121963e1fcee68d729a529e
> 
> commit 18f20d5d967ae790f121963e1fcee68d729a529e
> Author: Alfonso Siciliano 
> AuthorDate: 2022-01-01 20:50:44 +
> Commit: Baptiste Daroussin 
> CommitDate: 2022-01-01 20:51:23 +
> 
>bsddialog: convert bsdinstall/distextract
> 
>Differential Revision:  https://reviews.freebsd.org/D33581
> ---
> usr.sbin/bsdinstall/distextract/Makefile  |   3 +-
> usr.sbin/bsdinstall/distextract/distextract.c | 180 +-
> 2 files changed, 92 insertions(+), 91 deletions(-)
> 
> diff --git a/usr.sbin/bsdinstall/distextract/Makefile 
> b/usr.sbin/bsdinstall/distextract/Makefile
> index 2b7180e28ea0..5e9f2b9e1473 100644
> --- a/usr.sbin/bsdinstall/distextract/Makefile
> +++ b/usr.sbin/bsdinstall/distextract/Makefile
> @@ -2,7 +2,8 @@
> 
> BINDIR= ${LIBEXECDIR}/bsdinstall
> PROG= distextract
> -LIBADD=  archive dpv dialog m
> +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
> +LIBADD=  archive bsddialog m
> 
> MAN=
> 
> diff --git a/usr.sbin/bsdinstall/distextract/distextract.c 
> b/usr.sbin/bsdinstall/distextract/distextract.c
> index 8ad6c7b2c64b..df10c299ab7f 100644
> --- a/usr.sbin/bsdinstall/distextract/distextract.c
> +++ b/usr.sbin/bsdinstall/distextract/distextract.c
> @@ -33,11 +33,12 @@ __FBSDID("$FreeBSD$");
> #include 
> #include 
> #include 
> -#include 
> -#include 
> +#include 
> +#include 
> #include 
> #include 
> #include 
> +#include 
> #include 
> #include 
> #include 
> @@ -46,30 +47,27 @@ __FBSDID("$FreeBSD$");
> /* Data to process */
> static char *distdir = NULL;
> static struct archive *archive = NULL;
> -static struct dpv_file_node *dists = NULL;
> 
> /* Function prototypes */
> static void   sig_int(int sig);
> static intcount_files(const char *file);
> -static int   extract_files(struct dpv_file_node *file, int out);
> +static int   extract_files(struct bsddialog_fileminibar *file);
> 
> -#define _errx(...) (end_dialog(), errx(__VA_ARGS__))
> +#define _errx(...) (bsddialog_end(), errx(__VA_ARGS__))
> 
> int
> main(void)
> {
>   char *chrootdir;
>   char *distributions;
> + unsigned int i;
>   int retval;
> - size_t config_size = sizeof(struct dpv_config);
> - size_t file_node_size = sizeof(struct dpv_file_node);
> + size_t minibar_size = sizeof(struct bsddialog_fileminibar);
>   size_t span;
> - struct dpv_config *config;
> - struct dpv_file_node *dist = dists;
> - static char backtitle[] = "FreeBSD Installer";
> - static char title[] = "Archive Extraction";
> - static char aprompt[] = "\n  Overall Progress:";
> - static char pprompt[] = "Extracting distribution files...\n";
> + unsigned int nminibars;
> + struct bsddialog_fileminibar *dists;
> + struct bsddialog_progviewconf pvconf;
> + struct bsddialog_conf conf;
>   struct sigaction act;
>   char error[PATH_MAX + 512];
> 
> @@ -78,17 +76,17 @@ main(void)
>   if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL)
>   distdir = __DECONST(char *, "");
> 
> - /* Initialize dialog(3) */
> - init_dialog(stdin, stdout);
> - dialog_vars.backtitle = backtitle;
> - dlg_put_backtitle();
> -
> - dialog_msgbox("",
> - "Checking distribution archives.\nPlease wait...", 4, 35, FALSE);
> -
> - /*
> -  * Parse $DISTRIBUTIONS into dpv(3) linked-list
> -  */
> + if (bsddialog_init() == BSDDIALOG_ERROR)
> + errx(EXIT_FAILURE, "Cannot init libbsdialog");
> + bsddialog_initconf(&conf);
> + bsddialog_backtitle(&conf, __DECONST(char *, "FreeBSD Installer"));

Can all these interfaces really not just use a const char * rather than
having to scatter __DECONST everywhere if you want to pass a string
literal to functions like this? There are quite a few __DECONST’s of
string literals in this patch alone...

Jess




Re: git: 18f20d5d967a - main - bsddialog: convert bsdinstall/distextract

2022-01-01 Thread Baptiste Daroussin
On Sat, Jan 01, 2022 at 09:35:50PM +, Jessica Clarke wrote:
> On 1 Jan 2022, at 20:52, Baptiste Daroussin  wrote:
> > 
> > The branch main has been updated by bapt:
> > 
> > URL: 
> > https://cgit.FreeBSD.org/src/commit/?id=18f20d5d967ae790f121963e1fcee68d729a529e
> > 
> > commit 18f20d5d967ae790f121963e1fcee68d729a529e
> > Author: Alfonso Siciliano 
> > AuthorDate: 2022-01-01 20:50:44 +
> > Commit: Baptiste Daroussin 
> > CommitDate: 2022-01-01 20:51:23 +
> > 
> >bsddialog: convert bsdinstall/distextract
> > 
> >Differential Revision:  https://reviews.freebsd.org/D33581
> > ---
> > usr.sbin/bsdinstall/distextract/Makefile  |   3 +-
> > usr.sbin/bsdinstall/distextract/distextract.c | 180 
> > +-
> > 2 files changed, 92 insertions(+), 91 deletions(-)
> > 
> > diff --git a/usr.sbin/bsdinstall/distextract/Makefile 
> > b/usr.sbin/bsdinstall/distextract/Makefile
> > index 2b7180e28ea0..5e9f2b9e1473 100644
> > --- a/usr.sbin/bsdinstall/distextract/Makefile
> > +++ b/usr.sbin/bsdinstall/distextract/Makefile
> > @@ -2,7 +2,8 @@
> > 
> > BINDIR= ${LIBEXECDIR}/bsdinstall
> > PROG=   distextract
> > -LIBADD=archive dpv dialog m
> > +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
> > +LIBADD=archive bsddialog m
> > 
> > MAN=
> > 
> > diff --git a/usr.sbin/bsdinstall/distextract/distextract.c 
> > b/usr.sbin/bsdinstall/distextract/distextract.c
> > index 8ad6c7b2c64b..df10c299ab7f 100644
> > --- a/usr.sbin/bsdinstall/distextract/distextract.c
> > +++ b/usr.sbin/bsdinstall/distextract/distextract.c
> > @@ -33,11 +33,12 @@ __FBSDID("$FreeBSD$");
> > #include 
> > #include 
> > #include 
> > -#include 
> > -#include 
> > +#include 
> > +#include 
> > #include 
> > #include 
> > #include 
> > +#include 
> > #include 
> > #include 
> > #include 
> > @@ -46,30 +47,27 @@ __FBSDID("$FreeBSD$");
> > /* Data to process */
> > static char *distdir = NULL;
> > static struct archive *archive = NULL;
> > -static struct dpv_file_node *dists = NULL;
> > 
> > /* Function prototypes */
> > static void sig_int(int sig);
> > static int  count_files(const char *file);
> > -static int extract_files(struct dpv_file_node *file, int out);
> > +static int extract_files(struct bsddialog_fileminibar *file);
> > 
> > -#define _errx(...) (end_dialog(), errx(__VA_ARGS__))
> > +#define _errx(...) (bsddialog_end(), errx(__VA_ARGS__))
> > 
> > int
> > main(void)
> > {
> > char *chrootdir;
> > char *distributions;
> > +   unsigned int i;
> > int retval;
> > -   size_t config_size = sizeof(struct dpv_config);
> > -   size_t file_node_size = sizeof(struct dpv_file_node);
> > +   size_t minibar_size = sizeof(struct bsddialog_fileminibar);
> > size_t span;
> > -   struct dpv_config *config;
> > -   struct dpv_file_node *dist = dists;
> > -   static char backtitle[] = "FreeBSD Installer";
> > -   static char title[] = "Archive Extraction";
> > -   static char aprompt[] = "\n  Overall Progress:";
> > -   static char pprompt[] = "Extracting distribution files...\n";
> > +   unsigned int nminibars;
> > +   struct bsddialog_fileminibar *dists;
> > +   struct bsddialog_progviewconf pvconf;
> > +   struct bsddialog_conf conf;
> > struct sigaction act;
> > char error[PATH_MAX + 512];
> > 
> > @@ -78,17 +76,17 @@ main(void)
> > if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL)
> > distdir = __DECONST(char *, "");
> > 
> > -   /* Initialize dialog(3) */
> > -   init_dialog(stdin, stdout);
> > -   dialog_vars.backtitle = backtitle;
> > -   dlg_put_backtitle();
> > -
> > -   dialog_msgbox("",
> > -   "Checking distribution archives.\nPlease wait...", 4, 35, FALSE);
> > -
> > -   /*
> > -* Parse $DISTRIBUTIONS into dpv(3) linked-list
> > -*/
> > +   if (bsddialog_init() == BSDDIALOG_ERROR)
> > +   errx(EXIT_FAILURE, "Cannot init libbsdialog");
> > +   bsddialog_initconf(&conf);
> > +   bsddialog_backtitle(&conf, __DECONST(char *, "FreeBSD Installer"));
> 
> Can all these interfaces really not just use a const char * rather than
> having to scatter __DECONST everywhere if you want to pass a string
> literal to functions like this? There are quite a few __DECONST’s of
> string literals in this patch alone...
> 
> Jess

Adding Alfonso to CC.

Yes I agree, the __DECONST are from me, not from Alfonso, I added them to avoid
having to play with WARNS and make progress in the conversion anyway. Then start
the discussion with Alfonso to see how we can improve this.

Best regrads,
Bapt



git: dfa5a74357f3 - main - Fix grammatical issues.

2022-01-01 Thread Nathan Whitehorn
The branch main has been updated by nwhitehorn:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=dfa5a74357f3837b93b0cc90e5bee0a1d298ca3e

commit dfa5a74357f3837b93b0cc90e5bee0a1d298ca3e
Author: Nathan Whitehorn 
AuthorDate: 2022-01-02 00:34:48 +
Commit: Nathan Whitehorn 
CommitDate: 2022-01-02 00:34:48 +

Fix grammatical issues.
---
 usr.sbin/bsdinstall/scripts/bootconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/bsdinstall/scripts/bootconfig 
b/usr.sbin/bsdinstall/scripts/bootconfig
index 8c0e87991248..2a418d786643 100755
--- a/usr.sbin/bsdinstall/scripts/bootconfig
+++ b/usr.sbin/bsdinstall/scripts/bootconfig
@@ -74,7 +74,7 @@ update_uefi_bootentry()
fi
 
$DIALOG --backtitle 'FreeBSD Installer' --title 'Boot configuration' \
-   --yesno 'There is multiple "FreeBSD" efi boot entries, would you 
like to remove them all and add a new one?' 0 0
+   --yesno 'There are multiple "FreeBSD" EFI boot entries. Would you 
like to remove them all and add a new one?' 0 0
if [ $? -eq $DIALOG_OK ]; then
for entry in $(efibootmgr | awk '$NF == "FreeBSD" { 
sub(/.*Boot/,"", $1); sub(/\*/,"", $1); print $1 }'); do
efibootmgr -B -b ${entry}



git: a115a4aa51ae - main - systat -vm: Humanize output for ease of reading.

2022-01-01 Thread Kirk McKusick
The branch main has been updated by mckusick:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a115a4aa51ae891330c9c4404dd4df13b601556f

commit a115a4aa51ae891330c9c4404dd4df13b601556f
Author: Kirk McKusick 
AuthorDate: 2022-01-02 03:47:27 +
Commit: Kirk McKusick 
CommitDate: 2022-01-02 03:48:06 +

systat -vm: Humanize output for ease of reading.

Using 8 width is too wide for large numbers like 1379991K;
1330M is easier to read.

Submitted by: ota_j.email.ne.jp
Reviewed by:  mckusick
MFC after:2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33495
---
 usr.bin/systat/vmstat.c | 74 -
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index 57697284a6ab..a02674ce64a6 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -180,7 +180,7 @@ closekre(WINDOW *w)
 #define GENSTATROW  7  /* uses 2 rows and 29 cols */
 #define GENSTATCOL 22
 #define VMSTATROW   5  /* uses 17 rows and 12-14 cols */
-#define VMSTATCOL  49  /* actually 50-51 for some fields */
+#define VMSTATCOL  52
 #define GRAPHROW   10  /* uses 3 rows and 49-51 cols */
 #define GRAPHCOL0
 #define VNSTATROW  13  /* uses 4 rows and 13 columns */
@@ -317,25 +317,25 @@ labelkre(void)
mvprintw(INTSROW, INTSCOL + 1, "Interrupts");
mvprintw(INTSROW + 1, INTSCOL + 6, "total");
 
-   mvprintw(VMSTATROW, VMSTATCOL + 9, "ioflt");
-   mvprintw(VMSTATROW + 1, VMSTATCOL + 9, "cow");
-   mvprintw(VMSTATROW + 2, VMSTATCOL + 9, "zfod");
-   mvprintw(VMSTATROW + 3, VMSTATCOL + 9, "ozfod");
-   mvprintw(VMSTATROW + 4, VMSTATCOL + 9 - 1, "%%ozfod");
-   mvprintw(VMSTATROW + 5, VMSTATCOL + 9, "daefr");
-   mvprintw(VMSTATROW + 6, VMSTATCOL + 9, "prcfr");
-   mvprintw(VMSTATROW + 7, VMSTATCOL + 9, "totfr");
-   mvprintw(VMSTATROW + 8, VMSTATCOL + 9, "react");
-   mvprintw(VMSTATROW + 9, VMSTATCOL + 9, "pdwak");
-   mvprintw(VMSTATROW + 10, VMSTATCOL + 9, "pdpgs");
-   mvprintw(VMSTATROW + 11, VMSTATCOL + 9, "intrn");
-   mvprintw(VMSTATROW + 12, VMSTATCOL + 9, "wire");
-   mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "act");
-   mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "inact");
-   mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "laund");
-   mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "free");
+   mvprintw(VMSTATROW, VMSTATCOL + 6, "ioflt");
+   mvprintw(VMSTATROW + 1, VMSTATCOL + 6, "cow");
+   mvprintw(VMSTATROW + 2, VMSTATCOL + 6, "zfod");
+   mvprintw(VMSTATROW + 3, VMSTATCOL + 6, "ozfod");
+   mvprintw(VMSTATROW + 4, VMSTATCOL + 6 - 1, "%%ozfod");
+   mvprintw(VMSTATROW + 5, VMSTATCOL + 6, "daefr");
+   mvprintw(VMSTATROW + 6, VMSTATCOL + 6, "prcfr");
+   mvprintw(VMSTATROW + 7, VMSTATCOL + 6, "totfr");
+   mvprintw(VMSTATROW + 8, VMSTATCOL + 6, "react");
+   mvprintw(VMSTATROW + 9, VMSTATCOL + 6, "pdwak");
+   mvprintw(VMSTATROW + 10, VMSTATCOL + 6, "pdpgs");
+   mvprintw(VMSTATROW + 11, VMSTATCOL + 6, "intrn");
+   mvprintw(VMSTATROW + 12, VMSTATCOL + 6, "wire");
+   mvprintw(VMSTATROW + 13, VMSTATCOL + 6, "act");
+   mvprintw(VMSTATROW + 14, VMSTATCOL + 6, "inact");
+   mvprintw(VMSTATROW + 15, VMSTATCOL + 6, "laund");
+   mvprintw(VMSTATROW + 16, VMSTATCOL + 6, "free");
if (LINES - 1 > VMSTATROW + 17)
-   mvprintw(VMSTATROW + 17, VMSTATCOL + 9, "buf");
+   mvprintw(VMSTATROW + 17, VMSTATCOL + 6, "buf");
 
mvprintw(GENSTATROW, GENSTATCOL, " Csw  Trp  Sys  Int  Sof  Flt");
 
@@ -471,26 +471,26 @@ showkre(void)
putint(total.t_dw, PROCSROW + 2, PROCSCOL + 8, 3);
putint(total.t_sl, PROCSROW + 2, PROCSCOL + 12, 4);
putint(total.t_sw, PROCSROW + 2, PROCSCOL + 17, 3);
-   PUTRATE(v_io_faults, VMSTATROW, VMSTATCOL + 2, 8 - 2);
-   PUTRATE(v_cow_faults, VMSTATROW + 1, VMSTATCOL + 2, 8 - 2);
-   PUTRATE(v_zfod, VMSTATROW + 2, VMSTATCOL + 2, 8 - 2);
-   PUTRATE(v_ozfod, VMSTATROW + 3, VMSTATCOL, 8);
+   PUTRATE(v_io_faults, VMSTATROW, VMSTATCOL, 5);
+   PUTRATE(v_cow_faults, VMSTATROW + 1, VMSTATCOL, 5);
+   PUTRATE(v_zfod, VMSTATROW + 2, VMSTATCOL, 5);
+   PUTRATE(v_ozfod, VMSTATROW + 3, VMSTATCOL, 5);
putint(s.v_zfod != 0 ? (int)(s.v_ozfod * 100.0 / s.v_zfod) : 0,
-   VMSTATROW + 4, VMSTATCOL + 1, 8 - 1);
-   PUTRATE(v_dfree, VMSTATROW + 5, VMSTATCOL + 2, 8 - 2);
-   PUTRATE(v_pfree, VMSTATROW + 6, VMSTATCOL + 2, 8 - 2);
-   PUTRATE(v_tfree, VMSTATROW + 7, VMSTATCOL, 8);
-   PUTRATE(v_reactivated, VMSTATROW + 8, VMSTATCOL, 8);
-   PUTRATE(v_pdwakeups, VMSTATROW + 9, VMSTATCOL, 8);
-   PUTRATE(v_pdpages, VMSTATROW + 10, VMSTATCOL, 8);
-   PUTRATE(v_intrans, VMSTATROW + 11, VMSTATCOL, 8);
-   sysputpage(wnd, VMSTATROW + 12, VMSTA

git: e0281204cce3 - main - Add clarifying comments

2022-01-01 Thread Warner Losh
The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e0281204cce3d309b9aa390c0bcb2b1ab7bf2606

commit e0281204cce3d309b9aa390c0bcb2b1ab7bf2606
Author: Warner Losh 
AuthorDate: 2022-01-02 07:30:37 +
Commit: Warner Losh 
CommitDate: 2022-01-02 07:30:58 +

Add clarifying comments

Expand on the terse comments for where each of these files is used.

Reviewed by:emaste
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D33716
---
 share/mk/bsd.opts.mk  | 5 -
 share/mk/src.opts.mk  | 4 +++-
 sys/conf/kern.opts.mk | 5 -
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk
index 2504e5038d6e..68de435ef358 100644
--- a/share/mk/bsd.opts.mk
+++ b/share/mk/bsd.opts.mk
@@ -1,6 +1,9 @@
 # $FreeBSD$
 #
-# Option file for src builds.
+# Option file for bmake builds. These options are available to all users of
+# bmake (including the source tree userland and kernel builds). They generally
+# control how binaries are made, shared vs dynamic, etc and some general 
options
+# relevant for all build environments.
 #
 # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf
 # and /etc/make.conf files. These translate in the build system to 
MK_FOO={yes,no}
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 806b2a4a9768..02515f8ff66f 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -1,6 +1,8 @@
 # $FreeBSD$
 #
-# Option file for FreeBSD /usr/src builds.
+# Option file for FreeBSD /usr/src builds, at least the userland and boot 
loader
+# portions of the tree. These options generally chose what parts of the tree to
+# include or omit and are FreeBSD source tree specific.
 #
 # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf
 # and /etc/make.conf files. These translate in the build system to 
MK_FOO={yes,no}
diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk
index 20c6b4153d11..532c282edc34 100644
--- a/sys/conf/kern.opts.mk
+++ b/sys/conf/kern.opts.mk
@@ -1,6 +1,9 @@
 # $FreeBSD$
 
-# Options set in the build system that affect the kernel somehow.
+# Options set in the build system which affect the building of kernel
+# modules. These select which parts to compile in or out (eg INET) or which
+# parts to omit (eg CDDL or SOURCELESS_HOST). Some of these will cause
+# config.mk to define symbols in various opt_*.h files.
 
 #
 # Define MK_* variables (which are either "yes" or "no") for users



git: 4cc76d90ea25 - main - iicbb: Always build ofw_bus_if.h

2022-01-01 Thread Warner Losh
The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4cc76d90ea259df205fec14d6bed1bfb7b0ef23e

commit 4cc76d90ea259df205fec14d6bed1bfb7b0ef23e
Author: Warner Losh 
AuthorDate: 2022-01-02 07:32:30 +
Commit: Warner Losh 
CommitDate: 2022-01-02 07:41:28 +

iicbb: Always build ofw_bus_if.h

Always make ofw_bus_if.h. While it's only used when option FDT is in the
kernel, it can always be generated. In theory we could omit it if option
FDT isn't present, but none of the rest of sys/modules does that. That
fine-grained control likely won't be reliable w/o a redesign of the
kernel/module config system.

Sponsored by:   Netflix
---
 sys/modules/i2c/iicbb/Makefile | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/modules/i2c/iicbb/Makefile b/sys/modules/i2c/iicbb/Makefile
index 9b74a5da39d6..7da4c6acc3b3 100644
--- a/sys/modules/i2c/iicbb/Makefile
+++ b/sys/modules/i2c/iicbb/Makefile
@@ -1,14 +1,9 @@
 # $FreeBSD$
 
 .PATH: ${SRCTOP}/sys/dev/iicbus
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
-${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \
-${MACHINE_CPUARCH} == "riscv"
-ofw_bus_if=ofw_bus_if.h
-.endif
 KMOD   = iicbb
 SRCS   = device_if.h bus_if.h iicbus_if.h \
- iicbb_if.h iicbb_if.c iicbb.c ${ofw_bus_if} opt_platform.h
+ iicbb_if.h iicbb_if.c iicbb.c ofw_bus_if.h opt_platform.h
 
 EXPORT_SYMS=   YES