svn commit: r236045 - in head/sys/i386: i386 include
Author: alc Date: Sat May 26 06:10:25 2012 New Revision: 236045 URL: http://svn.freebsd.org/changeset/base/236045 Log: Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Instead, the pmap now maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses this list to select pv entries for reclamation. Note: The old pmap_collect() tried to avoid reclaiming mappings for pages that have either a hold_count or a busy field that is non-zero. However, this isn't necessary for correctness, and the locking in pmap_collect() was insufficient to guarantee that such mappings weren't reclaimed. The new pmap_pv_reclaim() doesn't even try. MFC after:5 weeks Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Sat May 26 05:29:53 2012(r236044) +++ head/sys/i386/i386/pmap.c Sat May 26 06:10:25 2012(r236045) @@ -233,6 +233,7 @@ static int pat_index[PAT_INDEX_SIZE]; /* /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static struct md_page *pv_table; static int shpgperproc = PMAP_SHPGPERPROC; @@ -2187,69 +2188,144 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry Current number of pv entry allocs); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, pv_entry_spare, 0, Current number of spare pv entries); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, pmap_collect_inactive, 0, - Current number times pmap_collect called on inactive queue); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, pmap_collect_active, 0, - Current number times pmap_collect called on active queue); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(newtail); sched_pin(); - TAILQ_FOREACH(m, vpq-pl, pageq) { - if ((m-flags PG_MARKER) != 0 || m-hold_count || m-busy) - continue; - TAILQ_FOREACH_SAFE(pv, m-md.pv_list, pv_list, next_pv) { - va = pv-pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(pv_chunks)) != NULL (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(pv_chunks, pc, pc_lru); + if (pmap != pc-pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc-pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(newtail, pc, pc_lru); continue; - pmap-pm_stats.resident_count--; - pde = pmap_pde(pmap, va); - KASSERT((*pde PG_PS) == 0, (pmap_collect: found -a 4mpage in page %p's pv list, m)); - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte PG_W) == 0, - (pmap_collect: wired pte %#jx, (uintmax_t)tpte)); - if (tpte PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); -
svn commit: r236046 - head/usr.bin/sort
Author: joel (doc committer) Date: Sat May 26 06:31:54 2012 New Revision: 236046 URL: http://svn.freebsd.org/changeset/base/236046 Log: mdoc: sort sections into conventional order. Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in == --- head/usr.bin/sort/sort.1.in Sat May 26 06:10:25 2012(r236045) +++ head/usr.bin/sort/sort.1.in Sat May 26 06:31:54 2012(r236046) @@ -501,27 +501,6 @@ option is still supported, except for which has no .Fl k equivalent. -.Sh EXIT STATUS -The -.Nm -utility shall exit with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It 0 -Successfully sorted the input files or if used with -.Fl c -or -.Fl C , -the input file already met the sorting criteria. -.It 1 -On disorder (or non-uniqueness) with the -.Fl c -or -.Fl C -options. -.It 2 -An error occurred. -.El .Sh ENVIRONMENT .Bl -tag -width Fl .It Ev LC_COLLATE @@ -578,6 +557,27 @@ Temporary files. .It Pa /dev/random Default seed file for the random sort. .El +.Sh EXIT STATUS +The +.Nm +utility shall exit with one of the following values: +.Pp +.Bl -tag -width flag -compact +.It 0 +Successfully sorted the input files or if used with +.Fl c +or +.Fl C , +the input file already met the sorting criteria. +.It 1 +On disorder (or non-uniqueness) with the +.Fl c +or +.Fl C +options. +.It 2 +An error occurred. +.El .Sh SEE ALSO .Xr comm 1 , .Xr join 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: r236061 - head/sys/dev/sym
Author: marius Date: Sat May 26 08:03:42 2012 New Revision: 236061 URL: http://svn.freebsd.org/changeset/base/236061 Log: - When creating the DMA tag for user data, don't ask for more segments than required for handling MAXPHYS and report the resulting maximum I/O size to CAM instead of implicitly limiting it to DFLTPHYS. - Move the variables of sym_action2() out of nested scope as required by style(9) and remove extraneous curly braces. - Replace a magic value for PCIR_COMMAND with the appropriate macro. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Tested with a HBA donated by wilko. MFC after:3 days Modified: head/sys/dev/sym/sym_conf.h head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/sym/sym_conf.h == --- head/sys/dev/sym/sym_conf.h Sat May 26 08:02:45 2012(r236060) +++ head/sys/dev/sym/sym_conf.h Sat May 26 08:03:42 2012(r236061) @@ -83,6 +83,13 @@ #define SYM_CONF_MAX_TAG_ORDER (6) /* + * DMA boundary + * We need to ensure 16 MB boundaries not to be crossed during DMA of + * each segment, due to some chips being flawed. + */ +#define SYM_CONF_DMA_BOUNDARY (1UL 24) + +/* * Max number of scatter/gather entries for en IO. * Each entry costs 8 bytes in the internal CCB data structure. * For now 65 should suffice given the BSD O/Ses capabilities. Modified: head/sys/dev/sym/sym_hipd.c == --- head/sys/dev/sym/sym_hipd.c Sat May 26 08:02:45 2012(r236060) +++ head/sys/dev/sym/sym_hipd.c Sat May 26 08:03:42 2012(r236061) @@ -1623,6 +1623,7 @@ struct sym_hcb { u_int features; /* Chip features map*/ u_char myaddr; /* SCSI id of the adapter */ u_char maxburst; /* log base 2 of dwords burst */ + u_char maxsegcnt; /* Max DMA S/G segments */ u_char maxwide;/* Maximum transfer width */ u_char minsync;/* Min sync period factor (ST) */ u_char maxsync;/* Max sync period factor (ST) */ @@ -7988,10 +7989,7 @@ sym_fast_scatter_sg_physical(hcb_p np, c /* * Scatter a SG list with physical addresses into bus addressable chunks. - * We need to ensure 16MB boundaries not to be crossed during DMA of - * each segment, due to some chips being flawed. */ -#define BOUND_MASK ((1UL24)-1) static int sym_scatter_sg_physical(hcb_p np, ccb_p cp, bus_dma_segment_t *psegs, int nsegs) { @@ -8007,7 +8005,7 @@ sym_scatter_sg_physical(hcb_p np, ccb_p pe = ps + psegs[t].ds_len; while (s = 0) { - pn = (pe - 1) ~BOUND_MASK; + pn = (pe - 1) ~(SYM_CONF_DMA_BOUNDARY - 1); if (pn = ps) pn = ps; k = pe - pn; @@ -8032,17 +8030,21 @@ sym_scatter_sg_physical(hcb_p np, ccb_p return t = 0 ? -1 : 0; } -#undef BOUND_MASK /* * SIM action for non performance critical stuff. */ static void sym_action2(struct cam_sim *sim, union ccb *ccb) { + union ccb *abort_ccb; + struct ccb_hdr *ccb_h; + struct ccb_pathinq *cpi; + struct ccb_trans_settings *cts; + struct sym_trans *tip; hcb_p np; tcb_p tp; lcb_p lp; - struct ccb_hdr *ccb_h; + u_char dflags; /* * Retrieve our controller data structure. @@ -8055,9 +8057,6 @@ static void sym_action2(struct cam_sim * switch (ccb_h-func_code) { case XPT_SET_TRAN_SETTINGS: - { - struct ccb_trans_settings *cts; - cts = ccb-cts; tp = np-target[ccb_h-target_id]; @@ -8079,13 +8078,7 @@ static void sym_action2(struct cam_sim * sym_xpt_done2(np, ccb, CAM_REQ_CMP); break; - } case XPT_GET_TRAN_SETTINGS: - { - struct ccb_trans_settings *cts; - struct sym_trans *tip; - u_char dflags; - cts = ccb-cts; tp = np-target[ccb_h-target_id]; lp = sym_lp(np, tp, ccb_h-target_lun); @@ -8129,16 +8122,12 @@ static void sym_action2(struct cam_sim * #undef cts__scsi sym_xpt_done2(np, ccb, CAM_REQ_CMP); break; - } case XPT_CALC_GEOMETRY: - { cam_calc_geometry(ccb-ccg, /*extended*/1); sym_xpt_done2(np, ccb, CAM_REQ_CMP); break; - } case XPT_PATH_INQ: - { - struct ccb_pathinq *cpi = ccb-cpi; + cpi = ccb-cpi; cpi-version_num = 1; cpi-hba_inquiry = PI_MDP_ABLE|PI_SDTR_ABLE|PI_TAG_ABLE; if ((np-features FE_WIDE) != 0) @@ -8173,12 +8162,11 @@ static void sym_action2(struct cam_sim *
svn commit: r236062 - head/sys/net
Author: thompsa Date: Sat May 26 08:09:01 2012 New Revision: 236062 URL: http://svn.freebsd.org/changeset/base/236062 Log: Turn LACP debugging from a compile time option to a sysctl, it is very handy to be able to turn it on when negotiation to a switch misbehaves. Submitted by: Andrew Boyer MFC after:3 days Modified: head/sys/net/ieee8023ad_lacp.c Modified: head/sys/net/ieee8023ad_lacp.c == --- head/sys/net/ieee8023ad_lacp.c Sat May 26 08:03:42 2012 (r236061) +++ head/sys/net/ieee8023ad_lacp.c Sat May 26 08:09:01 2012 (r236062) @@ -38,6 +38,7 @@ __FBSDID($FreeBSD$); #include sys/kernel.h /* hz */ #include sys/socket.h /* for net/if.h */ #include sys/sockio.h +#include sys/sysctl.h #include machine/stdarg.h #include sys/lock.h #include sys/rwlock.h @@ -168,7 +169,8 @@ static void lacp_enable_distributing(str static int lacp_xmit_lacpdu(struct lacp_port *); static int lacp_xmit_marker(struct lacp_port *); -#if defined(LACP_DEBUG) +/* Debugging */ + static voidlacp_dump_lacpdu(const struct lacpdu *); static const char *lacp_format_partner(const struct lacp_peerinfo *, char *, size_t); @@ -184,10 +186,14 @@ static const char *lacp_format_portid(co size_t); static voidlacp_dprintf(const struct lacp_port *, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -#defineLACP_DPRINTF(a) lacp_dprintf a -#else -#define LACP_DPRINTF(a) /* nothing */ -#endif + +static int lacp_debug = 0; +SYSCTL_INT(_net, OID_AUTO, lacp_debug, CTLFLAG_RW | CTLFLAG_TUN, +lacp_debug, 0, Enable LACP debug logging (1=debug, 2=trace)); +TUNABLE_INT(net.lacp_debug, lacp_debug); + +#define LACP_DPRINTF(a) if (lacp_debug 0) { lacp_dprintf a ; } +#define LACP_TRACE(a) if (lacp_debug 1) { lacp_dprintf(a,%s\n,__func__); } /* * partner administration variables. @@ -290,10 +296,10 @@ lacp_pdu_input(struct lacp_port *lp, str goto bad; } -#if defined(LACP_DEBUG) - LACP_DPRINTF((lp, lacpdu receive\n)); - lacp_dump_lacpdu(du); -#endif /* defined(LACP_DEBUG) */ +if (lacp_debug 0) { + lacp_dprintf(lp, lacpdu receive\n); + lacp_dump_lacpdu(du); + } LACP_LOCK(lsc); lacp_sm_rx(lp, du); @@ -370,10 +376,10 @@ lacp_xmit_lacpdu(struct lacp_port *lp) sizeof(du-ldu_collector)); du-ldu_collector.lci_maxdelay = 0; -#if defined(LACP_DEBUG) - LACP_DPRINTF((lp, lacpdu transmit\n)); - lacp_dump_lacpdu(du); -#endif /* defined(LACP_DEBUG) */ + if (lacp_debug 0) { + lacp_dprintf(lp, lacpdu transmit\n); + lacp_dump_lacpdu(du); + } m-m_flags |= M_MCAST; @@ -647,9 +653,7 @@ lacp_disable_distributing(struct lacp_po { struct lacp_aggregator *la = lp-lp_aggregator; struct lacp_softc *lsc = lp-lp_lsc; -#if defined(LACP_DEBUG) char buf[LACP_LAGIDSTR_MAX+1]; -#endif /* defined(LACP_DEBUG) */ LACP_LOCK_ASSERT(lsc); @@ -684,9 +688,7 @@ lacp_enable_distributing(struct lacp_por { struct lacp_aggregator *la = lp-lp_aggregator; struct lacp_softc *lsc = lp-lp_lsc; -#if defined(LACP_DEBUG) char buf[LACP_LAGIDSTR_MAX+1]; -#endif /* defined(LACP_DEBUG) */ LACP_LOCK_ASSERT(lsc); @@ -720,7 +722,8 @@ lacp_transit_expire(void *vp) LACP_LOCK_ASSERT(lsc); - LACP_DPRINTF((NULL, %s\n, __func__)); + LACP_TRACE(NULL); + lsc-lsc_suppress_distributing = FALSE; } @@ -838,7 +841,8 @@ lacp_suppress_distributing(struct lacp_s return; } - LACP_DPRINTF((NULL, %s\n, __func__)); + LACP_TRACE(NULL); + lsc-lsc_suppress_distributing = TRUE; /* send a marker frame down each port to verify the queues are empty */ @@ -908,11 +912,9 @@ lacp_select_active_aggregator(struct lac struct lacp_aggregator *la; struct lacp_aggregator *best_la = NULL; uint64_t best_speed = 0; -#if defined(LACP_DEBUG) char buf[LACP_LAGIDSTR_MAX+1]; -#endif /* defined(LACP_DEBUG) */ - LACP_DPRINTF((NULL, %s:\n, __func__)); + LACP_TRACE(NULL); TAILQ_FOREACH(la, lsc-lsc_aggregators, la_q) { uint64_t speed; @@ -946,7 +948,6 @@ lacp_select_active_aggregator(struct lac KASSERT(best_la == NULL || !TAILQ_EMPTY(best_la-la_ports), (invalid aggregator list)); -#if defined(LACP_DEBUG) if (lsc-lsc_active_aggregator != best_la) { LACP_DPRINTF((NULL, active aggregator changed\n)); LACP_DPRINTF((NULL, old %s\n, @@ -957,7 +958,6 @@ lacp_select_active_aggregator(struct lac } LACP_DPRINTF((NULL, new %s\n, lacp_format_lagid_aggregator(best_la, buf, sizeof(buf; -#endif /* defined(LACP_DEBUG) */ if
svn commit: r236063 - head/sys/dev/sym
Author: marius Date: Sat May 26 08:17:30 2012 New Revision: 236063 URL: http://svn.freebsd.org/changeset/base/236063 Log: Remove extraneous empty lines. MFC after:3 day Modified: head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/sym/sym_hipd.c == --- head/sys/dev/sym/sym_hipd.c Sat May 26 08:09:01 2012(r236062) +++ head/sys/dev/sym/sym_hipd.c Sat May 26 08:17:30 2012(r236063) @@ -70,7 +70,6 @@ __FBSDID($FreeBSD$); #include opt_sym.h #include dev/sym/sym_conf.h - #include sys/systm.h #include sys/malloc.h #include sys/endian.h @@ -128,7 +127,6 @@ typedef u_int32_t u32; * requires memory barriers (and also IO barriers when they * make sense) to be used. */ - #ifdefined __i386__ || defined __amd64__ #define MEMORY_BARRIER() do { ; } while(0) #elif defined __powerpc__ @@ -144,7 +142,6 @@ typedef u_int32_t u32; /* * A la VMS/CAM-3 queue management. */ - typedef struct sym_quehead { struct sym_quehead *flink; /* Forward pointer */ struct sym_quehead *blink; /* Backward pointer */ @@ -206,7 +203,6 @@ static __inline void sym_que_splice(stru #define sym_que_entry(ptr, type, member) \ ((type *)((char *)(ptr)-(size_t)(((type *)0)-member))) - #define sym_insque(new, pos) __sym_que_add(new, pos, (pos)-flink) #define sym_remque(el) __sym_que_del((el)-blink, (el)-flink) @@ -373,7 +369,6 @@ static void MDELAY(int ms) { while (ms-- * pages of memory that will be useful if we ever need to deal * with IO MMUs for PCI. */ - #define MEMO_SHIFT 4 /* 16 bytes minimum memory chunk */ #define MEMO_PAGE_ORDER0 /* 1 PAGE maximum */ #if 0 @@ -567,7 +562,6 @@ static m_pool_s mp0 = {0, 0, ___mp0_getp static m_pool_s mp0 = {0, 0, ___mp0_getp}; #endif - /* * Actual memory allocation routine for non-DMAed memory. */ @@ -768,7 +762,6 @@ static m_addr_t __vtobus(bus_dma_tag_t d return vp ? vp-baddr + (((m_addr_t) m) - a) : 0; } - /* * Verbs for DMAable memory handling. * The _uvptv_ macro avoids a nasty warning about pointer to volatile @@ -783,7 +776,6 @@ static m_addr_t __vtobus(bus_dma_tag_t d #define _vtobus(np, p) __vtobus(np-bus_dmat, _uvptv_(p)) #define vtobus(p) _vtobus(np, p) - /* * Print a buffer in hexadecimal format. */ @@ -858,14 +850,12 @@ struct sym_nvram { * Symbios chips (never seen, by the way). * For now, this stuff does not deserve any comments. :) */ - #define sym_offb(o)(o) #define sym_offw(o)(o) /* * Some provision for support for BIG ENDIAN CPU. */ - #define cpu_to_scr(dw) htole32(dw) #define scr_to_cpu(dw) le32toh(dw) @@ -874,8 +864,6 @@ struct sym_nvram { * We use the `bus space' interface under FreeBSD-4 and * later kernel versions. */ - - #if defined(SYM_CONF_IOMAPPED) #define INB_OFF(o) bus_read_1(np-io_res, (o)) @@ -901,7 +889,6 @@ struct sym_nvram { #define OUTRAM_OFF(o, a, l)\ bus_write_region_1(np-ram_res, (o), (a), (l)) - /* * Common definitions for both bus space and legacy IO methods. */ @@ -1333,7 +1320,6 @@ struct sym_pmc { * For SYMBIOS chips that support LOAD/STORE this copy is * not needed and thus not performed. */ - struct sym_ccbh { /* * Start and restart SCRIPTS addresses (must be at 0). @@ -1749,7 +1735,6 @@ static __inline const char *sym_name(hcb #definePADDR_A(label) SYM_GEN_PADDR_A(struct SYM_FWA_SCR, label) #definePADDR_B(label) SYM_GEN_PADDR_B(struct SYM_FWB_SCR, label) - #ifdef SYM_CONF_GENERIC_SUPPORT /* * Allocate firmware #1 script area. @@ -2453,7 +2438,6 @@ static __inline void sym_init_burst(hcb_ } } - /* * Print out the list of targets that have some flag disabled by user. */ @@ -2848,7 +2832,6 @@ static int sym_prepare_setting(hcb_p np, * negotiation and the nego_status field of the CCB. * Returns the size of the message in bytes. */ - static int sym_prepare_nego(hcb_p np, ccb_p cp, int nego, u_char *msgptr) { tcb_p tp = np-target[cp-target]; @@ -2966,7 +2949,6 @@ static void sym_put_start_queue(hcb_p np OUTB (nc_istat, SIGP|np-istat_sem); } - /* * Soft reset the chip. * @@ -3842,7 +3824,6 @@ static void sym_log_hard_error(hcb_p np, * ask me for any guarantee that it will never fail. :-) * Use at your own decision and risk. */ - static void sym_intr1 (hcb_p np) { u_char istat, istatc; @@ -4004,7 +3985,6 @@ static void sym_poll(struct cam_sim *sim sym_intr1(cam_sim_softc(sim)); } - /* * generic recovery from scsi interrupt * @@ -5292,7 +5272,6 @@ static void sym_sir_task_recovery(hcb_p * offset (basically from the MDP message) and returns * the corresponding values of dp_sg and dp_ofs. */ - static int sym_evaluate_dp(hcb_p
svn commit: r236069 - head/sys/dev/usb/controller
Author: marius Date: Sat May 26 08:31:12 2012 New Revision: 236069 URL: http://svn.freebsd.org/changeset/base/236069 Log: Make the VIA workaround actually do its intended job. MFC after:3 days Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c == --- head/sys/dev/usb/controller/ehci_pci.c Sat May 26 08:25:41 2012 (r236068) +++ head/sys/dev/usb/controller/ehci_pci.c Sat May 26 08:31:12 2012 (r236069) @@ -243,7 +243,7 @@ ehci_pci_via_quirk(device_t self) val = pci_read_config(self, 0x4b, 1); if (val 0x20) return; - pci_write_config(self, 0x4b, val, 1); + pci_write_config(self, 0x4b, val | 0x20, 1); device_printf(self, VIA-quirk applied\n); } } ___ 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: r236070 - head/sys/dev/usb
Author: marius Date: Sat May 26 08:33:53 2012 New Revision: 236070 URL: http://svn.freebsd.org/changeset/base/236070 Log: Consistently use USB_PAGE_SIZE. Currently, this is cosmetic. MFC after:3 days Modified: head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_transfer.c == --- head/sys/dev/usb/usb_transfer.c Sat May 26 08:31:12 2012 (r236069) +++ head/sys/dev/usb/usb_transfer.c Sat May 26 08:33:53 2012 (r236070) @@ -217,12 +217,12 @@ usbd_transfer_setup_sub_malloc(struct us * Try multi-allocation chunks to reduce the number of DMA * allocations, hence DMA allocations are slow. */ - if (size = PAGE_SIZE) { + if (size = USB_PAGE_SIZE) { n_dma_pc = count; n_obj = 1; } else { /* compute number of objects per page */ - n_obj = (PAGE_SIZE / size); + n_obj = (USB_PAGE_SIZE / size); /* * Compute number of DMA chunks, rounded up * to nearest one: ___ 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: r236073 - head/sys/dev/usb/controller
Author: marius Date: Sat May 26 08:43:51 2012 New Revision: 236073 URL: http://svn.freebsd.org/changeset/base/236073 Log: Make the VIA workaround application somewhat more consistent with the ATI one. Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c == --- head/sys/dev/usb/controller/ehci_pci.c Sat May 26 08:41:48 2012 (r236072) +++ head/sys/dev/usb/controller/ehci_pci.c Sat May 26 08:43:51 2012 (r236073) @@ -243,7 +243,8 @@ ehci_pci_via_quirk(device_t self) val = pci_read_config(self, 0x4b, 1); if (val 0x20) return; - pci_write_config(self, 0x4b, val | 0x20, 1); + val |= 0x20; + pci_write_config(self, 0x4b, val, 1); device_printf(self, VIA-quirk applied\n); } } ___ 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: r236087 - in head/sys: netinet netinet6
Author: tuexen Date: Sat May 26 09:16:33 2012 New Revision: 236087 URL: http://svn.freebsd.org/changeset/base/236087 Log: Get rid of SCTP specific code to avoid CRC32C computations on loopback. Just just offloading. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sat May 26 09:13:38 2012 (r236086) +++ head/sys/netinet/sctp_output.c Sat May 26 09:16:33 2012 (r236087) @@ -4116,14 +4116,8 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) - (stcb) - (stcb-asoc.loopback_scope))) { - sctphdr-checksum = sctp_calculate_cksum(m, sizeof(struct ip) + sizeof(struct udphdr)); - SCTP_STAT_INCR(sctps_sendswcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + sctphdr-checksum = sctp_calculate_cksum(m, sizeof(struct ip) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); #endif if (V_udp_cksum) { SCTP_ENABLE_UDP_CSUM(o_pak); @@ -4474,14 +4468,8 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) - (stcb) - (stcb-asoc.loopback_scope))) { - sctphdr-checksum = sctp_calculate_cksum(m, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); - SCTP_STAT_INCR(sctps_sendswcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + sctphdr-checksum = sctp_calculate_cksum(m, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); #endif if ((udp-uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), packet_length - sizeof(struct ip6_hdr))) == 0) { udp-uh_sum = 0x; Modified: head/sys/netinet/sctp_sysctl.c == --- head/sys/netinet/sctp_sysctl.c Sat May 26 09:13:38 2012 (r236086) +++ head/sys/netinet/sctp_sysctl.c Sat May 26 09:16:33 2012 (r236087) @@ -55,9 +55,6 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_multiple_asconfs) = SCTPCTL_MULTIPLEASCONFS_DEFAULT; SCTP_BASE_SYSCTL(sctp_ecn_enable) = SCTPCTL_ECN_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_strict_sacks) = SCTPCTL_STRICT_SACKS_DEFAULT; -#if !defined(SCTP_WITH_NO_CSUM) - SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) = SCTPCTL_LOOPBACK_NOCSUM_DEFAULT; -#endif SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT; SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT; SCTP_BASE_SYSCTL(sctp_fr_max_burst_default) = SCTPCTL_FRMAXBURST_DEFAULT; @@ -604,9 +601,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); -#if !defined(SCTP_WITH_NO_CSUM) - RANGECHK(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback), SCTPCTL_LOOPBACK_NOCSUM_MIN, SCTPCTL_LOOPBACK_NOCSUM_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_fr_max_burst_default), SCTPCTL_FRMAXBURST_MIN, SCTPCTL_FRMAXBURST_MAX); @@ -870,11 +864,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT SCTP_BASE_SYSCTL(sctp_strict_sacks), 0, sysctl_sctp_check, IU, SCTPCTL_STRICT_SACKS_DESC); -#if !defined(SCTP_WITH_NO_CSUM) -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, loopback_nocsum, CTLTYPE_UINT | CTLFLAG_RW, -SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback), 0,
svn commit: r236093 - head/sys/netinet
Author: bz Date: Sat May 26 10:28:11 2012 New Revision: 236093 URL: http://svn.freebsd.org/changeset/base/236093 Log: Trim the extra $FreeBSD$ from the comment below the license. We use the __FBSDID() macro on the file now instead. MFC after:3 days Modified: head/sys/netinet/tcp_lro.c Modified: head/sys/netinet/tcp_lro.c == --- head/sys/netinet/tcp_lro.c Sat May 26 10:24:35 2012(r236092) +++ head/sys/netinet/tcp_lro.c Sat May 26 10:28:11 2012(r236093) @@ -27,8 +27,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #include sys/cdefs.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
svn commit: r236094 - head/sys/powerpc/include
Author: raj Date: Sat May 26 12:15:13 2012 New Revision: 236094 URL: http://svn.freebsd.org/changeset/base/236094 Log: Unify SPR defines formatting, no funtional changes. Modified: head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/include/spr.h == --- head/sys/powerpc/include/spr.h Sat May 26 10:28:11 2012 (r236093) +++ head/sys/powerpc/include/spr.h Sat May 26 12:15:13 2012 (r236094) @@ -115,9 +115,9 @@ #define SRR1_ISI_NOEXECUTE0x1000 /* Memory marked no-execute */ #define SRR1_ISI_PP 0x0800 /* PP bits forbid access */ #defineSPR_DECAR 0x036 /* ..8 Decrementer auto reload */ -#define SPR_EIE0x050 /* ..8 Exception Interrupt ??? */ -#define SPR_EID0x051 /* ..8 Exception Interrupt ??? */ -#define SPR_NRI0x052 /* ..8 Exception Interrupt ??? */ +#defineSPR_EIE 0x050 /* ..8 Exception Interrupt ??? */ +#defineSPR_EID 0x051 /* ..8 Exception Interrupt ??? */ +#defineSPR_NRI 0x052 /* ..8 Exception Interrupt ??? */ #defineSPR_USPRG0 0x100 /* 4.. User SPR General 0 */ #defineSPR_VRSAVE 0x100 /* .6. AltiVec VRSAVE */ #defineSPR_SPRG0 0x110 /* 468 SPR General 0 */ @@ -202,49 +202,49 @@ #defineSPR_DBAT2L 0x21d /* .6. Data BAT Reg 2 Lower */ #defineSPR_DBAT3U 0x21e /* .6. Data BAT Reg 3 Upper */ #defineSPR_DBAT3L 0x21f /* .6. Data BAT Reg 3 Lower */ -#define SPR_IC_CST 0x230 /* ..8 Instruction Cache CSR */ -#define IC_CST_IEN0x8000 /* I cache is ENabled (RO) */ -#define IC_CST_CMD_INVALL 0x0c00 /* I cache invalidate all */ -#define IC_CST_CMD_UNLOCKALL 0x0a00 /* I cache unlock all */ -#define IC_CST_CMD_UNLOCK 0x0800 /* I cache unlock block */ -#define IC_CST_CMD_LOADLOCK 0x0600 /* I cache load lock block */ -#define IC_CST_CMD_DISABLE0x0400 /* I cache disable */ -#define IC_CST_CMD_ENABLE 0x0200 /* I cache enable */ -#define IC_CST_CCER1 0x0020 /* I cache error type 1 (RO) */ -#define IC_CST_CCER2 0x0010 /* I cache error type 2 (RO) */ -#define IC_CST_CCER3 0x0008 /* I cache error type 3 (RO) */ +#defineSPR_IC_CST 0x230 /* ..8 Instruction Cache CSR */ +#define IC_CST_IEN0x8000 /* I cache is ENabled (RO) */ +#define IC_CST_CMD_INVALL 0x0c00 /* I cache invalidate all */ +#define IC_CST_CMD_UNLOCKALL 0x0a00 /* I cache unlock all */ +#define IC_CST_CMD_UNLOCK 0x0800 /* I cache unlock block */ +#define IC_CST_CMD_LOADLOCK 0x0600 /* I cache load lock block */ +#define IC_CST_CMD_DISABLE0x0400 /* I cache disable */ +#define IC_CST_CMD_ENABLE 0x0200 /* I cache enable */ +#define IC_CST_CCER1 0x0020 /* I cache error type 1 (RO) */ +#define IC_CST_CCER2 0x0010 /* I cache error type 2 (RO) */ +#define IC_CST_CCER3 0x0008 /* I cache error type 3 (RO) */ #defineSPR_IBAT4U 0x230 /* .6. Instruction BAT Reg 4 Upper */ -#define SPR_IC_ADR 0x231 /* ..8 Instruction Cache Address */ +#defineSPR_IC_ADR 0x231 /* ..8 Instruction Cache Address */ #defineSPR_IBAT4L 0x231 /* .6. Instruction BAT Reg 4 Lower */ -#define SPR_IC_DAT 0x232 /* ..8 Instruction Cache Data */ +#defineSPR_IC_DAT 0x232 /* ..8 Instruction Cache Data */ #defineSPR_IBAT5U 0x232 /* .6. Instruction BAT Reg 5 Upper */ #defineSPR_IBAT5L 0x233 /* .6. Instruction BAT Reg 5 Lower */ #defineSPR_IBAT6U 0x234 /* .6. Instruction BAT Reg 6 Upper */ #defineSPR_IBAT6L 0x235 /* .6. Instruction BAT Reg 6 Lower */ #defineSPR_IBAT7U 0x236 /* .6. Instruction BAT Reg 7 Upper */ #defineSPR_IBAT7L 0x237 /* .6. Instruction BAT Reg 7 Lower */ -#define SPR_DC_CST 0x230 /* ..8 Data Cache CSR */ -#define DC_CST_DEN0x8000 /* D cache ENabled (RO) */ -#define DC_CST_DFWT 0x4000 /* D cache Force Write-Thru (RO) */ -#define DC_CST_LES0x2000 /* D cache Little Endian Swap (RO) */ -#define DC_CST_CMD_FLUSH 0x0e00 /* D cache invalidate all */ -#define DC_CST_CMD_INVALL 0x0c00 /* D cache invalidate all */ -#define DC_CST_CMD_UNLOCKALL 0x0a00 /* D cache unlock all */ -#define DC_CST_CMD_UNLOCK 0x0800 /* D cache unlock block
Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 kern
On Fri, 25 May 2012, Ed Schouten wrote: Log: Remove use of non-ISO-C integer types from system call tables. These files already use ISO-C-style integer types, so make them less inconsistent by preferring the standard types. These should actually be Linux types l_foo_t. ISO-C-style integer types seem to have only been used for a couple of uintptr_t's, and these uses are more than just style bugs on amd64 since uintptr_t is for the host (64 bits on amd64) while the target uintptr_t is only 32 bits. There are also a few misuses of the abominable caddr_t instead of l_caddr_t, so syscalls that don't even take a caddr_t. Otherwise, Linux types are used a lot to avoid size mismatches. Modified: head/sys/amd64/linux32/syscalls.master == --- head/sys/amd64/linux32/syscalls.master Fri May 25 21:12:24 2012 (r236025) +++ head/sys/amd64/linux32/syscalls.master Fri May 25 21:50:48 2012 (r236026) @@ -54,8 +54,8 @@ l_int mode); } 9 AUE_LINKSTD { int linux_link(char *path, char *to); } 10 AUE_UNLINK STD { int linux_unlink(char *path); } -11 AUE_EXECVE STD { int linux_execve(char *path, u_int32_t *argp, \ - u_int32_t *envp); } +11 AUE_EXECVE STD { int linux_execve(char *path, uint32_t *argp, \ + uint32_t *envp); } argp and envp aren't uintany_t * in either Linux or FreeBSD. They start as char * const *. There is no Linux type for an indirect char *, and one was hacked up here by pretending that char * is u_int32_t (it is actually just 32 bits). Using l_caddr_t seems to be the best hack available (since by abusing l_caddr_t, we know that it is actually char *). The `const' in the type for argp and envp is further from being handled correctly. Most or all syscall.master's just type-pun it away. Similarly for const char *path. All the non-indirect char *s for pathnames and other things seem to be completely wrong on amd64 too. These pointers start as 32 bits, and it takes more than a bad type pun to turn then into kernel 64-bit pointers. The magic for this seems to be: - all args are converted to 64 bits (by zero-extension?) at a low level - the args struct for a pathname is [left padding]; char *; [right padding]; Since the char * is misdeclared, the explicit padding is null, but the layout of the args struct is correct because the wrong arg type in it supplies equivalent padding (extra 32 bits on the right). - the char * in the args struct is not actually a char *, and is unusable directly in the kernel. However, it is only used in copyin() and copyout(), where it becomes a user address and works correctly. (An older bug in this that the user address for copy*() is declared as void *. void * means a kernel pointer. The type of a user address should be more like vm_offset_t, but even that needs logical translation for linux32). The same mechanism presumably avoids problems when raw caddr_t is used instead of l_caddr_t, and when uintptr_t is used instead of l_uintptr_t. 12 AUE_CHDIR STD { int linux_chdir(char *path); } 13 AUE_NULLSTD { int linux_time(l_time_t *tm); } Example of a correct use of a linux type. Again, the first-level pointer is handled by the above magic, but for the second level we need an l_foo_t to describe its size correctly. 14 AUE_MKNOD STD { int linux_mknod(char *path, l_int mode, \ Broken except in the KR case, but amd64 is too new to pretend to support KR. Bug for bug compatible with mknod() and some other syscalls in kern/syscalls.master. mknod() takes an arg of type mode_t, not one of type int. l_mode_t exists so that the above can be declared correctly, and is already used for linux_chmod() and linux_chmodat(). OTOH, int for the mode arg is correct for open(), since open() is variadic at a level before the syscall, so its mode_t arg gets promoted to int. Similarly, if mknod() is compiled by a KR compiler, or by a STDC compiler with no prototype in scope, then its mode_t arg gets promoted to int (but for the STDC case, the behaviour is then undefined once mknod() is reached). Normally this doesn't cause any problems, but it is easy to declare things correctly. Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Fri May 25 21:12:24 2012 (r236025) +++ head/sys/compat/freebsd32/syscalls.master Fri May 25 21:50:48 2012 (r236026) @@ -104,9 +104,9 @@ int flags); } 28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, struct msghdr32 *msg, \ int flags); } -29 AUE_RECVFROMSTD { int
svn commit: r236095 - head/sys/powerpc/include
Author: raj Date: Sat May 26 12:39:23 2012 New Revision: 236095 URL: http://svn.freebsd.org/changeset/base/236095 Log: Provide SPR definitions for newer Book-E (E500mc, E5500, PPC465). Obtained from:Freescale, Semihalf. Modified: head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/include/spr.h == --- head/sys/powerpc/include/spr.h Sat May 26 12:15:13 2012 (r236094) +++ head/sys/powerpc/include/spr.h Sat May 26 12:39:23 2012 (r236095) @@ -184,6 +184,8 @@ #define MPC8245 0x8081 #define FSL_E500v1 0x8020 #define FSL_E500v2 0x8021 +#define FSL_E500mc 0x8023 +#define FSL_E5500 0x8024 #defineSPR_IBAT0U 0x210 /* .68 Instruction BAT Reg 0 Upper */ #defineSPR_IBAT0U 0x210 /* .6. Instruction BAT Reg 0 Upper */ @@ -421,6 +423,7 @@ #defineSPR_SRR30x3df /* 4.. Save/Restore Register 3 */ #defineSPR_HID00x3f0 /* ..8 Hardware Implementation Register 0 */ #defineSPR_HID10x3f1 /* ..8 Hardware Implementation Register 1 */ +#defineSPR_HID20x3f3 /* ..8 Hardware Implementation Register 2 */ #defineSPR_HID40x3f4 /* ..8 Hardware Implementation Register 4 */ #defineSPR_HID50x3f6 /* ..8 Hardware Implementation Register 5 */ #defineSPR_HID60x3f9 /* ..8 Hardware Implementation Register 6 */ @@ -627,6 +630,8 @@ #elif defined(E500) +#defineSPR_MCSR0x23c /* ..8 Machine Check Syndrome register */ + #defineSPR_ESR 0x003e /* ..8 Exception Syndrome Register */ #define ESR_PIL 0x0800 /* Program interrupt - illegal */ #define ESR_PPR 0x0400 /* Program interrupt - privileged */ @@ -637,11 +642,16 @@ #define ESR_BO 0x0002 /* Data/instruction storage, byte ordering */ #define ESR_SPE 0x0080 /* SPE exception bit */ + #defineSPR_CSRR0 0x03a /* ..8 58 Critical SRR0 */ #defineSPR_CSRR1 0x03b /* ..8 59 Critical SRR1 */ #defineSPR_MCSRR0 0x23a /* ..8 570 Machine check SRR0 */ #defineSPR_MCSRR1 0x23b /* ..8 571 Machine check SRR1 */ +#defineSPR_MMUCSR0 0x3f4 /* ..8 1012 MMU Control and Status Register 0 */ +#define MMUCSR0_L2TLB0_FI 0x04/* TLB0 flash invalidate */ +#define MMUCSR0_L2TLB1_FI 0x02/* TLB1 flash invalidate */ + #defineSPR_SVR 0x3ff /* ..8 1023 System Version Register */ #define SVR_MPC8533 0x8034 #define SVR_MPC8533E0x803c @@ -661,10 +671,16 @@ #define SVR_P2010E 0x80eb #define SVR_P2020 0x80e2 #define SVR_P2020E 0x80ea +#define SVR_P2041 0x8210 +#define SVR_P2041E 0x8218 +#define SVR_P3041 0x8211 +#define SVR_P3041E 0x8219 #define SVR_P4040 0x8200 #define SVR_P4040E 0x8208 #define SVR_P4080 0x8201 #define SVR_P4080E 0x8209 +#define SVR_P5020 0x8220 +#define SVR_P5020E 0x8228 #defineSVR_VER(svr)(((svr) 16) 0x) #defineSPR_PID00x030 /* ..8 Process ID Register 0 */ @@ -707,6 +723,18 @@ #defineSPR_MAS50x275 /* ..8 MMU Assist Register 5 Book-E */ #defineSPR_MAS60x276 /* ..8 MMU Assist Register 6 Book-E/e500 */ #defineSPR_MAS70x3B0 /* ..8 MMU Assist Register 7 Book-E/e500 */ +#defineSPR_MAS80x155 /* ..8 MMU Assist Register 8 Book-E/e500 */ + +#defineSPR_L1CFG0 0x203 /* ..8 L1 cache configuration register 0 */ +#defineSPR_L1CFG1 0x204 /* ..8 L1 cache configuration register 1 */ + +#defineSPR_CCR10x378 +#define CCR1_L2COBE 0x0040 + +#defineDCR_L2DCDCRAI 0x /* L2 D-Cache DCR Address Pointer */ +#defineDCR_L2DCDCRDI 0x0001 /* L2 D-Cache DCR Data Indirect */ +#defineDCR_L2CR0 0x00/* L2 Cache Configuration Register 0 */ +#define L2CR0_AS 0x3000 #defineSPR_L1CSR0 0x3F2 /* ..8 L1 Cache Control and Status Register 0 */ #define L1CSR0_DCPE 0x0001 /* Data Cache
svn commit: r236097 - in head/sys/powerpc: booke powerpc
Author: raj Date: Sat May 26 13:36:18 2012 New Revision: 236097 URL: http://svn.freebsd.org/changeset/base/236097 Log: Rename e500 prefix to match other Book-E CPU variations. CPU id tidbits for the new cores. Obtained from:Freescale, Semihalf. Modified: head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/booke/machdep.c == --- head/sys/powerpc/booke/machdep.cSat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/booke/machdep.cSat May 26 13:36:18 2012 (r236097) @@ -185,8 +185,8 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach int hw_direct_map = 0; -static void cpu_e500_startup(void *); -SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); +static void cpu_booke_startup(void *); +SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_booke_startup, NULL); void print_kernel_section_addr(void); void print_kenv(void); @@ -195,7 +195,7 @@ u_int booke_init(uint32_t, uint32_t); extern int elf32_nxstack; static void -cpu_e500_startup(void *dummy) +cpu_booke_startup(void *dummy) { int indx, size; @@ -538,7 +538,8 @@ cpu_halt(void) { mtmsr(mfmsr() ~(PSL_CE | PSL_EE | PSL_ME | PSL_DE)); - while (1); + while (1) + ; } int Modified: head/sys/powerpc/booke/platform_bare.c == --- head/sys/powerpc/booke/platform_bare.c Sat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/booke/platform_bare.c Sat May 26 13:36:18 2012 (r236097) @@ -73,7 +73,7 @@ static int bare_smp_next_cpu(platform_t, static int bare_smp_get_bsp(platform_t, struct cpuref *cpuref); static int bare_smp_start_cpu(platform_t, struct pcpu *cpu); -static void e500_reset(platform_t); +static void booke_reset(platform_t); static platform_method_t bare_methods[] = { PLATFORMMETHOD(platform_probe, bare_probe), @@ -85,7 +85,7 @@ static platform_method_t bare_methods[] PLATFORMMETHOD(platform_smp_get_bsp,bare_smp_get_bsp), PLATFORMMETHOD(platform_smp_start_cpu, bare_smp_start_cpu), - PLATFORMMETHOD(platform_reset, e500_reset), + PLATFORMMETHOD(platform_reset, booke_reset), { 0, 0 } }; @@ -307,7 +307,7 @@ bare_smp_start_cpu(platform_t plat, stru } static void -e500_reset(platform_t plat) +booke_reset(platform_t plat) { /* @@ -328,6 +328,7 @@ e500_reset(platform_t plat) mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM); printf(Reset failed...\n); - while (1); + while (1) + ; } Modified: head/sys/powerpc/powerpc/cpu.c == --- head/sys/powerpc/powerpc/cpu.c Sat May 26 13:12:14 2012 (r236096) +++ head/sys/powerpc/powerpc/cpu.c Sat May 26 13:36:18 2012 (r236097) @@ -75,13 +75,13 @@ #include machine/spr.h static voidcpu_6xx_setup(int cpuid, uint16_t vers); -static voidcpu_e500_setup(int cpuid, uint16_t vers); static voidcpu_970_setup(int cpuid, uint16_t vers); +static voidcpu_booke_setup(int cpuid, uint16_t vers); int powerpc_pow_enabled; void (*cpu_idle_hook)(void) = NULL; static voidcpu_idle_60x(void); -static voidcpu_idle_e500(void); +static voidcpu_idle_booke(void); struct cputab { const char *name; @@ -146,9 +146,13 @@ static const struct cputab models[] = { { Motorola PowerPC 8245, MPC8245,REVFMT_MAJMIN, PPC_FEATURE_HAS_FPU, cpu_6xx_setup }, { Freescale e500v1 core, FSL_E500v1, REVFMT_MAJMIN, - 0, cpu_e500_setup }, + 0, cpu_booke_setup }, { Freescale e500v2 core, FSL_E500v2, REVFMT_MAJMIN, - 0, cpu_e500_setup }, + 0, cpu_booke_setup }, + { Freescale e500mc core, FSL_E500mc, REVFMT_MAJMIN, + 0, cpu_booke_setup }, + { Freescale e5500 core, FSL_E5500, REVFMT_MAJMIN, + 0, cpu_booke_setup }, { IBM Cell Broadband Engine, IBMCELLBE, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, NULL}, @@ -191,6 +195,8 @@ cpu_setup(u_int cpuid) break; case FSL_E500v1: case FSL_E500v2: + case FSL_E500mc: + case FSL_E5500: maj = (pvr 4) 0xf; min = (pvr 0) 0xf; break; @@ -438,7 +444,7 @@ cpu_6xx_print_cacheinfo(u_int cpuid, uin } static void -cpu_e500_setup(int cpuid, uint16_t vers) +cpu_booke_setup(int cpuid, uint16_t vers) { register_t hid0; @@ -453,7 +459,7 @@ cpu_e500_setup(int cpuid, uint16_t vers)
svn commit: r236098 - head/sys/powerpc/booke
Author: raj Date: Sat May 26 13:42:55 2012 New Revision: 236098 URL: http://svn.freebsd.org/changeset/base/236098 Log: Retrieve CPU number info from the device tree. Obtained from:Freescale, Semihalf. Modified: head/sys/powerpc/booke/platform_bare.c Modified: head/sys/powerpc/booke/platform_bare.c == --- head/sys/powerpc/booke/platform_bare.c Sat May 26 13:36:18 2012 (r236097) +++ head/sys/powerpc/booke/platform_bare.c Sat May 26 13:42:55 2012 (r236098) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2009 Semihalf, Rafal Jaworowski + * Copyright (c) 2008-2012 Semihalf. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,26 +101,16 @@ PLATFORM_DEF(bare_platform); static int bare_probe(platform_t plat) { - uint32_t ver, sr; + phandle_t cpus, child; + uint32_t sr; int i, law_max, tgt; - ver = SVR_VER(mfspr(SPR_SVR)); - switch (ver ~0x0008) {/* Mask Security Enabled bit */ - case SVR_P4080: - maxcpu = 8; - break; - case SVR_P4040: - maxcpu = 4; - break; - case SVR_MPC8572: - case SVR_P1020: - case SVR_P2020: - maxcpu = 2; - break; - default: + if ((cpus = OF_finddevice(/cpus)) != 0) { + for (maxcpu = 0, child = OF_child(cpus); child != 0; + child = OF_peer(child), maxcpu++) + ; + } else maxcpu = 1; - break; - } /* * Clear local access windows. Skip DRAM entries, so we don't shoot ___ 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: r236101 - head/share/misc
Author: gavin Date: Sat May 26 14:44:18 2012 New Revision: 236101 URL: http://svn.freebsd.org/changeset/base/236101 Log: Updates to reflect recent commit bits handed back, etc. MFC after:1 week Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Sat May 26 14:24:14 2012 (r236100) +++ head/share/misc/committers-src.dot Sat May 26 14:44:18 2012 (r236101) @@ -39,6 +39,7 @@ billf [label=Bill Fumerola\nbillf@FreeB bmah [label=Bruce A. Mah\nb...@freebsd.org\n2002/01/29\n2009/09/13] bmilekic [label=Bosko Milekic\nbmile...@freebsd.org\n2000/09/21\n2008/11/10] bushman [label=Michael Bushkov\nbush...@freebsd.org\n2007/03/10\n2010/04/29] +ceri [label=Ceri Davies\nc...@freebsd.org\n2006/11/07\n2012/03/07] cjc [label=Crist J. Clark\n...@freebsd.org\n2001/06/01\n2006/12/29] dds [label=Diomidis Spinellis\n...@freebsd.org\n2003/06/20\n2010/09/22] dhartmei [label=Daniel Hartmeier\ndhart...@freebsd.org\n2004/04/06\n2008/12/08] @@ -58,20 +59,21 @@ jtc [label=J.T. Conklin\n...@freebsd.or kbyanc [label=Kelly Yancey\nkby...@freebsd.org\n2000/07/11\n2006/07/25] keichii [label=Michael Wu\nkeic...@freebsd.org\n2001/03/07\n2006/04/28] linimon [label=Mark Linimon\nlini...@freebsd.org\n2006/09/30\n2008/05/04] +lulf [label=Ulf Lilleengen\nl...@freebsd.org\n2007/10/24\n2012/01/19] mb [label=Maxim Bolotin\n...@freebsd.org\n2000/04/06\n2003/03/08] marks [label=Mark Santcroos\nma...@freebsd.org\n2004/03/18\n2008/09/29] mike [label=Mike Barcroft\nm...@freebsd.org\n2001/07/17\n2006/04/28] msmith [label=Mike Smith\nmsm...@freebsd.org\n/??/??\n2003/12/15] murray [label=Murray Stokely\nmur...@freebsd.org\n2000/04/05\n2010/07/25] +mux [label=Maxime Henrion\n...@freebsd.org\n2002/03/03\n2011/06/22] nate [label=Nate Willams\nn...@freebsd.org\n1993/06/12\n2003/12/15] njl [label=Nate Lawson\n...@freebsd.org\n2002/08/07\n2008/02/16] non [label=Noriaki Mitsnaga\n...@freebsd.org\n2000/06/19\n2007/03/06] onoe [label=Atsushi Onoe\no...@freebsd.org\n2000/07/21\n2008/11/10] +randi [label=Randi Harper\nra...@freebsd.org\n2010/04/20\n2012/05/10] rgrimes [label=Rod Grimes\nrgri...@freebsd.org\n1993/06/12\n2003/03/08] rink [label=Rink Springer\nr...@freebsd.org\n2006/01/16\n2010/11/04] robert [label=Robert Drehmel\nrob...@freebsd.org\n2001/08/23\n2006/05/13] -rmh [label=Robert Millan\n...@freebsd.org\n2011/09/18] -rpaulo [label=Rui Paulo\nrpa...@freebsd.org\n2007/09/25\n2010/12/03] sah [label=Sam Hopkins\n...@freebsd.org\n2004/12/15\n2008/11/10] shafeeq [label=Shafeeq Sinnamohideen\nshaf...@freebsd.org\n2000/06/19\n2006/04/06] sheldonh [label=Sheldon Hearn\nsheld...@freebsd.org\n1999/06/14\n2006/05/13] @@ -82,6 +84,7 @@ tmm [label=Thomas Moestl\ntmm@FreeBSD.o toshi [label=Toshihiko Arai\nto...@freebsd.org\n2000/07/06\n2003/03/08] tshiozak [label=Takuya SHIOZAKI\ntshio...@freebsd.org\n2001/04/25\n2003/03/08] uch [label=UCHIYAMA Yasushi\n...@freebsd.org\n2000/06/21\n2002/04/24] +yar [label=Yar Tikhiy\n...@freebsd.org\n2001/03/25\n2012/05/23] node [color=lightblue2, style=filled, bgcolor=black]; @@ -112,7 +115,6 @@ brueffer [label=Christian Brueffer\nbru bruno [label=Bruno Ducrot\nbr...@freebsd.org\n2005/07/18] bschmidt [label=Bernhard Schmidt\nbschm...@freebsd.org\n2010/02/06] bz [label=Bjoern A. Zeeb\n...@freebsd.org\n2004/07/27] -ceri [label=Ceri Davies\nc...@freebsd.org\n2006/11/07] cognet [label=Olivier Houchard\ncog...@freebsd.org\n2002/10/09] cokane [label=Coleman Kane\ncok...@freebsd.org\n2000/06/19] cperciva [label=Colin Percival\ncperc...@freebsd.org\n2004/01/20] @@ -187,7 +189,6 @@ kib [label=Konstantin Belousov\nkib@Fre kmacy [label=Kip Macy\nkm...@freebsd.org\n2005/06/01] le [label=Lukas Ertl\n...@freebsd.org\n2004/02/02] lstewart [label=Lawrence Stewart\nlstew...@freebsd.org\n2008/10/06] -lulf [label=Ulf Lilleengen\nl...@freebsd.org\n2007/10/24] marcel [label=Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03] marius [label=Marius Strobl\nmar...@freebsd.org\n2004/04/17] markm [label=Mark Murray\nma...@freebsd.org\n199?/??/??] @@ -202,7 +203,6 @@ mjacob [label=Matt Jacob\nmjacob@FreeBS mlaier [label=Max Laier\nmla...@freebsd.org\n2004/02/10] monthadar [label=Monthadar Al Jaberi\nmontha...@freebsd.org\n2012/04/02] mr [label=Michael Reifenberger\n...@freebsd.org\n2001/09/30] -mux [label=Maxime Henrion\n...@freebsd.org\n2002/03/03] neel [label=Neel Natu\nn...@freebsd.org\n2009/09/20] netchild [label=Alexander Leidinger\nnetch...@freebsd.org\n2005/03/31] nork [label=Norikatsu Shigemura\nn...@freebsd.org\n2009/06/09] @@ -213,7 +213,7 @@ olli [label=Oliver Fromme\nolli@FreeBSD peadar [label=Peter Edwards\npea...@freebsd.org\n2004/03/08] peter [label=Peter Wemm\npe...@freebsd.org\n/??/??] pfg [label=Pedro Giffuni\n...@freebsd.org\n2011/12/01] -philip [label=Philip Paeps\nphi...@frebsd.org\n2004/01/21]
svn commit: r236102 - head/share/misc
Author: gavin Date: Sat May 26 16:26:23 2012 New Revision: 236102 URL: http://svn.freebsd.org/changeset/base/236102 Log: Update to reflect various doc commit bits taken into safekeeping. MFC after:1 week Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot == --- head/share/misc/committers-doc.dot Sat May 26 14:44:18 2012 (r236101) +++ head/share/misc/committers-doc.dot Sat May 26 16:26:23 2012 (r236102) @@ -32,15 +32,19 @@ node [color=grey62, style=filled, bgcolo ache [label=Andrey Chernov\na...@freebsd.org\n1997/06/13\n2010/12/11] bmah [label=Bruce A. Mah\nb...@freebsd.org\n2000/08/22\n2009/09/13] bvs [label=Vitaly Bogdanov\n...@freebsd.org\n2005/10/03\n2010/12/11] +ceri [label=Ceri Davies\nc...@freebsd.org\n2002/03/17\n2012/02/29] den [label=Denis Peplin\n...@freebsd.org\n2003/09/13\n2009/07/09] garys [label=Gary W. Swearingen\nga...@freebsd.org\n2005/08/21\n2008/03/02] jcamou [label=Jesus R. Camou\njca...@freebsd.org\n2005/03/02\n2008/12/20] jesusr [label=Jesus Rodriguez Cuesta\njes...@freebsd.org\n1998/12/10\n2010/12/11] jim [label=Jim Mock\n...@freebsd.org\n1999/08/11\n2003/12/15] josef [label=Josef El-Rayes\njo...@freebsd.org\n2004/01/15\n2008/03/29] +marcel [label=Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03\n2012/04/25] mheinen [label=Martin Heinen\nmhei...@freebsd.org\n2002/10/04\n2006/04/26] +murray [label=Murray Stokely\nmur...@freebsd.org\n2000/04/05\n2012/04/25] nik [label=Nik Clayton\n...@freebsd.org\n1998/02/26\n2008/12/20] pgj [label=Gabor Pali\n...@freebsd.org\n2008/04/21\n2010/12/01] +roam [label=Peter Pentchev\nr...@freebsd.org\n2003/02/14\n2012/02/29] node [color=lightblue2, style=filled, bgcolor=black]; @@ -51,7 +55,6 @@ bcr [label=Benedict Reuschling\nbcr@Fre blackend [label=Marc Fonvieille\nblack...@freebsd.org\n2002/06/16] brd [label=Brad Davis\n...@freebsd.org\n2005/06/01] brueffer [label=Christian Brueffer\nbruef...@freebsd.org\n2003/01/13] -ceri [label=Ceri Davies\nc...@freebsd.org\n2002/03/17] chinsan [label=Chinsan Huang\nchin...@freebsd.org\n2006/09/20] danger [label=Daniel Gerzo\ndan...@freebsd.org\n2006/08/20] delphij [label=Xin Li\ndelp...@freebsd.org\n2004/09/14] @@ -67,16 +70,13 @@ keramida [label=Giorgos Keramidas\nkera linimon [label=Mark Linimon\nlini...@freebsd.org\n2004/03/31] loader [label=Fukang Chen\nloa...@freebsd.org\n2007/07/30] manolis [label=Manolis Kiagias\nmano...@freebsd.org\n2008/05/24] -marcel [label=Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03] marck [label=Dmitry Morozovsky\nma...@freebsd.org\n2004/08/10] maxim [label=Maxim Konovalov\nma...@freebsd.org\n2002/02/07] miwi [label=Martin Wilke\nm...@freebsd.org\n2007/10/26] -murray [label=Murray Stokely\nmur...@freebsd.org\n2000/04/05] pav [label=Pav Lucistnik\n...@freebsd.org\n2005/08/12] pluknet [label=Sergey Kandaurov\npluk...@freebsd.org\n2012/02/14] remko [label=Remko Lodder\nre...@freebsd.org\n2004/10/16] rene [label=Rene Ladan\nr...@freebsd.org\n2008/11/03] -roam [label=Peter Pentchev\nr...@freebsd.org\n2003/02/14] ryusuke [label=Ryusuke Suzuki\nryus...@freebsd.org\n2009/12/21] simon [label=Simon L. Nielsen\nsi...@freebsd.org\n2003/07/20] taras [label=Taras Korenko\nta...@freebsd.org\n2010/06/25] ___ 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: r236106 - head/lib/libpam/modules/pam_ssh
Author: des Date: Sat May 26 17:03:45 2012 New Revision: 236106 URL: http://svn.freebsd.org/changeset/base/236106 Log: Passing NULL as a key casues a segfault when loading SSH 1 keys. Use an empty string instead. Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c == --- head/lib/libpam/modules/pam_ssh/pam_ssh.c Sat May 26 16:42:47 2012 (r236105) +++ head/lib/libpam/modules/pam_ssh/pam_ssh.c Sat May 26 17:03:45 2012 (r236106) @@ -112,7 +112,7 @@ pam_ssh_load_key(const char *dir, const * with an empty passphrase, and if the key is not encrypted, * accept only an empty passphrase. */ - key = key_load_private(fn, NULL, comment); + key = key_load_private(fn, , comment); if (key != NULL !(*passphrase == '\0' nullok)) { key_free(key); return (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
svn commit: r236109 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc/man contrib/openpam...
Author: des Date: Sat May 26 17:10:16 2012 New Revision: 236109 URL: http://svn.freebsd.org/changeset/base/236109 Log: Update to OpenPAM Micrampelis. Added: head/contrib/openpam/TODO - copied unchanged from r236101, vendor/openpam/dist/TODO head/contrib/openpam/bin/openpam_dump_policy/ - copied from r236101, vendor/openpam/dist/bin/openpam_dump_policy/ head/contrib/openpam/doc/man/openpam_get_feature.3 - copied unchanged from r236101, vendor/openpam/dist/doc/man/openpam_get_feature.3 head/contrib/openpam/doc/man/openpam_readlinev.3 - copied unchanged from r236101, vendor/openpam/dist/doc/man/openpam_readlinev.3 head/contrib/openpam/doc/man/openpam_readword.3 - copied unchanged from r236101, vendor/openpam/dist/doc/man/openpam_readword.3 head/contrib/openpam/doc/man/openpam_set_feature.3 - copied unchanged from r236101, vendor/openpam/dist/doc/man/openpam_set_feature.3 head/contrib/openpam/doc/man/openpam_straddch.3 - copied unchanged from r236101, vendor/openpam/dist/doc/man/openpam_straddch.3 head/contrib/openpam/lib/openpam_ctype.h - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_ctype.h head/contrib/openpam/lib/openpam_features.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_features.c head/contrib/openpam/lib/openpam_features.h - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_features.h head/contrib/openpam/lib/openpam_get_feature.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_get_feature.c head/contrib/openpam/lib/openpam_readlinev.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_readlinev.c head/contrib/openpam/lib/openpam_readword.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_readword.c head/contrib/openpam/lib/openpam_set_feature.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_set_feature.c head/contrib/openpam/lib/openpam_straddch.c - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_straddch.c head/contrib/openpam/lib/openpam_strlcat.h - copied unchanged from r236101, vendor/openpam/dist/lib/openpam_strlcat.h head/contrib/openpam/pamgdb.in - copied unchanged from r236101, vendor/openpam/dist/pamgdb.in head/contrib/openpam/t/ - copied from r236101, vendor/openpam/dist/t/ head/usr.bin/pamtest/ head/usr.bin/pamtest/Makefile (contents, props changed) Modified: head/contrib/openpam/CREDITS head/contrib/openpam/HISTORY head/contrib/openpam/LICENSE head/contrib/openpam/Makefile.am head/contrib/openpam/Makefile.in head/contrib/openpam/RELNOTES head/contrib/openpam/aclocal.m4 head/contrib/openpam/bin/Makefile.am head/contrib/openpam/bin/Makefile.in head/contrib/openpam/bin/pamtest/pamtest.1 head/contrib/openpam/bin/pamtest/pamtest.c head/contrib/openpam/bin/su/su.1 head/contrib/openpam/config.h.in head/contrib/openpam/configure head/contrib/openpam/configure.ac head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/doc/man/Makefile.in head/contrib/openpam/doc/man/openpam.3 head/contrib/openpam/doc/man/openpam_borrow_cred.3 head/contrib/openpam/doc/man/openpam_free_data.3 head/contrib/openpam/doc/man/openpam_free_envlist.3 head/contrib/openpam/doc/man/openpam_get_option.3 head/contrib/openpam/doc/man/openpam_log.3 head/contrib/openpam/doc/man/openpam_nullconv.3 head/contrib/openpam/doc/man/openpam_readline.3 head/contrib/openpam/doc/man/openpam_restore_cred.3 head/contrib/openpam/doc/man/openpam_set_option.3 head/contrib/openpam/doc/man/openpam_subst.3 head/contrib/openpam/doc/man/openpam_ttyconv.3 head/contrib/openpam/doc/man/pam.3 head/contrib/openpam/doc/man/pam.conf.5 head/contrib/openpam/doc/man/pam_acct_mgmt.3 head/contrib/openpam/doc/man/pam_authenticate.3 head/contrib/openpam/doc/man/pam_chauthtok.3 head/contrib/openpam/doc/man/pam_close_session.3 head/contrib/openpam/doc/man/pam_conv.3 head/contrib/openpam/doc/man/pam_end.3 head/contrib/openpam/doc/man/pam_error.3 head/contrib/openpam/doc/man/pam_get_authtok.3 head/contrib/openpam/doc/man/pam_get_data.3 head/contrib/openpam/doc/man/pam_get_item.3 head/contrib/openpam/doc/man/pam_get_user.3 head/contrib/openpam/doc/man/pam_getenv.3 head/contrib/openpam/doc/man/pam_getenvlist.3 head/contrib/openpam/doc/man/pam_info.3 head/contrib/openpam/doc/man/pam_open_session.3 head/contrib/openpam/doc/man/pam_prompt.3 head/contrib/openpam/doc/man/pam_putenv.3 head/contrib/openpam/doc/man/pam_set_data.3 head/contrib/openpam/doc/man/pam_set_item.3 head/contrib/openpam/doc/man/pam_setcred.3 head/contrib/openpam/doc/man/pam_setenv.3 head/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 head/contrib/openpam/doc/man/pam_sm_authenticate.3 head/contrib/openpam/doc/man/pam_sm_chauthtok.3 head/contrib/openpam/doc/man/pam_sm_close_session.3
Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 kern
On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: On Fri, 25 May 2012, Ed Schouten wrote: Log: Remove use of non-ISO-C integer types from system call tables. These files already use ISO-C-style integer types, so make them less inconsistent by preferring the standard types. These should actually be Linux types l_foo_t. ISO-C-style integer types seem to have only been used for a couple of uintptr_t's, and these uses are more than just style bugs on amd64 since uintptr_t is for the host (64 bits on amd64) while the target uintptr_t is only 32 bits. There are also a few misuses of the abominable caddr_t instead of l_caddr_t, so syscalls that don't even take a caddr_t. Otherwise, Linux types are used a lot to avoid size mismatches. Modified: head/sys/amd64/linux32/syscalls.master == --- head/sys/amd64/linux32/syscalls.master Fri May 25 21:12:24 2012 (r236025) +++ head/sys/amd64/linux32/syscalls.master Fri May 25 21:50:48 2012 (r236026) @@ -54,8 +54,8 @@ l_int mode); } 9AUE_LINKSTD { int linux_link(char *path, char *to); } 10 AUE_UNLINK STD { int linux_unlink(char *path); } -11 AUE_EXECVE STD { int linux_execve(char *path, u_int32_t *argp, \ -u_int32_t *envp); } +11 AUE_EXECVE STD { int linux_execve(char *path, uint32_t *argp, \ +uint32_t *envp); } argp and envp aren't uintany_t * in either Linux or FreeBSD. They start as char * const *. There is no Linux type for an indirect char *, and one was hacked up here by pretending that char * is u_int32_t (it is actually just 32 bits). Using l_caddr_t seems to be the best hack available (since by abusing l_caddr_t, we know that it is actually char *). The `const' in the type for argp and envp is further from being handled correctly. Most or all syscall.master's just type-pun it away. Similarly for const char *path. All the non-indirect char *s for pathnames and other things seem to be completely wrong on amd64 too. These pointers start as 32 bits, and it takes more than a bad type pun to turn then into kernel 64-bit pointers. The magic for this seems to be: - all args are converted to 64 bits (by zero-extension?) at a low level The 'low level' AKA magic happens in several *_fetch_syscall_args() functions. For both linux32 and freebsd32, the magic code automatically zero-extends the arguments into 64bit entities. Linux passes args in registers, while FreeBSD uses words on stack. The types in the syscalls.master prototype should be in fact selected to fit the in-kernel prototypes for the functions implementing the syscalls, esp. for NOPROTO cases, and not to the low-level layout of the syscall entry data. - the args struct for a pathname is [left padding]; char *; [right padding]; Since the char * is misdeclared, the explicit padding is null, but the layout of the args struct is correct because the wrong arg type in it supplies equivalent padding (extra 32 bits on the right). The arg struct layout is irrelevant, since fetch_syscall_args() functions perform the needed translation from process ABI to kernel ABI. I think that the padding could be completely eliminated for translated ABI, but since it is easier to reuse makesyscalls.sh instead of creating ABI-specific script, and since there is quite non-trivial count of NOPROTO declarations that just match the native-ABI syscall handlers, it is better not to start that. - the char * in the args struct is not actually a char *, and is unusable directly in the kernel. However, it is only used in copyin() and copyout(), where it becomes a user address and works correctly. (An older bug in this that the user address for copy*() is declared as void *. void * means a kernel pointer. The type of a user address should be more like vm_offset_t, but even that needs logical translation for linux32). It is char *, but in different address space. Linux-style type qualifiers like __usermode would be appropriate there (remember far/near ?), but we do not have static checkers that do understand the difference. The same mechanism presumably avoids problems when raw caddr_t is used instead of l_caddr_t, and when uintptr_t is used instead of l_uintptr_t. 12 AUE_CHDIR STD { int linux_chdir(char *path); } 13 AUE_NULLSTD { int linux_time(l_time_t *tm); } Example of a correct use of a linux type. Again, the first-level pointer is handled by the above magic, but for the second level we need an l_foo_t to describe its size correctly. 14 AUE_MKNOD STD { int linux_mknod(char *path, l_int mode, \ Broken except in the KR case, but amd64 is too new to pretend to support KR. Bug for bug compatible with mknod() and some other syscalls in C std version is
svn commit: r236110 - head/usr.bin/fetch
Author: des Date: Sat May 26 17:19:41 2012 New Revision: 236110 URL: http://svn.freebsd.org/changeset/base/236110 Log: Revert r232274 - unauthorized, unnecessary and incorrect. Modified: head/usr.bin/fetch/fetch.1 Modified: head/usr.bin/fetch/fetch.1 == --- head/usr.bin/fetch/fetch.1 Sat May 26 17:10:16 2012(r236109) +++ head/usr.bin/fetch/fetch.1 Sat May 26 17:19:41 2012(r236110) @@ -1,5 +1,5 @@ .\- -.\ Copyright (c) 2000-2012 Dag-Erling Smørgrav +.\ Copyright (c) 2000-2011 Dag-Erling Smørgrav .\ All rights reserved. .\ Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\ by permission. @@ -29,7 +29,7 @@ .\ .\ $FreeBSD$ .\ -.Dd February 28, 2012 +.Dd September 27, 2011 .Dt FETCH 1 .Os .Sh NAME @@ -214,11 +214,6 @@ When the flag is specified, wait this many seconds between successive retries. .El .Pp -.Ar URL -.Bd -literal -scheme:(//(user(:pwd)?@)?host(:port)?)?/(document)? -.Ed -.Pp If .Nm receives a ___ 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: r236117 - in head/sys: kern sys
Author: kib Date: Sat May 26 20:03:47 2012 New Revision: 236117 URL: http://svn.freebsd.org/changeset/base/236117 Log: Stop treating td_sigmask specially for the purposes of new thread creation. Move it into the copied region of the struct thread. Update some comments. Requested by: bde X-MFC after: never Modified: head/sys/kern/kern_fork.c head/sys/kern/kern_kthread.c head/sys/kern/kern_thr.c head/sys/sys/proc.h Modified: head/sys/kern/kern_fork.c == --- head/sys/kern/kern_fork.c Sat May 26 18:20:30 2012(r236116) +++ head/sys/kern/kern_fork.c Sat May 26 20:03:47 2012(r236117) @@ -475,7 +475,6 @@ do_fork(struct thread *td, int flags, st bcopy(p2-p_comm, td2-td_name, sizeof(td2-td_name)); td2-td_sigstk = td-td_sigstk; - td2-td_sigmask = td-td_sigmask; td2-td_flags = TDF_INMEM; td2-td_lend_user_pri = PRI_MAX; Modified: head/sys/kern/kern_kthread.c == --- head/sys/kern/kern_kthread.cSat May 26 18:20:30 2012 (r236116) +++ head/sys/kern/kern_kthread.cSat May 26 20:03:47 2012 (r236117) @@ -271,7 +271,6 @@ kthread_add(void (*func)(void *), void * bzero(newtd-td_startzero, __rangeof(struct thread, td_startzero, td_endzero)); -/* XXX check if we should zero. */ bcopy(oldtd-td_startcopy, newtd-td_startcopy, __rangeof(struct thread, td_startcopy, td_endcopy)); @@ -295,7 +294,6 @@ kthread_add(void (*func)(void *), void * /* this code almost the same as create_thread() in kern_thr.c */ PROC_LOCK(p); p-p_flag |= P_HADTHREADS; - newtd-td_sigmask = oldtd-td_sigmask; /* XXX dubious */ thread_link(newtd, p); thread_lock(oldtd); /* let the scheduler know about these things. */ Modified: head/sys/kern/kern_thr.c == --- head/sys/kern/kern_thr.cSat May 26 18:20:30 2012(r236116) +++ head/sys/kern/kern_thr.cSat May 26 20:03:47 2012(r236117) @@ -252,7 +252,6 @@ create_thread(struct thread *td, mcontex PROC_LOCK(td-td_proc); td-td_proc-p_flag |= P_HADTHREADS; - newtd-td_sigmask = td-td_sigmask; thread_link(newtd, p); bcopy(p-p_comm, newtd-td_name, sizeof(newtd-td_name)); thread_lock(td); Modified: head/sys/sys/proc.h == --- head/sys/sys/proc.h Sat May 26 18:20:30 2012(r236116) +++ head/sys/sys/proc.h Sat May 26 20:03:47 2012(r236117) @@ -258,7 +258,6 @@ struct thread { u_int td_uticks; /* (t) Statclock hits in user mode. */ int td_intrval; /* (t) Return value for sleepq. */ sigset_ttd_oldsigmask; /* (k) Saved mask from pre sigpause. */ - sigset_ttd_sigmask; /* (c) Current signal mask. */ volatile u_int td_generation; /* (k) For detection of preemption */ stack_t td_sigstk; /* (k) Stack ptr and on-stack flag. */ int td_xsig;/* (c) Signal for ptrace */ @@ -272,10 +271,11 @@ struct thread { struct osd td_osd; /* (k) Object specific data. */ struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ pid_t td_dbg_forked; /* (c) Child pid for debugger. */ -#definetd_endzero td_rqindex +#definetd_endzero td_sigmask -/* Copied during fork1() or thread_sched_upcall(). */ +/* Copied during fork1() or create_thread(). */ #definetd_startcopy td_endzero + sigset_ttd_sigmask; /* (c) Current signal mask. */ u_char td_rqindex; /* (t) Run queue index. */ u_char td_base_pri;/* (t) Thread base kernel priority. */ u_char td_priority;/* (t) Thread active priority. */ @@ -285,7 +285,7 @@ struct thread { #definetd_endcopy td_pcb /* - * Fields that must be manually set in fork1() or thread_sched_upcall() + * Fields that must be manually set in fork1() or create_thread() * or already have been set in the allocator, constructor, etc. */ struct pcb *td_pcb;/* (k) Kernel VA of pcb and kstack. */ ___ 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: r236119 - in head/sys: conf powerpc/mpc85xx powerpc/powerpc
Author: raj Date: Sat May 26 21:02:49 2012 New Revision: 236119 URL: http://svn.freebsd.org/changeset/base/236119 Log: Move OpenPIC FDT bus glue to a shared location, so that other PowerPC platforms can use it, not only MPC85XX. This is just reorg, no functional changes. Added: head/sys/powerpc/powerpc/openpic_fdt.c - copied unchanged from r236094, head/sys/powerpc/mpc85xx/openpic_fdt.c Deleted: head/sys/powerpc/mpc85xx/openpic_fdt.c Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sat May 26 20:13:24 2012(r236118) +++ head/sys/conf/files.powerpc Sat May 26 21:02:49 2012(r236119) @@ -132,7 +132,6 @@ powerpc/mpc85xx/isa.c optionalmpc85xx powerpc/mpc85xx/lbc.c optionalmpc85xx powerpc/mpc85xx/mpc85xx.c optionalmpc85xx powerpc/mpc85xx/nexus.coptionalmpc85xx -powerpc/mpc85xx/openpic_fdt.c optionalfdt powerpc/mpc85xx/pci_fdt.c optionalpci mpc85xx powerpc/ofw/ofw_cpu.c optionalaim powerpc/ofw/ofw_machdep.c optionalaim @@ -194,6 +193,7 @@ powerpc/powerpc/mem.c optionalmem powerpc/powerpc/mmu_if.m standard powerpc/powerpc/mp_machdep.c optionalsmp powerpc/powerpc/openpic.c standard +powerpc/powerpc/openpic_fdt.c optionalfdt powerpc/powerpc/pic_if.m standard powerpc/powerpc/pmap_dispatch.cstandard powerpc/powerpc/platform.c standard Copied: head/sys/powerpc/powerpc/openpic_fdt.c (from r236094, head/sys/powerpc/mpc85xx/openpic_fdt.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powerpc/openpic_fdt.c Sat May 26 21:02:49 2012 (r236119, copy of r236094, head/sys/powerpc/mpc85xx/openpic_fdt.c) @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include sys/kernel.h +#include sys/module.h +#include sys/bus.h + +#include machine/bus.h +#include machine/intr_machdep.h + +#include dev/ofw/ofw_bus.h +#include dev/ofw/ofw_bus_subr.h + +#include machine/openpicvar.h + +#include pic_if.h + +static int openpic_fdt_probe(device_t); +static int openpic_fdt_attach(device_t); + +static device_method_t openpic_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, openpic_fdt_probe), + DEVMETHOD(device_attach,openpic_fdt_attach), + + /* PIC interface */ + DEVMETHOD(pic_bind, openpic_bind), + DEVMETHOD(pic_config, openpic_config), + DEVMETHOD(pic_dispatch, openpic_dispatch), + DEVMETHOD(pic_enable, openpic_enable), + DEVMETHOD(pic_eoi, openpic_eoi), + DEVMETHOD(pic_ipi, openpic_ipi), + DEVMETHOD(pic_mask, openpic_mask), + DEVMETHOD(pic_unmask, openpic_unmask), + + { 0, 0 }, +}; + +static driver_t openpic_fdt_driver = { + openpic, + openpic_fdt_methods, + sizeof(struct openpic_softc) +}; + +DRIVER_MODULE(openpic, simplebus, openpic_fdt_driver, openpic_devclass, 0, 0); + +static int +openpic_fdt_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, chrp,open-pic)) + return (ENXIO); +
svn commit: r236122 - head/share/man/man4
Author: wblock (doc committer) Date: Sat May 26 21:30:18 2012 New Revision: 236122 URL: http://svn.freebsd.org/changeset/base/236122 Log: Wording corrections and simplifications. Approved by: gjb (mentor) MFC after:3 days Modified: head/share/man/man4/vlan.4 Modified: head/share/man/man4/vlan.4 == --- head/share/man/man4/vlan.4 Sat May 26 21:07:15 2012(r236121) +++ head/share/man/man4/vlan.4 Sat May 26 21:30:18 2012(r236122) @@ -79,16 +79,16 @@ to a properly configured switch port. The VLAN tag should match one of those set up in the switched network. .Pp -Initially .Nm -assumes the same minimum length for tagged and untagged frames. -This mode is selected by the +initially assumes the same minimum length for tagged and untagged frames. +This mode is selected by setting the .Xr sysctl 8 variable .Va net.link.vlan.soft_pad -set to 0 (default). -However, there are network devices that fail to adjust frame length, -should it fall below the allowed minimum due to untagging. +to 0 +.Pq default . +However, there are network devices that fail to adjust frame length +when it falls below the allowed minimum due to untagging. Such devices should be able to interoperate with .Nm after changing the value of @@ -97,7 +97,7 @@ to 1. In the latter mode, .Nm will pad short frames before tagging them -so that their length stays not less than the minimum value +so that their length is not less than the minimum value after untagging by the non-compliant devices. .Sh HARDWARE The @@ -111,7 +111,7 @@ receive and transmit long frames (up to header and FCS). The capabilities may be user-controlled by the respective parameters to .Xr ifconfig 8 , -.Cm vlanhwtag +.Cm vlanhwtag , and .Cm vlanmtu . However, a physical interface is not obliged to react to them: @@ -119,8 +119,8 @@ It may have either capability enabled pe a way to turn it off. The whole issue is very specific to a particular device and its driver. .Pp -By now, the list of physical interfaces able of full VLAN processing -in the hardware is limited to the following devices: +At present, physical interfaces capable of full VLAN processing +in the hardware is limited to these devices: .Xr ae 4 , .Xr age 4 , .Xr alc 4 , @@ -146,11 +146,10 @@ in the hardware is limited to the follow and .Xr vge 4 . .Pp -The rest of the Ethernet interfaces can run -VLANs using software emulation in the +Other Ethernet interfaces can run VLANs using software emulation in the .Nm driver. -However, some of them lack the capability +However, some lack the capability of transmitting and receiving long frames. Assigning such an interface as the parent to .Nm @@ -163,9 +162,8 @@ connectivity problems due to massive, in .Xr icmp 4 filtering that breaks the Path MTU Discovery mechanism. .Pp -The following interfaces support long frames for -.Nm -natively: +These interfaces natively support long frames for +.Nm : .Xr axe 4 , .Xr bfe 4 , .Xr cas 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: r236026 - in head/sys: amd64/linux32 compat/freebsd32 kern
On Sat, 26 May 2012, Konstantin Belousov wrote: On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: Please don't quote the whole thing. On Fri, 25 May 2012, Ed Schouten wrote: Log: Remove use of non-ISO-C integer types from system call tables. These files already use ISO-C-style integer types, so make them less inconsistent by preferring the standard types. These should actually be Linux types l_foo_t. ISO-C-style integer types [... but only in the low-level linux headers where this is possible] Modified: head/sys/amd64/linux32/syscalls.master == --- head/sys/amd64/linux32/syscalls.master Fri May 25 21:12:24 2012 (r236025) +++ head/sys/amd64/linux32/syscalls.master Fri May 25 21:50:48 2012 (r236026) @@ -54,8 +54,8 @@ l_int mode); } 9 AUE_LINKSTD { int linux_link(char *path, char *to); } 10 AUE_UNLINK STD { int linux_unlink(char *path); } -11 AUE_EXECVE STD { int linux_execve(char *path, u_int32_t *argp, \ - u_int32_t *envp); } +11 AUE_EXECVE STD { int linux_execve(char *path, uint32_t *argp, \ + uint32_t *envp); } argp and envp aren't uintany_t * in either Linux or FreeBSD. They start as char * const *. There is no Linux type for an indirect char *, and one was hacked up here by pretending that char * is u_int32_t (it is actually just 32 bits). Using l_caddr_t seems to be the best hack available (since by abusing l_caddr_t, we know that it is actually char *). The `const' in the type for argp and envp is further from being handled correctly. Most or all syscall.master's just type-pun it away. Similarly for const char *path. All the non-indirect char *s for pathnames and other things seem to be completely wrong on amd64 too. These pointers start as 32 bits, and it takes more than a bad type pun to turn then into kernel 64-bit pointers. The magic for this seems to be: - all args are converted to 64 bits (by zero-extension?) at a low level ... The 'low level' AKA magic happens in several *_fetch_syscall_args() functions. For both linux32 and freebsd32, the magic code automatically zero-extends the arguments into 64bit entities. Linux passes args in registers, while FreeBSD uses words on stack. Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies from 64-bit registers frame-tf_r* to 64-bit sa-args[*]. I can't see how this gives anything except garbage in the top bits. Is there magic in the switch to 64-bit mode that sets the top bits? Anyway, sign extension would give garbage for unsigned args, and zero-extension would give garbage for negative signed args. The amd64 ia32_fetch_syscall_args() is quite different. Now the args stack as 32 bits on the stack, so normal C accesses naturally extend them when assigning them to 64-bit memory sa-args[*]. The stack is in user space, so normal C accesses are unavailable at first. sa-code is read using fuword32(), which gives zero-extension. Then the stack is copied in and normal C accesses become available. Finally, all args are copied from 32-bit args[i] to 64-bit sa-args[i]. args[i] is u_int32_t, so this indeed gives zero-extension. But args[i] is signed (int64_t), since it is register_t which is bogusly signed. So for negative args, overflow occurs when int32_t accessed as u_int32_t via the type pun in the declaration of args[]. There is no further overflow when the result is assigned to sa-args[i], but the result is wrong (no longer negative). It takes further magic to undo this. BTW, struct syscall_args has bad names and formatting. It is missing indentation and sa_prefixes for all its members. These bugs are missing for the 64-bit register side of the copy (struct trapframe). The types in the syscalls.master prototype should be in fact selected to fit the in-kernel prototypes for the functions implementing the syscalls, No, they have to match the types actually passed so as to ignore any garbage bits created by previous magic steps. The lower levels cannot do a correct conversion since they don't have access to the type info generated from syscalls.master, and they shouldn't do a correct conversion since this is easier to do later -- only the functions implementing the syscalls can do it easily. The type info is mostly encoded in syscall args structs for the individual functions, in a way that the conversions only need to access fields in the structs to do the conversions (this only works for simple conversions but handles ignoring any leading and trailing bits up to reasonably boundaries, since this is needed for endianness handling). esp. for NOPROTO cases, and not to the low-level layout of the syscall entry data. Of course the layout must match the one actually used by the function implementing the syscall. For NOPROTO cases, this is given
svn commit: r236126 - head/contrib/openpam/lib
Author: des Date: Sat May 26 23:10:21 2012 New Revision: 236126 URL: http://svn.freebsd.org/changeset/base/236126 Log: OpenPAM Micrampelis was re-rolled due to a showstopper bug. Modified: head/contrib/openpam/lib/openpam_configure.c Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/lib/openpam_configure.c == --- head/contrib/openpam/lib/openpam_configure.cSat May 26 23:08:53 2012(r236125) +++ head/contrib/openpam/lib/openpam_configure.cSat May 26 23:10:21 2012(r236126) @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam_configure.c 601 2012-04-14 20:37:45Z des $ + * $Id: openpam_configure.c 612 2012-05-26 23:02:55Z des $ */ #ifdef HAVE_CONFIG_H @@ -261,6 +261,8 @@ openpam_parse_chain(pam_handle_t *pamh, this-optc = wordc - i; for (i = 0; i wordc - this-optc; ++i) { FREE(wordv[i]); + } + for (i = 0; i this-optc; ++i) { wordv[i] = wordv[wordc - this-optc + i]; wordv[wordc - this-optc + i] = 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
svn commit: r236130 - head/sys/netinet6
Author: bz Date: Sat May 26 23:58:51 2012 New Revision: 236130 URL: http://svn.freebsd.org/changeset/base/236130 Log: Correctly get the payload length in host byte order. While we already plan to support 64k payload here, the IPv6 header payload length obviously is only 16 bit and the calculations need to be right. Reported by: dim Tested by:dim MFC after:1 day X-MFC:with r235958 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Sat May 26 23:48:56 2012 (r236129) +++ head/sys/netinet6/ip6_output.c Sat May 26 23:58:51 2012 (r236130) @@ -189,13 +189,13 @@ in6_delayed_cksum(struct mbuf *m, uint32 { u_short csum; - csum = in_cksum_skip(m, ntohl(plen), offset); + csum = in_cksum_skip(m, offset + plen, offset); if (m-m_pkthdr.csum_flags CSUM_UDP csum == 0) csum = 0x; offset += m-m_pkthdr.csum_data;/* checksum offset */ if (offset + sizeof(u_short) m-m_len) { - printf(%s: delayed m_pullup, m-len: %d off: %d\n, + printf(%s: delayed m_pullup, m-len: %d off: %d\n, __func__, m-m_len, offset); /* * XXX this should not happen, but if it does, the correct @@ -962,7 +962,7 @@ passout: */ if (sw_csum CSUM_DELAY_DATA) { sw_csum = ~CSUM_DELAY_DATA; - in6_delayed_cksum(m, ip6-ip6_plen, sizeof(struct ip6_hdr)); + in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); } #ifdef SCTP if (sw_csum CSUM_SCTP) { @@ -1077,7 +1077,7 @@ passout: * XXX-BZ handle the hw offloading case. Need flags. */ if (m-m_pkthdr.csum_flags CSUM_DELAY_DATA) { - in6_delayed_cksum(m, ip6-ip6_plen, sizeof(*ip6)); + in6_delayed_cksum(m, plen, hlen); m-m_pkthdr.csum_flags = ~CSUM_DELAY_DATA; } #ifdef SCTP ___ 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: r236135 - head/lib/libthr/thread
Author: davidxu Date: Sun May 27 01:24:51 2012 New Revision: 236135 URL: http://svn.freebsd.org/changeset/base/236135 Log: Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not be acquired. PR: 168317 MFC after:3 days Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c == --- head/lib/libthr/thread/thr_mutex.c Sun May 27 01:24:08 2012 (r236134) +++ head/lib/libthr/thread/thr_mutex.c Sun May 27 01:24:51 2012 (r236135) @@ -538,6 +538,7 @@ mutex_self_trylock(struct pthread_mutex switch (PMUTEX_TYPE(m-m_flags)) { case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_NORMAL: + case PTHREAD_MUTEX_ADAPTIVE_NP: ret = EBUSY; 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: r236136 - in head/sys: compat/freebsd32 kern
Author: kib Date: Sun May 27 05:24:53 2012 New Revision: 236136 URL: http://svn.freebsd.org/changeset/base/236136 Log: Fix ki_cow for compat32 binaries. MFC after:3 days Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_proc.c Modified: head/sys/compat/freebsd32/freebsd32.h == --- head/sys/compat/freebsd32/freebsd32.h Sun May 27 01:24:51 2012 (r236135) +++ head/sys/compat/freebsd32/freebsd32.h Sun May 27 05:24:53 2012 (r236136) @@ -306,7 +306,7 @@ struct kinfo_proc32 { u_int ki_estcpu; u_int ki_slptime; u_int ki_swtime; - int ki_spareint1; + u_int ki_cow; u_int64_t ki_runtime; struct timeval32 ki_start; struct timeval32 ki_childtime; Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Sun May 27 01:24:51 2012(r236135) +++ head/sys/kern/kern_proc.c Sun May 27 05:24:53 2012(r236136) @@ -1136,6 +1136,7 @@ freebsd32_kinfo_proc_out(const struct ki CP(*ki, *ki32, ki_estcpu); CP(*ki, *ki32, ki_slptime); CP(*ki, *ki32, ki_swtime); + CP(*ki, *ki32, ki_cow); CP(*ki, *ki32, ki_runtime); TV_CP(*ki, *ki32, ki_start); TV_CP(*ki, *ki32, ki_childtime); ___ 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: r236137 - head/contrib/gcc/config/i386
Author: kib Date: Sun May 27 05:27:47 2012 New Revision: 236137 URL: http://svn.freebsd.org/changeset/base/236137 Log: Enable gnu hash generation for dynamic ELF binaries on x86. Reviewed by: kan Modified: head/contrib/gcc/config/i386/freebsd.h head/contrib/gcc/config/i386/freebsd64.h Modified: head/contrib/gcc/config/i386/freebsd.h == --- head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:24:53 2012 (r236136) +++ head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:27:47 2012 (r236137) @@ -49,6 +49,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic: -export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ +%{!static:--hash-style=both} \ %{symbolic:-Bsymbolic} /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h Modified: head/contrib/gcc/config/i386/freebsd64.h == --- head/contrib/gcc/config/i386/freebsd64.hSun May 27 05:24:53 2012 (r236136) +++ head/contrib/gcc/config/i386/freebsd64.hSun May 27 05:27:47 2012 (r236137) @@ -54,4 +54,5 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic} ___ 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