svn commit: r333015 - head/sys/net
Author: hselasky Date: Thu Apr 26 08:58:27 2018 New Revision: 333015 URL: https://svnweb.freebsd.org/changeset/base/333015 Log: Add network device event for priority code point, PCP, changes. When the PCP is changed for either a VLAN network interface or when prio tagging is enabled for a regular ethernet network interface, broadcast the IFNET_EVENT_PCP event so applications like ibcore can update its GID tables accordingly. MFC after:3 days Reviewed by: ae, kib Differential Revision:https://reviews.freebsd.org/D15040 Sponsored by: Mellanox Technologies Modified: head/sys/net/if_ethersubr.c head/sys/net/if_var.h head/sys/net/if_vlan.c Modified: head/sys/net/if_ethersubr.c == --- head/sys/net/if_ethersubr.c Thu Apr 26 05:21:00 2018(r333014) +++ head/sys/net/if_ethersubr.c Thu Apr 26 08:58:27 2018(r333015) @@ -1128,10 +1128,13 @@ ether_ioctl(struct ifnet *ifp, u_long command, caddr_t if (error != 0) break; if (ifr->ifr_lan_pcp > 7 && - ifr->ifr_lan_pcp != IFNET_PCP_NONE) + ifr->ifr_lan_pcp != IFNET_PCP_NONE) { error = EINVAL; - else + } else { ifp->if_pcp = ifr->ifr_lan_pcp; + /* broadcast event about PCP change */ + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP); + } break; case SIOCGLANPCP: Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Thu Apr 26 05:21:00 2018(r333014) +++ head/sys/net/if_var.h Thu Apr 26 08:58:27 2018(r333015) @@ -421,6 +421,8 @@ EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_even /* Interface up/down event */ #define IFNET_EVENT_UP 0 #define IFNET_EVENT_DOWN 1 +#define IFNET_EVENT_PCP2 /* priority code point, PCP */ + typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); #endif /* _SYS_EVENTHANDLER_H_ */ Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Thu Apr 26 05:21:00 2018(r333014) +++ head/sys/net/if_vlan.c Thu Apr 26 08:58:27 2018(r333015) @@ -1947,6 +1947,8 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data } ifv->ifv_pcp = ifr->ifr_vlan_pcp; vlan_tag_recalculate(ifv); + /* broadcast event about PCP change */ + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP); break; case SIOCSIFCAP: ___ 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: r333010 - head/sys/mips/mips
On Thu, Apr 26, 2018 at 7:59 AM, Ian Lepore wrote: > On Wed, 2018-04-25 at 19:46 +, Li-Wen Hsu wrote: >> Author: lwhsu (ports committer) >> Date: Wed Apr 25 19:46:39 2018 >> New Revision: 333010 >> URL: https://svnweb.freebsd.org/changeset/base/333010 >> >> Log: >> Fix mips32 build after r332951. >> >> Approved by:jhb >> >> Modified: >> head/sys/mips/mips/pm_machdep.c >> >> Modified: head/sys/mips/mips/pm_machdep.c >> == >> --- head/sys/mips/mips/pm_machdep.c Wed Apr 25 18:59:29 2018 >> (r333009) >> +++ head/sys/mips/mips/pm_machdep.c Wed Apr 25 19:46:39 2018 >> (r333010) >> @@ -264,7 +264,7 @@ ptrace_single_step(struct thread *td) >> va = locr0->pc + 4; >> } >> if (td->td_md.md_ss_addr) { >> - printf("SS %s (%d): breakpoint already set at %lx (va %lx)\n", >> + printf("SS %s (%d): breakpoint already set at %zx (va %zx)\n", >> p->p_comm, p->p_pid, td->td_md.md_ss_addr, va); /* XXX */ >> error = EFAULT; >> goto out; >> @@ -500,7 +500,7 @@ ptrace_clear_single_step(struct thread *td) >> >> if (error != 0) { >> log(LOG_ERR, >> - "SS %s %d: can't restore instruction at %lx: %x\n", >> + "SS %s %d: can't restore instruction at %zx: %x\n", >> p->p_comm, p->p_pid, td->td_md.md_ss_addr, >> td->td_md.md_ss_instr); >> } >> > > This isn't right either. %z is for size_t values, both md_ss_addr and > va are integers and a plain %x should be the right format. But it will break mips64: cc1: warnings being treated as errors /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function 'ptrace_single_step': /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'uintptr_t' [-Wformat] /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' expects type 'unsigned int', but argument 5 has type 'uintptr_t' [-Wformat] /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function 'ptrace_clear_single_step': /home/lwhsu/src/sys/mips/mips/pm_machdep.c:505: warning: format '%x' expects type 'unsigned int', but argument 5 has type 'uintptr_t' [-Wformat] *** [pm_machdep.o] Error code 1 Another way is cast arguments to uintmax_t and use %jx. Will that be better? Li-Wen -- Li-Wen Hsu https://lwhsu.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: r333016 - head/sys/netipsec
Author: ae Date: Thu Apr 26 12:23:31 2018 New Revision: 333016 URL: https://svnweb.freebsd.org/changeset/base/333016 Log: Merge r1.22-1.23 from NetBSD: Don't assume M_PKTHDR is set only on the first mbuf of the chain. The check is replaced by (m1 != m), which is equivalent to the previous code: we want to modify m->m_pkthdr.len only when 'm' was not passed in m_adj(). Fix a pretty bad mistake, that has always been there: m_adj(m1, -(m1->m_len - roff)); if (m1 != m) m->m_pkthdr.len -= (m1->m_len - roff); This is wrong: m_adj() will modify m1->m_len, so we're using a wrong value when manually adjusting m->m_pkthdr.len. Reported by: Maxime Villard Obtained from:NetBSD MFC after:1 week Modified: head/sys/netipsec/ipsec_mbuf.c Modified: head/sys/netipsec/ipsec_mbuf.c == --- head/sys/netipsec/ipsec_mbuf.c Thu Apr 26 08:58:27 2018 (r333015) +++ head/sys/netipsec/ipsec_mbuf.c Thu Apr 26 12:23:31 2018 (r333016) @@ -255,10 +255,11 @@ m_striphdr(struct mbuf *m, int skip, int hlen) /* The header was at the beginning of the mbuf */ IPSECSTAT_INC(ips_input_front); m_adj(m1, hlen); - if ((m1->m_flags & M_PKTHDR) == 0) + if (m1 != m) m->m_pkthdr.len -= hlen; } else if (roff + hlen >= m1->m_len) { struct mbuf *mo; + int adjlen; /* * Part or all of the header is at the end of this mbuf, @@ -267,11 +268,13 @@ m_striphdr(struct mbuf *m, int skip, int hlen) */ IPSECSTAT_INC(ips_input_end); if (roff + hlen > m1->m_len) { + adjlen = roff + hlen - m1->m_len; + /* Adjust the next mbuf by the remainder */ - m_adj(m1->m_next, roff + hlen - m1->m_len); + m_adj(m1->m_next, adjlen); /* The second mbuf is guaranteed not to have a pkthdr... */ - m->m_pkthdr.len -= (roff + hlen - m1->m_len); + m->m_pkthdr.len -= adjlen; } /* Now, let's unlink the mbuf chain for a second...*/ @@ -279,9 +282,10 @@ m_striphdr(struct mbuf *m, int skip, int hlen) m1->m_next = NULL; /* ...and trim the end of the first part of the chain...sick */ - m_adj(m1, -(m1->m_len - roff)); - if ((m1->m_flags & M_PKTHDR) == 0) - m->m_pkthdr.len -= (m1->m_len - roff); + adjlen = m1->m_len - roff; + m_adj(m1, -adjlen); + if (m1 != m) + m->m_pkthdr.len -= adjlen; /* Finally, let's relink */ m1->m_next = mo; ___ 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: r333017 - head
Author: emaste Date: Thu Apr 26 13:18:24 2018 New Revision: 333017 URL: https://svnweb.freebsd.org/changeset/base/333017 Log: Correct r307825 BOOTSTRAPPING test for unsupported upgrade __FreeBSD_version has five digits after the major number, but the min versions in the test had an extra 0 (so the test was always false). Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Apr 26 12:23:31 2018(r333016) +++ head/Makefile.inc1 Thu Apr 26 13:18:24 2018(r333017) @@ -1851,9 +1851,9 @@ legacy: .PHONY # the version bump in r296219 (from July 29, 2015 -> Feb 29, 2016). .if ${BOOTSTRAPPING} != 0 && \ ${WANT_COMPILER_TYPE} == "clang" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30601 -.if ${BOOTSTRAPPING} > 1000 && ${BOOTSTRAPPING} < 1002501 +.if ${BOOTSTRAPPING} > 100 && ${BOOTSTRAPPING} < 1002501 @echo "ERROR: Source upgrades from stable/10 prior to r286033 are not supported."; false -.elif ${BOOTSTRAPPING} > 900 && ${BOOTSTRAPPING} < 903509 +.elif ${BOOTSTRAPPING} > 90 && ${BOOTSTRAPPING} < 903509 @echo "ERROR: Source upgrades from stable/9 prior to r286035 are not supported."; false .endif .endif ___ 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: r333017 - head
On 26 April 2018 at 09:18, Ed Maste wrote: > > Log: > Correct r307825 BOOTSTRAPPING test for unsupported upgrade > > __FreeBSD_version has five digits after the major number, but the min > versions in the test had an extra 0 (so the test was always false). With the test adjusted I believe we should now set the minimum supported rel to 10.3. No 9.x release contains r286035, so if reporting a minimum release (as opposed to SVN rev) then 10.3 is the first release with the fix (r286033). That said, is it time to just bump the minimum and remove the special cases? ___ 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: r333010 - head/sys/mips/mips
On Thu, 2018-04-26 at 19:01 +0800, Li-Wen Hsu wrote: > On Thu, Apr 26, 2018 at 7:59 AM, Ian Lepore wrote: > > > > On Wed, 2018-04-25 at 19:46 +, Li-Wen Hsu wrote: > > > > > > Author: lwhsu (ports committer) > > > Date: Wed Apr 25 19:46:39 2018 > > > New Revision: 333010 > > > URL: https://svnweb.freebsd.org/changeset/base/333010 > > > > > > Log: > > > Fix mips32 build after r332951. > > > > > > Approved by:jhb > > > > > > Modified: > > > head/sys/mips/mips/pm_machdep.c > > > > > > Modified: head/sys/mips/mips/pm_machdep.c > > > == > > > --- head/sys/mips/mips/pm_machdep.c Wed Apr 25 18:59:29 2018 > > > (r333009) > > > +++ head/sys/mips/mips/pm_machdep.c Wed Apr 25 19:46:39 2018 > > > (r333010) > > > @@ -264,7 +264,7 @@ ptrace_single_step(struct thread *td) > > > va = locr0->pc + 4; > > > } > > > if (td->td_md.md_ss_addr) { > > > - printf("SS %s (%d): breakpoint already set at %lx (va > > > %lx)\n", > > > + printf("SS %s (%d): breakpoint already set at %zx (va > > > %zx)\n", > > > p->p_comm, p->p_pid, td->td_md.md_ss_addr, va); /* XXX > > > */ > > > error = EFAULT; > > > goto out; > > > @@ -500,7 +500,7 @@ ptrace_clear_single_step(struct thread *td) > > > > > > if (error != 0) { > > > log(LOG_ERR, > > > - "SS %s %d: can't restore instruction at %lx: %x\n", > > > + "SS %s %d: can't restore instruction at %zx: %x\n", > > > p->p_comm, p->p_pid, td->td_md.md_ss_addr, > > > td->td_md.md_ss_instr); > > > } > > > > > This isn't right either. %z is for size_t values, both md_ss_addr and > > va are integers and a plain %x should be the right format. > But it will break mips64: > > cc1: warnings being treated as errors > /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function 'ptrace_single_step': > /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' > expects type 'unsigned int', but argument 4 has type 'uintptr_t' > [-Wformat] > /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' > expects type 'unsigned int', but argument 5 has type 'uintptr_t' > [-Wformat] > /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function > 'ptrace_clear_single_step': > /home/lwhsu/src/sys/mips/mips/pm_machdep.c:505: warning: format '%x' > expects type 'unsigned int', but argument 5 has type 'uintptr_t' > [-Wformat] > *** [pm_machdep.o] Error code 1 > > Another way is cast arguments to uintmax_t and use %jx. Will that be better? > > Li-Wen > Oh, my bad, my source was out of date. Now I see that the types are not plain integers anymore. In that case, I think the only options are to cast to uintmax_t and use %jx, or cast to void* and use %p. -- Ian ___ 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: r333017 - head
On Thu, Apr 26, 2018 at 7:47 AM, Ed Maste wrote: > On 26 April 2018 at 09:18, Ed Maste wrote: > > > > Log: > > Correct r307825 BOOTSTRAPPING test for unsupported upgrade > > > > __FreeBSD_version has five digits after the major number, but the min > > versions in the test had an extra 0 (so the test was always false). > > With the test adjusted I believe we should now set the minimum > supported rel to 10.3. No 9.x release contains r286035, so if > reporting a minimum release (as opposed to SVN rev) then 10.3 is the > first release with the fix (r286033). > > That said, is it time to just bump the minimum and remove the special > cases? > I added the original case so that up-to-date stable-9 systems that were at (Juniper?) could work. The bug was such that we don't know that it wasn't being used. It would never trigger on those systems, so people could be using it and we'll not know it. Basically, we should ask Juniper first before removing it since they specifically asked me to allow it. Warner ___ 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: r333019 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/smartpqi sys/modules sys/modules/smartpqi
Author: sbruno Date: Thu Apr 26 16:59:06 2018 New Revision: 333019 URL: https://svnweb.freebsd.org/changeset/base/333019 Log: martpqi(4): - Microsemi SCSI driver for PQI controllers. - Found on newer model HP servers. - Restrict to AMD64 only as per developer request. The driver provides support for the new generation of PQI controllers from Microsemi. This driver is the first SCSI driver to implement the PQI queuing model and it will replace the aacraid driver for Adaptec Series 9 controllers. HARDWARE Controllers supported by the driver include: HPE Gen10 Smart Array Controller Family OEM Controllers based on the Microsemi Chipset. Submitted by: deepak.u...@microsemi.com Relnotes: yes Sponsored by: Microsemi Differential Revision: https://reviews.freebsd.org/D14514 > Description of fields to fill in above: 76 columns --| > PR: If and which Problem Report is related. > Submitted by: If someone else sent in the change. > Reported by: If someone else reported the issue. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from:If the change is from a third party. > MFC after:N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Pull Request: https://github.com/freebsd/freebsd/pull/### (*full* GitHub URL needed). > Differential Revision:https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. Mshare/man/man4/Makefile AM share/man/man4/smartpqi.4 Msys/amd64/conf/GENERIC Msys/conf/NOTES Msys/conf/files.amd64 Asys/dev/smartpqi AM sys/dev/smartpqi/smartpqi_cam.c AM sys/dev/smartpqi/smartpqi_cmd.c AM sys/dev/smartpqi/smartpqi_defines.h AM sys/dev/smartpqi/smartpqi_discovery.c AM sys/dev/smartpqi/smartpqi_event.c AM sys/dev/smartpqi/smartpqi_helper.c AM sys/dev/smartpqi/smartpqi_includes.h AM sys/dev/smartpqi/smartpqi_init.c AM sys/dev/smartpqi/smartpqi_intr.c AM sys/dev/smartpqi/smartpqi_ioctl.c AM sys/dev/smartpqi/smartpqi_ioctl.h AM sys/dev/smartpqi/smartpqi_main.c AM sys/dev/smartpqi/smartpqi_mem.c AM sys/dev/smartpqi/smartpqi_misc.c AM sys/dev/smartpqi/smartpqi_prototypes.h AM sys/dev/smartpqi/smartpqi_queue.c AM sys/dev/smartpqi/smartpqi_request.c AM sys/dev/smartpqi/smartpqi_response.c AM sys/dev/smartpqi/smartpqi_sis.c AM sys/dev/smartpqi/smartpqi_structures.h AM sys/dev/smartpqi/smartpqi_tag.c Msys/modules/Makefile Asys/modules/smartpqi AM sys/modules/smartpqi/Makefile Added: head/share/man/man4/smartpqi.4 (contents, props changed) head/sys/dev/smartpqi/ head/sys/dev/smartpqi/smartpqi_cam.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_cmd.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_defines.h (contents, props changed) head/sys/dev/smartpqi/smartpqi_discovery.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_event.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_helper.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_includes.h (contents, props changed) head/sys/dev/smartpqi/smartpqi_init.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_intr.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_ioctl.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_ioctl.h (contents, props changed) head/sys/dev/smartpqi/smartpqi_main.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_mem.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_misc.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_prototypes.h (contents, props changed) head/sys/dev/smartpqi/smartpqi_queue.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_request.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_response.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_sis.c (contents, props changed) head/sys/dev/smartpqi/smartpqi_structures.h (contents, props changed) head/sys/dev/smartpqi/smartpqi_tag.c (contents, props changed) head/sys/modules/smartpqi/ head/sys/modules/smartpqi/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files.amd64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ===
svn commit: r333020 - head/share/misc
Author: seanc (ports committer) Date: Thu Apr 26 17:13:58 2018 New Revision: 333020 URL: https://svnweb.freebsd.org/changeset/base/333020 Log: Add myself back to the ranks of being mentored Approved by: swills (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotThu Apr 26 16:59:06 2018 (r333019) +++ head/share/misc/committers-ports.dotThu Apr 26 17:13:58 2018 (r333020) @@ -517,6 +517,7 @@ mat -> dteske mat -> dvl mat -> gordon mat -> mmokhi +mat -> seanc mat -> tcberner mat -> thierry mat -> tobik @@ -650,6 +651,7 @@ swills -> pclin swills -> rezny swills -> robak swills -> rpaulo +swills -> seanc swills -> tz swills -> xmj ___ 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: r333021 - head/sys/sys
Author: sbruno Date: Thu Apr 26 17:32:35 2018 New Revision: 333021 URL: https://svnweb.freebsd.org/changeset/base/333021 Log: Tigthen up kern_prefetch.h includes. The DMAP check was not committed in here with HPTS so these includes aren't necessary. Comments from rrs: Yeah I had those in there in our version so I could validate the range in amd64 with the DMAP_VM but for some reason those don't work in head anymore.. Forgot to purge the headers :) Submitted by: Kevin Bowling Reviewed by: rrs Differential Revision:https://reviews.freebsd.org/D15164 Modified: head/sys/sys/kern_prefetch.h Modified: head/sys/sys/kern_prefetch.h == --- head/sys/sys/kern_prefetch.hThu Apr 26 17:13:58 2018 (r333020) +++ head/sys/sys/kern_prefetch.hThu Apr 26 17:32:35 2018 (r333021) @@ -28,13 +28,6 @@ */ #define __kern_prefetch_h__ #ifdef _KERNEL -#if defined(__amd64__) -#include -#include -#include -#include -#include -#endif static __inline void kern_prefetch(const volatile void *addr, void* before) ___ 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: r333022 - head/share/man/man4
Author: trasz Date: Thu Apr 26 17:34:53 2018 New Revision: 333022 URL: https://svnweb.freebsd.org/changeset/base/333022 Log: Clarify which USB specs are supported by cdce(4) and umodem(4). Discussed with: hselasky@ MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/cdce.4 head/share/man/man4/umodem.4 Modified: head/share/man/man4/cdce.4 == --- head/share/man/man4/cdce.4 Thu Apr 26 17:32:35 2018(r333021) +++ head/share/man/man4/cdce.4 Thu Apr 26 17:34:53 2018(r333022) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm cdce -.Nd "USB Communication Device Class Ethernet driver" +.Nd "USB Communication Device Class Ethernet (CDC ECM/NCM) driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -58,7 +58,9 @@ The .Nm driver provides support for USB Host-to-Host (aka USB-to-USB) and USB-to-Ethernet bridges based on the USB Communication Device Class -(CDC) and Ethernet subclass. +Ethernet Control Model (CDC ECM) and Network Control Model (CDC NCM) +specifications. +It also provides device-level CDC ECM support. .Pp The USB bridge appears as a regular network interface on both sides, transporting Ethernet frames. Modified: head/share/man/man4/umodem.4 == --- head/share/man/man4/umodem.4Thu Apr 26 17:32:35 2018 (r333021) +++ head/share/man/man4/umodem.4Thu Apr 26 17:34:53 2018 (r333022) @@ -34,7 +34,7 @@ .Os .Sh NAME .Nm umodem -.Nd USB modem support +.Nd USB Communication Device Class serial (CDC ACM) driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -54,9 +54,10 @@ umodem_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for USB modems in the Communication -Device Class using the Abstract Control Model. -These modems are basically standard serial line modems, but they are +driver provides support for USB modems and serial devices that +implement the Communication Device Class Abstract Control Model (CDC ACM). +It also implement device-side CDC ACM support. +Supported modems are basically standard serial line modems, but they are accessed via USB instead. They support a regular AT command set. The commands can either be multiplexed with the data stream ___ 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: r333023 - head/share/man/man4
Author: trasz Date: Thu Apr 26 17:36:31 2018 New Revision: 333023 URL: https://svnweb.freebsd.org/changeset/base/333023 Log: Bump .Dd. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/cdce.4 Modified: head/share/man/man4/cdce.4 == --- head/share/man/man4/cdce.4 Thu Apr 26 17:34:53 2018(r333022) +++ head/share/man/man4/cdce.4 Thu Apr 26 17:36:31 2018(r333023) @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd November 24, 2015 +.Dd April 26, 2018 .Dt CDCE 4 .Os .Sh NAME ___ 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: r333024 - head/share/man/man4
Author: trasz Date: Thu Apr 26 17:36:48 2018 New Revision: 333024 URL: https://svnweb.freebsd.org/changeset/base/333024 Log: Erm, fix typo. MFC after:2 weeks Modified: head/share/man/man4/umodem.4 Modified: head/share/man/man4/umodem.4 == --- head/share/man/man4/umodem.4Thu Apr 26 17:36:31 2018 (r333023) +++ head/share/man/man4/umodem.4Thu Apr 26 17:36:48 2018 (r333024) @@ -56,7 +56,7 @@ The .Nm driver provides support for USB modems and serial devices that implement the Communication Device Class Abstract Control Model (CDC ACM). -It also implement device-side CDC ACM support. +It also provides device-side CDC ACM support. Supported modems are basically standard serial line modems, but they are accessed via USB instead. They support a regular AT command set. ___ 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: r333025 - head/sys/x86/x86
Author: kib Date: Thu Apr 26 18:12:40 2018 New Revision: 333025 URL: https://svnweb.freebsd.org/changeset/base/333025 Log: Some style and minor code improvements for idle selection. Use designated initializers for the idlt_tlb elements. Remove strstr() use, add flag field to detect supported MWAIT. Use nitems() instead of the terminating NULL entry for idle_tlb. Move several functions into cpu_idle_* namespace. Based on the discussion with: bde Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c == --- head/sys/x86/x86/cpu_machdep.c Thu Apr 26 17:36:48 2018 (r333024) +++ head/sys/x86/x86/cpu_machdep.c Thu Apr 26 18:12:40 2018 (r333025) @@ -598,15 +598,16 @@ cpu_idle_wakeup(int cpu) /* * Ordered by speed/power consumption. */ -struct { +static struct { void*id_fn; char*id_name; + int id_cpuid2_flag; } idle_tbl[] = { - { cpu_idle_spin, "spin" }, - { cpu_idle_mwait, "mwait" }, - { cpu_idle_hlt, "hlt" }, - { cpu_idle_acpi, "acpi" }, - { NULL, NULL } + { .id_fn = cpu_idle_spin, .id_name = "spin" }, + { .id_fn = cpu_idle_mwait, .id_name = "mwait", + .id_cpuid2_flag = CPUID2_MON }, + { .id_fn = cpu_idle_hlt, .id_name = "hlt" }, + { .id_fn = cpu_idle_acpi, .id_name = "acpi" }, }; static int @@ -618,9 +619,9 @@ idle_sysctl_available(SYSCTL_HANDLER_ARGS) avail = malloc(256, M_TEMP, M_WAITOK); p = avail; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) + for (i = 0; i < nitems(idle_tbl); i++) { + if (idle_tbl[i].id_cpuid2_flag != 0 && + (cpu_feature2 & idle_tbl[i].id_cpuid2_flag) == 0) continue; if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) @@ -637,13 +638,13 @@ SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYP 0, 0, idle_sysctl_available, "A", "list of available idle functions"); static bool -idle_selector(const char *new_idle_name) +cpu_idle_selector(const char *new_idle_name) { int i; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) + for (i = 0; i < nitems(idle_tbl); i++) { + if (idle_tbl[i].id_cpuid2_flag != 0 && + (cpu_feature2 & idle_tbl[i].id_cpuid2_flag) == 0) continue; if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) @@ -659,13 +660,13 @@ idle_selector(const char *new_idle_name) } static int -idle_sysctl(SYSCTL_HANDLER_ARGS) +cpu_idle_sysctl(SYSCTL_HANDLER_ARGS) { char buf[16], *p; int error, i; p = "unknown"; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { + for (i = 0; i < nitems(idle_tbl); i++) { if (idle_tbl[i].id_fn == cpu_idle_fn) { p = idle_tbl[i].id_name; break; @@ -675,21 +676,21 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) return (error); - return (idle_selector(buf) ? 0 : EINVAL); + return (cpu_idle_selector(buf) ? 0 : EINVAL); } SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, -idle_sysctl, "A", "currently selected idle function"); +cpu_idle_sysctl, "A", "currently selected idle function"); static void -idle_tun(void *unused __unused) +cpu_idle_tun(void *unused __unused) { char tunvar[16]; if (TUNABLE_STR_FETCH("machdep.idle", tunvar, sizeof(tunvar))) - idle_selector(tunvar); + cpu_idle_selector(tunvar); } -SYSINIT(idle_tun, SI_SUB_CPU, SI_ORDER_MIDDLE, idle_tun, NULL); +SYSINIT(cpu_idle_tun, SI_SUB_CPU, SI_ORDER_MIDDLE, cpu_idle_tun, NULL); static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, ___ 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: r333026 - head/sys/x86/x86
Author: kib Date: Thu Apr 26 18:24:31 2018 New Revision: 333026 URL: https://svnweb.freebsd.org/changeset/base/333026 Log: Handle Appolo Lake errata APL31. If the workaround is activated, always send IPI for wake up, not rely on the write to the monitor line. This fixes Appolo Lake machines early hang in sched_bind(), without requiring user to manually select idle method. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c == --- head/sys/x86/x86/cpu_machdep.c Thu Apr 26 18:12:40 2018 (r333025) +++ head/sys/x86/x86/cpu_machdep.c Thu Apr 26 18:24:31 2018 (r333026) @@ -575,6 +575,11 @@ out: busy, curcpu); } +static int cpu_idle_apl31_workaround; +SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RW, +&cpu_idle_apl31_workaround, 0, +"Appolo Lake APL31 MWAIT bug workaround"); + int cpu_idle_wakeup(int cpu) { @@ -586,7 +591,7 @@ cpu_idle_wakeup(int cpu) return (0); case STATE_MWAIT: atomic_store_int(state, STATE_RUNNING); - return (1); + return (cpu_idle_apl31_workaround ? 0 : 1); case STATE_RUNNING: return (1); default: @@ -689,6 +694,13 @@ cpu_idle_tun(void *unused __unused) if (TUNABLE_STR_FETCH("machdep.idle", tunvar, sizeof(tunvar))) cpu_idle_selector(tunvar); + if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_id == 0x506c9) { + /* +* Appolo Lake errata APL31. +*/ + cpu_idle_apl31_workaround = 1; + } + TUNABLE_INT_FETCH("machdep.idle_apl31", &cpu_idle_apl31_workaround); } SYSINIT(cpu_idle_tun, SI_SUB_CPU, SI_ORDER_MIDDLE, cpu_idle_tun, NULL); ___ 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: r333027 - head/sys/arm64/linux
Author: emaste Date: Thu Apr 26 18:38:59 2018 New Revision: 333027 URL: https://svnweb.freebsd.org/changeset/base/333027 Log: Add arm64 Linux syscall table This is the first step (after the recent refactoring of some common code) to supporting the Linuxulator on arm64. Reviewed by: andrew Sponsored by: Turing Robotic Industries Inc. Differential Revision:https://reviews.freebsd.org/D15187 Added: head/sys/arm64/linux/ head/sys/arm64/linux/Makefile (contents, props changed) head/sys/arm64/linux/syscalls.conf (contents, props changed) head/sys/arm64/linux/syscalls.master (contents, props changed) Added: head/sys/arm64/linux/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/Makefile Thu Apr 26 18:38:59 2018 (r333027) @@ -0,0 +1,15 @@ +# Makefile for syscall tables +# +# $FreeBSD$ + +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + +all: + @echo "make sysent only" + +sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c + +linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ + ../../kern/makesyscalls.sh syscalls.master syscalls.conf + sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Added: head/sys/arm64/linux/syscalls.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/syscalls.conf Thu Apr 26 18:38:59 2018 (r333027) @@ -0,0 +1,11 @@ +# $FreeBSD$ +sysnames="linux_syscalls.c" +sysproto="linux_proto.h" +sysproto_h=_LINUX_SYSPROTO_H_ +syshdr="linux_syscall.h" +syssw="linux_sysent.c" +sysmk="/dev/null" +syscallprefix="LINUX_SYS_" +switchname="linux_sysent" +namesname="linux_syscallnames" +systrace="linux_systrace_args.c" Added: head/sys/arm64/linux/syscalls.master == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/syscalls.masterThu Apr 26 18:38:59 2018 (r333027) @@ -0,0 +1,518 @@ + $FreeBSD$ + +; Linux ABI system call generic name/number map, based on Linux file +; include/uapi/asm-generic/unistd.h + +#include +#include +#include +#include +#include +#include + +; Isn't pretty, but there seems to be no other way to trap nosys +#definenosys linux_nosys + +0 AUE_NULLUNIMPL linux_io_setup +1 AUE_NULLUNIMPL linux_io_destroy +2 AUE_NULLUNIMPL linux_io_submit +3 AUE_NULLUNIMPL linux_io_cancel +4 AUE_NULLUNIMPL linux_io_getevents +5 AUE_NULLSTD { int linux_setxattr(void); } +6 AUE_NULLSTD { int linux_lsetxattr(void); } +7 AUE_NULLSTD { int linux_fsetxattr(void); } +8 AUE_NULLSTD { int linux_getxattr(void); } +9 AUE_NULLSTD { int linux_lgetxattr(void); } +10 AUE_NULLSTD { int linux_fgetxattr(void); } +11 AUE_NULLSTD { int linux_listxattr(void); } +12 AUE_NULLSTD { int linux_llistxattr(void); } +13 AUE_NULLSTD { int linux_flistxattr(void); } +14 AUE_NULLSTD { int linux_removexattr(void); } +15 AUE_NULLSTD { int linux_lremovexattr(void); } +16 AUE_NULLSTD { int linux_fremovexattr(void); } +17 AUE_GETCWD STD { int linux_getcwd(char *buf, \ + l_ulong bufsize); } +18 AUE_NULLSTD { int linux_lookup_dcookie(void); } +19 AUE_NULLSTD { int linux_eventfd2(l_uint initval, \ + l_int flags); } +20 AUE_NULLSTD { int linux_epoll_create1(l_int flags); } +21 AUE_NULLSTD { int linux_epoll_ctl(l_int epfd, l_int op, \ + l_int fd, struct epoll_event *event); } +22 AUE_NULLSTD { int linux_epoll_pwait(l_int epfd, \ + struct epoll_event *events, \ + l_int maxevents, l_int timeout, \ + l_sigset_t *mask, l_size_t sigsetsize); } +23 AUE_NULLUNIMPL linux_dup +24 AUE_NULLSTD { int linux_dup3(l_int oldfd, l_int newfd, \ + l_int flags); } +25 AUE_FCNTL STD { int linux_fcntl(l_uint fd, l_uint cmd, \ + l_ulong arg); } +26 AUE_NULLSTD { int linux_inotify_init1(l_int flags); } +27 AUE_NULLSTD { int linux_inotify_add_watch(void); } +28 AUE_NULLSTD { int linux_inotify_rm_watch(void); } +29 AUE_IOCTL STD { int linux_ioctl(l_uint fd, l_uint cmd, \ +
svn commit: r333028 - head/sys/arm64/linux
Author: emaste Date: Thu Apr 26 18:46:38 2018 New Revision: 333028 URL: https://svnweb.freebsd.org/changeset/base/333028 Log: arm64 linuxulator: add generated sysent files From syscalls.master in r333027 Sponsored by: Turing Robotic Industries Inc. Added: head/sys/arm64/linux/linux_proto.h (contents, props changed) head/sys/arm64/linux/linux_syscall.h (contents, props changed) head/sys/arm64/linux/linux_syscalls.c (contents, props changed) head/sys/arm64/linux/linux_sysent.c (contents, props changed) head/sys/arm64/linux/linux_systrace_args.c (contents, props changed) Added: head/sys/arm64/linux/linux_proto.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/linux_proto.h Thu Apr 26 18:46:38 2018 (r333028) @@ -0,0 +1,1553 @@ +/* + * System call prototypes. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + */ + +#ifndef _LINUX_SYSPROTO_H_ +#define_LINUX_SYSPROTO_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +struct proc; + +struct thread; + +#definePAD_(t) (sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t)) + +#if BYTE_ORDER == LITTLE_ENDIAN +#definePADL_(t)0 +#definePADR_(t)PAD_(t) +#else +#definePADL_(t)PAD_(t) +#definePADR_(t)0 +#endif + +#definenosys linux_nosys +struct linux_setxattr_args { + register_t dummy; +}; +struct linux_lsetxattr_args { + register_t dummy; +}; +struct linux_fsetxattr_args { + register_t dummy; +}; +struct linux_getxattr_args { + register_t dummy; +}; +struct linux_lgetxattr_args { + register_t dummy; +}; +struct linux_fgetxattr_args { + register_t dummy; +}; +struct linux_listxattr_args { + register_t dummy; +}; +struct linux_llistxattr_args { + register_t dummy; +}; +struct linux_flistxattr_args { + register_t dummy; +}; +struct linux_removexattr_args { + register_t dummy; +}; +struct linux_lremovexattr_args { + register_t dummy; +}; +struct linux_fremovexattr_args { + register_t dummy; +}; +struct linux_getcwd_args { + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char bufsize_l_[PADL_(l_ulong)]; l_ulong bufsize; char bufsize_r_[PADR_(l_ulong)]; +}; +struct linux_lookup_dcookie_args { + register_t dummy; +}; +struct linux_eventfd2_args { + char initval_l_[PADL_(l_uint)]; l_uint initval; char initval_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_epoll_create1_args { + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_epoll_ctl_args { + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char event_l_[PADL_(struct epoll_event *)]; struct epoll_event * event; char event_r_[PADR_(struct epoll_event *)]; +}; +struct linux_epoll_pwait_args { + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct epoll_event *)]; struct epoll_event * events; char events_r_[PADR_(struct epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; +}; +struct linux_dup3_args { + char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_fcntl_args { + char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; + char cmd_l_[PADL_(l_uint)]; l_uint cmd; char cmd_r_[PADR_(l_uint)]; + char arg_l_[PADL_(l_ulong)]; l_ulong arg; char arg_r_[PADR_(l_ulong)]; +}; +struct linux_inotify_init1_args { + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_inotify_add_watch_args { + register_t dummy; +}; +struct linux_inotify_rm_watch_args { + register_t dummy; +}; +struct linux_ioctl_args { + char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; + char cmd_l_[PADL_(l_uint)]; l_uint cmd; char cmd_r_[PADR_(l_uint)]; + char arg_l_[PADL_(uintptr_t)]; uintptr_t arg; char arg_r_[PADR_(uintptr_t)]; +}; +struct linux_ioprio_set_args { + register_t dummy; +}; +
svn commit: r333029 - head/lib/libsysdecode
Author: emaste Date: Thu Apr 26 18:54:00 2018 New Revision: 333029 URL: https://svnweb.freebsd.org/changeset/base/333029 Log: libsysdecode: support errno and syscalls for arm64 Linux Sponsored by: Turing Robotic Industries Inc. Modified: head/lib/libsysdecode/errno.c head/lib/libsysdecode/syscallnames.c head/lib/libsysdecode/sysdecode.3 Modified: head/lib/libsysdecode/errno.c == --- head/lib/libsysdecode/errno.c Thu Apr 26 18:46:38 2018 (r333028) +++ head/lib/libsysdecode/errno.c Thu Apr 26 18:54:00 2018 (r333029) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__i386__) || defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) static #include #endif @@ -130,7 +130,7 @@ sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, case SYSDECODE_ABI_FREEBSD: case SYSDECODE_ABI_FREEBSD32: return (error); -#if defined(__i386__) || defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) case SYSDECODE_ABI_LINUX: case SYSDECODE_ABI_LINUX32: { unsigned int i; @@ -166,7 +166,7 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, case SYSDECODE_ABI_FREEBSD: case SYSDECODE_ABI_FREEBSD32: return (error); -#if defined(__i386__) || defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) case SYSDECODE_ABI_LINUX: case SYSDECODE_ABI_LINUX32: if (error >= 0 && error <= ELAST) Modified: head/lib/libsysdecode/syscallnames.c == --- head/lib/libsysdecode/syscallnames.cThu Apr 26 18:46:38 2018 (r333028) +++ head/lib/libsysdecode/syscallnames.cThu Apr 26 18:54:00 2018 (r333029) @@ -49,9 +49,11 @@ static #include #endif -#if defined(__amd64__) || defined(__i386__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) static -#ifdef __amd64__ +#ifdef __aarch64__ +#include +#elif __amd64__ #include #else #include @@ -83,7 +85,7 @@ sysdecode_syscallname(enum sysdecode_abi abi, unsigned return (freebsd32_syscallnames[code]); break; #endif -#if defined(__amd64__) || defined(__i386__) +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) case SYSDECODE_ABI_LINUX: if (code < nitems(linux_syscallnames)) return (linux_syscallnames[code]); Modified: head/lib/libsysdecode/sysdecode.3 == --- head/lib/libsysdecode/sysdecode.3 Thu Apr 26 18:46:38 2018 (r333028) +++ head/lib/libsysdecode/sysdecode.3 Thu Apr 26 18:54:00 2018 (r333029) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2018 +.Dd April 26, 2018 .Dt SYSDECODE 3 .Os .Sh NAME @@ -57,7 +57,7 @@ Supported on all platforms. Supported on amd64 and powerpc64. .It Li SYSDECODE_ABI_LINUX Linux binaries of the same platform. -Supported on amd64 and i386. +Supported on amd64, i386, and arm64. .It Li SYSDECODE_ABI_LINUX32 32-bit Linux binaries. Supported on amd64. ___ 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: r333030 - in head/sys/dev/cxgbe: . tom
Author: np Date: Thu Apr 26 19:00:35 2018 New Revision: 333030 URL: https://svnweb.freebsd.org/changeset/base/333030 Log: cxgbe(4): Break up alloc_tid_tabs and move the atid routines to the base NIC driver. The atid services will be used by new features (hashfilters and inline TLS) that do not involve TOE. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hThu Apr 26 18:54:00 2018 (r333029) +++ head/sys/dev/cxgbe/adapter.hThu Apr 26 19:00:35 2018 (r333030) @@ -1164,6 +1164,11 @@ int vi_full_uninit(struct vi_info *); void vi_sysctls(struct vi_info *); void vi_tick(void *); int rw_via_memwin(struct adapter *, int, uint32_t, uint32_t *, int, int); +int alloc_atid_tab(struct tid_info *, int); +void free_atid_tab(struct tid_info *); +int alloc_atid(struct adapter *, void *); +void *lookup_atid(struct adapter *, int); +void free_atid(struct adapter *, int); #ifdef DEV_NETMAP /* t4_netmap.c */ Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Apr 26 18:54:00 2018 (r333029) +++ head/sys/dev/cxgbe/t4_main.cThu Apr 26 19:00:35 2018 (r333030) @@ -2460,6 +2460,81 @@ rw_via_memwin(struct adapter *sc, int idx, uint32_t ad return (0); } +int +alloc_atid_tab(struct tid_info *t, int flags) +{ + int i; + + MPASS(t->natids > 0); + MPASS(t->atid_tab == NULL); + + t->atid_tab = malloc(t->natids * sizeof(*t->atid_tab), M_CXGBE, + M_ZERO | flags); + if (t->atid_tab == NULL) + return (ENOMEM); + mtx_init(&t->atid_lock, "atid lock", NULL, MTX_DEF); + t->afree = t->atid_tab; + t->atids_in_use = 0; + for (i = 1; i < t->natids; i++) + t->atid_tab[i - 1].next = &t->atid_tab[i]; + t->atid_tab[t->natids - 1].next = NULL; + + return (0); +} + +void +free_atid_tab(struct tid_info *t) +{ + + KASSERT(t->atids_in_use == 0, + ("%s: %d atids still in use.", __func__, t->atids_in_use)); + + if (mtx_initialized(&t->atid_lock)) + mtx_destroy(&t->atid_lock); + free(t->atid_tab, M_CXGBE); + t->atid_tab = NULL; +} + +int +alloc_atid(struct adapter *sc, void *ctx) +{ + struct tid_info *t = &sc->tids; + int atid = -1; + + mtx_lock(&t->atid_lock); + if (t->afree) { + union aopen_entry *p = t->afree; + + atid = p - t->atid_tab; + t->afree = p->next; + p->data = ctx; + t->atids_in_use++; + } + mtx_unlock(&t->atid_lock); + return (atid); +} + +void * +lookup_atid(struct adapter *sc, int atid) +{ + struct tid_info *t = &sc->tids; + + return (t->atid_tab[atid].data); +} + +void +free_atid(struct adapter *sc, int atid) +{ + struct tid_info *t = &sc->tids; + union aopen_entry *p = &t->atid_tab[atid]; + + mtx_lock(&t->atid_lock); + p->next = t->afree; + t->afree = p; + t->atids_in_use--; + mtx_unlock(&t->atid_lock); +} + static int t4_range_cmp(const void *a, const void *b) { Modified: head/sys/dev/cxgbe/tom/t4_connect.c == --- head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 26 18:54:00 2018 (r333029) +++ head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 26 19:00:35 2018 (r333030) @@ -65,51 +65,6 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" -/* atid services */ -static int alloc_atid(struct adapter *, void *); -static void *lookup_atid(struct adapter *, int); -static void free_atid(struct adapter *, int); - -static int -alloc_atid(struct adapter *sc, void *ctx) -{ - struct tid_info *t = &sc->tids; - int atid = -1; - - mtx_lock(&t->atid_lock); - if (t->afree) { - union aopen_entry *p = t->afree; - - atid = p - t->atid_tab; - t->afree = p->next; - p->data = ctx; - t->atids_in_use++; - } - mtx_unlock(&t->atid_lock); - return (atid); -} - -static void * -lookup_atid(struct adapter *sc, int atid) -{ - struct tid_info *t = &sc->tids; - - return (t->atid_tab[atid].data); -} - -static void -free_atid(struct adapter *sc, int atid) -{ - struct tid_info *t = &sc->tids; - union aopen_entry *p = &t->atid_tab[atid]; - - mtx_lock(&t->atid_lock); - p->next = t->afree; - t->afree = p; - t->atids_in_use--; - mtx_unlock(&t->atid_lock); -} - /* * Active open succeeded. */ Modified: head/sys/dev/cxgbe/tom/t
svn commit: r333031 - in head/sys: arm/mv dts dts/arm
Author: mw Date: Thu Apr 26 19:00:48 2018 New Revision: 333031 URL: https://svnweb.freebsd.org/changeset/base/333031 Log: Update mv_gpio driver to new FreeBSD API This patch implements and exports functions described in gpio_if.m file. It also uses new gpiobus_attach_bus function instead of adding gpioc and gpiobus as children. It removes ulgy reading SoC ID and related if..else, so it depends only on data read from FDT. Submitted by: Patryk Duda Reviewed by: manu Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14756 Modified: head/sys/arm/mv/gpio.c head/sys/dts/arm/db78100.dts head/sys/dts/arm/db88f5182.dts head/sys/dts/arm/db88f5281.dts head/sys/dts/arm/db88f6281.dts head/sys/dts/arm/dockstar.dts head/sys/dts/arm/sheevaplug.dts head/sys/dts/bindings-gpio.txt Modified: head/sys/arm/mv/gpio.c == --- head/sys/arm/mv/gpio.c Thu Apr 26 19:00:35 2018(r333030) +++ head/sys/arm/mv/gpio.c Thu Apr 26 19:00:48 2018(r333031) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -58,8 +59,15 @@ __FBSDID("$FreeBSD$"); #include #include +#include "gpio_if.h" + #define GPIO_MAX_INTR_COUNT8 #define GPIO_PINS_PER_REG 32 +#define GPIO_GENERIC_CAP (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ + GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL | \ + GPIO_PIN_TRISTATE | GPIO_PIN_PULLUP | \ + GPIO_PIN_PULLDOWN | GPIO_PIN_INVIN | \ + GPIO_PIN_INVOUT) #define DEBOUNCE_CHECK_MS 1 #define DEBOUNCE_LO_HI_MS 2 @@ -67,6 +75,7 @@ __FBSDID("$FreeBSD$"); #define DEBOUNCE_CHECK_TICKS ((hz / 1000) * DEBOUNCE_CHECK_MS) struct mv_gpio_softc { + device_tsc_busdev; struct resource * mem_res; int mem_rid; struct resource * irq_res[GPIO_MAX_INTR_COUNT]; @@ -134,6 +143,19 @@ int mv_gpio_configure(device_t, uint32_t, uint32_t, ui void mv_gpio_out(device_t, uint32_t, uint8_t, uint8_t); uint8_t mv_gpio_in(device_t, uint32_t); +/* + * GPIO interface + */ +static device_t mv_gpio_get_bus(device_t); +static int mv_gpio_pin_max(device_t, int *); +static int mv_gpio_pin_getcaps(device_t, uint32_t, uint32_t *); +static int mv_gpio_pin_getflags(device_t, uint32_t, uint32_t *); +static int mv_gpio_pin_getname(device_t, uint32_t, char *); +static int mv_gpio_pin_setflags(device_t, uint32_t, uint32_t); +static int mv_gpio_pin_set(device_t, uint32_t, unsigned int); +static int mv_gpio_pin_get(device_t, uint32_t, unsigned int *); +static int mv_gpio_pin_toggle(device_t, uint32_t); + #define MV_GPIO_LOCK() mtx_lock_spin(&sc->mutex) #define MV_GPIO_UNLOCK() mtx_unlock_spin(&sc->mutex) #define MV_GPIO_ASSERT_LOCKED()mtx_assert(&sc->mutex, MA_OWNED) @@ -141,7 +163,19 @@ uint8_t mv_gpio_in(device_t, uint32_t); static device_method_t mv_gpio_methods[] = { DEVMETHOD(device_probe, mv_gpio_probe), DEVMETHOD(device_attach,mv_gpio_attach), - { 0, 0 } + + /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, mv_gpio_get_bus), + DEVMETHOD(gpio_pin_max, mv_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, mv_gpio_pin_getname), + DEVMETHOD(gpio_pin_getflags,mv_gpio_pin_getflags), + DEVMETHOD(gpio_pin_getcaps, mv_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_setflags,mv_gpio_pin_setflags), + DEVMETHOD(gpio_pin_get, mv_gpio_pin_get), + DEVMETHOD(gpio_pin_set, mv_gpio_pin_set), + DEVMETHOD(gpio_pin_toggle, mv_gpio_pin_toggle), + + DEVMETHOD_END }; static driver_t mv_gpio_driver = { @@ -152,31 +186,23 @@ static driver_t mv_gpio_driver = { static devclass_t mv_gpio_devclass; -DRIVER_MODULE(gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); +DRIVER_MODULE(mv_gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); -typedef int (*gpios_phandler_t)(device_t, phandle_t, pcell_t *, int); - -struct gpio_ctrl_entry { - const char *compat; - gpios_phandler_thandler; -}; - static int mv_handle_gpios_prop(device_t, phandle_t, pcell_t *, int); -int gpio_get_config_from_dt(void); -struct gpio_ctrl_entry gpio_controllers[] = { - { "mrvl,gpio", &mv_handle_gpios_prop }, - { NULL, NULL } +struct ofw_compat_data gpio_controllers[] = { + { "mrvl,gpio", (uintptr_t)&mv_handle_gpios_prop }, + { "marvell,orion-gpio", (uintptr_t)&mv_handle_gpios_prop }, + { NULL, 0 } }; static int mv_gpio_probe(device_t dev) { - if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "mrvl,
svn commit: r333032 - head/sys/arm/mv
Author: mw Date: Thu Apr 26 19:10:18 2018 New Revision: 333032 URL: https://svnweb.freebsd.org/changeset/base/333032 Log: Replace FDT tree parsing with gpio_map_gpios implementation in mv_gpio driver This patch replaces in-driver FDT parsing, which was needed for setting initial values on GPIO pins. Now FDT is parsed by generic kernel code, pins are set by invoking gpio_map_gpios method. Submitted by: Patryk Duda Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14757 Modified: head/sys/arm/mv/gpio.c Modified: head/sys/arm/mv/gpio.c == --- head/sys/arm/mv/gpio.c Thu Apr 26 19:00:48 2018(r333031) +++ head/sys/arm/mv/gpio.c Thu Apr 26 19:10:18 2018(r333032) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -104,7 +103,6 @@ struct mv_gpio_pindev { static int mv_gpio_probe(device_t); static int mv_gpio_attach(device_t); static int mv_gpio_intr(device_t, void *); -static int mv_gpio_init(device_t); static voidmv_gpio_double_edge_init(device_t, int); @@ -155,6 +153,8 @@ static int mv_gpio_pin_setflags(device_t, uint32_t, ui static int mv_gpio_pin_set(device_t, uint32_t, unsigned int); static int mv_gpio_pin_get(device_t, uint32_t, unsigned int *); static int mv_gpio_pin_toggle(device_t, uint32_t); +static int mv_gpio_map_gpios(device_t, phandle_t, phandle_t, +int, pcell_t *, uint32_t *, uint32_t *); #define MV_GPIO_LOCK() mtx_lock_spin(&sc->mutex) #define MV_GPIO_UNLOCK() mtx_unlock_spin(&sc->mutex) @@ -174,6 +174,7 @@ static device_method_t mv_gpio_methods[] = { DEVMETHOD(gpio_pin_get, mv_gpio_pin_get), DEVMETHOD(gpio_pin_set, mv_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, mv_gpio_pin_toggle), + DEVMETHOD(gpio_map_gpios, mv_gpio_map_gpios), DEVMETHOD_END }; @@ -188,11 +189,9 @@ static devclass_t mv_gpio_devclass; DRIVER_MODULE(mv_gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); -static int mv_handle_gpios_prop(device_t, phandle_t, pcell_t *, int); - struct ofw_compat_data gpio_controllers[] = { - { "mrvl,gpio", (uintptr_t)&mv_handle_gpios_prop }, - { "marvell,orion-gpio", (uintptr_t)&mv_handle_gpios_prop }, + { "mrvl,gpio", (uintptr_t)true }, + { "marvell,orion-gpio", (uintptr_t)true }, { NULL, 0 } }; @@ -212,7 +211,7 @@ mv_gpio_probe(device_t dev) static int mv_gpio_attach(device_t dev) { - int error, i, size; + int i, size; struct mv_gpio_softc *sc; pcell_t pincnt = 0; pcell_t irq_cells = 0; @@ -319,12 +318,6 @@ mv_gpio_attach(device_t dev) } } - error = mv_gpio_init(dev); - if (error) { - device_printf(dev, "WARNING: failed to initialize GPIO pins, " - "error = %d\n", error); - } - /* Clear interrupt status. */ bus_space_write_4(sc->bst, sc->bsh, GPIO_INT_CAUSE, 0); @@ -1037,116 +1030,11 @@ mv_gpio_value_set(device_t dev, uint32_t pin, uint8_t mv_gpio_reg_clear(dev, reg, pin); } -static int -mv_handle_gpios_prop(device_t dev, phandle_t ctrl, pcell_t *gpios, int len) -{ - pcell_t gpio_cells, pincnt; - int inc, t, tuples, tuple_size; - int flags, pin; - u_long gpio_ctrl, size; +/* + * GPIO interface methods + */ - pincnt = 0; - if (!OF_hasprop(ctrl, "gpio-controller")) - /* Node is not a GPIO controller. */ - return (ENXIO); - - if (OF_getencprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) - return (ENXIO); - if (gpio_cells != 2) - return (ENXIO); - - tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); - tuples = len / tuple_size; - - if (fdt_regsize(ctrl, &gpio_ctrl, &size)) - return (ENXIO); - - /* -* Skip controller reference, since controller's phandle is given -* explicitly (in a function argument). -*/ - inc = sizeof(ihandle_t) / sizeof(pcell_t); - gpios += inc; - - for (t = 0; t < tuples; t++) { - pin = gpios[0]; - flags = gpios[1]; - - mv_gpio_configure(dev, pin, flags, ~0); - gpios += gpio_cells + inc; - } - - return (0); -} - -#define MAX_PINS_PER_NODE 5 -#define GPIOS_PROP_CELLS 4 static int -mv_gpio_init(device_t dev) -{ - phandle_t child, parent, root, ctrl; - pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; - struct ofw_compat_data *e; - int len, rv; - - root = OF_finddevice("/"); - len = 0; - parent = root; - rv = 0; - - /* Traverse through entire tree to find nodes with 'gpios' prop */ - for (child
svn commit: r333033 - head/sys/arm/conf
Author: mw Date: Thu Apr 26 19:15:39 2018 New Revision: 333033 URL: https://svnweb.freebsd.org/changeset/base/333033 Log: Add support for gpioled on ARMADA38X based boards This patch adds support for gpio and gpioled into ARMADA38X kernel config. Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14758 Modified: head/sys/arm/conf/ARMADA38X Modified: head/sys/arm/conf/ARMADA38X == --- head/sys/arm/conf/ARMADA38X Thu Apr 26 19:10:18 2018(r333032) +++ head/sys/arm/conf/ARMADA38X Thu Apr 26 19:15:39 2018(r333033) @@ -97,3 +97,7 @@ options PLATFORM # FDT optionsFDT + +# GPIO +device gpio +device gpioled ___ 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: r333034 - head/sys/x86/x86
Author: kib Date: Thu Apr 26 19:23:19 2018 New Revision: 333034 URL: https://svnweb.freebsd.org/changeset/base/333034 Log: Fix spelling: Appolo -> Apollo [1]. The APL31 NDA errata is APL30 public errata. Add the reference and provide the description [2]. Noted by: emaste [2], rpokala [1] Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c == --- head/sys/x86/x86/cpu_machdep.c Thu Apr 26 19:15:39 2018 (r333033) +++ head/sys/x86/x86/cpu_machdep.c Thu Apr 26 19:23:19 2018 (r333034) @@ -578,7 +578,7 @@ out: static int cpu_idle_apl31_workaround; SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RW, &cpu_idle_apl31_workaround, 0, -"Appolo Lake APL31 MWAIT bug workaround"); +"Apollo Lake APL31 MWAIT bug workaround"); int cpu_idle_wakeup(int cpu) @@ -696,7 +696,11 @@ cpu_idle_tun(void *unused __unused) cpu_idle_selector(tunvar); if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_id == 0x506c9) { /* -* Appolo Lake errata APL31. +* Apollo Lake errata APL31 (public errata APL30). +* Stores to the armed address range may not trigger +* MWAIT to resume execution. OS needs to use +* interrupts to wake processors from MWAIT-induced +* sleep states. */ cpu_idle_apl31_workaround = 1; } ___ 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: r333035 - head/sys/arm/conf
Author: mw Date: Thu Apr 26 19:23:37 2018 New Revision: 333035 URL: https://svnweb.freebsd.org/changeset/base/333035 Log: Add Marvell ArmadaXP and Armada38X to GENERIC config Include source files and drivers for Marvell ArmadaXP and Armada38X in GENERIC kernel config. Submitted by: Michal Mazur Rafal Kozik Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14747 Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC == --- head/sys/arm/conf/GENERIC Thu Apr 26 19:23:19 2018(r333034) +++ head/sys/arm/conf/GENERIC Thu Apr 26 19:23:37 2018(r333035) @@ -21,6 +21,7 @@ ident GENERIC cpuCPU_CORTEXA +cpuCPU_MV_PJ4B optionsSMP_ON_UP machinearm armv7 makeoptionsCONF_CFLAGS="-march=armv7a" @@ -38,6 +39,7 @@ files "../allwinner/h3/files.h3" files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x" files "../freescale/imx/files.imx6" +files "../mv/files.arm7" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../ti/files.ti" @@ -57,6 +59,8 @@ options SOC_ALLWINNER_H3 optionsSOC_BCM2836 optionsSOC_TI_AM335X optionsSOC_OMAP4 +options SOC_MV_ARMADA38X +options SOC_MV_ARMADAXP optionsSCHED_ULE # ULE scheduler optionsSMP # Enable multiple cores @@ -185,9 +189,10 @@ device pass# Passthrough device (direct ATA/SCSI a # USB support optionsUSB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -#deviceuhci +device uhci device ohci device ehci +device xhci device dwcotg # DWC OTG controller device musb @@ -196,6 +201,8 @@ device umass # Disks/Mass storage - Requires scbus device uhid# "Human Interface Devices" device ukbd# Allow keyboard like HIDs to control console +device firmware + # Device mode support device usb_template# Control of the gadget @@ -204,6 +211,11 @@ device loop device ether device vlan# 802.1Q VLAN support device bpf +device mii +device mdio +device etherswitch +device e6000sw +device neta# Marvell Network controller # Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! @@ -243,6 +255,11 @@ device ti_sdma # Extensible Firmware Interface optionsEFI + +# Marvell Cryptographic Engine and Security Accelerator +device cesa +device crypto +device cryptodev # Flattened Device Tree optionsFDT # Configure using FDT/DTB data ___ 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: r333036 - head/sys/i386/include
Author: kib Date: Thu Apr 26 21:07:45 2018 New Revision: 333036 URL: https://svnweb.freebsd.org/changeset/base/333036 Log: Fix move of the frame to the normal stack for interrupts occuring from the vm86 mode. Submitted by: jhb Modified: head/sys/i386/include/asmacros.h Modified: head/sys/i386/include/asmacros.h == --- head/sys/i386/include/asmacros.hThu Apr 26 19:23:37 2018 (r333035) +++ head/sys/i386/include/asmacros.hThu Apr 26 21:07:45 2018 (r333036) @@ -208,7 +208,7 @@ .macro KENTER testl $PSL_VM, TF_EFLAGS(%esp) - jnz 2f + jnz 1f testb $SEL_RPL_MASK, TF_CS(%esp) jz 2f 1: MOVE_STACKS ___ 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: r333037 - in head: share/man/man4 sys/arm64/rockchip sys/conf
Author: manu Date: Thu Apr 26 21:35:04 2018 New Revision: 333037 URL: https://svnweb.freebsd.org/changeset/base/333037 Log: arm64: rockchip: Add GRF driver RockChip GRF (General Register Files) is present on almost all RockChip SoC and is used to control some area of the system like iomuxing, gpio or usb phy. We need it to be probed and attached early in the boot process so subclass syscon_generic and set the pass to BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE. Added: head/share/man/man4/rk_grf.4 (contents, props changed) head/sys/arm64/rockchip/rk_grf.c (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files.arm64 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Apr 26 21:07:45 2018 (r333036) +++ head/share/man/man4/MakefileThu Apr 26 21:35:04 2018 (r333037) @@ -444,6 +444,7 @@ MAN=aac.4 \ re.4 \ rgephy.4 \ rights.4 \ + ${_rk_grf.4} \ rl.4 \ rndtest.4 \ route.4 \ @@ -765,6 +766,7 @@ MLINKS+=xl.4 if_xl.4 .if ${MACHINE_CPUARCH} == "aarch64" _armv8crypto.4=armv8crypto.4 +_rk_grf.4= rk_grf.4 .endif .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" Added: head/share/man/man4/rk_grf.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rk_grf.4Thu Apr 26 21:35:04 2018 (r333037) @@ -0,0 +1,60 @@ +.\"- +.\" Copyright (c) 2018 Emmanuel Vadot +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Apr 26, 2018 +.Dt RK_GRF 4 +.Os +.Sh NAME +.Nm rk_grf +.Nd driver for the General Register Files controller on RockChip SoCs +.Sh SYNOPSIS +.Cd "options SOC_ROCKCHIP_rk3328" +.Sh DESCRIPTION +The +.Nm +device driver provides support for the RockChip General Register Files +system controller. +.Sh HARDWARE +The current version of the +.Nm +driver supports the GRF controller with one of the following +compatible strings : +.Pp +.Bl -bullet -compact +.It +rockchip,rk3328-grf +.El +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +device driver and manpage was written by +.An Emmanuel Vadot Aq Mt m...@freebsd.org . Added: head/sys/arm64/rockchip/rk_grf.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/rk_grf.cThu Apr 26 21:35:04 2018 (r333037) @@ -0,0 +1,81 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, I
svn commit: r333038 - in head: share/man/man4 sys/arm64/rockchip sys/conf
Author: manu Date: Thu Apr 26 21:37:38 2018 New Revision: 333038 URL: https://svnweb.freebsd.org/changeset/base/333038 Log: arm64: rockchip: Add pinctrl driver Add pinctrl driver for RockChip SoCs. This device manage which function to set on which pin and some other properties like pull up/down, drive strength etc ... For now the driver only support RK3328 but it is versatile enough to add support for other RockChip SoC in the future. Added: head/share/man/man4/rk_pinctrl.4 (contents, props changed) head/sys/arm64/rockchip/rk_pinctrl.c (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files.arm64 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Apr 26 21:35:04 2018 (r333037) +++ head/share/man/man4/MakefileThu Apr 26 21:37:38 2018 (r333038) @@ -445,6 +445,7 @@ MAN=aac.4 \ rgephy.4 \ rights.4 \ ${_rk_grf.4} \ + ${_rk_pinctrl.4} \ rl.4 \ rndtest.4 \ route.4 \ @@ -767,6 +768,7 @@ MLINKS+=xl.4 if_xl.4 .if ${MACHINE_CPUARCH} == "aarch64" _armv8crypto.4=armv8crypto.4 _rk_grf.4= rk_grf.4 +_rk_pinctrl.4= rk_pinctrl.4 .endif .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" Added: head/share/man/man4/rk_pinctrl.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rk_pinctrl.4Thu Apr 26 21:37:38 2018 (r333038) @@ -0,0 +1,62 @@ +.\"- +.\" Copyright (c) 2018 Emmanuel Vadot +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Apr 26, 2018 +.Dt RK_PINCTRL 4 +.Os +.Sh NAME +.Nm rk_pinctrl +.Nd driver for the pin multiplexing on RockChip SoCs +.Sh SYNOPSIS +.Cd "options SOC_ROCKCHIP_RK3328" +.Sh DESCRIPTION +The +.Nm +device driver provides support for the pin multiplexing device present +on RockChip SoC. +.Sh HARDWARE +The current version of the +.Nm +driver supports the pin controller with one of the following +compatible strings : +.Pp +.Bl -bullet -compact +.It +rockchip,rk3328-pinctrl +.El +.Sh SEE ALSO +.Xr fdt_pinctrl 4 , +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +device driver and manpage was written by +.An Emmanuel Vadot Aq Mt m...@freebsd.org . Added: head/sys/arm64/rockchip/rk_pinctrl.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/rk_pinctrl.cThu Apr 26 21:37:38 2018 (r333038) @@ -0,0 +1,475 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHA
svn commit: r333039 - head/sys/arm64/rockchip/clk
Author: manu Date: Thu Apr 26 21:38:59 2018 New Revision: 333039 URL: https://svnweb.freebsd.org/changeset/base/333039 Log: arm64: rockchip: Rk3328 CRU Fix some offset for gates Some offset of some clock gates where wrong, correct them so we can use thoses clocks. Pointy Hat to:me Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c == --- head/sys/arm64/rockchip/clk/rk3328_cru.cThu Apr 26 21:37:38 2018 (r333038) +++ head/sys/arm64/rockchip/clk/rk3328_cru.cThu Apr 26 21:38:59 2018 (r333039) @@ -175,7 +175,7 @@ static struct rk_clk_composite_def aclk_bus_pre = { .div_shift = 8, .div_width = 5, - .gate_offset = 0x232, + .gate_offset = 0x220, .gate_shift = 0, .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, @@ -199,7 +199,7 @@ static struct rk_clk_composite_def hclk_bus_pre = { .div_shift = 8, .div_width = 2, - .gate_offset = 0x232, + .gate_offset = 0x220, .gate_shift = 1, .flags = RK_CLK_COMPOSITE_HAVE_GATE, @@ -218,7 +218,7 @@ static struct rk_clk_composite_def pclk_bus_pre = { .div_shift = 12, .div_width = 3, - .gate_offset = 0x232, + .gate_offset = 0x220, .gate_shift = 2, .flags = RK_CLK_COMPOSITE_HAVE_GATE, ___ 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: r333040 - head/sys/arm64/rockchip/clk
Author: manu Date: Thu Apr 26 21:40:05 2018 New Revision: 333040 URL: https://svnweb.freebsd.org/changeset/base/333040 Log: arm64: rockchip: RK3328 CRU Add gpio gates Add the gates for the gpio controller in order to properly support them. Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c == --- head/sys/arm64/rockchip/clk/rk3328_cru.cThu Apr 26 21:38:59 2018 (r333039) +++ head/sys/arm64/rockchip/clk/rk3328_cru.cThu Apr 26 21:40:05 2018 (r333040) @@ -52,11 +52,15 @@ __FBSDID("$FreeBSD$"); /* GATES */ -#define ACLK_PERI 153 -#define HCLK_SDMMC 317 -#define HCLK_SDIO 318 -#define HCLK_EMMC 319 -#define HCLK_SDMMC_EXT 320 +#defineACLK_PERI 153 +#definePCLK_GPIO0 200 +#definePCLK_GPIO1 201 +#definePCLK_GPIO2 202 +#definePCLK_GPIO3 203 +#defineHCLK_SDMMC 317 +#defineHCLK_SDIO 318 +#defineHCLK_EMMC 319 +#defineHCLK_SDMMC_EXT 320 static struct rk_cru_gate rk3328_gates[] = { /* CRU_CLKGATE_CON0 */ @@ -75,6 +79,12 @@ static struct rk_cru_gate rk3328_gates[] = { /* CRU_CLKGATE_CON10 */ CRU_GATE(ACLK_PERI, "aclk_peri", "aclk_peri_pre", 0x228, 0) + + /* CRU_CLKGATE_CON16 */ + CRU_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 0x240, 7) + CRU_GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 0x240, 8) + CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9) + CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_bus", 0x240, 10) /* CRU_CLKGATE_CON19 */ CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 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: r333041 - head/sys/netinet
Author: rrs Date: Thu Apr 26 21:41:16 2018 New Revision: 333041 URL: https://svnweb.freebsd.org/changeset/base/333041 Log: This change re-arranges the fields within the tcp-pcb so that they are more in order of cache line use as one passes through the tcp_input/output paths (non-errors most likely path). This helps speed up cache line optimization so that the tcp stack runs a bit more efficently. Sponsored by: Netflix Inc. Differential Revision:https://reviews.freebsd.org/D15136 Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Thu Apr 26 21:40:05 2018(r333040) +++ head/sys/netinet/tcp_var.h Thu Apr 26 21:41:16 2018(r333041) @@ -83,125 +83,123 @@ STAILQ_HEAD(tcp_log_stailq, tcp_log_mem); /* * Tcp control block, one per tcp; fields: - * Organized for 16 byte cacheline efficiency. + * Organized for 64 byte cacheline efficiency based + * on common tcp_input/tcp_output processing. */ struct tcpcb { - struct tsegqe_head t_segq; /* segment reassembly queue */ - int t_segqlen; /* segment reassembly queue length */ - int t_dupacks; /* consecutive dup acks recd */ - - struct mbuf *t_in_pkt; /* head of the input packet queue for the tcp_hpts system */ - struct mbuf *t_tail_pkt; /* tail of the input packet queue for the tcp_hpts system */ - struct tcp_timer *t_timers; /* All the TCP timers in one struct */ - + /* Cache line 1 */ struct inpcb *t_inpcb; /* back pointer to internet pcb */ - int t_state;/* state of this connection */ + struct tcp_function_block *t_fb;/* TCP function call block */ + void*t_fb_ptr; /* Pointer to t_fb specific data */ + uint32_t t_maxseg:24, /* maximum segment size */ + t_logstate:8; /* State of "black box" logging */ + uint32_t t_state:4, /* state of this connection */ + bits_spare : 24; u_int t_flags; - - struct vnet *t_vnet; /* back pointer to parent vnet */ - tcp_seq snd_una;/* sent but unacknowledged */ tcp_seq snd_max;/* highest sequence number sent; * used to recognize retransmits */ tcp_seq snd_nxt;/* send next */ tcp_seq snd_up; /* send urgent pointer */ - - tcp_seq snd_wl1;/* window update seg seq number */ - tcp_seq snd_wl2;/* window update seg ack number */ - tcp_seq iss;/* initial send sequence number */ - tcp_seq irs;/* initial receive sequence number */ - + uint32_t snd_wnd; /* send window */ + uint32_t snd_cwnd; /* congestion-controlled window */ + uint32_t cl1_spare; /* Spare to round out CL 1 */ + /* Cache line 2 */ + u_int32_t ts_offset; /* our timestamp offset */ + u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ + int rcv_numsacks; /* # distinct sack blks present */ + u_int t_tsomax; /* TSO total burst length limit in bytes */ + u_int t_tsomaxsegcount; /* TSO maximum segment count */ + u_int t_tsomaxsegsize;/* TSO maximum segment size in bytes */ tcp_seq rcv_nxt;/* receive next */ tcp_seq rcv_adv;/* advertised window */ uint32_t rcv_wnd; /* receive window */ + u_int t_flags2; /* More tcpcb flags storage */ + int t_srtt; /* smoothed round-trip time */ + int t_rttvar; /* variance in round-trip time */ + u_int32_t ts_recent; /* timestamp echo data */ + u_char snd_scale; /* window scaling for send window */ + u_char rcv_scale; /* window scaling for recv window */ + u_char snd_limited;/* segments limited transmitted */ + u_char request_r_scale;/* pending window scaling */ + tcp_seq last_ack_sent; + u_int t_rcvtime; /* inactivity time */ + /* Cache line 3 */ tcp_seq rcv_up; /* receive urgent pointer */ - - uint32_t snd_wnd; /* send window */ - uint32_t snd_cwnd; /* congestion-controlled window */ + int t_segqlen; /* segment reassembly queue length */ + struct tsegqe_head t_segq; /* segment reassembly queue */ + struct mbuf *t_in_pkt; + struct mbuf *t_tail_pkt; + struct tcp_timer *t_timers;
svn commit: r333042 - in head: share/man/man4 sys/arm64/rockchip sys/conf
Author: manu Date: Thu Apr 26 21:44:00 2018 New Revision: 333042 URL: https://svnweb.freebsd.org/changeset/base/333042 Log: arm64: rockchip: Add gpio controller driver Add a driver that match on 'rockchip,gpio-bank', this compatible string is found on almost all RockChip SoC so this driver is compatible with almost all of the RockChip SoCs. The only features missing for this driver are : - Interrupts support - Debouncing Added: head/share/man/man4/rk_gpio.4 (contents, props changed) head/sys/arm64/rockchip/rk_gpio.c (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files.arm64 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Apr 26 21:41:16 2018 (r333041) +++ head/share/man/man4/MakefileThu Apr 26 21:44:00 2018 (r333042) @@ -444,6 +444,7 @@ MAN=aac.4 \ re.4 \ rgephy.4 \ rights.4 \ + ${_rk_gpio.4} \ ${_rk_grf.4} \ ${_rk_pinctrl.4} \ rl.4 \ @@ -767,6 +768,7 @@ MLINKS+=xl.4 if_xl.4 .if ${MACHINE_CPUARCH} == "aarch64" _armv8crypto.4=armv8crypto.4 +_rk_gpio.4=rk_gpio.4 _rk_grf.4= rk_grf.4 _rk_pinctrl.4= rk_pinctrl.4 .endif Added: head/share/man/man4/rk_gpio.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rk_gpio.4 Thu Apr 26 21:44:00 2018 (r333042) @@ -0,0 +1,63 @@ +.\"- +.\" Copyright (c) 2018 Emmanuel Vadot +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Apr 26, 2018 +.Dt RK_GPIO 4 +.Os +.Sh NAME +.Nm rk_gpio +.Nd driver for the gpio controller on RockChip SoCs +.Sh SYNOPSIS +.Cd "options SOC_ROCKCHIP_RK3328" +.Sh DESCRIPTION +The +.Nm +device driver provides support for the gpio controller device present +on RockChip SoC. +.Sh HARDWARE +The current version of the +.Nm +driver supports the gpio banks with one of the following +compatible strings : +.Pp +.Bl -bullet -compact +.It +rockchip,gpio-bank +.El +.Sh SEE ALSO +.Xr gpiobus 4 , +.Xr gpioctl 8 , +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +device driver and manpage was written by +.An Emmanuel Vadot Aq Mt m...@freebsd.org . Added: head/sys/arm64/rockchip/rk_gpio.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/rk_gpio.c Thu Apr 26 21:44:00 2018 (r333042) @@ -0,0 +1,426 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCI
svn commit: r333043 - in head/sys/dev/cxgbe: . tom
Author: np Date: Thu Apr 26 22:04:21 2018 New Revision: 333043 URL: https://svnweb.freebsd.org/changeset/base/333043 Log: cxgbe(4): Move release_tid to the base NIC driver for future consumers. Sponsored by: Chelsio Communications. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hThu Apr 26 21:44:00 2018 (r333042) +++ head/sys/dev/cxgbe/adapter.hThu Apr 26 22:04:21 2018 (r333043) @@ -1169,6 +1169,7 @@ void free_atid_tab(struct tid_info *); int alloc_atid(struct adapter *, void *); void *lookup_atid(struct adapter *, int); void free_atid(struct adapter *, int); +void release_tid(struct adapter *, int, struct sge_wrq *); #ifdef DEV_NETMAP /* t4_netmap.c */ Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Apr 26 21:44:00 2018 (r333042) +++ head/sys/dev/cxgbe/t4_main.cThu Apr 26 22:04:21 2018 (r333043) @@ -2535,6 +2535,31 @@ free_atid(struct adapter *sc, int atid) mtx_unlock(&t->atid_lock); } +static void +queue_tid_release(struct adapter *sc, int tid) +{ + + CXGBE_UNIMPLEMENTED("deferred tid release"); +} + +void +release_tid(struct adapter *sc, int tid, struct sge_wrq *ctrlq) +{ + struct wrqe *wr; + struct cpl_tid_release *req; + + wr = alloc_wrqe(sizeof(*req), ctrlq); + if (wr == NULL) { + queue_tid_release(sc, tid); /* defer */ + return; + } + req = wrtod(wr); + + INIT_TP_WR_MIT_CPL(req, CPL_TID_RELEASE, tid); + + t4_wrq_tx(sc, wr); +} + static int t4_range_cmp(const void *a, const void *b) { Modified: head/sys/dev/cxgbe/tom/t4_tom.c == --- head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 26 21:44:00 2018 (r333042) +++ head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 26 22:04:21 2018 (r333043) @@ -96,7 +96,6 @@ static struct uld_info tom_uld_info = { .deactivate = t4_tom_deactivate, }; -static void queue_tid_release(struct adapter *, int); static void release_offload_resources(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); @@ -539,31 +538,6 @@ remove_tid(struct adapter *sc, int tid, int ntids) t->tid_tab[tid] = NULL; atomic_subtract_int(&t->tids_in_use, ntids); -} - -void -release_tid(struct adapter *sc, int tid, struct sge_wrq *ctrlq) -{ - struct wrqe *wr; - struct cpl_tid_release *req; - - wr = alloc_wrqe(sizeof(*req), ctrlq); - if (wr == NULL) { - queue_tid_release(sc, tid); /* defer */ - return; - } - req = wrtod(wr); - - INIT_TP_WR_MIT_CPL(req, CPL_TID_RELEASE, tid); - - t4_wrq_tx(sc, wr); -} - -static void -queue_tid_release(struct adapter *sc, int tid) -{ - - CXGBE_UNIMPLEMENTED("deferred tid release"); } /* Modified: head/sys/dev/cxgbe/tom/t4_tom.h == --- head/sys/dev/cxgbe/tom/t4_tom.h Thu Apr 26 21:44:00 2018 (r333042) +++ head/sys/dev/cxgbe/tom/t4_tom.h Thu Apr 26 22:04:21 2018 (r333043) @@ -333,7 +333,6 @@ void insert_tid(struct adapter *, int, void *, int); void *lookup_tid(struct adapter *, int); void update_tid(struct adapter *, int, void *); void remove_tid(struct adapter *, int, int); -void release_tid(struct adapter *, int, struct sge_wrq *); int find_best_mtu_idx(struct adapter *, struct in_conninfo *, struct offload_settings *); u_long select_rcv_wnd(struct socket *); ___ 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: r333045 - head/sys/arm64/rockchip
Author: manu Date: Thu Apr 26 22:15:09 2018 New Revision: 333045 URL: https://svnweb.freebsd.org/changeset/base/333045 Log: arm64: rockchip: rk_gpio fix rk_gpio_pin_config32 Pointy Hat to: me Modified: head/sys/arm64/rockchip/rk_gpio.c Modified: head/sys/arm64/rockchip/rk_gpio.c == --- head/sys/arm64/rockchip/rk_gpio.c Thu Apr 26 22:15:06 2018 (r333044) +++ head/sys/arm64/rockchip/rk_gpio.c Thu Apr 26 22:15:09 2018 (r333045) @@ -352,9 +352,12 @@ static int rk_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins, uint32_t *pin_flags) { - uint32_t reg, set, mask, flask; + struct rk_gpio_softc *sc; + uint32_t reg, set, mask, flags; int i; + sc = device_get_softc(dev); + if (first_pin != 0 || num_pins > 32) return (EINVAL); @@ -374,7 +377,7 @@ rk_gpio_pin_config_32(device_t dev, uint32_t first_pin reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR); reg &= ~mask; reg |= set; - RK_GPIO_WRITE(sc, RK_GPIO_SWPORTA_DDR); + RK_GPIO_WRITE(sc, RK_GPIO_SWPORTA_DDR, reg); RK_GPIO_UNLOCK(sc); 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: r333046 - in head/sys: amd64/conf conf
Author: sbruno Date: Thu Apr 26 22:43:25 2018 New Revision: 333046 URL: https://svnweb.freebsd.org/changeset/base/333046 Log: move smartpqi(4) controller out of NOTES and into sys/amd64/NOTES to appease LINT Submitted by: rpokala Reported by: npn Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Thu Apr 26 22:15:09 2018(r333045) +++ head/sys/amd64/conf/NOTES Thu Apr 26 22:43:25 2018(r333046) @@ -415,6 +415,13 @@ device ntb_hw_plx # PLX NTB hardware driver device arcmsr # Areca SATA II RAID # +# Microsemi smartpqi controllers. +# These controllers have a SCSI-like interface, and require the +# CAM infrastructure. +# +device smartpqi + +# # 3ware 9000 series PATA/SATA RAID controller driver and options. # The driver is implemented as a SIM, and so, needs the CAM infrastructure. # Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Apr 26 22:15:09 2018(r333045) +++ head/sys/conf/NOTES Thu Apr 26 22:43:25 2018(r333046) @@ -1717,13 +1717,6 @@ options MFI_DEBUG device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s # -# Microsemi smartpqi controllers. -# These controllers have a SCSI-like interface, and require the -# CAM infrastructure. -# -device smartpqi - -# # 3ware ATA RAID # device twe # 3ware ATA RAID ___ 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: r333047 - in head/sys: dev/extres/clk kern sys
Author: manu Date: Fri Apr 27 00:12:00 2018 New Revision: 333047 URL: https://svnweb.freebsd.org/changeset/base/333047 Log: clk: Put the sysctls under hw.clock instead of clock This is more consistant with hw.regulator and other hardware related sysctls. Modified: head/sys/dev/extres/clk/clk.c head/sys/kern/kern_mib.c head/sys/sys/sysctl.h Modified: head/sys/dev/extres/clk/clk.c == --- head/sys/dev/extres/clk/clk.c Thu Apr 26 22:43:25 2018 (r333046) +++ head/sys/dev/extres/clk/clk.c Fri Apr 27 00:12:00 2018 (r333047) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #endif #include +SYSCTL_NODE(_hw, OID_AUTO, clock, CTLFLAG_RD, NULL, "Clocks"); + MALLOC_DEFINE(M_CLOCK, "clocks", "Clock framework"); /* Forward declarations. */ @@ -570,7 +572,7 @@ clknode_create(struct clkdom * clkdom, clknode_class_t sysctl_ctx_init(&clknode->sysctl_ctx); clknode_oid = SYSCTL_ADD_NODE(&clknode->sysctl_ctx, - SYSCTL_STATIC_CHILDREN(_clock), + SYSCTL_STATIC_CHILDREN(_hw_clock), OID_AUTO, clknode->name, CTLFLAG_RD, 0, "A clock node"); Modified: head/sys/kern/kern_mib.c == --- head/sys/kern/kern_mib.cThu Apr 26 22:43:25 2018(r333046) +++ head/sys/kern/kern_mib.cFri Apr 27 00:12:00 2018(r333047) @@ -90,11 +90,6 @@ SYSCTL_ROOT_NODE(OID_AUTO, regression, CTLFLAG_RW, 0, "Regression test MIB"); #endif -#ifdef EXT_RESOURCES -SYSCTL_ROOT_NODE(OID_AUTO, clock, CTLFLAG_RW, 0, - "Clocks"); -#endif - SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE, kern_ident, 0, "Kernel identifier"); Modified: head/sys/sys/sysctl.h == --- head/sys/sys/sysctl.h Thu Apr 26 22:43:25 2018(r333046) +++ head/sys/sys/sysctl.h Fri Apr 27 00:12:00 2018(r333047) @@ -1009,9 +1009,6 @@ SYSCTL_DECL(_compat); SYSCTL_DECL(_regression); SYSCTL_DECL(_security); SYSCTL_DECL(_security_bsd); -#ifdef EXT_RESOURCES -SYSCTL_DECL(_clock); -#endif extern charmachine[]; extern charosrelease[]; ___ 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: r333035 - head/sys/arm/conf
Hi Marcin, On Thu, 26 Apr 2018 19:23:38 + (UTC) Marcin Wojtas wrote: > Author: mw > Date: Thu Apr 26 19:23:37 2018 > New Revision: 333035 > URL: https://svnweb.freebsd.org/changeset/base/333035 > > Log: > Add Marvell ArmadaXP and Armada38X to GENERIC config > > Include source files and drivers for Marvell ArmadaXP and Armada38X > in GENERIC kernel config. > > Submitted by: Michal Mazur > Rafal Kozik > Obtained from: Semihalf > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D14747 > > Modified: > head/sys/arm/conf/GENERIC This break GENERIC when running on !marvell. The code in sys/arm/mv/mv_common.c tries to read a register in a memory region that doesn't exist in !marvell (in soc_id). Could you revert this commit please. Thanks, -- Emmanuel Vadot ___ 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: r333050 - head/sys/arm/conf
Author: mw Date: Fri Apr 27 05:32:09 2018 New Revision: 333050 URL: https://svnweb.freebsd.org/changeset/base/333050 Log: Revert r333035 due broken booting on !Marvell GENERIC platforms Reported by: manu Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC == --- head/sys/arm/conf/GENERIC Fri Apr 27 02:39:36 2018(r333049) +++ head/sys/arm/conf/GENERIC Fri Apr 27 05:32:09 2018(r333050) @@ -21,7 +21,6 @@ ident GENERIC cpuCPU_CORTEXA -cpuCPU_MV_PJ4B optionsSMP_ON_UP machinearm armv7 makeoptionsCONF_CFLAGS="-march=armv7a" @@ -39,7 +38,6 @@ files "../allwinner/h3/files.h3" files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x" files "../freescale/imx/files.imx6" -files "../mv/files.arm7" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../ti/files.ti" @@ -59,8 +57,6 @@ options SOC_ALLWINNER_H3 optionsSOC_BCM2836 optionsSOC_TI_AM335X optionsSOC_OMAP4 -options SOC_MV_ARMADA38X -options SOC_MV_ARMADAXP optionsSCHED_ULE # ULE scheduler optionsSMP # Enable multiple cores @@ -189,10 +185,9 @@ device pass# Passthrough device (direct ATA/SCSI a # USB support optionsUSB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -device uhci +#deviceuhci device ohci device ehci -device xhci device dwcotg # DWC OTG controller device musb @@ -201,8 +196,6 @@ device umass # Disks/Mass storage - Requires scbus device uhid# "Human Interface Devices" device ukbd# Allow keyboard like HIDs to control console -device firmware - # Device mode support device usb_template# Control of the gadget @@ -211,11 +204,6 @@ device loop device ether device vlan# 802.1Q VLAN support device bpf -device mii -device mdio -device etherswitch -device e6000sw -device neta# Marvell Network controller # Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! @@ -255,11 +243,6 @@ device ti_sdma # Extensible Firmware Interface optionsEFI - -# Marvell Cryptographic Engine and Security Accelerator -device cesa -device crypto -device cryptodev # Flattened Device Tree optionsFDT # Configure using FDT/DTB data ___ 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: r333051 - in head/sys: sys vm
Author: mjg Date: Fri Apr 27 05:36:02 2018 New Revision: 333051 URL: https://svnweb.freebsd.org/changeset/base/333051 Log: vm: move vm_cnt to __read_mostly now that it is not written to While here whack unused locking keys for the struct. Discussed with: jeff Modified: head/sys/sys/vmmeter.h head/sys/vm/vm_meter.c Modified: head/sys/sys/vmmeter.h == --- head/sys/sys/vmmeter.h Fri Apr 27 05:32:09 2018(r333050) +++ head/sys/sys/vmmeter.h Fri Apr 27 05:36:02 2018(r333051) @@ -73,11 +73,8 @@ struct vmtotal { /* * System wide statistics counters. * Locking: - * a - locked by atomic operations * c - constant after initialization - * f - locked by vm_page_queue_free_mtx * p - uses counter(9) - * q - changes are synchronized by the corresponding vm_pagequeue lock */ struct vmmeter { /* Modified: head/sys/vm/vm_meter.c == --- head/sys/vm/vm_meter.c Fri Apr 27 05:32:09 2018(r333050) +++ head/sys/vm/vm_meter.c Fri Apr 27 05:36:02 2018(r333051) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include -struct vmmeter __exclusive_cache_line vm_cnt = { +struct vmmeter __read_mostly vm_cnt = { .v_swtch = EARLY_COUNTER, .v_trap = EARLY_COUNTER, .v_syscall = EARLY_COUNTER, ___ 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: r333052 - head/sys/vm
Author: mjg Date: Fri Apr 27 05:37:35 2018 New Revision: 333052 URL: https://svnweb.freebsd.org/changeset/base/333052 Log: uma: whack main zone counter update in the slow path Cached counters are typically zero at this point so it performs avoidable atomics. Everything reading them also reads the cached ones, thus there is really no point. Reviewed by: jeff Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Fri Apr 27 05:36:02 2018(r333051) +++ head/sys/vm/uma_core.c Fri Apr 27 05:37:35 2018(r333052) @@ -2329,14 +2329,6 @@ zalloc_start: cpu = curcpu; cache = &zone->uz_cpu[cpu]; - /* -* Since we have locked the zone we may as well send back our stats. -*/ - atomic_add_long(&zone->uz_allocs, cache->uc_allocs); - atomic_add_long(&zone->uz_frees, cache->uc_frees); - cache->uc_allocs = 0; - cache->uc_frees = 0; - /* See if we lost the race to fill the cache. */ if (cache->uc_allocbucket != NULL) { ZONE_UNLOCK(zone); ___ 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"