svn commit: r337735 - in head: lib/libpmc lib/libpmc/pmu-events/arch/x86 lib/libpmc/pmu-events/arch/x86/amdfam17h sys/dev/hwpmc

2018-08-13 Thread Matt Macy
Author: mmacy
Date: Tue Aug 14 05:18:43 2018
New Revision: 337735
URL: https://svnweb.freebsd.org/changeset/base/337735

Log:
  Add library and kernel support for AMD Family 17h counters
  
  NB: lacks default sample rate for most counters

Modified:
  head/lib/libpmc/libpmc_pmu_util.c
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
  head/lib/libpmc/pmu-events/arch/x86/mapfile.csv
  head/sys/dev/hwpmc/hwpmc_amd.c

Modified: head/lib/libpmc/libpmc_pmu_util.c
==
--- head/lib/libpmc/libpmc_pmu_util.c   Tue Aug 14 01:57:11 2018
(r337734)
+++ head/lib/libpmc/libpmc_pmu_util.c   Tue Aug 14 05:18:43 2018
(r337735)
@@ -46,7 +46,14 @@ struct pmu_alias {
const char *pa_alias;
const char *pa_name;
 };
-static struct pmu_alias pmu_alias_table[] = {
+
+typedef enum {
+   PMU_INVALID,
+   PMU_INTEL,
+   PMU_AMD,
+} pmu_mfr_t;
+
+static struct pmu_alias pmu_intel_alias_table[] = {
{"UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
{"UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
{"LLC_MISSES", "LONGEST_LAT_CACHE.MISS"},
@@ -70,6 +77,40 @@ static struct pmu_alias pmu_alias_table[] = {
{NULL, NULL},
 };
 
+static struct pmu_alias pmu_amd_alias_table[] = {
+   {"UNHALTED_CORE_CYCLES", "ls_not_halted_cyc"},
+   {"UNHALTED-CORE-CYCLES", "ls_not_halted_cyc"},
+   {NULL, NULL},
+};
+
+
+static pmu_mfr_t
+pmu_events_mfr(void)
+{
+   char *buf;
+   size_t s;
+   pmu_mfr_t mfr;
+
+   if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, ,
+   (void *)NULL, 0) == -1)
+   return (PMU_INVALID);
+   if ((buf = malloc(s + 1)) == NULL)
+   return (PMU_INVALID);
+   if (sysctlbyname("kern.hwpmc.cpuid", buf, ,
+   (void *)NULL, 0) == -1) {
+   free(buf);
+   return (PMU_INVALID);
+   }
+   if (strcasestr(buf, "AuthenticAMD") != NULL)
+   mfr = PMU_AMD;
+   else if (strcasestr(buf, "GenuineIntel") != NULL)
+   mfr = PMU_INTEL;
+   else
+   mfr = PMU_INVALID;
+   free(buf);
+   return (mfr);
+}
+
 /*
  *  The Intel fixed mode counters are:
  * "inst_retired.any",
@@ -82,11 +123,23 @@ static struct pmu_alias pmu_alias_table[] = {
 static const char *
 pmu_alias_get(const char *name)
 {
+   pmu_mfr_t mfr;
struct pmu_alias *pa;
+   struct pmu_alias *pmu_alias_table;
 
+   if ((mfr = pmu_events_mfr()) == PMU_INVALID)
+   return (name);
+   if (mfr == PMU_AMD)
+   pmu_alias_table = pmu_amd_alias_table;
+   else if (mfr == PMU_INTEL)
+   pmu_alias_table = pmu_intel_alias_table;
+   else
+   return (name);
+
for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++)
if (strcasecmp(name, pa->pa_alias) == 0)
return (pa->pa_name);
+
return (name);
 }
 
@@ -352,57 +405,112 @@ pmc_pmu_print_counter_full(const char *ev)
}
 }
 
-int
-pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm)
+static int
+pmc_pmu_amd_pmcallocate(const char *event_name __unused, struct 
pmc_op_pmcallocate *pm,
+   struct pmu_event_desc *ped)
 {
-   const struct pmu_event *pe;
-   struct pmu_event_desc ped;
-   struct pmc_md_iap_op_pmcallocate *iap;
-   int idx, isfixed;
+   struct pmc_md_amd_op_pmcallocate *amd;
 
-   iap = >pm_md.pm_iap;
-   isfixed = 0;
-   bzero(iap, sizeof(*iap));
-   event_name = pmu_alias_get(event_name);
-   pm->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE);
-   if ((pe = pmu_event_get(NULL, event_name, )) == NULL)
-   return (ENOENT);
-   if (pe->alias && (pe = pmu_event_get(NULL, pe->alias, )) == NULL)
-   return (ENOENT);
-   if (pe->event == NULL)
-   return (ENOENT);
-   if (pmu_parse_event(, pe->event))
-   return (ENOENT);
+   amd = >pm_md.pm_amd;
+   amd->pm_amd_config = AMD_PMC_TO_EVENTMASK(ped->ped_event);
+   if (ped->ped_umask > 0) {
+   pm->pm_caps |= PMC_CAP_QUALIFIER;
+   amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask);
+   }
+   pm->pm_class = PMC_CLASS_K8;
 
+   if ((pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == 0 ||
+   (pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) ==
+   (PMC_CAP_USER|PMC_CAP_SYSTEM))
+   amd->pm_amd_config |= (AMD_PMC_USR | AMD_PMC_OS);
+   else if (pm->pm_caps & PMC_CAP_USER)
+   amd->pm_amd_config |= AMD_PMC_USR;
+   else if (pm->pm_caps & PMC_CAP_SYSTEM)
+   amd->pm_amd_config |= AMD_PMC_OS;
+   if (ped->ped_edge)
+   amd->pm_amd_config |= AMD_PMC_EDGE;
+   if (ped->ped_inv)
+   amd->pm_amd_config 

Re: svn commit: r337730 - in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h

2018-08-13 Thread Matthew Macy
The entries in the .json files were replicated and mapfile.csv lacked a
newline at the end of the file causing parse failures.
-M

On Mon, Aug 13, 2018 at 4:56 PM Ravi Pokala  wrote:

> Hi Matt,
>
> -Original Message-
> From:  on behalf of Matt Macy
> 
> Date: 2018-08-13, Monday at 16:46
> To: , , <
> svn-src-head@freebsd.org>
> Subject: svn commit: r337730 - in head/lib/libpmc/pmu-events/arch/x86: .
> amdfam17h
>
> > Author: mmacy
> > Date: Mon Aug 13 23:46:44 2018
> > New Revision: 337730
> > URL: https://svnweb.freebsd.org/changeset/base/337730
> >
> > Log:
> >   pmc amd17h: fix inputs to jevents
> >
> > Modified:
> >   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json
> >   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
> >   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/floating-point.json
> >   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
> >   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/other.json
> >   head/lib/libpmc/pmu-events/arch/x86/mapfile.csv
>
> What was the nature of the problem, and how was it fixed?
>
> Thanks,
>
> Ravi (rpokala@)
>
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r337709 - head/sys/net

2018-08-13 Thread Kubilay Kocak
On 14/08/2018 12:13 am, Andrew Gallatin wrote:
> Author: gallatin
> Date: Mon Aug 13 14:13:25 2018
> New Revision: 337709
> URL: https://svnweb.freebsd.org/changeset/base/337709
> 
> Log:
>   lagg: allow lacp to manage the link state
>   
>   Lacp needs to manage the link state itself. Unlike other
>   lagg protocols, the ability of lacp to pass traffic
>   depends not only on the lagg members having link, but also
>   on the lacp protocol converging to a distributing state with the
>   link partner.
>   
>   If we prematurely mark the link as up, then we will send a
>   gratuitous arp (via arp_handle_ifllchange()) before the lacp
>   interface is capable of passing traffic. When this happens,
>   the gratuitous arp is lost, and our link partner may cache
>   a stale mac address (eg, when the base mac address for the
>   lagg bundle changes, due to a BIOS change re-ordering NIC
>   unit numbers)

Hi Andrew

Can this be MFC'd?

>   Reviewed by: jtl, hselasky
>   Sponsored by: Netflix
> 
> Modified:
>   head/sys/net/ieee8023ad_lacp.c
>   head/sys/net/if_lagg.c
> 
> Modified: head/sys/net/ieee8023ad_lacp.c
> ==
> --- head/sys/net/ieee8023ad_lacp.cMon Aug 13 13:58:45 2018
> (r337708)
> +++ head/sys/net/ieee8023ad_lacp.cMon Aug 13 14:13:25 2018
> (r337709)
> @@ -711,6 +711,8 @@ lacp_disable_distributing(struct lacp_port *lp)
>   }
>  
>   lp->lp_state &= ~LACP_STATE_DISTRIBUTING;
> + if_link_state_change(sc->sc_ifp,
> + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN);
>  }
>  
>  static void
> @@ -745,6 +747,9 @@ lacp_enable_distributing(struct lacp_port *lp)
>   } else
>   /* try to become the active aggregator */
>   lacp_select_active_aggregator(lsc);
> +
> + if_link_state_change(sc->sc_ifp,
> + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN);
>  }
>  
>  static void
> 
> Modified: head/sys/net/if_lagg.c
> ==
> --- head/sys/net/if_lagg.cMon Aug 13 13:58:45 2018(r337708)
> +++ head/sys/net/if_lagg.cMon Aug 13 14:13:25 2018(r337709)
> @@ -1737,6 +1737,10 @@ lagg_linkstate(struct lagg_softc *sc)
>  
>   LAGG_XLOCK_ASSERT(sc);
>  
> + /* LACP handles link state itself */
> + if (sc->sc_proto == LAGG_PROTO_LACP)
> + return;
> +
>   /* Our link is considered up if at least one of our ports is active */
>   LAGG_RLOCK();
>   CK_SLIST_FOREACH(lp, >sc_ports, lp_entries) {
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337732 - head/lib/libpam/modules/pam_exec

2018-08-13 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Aug 14 00:14:17 2018
New Revision: 337732
URL: https://svnweb.freebsd.org/changeset/base/337732

Log:
  Add support for Linux-PAM's badly named expose_authtok option.
  
  Submitted by: Thomas Munro 
  MFC after:1 week
  Differential Revision:D16171

Modified:
  head/lib/libpam/modules/pam_exec/pam_exec.8
  head/lib/libpam/modules/pam_exec/pam_exec.c

Modified: head/lib/libpam/modules/pam_exec/pam_exec.8
==
--- head/lib/libpam/modules/pam_exec/pam_exec.8 Mon Aug 13 23:53:11 2018
(r337731)
+++ head/lib/libpam/modules/pam_exec/pam_exec.8 Tue Aug 14 00:14:17 2018
(r337732)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2001,2003 Networks Associates Technology, Inc.
 .\" Copyright (c) 2017 Dag-Erling Smørgrav
+.\" Copyright (c) 2018 Thomas Munro
 .\" All rights reserved.
 .\"
 .\" Portions of this software were developed for the FreeBSD Project by
@@ -33,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2017
+.Dd August 14, 2018
 .Dt PAM_EXEC 8
 .Os
 .Sh NAME
@@ -72,6 +73,8 @@ Ignored for compatibility reasons.
 .It Cm return_prog_exit_status
 Use the program exit status as the return code of the pam_sm_* function.
 It must be a valid return value for this function.
+.It Cm expose_authtok
+Write the authentication token to the program's standard input stream.
 .It Cm --
 Stop options parsing;
 program and its arguments follow.

Modified: head/lib/libpam/modules/pam_exec/pam_exec.c
==
--- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Aug 13 23:53:11 2018
(r337731)
+++ head/lib/libpam/modules/pam_exec/pam_exec.c Tue Aug 14 00:14:17 2018
(r337732)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2001,2003 Networks Associates Technology, Inc.
  * Copyright (c) 2017 Dag-Erling Smørgrav
+ * Copyright (c) 2018 Thomas Munro
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -108,6 +109,7 @@ struct pe_opts {
int return_prog_exit_status;
int capture_stdout;
int capture_stderr;
+   int expose_authtok;
 };
 
 static int
@@ -135,6 +137,8 @@ parse_options(const char *func, int *argc, const char 
options->capture_stderr = 1;
} else if (strcmp((*argv)[i], "return_prog_exit_status") == 0) {
options->return_prog_exit_status = 1;
+   } else if (strcmp((*argv)[i], "expose_authtok") == 0) {
+   options->expose_authtok = 1;
} else {
if (strcmp((*argv)[i], "--") == 0) {
(*argc)--;
@@ -158,19 +162,22 @@ _pam_exec(pam_handle_t *pamh,
 struct pe_opts *options)
 {
char buf[PAM_MAX_MSG_SIZE];
-   struct pollfd pfd[3];
+   struct pollfd pfd[4];
const void *item;
char **envlist, *envstr, *resp, **tmp;
-   ssize_t rlen;
+   ssize_t rlen, wlen;
int envlen, extralen, i;
int pam_err, serrno, status;
-   int chout[2], cherr[2], pd;
-   nfds_t nfds;
+   int chin[2], chout[2], cherr[2], pd;
+   nfds_t nfds, nreadfds;
pid_t pid;
+   const char *authtok;
+   size_t authtok_size;
+   int rc;
 
pd = -1;
pid = 0;
-   chout[0] = chout[1] = cherr[0] = cherr[1] = -1;
+   chin[0] = chin[1] = chout[0] = chout[1] = cherr[0] = cherr[1] = -1;
envlist = NULL;
 
 #define OUT(ret) do { pam_err = (ret); goto out; } while (0)
@@ -235,6 +242,25 @@ _pam_exec(pam_handle_t *pamh,
openpam_log(PAM_LOG_DEBUG, "envlen = %d extralen = %d envlist = %p",
envlen, extralen, envlist);
 
+   /* set up pipe and get authtok if requested */
+   if (options->expose_authtok) {
+   if (pipe(chin) != 0) {
+   openpam_log(PAM_LOG_ERROR, "%s: pipe(): %m", func);
+   OUT(PAM_SYSTEM_ERR);
+   }
+   if (fcntl(chin[1], F_SETFL, O_NONBLOCK)) {
+   openpam_log(PAM_LOG_ERROR, "%s: fcntl(): %m", func);
+   OUT(PAM_SYSTEM_ERR);
+   }
+   rc = pam_get_authtok(pamh, PAM_AUTHTOK, , NULL);
+   if (rc == PAM_SUCCESS) {
+   authtok_size = strlen(authtok);
+   } else {
+   openpam_log(PAM_LOG_ERROR, "%s: pam_get_authtok(): %s", 
func,
+   pam_strerror(pamh, rc));
+   OUT(PAM_SYSTEM_ERR);
+   }
+   }
/* set up pipes if capture was requested */
if (options->capture_stdout) {
if (pipe(chout) != 0) {
@@ -269,9 +295,13 @@ _pam_exec(pam_handle_t *pamh,
 
if ((pid = pdfork(, 0)) == 0) {
/* child */
-   if ((chout[0] >= 0 && close(chout[0]) != 0) ||
+ 

Re: svn commit: r337730 - in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h

2018-08-13 Thread Ravi Pokala
Hi Matt,

-Original Message-
From:  on behalf of Matt Macy 

Date: 2018-08-13, Monday at 16:46
To: , , 

Subject: svn commit: r337730 - in head/lib/libpmc/pmu-events/arch/x86: . 
amdfam17h

> Author: mmacy
> Date: Mon Aug 13 23:46:44 2018
> New Revision: 337730
> URL: https://svnweb.freebsd.org/changeset/base/337730
> 
> Log:
>   pmc amd17h: fix inputs to jevents
> 
> Modified:
>   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json
>   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
>   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/floating-point.json
>   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
>   head/lib/libpmc/pmu-events/arch/x86/amdfam17h/other.json
>   head/lib/libpmc/pmu-events/arch/x86/mapfile.csv

What was the nature of the problem, and how was it fixed?

Thanks,

Ravi (rpokala@)


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337731 - head/sys/dev/iicbus

2018-08-13 Thread Ian Lepore
Author: ian
Date: Mon Aug 13 23:53:11 2018
New Revision: 337731
URL: https://svnweb.freebsd.org/changeset/base/337731

Log:
  Export the eeprom device size via readonly sysctl.  Also export the write
  page size and address size, although they are likely to be inherently
  less-interesting values outside of the driver.

Modified:
  head/sys/dev/iicbus/icee.c

Modified: head/sys/dev/iicbus/icee.c
==
--- head/sys/dev/iicbus/icee.c  Mon Aug 13 23:46:44 2018(r337730)
+++ head/sys/dev/iicbus/icee.c  Mon Aug 13 23:53:11 2018(r337731)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -186,6 +187,8 @@ static int
 icee_attach(device_t dev)
 {
struct icee_softc *sc = device_get_softc(dev);
+   struct sysctl_ctx_list *ctx;
+   struct sysctl_oid_list *tree;
 
sc->dev = dev;
sc->addr = iicbus_get_addr(dev);
@@ -205,6 +208,16 @@ icee_attach(device_t dev)
return (ENOMEM);
}
sc->cdev->si_drv1 = sc;
+
+   ctx = device_get_sysctl_ctx(dev);
+   tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
+   SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "address_size", CTLFLAG_RD,
+   >type, 0, "Memory array address size in bits");
+   SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "device_size", CTLFLAG_RD,
+   >size, 0, "Memory array capacity in bytes");
+   SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "write_size", CTLFLAG_RD,
+   >wr_sz, 0, "Memory array page write size in bytes");
+
return (0);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337730 - in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h

2018-08-13 Thread Matt Macy
Author: mmacy
Date: Mon Aug 13 23:46:44 2018
New Revision: 337730
URL: https://svnweb.freebsd.org/changeset/base/337730

Log:
  pmc amd17h: fix inputs to jevents

Modified:
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/floating-point.json
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/other.json
  head/lib/libpmc/pmu-events/arch/x86/mapfile.csv

Modified: head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json
==
--- head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.jsonMon Aug 13 
22:34:57 2018(r337729)
+++ head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.jsonMon Aug 13 
23:46:44 2018(r337730)
@@ -329,1659 +329,4 @@
  "PublicDescription": "Total cycles spent with one or more fill requests in 
flight from L2.",
  "UMask": "0x1"
  }
-][
- {
- "EventName": "ic_fw32",
- "EventCode": "0x80",
- "BriefDescription": "The number of 32B fetch windows transferred from IC pipe 
to DE instruction decoder (includes non-cacheable and cacheable fill 
responses)."
- },
- {
- "EventName": "ic_fw32_miss",
- "EventCode": "0x81",
- "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC 
and missed in the full tag."
- },
- {
- "EventName": "ic_cache_fill_l2",
- "EventCode": "0x82",
- "BriefDescription": "The number of 64 byte instruction cache line was 
fulfilled from the L2 cache."
- },
- {
- "EventName": "ic_cache_fill_sys",
- "EventCode": "0x83",
- "BriefDescription": "The number of 64 byte instruction cache line fulfilled 
from system memory or another cache."
- },
- {
- "EventName": "bp_l1_tlb_miss_l2_hit",
- "EventCode": "0x84",
- "BriefDescription": "The number of instruction fetches that miss in the L1 
ITLB but hit in the L2 ITLB."
- },
- {
- "EventName": "bp_l1_tlb_miss_l2_miss",
- "EventCode": "0x85",
- "BriefDescription": "The number of instruction fetches that miss in both the 
L1 and L2 TLBs."
- },
- {
- "EventName": "bp_snp_re_sync",
- "EventCode": "0x86",
- "BriefDescription": "The number of pipeline restarts caused by invalidating 
probes that hit on the instruction stream currently being executed. This would 
happen if the active instruction stream was being modified by another processor 
in an MP system - typically a highly unlikely event."
- },
- {
- "EventName": "ic_fetch_stall.ic_stall_any",
- "EventCode": "0x87",
- "BriefDescription": "IC pipe was stalled during this clock cycle for any 
reason (nothing valid in pipe ICM1).",
- "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle for any reason (nothing valid in pipe ICM1).",
- "UMask": "0x4"
- },
- {
- "EventName": "ic_fetch_stall.ic_stall_dq_empty",
- "EventCode": "0x87",
- "BriefDescription": "IC pipe was stalled during this clock cycle (including 
IC to OC fetches) due to DQ empty.",
- "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle (including IC to OC fetches) due to DQ empty.",
- "UMask": "0x2"
- },
- {
- "EventName": "ic_fetch_stall.ic_stall_back_pressure",
- "EventCode": "0x87",
- "BriefDescription": "IC pipe was stalled during this clock cycle (including 
IC to OC fetches) due to back-pressure.",
- "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle (including IC to OC fetches) due to back-pressure.",
- "UMask": "0x1"
- },
- {
- "EventName": "bp_l1_btb_correct",
- "EventCode": "0x8a",
- "BriefDescription": "L1 BTB Correction."
- },
- {
- "EventName": "bp_l2_btb_correct",
- "EventCode": "0x8b",
- "BriefDescription": "L2 BTB Correction."
- },
- {
- "EventName": "ic_cache_inval.l2_invalidating_probe",
- "EventCode": "0x8c",
- "BriefDescription": "IC line invalidated due to L2 invalidating probe 
(external or LS).",
- "PublicDescription": "The number of instruction cache lines invalidated. A 
non-SMC event is CMC (cross modifying code), either from the other thread of 
the core or another core. IC line invalidated due to L2 invalidating probe 
(external or LS).",
- "UMask": "0x2"
- },
- {
- "EventName": "ic_cache_inval.fill_invalidated",
- "EventCode": "0x8c",
- "BriefDescription": "IC line invalidated due to overwriting fill response.",
- "PublicDescription": "The number of instruction cache lines invalidated. A 
non-SMC event is CMC (cross modifying code), either from the other thread of 
the core or another core. IC line invalidated due to overwriting fill 
response.",
- "UMask": "0x1"
- },
- {
- "EventName": "bp_tlb_rel",
- "EventCode": "0x99",
- "BriefDescription": "The number of ITLB reload requests."
- },
- {
- "EventName": "ic_oc_mode_switch.oc_ic_mode_switch",
- "EventCode": "0x28a",
- "BriefDescription": "OC to IC mode switch.",
- "PublicDescription": "OC Mode Switch. OC to IC mode switch.",
- "UMask": "0x2"
- },
- {
- 

svn commit: r337729 - in head/lib/libpmc/pmu-events/arch/x86: . amdfam17h

2018-08-13 Thread Matt Macy
Author: mmacy
Date: Mon Aug 13 22:34:57 2018
New Revision: 337729
URL: https://svnweb.freebsd.org/changeset/base/337729

Log:
  Add PMC support for AMD Family CPUs

Added:
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json   (contents, props 
changed)
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json   (contents, props 
changed)
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/floating-point.json   
(contents, props changed)
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json   (contents, props 
changed)
  head/lib/libpmc/pmu-events/arch/x86/amdfam17h/other.json   (contents, props 
changed)
Modified:
  head/lib/libpmc/pmu-events/arch/x86/mapfile.csv

Added: head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.json
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libpmc/pmu-events/arch/x86/amdfam17h/cache.jsonMon Aug 13 
22:34:57 2018(r337729)
@@ -0,0 +1,1987 @@
+[
+ {
+ "EventName": "ic_fw32",
+ "EventCode": "0x80",
+ "BriefDescription": "The number of 32B fetch windows transferred from IC pipe 
to DE instruction decoder (includes non-cacheable and cacheable fill 
responses)."
+ },
+ {
+ "EventName": "ic_fw32_miss",
+ "EventCode": "0x81",
+ "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC 
and missed in the full tag."
+ },
+ {
+ "EventName": "ic_cache_fill_l2",
+ "EventCode": "0x82",
+ "BriefDescription": "The number of 64 byte instruction cache line was 
fulfilled from the L2 cache."
+ },
+ {
+ "EventName": "ic_cache_fill_sys",
+ "EventCode": "0x83",
+ "BriefDescription": "The number of 64 byte instruction cache line fulfilled 
from system memory or another cache."
+ },
+ {
+ "EventName": "bp_l1_tlb_miss_l2_hit",
+ "EventCode": "0x84",
+ "BriefDescription": "The number of instruction fetches that miss in the L1 
ITLB but hit in the L2 ITLB."
+ },
+ {
+ "EventName": "bp_l1_tlb_miss_l2_miss",
+ "EventCode": "0x85",
+ "BriefDescription": "The number of instruction fetches that miss in both the 
L1 and L2 TLBs."
+ },
+ {
+ "EventName": "bp_snp_re_sync",
+ "EventCode": "0x86",
+ "BriefDescription": "The number of pipeline restarts caused by invalidating 
probes that hit on the instruction stream currently being executed. This would 
happen if the active instruction stream was being modified by another processor 
in an MP system - typically a highly unlikely event."
+ },
+ {
+ "EventName": "ic_fetch_stall.ic_stall_any",
+ "EventCode": "0x87",
+ "BriefDescription": "IC pipe was stalled during this clock cycle for any 
reason (nothing valid in pipe ICM1).",
+ "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle for any reason (nothing valid in pipe ICM1).",
+ "UMask": "0x4"
+ },
+ {
+ "EventName": "ic_fetch_stall.ic_stall_dq_empty",
+ "EventCode": "0x87",
+ "BriefDescription": "IC pipe was stalled during this clock cycle (including 
IC to OC fetches) due to DQ empty.",
+ "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle (including IC to OC fetches) due to DQ empty.",
+ "UMask": "0x2"
+ },
+ {
+ "EventName": "ic_fetch_stall.ic_stall_back_pressure",
+ "EventCode": "0x87",
+ "BriefDescription": "IC pipe was stalled during this clock cycle (including 
IC to OC fetches) due to back-pressure.",
+ "PublicDescription": "Instruction Pipe Stall. IC pipe was stalled during this 
clock cycle (including IC to OC fetches) due to back-pressure.",
+ "UMask": "0x1"
+ },
+ {
+ "EventName": "bp_l1_btb_correct",
+ "EventCode": "0x8a",
+ "BriefDescription": "L1 BTB Correction."
+ },
+ {
+ "EventName": "bp_l2_btb_correct",
+ "EventCode": "0x8b",
+ "BriefDescription": "L2 BTB Correction."
+ },
+ {
+ "EventName": "ic_cache_inval.l2_invalidating_probe",
+ "EventCode": "0x8c",
+ "BriefDescription": "IC line invalidated due to L2 invalidating probe 
(external or LS).",
+ "PublicDescription": "The number of instruction cache lines invalidated. A 
non-SMC event is CMC (cross modifying code), either from the other thread of 
the core or another core. IC line invalidated due to L2 invalidating probe 
(external or LS).",
+ "UMask": "0x2"
+ },
+ {
+ "EventName": "ic_cache_inval.fill_invalidated",
+ "EventCode": "0x8c",
+ "BriefDescription": "IC line invalidated due to overwriting fill response.",
+ "PublicDescription": "The number of instruction cache lines invalidated. A 
non-SMC event is CMC (cross modifying code), either from the other thread of 
the core or another core. IC line invalidated due to overwriting fill 
response.",
+ "UMask": "0x1"
+ },
+ {
+ "EventName": "bp_tlb_rel",
+ "EventCode": "0x99",
+ "BriefDescription": "The number of ITLB reload requests."
+ },
+ {
+ "EventName": "ic_oc_mode_switch.oc_ic_mode_switch",
+ "EventCode": "0x28a",
+ "BriefDescription": "OC to IC mode switch.",
+ "PublicDescription": "OC Mode Switch. OC to IC 

svn commit: r337728 - head/usr.bin/printf/tests

2018-08-13 Thread Jilles Tjoelker
Author: jilles
Date: Mon Aug 13 21:54:27 2018
New Revision: 337728
URL: https://svnweb.freebsd.org/changeset/base/337728

Log:
  printf: Add test for width and precision in %b format
  
  PR:   229641
  Submitted by: pfg

Added:
  head/usr.bin/printf/tests/regress.bwidth.out   (contents, props changed)
Modified:
  head/usr.bin/printf/tests/Makefile
  head/usr.bin/printf/tests/regress.sh

Modified: head/usr.bin/printf/tests/Makefile
==
--- head/usr.bin/printf/tests/Makefile  Mon Aug 13 21:53:18 2018
(r337727)
+++ head/usr.bin/printf/tests/Makefile  Mon Aug 13 21:54:27 2018
(r337728)
@@ -5,6 +5,7 @@ PACKAGE=tests
 TAP_TESTS_SH=  legacy_test
 
 ${PACKAGE}FILES+=  regress.b.out
+${PACKAGE}FILES+=  regress.bwidth.out
 ${PACKAGE}FILES+=  regress.d.out
 ${PACKAGE}FILES+=  regress.f.out
 ${PACKAGE}FILES+=  regress.l1.out

Added: head/usr.bin/printf/tests/regress.bwidth.out
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/printf/tests/regress.bwidth.outMon Aug 13 21:54:27 
2018(r337728)
@@ -0,0 +1 @@
+  a

Modified: head/usr.bin/printf/tests/regress.sh
==
--- head/usr.bin/printf/tests/regress.shMon Aug 13 21:53:18 2018
(r337727)
+++ head/usr.bin/printf/tests/regress.shMon Aug 13 21:54:27 2018
(r337728)
@@ -2,7 +2,7 @@
 
 REGRESSION_START($1)
 
-echo '1..23'
+echo '1..24'
 
 REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"')
 REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 
123')
@@ -27,5 +27,6 @@ REGRESSION_TEST(`missingpos1', `printf "%*.*1\$s" 1 1 
 REGRESSION_TEST(`missingpos1', `printf "%1\$*2\$.*s" 1 1 1 2>&1')
 REGRESSION_TEST(`missingpos1', `printf "%*1\$.*2\$s" 1 1 1 2>&1')
 REGRESSION_TEST(`missingpos1', `printf "%1\$*.*2\$s" 1 1 1 2>&1')
+REGRESSION_TEST(`bwidth', `printf "%8.2b" "a\nb\n"')
 
 REGRESSION_END()
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337727 - head/sys/dev/sbni

2018-08-13 Thread Brooks Davis
Author: brooks
Date: Mon Aug 13 21:53:18 2018
New Revision: 337727
URL: https://svnweb.freebsd.org/changeset/base/337727

Log:
  Copy out from kernel to data, not the other way around.
  
  MFC after:3 days
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/dev/sbni/if_sbni.c

Modified: head/sys/dev/sbni/if_sbni.c
==
--- head/sys/dev/sbni/if_sbni.c Mon Aug 13 20:29:39 2018(r337726)
+++ head/sys/dev/sbni/if_sbni.c Mon Aug 13 21:53:18 2018(r337727)
@@ -1153,7 +1153,7 @@ sbni_ioctl(struct ifnet *ifp, u_long command, caddr_t 
SBNI_LOCK(sc);
bcopy(>in_stats, in_stats, sizeof(struct sbni_in_stats));
SBNI_UNLOCK(sc);
-   error = copyout(ifr_data_get_ptr(ifr), in_stats,
+   error = copyout(in_stats, ifr_data_get_ptr(ifr),
sizeof(struct sbni_in_stats));
free(in_stats, M_DEVBUF);
break;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337726 - head/sys/dev/e1000

2018-08-13 Thread Marius Strobl
Author: marius
Date: Mon Aug 13 20:29:39 2018
New Revision: 337726
URL: https://svnweb.freebsd.org/changeset/base/337726

Log:
  Remove the duplicated CSUM_IP6_TCP introduced in r311849 from the TX
  checksum capabilities of IGB-class MACs. While at it, fix the line
  wrapping.
  
  PR:   230571

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Mon Aug 13 19:59:42 2018(r337725)
+++ head/sys/dev/e1000/if_em.c  Mon Aug 13 20:29:39 2018(r337726)
@@ -793,8 +793,8 @@ em_if_attach_pre(if_ctx_t ctx)
scctx->isc_tx_tso_size_max = EM_TSO_SIZE;
scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE;
scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS;
-   scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | 
CSUM_IP6_TCP \
-   | CSUM_IP6_UDP | CSUM_IP6_TCP;
+   scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO |
+CSUM_IP6_TCP | CSUM_IP6_UDP;
if (adapter->hw.mac.type != e1000_82575)
scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337725 - in head/sys/dev: mpr mps

2018-08-13 Thread Warner Losh
Author: imp
Date: Mon Aug 13 19:59:42 2018
New Revision: 337725
URL: https://svnweb.freebsd.org/changeset/base/337725

Log:
  Port the mps panic-safe shutdown_final handling to mpr
  
  r330951 by smh fixed the mps driver to avoid deadlocks when panicing.
  The same code is needed for mpr, so port it here, along with the fix
  which allows the CCBs scheduled to complete avoiding at least a scary
  message and likely other unintended consequences.
  
  Sponsored by: Netflix
  Differential Review: https://reviews.freebsd.org/D16663

Modified:
  head/sys/dev/mpr/mpr_sas_lsi.c
  head/sys/dev/mpr/mprvar.h
  head/sys/dev/mps/mps_sas_lsi.c

Modified: head/sys/dev/mpr/mpr_sas_lsi.c
==
--- head/sys/dev/mpr/mpr_sas_lsi.c  Mon Aug 13 19:59:37 2018
(r337724)
+++ head/sys/dev/mpr/mpr_sas_lsi.c  Mon Aug 13 19:59:42 2018
(r337725)
@@ -46,10 +46,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -127,7 +129,7 @@ int mprsas_get_sas_address_for_sata_disk(struct mpr_so
 u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD);
 static int mprsas_volume_add(struct mpr_softc *sc,
 u16 handle);
-static void mprsas_SSU_to_SATA_devices(struct mpr_softc *sc);
+static void mprsas_SSU_to_SATA_devices(struct mpr_softc *sc, int howto);
 static void mprsas_stop_unit_done(struct cam_periph *periph,
 union ccb *done_ccb);
 
@@ -1469,7 +1471,7 @@ out:
  * Return nothing.
  */
 static void
-mprsas_SSU_to_SATA_devices(struct mpr_softc *sc)
+mprsas_SSU_to_SATA_devices(struct mpr_softc *sc, int howto)
 {
struct mprsas_softc *sassc = sc->sassc;
union ccb *ccb;
@@ -1477,7 +1479,7 @@ mprsas_SSU_to_SATA_devices(struct mpr_softc *sc)
target_id_t targetid;
struct mprsas_target *target;
char path_str[64];
-   struct timeval cur_time, start_time;
+   int timeout;
 
mpr_lock(sc);
 
@@ -1544,17 +1546,25 @@ mprsas_SSU_to_SATA_devices(struct mpr_softc *sc)
mpr_unlock(sc);
 
/*
-* Wait until all of the SSU commands have completed or time has
-* expired (60 seconds).  Pause for 100ms each time through.  If any
-* command times out, the target will be reset in the SCSI command
-* timeout routine.
+* Timeout after 60 seconds by default or 10 seconds if howto has
+* RB_NOSYNC set which indicates we're likely handling a panic.
 */
-   getmicrotime(_time);
-   while (sc->SSU_refcount) {
+   timeout = 600;
+   if (howto & RB_NOSYNC)
+   timeout = 100;
+
+   /*
+* Wait until all of the SSU commands have completed or time
+* has expired. Pause for 100ms each time through.  If any
+* command times out, the target will be reset in the SCSI
+* command timeout routine.
+*/
+   while (sc->SSU_refcount > 0) {
pause("mprwait", hz/10);
+   if (SCHEDULER_STOPPED())
+   xpt_sim_poll(sassc->sim);

-   getmicrotime(_time);
-   if ((cur_time.tv_sec - start_time.tv_sec) > 60) {
+   if (--timeout == 0) {
mpr_dprint(sc, MPR_ERROR, "Time has expired waiting "
"for SSU commands to complete.\n");
break;
@@ -1596,7 +1606,7 @@ mprsas_stop_unit_done(struct cam_periph *periph, union
  * Return nothing.
  */
 void
-mprsas_ir_shutdown(struct mpr_softc *sc)
+mprsas_ir_shutdown(struct mpr_softc *sc, int howto)
 {
u16 volume_mapping_flags;
u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags);
@@ -1701,5 +1711,5 @@ out:
}
}
}
-   mprsas_SSU_to_SATA_devices(sc);
+   mprsas_SSU_to_SATA_devices(sc, howto);
 }

Modified: head/sys/dev/mpr/mprvar.h
==
--- head/sys/dev/mpr/mprvar.h   Mon Aug 13 19:59:37 2018(r337724)
+++ head/sys/dev/mpr/mprvar.h   Mon Aug 13 19:59:42 2018(r337725)
@@ -807,7 +807,7 @@ int mpr_config_get_volume_wwid(struct mpr_softc *sc, u
 int mpr_config_get_raid_pd_pg0(struct mpr_softc *sc,
 Mpi2ConfigReply_t *mpi_reply, Mpi2RaidPhysDiskPage0_t *config_page,
 u32 page_address);
-void mprsas_ir_shutdown(struct mpr_softc *sc);
+void mprsas_ir_shutdown(struct mpr_softc *sc, int howto);
 
 int mpr_reinit(struct mpr_softc *sc);
 void mprsas_handle_reinit(struct mpr_softc *sc);

Modified: head/sys/dev/mps/mps_sas_lsi.c
==
--- head/sys/dev/mps/mps_sas_lsi.c  Mon Aug 13 19:59:37 2018
(r337724)
+++ head/sys/dev/mps/mps_sas_lsi.c  Mon Aug 13 19:59:42 2018
(r337725)
@@ -1115,6 +1115,7 @@ out:
 /**
  * mpssas_SSU_to_SATA_devices 
  * @sc: 

svn commit: r337723 - head/sys/cam

2018-08-13 Thread Warner Losh
Author: imp
Date: Mon Aug 13 19:59:32 2018
New Revision: 337723
URL: https://svnweb.freebsd.org/changeset/base/337723

Log:
  Create xpt_sim_poll and refactor a bit using it.
  
  xpt_sim_poll takes the sim to poll as an argument. It will do the
  proper locking protocol, call the SIM polling routine, and then call
  camisr_runqueue to process completions on any CCBs the SIM's poll
  routine completed. It will be used during late shutdown when a SIM is
  waiting for CCBs it sent during shutdown to finish and the scheduler
  isn't running because we've panic'd.
  
  This sequence was used twice in cam_xpt, so refactor those to use this
  new function.
  
  Sponsored by: Netflix
  Differential Review: https://reviews.freebsd.org/D16663

Modified:
  head/sys/cam/cam_xpt.c
  head/sys/cam/cam_xpt.h

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Mon Aug 13 19:21:28 2018(r337722)
+++ head/sys/cam/cam_xpt.c  Mon Aug 13 19:59:32 2018(r337723)
@@ -3198,6 +3198,25 @@ call_sim:
start_ccb->ccb_h.status));
 }
 
+/*
+ * Call the sim poll routine to allow the sim to complete
+ * any inflight requests, then call camisr_runqueue to
+ * complete any CCB that the polling completed.
+ */
+void
+xpt_sim_poll(struct cam_sim *sim)
+{
+   struct mtx *mtx;
+
+   mtx = sim->mtx;
+   if (mtx)
+   mtx_lock(mtx);
+   (*(sim->sim_poll))(sim);
+   if (mtx)
+   mtx_unlock(mtx);
+   camisr_runqueue();
+}
+
 uint32_t
 xpt_poll_setup(union ccb *start_ccb)
 {
@@ -3205,12 +3224,10 @@ xpt_poll_setup(union ccb *start_ccb)
structcam_sim *sim;
structcam_devq *devq;
structcam_ed *dev;
-   struct mtx *mtx;
 
timeout = start_ccb->ccb_h.timeout * 10;
sim = start_ccb->ccb_h.path->bus->sim;
devq = sim->devq;
-   mtx = sim->mtx;
dev = start_ccb->ccb_h.path->device;
 
/*
@@ -3223,12 +3240,7 @@ xpt_poll_setup(union ccb *start_ccb)
(--timeout > 0)) {
mtx_unlock(>send_mtx);
DELAY(100);
-   if (mtx)
-   mtx_lock(mtx);
-   (*(sim->sim_poll))(sim);
-   if (mtx)
-   mtx_unlock(mtx);
-   camisr_runqueue();
+   xpt_sim_poll(sim);
mtx_lock(>send_mtx);
}
dev->ccbq.dev_openings++;
@@ -3240,19 +3252,9 @@ xpt_poll_setup(union ccb *start_ccb)
 void
 xpt_pollwait(union ccb *start_ccb, uint32_t timeout)
 {
-   struct cam_sim  *sim;
-   struct mtx  *mtx;
 
-   sim = start_ccb->ccb_h.path->bus->sim;
-   mtx = sim->mtx;
-
while (--timeout > 0) {
-   if (mtx)
-   mtx_lock(mtx);
-   (*(sim->sim_poll))(sim);
-   if (mtx)
-   mtx_unlock(mtx);
-   camisr_runqueue();
+   xpt_sim_poll(start_ccb->ccb_h.path->bus->sim);
if ((start_ccb->ccb_h.status & CAM_STATUS_MASK)
!= CAM_REQ_INPROG)
break;

Modified: head/sys/cam/cam_xpt.h
==
--- head/sys/cam/cam_xpt.h  Mon Aug 13 19:21:28 2018(r337722)
+++ head/sys/cam/cam_xpt.h  Mon Aug 13 19:59:32 2018(r337723)
@@ -148,6 +148,7 @@ voidxpt_release_path(struct 
cam_path *path);
 const char *   xpt_action_name(uint32_t action);
 void   xpt_pollwait(union ccb *start_ccb, uint32_t timeout);
 uint32_t   xpt_poll_setup(union ccb *start_ccb);
+void   xpt_sim_poll(struct cam_sim *sim);
 
 /*
  * Perform a path inquiry at the request priority. The bzero may be
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337724 - head/sys/dev/mps

2018-08-13 Thread Warner Losh
Author: imp
Date: Mon Aug 13 19:59:37 2018
New Revision: 337724
URL: https://svnweb.freebsd.org/changeset/base/337724

Log:
  Call xpt_sim_poll in shutdown_final handler.
  
  When we're shutting down, we send a number of start/stop commands to
  the known targets. We have to wait for them to complete. During a
  panic, the interrupts are off, and using pause to wait for them to
  fire and complete won't work: we have to poll after pause returns so
  the completion routines of the CCBs run so we decrement work
  outstanding counts.
  
  Sponsored by: Netflix
  Differential Review: https://reviews.freebsd.org/D16663

Modified:
  head/sys/dev/mps/mps_sas_lsi.c

Modified: head/sys/dev/mps/mps_sas_lsi.c
==
--- head/sys/dev/mps/mps_sas_lsi.c  Mon Aug 13 19:59:32 2018
(r337723)
+++ head/sys/dev/mps/mps_sas_lsi.c  Mon Aug 13 19:59:37 2018
(r337724)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1209,7 +1210,9 @@ mpssas_SSU_to_SATA_devices(struct mps_softc *sc, int h
 */
while (sc->SSU_refcount > 0) {
pause("mpswait", hz/10);
-   
+   if (SCHEDULER_STOPPED())
+   xpt_sim_poll(sassc->sim);
+
if (--timeout == 0) {
mps_dprint(sc, MPS_FAULT, "Time has expired waiting "
"for SSU commands to complete.\n");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337722 - head/sys/dev/cxgbe/tom

2018-08-13 Thread Navdeep Parhar
Author: np
Date: Mon Aug 13 19:21:28 2018
New Revision: 337722
URL: https://svnweb.freebsd.org/changeset/base/337722

Log:
  Whitespace nit in t4_tom.h

Modified:
  head/sys/dev/cxgbe/tom/t4_tom.h

Modified: head/sys/dev/cxgbe/tom/t4_tom.h
==
--- head/sys/dev/cxgbe/tom/t4_tom.h Mon Aug 13 19:05:53 2018
(r337721)
+++ head/sys/dev/cxgbe/tom/t4_tom.h Mon Aug 13 19:21:28 2018
(r337722)
@@ -281,7 +281,7 @@ struct tom_data {
struct ppod_region pr;
 
vmem_t *key_map;
-   
+
struct mtx clip_table_lock;
struct clip_head clip_table;
int clip_gen;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337721 - in head/sys/dev: atkbdc evdev kbd kbdmux usb/input

2018-08-13 Thread Vladimir Kondratyev
Author: wulf
Date: Mon Aug 13 19:05:53 2018
New Revision: 337721
URL: https://svnweb.freebsd.org/changeset/base/337721

Log:
  evdev: Remove evdev.ko linkage dependency on kbd driver
  
  Move evdev_ev_kbd_event() helper from evdev to kbd.c as otherwise evdev
  unconditionally requires all keyboard and console stuff to be compiled
  into the kernel. This dependency happens as evdev_ev_kbd_event() helper
  references kbdsw global variable defined in kbd.c through use of
  kbdd_ioctl() macro.
  
  While here make all keyboard drivers respect evdev_rcpt_mask while setting
  typematic rate and LEDs with evdev interface.
  
  Requested by: Milan Obuch 
  Reviewed by:  hselasky, gonzo
  Differential Revision:https://reviews.freebsd.org/D16614

Modified:
  head/sys/dev/atkbdc/atkbd.c
  head/sys/dev/evdev/evdev.h
  head/sys/dev/evdev/evdev_utils.c
  head/sys/dev/kbd/kbd.c
  head/sys/dev/kbd/kbdreg.h
  head/sys/dev/kbdmux/kbdmux.c
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/atkbdc/atkbd.c
==
--- head/sys/dev/atkbdc/atkbd.c Mon Aug 13 19:00:42 2018(r337720)
+++ head/sys/dev/atkbdc/atkbd.c Mon Aug 13 19:05:53 2018(r337721)
@@ -267,8 +267,10 @@ static int typematic_delay(int delay);
 static int typematic_rate(int rate);
 
 #ifdef EVDEV_SUPPORT
+static evdev_event_t atkbd_ev_event;
+
 static const struct evdev_methods atkbd_evdev_methods = {
-   .ev_event = evdev_ev_kbd_event,
+   .ev_event = atkbd_ev_event,
 };
 #endif
 
@@ -1204,6 +1206,22 @@ atkbd_reset(KBDC kbdc, int flags, int c)
}
return (0);
 }
+
+#ifdef EVDEV_SUPPORT
+static void
+atkbd_ev_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
+int32_t value)
+{
+   keyboard_t *kbd = evdev_get_softc(evdev);
+
+   if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD &&
+   (type == EV_LED || type == EV_REP)) {
+   mtx_lock();
+   kbd_ev_event(kbd, type, code, value);
+   mtx_unlock();
+   }
+}
+#endif
 
 /* local functions */
 

Modified: head/sys/dev/evdev/evdev.h
==
--- head/sys/dev/evdev/evdev.h  Mon Aug 13 19:00:42 2018(r337720)
+++ head/sys/dev/evdev/evdev.h  Mon Aug 13 19:05:53 2018(r337721)
@@ -141,7 +141,6 @@ uint16_t evdev_scancode2key(int *, int);
 void evdev_push_mouse_btn(struct evdev_dev *, int);
 void evdev_push_leds(struct evdev_dev *, int);
 void evdev_push_repeats(struct evdev_dev *, keyboard_t *);
-evdev_event_t evdev_ev_kbd_event;
 
 /* Event reporting shortcuts: */
 static __inline int

Modified: head/sys/dev/evdev/evdev_utils.c
==
--- head/sys/dev/evdev/evdev_utils.cMon Aug 13 19:00:42 2018
(r337720)
+++ head/sys/dev/evdev/evdev_utils.cMon Aug 13 19:05:53 2018
(r337721)
@@ -40,8 +40,6 @@
 #include 
 #include 
 
-#include 
-
 #defineNONEKEY_RESERVED
 
 static uint16_t evdev_usb_scancodes[256] = {
@@ -298,44 +296,4 @@ evdev_push_repeats(struct evdev_dev *evdev, keyboard_t
 
evdev_push_event(evdev, EV_REP, REP_DELAY, kbd->kb_delay1);
evdev_push_event(evdev, EV_REP, REP_PERIOD, kbd->kb_delay2);
-}
-
-void
-evdev_ev_kbd_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
-int32_t value)
-{
-   keyboard_t *kbd = (keyboard_t *)evdev_get_softc(evdev);
-   int delay[2], leds, oleds;
-   size_t i;
-
-   if (type == EV_LED) {
-   leds = oleds = KBD_LED_VAL(kbd);
-   for (i = 0; i < nitems(evdev_led_codes); i++) {
-   if (evdev_led_codes[i] == code) {
-   if (value)
-   leds |= 1 << i;
-   else
-   leds &= ~(1 << i);
-   if (leds != oleds) {
-   mtx_lock();
-   kbdd_ioctl(kbd, KDSETLED,
-   (caddr_t));
-   mtx_unlock();
-   }
-   break;
-   }
-   }
-   } else if (type == EV_REP && code == REP_DELAY) {
-   delay[0] = value;
-   delay[1] = kbd->kb_delay2;
-   mtx_lock();
-   kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
-   mtx_unlock();
-   } else if (type == EV_REP && code == REP_PERIOD) {
-   delay[0] = kbd->kb_delay1;
-   delay[1] = value;
-   mtx_lock();
-   kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
-   mtx_unlock();
-   }
 }

Modified: head/sys/dev/kbd/kbd.c
==

svn commit: r337720 - in head/sys: arm/broadcom/bcm2835 dev/atkbdc dev/evdev dev/usb/input

2018-08-13 Thread Vladimir Kondratyev
Author: wulf
Date: Mon Aug 13 19:00:42 2018
New Revision: 337720
URL: https://svnweb.freebsd.org/changeset/base/337720

Log:
  evdev: remove soft context from evdev methods parameter list.
  
  Now softc should be retrieved from struct edvev * pointer
  with evdev_get_softc() helper.
  
  wmt(4) is a sample of driver that support both KPI.
  
  Reviewed by:  hselasky, gonzo
  Differential Revision:https://reviews.freebsd.org/D16614

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
  head/sys/dev/atkbdc/psm.c
  head/sys/dev/evdev/cdev.c
  head/sys/dev/evdev/evdev.c
  head/sys/dev/evdev/evdev.h
  head/sys/dev/evdev/evdev_utils.c
  head/sys/dev/evdev/uinput.c
  head/sys/dev/usb/input/uep.c
  head/sys/dev/usb/input/ums.c
  head/sys/dev/usb/input/wmt.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Mon Aug 13 18:53:14 
2018(r337719)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Mon Aug 13 19:00:42 
2018(r337720)
@@ -172,20 +172,22 @@ out:
callout_reset(>sc_callout, sc->sc_tick, ft5406ts_callout, sc);
 }
 
-static void
-ft5406ts_ev_close(struct evdev_dev *evdev, void *data)
+static int
+ft5406ts_ev_close(struct evdev_dev *evdev)
 {
-   struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data;
+   struct ft5406ts_softc *sc = evdev_get_softc(evdev);
 
FT5406_LOCK_ASSERT(sc);
 
callout_stop(>sc_callout);
+
+   return (0);
 }
 
 static int
-ft5406ts_ev_open(struct evdev_dev *evdev, void *data)
+ft5406ts_ev_open(struct evdev_dev *evdev)
 {
-   struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data;
+   struct ft5406ts_softc *sc = evdev_get_softc(evdev);
 
FT5406_LOCK_ASSERT(sc);
 

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Aug 13 18:53:14 2018(r337719)
+++ head/sys/dev/atkbdc/psm.c   Mon Aug 13 19:00:42 2018(r337720)
@@ -2023,9 +2023,9 @@ psmdetach(device_t dev)
 
 #ifdef EVDEV_SUPPORT
 static int
-psm_ev_open_r(struct evdev_dev *evdev, void *ev_softc)
+psm_ev_open_r(struct evdev_dev *evdev)
 {
-   struct psm_softc *sc = (struct psm_softc *)ev_softc;
+   struct psm_softc *sc = evdev_get_softc(evdev);
int err = 0;
 
/* Get device data */
@@ -2043,24 +2043,27 @@ psm_ev_open_r(struct evdev_dev *evdev, void *ev_softc)
return (err);
 }
 
-static void
-psm_ev_close_r(struct evdev_dev *evdev, void *ev_softc)
+static int
+psm_ev_close_r(struct evdev_dev *evdev)
 {
-   struct psm_softc *sc = (struct psm_softc *)ev_softc;
+   struct psm_softc *sc = evdev_get_softc(evdev);
+   int err = 0;
 
sc->state &= ~PSM_EV_OPEN_R;
 
if (sc->state & (PSM_OPEN | PSM_EV_OPEN_A))
-   return;
+   return (0);
 
if (sc->state & PSM_VALID)
-   psmclose(sc);
+   err = psmclose(sc);
+
+   return (err);
 }
 
 static int
-psm_ev_open_a(struct evdev_dev *evdev, void *ev_softc)
+psm_ev_open_a(struct evdev_dev *evdev)
 {
-   struct psm_softc *sc = (struct psm_softc *)ev_softc;
+   struct psm_softc *sc = evdev_get_softc(evdev);
int err = 0;
 
/* Get device data */
@@ -2078,18 +2081,21 @@ psm_ev_open_a(struct evdev_dev *evdev, void *ev_softc)
return (err);
 }
 
-static void
-psm_ev_close_a(struct evdev_dev *evdev, void *ev_softc)
+static int
+psm_ev_close_a(struct evdev_dev *evdev)
 {
-   struct psm_softc *sc = (struct psm_softc *)ev_softc;
+   struct psm_softc *sc = evdev_get_softc(evdev);
+   int err = 0;
 
sc->state &= ~PSM_EV_OPEN_A;
 
if (sc->state & (PSM_OPEN | PSM_EV_OPEN_R))
-   return;
+   return (0);
 
if (sc->state & PSM_VALID)
-   psmclose(sc);
+   err = psmclose(sc);
+
+   return (err);
 }
 #endif
 

Modified: head/sys/dev/evdev/cdev.c
==
--- head/sys/dev/evdev/cdev.c   Mon Aug 13 18:53:14 2018(r337719)
+++ head/sys/dev/evdev/cdev.c   Mon Aug 13 19:00:42 2018(r337720)
@@ -419,7 +419,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data
return (ENOTSUP);
 
ke = (struct input_keymap_entry *)data;
-   evdev->ev_methods->ev_get_keycode(evdev, evdev->ev_softc, ke);
+   evdev->ev_methods->ev_get_keycode(evdev, ke);
return (0);
 
case EVIOCSKEYCODE:
@@ -432,7 +432,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data
return (ENOTSUP);
 
ke = (struct input_keymap_entry *)data;
-   evdev->ev_methods->ev_set_keycode(evdev, evdev->ev_softc, ke);
+   evdev->ev_methods->ev_set_keycode(evdev, ke);

svn commit: r337719 - head/sys/dev/ichiic

2018-08-13 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Aug 13 18:53:14 2018
New Revision: 337719
URL: https://svnweb.freebsd.org/changeset/base/337719

Log:
  [ig4] Fix initialization sequence for newer ig4 chips
  
  Newer chips may require assert/deassert after power down for proper
  startup. Check respective flag in DEVIDLE_CTRL and perform operation
  if neccesssary.
  
  PR:   221777
  Submitted by: marc.priggeme...@gmail.com
  Obtained from:DragonFly BSD
  Tested on:Thinkpad T470

Modified:
  head/sys/dev/ichiic/ig4_iic.c
  head/sys/dev/ichiic/ig4_reg.h

Modified: head/sys/dev/ichiic/ig4_iic.c
==
--- head/sys/dev/ichiic/ig4_iic.c   Mon Aug 13 17:24:31 2018
(r337718)
+++ head/sys/dev/ichiic/ig4_iic.c   Mon Aug 13 18:53:14 2018
(r337719)
@@ -525,6 +525,16 @@ ig4iic_attach(ig4iic_softc_t *sc)
mtx_init(>io_lock, "IG4 I/O lock", NULL, MTX_DEF);
sx_init(>call_lock, "IG4 call lock");
 
+   v = reg_read(sc, IG4_REG_DEVIDLE_CTRL);
+   if (sc->version == IG4_SKYLAKE && (v & IG4_RESTORE_REQUIRED) ) {
+   reg_write(sc, IG4_REG_DEVIDLE_CTRL, IG4_DEVICE_IDLE | 
IG4_RESTORE_REQUIRED);
+   reg_write(sc, IG4_REG_DEVIDLE_CTRL, 0);
+
+   reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_ASSERT_SKL);
+   reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_DEASSERT_SKL);
+   DELAY(1000);
+   }
+
if (sc->version == IG4_ATOM)
v = reg_read(sc, IG4_REG_COMP_TYPE);


Modified: head/sys/dev/ichiic/ig4_reg.h
==
--- head/sys/dev/ichiic/ig4_reg.h   Mon Aug 13 17:24:31 2018
(r337718)
+++ head/sys/dev/ichiic/ig4_reg.h   Mon Aug 13 18:53:14 2018
(r337719)
@@ -78,6 +78,7 @@
 
 #define IG4_REG_CTL0x  /* RW   Control Register */
 #define IG4_REG_TAR_ADD0x0004  /* RW   Target Address */
+#define IG4_REG_HS_MADDR   0x000C  /* RW   High Speed Master Mode Code 
Address*/
 #define IG4_REG_DATA_CMD   0x0010  /* RW   Data Buffer and Command */
 #define IG4_REG_SS_SCL_HCNT0x0014  /* RW   Std Speed clock High Count */
 #define IG4_REG_SS_SCL_LCNT0x0018  /* RW   Std Speed clock Low Count */
@@ -92,7 +93,9 @@
 #define IG4_REG_CLR_RX_UNDER   0x0044  /* RO   Clear RX_Under Interrupt */
 #define IG4_REG_CLR_RX_OVER0x0048  /* RO   Clear RX_Over Interrupt */
 #define IG4_REG_CLR_TX_OVER0x004C  /* RO   Clear TX_Over Interrupt */
+#define IG4_REG_CLR_RD_REQ 0x0050  /* RO   Clear RD_Req Interrupt */
 #define IG4_REG_CLR_TX_ABORT   0x0054  /* RO   Clear TX_Abort Interrupt */
+#define IG4_REG_CLR_RX_DONE0x0058  /* RO   Clear RX_Done Interrupt */
 #define IG4_REG_CLR_ACTIVITY   0x005C  /* RO   Clear Activity Interrupt */
 #define IG4_REG_CLR_STOP_DET   0x0060  /* RO   Clear STOP Detection Int */
 #define IG4_REG_CLR_START_DET  0x0064  /* RO   Clear START Detection Int */
@@ -108,6 +111,7 @@
 #define IG4_REG_DMA_TDLR   0x008C  /* RW   DMA Transmit Data Level */
 #define IG4_REG_DMA_RDLR   0x0090  /* RW   DMA Receive Data Level */
 #define IG4_REG_SDA_SETUP  0x0094  /* RW   SDA Setup */
+#define IG4_REG_ACK_GENERAL_CALL 0x0098/* RW   I2C ACK General Call */
 #define IG4_REG_ENABLE_STATUS  0x009C  /* RO   Enable Status */
 /* Available at least on Atom SoCs and Haswell mobile. */
 #define IG4_REG_COMP_PARAM10x00F4  /* RO   Component Parameter */
@@ -118,6 +122,9 @@
 #define IG4_REG_RESETS_SKL 0x0204  /* RW   Reset Register */
 #define IG4_REG_ACTIVE_LTR_VALUE 0x0210/* RW   Active LTR Value */
 #define IG4_REG_IDLE_LTR_VALUE 0x0214  /* RW   Idle LTR Value */
+#define IG4_REG_TX_ACK_COUNT   0x0218  /* RO   TX ACK Count */
+#define IG4_REG_RX_BYTE_COUNT  0x021C  /* RO   RX ACK Count */
+#define IG4_REG_DEVIDLE_CTRL   0x024C  /* RW   Device Control */
 /* Available at least on Atom SoCs */
 #define IG4_REG_CLK_PARMS  0x0800  /* RW   Clock Parameters */
 /* Available at least on Atom SoCs and Haswell mobile */
@@ -581,6 +588,17 @@
 /* Skylake-U/Y and Kaby Lake-U/Y have the reset bits inverted */
 #define IG4_RESETS_DEASSERT_SKL0x0003
 #define IG4_RESETS_ASSERT_SKL  0x
+
+/* Newer versions of the I2C controller allow to check whether
+ * the above ASSERT/DEASSERT is necessary by querying the DEVIDLE_CONTROL
+ * register.
+ * 
+ * the RESTORE_REQUIRED bit can be cleared by writing 1
+ * the DEVICE_IDLE status can be set to put the controller in an idle state
+ *
+ */
+#define IG4_RESTORE_REQUIRED   0x0008
+#define IG4_DEVICE_IDLE0x0004
 
 /*
  * GENERAL - (RW) General Reigster 22.2.38
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r337663 - in head: . cddl/lib cddl/lib/libbe contrib/mdocml lib/libbe sbin sbin/bectl share/mk

2018-08-13 Thread Kyle Evans
On Mon, Aug 13, 2018 at 12:44 AM, Ravi Pokala  wrote:
> -Original Message-
> From:  on behalf of Kyle Evans 
> 
> Date: 2018-08-11, Saturday at 16:50
> To: , , 
> 
> Subject: svn commit: r337663 - in head: . cddl/lib cddl/lib/libbe 
> contrib/mdocml lib/libbe sbin sbin/bectl share/mk
>
>> Author: kevans
>> Date: Sat Aug 11 23:50:09 2018
>> New Revision: 337663
>> URL: https://svnweb.freebsd.org/changeset/base/337663
>>
>> Log:
>>   Merge libbe(3)/bectl(8) from projects/bectl into head
>>
>>   bectl(8) is an administrative interface for working with ZFS boot
>>   environments, intended to provide a superset of the functionality provided
>>   by sysutils/beadm.
>>
>>   libbe(3) is the back-end library that the required functionality has been
>>   pulled out into for later reuse.
>>
>>   These were originally written for GSoC 2017 under the mentorship of
>>   allanjude@.
>
> Originally written by who?
>
> -Ravi (rpokala@)
>

Heh, sorry. =p This was meant to read "written for GSoC 2017 by Kyle
Kneitinger ..."
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337718 - head/release/tools

2018-08-13 Thread Glen Barber
Author: gjb
Date: Mon Aug 13 17:24:31 2018
New Revision: 337718
URL: https://svnweb.freebsd.org/changeset/base/337718

Log:
  Add a space between a variable and escaped new line.
  
  MFC after:3 days
  MFC with: r337717
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/gce.conf

Modified: head/release/tools/gce.conf
==
--- head/release/tools/gce.conf Mon Aug 13 17:23:43 2018(r337717)
+++ head/release/tools/gce.conf Mon Aug 13 17:24:31 2018(r337718)
@@ -9,7 +9,7 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update fir
lang/python lang/python2 lang/python3"
 
 # Set to a list of third-party software to enable in rc.conf(5).
-export VM_RC_LIST="ntpd sshd growfs\
+export VM_RC_LIST="ntpd sshd growfs \
firstboot_pkgs firstboot_freebsd_update google_startup \
google_accounts_daemon google_clock_skew_daemon \
google_instance_setup google_network_daemon"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337717 - head/release/tools

2018-08-13 Thread Glen Barber
Author: gjb
Date: Mon Aug 13 17:23:43 2018
New Revision: 337717
URL: https://svnweb.freebsd.org/changeset/base/337717

Log:
  Add lang/python2, lang/python3, and lang/python to GCE images
  to help avoid hard-coding 'python.' in several
  scripts in the client-side scripts.
  
  PR:   230248
  MFC after:3 days
  Submitted by: gustavo.sca...@collabora.com
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/gce.conf

Modified: head/release/tools/gce.conf
==
--- head/release/tools/gce.conf Mon Aug 13 17:14:06 2018(r337716)
+++ head/release/tools/gce.conf Mon Aug 13 17:23:43 2018(r337717)
@@ -5,7 +5,8 @@
 
 # Set to a list of packages to install.
 export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \
-   google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine"
+   google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \
+   lang/python lang/python2 lang/python3"
 
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="ntpd sshd growfs\
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337716 - head/stand/defaults

2018-08-13 Thread Mark Johnston
Author: markj
Date: Mon Aug 13 17:14:06 2018
New Revision: 337716
URL: https://svnweb.freebsd.org/changeset/base/337716

Log:
  Add microcode update configuration to the default loader.conf.
  
  MFC after:6 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/stand/defaults/loader.conf

Modified: head/stand/defaults/loader.conf
==
--- head/stand/defaults/loader.conf Mon Aug 13 17:13:09 2018
(r337715)
+++ head/stand/defaults/loader.conf Mon Aug 13 17:14:06 2018
(r337716)
@@ -52,6 +52,14 @@ ram_blacklist_name="/boot/blacklist.txt" # Set this to
 ram_blacklist_type="ram_blacklist" # Required for the kernel to find
# the blacklist module
 
+###  Microcode loading configuration  
+cpu_microcode_load="NO"# Set this to YES to load and 
apply a
+   # microcode update file during boot.
+cpu_microcode_name="/boot/firmware/ucode.bin" # Set this to the microcode
+ # update file path.
+cpu_microcode_type="cpu_microcode" # Required for the kernel to find
+   # the microcode update file.
+
 ###  ACPI settings  ##
 acpi_dsdt_load="NO"# DSDT Overriding
 acpi_dsdt_type="acpi_dsdt" # Don't change this
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337715 - in head/sys: amd64/amd64 conf dev/cpuctl i386/i386 x86/acpica x86/include x86/x86

2018-08-13 Thread Mark Johnston
Author: markj
Date: Mon Aug 13 17:13:09 2018
New Revision: 337715
URL: https://svnweb.freebsd.org/changeset/base/337715

Log:
  Implement kernel support for early loading of Intel microcode updates.
  
  Updates in the format described in section 9.11 of the Intel SDM can
  now be applied as one of the first steps in booting the kernel.  Updates
  that are loaded this way are automatically re-applied upon exit from
  ACPI sleep states, in contrast with the existing cpucontrol(8)-based
  method.  For the time being only Intel updates are supported.
  
  Microcode update files are passed to the kernel via loader(8).  The
  file type must be "cpu_microcode" in order for the file to be recognized
  as a candidate microcode update.  Updates for multiple CPU types may be
  concatenated together into a single file, in which case the kernel
  will select and apply a matching update.  Memory used to store the
  update file will be freed back to the system once the update is applied,
  so this approach will not consume more memory than required.
  
  Reviewed by:  kib
  MFC after:6 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D16370

Added:
  head/sys/x86/include/ucode.h   (contents, props changed)
  head/sys/x86/x86/ucode.c   (contents, props changed)
Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/dev/cpuctl/cpuctl.c
  head/sys/i386/i386/locore.s
  head/sys/i386/i386/machdep.c
  head/sys/i386/i386/mp_machdep.c
  head/sys/x86/acpica/acpi_wakeup.c
  head/sys/x86/x86/mp_x86.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Mon Aug 13 16:48:46 2018
(r337714)
+++ head/sys/amd64/amd64/machdep.c  Mon Aug 13 17:13:09 2018
(r337715)
@@ -130,6 +130,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #ifdef SMP
 #include 
 #endif
@@ -1567,6 +1568,9 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
TSRAW(, TS_ENTER, __func__, NULL);
 
kmdp = init_ops.parse_preload_data(modulep);
+
+   physfree += ucode_load_bsp(physfree + KERNBASE);
+   physfree = roundup2(physfree, PAGE_SIZE);
 
identify_cpu1();
identify_hypervisor();

Modified: head/sys/amd64/amd64/mp_machdep.c
==
--- head/sys/amd64/amd64/mp_machdep.c   Mon Aug 13 16:48:46 2018
(r337714)
+++ head/sys/amd64/amd64/mp_machdep.c   Mon Aug 13 17:13:09 2018
(r337715)
@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -241,6 +242,9 @@ init_secondary(void)
 
/* Set by the startup code for us to use */
cpu = bootAP;
+
+   /* Update microcode before doing anything else. */
+   ucode_load_ap(cpu);
 
/* Init tss */
common_tss[cpu] = common_tss[0];

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Mon Aug 13 16:48:46 2018(r337714)
+++ head/sys/conf/files.amd64   Mon Aug 13 17:13:09 2018(r337715)
@@ -745,6 +745,7 @@ x86/x86/nexus.c standard
 x86/x86/pvclock.c  standard
 x86/x86/stack_machdep.coptionalddb | stack
 x86/x86/tsc.c  standard
+x86/x86/ucode.cstandard
 x86/x86/delay.cstandard
 x86/xen/hvm.c  optionalxenhvm
 x86/xen/xen_intr.c optionalxenhvm

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Mon Aug 13 16:48:46 2018(r337714)
+++ head/sys/conf/files.i386Mon Aug 13 17:13:09 2018(r337715)
@@ -621,6 +621,7 @@ x86/x86/msi.c   optional apic pci
 x86/x86/nexus.cstandard
 x86/x86/stack_machdep.coptional ddb | stack
 x86/x86/tsc.c  standard
+x86/x86/ucode.cstandard
 x86/x86/pvclock.c  standard
 x86/x86/delay.cstandard
 x86/xen/hvm.c  optional xenhvm

Modified: head/sys/dev/cpuctl/cpuctl.c
==
--- head/sys/dev/cpuctl/cpuctl.cMon Aug 13 16:48:46 2018
(r337714)
+++ head/sys/dev/cpuctl/cpuctl.cMon Aug 13 17:13:09 2018
(r337715)
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 static d_open_t cpuctl_open;
 static d_ioctl_t cpuctl_ioctl;
@@ -333,11 +334,7 @@ static int
 update_intel(int cpu, cpuctl_update_args_t *args, struct thread *td)
 {
void *ptr;
-   

svn commit: r337714 - head/sys/vm

2018-08-13 Thread Konstantin Belousov
Author: kib
Date: Mon Aug 13 16:48:46 2018
New Revision: 337714
URL: https://svnweb.freebsd.org/changeset/base/337714

Log:
  Prevent some parallel swap-ins, rate-limit swapper swap-ins.
  
  If faultin() was called outside swapper (from PHOLD()), do not allow
  swapper to initiate additional swap-ins.  Swapper' initiated swap-ins
  are serialized because they are synchronous and executed in the
  context of the thread0.  With the added limitation, we only allow
  parallel swap-ins from PHOLD(), which is up to PHOLD() users to
  manage, usually they do not need to.
  
  Rate-limit swapper' swap-ins to one in the MAXSLP / 2 seconds
  interval, counting faultin() swapins.
  
  Suggested by: alc
  Reviewed by:  alc, markj
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D16610

Modified:
  head/sys/vm/vm_swapout.c

Modified: head/sys/vm/vm_swapout.c
==
--- head/sys/vm/vm_swapout.cMon Aug 13 16:26:26 2018(r337713)
+++ head/sys/vm/vm_swapout.cMon Aug 13 16:48:46 2018(r337714)
@@ -159,6 +159,8 @@ static struct mtx vm_daemon_mtx;
 MTX_SYSINIT(vm_daemon, _daemon_mtx, "vm daemon", MTX_DEF);
 
 static int swapped_cnt;
+static int swap_inprogress;/* Pending swap-ins done outside swapper. */
+static int last_swapin;
 
 static void swapclear(struct proc *);
 static int swapout(struct proc *);
@@ -634,6 +636,8 @@ faultin(struct proc *p)
sx_xlock(_lock);
MPASS(swapped_cnt > 0);
swapped_cnt--;
+   if (curthread != )
+   swap_inprogress++;
sx_xunlock(_lock);
 
/*
@@ -644,6 +648,13 @@ faultin(struct proc *p)
FOREACH_THREAD_IN_PROC(p, td)
vm_thread_swapin(td, oom_alloc);
 
+   if (curthread != ) {
+   sx_xlock(_lock);
+   MPASS(swap_inprogress > 0);
+   swap_inprogress--;
+   last_swapin = ticks;
+   sx_xunlock(_lock);
+   }
PROC_LOCK(p);
swapclear(p);
p->p_swtick = ticks;
@@ -661,18 +672,17 @@ faultin(struct proc *p)
  */
 
 static struct proc *
-swapper_selector(void)
+swapper_selector(bool wkilled_only)
 {
struct proc *p, *res;
struct thread *td;
-   int min_flag, ppri, pri, slptime, swtime;
+   int ppri, pri, slptime, swtime;
 
sx_assert(_lock, SA_SLOCKED);
if (swapped_cnt == 0)
return (NULL);
res = NULL;
ppri = INT_MIN;
-   min_flag = vm_page_count_min();
FOREACH_PROC_IN_SYSTEM(p) {
PROC_LOCK(p);
if (p->p_state == PRS_NEW || (p->p_flag & (P_SWAPPINGOUT |
@@ -690,7 +700,7 @@ swapper_selector(void)
 */
return (p);
}
-   if (min_flag) {
+   if (wkilled_only) {
PROC_UNLOCK(p);
continue;
}
@@ -721,11 +731,29 @@ swapper_selector(void)
}
PROC_UNLOCK(p);
}
+
if (res != NULL)
PROC_LOCK(res);
return (res);
 }
 
+#defineSWAPIN_INTERVAL (MAXSLP * hz / 2)
+
+/*
+ * Limit swapper to swap in one non-WKILLED process in MAXSLP/2
+ * interval, assuming that there is:
+ * - no memory shortage;
+ * - no parallel swap-ins;
+ * - no other swap-ins in the current SWAPIN_INTERVAL.
+ */
+static bool
+swapper_wkilled_only(void)
+{
+
+   return (vm_page_count_min() || swap_inprogress > 0 ||
+   (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL);
+}
+
 void
 swapper(void)
 {
@@ -733,11 +761,11 @@ swapper(void)
 
for (;;) {
sx_slock(_lock);
-   p = swapper_selector();
+   p = swapper_selector(swapper_wkilled_only());
sx_sunlock(_lock);
 
if (p == NULL) {
-   tsleep(, PVM, "swapin", MAXSLP * hz / 2);
+   tsleep(, PVM, "swapin", SWAPIN_INTERVAL);
} else {
PROC_LOCK_ASSERT(p, MA_OWNED);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337713 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/hardware sys/contrib/...

2018-08-13 Thread Jung-uk Kim
Author: jkim
Date: Mon Aug 13 16:26:26 2018
New Revision: 337713
URL: https://svnweb.freebsd.org/changeset/base/337713

Log:
  Merge ACPICA 20180810.

Modified:
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/debugger/dbmethod.c
  head/sys/contrib/dev/acpica/components/debugger/dbxface.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/hardware/hwregs.c
  head/sys/contrib/dev/acpica/components/hardware/hwsleep.c
  head/sys/contrib/dev/acpica/components/namespace/nsaccess.c
  head/sys/contrib/dev/acpica/components/parser/psloop.c
  head/sys/contrib/dev/acpica/components/tables/tbdata.c
  head/sys/contrib/dev/acpica/components/utilities/utdelete.c
  head/sys/contrib/dev/acpica/components/utilities/uterror.c
  head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c
  head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c
  head/sys/contrib/dev/acpica/include/acconfig.h
  head/sys/contrib/dev/acpica/include/acexcep.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/usr.sbin/acpi/acpidb/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/contrib/dev/acpica/changes.txt
==
--- head/sys/contrib/dev/acpica/changes.txt Mon Aug 13 16:07:18 2018
(r337712)
+++ head/sys/contrib/dev/acpica/changes.txt Mon Aug 13 16:26:26 2018
(r337713)
@@ -1,4 +1,51 @@
 
+10 August 2018. Summary of changes for version 20180810:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Initial ACPI table loading: Attempt to continue loading ACPI tables 
+regardless of malformed AML. Since migrating table initialization to the 
+new module-level code support, the AML interpreter rejected tables upon 
+any ACPI error encountered during table load. This is a problem because 
+non-serious ACPI errors during table load do not necessarily mean that 
+the entire definition block (DSDT or SSDT) is invalid. This change 
+improves the table loading by ignoring some types of errors that can be 
+generated by incorrect AML. This can range from object type errors, scope 
+errors, and index errors.
+
+Suspend/Resume support: Update to stop unconditionally clearing ACPI IRQs 
+during suspend/resume. The status of ACPI events is no longer cleared 
+when entering the ACPI S5 system state (power off) which caused some 
+systems to power up immediately after turning off power in certain 
+situations. This was a functional regression. It was fixed by clearing 
+the status of all ACPI events again when entering S5 (for system-wide 
+suspend or hibernation the clearing of the status of all events is not 
+desirable, as it might cause the kernel to miss wakeup events sometimes). 
+Rafael Wysocki.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiExec: Enhanced the -fi option (Namespace initialization file). Field 
+elements listed in the initialization file were previously initialized 
+after the table load and before executing module-level code blocks. 
+Recent changes in the module-level code support means that the table load 
+becomes a large control method execution. If fields are used within 
+module-level code and we are executing with the -fi option, the 
+initialization values were used to initialize the namespace object(s) 
+only after the table was finished loading. This change Provides an early 
+initialization of objects specified in the initialization file so that 
+field unit values are populated during the table load (not after the 
+load).
+
+AcpiExec: Fixed a small memory leak regression that could result in 
+warnings during exit of the utility. These warnings were similar to 
+these:
+0002D690 Length 0x0006 nsnames-0502 [Not a Descriptor - too small]
+0002CD70 Length 0x002C utcache-0453 [Operand] Integer RefCount 0x0001
+
+
 29 June 2018. Summary of changes for version 20180629:
 
 

Modified: head/sys/contrib/dev/acpica/components/debugger/dbinput.c
==
--- head/sys/contrib/dev/acpica/components/debugger/dbinput.c   Mon Aug 13 
16:07:18 2018(r337712)
+++ head/sys/contrib/dev/acpica/components/debugger/dbinput.c   Mon Aug 13 
16:26:26 2018(r337713)
@@ -969,7 +969,11 @@ AcpiDbCommandDispatch (
 case CMD_DISASSEMBLE:
 case CMD_DISASM:
 
+#ifdef ACPI_DISASSEMBLER
 (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
+#else
+AcpiOsPrintf ("The AML Disassembler is not configured/present\n");
+#endif
 break;
 
 case CMD_DUMP:
@@ -1083,7 +1087,11 @@ AcpiDbCommandDispatch (
 
 case CMD_LIST:
 

svn commit: r337712 - head/sys/riscv/include

2018-08-13 Thread Ruslan Bukin
Author: br
Date: Mon Aug 13 16:07:18 2018
New Revision: 337712
URL: https://svnweb.freebsd.org/changeset/base/337712

Log:
  Add RISC-V instructions encoding.
  
  This is the output of
  $ cat opcodes opcodes-rvc-pseudo opcodes-rvc opcodes-custom |
  ./parse-opcodes -c
  
  It is confirmed by author that the output of parse-opcodes is
  in the public domain.
  
  This will be required for DDB disassembler.
  
  Discussed with: Andrew Waterman 
  Obtained from:https://github.com/riscv/riscv-opcodes
  Sponsored by: DARPA, AFRL

Added:
  head/sys/riscv/include/encoding.h   (contents, props changed)

Added: head/sys/riscv/include/encoding.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/riscv/include/encoding.h   Mon Aug 13 16:07:18 2018
(r337712)
@@ -0,0 +1,1253 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
+
+/* Automatically generated by parse-opcodes.  */
+#ifndef RISCV_ENCODING_H
+#define RISCV_ENCODING_H
+#define MATCH_BEQ 0x63
+#define MASK_BEQ  0x707f
+#define MATCH_BNE 0x1063
+#define MASK_BNE  0x707f
+#define MATCH_BLT 0x4063
+#define MASK_BLT  0x707f
+#define MATCH_BGE 0x5063
+#define MASK_BGE  0x707f
+#define MATCH_BLTU 0x6063
+#define MASK_BLTU  0x707f
+#define MATCH_BGEU 0x7063
+#define MASK_BGEU  0x707f
+#define MATCH_JALR 0x67
+#define MASK_JALR  0x707f
+#define MATCH_JAL 0x6f
+#define MASK_JAL  0x7f
+#define MATCH_LUI 0x37
+#define MASK_LUI  0x7f
+#define MATCH_AUIPC 0x17
+#define MASK_AUIPC  0x7f
+#define MATCH_ADDI 0x13
+#define MASK_ADDI  0x707f
+#define MATCH_SLLI 0x1013
+#define MASK_SLLI  0xfc00707f
+#define MATCH_SLTI 0x2013
+#define MASK_SLTI  0x707f
+#define MATCH_SLTIU 0x3013
+#define MASK_SLTIU  0x707f
+#define MATCH_XORI 0x4013
+#define MASK_XORI  0x707f
+#define MATCH_SRLI 0x5013
+#define MASK_SRLI  0xfc00707f
+#define MATCH_SRAI 0x40005013
+#define MASK_SRAI  0xfc00707f
+#define MATCH_ORI 0x6013
+#define MASK_ORI  0x707f
+#define MATCH_ANDI 0x7013
+#define MASK_ANDI  0x707f
+#define MATCH_ADD 0x33
+#define MASK_ADD  0xfe00707f
+#define MATCH_SUB 0x4033
+#define MASK_SUB  0xfe00707f
+#define MATCH_SLL 0x1033
+#define MASK_SLL  0xfe00707f
+#define MATCH_SLT 0x2033
+#define MASK_SLT  0xfe00707f
+#define MATCH_SLTU 0x3033
+#define MASK_SLTU  0xfe00707f
+#define MATCH_XOR 0x4033
+#define MASK_XOR  0xfe00707f
+#define MATCH_SRL 0x5033
+#define MASK_SRL  0xfe00707f
+#define MATCH_SRA 0x40005033
+#define MASK_SRA  0xfe00707f
+#define MATCH_OR 0x6033
+#define MASK_OR  0xfe00707f
+#define MATCH_AND 0x7033
+#define MASK_AND  0xfe00707f
+#define MATCH_ADDIW 0x1b
+#define MASK_ADDIW  0x707f
+#define MATCH_SLLIW 0x101b
+#define MASK_SLLIW  0xfe00707f
+#define MATCH_SRLIW 0x501b
+#define MASK_SRLIW  0xfe00707f
+#define MATCH_SRAIW 0x4000501b
+#define MASK_SRAIW  0xfe00707f
+#define MATCH_ADDW 0x3b
+#define MASK_ADDW  0xfe00707f
+#define MATCH_SUBW 0x403b
+#define MASK_SUBW  0xfe00707f
+#define MATCH_SLLW 0x103b
+#define MASK_SLLW  0xfe00707f
+#define MATCH_SRLW 0x503b
+#define MASK_SRLW  0xfe00707f
+#define MATCH_SRAW 0x4000503b
+#define MASK_SRAW  0xfe00707f
+#define MATCH_LB 0x3
+#define MASK_LB  0x707f
+#define MATCH_LH 0x1003
+#define MASK_LH  0x707f
+#define MATCH_LW 0x2003
+#define MASK_LW  0x707f
+#define MATCH_LD 0x3003
+#define MASK_LD  0x707f
+#define MATCH_LBU 0x4003
+#define MASK_LBU  0x707f
+#define MATCH_LHU 0x5003
+#define MASK_LHU  0x707f
+#define MATCH_LWU 0x6003
+#define MASK_LWU  0x707f
+#define MATCH_SB 0x23
+#define MASK_SB  0x707f
+#define MATCH_SH 0x1023
+#define MASK_SH  0x707f
+#define MATCH_SW 0x2023
+#define MASK_SW  0x707f
+#define MATCH_SD 0x3023
+#define MASK_SD  0x707f
+#define MATCH_FENCE 0xf
+#define MASK_FENCE  0x707f
+#define MATCH_FENCE_I 0x100f
+#define MASK_FENCE_I  0x707f
+#define MATCH_MUL 0x233
+#define MASK_MUL  0xfe00707f
+#define MATCH_MULH 0x2001033
+#define MASK_MULH  0xfe00707f
+#define MATCH_MULHSU 0x2002033
+#define MASK_MULHSU  0xfe00707f
+#define MATCH_MULHU 0x2003033
+#define MASK_MULHU  0xfe00707f
+#define MATCH_DIV 0x2004033
+#define MASK_DIV  0xfe00707f
+#define MATCH_DIVU 0x2005033
+#define MASK_DIVU  0xfe00707f
+#define MATCH_REM 0x2006033
+#define MASK_REM  0xfe00707f
+#define MATCH_REMU 0x2007033
+#define MASK_REMU  0xfe00707f
+#define MATCH_MULW 0x23b
+#define MASK_MULW  0xfe00707f
+#define MATCH_DIVW 0x200403b
+#define MASK_DIVW  0xfe00707f
+#define MATCH_DIVUW 0x200503b
+#define MASK_DIVUW  0xfe00707f
+#define MATCH_REMW 0x200603b
+#define MASK_REMW  0xfe00707f
+#define MATCH_REMUW 0x200703b
+#define MASK_REMUW  0xfe00707f
+#define MATCH_AMOADD_W 0x202f
+#define MASK_AMOADD_W  0xf800707f
+#define MATCH_AMOXOR_W 0x2000202f
+#define MASK_AMOXOR_W  0xf800707f
+#define MATCH_AMOOR_W 0x4000202f
+#define MASK_AMOOR_W  0xf800707f
+#define MATCH_AMOAND_W 0x6000202f
+#define MASK_AMOAND_W  0xf800707f
+#define MATCH_AMOMIN_W 0x8000202f
+#define MASK_AMOMIN_W  0xf800707f

svn commit: r337711 - head/stand/lua

2018-08-13 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 14:49:07 2018
New Revision: 337711
URL: https://svnweb.freebsd.org/changeset/base/337711

Log:
  lualoader: Fix parsing of negative number loader.conf(5) variables
  
  They would previously cause errors, as the regex for these did not tolerate
  a leading negative sign, and the variable would simply not parse.

Modified:
  head/stand/lua/config.lua

Modified: head/stand/lua/config.lua
==
--- head/stand/lua/config.lua   Mon Aug 13 14:24:00 2018(r337710)
+++ head/stand/lua/config.lua   Mon Aug 13 14:49:07 2018(r337711)
@@ -198,7 +198,7 @@ local pattern_table = {
},
--  env_var=num
{
-   str = "^%s*([%w%p]+)%s*=%s*(%d+)%s*(.*)",
+   str = "^%s*([%w%p]+)%s*=%s*(-?%d+)%s*(.*)",
process = function(k, v)
if setEnv(k, processEnvVar(v)) ~= 0 then
print(MSG_FAILSETENV:format(k, tostring(v)))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337709 - head/sys/net

2018-08-13 Thread Andrew Gallatin
Author: gallatin
Date: Mon Aug 13 14:13:25 2018
New Revision: 337709
URL: https://svnweb.freebsd.org/changeset/base/337709

Log:
  lagg: allow lacp to manage the link state
  
  Lacp needs to manage the link state itself. Unlike other
  lagg protocols, the ability of lacp to pass traffic
  depends not only on the lagg members having link, but also
  on the lacp protocol converging to a distributing state with the
  link partner.
  
  If we prematurely mark the link as up, then we will send a
  gratuitous arp (via arp_handle_ifllchange()) before the lacp
  interface is capable of passing traffic. When this happens,
  the gratuitous arp is lost, and our link partner may cache
  a stale mac address (eg, when the base mac address for the
  lagg bundle changes, due to a BIOS change re-ordering NIC
  unit numbers)
  
  Reviewed by: jtl, hselasky
  Sponsored by: Netflix

Modified:
  head/sys/net/ieee8023ad_lacp.c
  head/sys/net/if_lagg.c

Modified: head/sys/net/ieee8023ad_lacp.c
==
--- head/sys/net/ieee8023ad_lacp.c  Mon Aug 13 13:58:45 2018
(r337708)
+++ head/sys/net/ieee8023ad_lacp.c  Mon Aug 13 14:13:25 2018
(r337709)
@@ -711,6 +711,8 @@ lacp_disable_distributing(struct lacp_port *lp)
}
 
lp->lp_state &= ~LACP_STATE_DISTRIBUTING;
+   if_link_state_change(sc->sc_ifp,
+   sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN);
 }
 
 static void
@@ -745,6 +747,9 @@ lacp_enable_distributing(struct lacp_port *lp)
} else
/* try to become the active aggregator */
lacp_select_active_aggregator(lsc);
+
+   if_link_state_change(sc->sc_ifp,
+   sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN);
 }
 
 static void

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Mon Aug 13 13:58:45 2018(r337708)
+++ head/sys/net/if_lagg.c  Mon Aug 13 14:13:25 2018(r337709)
@@ -1737,6 +1737,10 @@ lagg_linkstate(struct lagg_softc *sc)
 
LAGG_XLOCK_ASSERT(sc);
 
+   /* LACP handles link state itself */
+   if (sc->sc_proto == LAGG_PROTO_LACP)
+   return;
+
/* Our link is considered up if at least one of our ports is active */
LAGG_RLOCK();
CK_SLIST_FOREACH(lp, >sc_ports, lp_entries) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337708 - head/sys/netinet

2018-08-13 Thread Michael Tuexen
Author: tuexen
Date: Mon Aug 13 13:58:45 2018
New Revision: 337708
URL: https://svnweb.freebsd.org/changeset/base/337708

Log:
  Use the stacb instead of the asoc in state macros.
  
  This is not a functional change. Just a preparation for upcoming
  dtrace state change provider support.

Modified:
  head/sys/netinet/sctp_asconf.c
  head/sys/netinet/sctp_constants.h
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_peeloff.c
  head/sys/netinet/sctp_timer.c
  head/sys/netinet/sctp_usrreq.c
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_asconf.c
==
--- head/sys/netinet/sctp_asconf.c  Mon Aug 13 11:56:23 2018
(r337707)
+++ head/sys/netinet/sctp_asconf.c  Mon Aug 13 13:58:45 2018
(r337708)
@@ -1991,8 +1991,8 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sc
 * sent when the state goes open.
 */
if (status == 0 &&
-   ((SCTP_GET_STATE(>asoc) == SCTP_STATE_OPEN) ||
-   (SCTP_GET_STATE(>asoc) == 
SCTP_STATE_SHUTDOWN_RECEIVED))) {
+   ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) ||
+   (SCTP_GET_STATE(stcb) == 
SCTP_STATE_SHUTDOWN_RECEIVED))) {
 #ifdef SCTP_TIMER_BASED_ASCONF
sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp,
stcb, stcb->asoc.primary_destination);
@@ -2242,8 +2242,8 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru
 * count of queued params.  If in the non-open
 * state, these get sent when the assoc goes open.
 */
-   if ((SCTP_GET_STATE(>asoc) == SCTP_STATE_OPEN) ||
-   (SCTP_GET_STATE(>asoc) == 
SCTP_STATE_SHUTDOWN_RECEIVED)) {
+   if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) ||
+   (SCTP_GET_STATE(stcb) == 
SCTP_STATE_SHUTDOWN_RECEIVED)) {
if (status >= 0) {
num_queued++;
}
@@ -2304,8 +2304,8 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, 
"set_primary_ip_address_sa: queued on tcb=%p, ",
(void *)stcb);
SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-   if ((SCTP_GET_STATE(>asoc) == SCTP_STATE_OPEN) ||
-   (SCTP_GET_STATE(>asoc) == 
SCTP_STATE_SHUTDOWN_RECEIVED)) {
+   if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) ||
+   (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
 #ifdef SCTP_TIMER_BASED_ASCONF
sctp_timer_start(SCTP_TIMER_TYPE_ASCONF,
stcb->sctp_ep, stcb,
@@ -2844,8 +2844,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, 
 * out the ASCONF.
 */
if (status == 0 &&
-   SCTP_GET_STATE(>asoc) ==
-   SCTP_STATE_OPEN) {
+   SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) {
 #ifdef SCTP_TIMER_BASED_ASCONF
sctp_timer_start(SCTP_TIMER_TYPE_ASCONF,
stcb->sctp_ep, stcb,

Modified: head/sys/netinet/sctp_constants.h
==
--- head/sys/netinet/sctp_constants.h   Mon Aug 13 11:56:23 2018
(r337707)
+++ head/sys/netinet/sctp_constants.h   Mon Aug 13 13:58:45 2018
(r337708)
@@ -470,10 +470,14 @@ __FBSDID("$FreeBSD$");
 #define SCTP_STATE_IN_ACCEPT_QUEUE  0x1000
 #define SCTP_STATE_MASK0x007f
 
-#define SCTP_GET_STATE(asoc)   ((asoc)->state & SCTP_STATE_MASK)
-#define SCTP_SET_STATE(asoc, newstate)  ((asoc)->state = ((asoc)->state & 
~SCTP_STATE_MASK) |  newstate)
-#define SCTP_CLEAR_SUBSTATE(asoc, substate) ((asoc)->state &= ~substate)
-#define SCTP_ADD_SUBSTATE(asoc, substate) ((asoc)->state |= substate)
+#define SCTP_GET_STATE(_stcb) \
+   ((_stcb)->asoc.state & SCTP_STATE_MASK)
+#define SCTP_SET_STATE(_stcb, _state) \
+   (_stcb)->asoc.state = ((_stcb)->asoc.state & ~SCTP_STATE_MASK) | 
(_state)
+#define SCTP_CLEAR_SUBSTATE(_stcb, _substate) \
+   (_stcb)->asoc.state &= ~(_substate)
+#define SCTP_ADD_SUBSTATE(_stcb, _substate) \
+   (_stcb)->asoc.state |= (_substate)
 
 /* SCTP reachability state for each address */
 #define SCTP_ADDR_REACHABLE0x001

Modified: head/sys/netinet/sctp_indata.c
==
--- head/sys/netinet/sctp_indata.c 

svn commit: r337706 - head/sys/netinet

2018-08-13 Thread Michael Tuexen
Author: tuexen
Date: Mon Aug 13 11:56:21 2018
New Revision: 337706
URL: https://svnweb.freebsd.org/changeset/base/337706

Log:
  Use consistently the macors to modify the assoc state.
  
  No functional change.

Modified:
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_usrreq.c
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_indata.c
==
--- head/sys/netinet/sctp_indata.c  Mon Aug 13 08:47:54 2018
(r337705)
+++ head/sys/netinet/sctp_indata.c  Mon Aug 13 11:56:21 2018
(r337706)
@@ -4329,9 +4329,9 @@ again:
/* clean up */
if ((asoc->stream_queue_cnt == 1) &&
((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
-   (asoc->state & SCTP_STATE_SHUTDOWN_RECEIVED)) &&
+   (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&
((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) 
(stcb, asoc))) {
-   asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
+   SCTP_ADD_SUBSTATE(asoc, SCTP_STATE_PARTIAL_MSG_LEFT);
}
if (((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&
@@ -5026,9 +5026,9 @@ hopeless_peer:
/* clean up */
if ((asoc->stream_queue_cnt == 1) &&
((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
-   (asoc->state & SCTP_STATE_SHUTDOWN_RECEIVED)) &&
+   (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&
((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) 
(stcb, asoc))) {
-   asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
+   SCTP_ADD_SUBSTATE(asoc, SCTP_STATE_PARTIAL_MSG_LEFT);
}
if (((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Mon Aug 13 08:47:54 2018
(r337705)
+++ head/sys/netinet/sctp_input.c   Mon Aug 13 11:56:21 2018
(r337706)
@@ -742,8 +742,7 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb)
 */
/* generate a new vtag and send init */
LIST_REMOVE(stcb, sctp_asocs);
-   stcb->asoc.state &= ~SCTP_STATE_COOKIE_ECHOED;
-   stcb->asoc.state |= SCTP_STATE_COOKIE_WAIT;
+   SCTP_SET_STATE(>asoc, SCTP_STATE_COOKIE_WAIT);
sctp_stop_all_cookie_timers(stcb);
sctp_toss_old_cookies(stcb, >asoc);
stcb->asoc.my_vtag = sctp_select_a_tag(stcb->sctp_ep, 
stcb->sctp_ep->sctp_lport, stcb->rport, 1);
@@ -840,7 +839,7 @@ sctp_handle_abort(struct sctp_abort_chunk *abort,
SCTP_TCB_LOCK(stcb);
atomic_subtract_int(>asoc.refcnt, 1);
 #endif
-   stcb->asoc.state |= SCTP_STATE_WAS_ABORTED;
+   SCTP_ADD_SUBSTATE(>asoc, SCTP_STATE_WAS_ABORTED);
(void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC,
SCTP_FROM_SCTP_INPUT + SCTP_LOC_8);
 #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
@@ -1266,8 +1265,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch,
}
/* blast back to INIT state */
sctp_toss_old_cookies(stcb, >asoc);
-   asoc->state &= ~SCTP_STATE_COOKIE_ECHOED;
-   asoc->state |= SCTP_STATE_COOKIE_WAIT;
+   SCTP_SET_STATE(>asoc, 
SCTP_STATE_COOKIE_WAIT);
sctp_stop_all_cookie_timers(stcb);
sctp_send_initiate(stcb->sctp_ep, stcb, 
SCTP_SO_NOT_LOCKED);
}
@@ -1418,7 +1416,7 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int o
return (-1);
}
/* process according to association state... */
-   switch (stcb->asoc.state & SCTP_STATE_MASK) {
+   switch (SCTP_GET_STATE(>asoc)) {
case SCTP_STATE_COOKIE_WAIT:
/* this is the expected state for this chunk */
/* process the INIT-ACK parameters */
@@ -1841,8 +1839,8 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
asoc->cookie_how[how_indx] = 10;
return (NULL);
}
-   if ((asoc->state & SCTP_STATE_COOKIE_WAIT) ||
-   (asoc->state & SCTP_STATE_COOKIE_ECHOED)) {
+   if ((SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_WAIT) ||
+   

svn commit: r337707 - head/stand/man

2018-08-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Aug 13 11:56:23 2018
New Revision: 337707
URL: https://svnweb.freebsd.org/changeset/base/337707

Log:
  Move around text in loader(8), in particular stuff related to ZFS,
  to restore the usual section order.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/stand/man/loader.8

Modified: head/stand/man/loader.8
==
--- head/stand/man/loader.8 Mon Aug 13 11:56:21 2018(r337706)
+++ head/stand/man/loader.8 Mon Aug 13 11:56:23 2018(r337707)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 7, 2018
+.Dd August 13, 2018
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -244,10 +244,14 @@ If
 is specified, file sizes will be shown too.
 .Pp
 .It Ic lsdev Op Fl v
-Lists all of the devices from which it may be possible to load modules.
+Lists all of the devices from which it may be possible to load modules,
+as well as ZFS pools.
 If
 .Fl v
-is specified, more details are printed.
+is specified, more details are printed, including ZFS pool information
+in a format that resembles
+.Nm zpool Cm status
+output.
 .Pp
 .It Ic lsmod Op Fl v
 Displays loaded modules.
@@ -255,6 +259,14 @@ If
 .Fl v
 is specified, more details are shown.
 .Pp
+.It Ic lszfs Ar filesystem
+A ZFS extended command that can be used to explore the ZFS filesystem
+hierarchy in a pool.
+Lists the immediate children of the
+.Ar filesystem .
+The filesystem hierarchy is rooted at a filesystem with the same name
+as the pool.
+.Pp
 .It Ic more Ar file Op Ar
 Display the files specified, with a pause at each
 .Va LINES
@@ -666,6 +678,29 @@ Modifies
 and
 .Dv VM_KMEM_SIZE_MAX .
 .El
+.Ss ZFS FEATURES
+.Nm
+supports the following format for specifying ZFS filesystems which
+can be used wherever
+.Xr loader 8
+refers to a device specification:
+.Pp
+.Ar zfs:pool/filesystem:
+.Pp
+where
+.Pa pool/filesystem
+is a ZFS filesystem name as described in
+.Xr zfs 8 .
+.Pp
+If
+.Pa /etc/fstab
+does not have an entry for the root filesystem and
+.Va vfs.root.mountfrom
+is not set, but
+.Va currdev
+refers to a ZFS filesystem, then
+.Nm
+will instruct kernel to use that filesystem as the root filesystem.
 .Ss BUILTIN PARSER
 When a builtin command is executed, the rest of the line is taken
 by it as arguments, and it is processed by a special parser which
@@ -907,9 +942,8 @@ version at compile time.
 .Nm
 version.
 .El
-.Ss SYSTEM DOCUMENTATION
 .Sh FILES
-.Bl -tag -width /boot/defaults/loader.conf -compact
+.Bl -tag -width /usr/share/examples/bootforth/ -compact
 .It Pa /boot/loader
 .Nm
 itself.
@@ -918,6 +952,8 @@ Additional
 .Tn FICL
 initialization.
 .It Pa /boot/defaults/loader.conf
+.It Pa /boot/loader.4th
+Extra builtin-like words.
 .It Pa /boot/loader.conf
 .It Pa /boot/loader.conf.local
 .Nm
@@ -930,6 +966,11 @@ bootstrapping script.
 Loaded by
 .Ic help .
 Contains the help messages.
+.It Pa /boot/support.4th
+.Pa loader.conf
+processing words.
+.It Pa /usr/share/examples/bootforth/
+Assorted examples.
 .El
 .Sh EXAMPLES
 Boot in single user mode:
@@ -955,16 +996,11 @@ set root_disk_unit=2
 boot /boot/kernel/kernel
 .Ed
 .Pp
-See also:
-.Bl -tag -width /usr/share/examples/bootforth/X
-.It Pa /boot/loader.4th
-Extra builtin-like words.
-.It Pa /boot/support.4th
-.Pa loader.conf
-processing words.
-.It Pa /usr/share/examples/bootforth/
-Assorted examples.
-.El
+Set the default device used for loading a kernel from a ZFS filesystem:
+.Bd -literal -offset indent
+set currdev=zfs:tank/ROOT/knowngood:
+.Ed
+.Pp
 .Sh ERRORS
 The following values are thrown by
 .Nm :
@@ -990,52 +1026,6 @@ executed.
 .It -259
 Unspecified error.
 .El
-.Sh ZFS FEATURES
-.Nm
-supports the following format for specifying ZFS filesystems which
-can be used wherever
-.Xr loader 8
-refers to a device specification:
-.Pp
-.Ar zfs:pool/filesystem:
-.Pp
-where
-.Pa pool/filesystem
-is a ZFS filesystem name as described in
-.Xr zfs 8 .
-.Pp
-If
-.Pa /etc/fstab
-does not have an entry for the root filesystem and
-.Va vfs.root.mountfrom
-is not set, but
-.Va currdev
-refers to a ZFS filesystem, then
-.Nm
-will instruct kernel to use that filesystem as the root filesystem.
-.Sh ZFS COMMAND EXTENSIONS
-.Bl -tag -width Ds -compact
-.It Ic lsdev Op Fl v
-Lists ZFS pools in addition to disks and partitions.
-Adding
-.Fl v
-shows more ZFS pool details in a format that resembles
-.Nm zpool Cm status
-output.
-.Pp
-.It Ic lszfs Ar filesystem
-A ZFS extended command that can be used to explore the ZFS filesystem
-hierarchy in a pool.
-Lists the immediate children of the
-.Ar filesystem .
-The filesystem hierarchy is rooted at a filesystem with the same name
-as the pool.
-.El
-.Sh EXAMPLES
-Set the default device used for loading a kernel from a ZFS filesystem:
-.Bd -literal -offset indent
-set currdev=zfs:tank/ROOT/knowngood:
-.Ed
 .Sh SEE ALSO
 .Xr libstand 3 ,
 .Xr loader.conf 5 ,
___
svn-src-head@freebsd.org mailing list

svn commit: r337704 - in head/sys/dev/usb: . net

2018-08-13 Thread Michal Meloun
Author: mmel
Date: Mon Aug 13 07:28:25 2018
New Revision: 337704
URL: https://svnweb.freebsd.org/changeset/base/337704

Log:
  Add USB ID for rebranded RTL8153 found on NVIDIA Jetson TX1 board.
  
  MFC after:3 days

Modified:
  head/sys/dev/usb/net/if_ure.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/net/if_ure.c
==
--- head/sys/dev/usb/net/if_ure.c   Mon Aug 13 06:40:20 2018
(r337703)
+++ head/sys/dev/usb/net/if_ure.c   Mon Aug 13 07:28:25 2018
(r337704)
@@ -68,6 +68,7 @@ SYSCTL_INT(_hw_usb_ure, OID_AUTO, debug, CTLFLAG_RWTUN
 static const STRUCT_USB_HOST_ID ure_devs[] = {
 #defineURE_DEV(v,p,i)  { USB_VPI(USB_VENDOR_##v, 
USB_PRODUCT_##v##_##p, i) }
URE_DEV(LENOVO, RTL8153, 0),
+   URE_DEV(NVIDIA, RTL8153, 0),
URE_DEV(REALTEK, RTL8152, URE_FLAG_8152),
URE_DEV(REALTEK, RTL8153, 0),
URE_DEV(TPLINK, RTL8153, 0),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsMon Aug 13 06:40:20 2018(r337703)
+++ head/sys/dev/usb/usbdevsMon Aug 13 07:28:25 2018(r337704)
@@ -467,6 +467,7 @@ vendor PLEXTOR  0x093b  Plextor
 vendor INTREPIDCS  0x093c  Intrepid
 vendor YANO0x094f  Yano
 vendor KINGSTON0x0951  Kingston Technology
+vendor NVIDIA  0x0955  NVIDIA Corporation
 vendor BLUEWATER   0x0956  BlueWater Systems
 vendor AGILENT 0x0957  Agilent Technologies
 vendor GUDE0x0959  Gude ADS
@@ -3455,6 +3456,9 @@ product NOVATEL MC760 0x6002  Novatel MC760
 product NOVATEL MC547  0x7042  Novatel MC547
 product NOVATEL MC679  0x7031  Novatel MC679
 product NOVATEL2 FLEXPACKGPS   0x0100  NovAtel FlexPack GPS receiver
+
+/* NVIDIA products */
+product NVIDIA RTL8153 0x09ff  USB 3.0 Ethernet
 
 /* Merlin products */
 productMERLIN V620 0x1110  Merlin V620
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337703 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/dma include/dt-bindings/memory include/dt-bindings/net include/dt-bindings/phy include/dt-bindings/pinct...

2018-08-13 Thread Emmanuel Vadot
Author: manu
Date: Mon Aug 13 06:40:20 2018
New Revision: 337703
URL: https://svnweb.freebsd.org/changeset/base/337703

Log:
  Import DTS files from Linux 4.18

Added:
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am335x-osd335x-common.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am335x-pocketbeagle.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am3517-som.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-intel-s2600wf.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-opp-lanyang.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-portwell-neptune.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm2837-rpi-3-b-plus.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm283x-rpi-lan7515.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm47094-luxul-xap-1610.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm47094-luxul-xwr-3150-v1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/berlin2cd-valve-steamlink.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/dra7-mmc-iodelay.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6dl-mamoj.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-dhcom-pdk2.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-dhcom-som.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-icore-mipi.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-kp-tpc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-kp.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/meson8m2-mxiii-plus.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/meson8m2.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a-rfb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a-rfb-nand.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623n-rfb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1-c1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1-c3.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1-c1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1-c2.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-msm8974-sony-xperia-amami.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/r8a77470-iwg23s-sbc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/r8a77470.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/stm32f469.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun7i-a20-olimex-som-evb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-h2-plus-libretech-all-h3-cc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-r16-nintendo-nes-classic.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-r16-nintendo-super-nes-classic.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sunxi-libretech-all-h3-cc.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/actions,s900-cmu.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/axg-aoclkc.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8998.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-sdm845.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,rpmh.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,videocc-sdm845.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a77470-cpg-mssr.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a77990-cpg-mssr.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/sun50i-h6-r-ccu.h