svn commit: r250095 - head/sbin/dumpon
Author: joel (doc committer) Date: Tue Apr 30 07:22:03 2013 New Revision: 250095 URL: http://svnweb.freebsd.org/changeset/base/250095 Log: Adapt to the fact that minidumps are now on by default. PR: 177188 Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 == --- head/sbin/dumpon/dumpon.8 Tue Apr 30 06:41:42 2013(r250094) +++ head/sbin/dumpon/dumpon.8 Tue Apr 30 07:22:03 2013(r250095) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 12, 1995 +.Dd April 29, 2013 .Dt DUMPON 8 .Os .Sh NAME @@ -59,14 +59,21 @@ controlled by the variable in the boot time configuration file .Pa /etc/rc.conf . .Pp -For most systems the size of the specified dump device must be at +The default type of kernel crash dump is the mini crash dump. +Mini crash dumps hold only memory pages in use by the kernel. +Alternatively, full memory dumps can be enabled by setting the +.Va debug.minidump +.Xr sysctl 8 +variable to 0. +.Pp +For systems using full memory dumps, the size of the specified dump +device must be at least the size of physical memory. Even though an additional 64 kB header is added to the dump, the BIOS for a platform typically holds back some memory, so it is not usually necessary to size the dump device larger than the actual amount of RAM available in the machine. -.Pp -The +Also, when using full memory dumps, the .Nm utility will refuse to enable a dump device which is smaller than the total amount of physical memory as reported by the ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250096 - head/sys/dev/hwpmc
Author: davide Date: Tue Apr 30 08:18:08 2013 New Revision: 250096 URL: http://svnweb.freebsd.org/changeset/base/250096 Log: Fixup Westmere hwpmc(4) support: add missing CPU flag so that intrucion-retired, llc-misses and llc-reference events can now be allocated. Reviewed by: jimharris, gnn Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Tue Apr 30 07:22:03 2013 (r250095) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Apr 30 08:18:08 2013 (r250096) @@ -860,9 +860,9 @@ static struct iap_event_descr iap_events IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -1359,7 +1359,7 @@ static struct iap_event_descr iap_events IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250097 - head/sys/dev/hwpmc
Author: davide Date: Tue Apr 30 08:33:38 2013 New Revision: 250097 URL: http://svnweb.freebsd.org/changeset/base/250097 Log: When hwpmc(4) module is unloaded it reports a double leakage. This happens at least if FreeBSD is ran under VirtualBox. In order to avoid the leakage, properly deallocate structures in case CPU claims that hw performance monitoring counters are not supported. Reported by: hiren Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c == --- head/sys/dev/hwpmc/hwpmc_intel.cTue Apr 30 08:18:08 2013 (r250096) +++ head/sys/dev/hwpmc/hwpmc_intel.cTue Apr 30 08:33:38 2013 (r250097) @@ -87,7 +87,7 @@ pmc_intel_initialize(void) cputype = -1; nclasses = 2; - + error = 0; model = ((cpu_id & 0xF) >> 12) | ((cpu_id & 0xF0) >> 4); switch (cpu_id & 0xF00) { @@ -192,10 +192,6 @@ pmc_intel_initialize(void) ncpus = pmc_cpu_max(); - error = pmc_tsc_initialize(pmc_mdep, ncpus); - if (error) - goto error; - switch (cputype) { #ifdefined(__i386__) || defined(__amd64__) /* @@ -271,10 +267,10 @@ pmc_intel_initialize(void) break; } #endif - + error = pmc_tsc_initialize(pmc_mdep, ncpus); error: if (error) { - free(pmc_mdep, M_PMC); + pmc_mdep_free(pmc_mdep); pmc_mdep = NULL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r250079 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ntb sys/dev/ntb/if_ntb sys/dev/ntb/ntb_hw sys/modules sys/modules/ntb sys/modules/ntb/if_ntb sys/modules/ntb/ntb_hw
On Mon, Apr 29, 2013 at 10:48:53PM +, Carl Delsey wrote: > Author: carl > Date: Mon Apr 29 22:48:53 2013 > New Revision: 250079 > URL: http://svnweb.freebsd.org/changeset/base/250079 > > Log: > Add a new driver to support the Intel Non-Transparent Bridge(NTB). > Hi Carl, This change breaks installworld. /usr/share/man/man4/nve.4.gz -> /usr/share/man/man4/ntb_hw.4.gz install: link /usr/share/man/man4/ntb_hw.4.gz -> /usr/share/man/man4/nve.4.gz: No such file or directory *** [_maninstall] Error code 71 I think the following patch does what you intended? Index: share/man/man4/Makefile === --- share/man/man4/Makefile (revision 250097) +++ share/man/man4/Makefile (working copy) @@ -648,7 +648,8 @@ netintro.4 networking.4 MLINKS+=${_nfe.4} ${_if_nfe.4} MLINKS+=nge.4 if_nge.4 -MLINKS+=${_ntb.4} ${_if_ntb.4} ${_ntb_hw.4} +MLINKS+=${_ntb.4} ${_if_ntb.4} \ + ${_ntb.4} ${_ntb_hw.4} MLINKS+=${_nve.4} ${_if_nve.4} MLINKS+=${_nxge.4} ${_if_nxge.4} MLINKS+=patm.4 if_patm.4 With this installworld finished as expected. Florian pgpvPGrTMD8jY.pgp Description: PGP signature
svn commit: r250099 - head/tools/tools/netmap
Author: luigi Date: Tue Apr 30 13:13:32 2013 New Revision: 250099 URL: http://svnweb.freebsd.org/changeset/base/250099 Log: sync with my local copy (this file may go away, eventually) Modified: head/tools/tools/netmap/README Modified: head/tools/tools/netmap/README == --- head/tools/tools/netmap/README Tue Apr 30 10:05:47 2013 (r250098) +++ head/tools/tools/netmap/README Tue Apr 30 13:13:32 2013 (r250099) @@ -21,3 +21,4 @@ BSD netmap 0.77 3.82 ports/trafshow (version 5) 0.94 7.7net-mgmt/ipcad (ip accounting daemon) 0.95.0net-mgmt/darkstat (ip accounting + graphing) + 0.83 2.45 net-mgmt/iftop (curses traffic display) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250100 - in head/release/picobsd/floppy.tree/etc: . ssh
Author: luigi Date: Tue Apr 30 13:20:11 2013 New Revision: 250100 URL: http://svnweb.freebsd.org/changeset/base/250100 Log: support for sshd (newer config file location) Added: head/release/picobsd/floppy.tree/etc/ssh/ head/release/picobsd/floppy.tree/etc/ssh/sshd_config - copied unchanged from r243964, head/release/picobsd/floppy.tree/etc/sshd_config Deleted: head/release/picobsd/floppy.tree/etc/sshd_config Modified: head/release/picobsd/floppy.tree/etc/master.passwd Modified: head/release/picobsd/floppy.tree/etc/master.passwd == --- head/release/picobsd/floppy.tree/etc/master.passwd Tue Apr 30 13:13:32 2013(r250099) +++ head/release/picobsd/floppy.tree/etc/master.passwd Tue Apr 30 13:20:11 2013(r250100) @@ -5,6 +5,7 @@ daemon:*:1:1::0:0:Owner of many system p operator:*:2:20::0:0:System &:/usr/guest/operator:/bin/csh bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/nonexistent tty:*:4:65533::0:0:Tty Sandbox:/:/nonexistent +sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/nonexistent _dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin user:*:1002:1002:Sample User:0:0:user:/home/user:/bin/sh Copied: head/release/picobsd/floppy.tree/etc/ssh/sshd_config (from r243964, head/release/picobsd/floppy.tree/etc/sshd_config) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/picobsd/floppy.tree/etc/ssh/sshd_configTue Apr 30 13:20:11 2013(r250100, copy of r243964, head/release/picobsd/floppy.tree/etc/sshd_config) @@ -0,0 +1,29 @@ +Port 22 +ListenAddress 0.0.0.0 +HostKey /etc/ssh_host_key +RandomSeed /etc/ssh_random_seed +ServerKeyBits 768 +LoginGraceTime 600 +KeyRegenerationInterval 3600 +PermitRootLogin yes +IgnoreRhosts no +StrictModes yes +QuietMode no +X11Forwarding no +X11DisplayOffset 10 +FascistLogging no +PrintMotd yes +KeepAlive yes +SyslogFacility AUTH +RhostsAuthentication no +RhostsRSAAuthentication yes +RSAAuthentication yes +PasswordAuthentication no +PermitEmptyPasswords no +UseLogin no +# CheckMail no +# PidFile /u/zappa/.ssh/pid +# AllowHosts *.our.com friend.other.com +# DenyHosts lowsecurity.theirs.com *.evil.org evil.org +# Umask 022 +# SilentDeny yes ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250101 - head/sys/dev/hwpmc
Author: davide Date: Tue Apr 30 14:56:41 2013 New Revision: 250101 URL: http://svnweb.freebsd.org/changeset/base/250101 Log: Complete r250097: Do not change the initialization order in pmc_intel_initialize(). Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c == --- head/sys/dev/hwpmc/hwpmc_intel.cTue Apr 30 13:20:11 2013 (r250100) +++ head/sys/dev/hwpmc/hwpmc_intel.cTue Apr 30 14:56:41 2013 (r250101) @@ -191,7 +191,9 @@ pmc_intel_initialize(void) pmc_mdep->pmd_switch_out = intel_switch_out; ncpus = pmc_cpu_max(); - + error = pmc_tsc_initialize(pmc_mdep, ncpus); + if (error) + goto error; switch (cputype) { #ifdefined(__i386__) || defined(__amd64__) /* @@ -246,8 +248,10 @@ pmc_intel_initialize(void) KASSERT(0, ("[intel,%d] Unknown CPU type", __LINE__)); } - if (error) + if (error) { + pmc_tsc_finalize(pmc_mdep); goto error; + } /* * Init the uncore class. @@ -267,7 +271,6 @@ pmc_intel_initialize(void) break; } #endif - error = pmc_tsc_initialize(pmc_mdep, ncpus); error: if (error) { pmc_mdep_free(pmc_mdep); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250102 - head/sys/kern
Author: jilles Date: Tue Apr 30 15:06:30 2013 New Revision: 250102 URL: http://svnweb.freebsd.org/changeset/base/250102 Log: socket: Make shutdown() wake up a blocked accept(). A blocking accept (and some other operations) waits on &so->so_timeo. Once it wakes up, it will detect the SBS_CANTRCVMORE bit. The error from accept() is [ECONNABORTED] which is not the nicest one -- the thread calling accept() needs to know out-of-band what is happening. A spurious wakeup on so->so_timeo appears harmless (sleep retried) except when lingering on close (SO_LINGER, and in that case there is no descriptor to call shutdown() on) so this should be fairly safe. A shutdown() already woke up a blocked accept() for TCP sockets, but not for Unix domain sockets. This fix is generic for all domains. This patch was sent to -hackers@ and -net@ on April 5. MFC after:2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Tue Apr 30 14:56:41 2013(r250101) +++ head/sys/kern/uipc_socket.c Tue Apr 30 15:06:30 2013(r250102) @@ -2429,9 +2429,11 @@ soshutdown(struct socket *so, int how) sorflush(so); if (how != SHUT_RD) { error = (*pr->pr_usrreqs->pru_shutdown)(so); + wakeup(&so->so_timeo); CURVNET_RESTORE(); return (error); } + wakeup(&so->so_timeo); CURVNET_RESTORE(); return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250103 - head/sys/dev/hwpmc
Author: davide Date: Tue Apr 30 15:31:45 2013 New Revision: 250103 URL: http://svnweb.freebsd.org/changeset/base/250103 Log: The Intel PMC architectural events have encodings which are identical to those of some non-architectural core events. This is not a problem in the general case as long as there's an 1:1 mapping between the two, but there are few exceptions. For example, 3CH_01H on Nehalem/Westmere represents both unhalted-reference-cycles and CPU_CLK_UNHALTED.REF_P. CPU_CLK_UNHALTED.REF_P on the aforementioned architectures does not measure reference (i.e. bus) but TSC, so there's the need to disambiguate. In order to avoid the namespace collision rename all the architectural events in a way they cannot be ambigous and refactor the architectural events handling function to reflect this change. While here, per Jim Harris request, rename iap_architectural_event_is_unsupported() to iap_event_is_architectural(). Discussed with: jimharris Reviewed by: jimharris, gnn Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Tue Apr 30 15:06:30 2013 (r250102) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Apr 30 15:31:45 2013 (r250103) @@ -60,6 +60,10 @@ __FBSDID("$FreeBSD$"); PMC_CAP_EDGE | PMC_CAP_THRESHOLD | PMC_CAP_READ | PMC_CAP_WRITE | \ PMC_CAP_INVERT | PMC_CAP_QUALIFIER | PMC_CAP_PRECISE) +#defineEV_IS_NOTARCH 0 +#defineEV_IS_ARCH_SUPP 1 +#defineEV_IS_ARCH_NOTSUPP -1 + /* * "Architectural" events defined by Intel. The values of these * symbols correspond to positions in the bitmask returned by @@ -1723,43 +1727,53 @@ iap_pmc_has_overflowed(int ri) /* * Check an event against the set of supported architectural events. * - * Returns 1 if the event is architectural and unsupported on this - * CPU. Returns 0 otherwise. + * If the event is not architectural EV_IS_NOTARCH is returned. + * If the event is architectural and supported on this CPU, the correct + * event+umask mapping is returned in map, and EV_IS_ARCH_SUPP is returned. + * Otherwise, the function returns EV_IS_ARCH_NOTSUPP. */ static int -iap_architectural_event_is_unsupported(enum pmc_event pe) +iap_is_event_architectural(enum pmc_event pe, enum pmc_event *map) { enum core_arch_events ae; switch (pe) { - case PMC_EV_IAP_EVENT_3CH_00H: + case PMC_EV_IAP_ARCH_UNH_COR_CYC: ae = CORE_AE_UNHALTED_CORE_CYCLES; + *map = PMC_EV_IAP_EVENT_C4H_00H; break; - case PMC_EV_IAP_EVENT_C0H_00H: + case PMC_EV_IAP_ARCH_INS_RET: ae = CORE_AE_INSTRUCTION_RETIRED; + *map = PMC_EV_IAP_EVENT_C0H_00H; break; - case PMC_EV_IAP_EVENT_3CH_01H: + case PMC_EV_IAP_ARCH_UNH_REF_CYC: ae = CORE_AE_UNHALTED_REFERENCE_CYCLES; + *map = PMC_EV_IAP_EVENT_3CH_01H; break; - case PMC_EV_IAP_EVENT_2EH_4FH: + case PMC_EV_IAP_ARCH_LLC_REF: ae = CORE_AE_LLC_REFERENCE; + *map = PMC_EV_IAP_EVENT_2EH_4FH; break; - case PMC_EV_IAP_EVENT_2EH_41H: + case PMC_EV_IAP_ARCH_LLC_MIS: ae = CORE_AE_LLC_MISSES; + *map = PMC_EV_IAP_EVENT_2EH_41H; break; - case PMC_EV_IAP_EVENT_C4H_00H: + case PMC_EV_IAP_ARCH_BR_INS_RET: ae = CORE_AE_BRANCH_INSTRUCTION_RETIRED; + *map = PMC_EV_IAP_EVENT_C4H_00H; break; - case PMC_EV_IAP_EVENT_C5H_00H: + case PMC_EV_IAP_ARCH_BR_MIS_RET: ae = CORE_AE_BRANCH_MISSES_RETIRED; + *map = PMC_EV_IAP_EVENT_C5H_00H; break; default:/* Non architectural event. */ - return (0); + return (EV_IS_NOTARCH); } - return ((core_architectural_events & (1 << ae)) == 0); + return (((core_architectural_events & (1 << ae)) == 0) ? + EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP); } static int @@ -1917,8 +1931,8 @@ static int iap_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { - int n, model; - enum pmc_event ev; + int arch, n, model; + enum pmc_event ev, map; struct iap_event_descr *ie; uint32_t c, caps, config, cpuflag, evsel, mask; @@ -1932,10 +1946,13 @@ iap_allocate_pmc(int cpu, int ri, struct if ((IAP_PMC_CAPS & caps) != caps) return (EPERM); - ev = pm->pm_event; - - if (iap_architectural_event_is_unsupported(ev)) + arch = iap_is_event_architectural(pm->pm_event, &map); + if (arch == EV_IS_ARCH_NOTSUPP) return (EOPNOTSUPP); + else if (arch
svn commit: r250104 - head
Author: des Date: Tue Apr 30 15:38:31 2013 New Revision: 250104 URL: http://svnweb.freebsd.org/changeset/base/250104 Log: Forgot to update UPDATING in head last night. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Tue Apr 30 15:31:45 2013(r250103) +++ head/UPDATING Tue Apr 30 15:38:31 2013(r250104) @@ -31,6 +31,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130429: +Fix a bug that allows NFS clients to issue READDIR on files. + 20130426: The WITHOUT_IDEA option has been removed because the IDEA patent expired. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250105 - head/sys/dev/hwpmc
Author: davide Date: Tue Apr 30 15:59:22 2013 New Revision: 250105 URL: http://svnweb.freebsd.org/changeset/base/250105 Log: malloc(9) cannot return NULL if M_WAITOK flag is specified. Modified: head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hwpmc/hwpmc_soft.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:38:31 2013 (r250104) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:59:22 2013 (r250105) @@ -2210,11 +2210,8 @@ pmc_allocate_pmc_descriptor(void) struct pmc *pmc; pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); - - if (pmc != NULL) { - pmc->pm_owner = NULL; - LIST_INIT(&pmc->pm_targets); - } + pmc->pm_owner = NULL; + LIST_INIT(&pmc->pm_targets); PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); @@ -4671,13 +4668,10 @@ pmc_mdep_alloc(int nclasses) n = 1 + nclasses; md = malloc(sizeof(struct pmc_mdep) + n * sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO); - if (md != NULL) { - md->pmd_nclass = n; - - /* Add base class. */ - pmc_soft_initialize(md); - } + md->pmd_nclass = n; + /* Add base class. */ + pmc_soft_initialize(md); return md; } @@ -4889,9 +4883,6 @@ pmc_initialize(void) pmc_pmcdisp = malloc(sizeof(enum pmc_mode) * md->pmd_npmc, M_PMC, M_WAITOK|M_ZERO); - KASSERT(pmc_pmcdisp != NULL, - ("[pmc,%d] pmcdisp allocation returned NULL", __LINE__)); - /* mark all PMCs as available */ for (n = 0; n < (int) md->pmd_npmc; n++) PMC_MARK_ROW_FREE(n); Modified: head/sys/dev/hwpmc/hwpmc_soft.c == --- head/sys/dev/hwpmc/hwpmc_soft.c Tue Apr 30 15:38:31 2013 (r250104) +++ head/sys/dev/hwpmc/hwpmc_soft.c Tue Apr 30 15:59:22 2013 (r250105) @@ -241,9 +241,6 @@ soft_pcpu_init(struct pmc_mdep *md, int __LINE__)); soft_pc = malloc(sizeof(struct soft_cpu), M_PMC, M_WAITOK|M_ZERO); - if (soft_pc == NULL) - return (ENOMEM); - pc = pmc_pcpu[cpu]; KASSERT(pc != NULL, ("[soft,%d] cpu %d null per-cpu", __LINE__, cpu)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250106 - head/sys/net
Author: luigi Date: Tue Apr 30 16:00:21 2013 New Revision: 250106 URL: http://svnweb.freebsd.org/changeset/base/250106 Log: remove $Id$ (whitespace change) Modified: head/sys/net/netmap.h head/sys/net/netmap_user.h Modified: head/sys/net/netmap.h == --- head/sys/net/netmap.h Tue Apr 30 15:59:22 2013(r250105) +++ head/sys/net/netmap.h Tue Apr 30 16:00:21 2013(r250106) @@ -32,7 +32,6 @@ /* * $FreeBSD$ - * $Id: netmap.h 11997 2013-01-17 21:59:12Z luigi $ * * Definitions of constants and the structures used by the netmap * framework, for the part visible to both kernel and userspace. Modified: head/sys/net/netmap_user.h == --- head/sys/net/netmap_user.h Tue Apr 30 15:59:22 2013(r250105) +++ head/sys/net/netmap_user.h Tue Apr 30 16:00:21 2013(r250106) @@ -32,7 +32,6 @@ /* * $FreeBSD$ - * $Id: netmap_user.h 10597 2012-02-21 05:08:32Z luigi $ * * This header contains the macros used to manipulate netmap structures * and packets in userspace. See netmap(4) for more information. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250107 - head/sys/dev/netmap
Author: luigi Date: Tue Apr 30 16:08:34 2013 New Revision: 250107 URL: http://svnweb.freebsd.org/changeset/base/250107 Log: Partial cleanup in preparation for upcoming changes: - netmap_rx_irq()/netmap_tx_irq() can now be called by FreeBSD drivers hiding the logic for handling NIC interrupts in netmap mode. This also simplifies the case of NICs attached to VALE switches. Individual drivers will be updated with separate commits. - use the same refcount() API for FreeBSD and linux - plus some comments, typos and formatting fixes Portions contributed by Michio Honda Modified: head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap.c == --- head/sys/dev/netmap/netmap.cTue Apr 30 16:00:21 2013 (r250106) +++ head/sys/dev/netmap/netmap.cTue Apr 30 16:08:34 2013 (r250107) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Matteo Landi, Luigi Rizzo. All rights reserved. + * Copyright (C) 2011-2013 Matteo Landi, Luigi Rizzo. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -123,12 +123,10 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, no_pen int netmap_drop = 0; /* debugging */ int netmap_flags = 0; /* debug flags */ int netmap_fwd = 0;/* force transparent mode */ -int netmap_copy = 0; /* debugging, copy content */ SYSCTL_INT(_dev_netmap, OID_AUTO, drop, CTLFLAG_RW, &netmap_drop, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, flags, CTLFLAG_RW, &netmap_flags, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, fwd, CTLFLAG_RW, &netmap_fwd, 0 , ""); -SYSCTL_INT(_dev_netmap, OID_AUTO, copy, CTLFLAG_RW, &netmap_copy, 0 , ""); #ifdef NM_BRIDGE /* support for netmap bridge */ @@ -155,18 +153,27 @@ int netmap_bridge = NM_BDG_BATCH; /* bri SYSCTL_INT(_dev_netmap, OID_AUTO, bridge, CTLFLAG_RW, &netmap_bridge, 0 , ""); #ifdef linux -#defineADD_BDG_REF(ifp)(NA(ifp)->if_refcount++) -#defineDROP_BDG_REF(ifp) (NA(ifp)->if_refcount-- <= 1) + +#definerefcount_acquire(_a)atomic_add(1, (atomic_t *)_a) +#definerefcount_release(_a)atomic_dec_and_test((atomic_t *)_a) + #else /* !linux */ -#defineADD_BDG_REF(ifp)(ifp)->if_refcount++ -#defineDROP_BDG_REF(ifp) refcount_release(&(ifp)->if_refcount) + #ifdef __FreeBSD__ #include #include #endif /* __FreeBSD__ */ + #define prefetch(x)__builtin_prefetch(x) + #endif /* !linux */ +/* + * These are used to handle reference counters for bridge ports. + */ +#defineADD_BDG_REF(ifp) refcount_acquire(&NA(ifp)->na_bdg_refcount) +#defineDROP_BDG_REF(ifp) refcount_release(&NA(ifp)->na_bdg_refcount) + static void bdg_netmap_attach(struct ifnet *ifp); static int bdg_netmap_reg(struct ifnet *ifp, int onoff); /* per-tx-queue entry */ @@ -183,9 +190,14 @@ struct nm_hash_ent { }; /* - * Interfaces for a bridge are all in ports[]. + * Interfaces for a bridge are all in bdg_ports[]. * The array has fixed size, an empty entry does not terminate - * the search. + * the search. But lookups only occur on attach/detach so we + * don't mind if they are slow. + * + * The bridge is non blocking on the transmit ports. + * + * bdg_lock protects accesses to the bdg_ports array. */ struct nm_bridge { struct ifnet *bdg_ports[NM_BDG_MAXPORTS]; @@ -1668,19 +1680,25 @@ netmap_attach(struct netmap_adapter *arg ND("using default locks for %s", ifp->if_xname); na->nm_lock = netmap_lock_wrapper; } + #ifdef linux - if (ifp->netdev_ops) { - ND("netdev_ops %p", ifp->netdev_ops); - /* prepare a clone of the netdev ops */ - na->nm_ndo = *ifp->netdev_ops; + if (!ifp->netdev_ops) { + D("ouch, we cannot override netdev_ops"); + goto fail; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) + /* if needed, prepare a clone of the entire netdev ops */ + na->nm_ndo = *ifp->netdev_ops; +#endif /* 2.6.28 and above */ na->nm_ndo.ndo_start_xmit = linux_netmap_start; -#endif +#endif /* linux */ + D("success for %s", ifp->if_xname); return 0; fail: D("fail, arg %p ifp %p na %p", arg, ifp, na); + netmap_detach(ifp); return (na ? EINVAL : ENOMEM); } @@ -1726,17 +1744,18 @@ netmap_start(struct ifnet *ifp, struct m if (netmap_verbose & NM_VERB_HOST) D("%s packet %d len %d from the stack", ifp->if_xname, kring->nr_hwcur + kring->nr_hwavail, len); + if (len > NETMAP_BUF_SIZE) { /* too long for us */ + D("%s from_host, drop packet size %d > %d", ifp->if_xname, + len, NETMAP_BUF_SIZE); + m_freem(m);
Re: svn commit: r250105 - head/sys/dev/hwpmc
Hi. On 30 April 2013 19:59, Davide Italiano wrote: > Author: davide > Date: Tue Apr 30 15:59:22 2013 > New Revision: 250105 > URL: http://svnweb.freebsd.org/changeset/base/250105 > > Log: > malloc(9) cannot return NULL if M_WAITOK flag is specified. > > Modified: > head/sys/dev/hwpmc/hwpmc_mod.c > head/sys/dev/hwpmc/hwpmc_soft.c > > Modified: head/sys/dev/hwpmc/hwpmc_mod.c > == > --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:38:31 2013 > (r250104) > +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:59:22 2013 > (r250105) > @@ -2210,11 +2210,8 @@ pmc_allocate_pmc_descriptor(void) > struct pmc *pmc; > > pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); > - > - if (pmc != NULL) { > - pmc->pm_owner = NULL; > - LIST_INIT(&pmc->pm_targets); > - } > + pmc->pm_owner = NULL; > + LIST_INIT(&pmc->pm_targets); > > PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); > It looks like zeroing pm_owner can also be omitted with M_ZERO. -- wbr, pluknet ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250108 - in head/sys/dev: e1000 ixgbe re
Author: luigi Date: Tue Apr 30 16:18:29 2013 New Revision: 250108 URL: http://svnweb.freebsd.org/changeset/base/250108 Log: use netmap_rx_irq() / netmap_tx_irq() to handle interrupts in netmap mode, removing the logic from individual drivers. (note: if_lem.c not updated yet due to some other pending modifications) Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/re/if_re.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Tue Apr 30 16:08:34 2013(r250107) +++ head/sys/dev/e1000/if_em.c Tue Apr 30 16:18:29 2013(r250108) @@ -3828,17 +3828,9 @@ em_txeof(struct tx_ring *txr) EM_TX_LOCK_ASSERT(txr); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - - selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); - EM_TX_UNLOCK(txr); - EM_CORE_LOCK(adapter); - selwakeuppri(&na->tx_si, PI_NET); - EM_CORE_UNLOCK(adapter); - EM_TX_LOCK(txr); + if (netmap_tx_irq(ifp, txr->me | + (NETMAP_LOCKED_ENTER | NETMAP_LOCKED_EXIT))) return; - } #endif /* DEV_NETMAP */ /* No work, make sure watchdog is off */ @@ -4440,17 +4432,8 @@ em_rxeof(struct rx_ring *rxr, int count, EM_RX_LOCK(rxr); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - - na->rx_rings[rxr->me].nr_kflags |= NKR_PENDINTR; - selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET); - EM_RX_UNLOCK(rxr); - EM_CORE_LOCK(adapter); - selwakeuppri(&na->rx_si, PI_NET); - EM_CORE_UNLOCK(adapter); - return (0); - } + if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) + return (FALSE); #endif /* DEV_NETMAP */ for (i = rxr->next_to_check, processed = 0; count != 0;) { Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Tue Apr 30 16:08:34 2013(r250107) +++ head/sys/dev/e1000/if_igb.c Tue Apr 30 16:18:29 2013(r250108) @@ -3897,17 +3897,9 @@ igb_txeof(struct tx_ring *txr) IGB_TX_LOCK_ASSERT(txr); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - - selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); - IGB_TX_UNLOCK(txr); - IGB_CORE_LOCK(adapter); - selwakeuppri(&na->tx_si, PI_NET); - IGB_CORE_UNLOCK(adapter); - IGB_TX_LOCK(txr); - return FALSE; - } + if (netmap_tx_irq(ifp, txr->me | + (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT))) + return (FALSE); #endif /* DEV_NETMAP */ if (txr->tx_avail == adapter->num_tx_desc) { txr->queue_status = IGB_QUEUE_IDLE; @@ -4761,17 +4753,8 @@ igb_rxeof(struct igb_queue *que, int cou BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - - na->rx_rings[rxr->me].nr_kflags |= NKR_PENDINTR; - selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET); - IGB_RX_UNLOCK(rxr); - IGB_CORE_LOCK(adapter); - selwakeuppri(&na->rx_si, PI_NET); - IGB_CORE_UNLOCK(adapter); - return (0); - } + if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) + return (FALSE); #endif /* DEV_NETMAP */ /* Main clean loop */ Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Tue Apr 30 16:08:34 2013(r250107) +++ head/sys/dev/ixgbe/ixgbe.c Tue Apr 30 16:18:29 2013(r250108) @@ -3597,13 +3597,8 @@ ixgbe_txeof(struct tx_ring *txr) if (!netmap_mitigate || (kring->nr_kflags < kring->nkr_num_slots && txd[kring->nr_kflags].wb.status & IXGBE_TXD_STAT_DD)) { - kring->nr_kflags = kring->nkr_num_slots; - selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); - IXGBE_TX_UNLOCK(txr); - IXGBE_CORE_LOCK(adapter); - selwakeuppri(&na->tx_si, PI_NET); - IXGBE_CORE_UNLOCK(adapter); - IXGBE_TX_LOCK(txr); + netmap_tx_irq(ifp, txr->me | + (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT)); } return FALSE;
svn commit: r250109 - head/sys/dev/e1000
Author: luigi Date: Tue Apr 30 16:51:58 2013 New Revision: 250109 URL: http://svnweb.freebsd.org/changeset/base/250109 Log: use netmap_rx_irq() and netmap_tx_irq() instead of replicating the logic in the individual driver. Modified: head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_lem.c == --- head/sys/dev/e1000/if_lem.c Tue Apr 30 16:18:29 2013(r250108) +++ head/sys/dev/e1000/if_lem.c Tue Apr 30 16:51:58 2013(r250109) @@ -2980,10 +2980,8 @@ lem_txeof(struct adapter *adapter) EM_TX_LOCK_ASSERT(adapter); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - selwakeuppri(&NA(ifp)->tx_rings[0].si, PI_NET); + if (netmap_tx_irq(ifp, 0 | (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT))) return; - } #endif /* DEV_NETMAP */ if (adapter->num_tx_desc_avail == adapter->num_tx_desc) return; @@ -3459,13 +3457,8 @@ lem_rxeof(struct adapter *adapter, int c BUS_DMASYNC_POSTREAD); #ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - na->rx_rings[0].nr_kflags |= NKR_PENDINTR; - selwakeuppri(&na->rx_rings[0].si, PI_NET); - EM_RX_UNLOCK(adapter); - return (0); - } + if (netmap_rx_irq(ifp, 0 | NETMAP_LOCKED_ENTER, &rx_sent)) + return (FALSE); #endif /* DEV_NETMAP */ if (!((current_desc->status) & E1000_RXD_STAT_DD)) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250110 - head/share/man/man4
Author: carl Date: Tue Apr 30 16:59:25 2013 New Revision: 250110 URL: http://svnweb.freebsd.org/changeset/base/250110 Log: Fix the man page installation broken in r250079. Pointy hat to me. Thanks to Florian Smeets for pointing this out and providing a patch. Submitted by: Florian Smeets Approved by: jimharris (mentor) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileTue Apr 30 16:51:58 2013 (r250109) +++ head/share/man/man4/MakefileTue Apr 30 16:59:25 2013 (r250110) @@ -648,7 +648,8 @@ MLINKS+=netintro.4 net.4 \ netintro.4 networking.4 MLINKS+=${_nfe.4} ${_if_nfe.4} MLINKS+=nge.4 if_nge.4 -MLINKS+=${_ntb.4} ${_if_ntb.4} ${_ntb_hw.4} +MLINKS+=${_ntb.4} ${_if_ntb.4} \ + ${_ntb.4} ${_ntb_hw.4} MLINKS+=${_nve.4} ${_if_nve.4} MLINKS+=${_nxge.4} ${_if_nxge.4} MLINKS+=patm.4 if_patm.4 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r250079 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ntb sys/dev/ntb/if_ntb sys/dev/ntb/ntb_hw sys/modules sys/modules/ntb sys/modules/ntb/if_ntb sys/modules/ntb/ntb_hw
Thanks Florian. Fixed in r250110. On 04/30/13 02:57, Florian Smeets wrote: > On Mon, Apr 29, 2013 at 10:48:53PM +, Carl Delsey wrote: >> Author: carl >> Date: Mon Apr 29 22:48:53 2013 >> New Revision: 250079 >> URL: http://svnweb.freebsd.org/changeset/base/250079 >> >> Log: >> Add a new driver to support the Intel Non-Transparent Bridge(NTB). >> > Hi Carl, > > This change breaks installworld. > > /usr/share/man/man4/nve.4.gz -> /usr/share/man/man4/ntb_hw.4.gz > install: link /usr/share/man/man4/ntb_hw.4.gz -> > /usr/share/man/man4/nve.4.gz: No such file or directory > *** [_maninstall] Error code 71 > > I think the following patch does what you intended? > > Index: share/man/man4/Makefile > === > --- share/man/man4/Makefile (revision 250097) > +++ share/man/man4/Makefile (working copy) > @@ -648,7 +648,8 @@ > netintro.4 networking.4 > MLINKS+=${_nfe.4} ${_if_nfe.4} > MLINKS+=nge.4 if_nge.4 > -MLINKS+=${_ntb.4} ${_if_ntb.4} ${_ntb_hw.4} > +MLINKS+=${_ntb.4} ${_if_ntb.4} \ > + ${_ntb.4} ${_ntb_hw.4} > MLINKS+=${_nve.4} ${_if_nve.4} > MLINKS+=${_nxge.4} ${_if_nxge.4} > MLINKS+=patm.4 if_patm.4 > > With this installworld finished as expected. > > Florian signature.asc Description: OpenPGP digital signature
svn commit: r250112 - head/lib
Author: brooks Date: Tue Apr 30 18:14:22 2013 New Revision: 250112 URL: http://svnweb.freebsd.org/changeset/base/250112 Log: Wrap the creation of the ../include link in /usr/lib in !defined(LIBRARIES_ONLY) so it is only created once on architectures with 32-bit compat support. Replace ln -fhs with ${INSTALL_SYMLINK} to the link is logged in the METALOG. Modified: head/lib/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Tue Apr 30 18:06:43 2013(r250111) +++ head/lib/Makefile Tue Apr 30 18:14:22 2013(r250112) @@ -252,7 +252,9 @@ _libusbhid= libusbhid _libusb= libusb .endif +.if !defined(LIBRARIES_ONLY) afterinstall: - ln -hfs ../include ${DESTDIR}/usr/lib/include + ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include +.endif .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250113 - head/sys/dev/altera/jtag_uart
Author: brooks Date: Tue Apr 30 18:29:05 2013 New Revision: 250113 URL: http://svnweb.freebsd.org/changeset/base/250113 Log: Partial MFC of change 228122: Due to the requirement that tty prefixes be unique per driver, rename the Altera JTAG UART devices to ttyj#. Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart.h Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart.h == --- head/sys/dev/altera/jtag_uart/altera_jtag_uart.hTue Apr 30 18:14:22 2013(r250112) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart.hTue Apr 30 18:29:05 2013(r250113) @@ -75,7 +75,7 @@ struct altera_jtag_uart_softc { u_int *ajus_jtag_missedp; }; -#defineAJU_TTYNAME "ttyu" +#defineAJU_TTYNAME "ttyj" /* * Flag values for ajus_flags. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250114 - in head/sys: conf dev/cfi
Author: brooks Date: Tue Apr 30 18:33:29 2013 New Revision: 250114 URL: http://svnweb.freebsd.org/changeset/base/250114 Log: MFP4 changes 222065 and 222068: Add a simplebus attachment for cfi(4)'s FDT support and move cfi_bus_fdt.c to sys/conf/files so non-ppc architectures are supported. Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/conf/files.powerpc head/sys/dev/cfi/cfi_bus_fdt.c Modified: head/sys/conf/files == --- head/sys/conf/files Tue Apr 30 18:29:05 2013(r250113) +++ head/sys/conf/files Tue Apr 30 18:33:29 2013(r250114) @@ -1046,6 +1046,7 @@ dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus dev/cas/if_cas.c optional cas +dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/cfi/cfi_bus_nexus.coptional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Tue Apr 30 18:29:05 2013(r250113) +++ head/sys/conf/files.powerpc Tue Apr 30 18:33:29 2013(r250114) @@ -27,7 +27,6 @@ dev/adb/adb_hb_if.m optionaladb dev/adb/adb_if.m optionaladb dev/adb/adb_buttons.c optionaladb dev/agp/agp_apple.coptionalagp powermac -dev/cfi/cfi_bus_fdt.c optionalcfi fdt dev/fb/fb.coptionalsc dev/fdt/fdt_powerpc.c optionalfdt dev/hwpmc/hwpmc_powerpc.c optionalhwpmc Modified: head/sys/dev/cfi/cfi_bus_fdt.c == --- head/sys/dev/cfi/cfi_bus_fdt.c Tue Apr 30 18:29:05 2013 (r250113) +++ head/sys/dev/cfi/cfi_bus_fdt.c Tue Apr 30 18:33:29 2013 (r250114) @@ -61,6 +61,7 @@ static driver_t cfi_fdt_driver = { }; DRIVER_MODULE (cfi, lbc, cfi_fdt_driver, cfi_devclass, 0, 0); +DRIVER_MODULE (cfi, simplebus, cfi_fdt_driver, cfi_devclass, 0, 0); static int cfi_fdt_probe(device_t dev) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250115 - head/sys/dev/cfi
Author: brooks Date: Tue Apr 30 18:48:11 2013 New Revision: 250115 URL: http://svnweb.freebsd.org/changeset/base/250115 Log: MFP4 change 222060: On Intel devices, put the Factory PPR in kenv. On some FPGA boards it may be the only software accessable unique ID. Sponsored by: DARPA, AFRL Modified: head/sys/dev/cfi/cfi_core.c Modified: head/sys/dev/cfi/cfi_core.c == --- head/sys/dev/cfi/cfi_core.c Tue Apr 30 18:33:29 2013(r250114) +++ head/sys/dev/cfi/cfi_core.c Tue Apr 30 18:48:11 2013(r250115) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -261,6 +262,10 @@ cfi_attach(device_t dev) struct cfi_softc *sc; u_int blksz, blocks; u_int r, u; +#ifdef CFI_SUPPORT_STRATAFLASH + uint64_t ppr; + char name[KENV_MNAMELEN], value[32]; +#endif sc = device_get_softc(dev); sc->sc_dev = dev; @@ -312,6 +317,20 @@ cfi_attach(device_t dev) "%s%u", cfi_driver_name, u); sc->sc_nod->si_drv1 = sc; +#ifdef CFI_SUPPORT_STRATAFLASH + /* +* Store the Intel factory PPR in the environment. In some +* cases it is the most unique ID on a board. +*/ + if (cfi_intel_get_factory_pr(sc, &ppr) == 0) { + if (snprintf(name, sizeof(name), "%s.factory_ppr", + device_get_nameunit(dev)) < (sizeof(name) - 1) && + snprintf(value, sizeof(value), "0x%016jx", ppr) < + (sizeof(value) - 1)) + (void) setenv(name, value); + } +#endif + device_add_child(dev, "cfid", -1); bus_generic_attach(dev); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250116 - head/etc
Author: brooks Date: Tue Apr 30 19:26:44 2013 New Revision: 250116 URL: http://svnweb.freebsd.org/changeset/base/250116 Log: Make an attempt to detect missing MTREE files in distrib-dirs. Not perfect, but this is just a developer seatbelt. PR: conf/176897 Submitted by: Garrett Cooper MFC after:1 week Modified: head/etc/Makefile Modified: head/etc/Makefile == --- head/etc/Makefile Tue Apr 30 18:48:11 2013(r250115) +++ head/etc/Makefile Tue Apr 30 19:26:44 2013(r250116) @@ -328,7 +328,7 @@ MTREES+=mtree/BSD.sendmail.dist / MTREES+= ../${mtree} / .endfor -distrib-dirs: +distrib-dirs: ${MTREES:N/*} @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250117 - head/sys/dev/cxgbe/tom
Author: np Date: Tue Apr 30 19:57:21 2013 New Revision: 250117 URL: http://svnweb.freebsd.org/changeset/base/250117 Log: Fix DDP breakage introduced in r248925. Bitwise OR has higher precedence than ternary conditional. MFC after:1 week Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c == --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Apr 30 19:26:44 2013 (r250116) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Apr 30 19:57:21 2013 (r250117) @@ -747,7 +747,13 @@ write_page_pods(struct adapter *sc, stru struct ulptx_idata *ulpsc; struct pagepod *ppod; int i, j, k, n, chunk, len, ddp_pgsz, idx, ppod_addr; + uint32_t cmd; + cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); + if (is_t4(sc)) + cmd |= htobe32(F_ULP_MEMIO_ORDER); + else + cmd |= htobe32(F_T5_ULP_MEMIO_IMM); ddp_pgsz = t4_ddp_pgsz[G_PPOD_PGSZ(db->tag)]; ppod_addr = sc->vres.ddp.start + G_PPOD_TAG(db->tag) * PPOD_SIZE; for (i = 0; i < db->nppods; ppod_addr += chunk) { @@ -763,8 +769,7 @@ write_page_pods(struct adapter *sc, stru ulpmc = wrtod(wr); INIT_ULPTX_WR(ulpmc, len, 0, 0); - ulpmc->cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | - is_t4(sc) ? F_ULP_MEMIO_ORDER : F_T5_ULP_MEMIO_IMM); + ulpmc->cmd = cmd; ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250119 - head
Author: brooks Date: Tue Apr 30 20:53:28 2013 New Revision: 250119 URL: http://svnweb.freebsd.org/changeset/base/250119 Log: Add some advice to get past the hurdle of install -l for the common, but non-default (and unsupportable) case of setting INSTALL="install -C" in /etc/make.conf or /etc/src.conf. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Tue Apr 30 20:15:53 2013(r250118) +++ head/UPDATING Tue Apr 30 20:53:28 2013(r250119) @@ -104,6 +104,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 while having the GNU version installed as gnupatch, rebuild and install world with the WITH_BSD_PATCH knob set. +20130121: + Due to the use of the new -l option to install(1) during build + and install, you must take care not to directly set the INSTALL + make variable in your /etc/make.conf, /etc/src.conf, or on the + command line. If you with to use the -C flag for all installs + you may be able to add INSTALL+=-C to /etc/make.conf or + /etc/src.conf. + 20130118: The install(1) option -M has changed meaning and now takes an argument that is a file or path to append logs to. In the ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250123 - head/sys/dev/hptiop
Author: eadler Date: Tue Apr 30 23:36:45 2013 New Revision: 250123 URL: http://svnweb.freebsd.org/changeset/base/250123 Log: Add missing braces Reviewed by: swild...@dragonflybsd.org Reviewed by: delphij Modified: head/sys/dev/hptiop/hptiop.c Modified: head/sys/dev/hptiop/hptiop.c == --- head/sys/dev/hptiop/hptiop.cTue Apr 30 22:59:09 2013 (r250122) +++ head/sys/dev/hptiop/hptiop.cTue Apr 30 23:36:45 2013 (r250123) @@ -1642,10 +1642,11 @@ static int hptiop_internal_memalloc_mv(s MVIOP_IOCTLCFG_SIZE, hptiop_mv_map_ctlcfg, hba, 0)) { device_printf(hba->pcidev, "bus_dmamap_load failed!\n"); - if (hba->ctlcfg_dmat) + if (hba->ctlcfg_dmat) { bus_dmamem_free(hba->ctlcfg_dmat, hba->ctlcfg_ptr, hba->ctlcfg_dmamap); bus_dma_tag_destroy(hba->ctlcfg_dmat); + } return -1; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250124 - head/sys/dev/hptiop
Author: eadler Date: Tue Apr 30 23:36:48 2013 New Revision: 250124 URL: http://svnweb.freebsd.org/changeset/base/250124 Log: Remove ancient compatibility cruft. Reviewed by: delphij Modified: head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h Modified: head/sys/dev/hptiop/hptiop.c == --- head/sys/dev/hptiop/hptiop.cTue Apr 30 23:36:45 2013 (r250123) +++ head/sys/dev/hptiop/hptiop.cTue Apr 30 23:36:48 2013 (r250124) @@ -30,12 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if (__FreeBSD_version >= 50) #include #include -#else -#include -#endif #include #include @@ -43,11 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 50) #include #include #include -#endif #include #include @@ -62,17 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 50) #include #include -#else -#include -#include -#endif - -#if (__FreeBSD_version <= 500043) -#include -#endif + #include #include @@ -83,9 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version < 500043) -#include -#endif #include @@ -177,27 +160,11 @@ static struct cdevsw hptiop_cdevsw = { .d_close = hptiop_close, .d_ioctl = hptiop_ioctl, .d_name = driver_name, -#if __FreeBSD_version>=503000 .d_version = D_VERSION, -#endif -#if (__FreeBSD_version>=503000 && __FreeBSD_version<600034) - .d_flags = D_NEEDGIANT, -#endif -#if __FreeBSD_version<600034 -#if __FreeBSD_version>=501000 - .d_maj = MAJOR_AUTO, -#else - .d_maj = HPT_DEV_MAJOR, -#endif -#endif }; -#if __FreeBSD_version < 503000 -#define hba_from_dev(dev) ((struct hpt_iop_hba *)(dev)->si_drv1) -#else #define hba_from_dev(dev) \ ((struct hpt_iop_hba *)devclass_get_softc(hptiop_devclass, dev2unit(dev))) -#endif #define BUS_SPACE_WRT4_ITL(offset, value) bus_space_write_4(hba->bar0t,\ hba->bar0h, offsetof(struct hpt_iopmu_itl, offset), (value)) @@ -245,9 +212,7 @@ static int hptiop_ioctl(ioctl_dev_t dev, int ret = EFAULT; struct hpt_iop_hba *hba = hba_from_dev(dev); -#if (__FreeBSD_version >= 50) mtx_lock(&Giant); -#endif switch (cmd) { case HPT_DO_IOCONTROL: @@ -259,9 +224,7 @@ static int hptiop_ioctl(ioctl_dev_t dev, break; } -#if (__FreeBSD_version >= 50) mtx_unlock(&Giant); -#endif return ret; } @@ -1615,21 +1578,15 @@ static int hptiop_internal_memalloc_mv(s 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, -#if __FreeBSD_version > 502000 NULL, NULL, -#endif &hba->ctlcfg_dmat)) { device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); return -1; } if (bus_dmamem_alloc(hba->ctlcfg_dmat, (void **)&hba->ctlcfg_ptr, -#if __FreeBSD_version>501000 BUS_DMA_WAITOK | BUS_DMA_COHERENT, -#else - BUS_DMA_WAITOK, -#endif &hba->ctlcfg_dmamap) != 0) { device_printf(hba->pcidev, "bus_dmamem_alloc failed!\n"); @@ -1678,21 +1635,15 @@ static int hptiop_internal_memalloc_mvfr 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, -#if __FreeBSD_version > 502000 NULL, NULL, -#endif &hba->ctlcfg_dmat)) { device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); return -1; } if (bus_dmamem_alloc(hba->ctlcfg_dmat, (void **)&hba->ctlcfg_ptr, -#if __FreeBSD_version>501000 BUS_DMA_WAITOK | BUS_DMA_COHERENT, -#else - BUS_DMA_WAITOK, -#endif &hba->ctlcfg_dmamap) != 0) { device_printf(hba->pcidev, "bus_dmamem_alloc failed!\n"); @@ -1937,9 +1888,7 @@ static int hptiop_attach(device_t dev) pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), hba->ops)); -#if __FreeBSD_version >=44 pci_enable_busmaster(dev); -#endif hba->pcidev = dev; hba->pciunit = unit; @@ -1951,9 +1900,7 @@ static int hptiop_attach(device_t dev) goto release_pci_res; } -#if (__FreeBSD_version >= 50) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); -#endif if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ @@ -1965,10 +1912,8 @@ static int hptiop_attach(device_t dev)
svn commit: r250129 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Wed May 1 01:49:00 2013 New Revision: 250129 URL: http://svnweb.freebsd.org/changeset/base/250129 Log: There's no HAL_EEPROM in FreeBSD - use ar9300_eeprom_t instead. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed May 1 00:04:29 2013(r250128) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed May 1 01:49:00 2013(r250129) @@ -1138,7 +1138,7 @@ ar9300_get_diag_state(struct ath_hal *ah #ifdef AH_PRIVATE_DIAG case HAL_DIAG_EEPROM: *result = &ahp->ah_eeprom; -*resultsize = sizeof(HAL_EEPROM); +*resultsize = sizeof(ar9300_eeprom_t); return AH_TRUE; #if 0 /* XXX - TODO */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250130 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Wed May 1 01:50:33 2013 New Revision: 250130 URL: http://svnweb.freebsd.org/changeset/base/250130 Log: Disable TXCONT, it's not here in FreeBSD. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed May 1 01:49:00 2013(r250129) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed May 1 01:50:33 2013(r250130) @@ -1185,9 +1185,11 @@ ar9300_get_diag_state(struct ath_hal *ah ar9300_ani_control( ah, ((const u_int32_t *)args)[0], ((const u_int32_t *)args)[1]); return AH_TRUE; +#if 0 case HAL_DIAG_TXCONT: /*AR9300_CONTTXMODE(ah, (struct ath_desc *)args, argsize );*/ return AH_TRUE; +#endif /* 0 */ #endif /* AH_PRIVATE_DIAG */ case HAL_DIAG_CHANNELS: #if 0 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r249939 - head/sys/cam/scsi
On Tue, Apr 30, 2013 at 04:16:49 +0100, Steven Hartland wrote: > - Original Message - > From: "Steven Hartland" > >>On Fri, Apr 26, 2013 at 16:17:05 +, Steven Hartland wrote: > >>>Author: smh > >>>Date: Fri Apr 26 16:17:04 2013 > >>>New Revision: 249939 > >>>URL: http://svnweb.freebsd.org/changeset/base/249939 > >>> > >>>Log: > >>> Added available delete methods discovery during device probe, > >>> including the > >>> maximum sizes for said methods, which are used when processing > >>> BIO_DELETE > >>> requests. This includes updating UNMAP support discovery to be based on > >>> SBC-3 T10/1799-D Revision 31 specification. > >>> Added ATA TRIM support to cam scsi devices via ATA Pass-Through(16) > >>> sys/cam/scsi/scsi_da.c: > >>> - Added ATA Data Set Management TRIM support via ATA > >>> Pass-Through(16) > >>>as a delete_method > >>> > >> > >>This adds a lot of unnecessary verbosity for devices that don't support > >>ATA > >>passthrough. For example: > >> > >>(da7:iscsi4:0:0:0): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 > >>00 00 00 00 00 00 00 40 ec 00 > >>(da7:iscsi4:0:0:0): CAM status: SCSI Status Error > >>(da7:iscsi4:0:0:0): SCSI status: Check Condition > >>(da7:iscsi4:0:0:0): Retrying command (per sense data) > >>(2:2:0:0): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 00 00 00 > >>00 00 00 00 40 ec 00 > >>(2:2:0:0): Tag: 0x00f6, Type: 1 > >>(2:2:0:0): CTL Status: SCSI Error > >>(2:2:0:0): SCSI Status: Check Condition > >>(2:2:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command > >>operation code) > >>(2:2:0:0): Command byte 0 is invalid > >> > >>(da8:iscsi4:0:0:1): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 > >>00 00 00 00 00 00 00 40 ec 00 > >>(da8:iscsi4:0:0:1): CAM status: SCSI Status Error > >>(da8:iscsi4:0:0:1): SCSI status: Check Condition > >>(da8:iscsi4:0:0:1): Retrying command (per sense data) > >>(da8:iscsi4:0:0:1): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 > >>00 00 00 00 00 00 00 40 ec 00 > >>(da8:iscsi4:0:0:1): CAM status: SCSI Status Error > >>(da8:iscsi4:0:0:1): SCSI status: Check Condition > >>(da8:iscsi4:0:0:1): Error 5, Retries exhausted > >> > >>That is with CTL and and trasz's new iSCSI initiator, but you should see > >>it > >>with any CTL configuration. (And probably with any controller or device > >>that doesn't support ATA passthrough.) > >> > >>So, please: > >>- Check for the presence of VPD page 0x89 before sending an ATA > >> passthrough command. The spec (sat3r03 in this case) says that > >> it "shall" be implemented, so I think we can count on that. > >>- If the target returns an illegal request sense key, don't retry > >> again. The target will keep returning illegal request > > > >Thanks for the report Ken I'll check this on a card I know doesn't support > >pass-through. > > I checked with an areca controller, which I know doesn't support pass16, and > all is quiet during boot / probe. > > I can provoke output at the app layer with camcontrol identify da0, which is > to be expected, but nothing in /var/log/messages. > > daerror handler in scsi_da.c definitely has SF_QUIET_IR so Illegal Request > should never be output. You're correct, it should not print out any messages. > I can't provoke this using standard CAM devices even when they don't support > ATA Pass-Through (16) so I think this is actually an issue with CTL: > 1. Being verbose when it shouldn't (ctl_process_done - line 12571?) That part at least is by design -- it prints out rate-limited messages so you know when the initiator is sending commands CTL doesn't support. It comes in handy for figuring out initiator problems sometimes. > 2. Retrying Illegal Request commands when it shouldn't (I didn't experince > this on r250032) CTL doesn't do any retries, it leaves that up to the initiator. I finally tracked down the problem. The issue is that the iSCSI initiator wasn't setting the CAM_AUTOSNS_VALID flag in the CCB status field. As a result, only the CAM status and SCSI status fields were being printed. SF_QUIET_IR > The attached patch implements a check for ATA Information VPD before > using ATA Pass-Through (16). It's had limited testing but I have > confirmed it eliminates the use of pass16 under CTL and still enables > ATA TRIM under on mpt for SATA disks, so looks promising. > > If you could test and let me know if it works for you Ken that would > be appreciated. Yes, it does work and eliminates the error message, thanks! I think it is also a better way to go, just in case we run into a target that has an issue with the ATA passthrough CDB. > The test case I used for CTL was:- > kldload ctl > ctladm create -b ramdisk -s 10485760 > ctladm port -o on > > As a side note while test "kldload ctl" caused kernel panic the once. What was the panic message? This doesn't look like a CTL-specific problem (not on the surface), but rather a more general CAM problem: > #8 0x807
svn commit: r250131 - in head/sys: arm/broadcom/bcm2835 cam/ctl net netpfil/ipfw
Author: eadler Date: Wed May 1 04:37:34 2013 New Revision: 250131 URL: http://svnweb.freebsd.org/changeset/base/250131 Log: Correct a few sizeof()s Submitted by: swild...@dragonflybsd.org Reviewed by: alfred Modified: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/net/if_spppsubr.c head/sys/netpfil/ipfw/ip_dummynet.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Wed May 1 01:50:33 2013 (r250130) +++ head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Wed May 1 04:37:34 2013 (r250131) @@ -198,7 +198,7 @@ bcm_dma_reset(device_t dev, int ch) /* Reset control block */ cb = sc->sc_dma_ch[ch].cb; - bzero(cb, sizeof(cb)); + bzero(cb, sizeof(*cb)); cb->info = INFO_WAIT_RESP; } Modified: head/sys/cam/ctl/ctl_frontend_internal.c == --- head/sys/cam/ctl/ctl_frontend_internal.cWed May 1 01:50:33 2013 (r250130) +++ head/sys/cam/ctl/ctl_frontend_internal.cWed May 1 04:37:34 2013 (r250131) @@ -248,7 +248,7 @@ cfi_init(void) sizeof(struct cfi_lun_io), CTL_PORT_PRIV_SIZE); } - memset(softc, 0, sizeof(softc)); + memset(softc, 0, sizeof(*softc)); mtx_init(&softc->lock, "CTL frontend mutex", NULL, MTX_DEF); softc->flags |= CTL_FLAG_MASTER_SHELF; Modified: head/sys/net/if_spppsubr.c == --- head/sys/net/if_spppsubr.c Wed May 1 01:50:33 2013(r250130) +++ head/sys/net/if_spppsubr.c Wed May 1 04:37:34 2013(r250131) @@ -3596,7 +3596,7 @@ sppp_ipv6cp_RCR(struct sppp *sp, struct continue; } - bzero(&suggestaddr, sizeof(&suggestaddr)); + bzero(&suggestaddr, sizeof(suggestaddr)); if (collision && nohisaddr) { /* collision, hisaddr unknown - Conf-Rej */ type = CONF_REJ; Modified: head/sys/netpfil/ipfw/ip_dummynet.c == --- head/sys/netpfil/ipfw/ip_dummynet.c Wed May 1 01:50:33 2013 (r250130) +++ head/sys/netpfil/ipfw/ip_dummynet.c Wed May 1 04:37:34 2013 (r250131) @@ -618,7 +618,7 @@ fsk_detach(struct dn_fsk *fs, int flags) fs->sched->fp->free_fsk(fs); fs->sched = NULL; if (flags & DN_DELETE_FS) { - bzero(fs, sizeof(fs)); /* safety */ + bzero(fs, sizeof(*fs)); /* safety */ free(fs, M_DUMMYNET); dn_cfg.fsk_count--; } else { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250132 - head/sys/contrib/octeon-sdk
Author: eadler Date: Wed May 1 04:37:45 2013 New Revision: 250132 URL: http://svnweb.freebsd.org/changeset/base/250132 Log: Fix incorrect sizeof() in bzero() Submitted by: swild...@dragonflybsd.org Reviewed by: alfred, jmallett Modified: head/sys/contrib/octeon-sdk/cvmx-usbd.c Modified: head/sys/contrib/octeon-sdk/cvmx-usbd.c == --- head/sys/contrib/octeon-sdk/cvmx-usbd.c Wed May 1 04:37:34 2013 (r250131) +++ head/sys/contrib/octeon-sdk/cvmx-usbd.c Wed May 1 04:37:45 2013 (r250132) @@ -245,7 +245,7 @@ int cvmx_usbd_initialize(cvmx_usbd_state if (cvmx_unlikely(flags & CVMX_USBD_INITIALIZE_FLAGS_DEBUG)) cvmx_dprintf("%s: Called\n", __FUNCTION__); -memset(usb, 0, sizeof(usb)); +memset(usb, 0, sizeof(*usb)); usb->init_flags = flags; usb->index = usb_port_number; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250133 - head/usr.sbin/config
Author: wkoszek Date: Wed May 1 05:14:59 2013 New Revision: 250133 URL: http://svnweb.freebsd.org/changeset/base/250133 Log: Make the internal assertion correct--only fail when '\0' is found in places other than the end of the test section. Otherwise, with kernel compiled with Clang which happens to be setting ELF section alignment differently config(8) was throwing assert() failure unnecessarily Reported by: Kimmo Paasiala Tested by:Kimmo Paasiala MFC after:10 days Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c == --- head/usr.sbin/config/main.c Wed May 1 04:37:45 2013(r250132) +++ head/usr.sbin/config/main.c Wed May 1 05:14:59 2013(r250133) @@ -706,17 +706,11 @@ kernconfdump(const char *file) r = fgetc(fp); if (r == EOF) break; - /* -* If '\0' is present in the middle of the configuration -* string, this means something very weird is happening. -* Make such case very visible. However, some architectures -* pad the length of the section with NULs to a multiple of -* sh_addralign, allow a NUL in that part of the section. -*/ - if (r == '\0' && (size - i) < align) + if (r == '\0') { + assert(i == size - 1 && + ("\\0 found in the middle of a file")); break; - assert(r != '\0' && ("Char present in the configuration " - "string mustn't be equal to 0")); + } fputc(r, stdout); } fclose(fp); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250134 - head/sys/mips/include
Author: imp Date: Wed May 1 05:46:54 2013 New Revision: 250134 URL: http://svnweb.freebsd.org/changeset/base/250134 Log: Import virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h, expand the %sccs.include.redist.c% directive with the standard 3-clause license, and add $FreeBSD$ to keep the commit script happy. # This may break some mips stuff, which will be fixed in the next commit. Modified: head/sys/mips/include/regdef.h Modified: head/sys/mips/include/regdef.h == --- head/sys/mips/include/regdef.h Wed May 1 05:14:59 2013 (r250133) +++ head/sys/mips/include/regdef.h Wed May 1 05:46:54 2013 (r250134) @@ -1,86 +1,67 @@ -/*- - * Copyright (c) 2001, Juniper Networks, Inc. - * All rights reserved. - * Truman Joe, February 2001. +/* + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. * - * regdef.h -- MIPS register definitions. + * This code is derived from software contributed to Berkeley by + * Ralph Campbell. This file is derived from the MIPS RISC + * Architecture book by Gerry Kane. * - * JNPR: regdef.h,v 1.3 2006/08/07 05:38:57 katta - * $FreeBSD$ - */ - -#ifndef _MACHINE_REGDEF_H_ -#define_MACHINE_REGDEF_H_ - -#include /* For API selection */ - -#if defined(__ASSEMBLER__) -/* General purpose CPU register names */ -#definezero$0 /* wired zero */ -#defineAT $at /* assembler temp */ -#definev0 $2 /* return value */ -#definev1 $3 -#definea0 $4 /* argument registers */ -#definea1 $5 -#definea2 $6 -#definea3 $7 -#if defined(__mips_n32) || defined(__mips_n64) -#definea4 $8 -#definea5 $9 -#definea6 $10 -#definea7 $11 -#definet0 $12 /* Temp regs, not saved accross subroutine calls */ -#definet1 $13 -#definet2 $14 -#definet3 $15 -#else -#definet0 $8 /* caller saved */ -#definet1 $9 -#definet2 $10 -#definet3 $11 -#definet4 $12 /* caller saved - 32 bit env arg reg 64 bit */ -#definet5 $13 -#definet6 $14 -#definet7 $15 -#endif -#defines0 $16 /* callee saved */ -#defines1 $17 -#defines2 $18 -#defines3 $19 -#defines4 $20 -#defines5 $21 -#defines6 $22 -#defines7 $23 -#definet8 $24 /* code generator */ -#definet9 $25 -#definek0 $26 /* kernel temporary */ -#definek1 $27 -#definegp $28 /* global pointer */ -#definesp $29 /* stack pointer */ -#definefp $30 /* frame pointer */ -#defines8 $30 /* callee saved */ -#definera $31 /* return address */ - -/* - * These are temp registers whose names can be used in either the old - * or new ABI, although they map to different physical registers. In - * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. + * 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. + * 4. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. * - * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 - * should be used only when we need more than t0-t3. + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * @(#)regdef.h8.1 (Berkeley) 06/10/93 + * $FreeBSD$
svn commit: r250135 - head/sys/mips/include
Author: imp Date: Wed May 1 05:48:32 2013 New Revision: 250135 URL: http://svnweb.freebsd.org/changeset/base/250135 Log: Add the standard #ifdef header protection. Modified: head/sys/mips/include/regdef.h Modified: head/sys/mips/include/regdef.h == --- head/sys/mips/include/regdef.h Wed May 1 05:46:54 2013 (r250134) +++ head/sys/mips/include/regdef.h Wed May 1 05:48:32 2013 (r250135) @@ -33,6 +33,9 @@ * $FreeBSD$ */ +#ifndef _MIPS_INCLUDE_REGDEF_H_ +#define _MIPS_INCLUDE_REGDEF_H_ + #define zero$0 /* always zero */ #define AT $at /* assembler temp */ #define v0 $2 /* return value */ @@ -65,3 +68,5 @@ #define sp $29 /* stack pointer */ #define s8 $30 /* one more callee saved */ #define ra $31 /* return address */ + +#endif /* _MIPS_INCLUDE_REGDEF_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r250134 - head/sys/mips/include
Warner, May I ask why you're bringing in the 4.4BSD version and not the NetBSD version, which already contained the appropriate ABI gunk? Do we really need to duplicate their work improving the file since 4.4BSD? Thanks, Juli. On Tue, Apr 30, 2013 at 10:46 PM, Warner Losh wrote: > Author: imp > Date: Wed May 1 05:46:54 2013 > New Revision: 250134 > URL: http://svnweb.freebsd.org/changeset/base/250134 > > Log: > Import virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h, > expand the %sccs.include.redist.c% directive with the standard > 3-clause license, and add $FreeBSD$ to keep the commit script happy. > > # This may break some mips stuff, which will be fixed in the next commit. > > Modified: > head/sys/mips/include/regdef.h > > Modified: head/sys/mips/include/regdef.h > == > --- head/sys/mips/include/regdef.h Wed May 1 05:14:59 2013 > (r250133) > +++ head/sys/mips/include/regdef.h Wed May 1 05:46:54 2013 > (r250134) > @@ -1,86 +1,67 @@ > -/*- > - * Copyright (c) 2001, Juniper Networks, Inc. > - * All rights reserved. > - * Truman Joe, February 2001. > +/* > + * Copyright (c) 1992, 1993 > + * The Regents of the University of California. All rights reserved. > * > - * regdef.h -- MIPS register definitions. > + * This code is derived from software contributed to Berkeley by > + * Ralph Campbell. This file is derived from the MIPS RISC > + * Architecture book by Gerry Kane. > * > - * JNPR: regdef.h,v 1.3 2006/08/07 05:38:57 katta > - * $FreeBSD$ > - */ > - > -#ifndef _MACHINE_REGDEF_H_ > -#define_MACHINE_REGDEF_H_ > - > -#include /* For API selection */ > - > -#if defined(__ASSEMBLER__) > -/* General purpose CPU register names */ > -#definezero$0 /* wired zero */ > -#defineAT $at /* assembler temp */ > -#definev0 $2 /* return value */ > -#definev1 $3 > -#definea0 $4 /* argument registers */ > -#definea1 $5 > -#definea2 $6 > -#definea3 $7 > -#if defined(__mips_n32) || defined(__mips_n64) > -#definea4 $8 > -#definea5 $9 > -#definea6 $10 > -#definea7 $11 > -#definet0 $12 /* Temp regs, not saved accross subroutine > calls */ > -#definet1 $13 > -#definet2 $14 > -#definet3 $15 > -#else > -#definet0 $8 /* caller saved */ > -#definet1 $9 > -#definet2 $10 > -#definet3 $11 > -#definet4 $12 /* caller saved - 32 bit env arg reg 64 bit */ > -#definet5 $13 > -#definet6 $14 > -#definet7 $15 > -#endif > -#defines0 $16 /* callee saved */ > -#defines1 $17 > -#defines2 $18 > -#defines3 $19 > -#defines4 $20 > -#defines5 $21 > -#defines6 $22 > -#defines7 $23 > -#definet8 $24 /* code generator */ > -#definet9 $25 > -#definek0 $26 /* kernel temporary */ > -#definek1 $27 > -#definegp $28 /* global pointer */ > -#definesp $29 /* stack pointer */ > -#definefp $30 /* frame pointer */ > -#defines8 $30 /* callee saved */ > -#definera $31 /* return address */ > - > -/* > - * These are temp registers whose names can be used in either the old > - * or new ABI, although they map to different physical registers. In > - * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. > + * 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. > + * 4. Neither the name of the University nor the names of its contributors > + *may be used to endorse or promote products derived from this software > + *without specific prior written permission. > * > - * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 > - * should be used only when we need more than t0-t3. > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, I
Re: svn commit: r250134 - head/sys/mips/include
On Apr 30, 2013, at 11:55 PM, Juli Mallett wrote: > Warner, > > May I ask why you're bringing in the 4.4BSD version and not the NetBSD > version, which already contained the appropriate ABI gunk? Do we > really need to duplicate their work improving the file since 4.4BSD? The NetBSD version didn't have the CSRG copyright, so I wanted to create a clear chain of modifications. I'll be done with that within the hour But it turns out I was confused about which file lacked a copyright (I was also looking at elf_machdep.h), so I'll just bring NetBSD's in now. Sorry for the churn... Warner > Thanks, > Juli. > > On Tue, Apr 30, 2013 at 10:46 PM, Warner Losh wrote: >> Author: imp >> Date: Wed May 1 05:46:54 2013 >> New Revision: 250134 >> URL: http://svnweb.freebsd.org/changeset/base/250134 >> >> Log: >> Import virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h, >> expand the %sccs.include.redist.c% directive with the standard >> 3-clause license, and add $FreeBSD$ to keep the commit script happy. >> >> # This may break some mips stuff, which will be fixed in the next commit. >> >> Modified: >> head/sys/mips/include/regdef.h >> >> Modified: head/sys/mips/include/regdef.h >> == >> --- head/sys/mips/include/regdef.h Wed May 1 05:14:59 2013 >> (r250133) >> +++ head/sys/mips/include/regdef.h Wed May 1 05:46:54 2013 >> (r250134) >> @@ -1,86 +1,67 @@ >> -/*- >> - * Copyright (c) 2001, Juniper Networks, Inc. >> - * All rights reserved. >> - * Truman Joe, February 2001. >> +/* >> + * Copyright (c) 1992, 1993 >> + * The Regents of the University of California. All rights reserved. >> * >> - * regdef.h -- MIPS register definitions. >> + * This code is derived from software contributed to Berkeley by >> + * Ralph Campbell. This file is derived from the MIPS RISC >> + * Architecture book by Gerry Kane. >> * >> - * JNPR: regdef.h,v 1.3 2006/08/07 05:38:57 katta >> - * $FreeBSD$ >> - */ >> - >> -#ifndef _MACHINE_REGDEF_H_ >> -#define_MACHINE_REGDEF_H_ >> - >> -#include /* For API selection */ >> - >> -#if defined(__ASSEMBLER__) >> -/* General purpose CPU register names */ >> -#definezero$0 /* wired zero */ >> -#defineAT $at /* assembler temp */ >> -#definev0 $2 /* return value */ >> -#definev1 $3 >> -#definea0 $4 /* argument registers */ >> -#definea1 $5 >> -#definea2 $6 >> -#definea3 $7 >> -#if defined(__mips_n32) || defined(__mips_n64) >> -#definea4 $8 >> -#definea5 $9 >> -#definea6 $10 >> -#definea7 $11 >> -#definet0 $12 /* Temp regs, not saved accross subroutine >> calls */ >> -#definet1 $13 >> -#definet2 $14 >> -#definet3 $15 >> -#else >> -#definet0 $8 /* caller saved */ >> -#definet1 $9 >> -#definet2 $10 >> -#definet3 $11 >> -#definet4 $12 /* caller saved - 32 bit env arg reg 64 bit >> */ >> -#definet5 $13 >> -#definet6 $14 >> -#definet7 $15 >> -#endif >> -#defines0 $16 /* callee saved */ >> -#defines1 $17 >> -#defines2 $18 >> -#defines3 $19 >> -#defines4 $20 >> -#defines5 $21 >> -#defines6 $22 >> -#defines7 $23 >> -#definet8 $24 /* code generator */ >> -#definet9 $25 >> -#definek0 $26 /* kernel temporary */ >> -#definek1 $27 >> -#definegp $28 /* global pointer */ >> -#definesp $29 /* stack pointer */ >> -#definefp $30 /* frame pointer */ >> -#defines8 $30 /* callee saved */ >> -#definera $31 /* return address */ >> - >> -/* >> - * These are temp registers whose names can be used in either the old >> - * or new ABI, although they map to different physical registers. In >> - * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. >> + * 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. >> + * 4. Neither the name of the University nor the names of its contributors >> + *may be used to endorse or promote products derived from this software >> + *without specific prior
svn commit: r250136 - head/sys/mips/include
Author: imp Date: Wed May 1 06:22:50 2013 New Revision: 250136 URL: http://svnweb.freebsd.org/changeset/base/250136 Log: Import NetBSD's version, which is perfectly fine. Submitted by: jmallet@ Modified: head/sys/mips/include/regdef.h Modified: head/sys/mips/include/regdef.h == --- head/sys/mips/include/regdef.h Wed May 1 05:48:32 2013 (r250135) +++ head/sys/mips/include/regdef.h Wed May 1 06:22:50 2013 (r250136) @@ -1,6 +1,8 @@ +/* $NetBSD: regdef.h,v 1.12 2005/12/11 12:18:09 christos Exp $ */ + /* * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. This file is derived from the MIPS RISC @@ -14,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * @@ -29,44 +31,80 @@ * 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. - * @(#)regdef.h8.1 (Berkeley) 06/10/93 + * + * @(#)regdef.h8.1 (Berkeley) 6/10/93 * $FreeBSD$ */ -#ifndef _MIPS_INCLUDE_REGDEF_H_ -#define _MIPS_INCLUDE_REGDEF_H_ +#ifndef _MIPS_REGDEF_H +#define _MIPS_REGDEF_H + +#include /* for API selection */ + +#if defined(__ASSEMBLER__) +#define zero $0 /* always zero */ +#define AT $at /* assembler temporary */ +#define v0 $2 /* return value */ +#define v1 $3 +#define a0 $4 /* argument registers */ +#define a1 $5 +#define a2 $6 +#define a3 $7 +#if defined(__mips_n32) || defined(__mips_n64) +#definea4 $8 +#definea5 $9 +#definea6 $10 +#definea7 $11 +#definet0 $12 /* temp registers (not saved across subroutine calls) */ +#definet1 $13 +#definet2 $14 +#definet3 $15 +#else +#define t0 $8 /* temp registers (not saved across subroutine calls) */ +#define t1 $9 +#define t2 $10 +#define t3 $11 +#define t4 $12 +#define t5 $13 +#define t6 $14 +#define t7 $15 +#endif /* __mips_n32 || __mips_n64 */ +#define s0 $16 /* saved across subroutine calls (callee saved) */ +#define s1 $17 +#define s2 $18 +#define s3 $19 +#define s4 $20 +#define s5 $21 +#define s6 $22 +#define s7 $23 +#define t8 $24 /* two more temporary registers */ +#define t9 $25 +#define k0 $26 /* kernel temporary */ +#define k1 $27 +#define gp $28 /* global pointer */ +#define sp $29 /* stack pointer */ +#define s8 $30 /* one more callee saved */ +#define ra $31 /* return address */ -#define zero$0 /* always zero */ -#define AT $at /* assembler temp */ -#define v0 $2 /* return value */ -#define v1 $3 -#define a0 $4 /* argument registers */ -#define a1 $5 -#define a2 $6 -#define a3 $7 -#define t0 $8 /* temp registers (not saved across subroutine calls) */ -#define t1 $9 -#define t2 $10 -#define t3 $11 -#define t4 $12 -#define t5 $13 -#define t6 $14 -#define t7 $15 -#define s0 $16 /* saved across subroutine calls (callee saved) */ -#define s1 $17 -#define s2 $18 -#define s3 $19 -#define s4 $20 -#define s5 $21 -#define s6 $22 -#define s7 $23 -#define t8 $24 /* two more temp registers */ -#define t9 $25 -#define k0 $26 /* kernel temporary */ -#define k1 $27 -#define gp $28 /* global pointer */ -#define sp $29 /* stack pointer */ -#define s8 $30 /* one more callee saved */ -#define ra $31 /* return address */ +/* + * These are temp registers whose names can be used in either the old + * or new ABI, although they map to different physical registers. In + * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. + * + * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 + * should be used only when we need more than t0-t3. + */ +#if defined(__mips_n32) || defined(__mips_n64) +#defineta0 $8 +#defineta1 $9 +#defineta2 $10 +#defineta3 $11 +#else +#defineta0 $12 +#defineta1 $13 +
svn commit: r250137 - head/sys/mips/mips
Author: imp Date: Wed May 1 06:55:13 2013 New Revision: 250137 URL: http://svnweb.freebsd.org/changeset/base/250137 Log: Remove asm.h dependency in a hackish way. Fixed comment. Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c == --- head/sys/mips/mips/vm_machdep.c Wed May 1 06:22:50 2013 (r250136) +++ head/sys/mips/mips/vm_machdep.c Wed May 1 06:55:13 2013 (r250137) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -83,6 +82,18 @@ __FBSDID("$FreeBSD$"); #defineNSFBUFS (512 + maxusers * 16) #endif +/* Duplicated from asm.h */ +#if defined(__mips_o32) +#defineSZREG 4 +#else +#defineSZREG 8 +#endif +#if defined(__mips_o32) || defined(__mips_o64) +#defineCALLFRAME_SIZ (SZREG * (4 + 2)) +#elif defined(__mips_n32) || defined(__mips_n64) +#defineCALLFRAME_SIZ (SZREG * 4) +#endif + #ifndef __mips_n64 static voidsf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); @@ -437,10 +448,11 @@ cpu_set_upcall_kse(struct thread *td, vo register_t sp; /* - * At the point where a function is called, sp must be 8 - * byte aligned[for compatibility with 64-bit CPUs] - * in ``See MIPS Run'' by D. Sweetman, p. 269 - * align stack */ +* At the point where a function is called, sp must be 8 +* byte aligned[for compatibility with 64-bit CPUs] +* in ``See MIPS Run'' by D. Sweetman, p. 269 +* align stack +*/ sp = ((register_t)(intptr_t)(stack->ss_sp + stack->ss_size) & ~0x7) - CALLFRAME_SIZ; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250138 - in head/sys/mips: include mips
Author: imp Date: Wed May 1 06:57:46 2013 New Revision: 250138 URL: http://svnweb.freebsd.org/changeset/base/250138 Log: Don't include asm.h in non-asm files. Remove #define to get kludges that asm.h used to define Move clever macros to access assembler instructions to trap.c Remove __ASSEMBLER__ ifdefs in regdef.h: they aren't needed anymore. Modified: head/sys/mips/include/asm.h head/sys/mips/include/regdef.h head/sys/mips/mips/db_interface.c head/sys/mips/mips/trap.c Modified: head/sys/mips/include/asm.h == --- head/sys/mips/include/asm.h Wed May 1 06:55:13 2013(r250137) +++ head/sys/mips/include/asm.h Wed May 1 06:57:46 2013(r250138) @@ -56,9 +56,7 @@ #ifndef _MACHINE_ASM_H_ #define_MACHINE_ASM_H_ -#ifndef NO_REG_DEFS #include -#endif #include #include @@ -111,26 +109,6 @@ #defineWARN_REFERENCES(_sym,_msg) \ .section .gnu.warning. ## _sym ; .ascii _msg ; .text -/* - * These are temp registers whose names can be used in either the old - * or new ABI, although they map to different physical registers. In - * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. - * - * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 - * should be used only when we need more than t0-t3. - */ -#if defined(__mips_n32) || defined(__mips_n64) -#define ta0 $8 -#define ta1 $9 -#define ta2 $10 -#define ta3 $11 -#else -#define ta0 $12 -#define ta1 $13 -#define ta2 $14 -#define ta3 $15 -#endif /* __mips_n32 || __mips_n64 */ - #ifdef __ELF__ # define _C_LABEL(x)x #else @@ -674,97 +652,6 @@ _C_LABEL(x): #defineUSE_ALT_CP(a) .cplocal a #endif /* __mips_n32 || __mips_n64 */ -#definemfc0_macro(data, spr) \ - __asm __volatile ("mfc0 %0, $%1"\ - : "=r" (data) /* outputs */ \ - : "i" (spr)); /* inputs */ - -#definemtc0_macro(data, spr) \ - __asm __volatile ("mtc0 %0, $%1"\ - : /* outputs */ \ - : "r" (data), "i" (spr)); /* inputs */ - -#definecfc0_macro(data, spr) \ - __asm __volatile ("cfc0 %0, $%1"\ - : "=r" (data) /* outputs */ \ - : "i" (spr)); /* inputs */ - -#definectc0_macro(data, spr) \ - __asm __volatile ("ctc0 %0, $%1"\ - : /* outputs */ \ - : "r" (data), "i" (spr)); /* inputs */ - - -#definelbu_macro(data, addr) \ - __asm __volatile ("lbu %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#definelb_macro(data, addr) \ - __asm __volatile ("lb %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#definelwl_macro(data, addr) \ - __asm __volatile ("lwl %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#definelwr_macro(data, addr) \ - __asm __volatile ("lwr %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#defineldl_macro(data, addr) \ - __asm __volatile ("ldl %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#defineldr_macro(data, addr) \ - __asm __volatile ("ldr %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ - -#definesb_macro(data, addr) \ - __asm __volatile ("sb %0, 0x0(%1)" \ - : /* outputs */ \ -