Re: svn commit: r205487 - head/sys/vm
On 22 March 2010 23:39, Kip Macy wrote: > Author: kmacy > Date: Mon Mar 22 22:39:32 2010 > New Revision: 205487 > URL: http://svn.freebsd.org/changeset/base/205487 > > Log: > - enable alignment on amd64 only Does this mean you have determined that aligning these structures is not as beneficial on i386 or is there something else going on? ___ 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: r205487 - head/sys/vm
The size change causes the initialization path to change in a way that currently causes crashes. On Mar 23, 2010 2:57 AM, "Ivan Voras" wrote: On 22 March 2010 23:39, Kip Macy wrote: > Author: kmacy > Date: Mon Mar 22 22:39... Does this mean you have determined that aligning these structures is not as beneficial on i386 or is there something else going on? ___ 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: r205512 - head/lib/libpmc
Author: rpaulo Date: Tue Mar 23 11:33:08 2010 New Revision: 205512 URL: http://svn.freebsd.org/changeset/base/205512 Log: Finish the much belated Intel XScale hwpmc(4) man page. Modified: head/lib/libpmc/pmc.xscale.3 Modified: head/lib/libpmc/pmc.xscale.3 == --- head/lib/libpmc/pmc.xscale.3Tue Mar 23 09:58:59 2010 (r205511) +++ head/lib/libpmc/pmc.xscale.3Tue Mar 23 11:33:08 2010 (r205512) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Rui Paulo. All rights reserved. +.\" Copyright (c) 2009, 2010 Rui Paulo. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,7 +9,7 @@ .\"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 Joseph Koshy ``as is'' and +.\" This software is provided by Rui Paulo ``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 Joseph Koshy be liable @@ -37,3 +37,120 @@ family CPUs .Sh SYNOPSIS .In pmc.h .Sh DESCRIPTION +.Tn Intel XScale +CPUs are ARM CPUs based on the ARMv5e core. +.Pp +Second generation cores have 2 counters, while third generation cores +have 4 counters. +Third generation cores also have an increased number of PMC events. +.Pp +.Tn Intel XScale +PMCs are documented in +.Rs +.%B "3rd Generation Intel XScale Microarchitecture Developer's Manual" +.%D May 2007 +.Re +.Ss Event Specifiers (Programmable PMCs) +.Tn Intel XScale +programmable PMCs support the following events: +.Bl -tag -width indent +.It Li IC_FETCH +External memory fetch due to L1 instruction cache miss. +.It Li IC_MISS +Instruction cache or TLB miss. +.It Li DATA_DEPENDENCY_STALLED +A data dependency stalled +.It Li ITLB_MISS +Instruction TLB miss. +.It Li DTLB_MISS +Data TLB miss. +.It Li BRANCH_RETIRED +Branch instruction retired (executed). +.It Li BRANCH_MISPRED +Branch mispredicted. +.It Li INSTR_RETIRED +Instructions retired (executed). +.It Li DC_FULL_CYCLE +L1 data cache buffer full stall. +Event occurs on every cycle the +condition is present. +.It Li DC_FULL_CONTIG +L1 data cache buffer full stall. +Event occurs once for each contiguous sequence of this type of stall. +.It Li DC_ACCESS +L1 data cache access, not including cache operations. +.It Li DC_MISS +L1 data cache miss, not including cache operations. +.It Li DC_WRITEBACK +L1 data cache write-back. +Occurs for each cache line that's written back from the cache. +.It Li PC_CHANGE +Software changed the program counter. +.It Li BRANCH_RETIRED_ALL +Branch instruction retired (executed). +This event counts all branch instructions, indirect or direct. +.It Li INSTR_CYCLE +Count the number of microarchitecture cycles each instruction requires +to issue. +.It Li CP_STALL +Coprocessor stalled the instruction pipeline. +.It Li PC_CHANGE_ALL +Software changed the program counter (includes exceptions). +.It Li PIPELINE_FLUSH +Pipeline flushes due to mispredictions or exceptions. +.It Li BACKEND_STALL +Backend stalled the instruction pipeline. +.It Li MULTIPLIER_USE +Multiplier used. +.It Li MULTIPLIER_STALLED +Multiplier stalled the instruction pipeline. +.It Li DATA_CACHE_STALLED +Data cache stalled the instruction pipeline. +.It Li L2_CACHE_REQ +L2 cache request, not inclusing cache operations. +.It Li L2_CACHE_MISS +L2 cache miss, not including cache operations. +.It Li ADDRESS_BUS_TRANS +Address bus transaction. +.It Li SELF_ADDRESS_BUS_TRANS +Self initiated address bus transaction. +.It Li DATA_BUS_TRANS +Data bus transaction. +.El +.Ss Event Name Aliases +The following table shows the mapping between the PMC-independent +aliases supported by +.Lb libpmc +and the underlying hardware events used. +.Bl -column "branch-mispredicts" "BRANCH_MISPRED" +.It Em Alias Ta Em Event Ta +.It Li branches Ta Li BRANCH_RETIRED Ta +.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta +.It Li dc-misses Ta Li DC_MISS Ta +.It Li ic-misses Ta Li IC_MISS Ta +.It Li instructions Ta Li INSTR_RETIRED Ta +.El +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmc_cpuinfo 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 +.Sh CAVEATS +The Intel XScale code does not yet support sampling. +.Sh HISTORY +The +.Nm pmc +library first appeared in +.Fx 6.0 . +Intel XScale support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Lb libpmc +library was written by +.An "Joseph Koshy" +.Aq jko...@freebsd.org . +.Pp +Intel XScale support was added by +.An "Rui Paulo" +.Aq rpa...@freebsd.org . ___ 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: r205513 - head/sys/net80211
Author: rpaulo Date: Tue Mar 23 12:03:09 2010 New Revision: 205513 URL: http://svn.freebsd.org/changeset/base/205513 Log: Add a new field for extended HT capabilities. Submitted by: Alexander Egorenkov MFC after:2 weeks Sponsored by: iXsystems, inc. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Tue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211.c Tue Mar 23 12:03:09 2010 (r205513) @@ -404,6 +404,7 @@ ieee80211_vap_setup(struct ieee80211com vap->iv_flags_ven = ic->ic_flags_ven; vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE; vap->iv_htcaps = ic->ic_htcaps; + vap->iv_htextcaps = ic->ic_htextcaps; vap->iv_opmode = opmode; vap->iv_caps |= ieee80211_opcap[opmode]; switch (opmode) { Modified: head/sys/net80211/ieee80211_ht.c == --- head/sys/net80211/ieee80211_ht.cTue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211_ht.cTue Mar 23 12:03:09 2010 (r205513) @@ -2346,7 +2346,7 @@ ieee80211_add_htcap_body(uint8_t *frm, s frm += 2; \ } while (0) struct ieee80211vap *vap = ni->ni_vap; - uint16_t caps; + uint16_t caps, extcaps; int rxmax, density; /* HT capabilities */ @@ -2404,8 +2404,17 @@ ieee80211_add_htcap_body(uint8_t *frm, s */ ieee80211_set_htrates(frm, &ieee80211_rateset_11n); - frm += sizeof(struct ieee80211_ie_htcap) - + frm += __offsetof(struct ieee80211_ie_htcap, hc_extcap) - __offsetof(struct ieee80211_ie_htcap, hc_mcsset); + + /* HT extended capabilities */ + extcaps = vap->iv_htextcaps & 0x; + + ADDSHORT(frm, extcaps); + + frm += sizeof(struct ieee80211_ie_htcap) - + __offsetof(struct ieee80211_ie_htcap, hc_txbf); + return frm; #undef ADDSHORT } Modified: head/sys/net80211/ieee80211_var.h == --- head/sys/net80211/ieee80211_var.h Tue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211_var.h Tue Mar 23 12:03:09 2010 (r205513) @@ -137,6 +137,7 @@ struct ieee80211com { uint32_tic_flags_ven; /* vendor state flags */ uint32_tic_caps;/* capabilities */ uint32_tic_htcaps; /* HT capabilities */ + uint32_tic_htextcaps; /* HT extended capabilities */ uint32_tic_cryptocaps; /* crypto capabilities */ uint8_t ic_modecaps[2]; /* set of mode capabilities */ uint8_t ic_promisc; /* vap's needing promisc mode */ @@ -313,7 +314,8 @@ struct ieee80211com { int batimeout, int baseqctl); void(*ic_ampdu_rx_stop)(struct ieee80211_node *, struct ieee80211_rx_ampdu *); - uint64_tic_spare[8]; + uint64_tic_spare[7]; + uint32_tic_spare2; }; struct ieee80211_aclator; @@ -340,6 +342,7 @@ struct ieee80211vap { uint32_tiv_flags_ven; /* vendor state flags */ uint32_tiv_caps;/* capabilities */ uint32_tiv_htcaps; /* HT capabilities */ + uint32_tiv_htextcaps; /* HT extended capabilities */ enum ieee80211_opmode iv_opmode; /* operation mode */ enum ieee80211_stateiv_state; /* state machine state */ enum ieee80211_stateiv_nstate; /* pending state */ ___ 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: r205514 - head/sbin/ifconfig
Author: rpaulo Date: Tue Mar 23 12:05:25 2010 New Revision: 205514 URL: http://svn.freebsd.org/changeset/base/205514 Log: Add a missing LINE_BREAK() after printing the roaming parameters in verbose mode. Sponsored by: iXsystems, inc. MFC after:2 weeks Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c == --- head/sbin/ifconfig/ifieee80211.cTue Mar 23 12:03:09 2010 (r205513) +++ head/sbin/ifconfig/ifieee80211.cTue Mar 23 12:05:25 2010 (r205514) @@ -4509,6 +4509,7 @@ end: } else { LINE_BREAK(); list_roam(s); + LINE_BREAK(); } } ___ 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: r205515 - head/sys/net
Author: rpaulo Date: Tue Mar 23 13:15:11 2010 New Revision: 205515 URL: http://svn.freebsd.org/changeset/base/205515 Log: Add MCS to the list of media types. Sponsored by: iXsystems, inc. Modified: head/sys/net/if_media.h Modified: head/sys/net/if_media.h == --- head/sys/net/if_media.h Tue Mar 23 12:05:25 2010(r205514) +++ head/sys/net/if_media.h Tue Mar 23 13:15:11 2010(r205515) @@ -462,6 +462,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM3, "OFDM/3Mbps" }, \ { IFM_IEEE80211_OFDM4, "OFDM/4.5Mbps" },\ { IFM_IEEE80211_OFDM27, "OFDM/27Mbps" },\ + { IFM_IEEE80211_MCS, "MCS" }, \ { 0, NULL },\ } @@ -500,6 +501,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM3, "OFDM3" }, \ { IFM_IEEE80211_OFDM4, "OFDM4.5" }, \ { IFM_IEEE80211_OFDM27, "OFDM27" }, \ + { IFM_IEEE80211_MCS, "MCS" }, \ { 0, 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: r205487 - head/sys/vm
On Tuesday 23 March 2010 6:33:51 am K. Macy wrote: > The size change causes the initialization path to change in a way that > currently causes crashes. Are you planning on debugging it further? Does UMA_BOOTPAGES or NKPT need to be larger? > On Mar 23, 2010 2:57 AM, "Ivan Voras" wrote: > > On 22 March 2010 23:39, Kip Macy wrote: > > Author: kmacy > > Date: Mon Mar 22 22:39... > Does this mean you have determined that aligning these structures is > not as beneficial on i386 or is there something else going on? > -- John Baldwin ___ 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: r205516 - head/sys/net80211
Author: rpaulo Date: Tue Mar 23 14:31:31 2010 New Revision: 205516 URL: http://svn.freebsd.org/changeset/base/205516 Log: When receiving a management frame, pass the mbuf to bpf before calling iv_recv_mgmt(). iv_recv_mgmt() will generate management frame responses and pass them to bpf before the management frame that triggered the response. PR: 144323 Submitted by: Alexander Egorenkov MFC after:2 weeks Sponsored by: iXsystems, inc. Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c == --- head/sys/net80211/ieee80211_hostap.cTue Mar 23 13:15:11 2010 (r205515) +++ head/sys/net80211/ieee80211_hostap.cTue Mar 23 14:31:31 2010 (r205516) @@ -883,6 +883,9 @@ hostap_input(struct ieee80211_node *ni, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } + if (ieee80211_radiotap_active_vap(vap)) + ieee80211_radiotap_rx(vap, m); + need_tap = 0; vap->iv_recv_mgmt(ni, m, subtype, rssi, nf); goto out; ___ 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: r205487 - head/sys/vm
On Tue, Mar 23, 2010 at 6:54 AM, John Baldwin wrote: > On Tuesday 23 March 2010 6:33:51 am K. Macy wrote: >> The size change causes the initialization path to change in a way that >> currently causes crashes. > > Are you planning on debugging it further? Does UMA_BOOTPAGES or NKPT need to > be larger? > >> On Mar 23, 2010 2:57 AM, "Ivan Voras" wrote: >> >> On 22 March 2010 23:39, Kip Macy wrote: >> > Author: kmacy >> > Date: Mon Mar 22 22:39... >> Does this mean you have determined that aligning these structures is >> not as beneficial on i386 or is there something else going on? >> > > -- > John Baldwin >From a mail I sent to Jeff: This pushes things through keg_large_init (whereas previously it went through keg_small_init) which breaks things on i386. I can workaround the fact that hash_alloc gets called before hashzone is initialized but trying to allocate a slab while during initialization of the slab zone is problematic. Suggestions are welcome. (gdb) bt #0 keg_alloc_slab (keg=0xc0ab3000, zone=0xc0547c80, wait=2) at /usr/home/kmacy/svn_checkouts/head_flowtable/sys/vm/uma_core.c:823 #1 0xc02dbfaf in keg_fetch_slab (keg=0xc0ab3000, zone=0xc0547c80, flags=2) at /usr/home/kmacy/svn_checkouts/head_flowtable/sys/vm/uma_core.c:2159 #2 0xc02dc2cc in zone_fetch_slab (zone=0xc0547c80, keg=0xc0ab3000, flags=2) at /usr/home/kmacy/svn_checkouts/head_flowtable/sys/vm/uma_core.c:2219 #3 0xc02db3ab in zone_alloc_item (zone=0xc0547c80, udata=0xc073cc48, flags=2) at /usr/home/kmacy/svn_checkouts/head_flowtable/sys/vm/uma_core.c:2475 #4 0xc02db74f in uma_zcreate (name=0xc037ef33 "UMA Slabs", size=284, ctor=0, dtor=0, uminit=0, fini=0, align=3, flags=536870912) at /usr/home/kmacy/svn_checkouts/head_flowtable/sys/vm/uma_core.c:1827 #5 0xc02dcc6b in uma_startup (bootmem=0xc0a64000, boot_pages=80) ___ 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: r205520 - head/share/man/man3
Author: delphij Date: Tue Mar 23 18:00:50 2010 New Revision: 205520 URL: http://svn.freebsd.org/changeset/base/205520 Log: Correct cross reference. MFC after:2 weeks Modified: head/share/man/man3/pthread_affinity_np.3 Modified: head/share/man/man3/pthread_affinity_np.3 == --- head/share/man/man3/pthread_affinity_np.3 Tue Mar 23 17:14:50 2010 (r205519) +++ head/share/man/man3/pthread_affinity_np.3 Tue Mar 23 18:00:50 2010 (r205520) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2010 +.Dd March 23, 2010 .Dt PTHREAD_AFFINITY_NP 3 .Os .Sh NAME @@ -125,8 +125,8 @@ operation. .Xr cpuset_setid 2 , .Xr CPU_SET 3 , .Xr pthread 3 , -.Xr pthread_attr_get_affinity_np 3 , -.Xr pthread_attr_set_affinity_np 3 +.Xr pthread_attr_getaffinity_np 3 , +.Xr pthread_attr_setaffinity_np 3 .Sh STANDARDS The .Nm pthread_getaffinity_np ___ 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: r205444 - head/sys/i386/i386
* Ed Maste wrote: > I was just about to follow up with a comment to that effect. We do want > it to become a panic, but I would prefer to hold off until we address > the known issue with padlock(4). I have seen this message appear when using the ndisulator as well. How are we going to solve it in this case? Could the ndisulator be extended to prepare a FPU context using kib's new API? -- Ed Schouten WWW: http://80386.nl/ pgpECHOkjymlz.pgp Description: PGP signature
svn commit: r205527 - in head/sys/powerpc: booke powerpc
Author: marcel Date: Tue Mar 23 19:30:56 2010 New Revision: 205527 URL: http://svn.freebsd.org/changeset/base/205527 Log: Enable power management for E500 cores. Use "doze" for now to make sure the caches remain coherent. For single-core configurations and with busdma changes we could eventually switch to "nap" and force a D-cache invalidation as part of the DMA completion. To this end, clear PSL_WE until after we handled the decrementer or external interrupt as it tells us whether we just woke up or not. Modified: head/sys/powerpc/booke/interrupt.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/booke/interrupt.c == --- head/sys/powerpc/booke/interrupt.c Tue Mar 23 19:30:15 2010 (r205526) +++ head/sys/powerpc/booke/interrupt.c Tue Mar 23 19:30:56 2010 (r205527) @@ -123,6 +123,7 @@ powerpc_decr_interrupt(struct trapframe decr_intr(framep); atomic_subtract_int(&td->td_intr_nesting_level, 1); critical_exit(); + framep->srr1 &= ~PSL_WE; } /* @@ -135,4 +136,5 @@ powerpc_extr_interrupt(struct trapframe critical_enter(); PIC_DISPATCH(pic, framep); critical_exit(); + framep->srr1 &= ~PSL_WE; } Modified: head/sys/powerpc/booke/machdep.c == --- head/sys/powerpc/booke/machdep.cTue Mar 23 19:30:15 2010 (r205526) +++ head/sys/powerpc/booke/machdep.cTue Mar 23 19:30:56 2010 (r205527) @@ -706,6 +706,7 @@ cpu_idle (int busy) register_t msr; msr = mfmsr(); + #ifdef INVARIANTS if ((msr & PSL_EE) != PSL_EE) { struct thread *td = curthread; @@ -713,19 +714,10 @@ cpu_idle (int busy) panic("ints disabled in idleproc!"); } #endif -#if 0 - /* -* Freescale E500 core RM section 6.4.1 -*/ - msr = msr | PSL_WE; - __asm__(" msync;" - " mtmsr %0;" - " isync;" - "loop: b loop" : - /* no output */ : - "r" (msr)); -#endif + /* Freescale E500 core RM section 6.4.1. */ + msr = msr | PSL_WE; + __asm __volatile("msync; mtmsr %0; isync" :: "r" (msr)); } int Modified: head/sys/powerpc/powerpc/cpu.c == --- head/sys/powerpc/powerpc/cpu.c Tue Mar 23 19:30:15 2010 (r205526) +++ head/sys/powerpc/powerpc/cpu.c Tue Mar 23 19:30:56 2010 (r205527) @@ -433,6 +433,13 @@ cpu_e500_setup(int cpuid, uint16_t vers) register_t hid0; hid0 = mfspr(SPR_HID0); + + /* Programe power-management mode. */ + hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); + hid0 |= HID0_DOZE; + + mtspr(SPR_HID0, hid0); + printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK); } ___ 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: r205444 - head/sys/i386/i386
On Tue, Mar 23, 2010 at 08:21:31PM +0100, Ed Schouten wrote: > * Ed Maste wrote: > > I was just about to follow up with a comment to that effect. We do want > > it to become a panic, but I would prefer to hold off until we address > > the known issue with padlock(4). > > I have seen this message appear when using the ndisulator as well. How > are we going to solve it in this case? Could the ndisulator be extended > to prepare a FPU context using kib's new API? I looked at http://msdn.microsoft.com/en-us/library/aa489566.aspx after someone mentioned ndisulator. It seems that windows requires that i386 drivers carefully use braces for use of FPU, while amd64 code allowed to use it freely. That suggests that windows clears TS on kernel mode entry or driver calls, that seems to be too wastefull. I would very much appreciate the help with changing both ndis and padlock to use fpu_kern_enter/leave KPI, since I do not use them. I need some time to polish the patch before. pgpj6NucV4WJ7.pgp Description: PGP signature
svn commit: r205534 - head/sys/dev/ppc
Author: delphij Date: Tue Mar 23 20:08:18 2010 New Revision: 205534 URL: http://svn.freebsd.org/changeset/base/205534 Log: Add PCI ID for MCS9901's parallel port. PR: kern/144713 Submitted by: gcooper MFC after:2 weeks Modified: head/sys/dev/ppc/ppc_pci.c Modified: head/sys/dev/ppc/ppc_pci.c == --- head/sys/dev/ppc/ppc_pci.c Tue Mar 23 19:58:20 2010(r205533) +++ head/sys/dev/ppc/ppc_pci.c Tue Mar 23 20:08:18 2010(r205534) @@ -89,6 +89,7 @@ static struct pci_id pci_ids[] = { { 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 }, { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 }, { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, + { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x } }; ___ 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: r205535 - head/sys/powerpc/mpc85xx
Author: marcel Date: Tue Mar 23 20:12:53 2010 New Revision: 205535 URL: http://svn.freebsd.org/changeset/base/205535 Log: Add definitions for a 4th PCI host controller. No Freescale processor has all 4 implemented, but across the processors we now support all the combinations. For example, the MPC8533 doesn't have a PCI controller at 0xA, but does at 0xB. Modified: head/sys/powerpc/mpc85xx/ocpbus.c head/sys/powerpc/mpc85xx/ocpbus.h Modified: head/sys/powerpc/mpc85xx/ocpbus.c == --- head/sys/powerpc/mpc85xx/ocpbus.c Tue Mar 23 20:08:18 2010 (r205534) +++ head/sys/powerpc/mpc85xx/ocpbus.c Tue Mar 23 20:12:53 2010 (r205535) @@ -152,6 +152,10 @@ ocpbus_write_law(int trgt, int type, u_l addr = 0xA000; size = 0x1000; break; + case OCP85XX_TGTIF_PCI3: + addr = 0xB000; + size = 0x1000; + break; default: return (EINVAL); } @@ -170,6 +174,10 @@ ocpbus_write_law(int trgt, int type, u_l addr = 0xfee2; size = 0x0001; break; + case OCP85XX_TGTIF_PCI3: + addr = 0xfee3; + size = 0x0001; + break; default: return (EINVAL); } @@ -188,7 +196,7 @@ static int ocpbus_probe(device_t dev) { - device_set_desc(dev, "On-Chip Peripherals bus"); + device_set_desc(dev, "Freescale on-chip peripherals bus"); return (BUS_PROBE_DEFAULT); } @@ -210,6 +218,7 @@ ocpbus_attach(device_t dev) ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 0); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 1); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 2); + ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 3); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 0); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 1); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 2); @@ -338,6 +347,10 @@ const struct ocp_resource mpc8555_resour OCP85XX_PCI_SIZE}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI2}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_MEMORY, 0, OCP85XX_PCI3_OFF, + OCP85XX_PCI_SIZE}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI3}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI3}, {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCP85XX_LBC_OFF, OCP85XX_LBC_SIZE}, Modified: head/sys/powerpc/mpc85xx/ocpbus.h == --- head/sys/powerpc/mpc85xx/ocpbus.h Tue Mar 23 20:08:18 2010 (r205534) +++ head/sys/powerpc/mpc85xx/ocpbus.h Tue Mar 23 20:12:53 2010 (r205535) @@ -50,6 +50,7 @@ #defineOCP85XX_TGTIF_PCI0 0 #defineOCP85XX_TGTIF_PCI1 1 #defineOCP85XX_TGTIF_PCI2 2 +#defineOCP85XX_TGTIF_PCI3 3 #defineOCP85XX_TGTIF_LBC 4 #defineOCP85XX_TGTIF_RAM_INTL 11 #defineOCP85XX_TGTIF_RIO 12 @@ -86,6 +87,7 @@ #defineOCP85XX_PCI0_OFF0x08000 #defineOCP85XX_PCI1_OFF0x09000 #defineOCP85XX_PCI2_OFF0x0A000 +#defineOCP85XX_PCI3_OFF0x0B000 #defineOCP85XX_PCI_SIZE0x1000 #defineOCP85XX_TSEC0_OFF 0x24000 #defineOCP85XX_TSEC1_OFF 0x25000 ___ 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: r205444 - head/sys/i386/i386
On 3/23/10, Kostik Belousov wrote: > On Tue, Mar 23, 2010 at 08:21:31PM +0100, Ed Schouten wrote: >> * Ed Maste wrote: >> > I was just about to follow up with a comment to that effect. We do want >> > it to become a panic, but I would prefer to hold off until we address >> > the known issue with padlock(4). >> >> I have seen this message appear when using the ndisulator as well. How >> are we going to solve it in this case? Could the ndisulator be extended >> to prepare a FPU context using kib's new API? > > I looked at http://msdn.microsoft.com/en-us/library/aa489566.aspx > after someone mentioned ndisulator. It seems that windows requires > that i386 drivers carefully use braces for use of FPU, while amd64 > code allowed to use it freely. That suggests that windows clears > TS on kernel mode entry or driver calls, that seems to be too > wastefull. > > I would very much appreciate the help with changing both ndis and > padlock to use fpu_kern_enter/leave KPI, since I do not use them. > I need some time to polish the patch before. > I saw fpudna only on amd64, but I never managed to get ndisulator fully working on amd64 (at least with broadcom card/driver). ___ 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: r205444 - head/sys/i386/i386
On Tue, Mar 23, 2010 at 09:35:09PM +0100, Paul B Mahol wrote: > On 3/23/10, Kostik Belousov wrote: > > On Tue, Mar 23, 2010 at 08:21:31PM +0100, Ed Schouten wrote: > >> * Ed Maste wrote: > >> > I was just about to follow up with a comment to that effect. We do want > >> > it to become a panic, but I would prefer to hold off until we address > >> > the known issue with padlock(4). > >> > >> I have seen this message appear when using the ndisulator as well. How > >> are we going to solve it in this case? Could the ndisulator be extended > >> to prepare a FPU context using kib's new API? > > > > I looked at http://msdn.microsoft.com/en-us/library/aa489566.aspx > > after someone mentioned ndisulator. It seems that windows requires > > that i386 drivers carefully use braces for use of FPU, while amd64 > > code allowed to use it freely. That suggests that windows clears > > TS on kernel mode entry or driver calls, that seems to be too > > wastefull. > > > > I would very much appreciate the help with changing both ndis and > > padlock to use fpu_kern_enter/leave KPI, since I do not use them. > > I need some time to polish the patch before. > > > > I saw fpudna only on amd64, but I never managed to get ndisulator > fully working on amd64 (at least with broadcom card/driver). I cannot find KeSaveFloatingPointState symbol defined by ndisulator. Could it be that it is a macro or inline function that expands to proper assembly for i386, and nop on amd64 ? That would explain your observation. pgpuUtpZ72jk2.pgp Description: PGP signature
svn commit: r205536 - in head: lib/libc/sys sys/vm
Author: jhb Date: Tue Mar 23 21:08:07 2010 New Revision: 205536 URL: http://svn.freebsd.org/changeset/base/205536 Log: Reject attempts to create a MAP_ANON mapping with a non-zero offset. PR: kern/71258 Submitted by: Alexander Best MFC after:2 weeks Modified: head/lib/libc/sys/mmap.2 head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/mmap.2 == --- head/lib/libc/sys/mmap.2Tue Mar 23 20:12:53 2010(r205535) +++ head/lib/libc/sys/mmap.2Tue Mar 23 21:08:07 2010(r205536) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_ANONYMOUS @@ -316,6 +316,11 @@ was equal to zero. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: head/sys/vm/vm_mmap.c == --- head/sys/vm/vm_mmap.c Tue Mar 23 20:12:53 2010(r205535) +++ head/sys/vm/vm_mmap.c Tue Mar 23 21:08:07 2010(r205536) @@ -233,7 +233,7 @@ mmap(td, uap) /* Make sure mapping fits into numeric range, etc. */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && curproc->p_osrel >= 800104) || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -300,7 +300,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation and ___ 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: r205536 - in head: lib/libc/sys sys/vm
On Tuesday 23 March 2010 5:08:07 pm John Baldwin wrote: > Author: jhb > Date: Tue Mar 23 21:08:07 2010 > New Revision: 205536 > URL: http://svn.freebsd.org/changeset/base/205536 > > Log: > Reject attempts to create a MAP_ANON mapping with a non-zero offset. > > PR: kern/71258 > Submitted by: Alexander Best > MFC after: 2 weeks It is probably worth thinking about whether or not we should be allowing non- page-aligned offsets (both file and for MAP_FIXED) at all given that POSIX does not require them to function and other OS's do not support them. Alan brought that up in one of the threads about this bug. -- John Baldwin ___ 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: r205541 - head/sys/compat/linprocfs
Author: jhb Date: Tue Mar 23 21:49:33 2010 New Revision: 205541 URL: http://svn.freebsd.org/changeset/base/205541 Log: Implement /proc/filesystems. Submitted by: Fernando Apesteguia fernando.apesteguia (gmail) Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Tue Mar 23 21:43:01 2010 (r205540) +++ head/sys/compat/linprocfs/linprocfs.c Tue Mar 23 21:49:33 2010 (r205541) @@ -1227,6 +1227,22 @@ linprocfs_docmdline(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/filesystems + */ +static int +linprocfs_dofilesystems(PFS_FILL_ARGS) +{ + struct vfsconf *vfsp; + + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { + if (vfsp->vfc_flags & VFCF_SYNTHETIC) + sbuf_printf(sb, "nodev"); + sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); + } + return(0); +} + #if 0 /* * Filler function for proc/modules @@ -1276,6 +1292,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "devices", &linprocfs_dodevices, NULL, NULL, NULL, PFS_RD); + pfs_create_file(root, "filesystems", &linprocfs_dofilesystems, + NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "loadavg", &linprocfs_doloadavg, NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "meminfo", &linprocfs_domeminfo, ___ 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: r205541 - head/sys/compat/linprocfs
On Tue, Mar 23, 2010 at 09:49:34PM +, John Baldwin wrote: > Author: jhb > Date: Tue Mar 23 21:49:33 2010 > New Revision: 205541 > URL: http://svn.freebsd.org/changeset/base/205541 > > Log: > Implement /proc/filesystems. > > Submitted by: Fernando Apesteguia fernando.apesteguia (gmail) > > Modified: > head/sys/compat/linprocfs/linprocfs.c > > Modified: head/sys/compat/linprocfs/linprocfs.c > == > --- head/sys/compat/linprocfs/linprocfs.c Tue Mar 23 21:43:01 2010 > (r205540) > +++ head/sys/compat/linprocfs/linprocfs.c Tue Mar 23 21:49:33 2010 > (r205541) > @@ -1227,6 +1227,22 @@ linprocfs_docmdline(PFS_FILL_ARGS) > return (0); > } > > +/* > + * Filler function for proc/filesystems > + */ > +static int > +linprocfs_dofilesystems(PFS_FILL_ARGS) > +{ > + struct vfsconf *vfsp; > + > + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { > + if (vfsp->vfc_flags & VFCF_SYNTHETIC) > + sbuf_printf(sb, "nodev"); > + sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); > + } > + return(0); > +} I think the list iteration should be protected by Giant. Am I mistaken ? pgpm1J8JDEyno.pgp Description: PGP signature
svn commit: r205550 - head/sys/dev/syscons
Author: jkim Date: Tue Mar 23 22:16:57 2010 New Revision: 205550 URL: http://svn.freebsd.org/changeset/base/205550 Log: Separate 24-bit pixel draw from 32-bit case. Although it is slower, we do not want to write a useless zero to inaccessible memory region. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c == --- head/sys/dev/syscons/scvgarndr.cTue Mar 23 22:16:12 2010 (r205549) +++ head/sys/dev/syscons/scvgarndr.cTue Mar 23 22:16:57 2010 (r205550) @@ -181,9 +181,12 @@ static u_short mouse_or_mask[16] = { #definevga_drawpxl(pos, color) \ switch (scp->sc->adp->va_info.vi_depth) { \ case 32:\ - case 24:\ writel(pos, vga_palette32[color]); \ break; \ + case 24:\ + writew(pos, vga_palette32[color]); \ + writeb(pos + 2, vga_palette32[color] >> 16);\ + break; \ case 16:\ if (scp->sc->adp->va_info.vi_pixel_fsizes[1] == 5)\ writew(pos, vga_palette15[color]); \ ___ 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: r205536 - in head: lib/libc/sys sys/vm
thanks a bunch. :) -- Alexander Best ___ 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: r205557 - head/sys/dev/fb
Author: jkim Date: Tue Mar 23 22:35:52 2010 New Revision: 205557 URL: http://svn.freebsd.org/changeset/base/205557 Log: Map entire video memory again. This is a partial backout of r203535. Although we do not use them all directly, it seems VGA render may access unmapped memory region and cause kernel panic. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Tue Mar 23 22:24:02 2010(r205556) +++ head/sys/dev/fb/vesa.c Tue Mar 23 22:35:52 2010(r205557) @@ -1209,7 +1209,7 @@ vesa_set_mode(video_adapter_t *adp, int int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) pmap_unmapdev(adp->va_buffer, - adp->va_buffer_size); + vesa_adp_info->v_memsize * 64 * 1024); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1246,7 +1246,8 @@ vesa_set_mode(video_adapter_t *adp, int adp->va_flags |= V_ADP_DAC8; if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, adp->va_buffer_size); + pmap_unmapdev(adp->va_buffer, + vesa_adp_info->v_memsize * 64 * 1024); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1263,7 +1264,7 @@ vesa_set_mode(video_adapter_t *adp, int #endif vesa_adp->va_buffer = (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, - info.vi_buffer_size, PAT_WRITE_COMBINING); + vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); vesa_adp->va_window = vesa_adp->va_buffer; vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes; vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes; ___ 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: r205558 - head/sys/dev/fb
Author: jkim Date: Tue Mar 23 22:50:22 2010 New Revision: 205558 URL: http://svn.freebsd.org/changeset/base/205558 Log: Fall back to VGA palette functions if VESA function failed and DAC is still in 6-bit mode. Although we have to check non-VGA compatibility bit here, it seems there are too many broken VESA BIOSes out to rely on it. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Tue Mar 23 22:35:52 2010(r205557) +++ head/sys/dev/fb/vesa.c Tue Mar 23 22:50:22 2010(r205558) @@ -1241,7 +1241,6 @@ vesa_set_mode(video_adapter_t *adp, int if ((vesa_adp_info->v_flags & V_DAC8) != 0 && (info.vi_flags & V_INFO_GRAPHICS) != 0 && - (info.vi_flags & V_INFO_NONVGA) != 0 && vesa_bios_set_dac(8) > 6) adp->va_flags |= V_ADP_DAC8; @@ -1323,10 +1322,12 @@ vesa_save_palette(video_adapter_t *adp, { int bits; - if (adp == vesa_adp && VESA_MODE(adp->va_mode) && - (adp->va_info.vi_flags & V_INFO_NONVGA) != 0) { + if (adp == vesa_adp && VESA_MODE(adp->va_mode)) { bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; - return (vesa_bios_save_palette(0, 256, palette, bits)); + if (vesa_bios_save_palette(0, 256, palette, bits) == 0) + return (0); + if (bits > 6) + return (1); } return ((*prevvidsw->save_palette)(adp, palette)); @@ -1337,10 +1338,12 @@ vesa_load_palette(video_adapter_t *adp, { int bits; - if (adp == vesa_adp && VESA_MODE(adp->va_mode) && - (adp->va_info.vi_flags & V_INFO_NONVGA) != 0) { + if (adp == vesa_adp && VESA_MODE(adp->va_mode)) { bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; - return (vesa_bios_load_palette(0, 256, palette, bits)); + if (vesa_bios_load_palette(0, 256, palette, bits) == 0) + return (0); + if (bits > 6) + return (1); } return ((*prevvidsw->load_palette)(adp, palette)); @@ -1545,8 +1548,6 @@ get_palette(video_adapter_t *adp, int ba return (1); if (!VESA_MODE(adp->va_mode)) return (1); - if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0) - return (1); bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; r = malloc(count * 3, M_DEVBUF, M_WAITOK); @@ -1583,8 +1584,6 @@ set_palette(video_adapter_t *adp, int ba return (1); if (!VESA_MODE(adp->va_mode)) return (1); - if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0) - return (1); bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; r = malloc(count * 3, M_DEVBUF, M_WAITOK); ___ 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: r205561 - head/contrib/netcat
Author: delphij Date: Tue Mar 23 23:00:35 2010 New Revision: 205561 URL: http://svn.freebsd.org/changeset/base/205561 Log: MFV: Update nc to the version from OpenBSD 4.7. MFC after:1 month Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/nc.1 == --- head/contrib/netcat/nc.1Tue Mar 23 22:56:53 2010(r205560) +++ head/contrib/netcat/nc.1Tue Mar 23 23:00:35 2010(r205561) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.53 2010/02/23 23:00:52 schwarze Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5 2009 +.Dd February 23, 2010 .Dt NC 1 .Os .Sh NAME @@ -51,8 +51,8 @@ .Op Fl X Ar proxy_protocol .Oo Xo .Fl x Ar proxy_address Ns Oo : Ns -.Ar port Oc Oc -.Xc +.Ar port Oc +.Xc Oc .Op Ar hostname .Op Ar port .Ek @@ -206,7 +206,9 @@ This makes it possible to use .Nm to script telnet sessions. .It Fl U -Specifies to use Unix Domain Sockets. +Specifies to use +.Ux Ns -domain +sockets. .It Fl u Use UDP instead of the default option of TCP. .It Fl V Ar fib @@ -428,7 +430,9 @@ outgoing traffic only. .Pp .Dl $ nc -e 'out ipsec esp/transport//require' host.example.com 42 .Pp -Create and listen on a Unix Domain Socket: +Create and listen on a +.Ux Ns -domain +socket: .Pp .Dl $ nc -lU /var/tmp/dsocket .Pp Modified: head/contrib/netcat/netcat.c == --- head/contrib/netcat/netcat.cTue Mar 23 22:56:53 2010 (r205560) +++ head/contrib/netcat/netcat.cTue Mar 23 23:00:35 2010 (r205561) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ +/* $OpenBSD: netcat.c,v 1.95 2010/02/27 00:58:56 nicm Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -455,8 +455,10 @@ main(int argc, char *argv[]) uflag ? "udp" : "tcp"); } - printf("Connection to %s %s port [%s/%s] succeeded!\n", - host, portlist[i], uflag ? "udp" : "tcp", + fprintf(stderr, + "Connection to %s %s port [%s/%s] " + "succeeded!\n", host, portlist[i], + uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } if (!zflag) @@ -749,27 +751,27 @@ atelnet(int nfd, unsigned char *buf, uns unsigned char *p, *end; unsigned char obuf[4]; - end = buf + size; - obuf[0] = '\0'; + if (size < 3) + return; + end = buf + size - 2; for (p = buf; p < end; p++) { if (*p != IAC) - break; + continue; obuf[0] = IAC; p++; if ((*p == WILL) || (*p == WONT)) obuf[1] = DONT; - if ((*p == DO) || (*p == DONT)) + else if ((*p == DO) || (*p == DONT)) obuf[1] = WONT; - if (obuf) { - p++; - obuf[2] = *p; - obuf[3] = '\0'; - if (atomicio(vwrite, nfd, obuf, 3) != 3) - warn("Write Error!"); - obuf[0] = '\0'; - } + else + continue; + + p++; + obuf[2] = *p; + if (atomicio(vwrite, nfd, obuf, 3) != 3) + warn("Write Error!"); } } ___ 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: r205562 - head/sys/rpc
Author: rmacklem Date: Tue Mar 23 23:03:30 2010 New Revision: 205562 URL: http://svn.freebsd.org/changeset/base/205562 Log: When the regular NFS server replied to a UDP client out of the replay cache, it did not free the request argument mbuf list, resulting in a leak. This patch fixes that leak. Tested by:danny AT cs.huji.ac.il PR: kern/144330 Submitted by: to.my.trociny AT gmail.com (earlier version) Reviewed by: dfr MFC after:2 weeks Modified: head/sys/rpc/svc.c Modified: head/sys/rpc/svc.c == --- head/sys/rpc/svc.c Tue Mar 23 23:00:35 2010(r205561) +++ head/sys/rpc/svc.c Tue Mar 23 23:03:30 2010(r205562) @@ -819,9 +819,11 @@ svc_getreq(SVCXPRT *xprt, struct svc_req free(r->rq_addr, M_SONAME); r->rq_addr = NULL; } + m_freem(args); goto call_done; default: + m_freem(args); goto call_done; } } ___ 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: r205564 - head/sys/dev/fb
Author: jkim Date: Tue Mar 23 23:10:17 2010 New Revision: 205564 URL: http://svn.freebsd.org/changeset/base/205564 Log: Be extremely careful when we determine bytes per scan line information. First, we compare mode table data against minimum value. If the mode table does not make sense, we set the minimum in the mode info. When we actually set the mode, we try VESA BIOS function and compare it against the previous value. If it makes more sense, update the information. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Tue Mar 23 23:09:38 2010(r205563) +++ head/sys/dev/fb/vesa.c Tue Mar 23 23:10:17 2010(r205564) @@ -188,9 +188,7 @@ static int vesa_bios_load_palette2(int s #define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) static ssize_t vesa_bios_state_buf_size(void); static int vesa_bios_save_restore(int code, void *p, size_t size); -#if 0 static int vesa_bios_get_line_length(void); -#endif static int vesa_bios_set_line_length(int pixel, int *bytes, int *lines); #if 0 static int vesa_bios_get_start(int *x, int *y); @@ -199,6 +197,7 @@ static int vesa_bios_set_start(int x, in static int vesa_map_gen_mode_num(int type, int color, int mode); static int vesa_translate_flags(u_int16_t vflags); static int vesa_translate_mmodel(u_int8_t vmodel); +static int vesa_get_bpscanline(struct vesa_mode *vmode); static int vesa_bios_init(void); static void vesa_clear_modes(video_info_t *info, int color); @@ -558,7 +557,6 @@ vesa_bios_save_restore(int code, void *p return (regs.R_AX != 0x004f); } -#if 0 static int vesa_bios_get_line_length(void) { @@ -575,7 +573,6 @@ vesa_bios_get_line_length(void) return (regs.R_BX); } -#endif static int vesa_bios_set_line_length(int pixel, int *bytes, int *lines) @@ -709,6 +706,43 @@ vesa_translate_mmodel(u_int8_t vmodel) return (V_INFO_MM_OTHER); } +static int +vesa_get_bpscanline(struct vesa_mode *vmode) +{ + int bpsl; + + if ((vmode->v_modeattr & V_MODEGRAPHICS) != 0) { + /* Find the minimum length. */ + switch (vmode->v_bpp / vmode->v_planes) { + case 1: + bpsl = vmode->v_width / 8; + break; + case 2: + bpsl = vmode->v_width / 4; + break; + case 4: + bpsl = vmode->v_width / 2; + break; + default: + bpsl = vmode->v_width * ((vmode->v_bpp + 7) / 8); + bpsl /= vmode->v_planes; + break; + } + + /* Use VBE 3.0 information if it looks sane. */ + if ((vmode->v_modeattr & V_MODELFB) != 0 && + vesa_adp_info->v_version >= 0x0300 && + vmode->v_linbpscanline > bpsl) + return (vmode->v_linbpscanline); + + /* Return the minimum if the mode table looks absurd. */ + if (vmode->v_bpscanline < bpsl) + return (bpsl); + } + + return (vmode->v_bpscanline); +} + #defineVESA_MAXSTR 256 #defineVESA_STRCPY(dst, src) do {\ @@ -733,7 +767,6 @@ vesa_bios_init(void) void *vmbuf; uint32_t offs; uint16_t vers; - int bpsl; int is_via_cle266; int modes; int i; @@ -858,9 +891,7 @@ vesa_bios_init(void) } #endif - bpsl = (vmode.v_modeattr & V_MODELFB) != 0 && vers >= 0x0300 ? - vmode.v_linbpscanline : vmode.v_bpscanline; - bsize = bpsl * vmode.v_height; + bsize = vesa_get_bpscanline(&vmode) * vmode.v_height; if ((vmode.v_modeattr & V_MODEGRAPHICS) != 0) bsize *= vmode.v_planes; @@ -1181,6 +1212,7 @@ static int vesa_set_mode(video_adapter_t *adp, int mode) { video_info_t info; + int bpsl; if (adp != vesa_adp) return ((*prevvidsw->set_mode)(adp, mode)); @@ -1257,6 +1289,20 @@ vesa_set_mode(video_adapter_t *adp, int (info.vi_flags & V_INFO_COLOR) ? V_ADP_COLOR : 0; vesa_adp->va_crtc_addr = (vesa_adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC; + + vesa_adp->va_line_width = info.vi_buffer_size / info.vi_height; + if ((info.vi_flags & V_INFO_GRAPHICS) != 0) + vesa_adp->va_line_width /= info.vi_planes; + + /* If VBE function returns bigger bytes per scan line, use it. */ + bpsl = vesa_bios_get_line_length(); + if (bpsl > vesa_adp->va_line_width) { + vesa_adp->va_line_width = bpsl; + info.vi_buffer_size = bpsl * info.vi_height; + if ((info.v
svn commit: r205566 - head/sys/dev/fb
Author: jkim Date: Tue Mar 23 23:19:23 2010 New Revision: 205566 URL: http://svn.freebsd.org/changeset/base/205566 Log: Add my copyright here. It seems I have contributed enough code. :-) Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Tue Mar 23 23:16:35 2010(r205565) +++ head/sys/dev/fb/vesa.c Tue Mar 23 23:19:23 2010(r205566) @@ -1,5 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith + * Copyright (c) 2009-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ 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: r205569 - head/sys/powerpc/mpc85xx
Author: marcel Date: Tue Mar 23 23:46:28 2010 New Revision: 205569 URL: http://svn.freebsd.org/changeset/base/205569 Log: Fix an off-by-one bug for the number of slots on a PCI/PCI-X bus. We failed to setup PCI devices on slot 31 and that's where the SATA controller is for the P2020 eval board. Modified: head/sys/powerpc/mpc85xx/pci_ocp.c Modified: head/sys/powerpc/mpc85xx/pci_ocp.c == --- head/sys/powerpc/mpc85xx/pci_ocp.c Tue Mar 23 23:28:14 2010 (r205568) +++ head/sys/powerpc/mpc85xx/pci_ocp.c Tue Mar 23 23:46:28 2010 (r205569) @@ -264,7 +264,7 @@ pci_ocp_maxslots(device_t dev) { struct pci_ocp_softc *sc = device_get_softc(dev); - return ((sc->sc_pcie_cap) ? 0 : 30); + return ((sc->sc_pcie_cap) ? 0 : 31); } static uint32_t @@ -328,6 +328,7 @@ pci_ocp_probe(device_t dev) return (ENXIO); sc = device_get_softc(dev); + sc->sc_dev = dev; sc->sc_rid = 0; sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, @@ -492,7 +493,7 @@ pci_ocp_route_int(struct pci_ocp_softc * } static int -pci_ocp_init(struct pci_ocp_softc *sc, int bus, int maxslot) +pci_ocp_init(struct pci_ocp_softc *sc, int bus, int nslots) { int secbus, slot; int func, maxfunc; @@ -502,7 +503,7 @@ pci_ocp_init(struct pci_ocp_softc *sc, i uint8_t intline, intpin; secbus = bus; - for (slot = 0; slot < maxslot; slot++) { + for (slot = 0; slot < nslots; slot++) { maxfunc = 0; for (func = 0; func <= maxfunc; func++) { hdrtype = pci_ocp_read_config(sc->sc_dev, bus, slot, @@ -599,7 +600,7 @@ pci_ocp_init(struct pci_ocp_softc *sc, i PCIR_SUBBUS_1, 0xff, 1); secbus = pci_ocp_init(sc, secbus, - (subclass == PCIS_BRIDGE_PCI) ? 31 : 1); + (subclass == PCIS_BRIDGE_PCI) ? 32 : 1); pci_ocp_write_config(sc->sc_dev, bus, slot, func, PCIR_SUBBUS_1, secbus, 1); @@ -721,7 +722,7 @@ pci_ocp_attach(device_t dev) { struct pci_ocp_softc *sc; uint32_t cfgreg; - int error, maxslot; + int error, nslots; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -765,8 +766,8 @@ pci_ocp_attach(device_t dev) return (0); } - maxslot = (sc->sc_pcie_cap) ? 1 : 31; - pci_ocp_init(sc, sc->sc_busnr, maxslot); + nslots = (sc->sc_pcie_cap) ? 1 : 32; + pci_ocp_init(sc, sc->sc_busnr, nslots); device_add_child(dev, "pci", -1); return (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: r205570 - head/contrib/netcat
Author: delphij Date: Tue Mar 23 23:56:22 2010 New Revision: 205570 URL: http://svn.freebsd.org/changeset/base/205570 Log: Update metadata information as well as upgrade instructions. Modified: head/contrib/netcat/FREEBSD-upgrade head/contrib/netcat/FREEBSD-vendor Modified: head/contrib/netcat/FREEBSD-upgrade == --- head/contrib/netcat/FREEBSD-upgrade Tue Mar 23 23:46:28 2010 (r205569) +++ head/contrib/netcat/FREEBSD-upgrade Tue Mar 23 23:56:22 2010 (r205570) @@ -1,19 +1,14 @@ $FreeBSD$ -1. Export from OpenBSD's nc(1) into an empty directory (say "v-nc"). -2. while read pattern; do rm ${pattern} ; done < FREEBSD-Xlist -3. Checkout our contrib/netcat to another directory (say "f-nc"), - with -rOPENBSD, and usr.bin/nc to its ../../ -4. copy the files from v-nc to f-nc -5. do cvs up -A in f-nc -6. If there is conflicits, try to resolve them. -7. do build in f-nc/../../usr.bin/nc -8. If everything seems ok, do the actual import in v-nc: - cvs -n import src/contrib/netcat OPENBSD OPENBSD_ - Everything appears be Ok? Do: - cvs import src/contrib/netcat OPENBSD OPENBSD_ - (note: recently we import from OpenBSD's release branches -rather than importing -HEAD snapshots) -9. Resolve the conflicits with the patchset obtained in step 6. +Most of the instructions is outlined on FreeBSD wiki at: -delp...@freebsd.org - 21 Apr 2008 + http://wiki.freebsd.org/SubversionPrimer/VendorImports + +nc(1) is very small and most of code are just copied as-is from OpenBSD. With a +few exceptions: + + * --no-tcpopt: Local feature specific to FreeBSD. + * -V: We use FIB to map what OpenBSD do for "rdomain" + * -E, -e: These are mostly self contained IPsec extensions + +delp...@freebsd.org - Mar 23, 2010 Modified: head/contrib/netcat/FREEBSD-vendor == --- head/contrib/netcat/FREEBSD-vendor Tue Mar 23 23:46:28 2010 (r205569) +++ head/contrib/netcat/FREEBSD-vendor Tue Mar 23 23:56:22 2010 (r205570) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL:http://www.openbsd.org/ -Version: 4.6 +Version: 4.7 License: BSD ___ 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: r205572 - head/sys/fs/nfs
Author: rmacklem Date: Wed Mar 24 02:02:02 2010 New Revision: 205572 URL: http://svn.freebsd.org/changeset/base/205572 Log: Fix the experimental NFS subsystem so that it uses the correct preprocessor macro name for not requiring strict data alignment. Suggested by: marius MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c Modified: head/sys/fs/nfs/nfs_commonport.c == --- head/sys/fs/nfs/nfs_commonport.cWed Mar 24 01:37:00 2010 (r205571) +++ head/sys/fs/nfs/nfs_commonport.cWed Mar 24 02:02:02 2010 (r205572) @@ -117,7 +117,7 @@ struct mtx nfs_slock_mutex; /* local functions */ static int nfssvc_call(struct thread *, struct nfssvc_args *, struct ucred *); -#if defined(__i386__) +#ifdef __NO_STRICT_ALIGNMENT /* * These architectures don't need re-alignment, so just return. */ @@ -127,7 +127,7 @@ newnfs_realign(struct mbuf **pm) return; } -#else +#else /* !__NO_STRICT_ALIGNMENT */ /* * newnfs_realign: * @@ -185,7 +185,7 @@ newnfs_realign(struct mbuf **pm) pm = &m->m_next; } } -#endif /* !__i386__ */ +#endif /* __NO_STRICT_ALIGNMENT */ #ifdef notdef static void ___ 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: r205444 - head/sys/i386/i386
On 3/23/10, Kostik Belousov wrote: > On Tue, Mar 23, 2010 at 09:35:09PM +0100, Paul B Mahol wrote: >> On 3/23/10, Kostik Belousov wrote: >> > On Tue, Mar 23, 2010 at 08:21:31PM +0100, Ed Schouten wrote: >> >> * Ed Maste wrote: >> >> > I was just about to follow up with a comment to that effect. We do >> >> > want >> >> > it to become a panic, but I would prefer to hold off until we address >> >> > the known issue with padlock(4). >> >> >> >> I have seen this message appear when using the ndisulator as well. How >> >> are we going to solve it in this case? Could the ndisulator be extended >> >> to prepare a FPU context using kib's new API? >> > >> > I looked at http://msdn.microsoft.com/en-us/library/aa489566.aspx >> > after someone mentioned ndisulator. It seems that windows requires >> > that i386 drivers carefully use braces for use of FPU, while amd64 >> > code allowed to use it freely. That suggests that windows clears >> > TS on kernel mode entry or driver calls, that seems to be too >> > wastefull. >> > >> > I would very much appreciate the help with changing both ndis and >> > padlock to use fpu_kern_enter/leave KPI, since I do not use them. >> > I need some time to polish the patch before. >> > >> >> I saw fpudna only on amd64, but I never managed to get ndisulator >> fully working on amd64 (at least with broadcom card/driver). > > I cannot find KeSaveFloatingPointState symbol defined by ndisulator. > Could it be that it is a macro or inline function that expands to > proper assembly for i386, and nop on amd64 ? That would explain > your observation. I have never found any driver that reports such symbol missing when loaded. ___ 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: r205573 - in head/sys/i386: i386 include
Author: alc Date: Wed Mar 24 03:07:35 2010 New Revision: 205573 URL: http://svn.freebsd.org/changeset/base/205573 Log: Adapt r204907 and r205402, the amd64 implementation of the workaround for AMD Family 10h Erratum 383, to i386. Enable machine check exceptions by default, just like r204913 for amd64. Enable superpage promotion only if the processor actually supports large pages, i.e., PG_PS. MFC after:2 weeks Modified: head/sys/i386/i386/mca.c head/sys/i386/i386/pmap.c head/sys/i386/include/md_var.h head/sys/i386/include/specialreg.h Modified: head/sys/i386/i386/mca.c == --- head/sys/i386/i386/mca.cWed Mar 24 02:02:02 2010(r205572) +++ head/sys/i386/i386/mca.cWed Mar 24 03:07:35 2010(r205573) @@ -60,11 +60,20 @@ static int mca_count; /* Number of reco SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); -static int mca_enabled = 0; +static int mca_enabled = 1; TUNABLE_INT("hw.mca.enabled", &mca_enabled); SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0, "Administrative toggle for machine check support"); +static int amd10h_L1TP = 1; +TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP); +SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, +"Administrative toggle for logging of level one TLB parity (L1TP) errors"); + +int workaround_erratum383; +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, +"Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); + static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ @@ -527,7 +536,7 @@ void mca_init(void) { uint64_t mcg_cap; - uint64_t ctl; + uint64_t ctl, mask; int skip; int i; @@ -535,6 +544,15 @@ mca_init(void) if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; + /* +* On AMD Family 10h processors, unless logging of level one TLB +* parity (L1TP) errors is disabled, enable the recommended workaround +* for Erratum 383. +*/ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + if (cpu_feature & CPUID_MCA) { if (PCPU_GET(cpuid) == 0) mca_setup(); @@ -545,6 +563,19 @@ mca_init(void) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + /* +* Disable logging of level one TLB parity (L1TP) errors by +* the data cache as an alternative workaround for AMD Family +* 10h Erratum 383. Unlike the recommended workaround, there +* is no performance penalty to this workaround. However, +* L1TP errors will go unreported. +*/ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + mask = rdmsr(MSR_MC0_CTL_MASK); + if ((mask & (1UL << 5)) == 0) + wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); + } for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { /* By default enable logging of all errors. */ ctl = 0xUL; Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Wed Mar 24 02:02:02 2010(r205572) +++ head/sys/i386/i386/pmap.c Wed Mar 24 03:07:35 2010(r205573) @@ -5,7 +5,7 @@ * All rights reserved. * Copyright (c) 1994 David Greenman * All rights reserved. - * Copyright (c) 2005-2008 Alan L. Cox + * Copyright (c) 2005-2010 Alan L. Cox * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -297,6 +297,7 @@ static void pmap_insert_pt_page(pmap_t p static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); +static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); @@ -315,6 +316,9 @@ static void pmap_remove_entry(struct pma static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *
svn commit: r205574 - head/sys/kern
Author: nwhitehorn Date: Wed Mar 24 03:13:24 2010 New Revision: 205574 URL: http://svn.freebsd.org/changeset/base/205574 Log: The nargvstr and nenvstr properties of arginfo are ints, not longs, so should be copied to userspace with suword32() instead of suword(). This alleviates problems on 64-bit big-endian architectures, and is a no-op on all 32-bit architectures. Tested on:amd64, sparc64, powerpc64 Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c == --- head/sys/kern/kern_exec.c Wed Mar 24 03:07:35 2010(r205573) +++ head/sys/kern/kern_exec.c Wed Mar 24 03:13:24 2010(r205574) @@ -1260,7 +1260,7 @@ exec_copyout_strings(imgp) * Fill in "ps_strings" struct for ps, w, etc. */ suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); - suword(&arginfo->ps_nargvstr, argc); + suword32(&arginfo->ps_nargvstr, argc); /* * Fill in argument portion of vector table. @@ -1276,7 +1276,7 @@ exec_copyout_strings(imgp) suword(vectp++, 0); suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); - suword(&arginfo->ps_nenvstr, envc); + suword32(&arginfo->ps_nenvstr, envc); /* * Fill in environment portion of vector table. ___ 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: r205576 - head/sys/mips/mips
Author: neel Date: Wed Mar 24 04:52:15 2010 New Revision: 205576 URL: http://svn.freebsd.org/changeset/base/205576 Log: Fix periodic "t_delta 16.01359db7eb5eb3c0 too long" messages on the console by accounting for the "lost time" between when the timer interrupt fired and when clock_intr() actually started executing. Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c == --- head/sys/mips/mips/tick.c Wed Mar 24 04:37:19 2010(r205575) +++ head/sys/mips/mips/tick.c Wed Mar 24 04:52:15 2010(r205576) @@ -63,17 +63,14 @@ static uint64_t cycles_per_hz, cycles_pe static u_int32_t counter_upper = 0; static u_int32_t counter_lower_last = 0; -struct clk_ticks -{ +struct clk_ticks { u_long hard_ticks; u_long stat_ticks; u_long prof_ticks; - /* -* pad for cache line alignment of pcpu info -* cache-line-size - number of used bytes -*/ - char pad[32-(3*sizeof (u_long))]; -} static pcpu_ticks[MAXCPU]; + uint32_t compare_ticks; +} __aligned(CACHE_LINE_SIZE); + +static struct clk_ticks pcpu_ticks[MAXCPU]; /* * Device methods @@ -260,25 +257,47 @@ clock_intr(void *arg) { struct clk_ticks *cpu_ticks; struct trapframe *tf; - uint32_t ltick; + uint32_t count, compare, delta; + + cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; + /* * Set next clock edge. */ - ltick = mips_rd_count(); - mips_wr_compare(ltick + cycles_per_tick); - cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; + count = mips_rd_count(); + compare = cpu_ticks->compare_ticks; + cpu_ticks->compare_ticks = count + cycles_per_tick; + mips_wr_compare(cpu_ticks->compare_ticks); critical_enter(); - if (ltick < counter_lower_last) { + if (count < counter_lower_last) { counter_upper++; - counter_lower_last = ltick; + counter_lower_last = count; } /* * Magic. Setting up with an arg of NULL means we get passed tf. */ tf = (struct trapframe *)arg; + delta = cycles_per_tick; + + /* +* Account for the "lost time" between when the timer interrupt fired +* and when 'clock_intr' actually started executing. +*/ + delta += count - compare; + + /* +* If the COUNT and COMPARE registers are no longer in sync then make +* up some reasonable value for the 'delta'. +* +* This could happen, for e.g., after we resume normal operations after +* exiting the debugger. +*/ + if (delta > cycles_per_hz) + delta = cycles_per_hz; + /* Fire hardclock at hz. */ - cpu_ticks->hard_ticks += cycles_per_tick; + cpu_ticks->hard_ticks += delta; if (cpu_ticks->hard_ticks >= cycles_per_hz) { cpu_ticks->hard_ticks -= cycles_per_hz; if (PCPU_GET(cpuid) == 0) @@ -288,14 +307,14 @@ clock_intr(void *arg) } /* Fire statclock at stathz. */ - cpu_ticks->stat_ticks += cycles_per_tick; + cpu_ticks->stat_ticks += delta; if (cpu_ticks->stat_ticks >= cycles_per_stathz) { cpu_ticks->stat_ticks -= cycles_per_stathz; statclock(USERMODE(tf->sr)); } /* Fire profclock at profhz, but only when needed. */ - cpu_ticks->prof_ticks += cycles_per_tick; + cpu_ticks->prof_ticks += delta; if (cpu_ticks->prof_ticks >= cycles_per_profhz) { cpu_ticks->prof_ticks -= cycles_per_profhz; if (profprocs != 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: r205578 - head/share/misc
Author: maxim Date: Wed Mar 24 06:08:51 2010 New Revision: 205578 URL: http://svn.freebsd.org/changeset/base/205578 Log: o FreeBSD 7.3 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Wed Mar 24 05:55:45 2010 (r205577) +++ head/share/misc/bsd-family-tree Wed Mar 24 06:08:51 2010 (r205578) @@ -228,14 +228,14 @@ FreeBSD 5.2 | | | FreeBSD 7.1 | | | | | | | | |DragonFly 2.2.0 | FreeBSD 7.2 | NetBSD 5.0 OpenBSD 4.5 | - | | | | | | - | | | | |DragonFly 2.4.0 - | V | | OpenBSD 4.6 | - || | | | - *--FreeBSD | | | | - |8.0 | | | | - | | | | | | - | V | | | | + | \ | | | | + | | | | |DragonFly 2.4.0 + | | | | OpenBSD 4.6 | + | | | | | | + *--FreeBSD | | | | | + |8.0 | | | | | + | |FreeBSD | | | | + | V 7.3 | | | | || | | | FreeBSD 9 -current| NetBSD -current OpenBSD -current | || | | | @@ -511,6 +511,7 @@ FreeBSD 7.2 2009-05-04 [FBD] DragonFly 2.4.02009-09-16 [DFB] OpenBSD 4.62009-10-18 [OBD] FreeBSD 8.02009-11-26 [FBD] +FreeBSD 7.32010-03-23 [FBD] Bibliography ___ 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"