svn commit: r205675 - in head/sys/mips: include mips sibyte
Author: neel Date: Fri Mar 26 07:15:27 2010 New Revision: 205675 URL: http://svn.freebsd.org/changeset/base/205675 Log: Replace sb_store64()/sb_load64() with mips3_sd()/mips3_ld() respectively. Obtained from NetBSD. Suggested by: jmallett@ Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/support.S head/sys/mips/sibyte/sb_asm.S head/sys/mips/sibyte/sb_scd.c Modified: head/sys/mips/include/cpufunc.h == --- head/sys/mips/include/cpufunc.h Fri Mar 26 06:06:20 2010 (r205674) +++ head/sys/mips/include/cpufunc.h Fri Mar 26 07:15:27 2010 (r205675) @@ -283,6 +283,35 @@ breakpoint(void) __asm __volatile ("break"); } +#if defined(__GNUC__) && !defined(__mips_o32) +static inline uint64_t +mips3_ld(const volatile uint64_t *va) +{ + uint64_t rv; + +#if defined(_LP64) + rv = *va; +#else + __asm volatile("ld %0,0(%1)" : "=d"(rv) : "r"(va)); +#endif + + return (rv); +} + +static inline void +mips3_sd(volatile uint64_t *va, uint64_t v) +{ +#if defined(_LP64) + *va = v; +#else + __asm volatile("sd %0,0(%1)" :: "r"(v), "r"(va)); +#endif +} +#else +uint64_t mips3_ld(volatile uint64_t *va); +void mips3_sd(volatile uint64_t *, uint64_t); +#endif /* __GNUC__ */ + #endif /* _KERNEL */ #definereadb(va) (*(volatile uint8_t *) (va)) Modified: head/sys/mips/mips/support.S == --- head/sys/mips/mips/support.SFri Mar 26 06:06:20 2010 (r205674) +++ head/sys/mips/mips/support.SFri Mar 26 07:15:27 2010 (r205675) @@ -51,6 +51,38 @@ */ /* + * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + * This product includes software developed by Jonathan R. Stone for + * the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. + */ + +/* * Contains code that is the first executed at boot time plus * assembly language support routines. */ @@ -61,6 +93,7 @@ #include #include #include +#include #include "assym.s" @@ -1586,3 +1619,78 @@ LEAF(octeon_get_control) .set mips0 END(octeon_get_control) #endif + +LEAF(mips3_ld) + .set push + .set noreorder + .set mips64 +#if defined(__mips_o32) + mfc0t0, MIPS_COP_0_STATUS # turn off interrupts + and t1, t0, ~(MIPS_SR_INT_IE) + mtc0t1, MIPS_COP_0_STATUS + COP0_SYNC + nop + nop + nop + + ld v0, 0(a0) +#if _BYTE_ORDER == _BIG_ENDIAN + dsllv1, v0, 32 + dsrav1, v1, 32 # low word in v1 + dsrav0, v0, 32 # high word in v0 +#else + dsrav1, v0, 32 # high word in v1 + dsllv0, v0, 32 + dsrav0, v0, 32 # low word in v0 +#endif + + mtc0t0, MIPS_COP_0_STATUS # restore intr status. + COP0_SYNC + nop +#else /* !__mips_o32 */ + ld v0, 0(a0) +#endif /* !__mips_o32 */ + + jr ra + nop + .set pop +END(mips3_ld) + +LEAF(mips3_sd) + .set push + .set mips64 + .set noreorder +#if defined(__mips_o32) + mfc0t0, MIPS_COP_0_STATUS # turn off interrupts + and t1, t0, ~(MIPS_SR_INT_IE) + m
svn commit: r205678 - head/sys/compat/linux
Author: netchild Date: Fri Mar 26 08:42:11 2010 New Revision: 205678 URL: http://svn.freebsd.org/changeset/base/205678 Log: Fix some problems which may lead to a panic: - right order of src and dst in memcpy - NULL out the clips after freeing to prevent an accident Noticed by: hselasky Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Fri Mar 26 08:05:30 2010 (r205677) +++ head/sys/compat/linux/linux_ioctl.c Fri Mar 26 08:42:11 2010 (r205678) @@ -2711,7 +2711,7 @@ linux_v4l_clip_copy(void *lvc, struct vi /* XXX: If there can be no concurrency: s/M_NOWAIT/M_WAITOK/ */ if ((*ppvc = malloc(sizeof(**ppvc), M_LINUX, M_NOWAIT)) == NULL) return (ENOMEM);/* XXX: linux has no ENOMEM here */ - memcpy(&vclip, *ppvc, sizeof(vclip)); + memcpy(*ppvc, &vclip, sizeof(vclip)); (*ppvc)->next = NULL; return (0); } @@ -2726,6 +2726,8 @@ linux_v4l_cliplist_free(struct video_win ppvc_next = &((*ppvc)->next); free(*ppvc, M_LINUX); } + vw->clips = NULL; + return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r205679 - head/sys/conf
Author: netchild Date: Fri Mar 26 08:47:07 2010 New Revision: 205679 URL: http://svn.freebsd.org/changeset/base/205679 Log: Fix a typo in a comment. Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Fri Mar 26 08:42:11 2010(r205678) +++ head/sys/conf/kmod.mk Fri Mar 26 08:47:07 2010(r205679) @@ -325,7 +325,7 @@ ${_src}: .endfor .endif -# Repsect configuration-specific C flags. +# Respect configuration-specific C flags. CFLAGS+= ${CONF_CFLAGS} MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m \ ___ 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: r205680 - head/sys/dev/ata
Author: mav Date: Fri Mar 26 10:18:19 2010 New Revision: 205680 URL: http://svn.freebsd.org/changeset/base/205680 Log: Use last 16 bytes of serial number in metadata instead of first ones, same as Intel MatrixRAID does. PR: kern/124064 Modified: head/sys/dev/ata/ata-raid.c Modified: head/sys/dev/ata/ata-raid.c == --- head/sys/dev/ata/ata-raid.c Fri Mar 26 08:47:07 2010(r205679) +++ head/sys/dev/ata/ata-raid.c Fri Mar 26 10:18:19 2010(r205680) @@ -2568,8 +2568,15 @@ ata_raid_intel_read_meta(device_t dev, s if (meta->generation >= raid->generation) { for (disk = 0; disk < raid->total_disks; disk++) { struct ata_device *atadev = device_get_softc(parent); + int len; - if (!strncmp(raid->disks[disk].serial, atadev->param.serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(raid->disks[disk].serial)) ? + len - sizeof(raid->disks[disk].serial) : 0; + if (!strncmp(raid->disks[disk].serial, atadev->param.serial + len, sizeof(raid->disks[disk].serial))) { raid->disks[disk].dev = parent; raid->disks[disk].flags |= (AR_DF_PRESENT | AR_DF_ONLINE); @@ -2639,8 +2646,15 @@ ata_raid_intel_write_meta(struct ar_soft device_get_softc(device_get_parent(rdp->disks[disk].dev)); struct ata_device *atadev = device_get_softc(rdp->disks[disk].dev); + int len; - bcopy(atadev->param.serial, meta->disk[disk].serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(rdp->disks[disk].serial)) ? + len - sizeof(rdp->disks[disk].serial) : 0; + bcopy(atadev->param.serial + len, meta->disk[disk].serial, sizeof(rdp->disks[disk].serial)); meta->disk[disk].sectors = rdp->disks[disk].sectors; meta->disk[disk].id = (ch->unit << 16) | atadev->unit; ___ 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: r205662 - in head/sys/boot/i386: boot2 gptboot zfsboot
thanks a lot. :) were the following changes to the bootstrap loader left out on purpose? -- Alexander Best Index: sys/boot/i386/loader/Makefile === --- sys/boot/i386/loader/Makefile (revision 205658) +++ sys/boot/i386/loader/Makefile (working copy) @@ -6,7 +6,7 @@ LOADER?= loader PROG= ${LOADER}.sym INTERNALPROG= -NEWVERSWHAT?= "bootstrap loader" i386 +NEWVERSWHAT?= "bootstrap loader" x86 # architecture-specific loader code SRCS= main.c conf.c vers.c ___ 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: r205681 - in head/sys/dev/usb: . quirk
Author: netchild Date: Fri Mar 26 11:02:01 2010 New Revision: 205681 URL: http://svn.freebsd.org/changeset/base/205681 Log: - add some usb devices (scanner, printer, usb storage) - add quirks for the usb storage Reviewed by: hselasky Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Fri Mar 26 10:18:19 2010 (r205680) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Mar 26 11:02:01 2010 (r205681) @@ -227,6 +227,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(IOMEGA, ZIP100, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JM20336, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(JMICRON, JM20337, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), @@ -442,6 +443,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(ACTIONS, MP4, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASUS, GMSC, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(UNKNOWN4, USBMEMSTICK, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), }; #undef USB_QUIRK_VP #undef USB_QUIRK Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsFri Mar 26 10:18:19 2010(r205680) +++ head/sys/dev/usb/usbdevsFri Mar 26 11:02:01 2010(r205681) @@ -58,6 +58,7 @@ $FreeBSD$ vendor UNKNOWN10x0053 Unknown vendor vendor UNKNOWN20x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. +vendor UNKNOWN40x0204 Unknown vendor vendor HUMAX 0x02ad HUMAX vendor LTS 0x0386 LTS vendor BWCT0x03da Bernd Walter Computer Technology @@ -1098,6 +1099,7 @@ product BROADCOM BCM2033 0x2033 BCM2033 /* Brother Industries products */ product BROTHER HL1050 0x0002 HL-1050 laser printer +product BROTHER MFC8600_9650 0x0100 MFC8600/9650 multifunction device /* Behavior Technology Computer products */ product BTC BTC79320x6782 Keyboard with mouse port @@ -1812,6 +1814,7 @@ product JABLOTRON PC60B 0x0001 PC-60B product JATON EDA 0x5704 Ethernet /* JMicron products */ +product JMICRON JM203360x2336 USB to SATA Bridge product JMICRON JM203370x2338 USB to ATA/ATAPI Bridge /* JVC products */ @@ -2127,6 +2130,7 @@ product MUSTEK 1200UB 0x0006 1200 UB sc product MUSTEK 1200USBPLUS 0x0007 1200 USB Plus scanner product MUSTEK 1200CUPLUS 0x0008 1200 CU Plus scanner product MUSTEK BEARPAW1200F0x0010 BearPaw 1200F scanner +product MUSTEK BEARPAW2400TA 0x0218 BearPaw 2400TA scanner product MUSTEK BEARPAW1200TA 0x021e BearPaw 1200TA scanner product MUSTEK 600USB 0x0873 600 USB scanner product MUSTEK MDC800 0xa800 MDC-800 digital camera @@ -3023,6 +3027,9 @@ product UMEDIA AR5523_2_NF0x3206 AR5523 /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter +/* Unknown vendors */ +product UNKNOWN4 USBMEMSTICK 0x6025 Flash Disk CBM + /* U.S. Robotics products */ product USR USR54230x0121 USR5423 WLAN ___ 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: r205682 - head/sys/kern
Author: jh Date: Fri Mar 26 11:33:12 2010 New Revision: 205682 URL: http://svn.freebsd.org/changeset/base/205682 Log: Support only LOOKUP operation for "/" in relookup() because lookup() can't succeed for CREATE, DELETE and RENAME. Discussed with: bde Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Fri Mar 26 11:02:01 2010(r205681) +++ head/sys/kern/vfs_lookup.c Fri Mar 26 11:33:12 2010(r205682) @@ -948,19 +948,17 @@ relookup(struct vnode *dvp, struct vnode #endif /* -* Check for degenerate name (e.g. / or "") -* which is a way of talking about a directory, -* e.g. like "/." or ".". +* Check for "" which represents the root directory after slash +* removal. */ if (cnp->cn_nameptr[0] == '\0') { - if (cnp->cn_nameiop != LOOKUP || wantparent) { - error = EISDIR; - goto bad; - } - if (dp->v_type != VDIR) { - error = ENOTDIR; - goto bad; - } + /* +* Support only LOOKUP for "/" because lookup() +* can't succeed for CREATE, DELETE and RENAME. +*/ + KASSERT(cnp->cn_nameiop == LOOKUP, ("nameiop must be LOOKUP")); + KASSERT(dp->v_type == VDIR, ("dp is not a directory")); + if (!(cnp->cn_flags & LOCKLEAF)) VOP_UNLOCK(dp, 0); *vpp = dp; ___ 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: r205683 - head/sys/compat/linprocfs
Author: netchild Date: Fri Mar 26 11:43:15 2010 New Revision: 205683 URL: http://svn.freebsd.org/changeset/base/205683 Log: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 (r205682) +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 (r205683) @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ + +/* The LINUX_USER_HZ is assumed 100 for now */ + +#if defined(__i386__) && defined(__GNUCLIKE_ASM) +/* we need intermediate result as 64 bit, otherwise it overflows too early */ +#define DO64_MULDIV(v,m,d) \ +({ \ + unsigned long rv0; \ + unsigned long rv1; \ + __asm__ __volatile__(\ +"mull %1\n\t" \ +"divl %2\n\t" \ +:"=a" (rv0), "=d" (rv1) \ +:"r" (d), "0" (v), "1" (m) \ +:"cc" ); \ + rv0; \ +}) + +#define T2J(x) DO64_MULDIV((x), 100UL, (stathz ? stathz : hz)) /* ticks to jiffies */ +#else #define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz))/* ticks to jiffies */ +#endif #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +#define TV2J(x)(((x)->tv_sec) * 100UL + ((x)->tv_usec) / 1) + /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state * @@ -502,12 +525,24 @@ linprocfs_douptime(PFS_FILL_ARGS) { long cp_time[CPUSTATES]; struct timeval tv; + int cnt, i; getmicrouptime(&tv); read_cpu_time(cp_time); - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", + + for (cnt = 0, i = 0; i <= mp_maxid; ++i) + if (!(CPU_ABSENT(i))) + cnt++; + + if (!cnt) + cnt = 1; + + i = ((cp_time[CP_IDLE])/cnt) % (stathz ? stathz : hz); + i = (i * 100) / (stathz ? stathz : hz); + + sbuf_printf(sb, "%lld.%02ld %ld.%02d\n", (long long)tv.tv_sec, tv.tv_usec / 1, - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); + T2S((cp_time[CP_IDLE]/cnt)), i); return (0); } @@ -613,9 +648,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; + unsigned long startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); + if (p->p_vmspace) { + startcode = (unsigned long) p->p_vmspace->vm_taddr; + startdata = (unsigned long) p->p_vmspace->vm_daddr; + } else { + startcode = 0; + startdata = 0; + }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -634,30 +677,27 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", 0); /* XXX */ + PS_ADD("tty", "%d", kp.ki_tdev); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt","%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt","%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); - PS_ADD("cutime","%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime","%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", TV2J((&kp.ki_rusage.ru_utime))); + PS_ADD("stime", "%ld", TV2J((&kp.ki_rusage.ru_stime))); + PS_ADD("cutime","%ld", TV2J((&kp.ki_rusage_ch.ru_utime))); + PS_ADD("cstime","%ld", TV2J((&kp.ki_rusage_ch.ru_stime))); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - /* XXX: starttime is not r
Re: svn commit: r205683 - head/sys/compat/linprocfs
On Fri, Mar 26, 2010 at 11:43:15AM +, Alexander Leidinger wrote: > Author: netchild > Date: Fri Mar 26 11:43:15 2010 > New Revision: 205683 > URL: http://svn.freebsd.org/changeset/base/205683 > > Log: > Fix some bogus values in linprocfs. > > Submitted by: Petr Salinger > Verified on:GNU/kFreeBSD debian 8.0-1-686 (by submitter) > PR: 144584 > > Modified: > head/sys/compat/linprocfs/linprocfs.c > > Modified: head/sys/compat/linprocfs/linprocfs.c > == > --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 > (r205682) > +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 > (r205683) > @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$"); > /* > * Various conversion macros > */ > + > +/* The LINUX_USER_HZ is assumed 100 for now */ > + > +#if defined(__i386__) && defined(__GNUCLIKE_ASM) > +/* we need intermediate result as 64 bit, otherwise it overflows too early */ > +#define DO64_MULDIV(v,m,d) \ > +({ \ > + unsigned long rv0; \ > + unsigned long rv1; \ > + __asm__ __volatile__(\ > +"mull %1\n\t" \ > +"divl %2\n\t" \ > +:"=a" (rv0), "=d" (rv1) \ > +:"r" (d), "0" (v), "1" (m) \ > +:"cc" ); \ > + rv0; \ > +}) Why it is impossible to express the calculation in C ? pgpcz6U3oj3UV.pgp Description: PGP signature
Re: svn commit: r205683 - head/sys/compat/linprocfs
Quoting Kostik Belousov (from Fri, 26 Mar 2010 13:49:25 +0200): On Fri, Mar 26, 2010 at 11:43:15AM +, Alexander Leidinger wrote: Author: netchild Date: Fri Mar 26 11:43:15 2010 New Revision: 205683 URL: http://svn.freebsd.org/changeset/base/205683 Log: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 (r205682) +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 (r205683) @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ + +/* The LINUX_USER_HZ is assumed 100 for now */ + +#if defined(__i386__) && defined(__GNUCLIKE_ASM) +/* we need intermediate result as 64 bit, otherwise it overflows too early */ +#define DO64_MULDIV(v,m,d) \ +({ \ + unsigned long rv0; \ + unsigned long rv1; \ + __asm__ __volatile__(\ +"mull %1\n\t" \ +"divl %2\n\t" \ +:"=a" (rv0), "=d" (rv1) \ +:"r" (d), "0" (v), "1" (m) \ +:"cc" ); \ + rv0; \ +}) Why it is impossible to express the calculation in C ? You forgot to CC the submitter... CCed. What do you have in mind, (unsinged long)((uint64_t)v * (uint64_t)m / (uint64_t)d)? Conditionally on the architecture or not? Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 When reviewing your notes before an exam, the most important ones will be illegible. ___ 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: r205686 - head
Author: des Date: Fri Mar 26 12:59:15 2010 New Revision: 205686 URL: http://svn.freebsd.org/changeset/base/205686 Log: Tighten my grip on pseudofs, procfs, linprocfs. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSFri Mar 26 12:53:46 2010(r205685) +++ head/MAINTAINERSFri Mar 26 12:59:15 2010(r205686) @@ -57,9 +57,9 @@ libfetch des Advance notification reques fetch des Advance notification requested. libpam des Pre-commit review requested. opensshdes Pre-commit review requested. -pseudofs des Advance notification requested. -procfs des Advance notification requested. -linprocfs des Advance notification requested. +pseudofs des Pre-commit review requested. +procfs des Pre-commit review requested. +linprocfs des Pre-commit review requested. lprgad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it. ___ 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: r205662 - in head/sys/boot/i386: boot2 gptboot zfsboot
On Thursday 25 March 2010 9:30:54 pm Xin LI wrote: > Author: delphij > Date: Fri Mar 26 01:30:53 2010 > New Revision: 205662 > URL: http://svn.freebsd.org/changeset/base/205662 > > Log: > Our boot loader is capable of booting both i386 and amd64 kernels so > call it "x86" instead of "i386". > > Suggested by: jhb in response to Alexander Best's loader proposal > MFC after: 1 month I think NEWVERSWHAT in sys/boot/i386/{zfs,}loader/Makefile also needs to be changed. -- 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"
Re: svn commit: r205683 - head/sys/compat/linprocfs
On Friday 26 March 2010 7:43:15 am Alexander Leidinger wrote: > Author: netchild > Date: Fri Mar 26 11:43:15 2010 > New Revision: 205683 > URL: http://svn.freebsd.org/changeset/base/205683 > > Log: > Fix some bogus values in linprocfs. > > Submitted by: Petr Salinger > Verified on:GNU/kFreeBSD debian 8.0-1-686 (by submitter) > PR: 144584 > > Modified: > head/sys/compat/linprocfs/linprocfs.c > > Modified: head/sys/compat/linprocfs/linprocfs.c > == > --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 > (r205682) > +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 > (r205683) > @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$"); > /* > * Various conversion macros > */ > + > +/* The LINUX_USER_HZ is assumed 100 for now */ > + > +#if defined(__i386__) && defined(__GNUCLIKE_ASM) > +/* we need intermediate result as 64 bit, otherwise it overflows too early */ > +#define DO64_MULDIV(v,m,d) \ > +({ \ > + unsigned long rv0; \ > + unsigned long rv1; \ > + __asm__ __volatile__(\ > +"mull %1\n\t" \ > +"divl %2\n\t" \ > +:"=a" (rv0), "=d" (rv1) \ > +:"r" (d), "0" (v), "1" (m) \ > +:"cc" ); \ > + rv0; \ > +}) > + > +#define T2J(x) DO64_MULDIV((x), 100UL, (stathz ? stathz : hz)) /* ticks to jiffies */ > +#else > #define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz)) /* ticks to > jiffies */ > +#endif This is very bogus. Just use a uint64_t cast or the like. Extraneous ()'s around (x)->tv_sec and (x)->tv_usec in TV2J() as well. > @@ -502,12 +525,24 @@ linprocfs_douptime(PFS_FILL_ARGS) > { > long cp_time[CPUSTATES]; > struct timeval tv; > + int cnt, i; > > getmicrouptime(&tv); > read_cpu_time(cp_time); > - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", > + > + for (cnt = 0, i = 0; i <= mp_maxid; ++i) > + if (!(CPU_ABSENT(i))) > + cnt++; > + > + if (!cnt) > + cnt = 1; > + > + i = ((cp_time[CP_IDLE])/cnt) % (stathz ? stathz : hz); > + i = (i * 100) / (stathz ? stathz : hz); > + > + sbuf_printf(sb, "%lld.%02ld %ld.%02d\n", > (long long)tv.tv_sec, tv.tv_usec / 1, > - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); > + T2S((cp_time[CP_IDLE]/cnt)), i); > return (0); What's wrong with mp_ncpus? Also, I don't understand how the machinations for i vs the original code (assuming you add in a divisor of the raw cp_time by mp_ncpus) give a different value. > @@ -613,9 +648,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) > struct kinfo_proc kp; > char state; > static int ratelimit = 0; > + unsigned long startcode, startdata; Why not make these a vm_offset_t and then print them with %j? -- 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: r205693 - head/usr.sbin/pmcstat
Author: fabient Date: Fri Mar 26 14:29:57 2010 New Revision: 205693 URL: http://svn.freebsd.org/changeset/base/205693 Log: Do not overflow the term in the case of multi-line display. MFC after: 3days Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c == --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 26 14:08:21 2010 (r205692) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 26 14:29:57 2010 (r205693) @@ -366,7 +366,7 @@ pmcpl_ct_node_cleartag(void) static int pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct, -struct pmcpl_ct_sample *rsamples, int x, int *y) +struct pmcpl_ct_sample *rsamples, int x, int *y, int maxy) { int i; @@ -387,7 +387,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct if (ct->pct_narc == 0) { pmcpl_ct_topscreen[x+1][*y] = NULL; if (*y >= PMCPL_CT_MAXLINE || - *y >= pmcstat_displayheight) + *y >= maxy) return 1; *y = *y + 1; for (i=0; i < x; i++) @@ -407,7 +407,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, ct->pct_arc[i].pcta_child, - rsamples, x+1, y)) + rsamples, x+1, y, maxy)) return 1; } } @@ -472,6 +472,9 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s /* Check for line wrap. */ width += ns_len + is_len + vs_len + 1; if (width >= pmcstat_displaywidth) { + maxy--; + if (y >= maxy) + break; PMCSTAT_PRINTW("\n%*s", indentwidth, space); width = indentwidth + ns_len + is_len + vs_len; } @@ -515,7 +518,7 @@ pmcpl_ct_topdisplay(void) for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, - &rsamples, x, &y)) { + &rsamples, x, &y, pmcstat_displayheight - 2)) { 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: r205694 - head/sys/dev/hwpmc
Author: fabient Date: Fri Mar 26 14:35:48 2010 New Revision: 205694 URL: http://svn.freebsd.org/changeset/base/205694 Log: Handling SIGPIPE will cause deadlock/crash. Return an error immediatly in case of hard shutdown. MFC after: 3days Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c == --- head/sys/dev/hwpmc/hwpmc_logging.c Fri Mar 26 14:29:57 2010 (r205693) +++ head/sys/dev/hwpmc/hwpmc_logging.c Fri Mar 26 14:35:48 2010 (r205694) @@ -298,7 +298,6 @@ pmclog_loop(void *arg) mtx_unlock(&pmc_kthread_mtx); -sigpipe_retry: /* process the request */ PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); @@ -322,9 +321,6 @@ sigpipe_retry: if (error) { /* XXX some errors are recoverable */ - if (error == EPIPE) - goto sigpipe_retry; - /* send a SIGIO to the owner and exit */ PROC_LOCK(p); psignal(p, SIGIO); ___ 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: r205695 - head/sys/compat/linprocfs
Author: netchild Date: Fri Mar 26 14:36:16 2010 New Revision: 205695 URL: http://svn.freebsd.org/changeset/base/205695 Log: Revert r205683 to resolve some code quality issues which do not affect the build or use of linprocfs, before committing the reworked patch again. Requested by: des Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 14:35:48 2010 (r205694) +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 14:36:16 2010 (r205695) @@ -110,36 +110,13 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ - -/* The LINUX_USER_HZ is assumed 100 for now */ - -#if defined(__i386__) && defined(__GNUCLIKE_ASM) -/* we need intermediate result as 64 bit, otherwise it overflows too early */ -#define DO64_MULDIV(v,m,d) \ -({ \ - unsigned long rv0; \ - unsigned long rv1; \ - __asm__ __volatile__(\ -"mull %1\n\t" \ -"divl %2\n\t" \ -:"=a" (rv0), "=d" (rv1) \ -:"r" (d), "0" (v), "1" (m) \ -:"cc" ); \ - rv0; \ -}) - -#define T2J(x) DO64_MULDIV((x), 100UL, (stathz ? stathz : hz)) /* ticks to jiffies */ -#else #define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz))/* ticks to jiffies */ -#endif #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ -#define TV2J(x)(((x)->tv_sec) * 100UL + ((x)->tv_usec) / 1) - /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state * @@ -525,24 +502,12 @@ linprocfs_douptime(PFS_FILL_ARGS) { long cp_time[CPUSTATES]; struct timeval tv; - int cnt, i; getmicrouptime(&tv); read_cpu_time(cp_time); - - for (cnt = 0, i = 0; i <= mp_maxid; ++i) - if (!(CPU_ABSENT(i))) - cnt++; - - if (!cnt) - cnt = 1; - - i = ((cp_time[CP_IDLE])/cnt) % (stathz ? stathz : hz); - i = (i * 100) / (stathz ? stathz : hz); - - sbuf_printf(sb, "%lld.%02ld %ld.%02d\n", + sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", (long long)tv.tv_sec, tv.tv_usec / 1, - T2S((cp_time[CP_IDLE]/cnt)), i); + T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); return (0); } @@ -648,17 +613,9 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; - unsigned long startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); - if (p->p_vmspace) { - startcode = (unsigned long) p->p_vmspace->vm_taddr; - startdata = (unsigned long) p->p_vmspace->vm_daddr; - } else { - startcode = 0; - startdata = 0; - }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -677,27 +634,30 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", kp.ki_tdev); + PS_ADD("tty", "%d", 0); /* XXX */ PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt","%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt","%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", TV2J((&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", TV2J((&kp.ki_rusage.ru_stime))); - PS_ADD("cutime","%ld", TV2J((&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime","%ld", TV2J((&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); + PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); + PS_ADD("cutime","%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); + PS_ADD("cstime","%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - PS_ADD("s
svn commit: r205698 - head/sys/dev/isp
Author: mjacob Date: Fri Mar 26 15:13:31 2010 New Revision: 205698 URL: http://svn.freebsd.org/changeset/base/205698 Log: Clean up some printing stuff so that we can have a bit finer control on debug output. Add a new platform function requirement to allow for printing based upon the ITL nexus instead of the isp unit plus channel, target and lun. This allows some printouts and error messages from the core code to appear in the same format as the platform's subsystem (in FreeBSD's case, CAM path). MFC after:1 week Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Fri Mar 26 14:52:58 2010(r205697) +++ head/sys/dev/isp/isp.c Fri Mar 26 15:13:31 2010(r205698) @@ -74,14 +74,9 @@ __FBSDID("$FreeBSD$"); */ static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0...@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0...@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char xact1[] = "HBA attempted queued transaction with disconnect not set for %d.%d.%d"; -static const char xact2[] = "HBA attempted queued transaction to target routine %d on target %d bus %d"; -static const char xact3[] = "HBA attempted queued cmd for %d.%d.%d when queueing disabled"; -static const char pskip[] = "SCSI phase skipped for target %d.%d.%d"; static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'"; -static const char finmsg[] = "%d.%d.%d: FIN dl%d resid %ld STS 0x%x SKEY %c XS_ERR=0x%x"; static const char sc4[] = "NVRAM"; -static const char bun[] = "bad underrun for %d.%d (count %d, resid %d, status %s)"; +static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -107,6 +102,7 @@ static const uint8_t alpa_map[] = { /* * Local function prototypes. */ +static void isp_prt_endcmd(ispsoftc_t *, XS_T *); static int isp_parse_async(ispsoftc_t *, uint16_t); static int isp_parse_async_fc(ispsoftc_t *, uint16_t); static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); @@ -1431,10 +1427,8 @@ isp_scsi_channel_init(ispsoftc_t *isp, i (sdp->isp_devparam[tgt].goal_offset << 8) | (sdp->isp_devparam[tgt].goal_period); } - isp_prt(isp, ISP_LOGDEBUG0, - "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", - chan, tgt, mbs.param[2], mbs.param[3] >> 8, - mbs.param[3] & 0xff); + isp_prt(isp, ISP_LOGDEBUG0, "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", + chan, tgt, mbs.param[2], mbs.param[3] >> 8, mbs.param[3] & 0xff); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { sdf = DPARM_SAFE_DFLT; @@ -1705,8 +1699,7 @@ isp_fibre_init(ispsoftc_t *isp) isp_prt(isp, ISP_LOGERR, sacq); return; } - isp_prt(isp, ISP_LOGDEBUG0, - "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", + isp_prt(isp, ISP_LOGDEBUG0, "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions); isp_put_icb(isp, icbp, (isp_icb_t *)fcp->isp_scratch); @@ -4435,7 +4428,7 @@ isp_start(XS_T *xs) */ return (dmaresult); } - isp_prt(isp, ISP_LOGDEBUG0, "START cmd for %d.%d.%d cmd 0x%x datalen %ld", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "START cmd cdb[0]=0x%x datalen %ld", XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); isp->isp_nactive++; return (CMD_QUEUED); } @@ -5248,7 +5241,7 @@ again: } else { ptr = rnames[resp[FCP_RSPNS_CODE_OFFSET]]; } - isp_prt(isp, ISP_LOGWARN, "%d.%d.%d FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), rlen, ptr, XS_CDBP(xs)[0] & 0xff); + isp_xs_prt(isp, xs, ISP_LOGWARN, "FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", rlen, ptr, XS_CDBP(xs)[0] & 0xff); if (resp[FCP_RSPNS_CODE_OFFSET] != 0) { XS_SETERR(xs, HBA_BOTCH); } @@ -5325,25 +5318,9 @@ again: isp_destroy_handle(isp, sp->req_handle);
svn commit: r205702 - in head: . contrib/cpio gnu/usr.bin gnu/usr.bin/cpio share/man/man5 share/mk tools/build/mk tools/build/options usr.bin/cpio
Author: delphij Date: Fri Mar 26 17:02:32 2010 New Revision: 205702 URL: http://svn.freebsd.org/changeset/base/205702 Log: Remove GNU cpio after fix of CVE-2010-0624. Note that this is actually a no-op for most users, as this GNU cpio was broken on -HEAD and 8-STABLE since last March until the recent fix. FreeBSD 8.0+ uses BSD cpio by default and the code is being actively maintained. Blessed by: kientzle With hat: secteam MFC after:3 days Deleted: head/contrib/cpio/ head/gnu/usr.bin/cpio/ head/tools/build/options/WITH_GNU_CPIO Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/Makefile head/share/man/man5/src.conf.5 head/share/mk/bsd.own.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/cpio/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri Mar 26 16:45:21 2010(r205701) +++ head/ObsoleteFiles.inc Fri Mar 26 17:02:32 2010(r205702) @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100326: gcpio removal +OLD_FILES+=usr/bin/gcpio +OLD_FILES+=usr/share/info/cpio.info.gz +OLD_FILES+=usr/share/man/man1/gcpio.1.gz + # 20100322: libz update OLD_LIBS+=lib/libz.so.5 .if ${TARGET_ARCH} == "amd64" Modified: head/gnu/usr.bin/Makefile == --- head/gnu/usr.bin/Makefile Fri Mar 26 16:45:21 2010(r205701) +++ head/gnu/usr.bin/Makefile Fri Mar 26 17:02:32 2010(r205702) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - ${_cpio} \ ${_cvs} \ dialog \ diff \ @@ -28,10 +27,6 @@ _groff= groff .endif .endif -.if ${MK_GNU_CPIO} == "yes" -_cpio= cpio -.endif - .if ${MK_CVS} != "no" _cvs= cvs .endif Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Mar 26 16:45:21 2010 (r205701) +++ head/share/man/man5/src.conf.5 Fri Mar 26 17:02:32 2010 (r205702) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd January 16, 2010 +.Dd March 26, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -339,13 +339,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_CPIO -.\" from FreeBSD: head/tools/build/options/WITH_GNU_CPIO 179813 2008-06-16 05:48:15Z dougb -Set to build GNU cpio as a part of the base system, -and symlink -.Pa /usr/bin/cpio -to this version. -(This will override the symlink to the BSD version.) .It Va WITHOUT_GNU_GREP .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP 179813 2008-06-16 05:48:15Z dougb Set to not build GNU grep as a part of the base system. Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkFri Mar 26 16:45:21 2010(r205701) +++ head/share/mk/bsd.own.mkFri Mar 26 17:02:32 2010(r205702) @@ -407,7 +407,6 @@ MK_${var}:= yes BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ -GNU_CPIO \ HESIOD \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 26 16:45:21 2010(r205701) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 26 17:02:32 2010(r205702) @@ -776,12 +776,6 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif -.if ${MK_GNU_CPIO} == no -OLD_FILES+=usr/bin/gcpio -OLD_FILES+=usr/share/info/cpio.info.gz -OLD_FILES+=usr/share/man/man1/gcpio.1.gz -.endif - .if ${MK_GPIB} == no OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h OLD_FILES+=usr/include/dev/ieee488/ugpib.h Modified: head/usr.bin/cpio/Makefile == --- head/usr.bin/cpio/Makefile Fri Mar 26 16:45:21 2010(r205701) +++ head/usr.bin/cpio/Makefile Fri Mar 26 17:02:32 2010(r205702) @@ -19,10 +19,8 @@ DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto .endif -.if ${MK_GNU_CPIO} != "yes" SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.endif .PHONY: check test ___ 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: r205705 - head/sys/arm/xscale/ixp425
Author: rpaulo Date: Fri Mar 26 18:49:43 2010 New Revision: 205705 URL: http://svn.freebsd.org/changeset/base/205705 Log: Pass the correct pointer to fled_cb(). Modified: head/sys/arm/xscale/ixp425/cambria_fled.c Modified: head/sys/arm/xscale/ixp425/cambria_fled.c == --- head/sys/arm/xscale/ixp425/cambria_fled.c Fri Mar 26 18:34:25 2010 (r205704) +++ head/sys/arm/xscale/ixp425/cambria_fled.c Fri Mar 26 18:49:43 2010 (r205705) @@ -74,7 +74,7 @@ fled_attach(device_t dev) sc->sc_led = led_create(fled_cb, dev, "front"); - fled_cb(sc, 1); /* Turn on LED */ + fled_cb(dev, 1);/* Turn on LED */ return 0; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r205710 - head/gnu/usr.bin/gdb
Author: marcel Date: Fri Mar 26 19:40:53 2010 New Revision: 205710 URL: http://svn.freebsd.org/changeset/base/205710 Log: Handle cross-builds for gdbserver. Modified: head/gnu/usr.bin/gdb/Makefile Modified: head/gnu/usr.bin/gdb/Makefile == --- head/gnu/usr.bin/gdb/Makefile Fri Mar 26 19:00:17 2010 (r205709) +++ head/gnu/usr.bin/gdb/Makefile Fri Mar 26 19:40:53 2010 (r205710) @@ -2,7 +2,9 @@ SUBDIR=doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" +TARGET_ARCH?= ${MACHINE_ARCH} +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "arm" || \ +${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc" SUBDIR+=gdbserver .endif ___ 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: r205711 - in head/gnu/usr.bin/gdb: . kgdb
Author: marcel Date: Fri Mar 26 19:41:40 2010 New Revision: 205711 URL: http://svn.freebsd.org/changeset/base/205711 Log: Allow building a cross-kgdb for ia64. Modified: head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/kgdb/trgt_ia64.c Modified: head/gnu/usr.bin/gdb/Makefile.inc == --- head/gnu/usr.bin/gdb/Makefile.inc Fri Mar 26 19:40:53 2010 (r205710) +++ head/gnu/usr.bin/gdb/Makefile.inc Fri Mar 26 19:41:40 2010 (r205711) @@ -41,7 +41,7 @@ CFLAGS+= -I${CNTRB_BU}/bfd GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER) -CFLAGS+= -DCROSS_DEBUGGER +CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT}/../.. GDB_SUFFIX= -${TARGET_ARCH} NO_MAN= .endif Modified: head/gnu/usr.bin/gdb/kgdb/trgt_ia64.c == --- head/gnu/usr.bin/gdb/kgdb/trgt_ia64.c Fri Mar 26 19:40:53 2010 (r205710) +++ head/gnu/usr.bin/gdb/kgdb/trgt_ia64.c Fri Mar 26 19:41:40 2010 (r205711) @@ -28,9 +28,16 @@ __FBSDID("$FreeBSD$"); #include +#ifdef CROSS_DEBUGGER +#include +#include +#include +#include +#else #include #include #include +#endif #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r205712 - head/sys/dev/isp
Author: mjacob Date: Fri Mar 26 20:22:18 2010 New Revision: 205712 URL: http://svn.freebsd.org/changeset/base/205712 Log: D'oh- isp_handle_index' logic was reversed (not used in FreeBSD). MFC after:1 week Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c == --- head/sys/dev/isp/isp_library.c Fri Mar 26 19:41:40 2010 (r205711) +++ head/sys/dev/isp/isp_library.c Fri Mar 26 20:22:18 2010 (r205712) @@ -294,10 +294,10 @@ uint32_t isp_handle_index(ispsoftc_t *isp, uint32_t handle) { if (!ISP_VALID_HANDLE(isp, handle)) { - return (handle & ISP_HANDLE_CMD_MASK); - } else { isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); return (ISP_BAD_HANDLE_INDEX); + } else { + return (handle & ISP_HANDLE_CMD_MASK); } } ___ 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: r205713 - in head/sys/ia64: ia64 include
Author: marcel Date: Fri Mar 26 21:22:02 2010 New Revision: 205713 URL: http://svn.freebsd.org/changeset/base/205713 Log: Rename disable_intr() to ia64_disable_intr() and rename enable_intr() to ia64_enable_intr(). This reduces confusion with intr_disable() and intr_restore(). Have configure_final() call ia64_finalize_intr() instead of enable_intr() in preparation of adding support for binding interrupts to all CPUs. Modified: head/sys/ia64/ia64/autoconf.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/ia64/trap.c head/sys/ia64/include/acpica_machdep.h head/sys/ia64/include/cpufunc.h head/sys/ia64/include/intr.h Modified: head/sys/ia64/ia64/autoconf.c == --- head/sys/ia64/ia64/autoconf.c Fri Mar 26 20:22:18 2010 (r205712) +++ head/sys/ia64/ia64/autoconf.c Fri Mar 26 21:22:02 2010 (r205713) @@ -39,15 +39,9 @@ #include #include -#include #include - -#include -#include -#include -#include -#include -#include +#include +#include static voidconfigure_first(void *); static voidconfigure(void *); @@ -97,12 +91,9 @@ static void configure_final(void *dummy) { - /* -* Now we're ready to handle (pending) interrupts. -* XXX this is slightly misplaced. -*/ - enable_intr(); - cninit_finish(); + + ia64_finalize_intr(); + cold = 0; } Modified: head/sys/ia64/ia64/interrupt.c == --- head/sys/ia64/ia64/interrupt.c Fri Mar 26 20:22:18 2010 (r205712) +++ head/sys/ia64/ia64/interrupt.c Fri Mar 26 21:22:02 2010 (r205713) @@ -280,6 +280,13 @@ ia64_teardown_intr(void *cookie) return (intr_event_remove_handler(cookie)); } +void +ia64_finalize_intr(void) +{ + + ia64_enable_intr(); +} + /* * Interrupt handlers. */ @@ -318,9 +325,9 @@ ia64_handle_intr(struct trapframe *tf) out: if (TRAPF_USERMODE(tf)) { while (td->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { - enable_intr(); + ia64_enable_intr(); ast(tf); - disable_intr(); + ia64_disable_intr(); } } } Modified: head/sys/ia64/ia64/mp_machdep.c == --- head/sys/ia64/ia64/mp_machdep.c Fri Mar 26 20:22:18 2010 (r205712) +++ head/sys/ia64/ia64/mp_machdep.c Fri Mar 26 21:22:02 2010 (r205713) @@ -210,7 +210,7 @@ ia64_ap_startup(void) ia64_set_itv(0x1); ia64_set_tpr(0); ia64_srlz_d(); - enable_intr(); + ia64_enable_intr(); sched_throw(NULL); /* NOTREACHED */ Modified: head/sys/ia64/ia64/trap.c == --- head/sys/ia64/ia64/trap.c Fri Mar 26 20:22:18 2010(r205712) +++ head/sys/ia64/ia64/trap.c Fri Mar 26 21:22:02 2010(r205713) @@ -334,11 +334,11 @@ int do_ast(struct trapframe *tf) { - disable_intr(); + ia64_disable_intr(); while (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { - enable_intr(); + ia64_enable_intr(); ast(tf); - disable_intr(); + ia64_disable_intr(); } /* * Keep interrupts disabled. We return r10 as a favor to the EPC Modified: head/sys/ia64/include/acpica_machdep.h == --- head/sys/ia64/include/acpica_machdep.h Fri Mar 26 20:22:18 2010 (r205712) +++ head/sys/ia64/include/acpica_machdep.h Fri Mar 26 21:22:02 2010 (r205713) @@ -56,8 +56,8 @@ #defineACPI_ASM_MACROS #defineBREAKPOINT3 -#defineACPI_DISABLE_IRQS() disable_intr() -#defineACPI_ENABLE_IRQS() enable_intr() +#defineACPI_DISABLE_IRQS() ia64_disable_intr() +#defineACPI_ENABLE_IRQS() ia64_enable_intr() #defineACPI_FLUSH_CPU_CACHE() /* XXX ia64_fc()? */ Modified: head/sys/ia64/include/cpufunc.h == --- head/sys/ia64/include/cpufunc.h Fri Mar 26 20:22:18 2010 (r205712) +++ head/sys/ia64/include/cpufunc.h Fri Mar 26 21:22:02 2010 (r205713) @@ -56,13 +56,13 @@ breakpoint(void) static __inline void -disable_intr(void) +ia64_disable_intr(void) { __asm __volatile ("rsm psr.i"); } static __inline void -enable_intr(void) +ia64_enable_intr(void) { __asm __volatile ("ssm psr.i;; srlz.d"); } @@ -71,8 +71,9 @@ static __inline register_t intr_disable(void) { register_t psr; + __asm __volatile ("mov %0=psr;;" : "
svn commit: r205720 - in head/sys: dev/ixgbe modules/ixgbe
Author: jfv Date: Sat Mar 27 00:21:40 2010 New Revision: 205720 URL: http://svn.freebsd.org/changeset/base/205720 Log: Update the driver to Intel version 2.1.6 - add some new hardware support for 82599 - Big change to interrupt architecture, it now uses a queue which contains an RX/TX pair as the recipient of the interrupt. This will reduce overall system interrupts/msix usage. - Improved RX mbuf handling: the old get_buf routine is no longer synchronized with rxeof, this allows the elimination of packet discards due to mbuf allocation failure. - Much simplified and improved AIM code, it now happens in the queue interrupt context and takes into account both the traffic on the RX AND TX side. - variety of small tweaks, like ring size, that have been seen as performance improvements. - Thanks to those that provided feedback or suggested changes, I hope I've caught all of them. Modified: head/sys/dev/ixgbe/LICENSE head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/modules/ixgbe/Makefile Modified: head/sys/dev/ixgbe/LICENSE == --- head/sys/dev/ixgbe/LICENSE Fri Mar 26 23:44:51 2010(r205719) +++ head/sys/dev/ixgbe/LICENSE Sat Mar 27 00:21:40 2010(r205720) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Mar 26 23:44:51 2010(r205719) +++ head/sys/dev/ixgbe/ixgbe.c Sat Mar 27 00:21:40 2010(r205720) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.0.7"; +char ixgbe_driver_version[] = "2.1.6"; /* * PCI Device ID Table @@ -76,6 +76,7 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -136,12 +137,11 @@ static void ixgbe_free_receive_struc static void ixgbe_free_receive_buffers(struct rx_ring *); static voidixgbe_setup_hw_rsc(struct rx_ring *); -static voidixgbe_init_moderation(struct adapter *); static void ixgbe_enable_intr(struct adapter *); static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static boolixgbe_txeof(struct tx_ring *); -static boolixgbe_rxeof(struct rx_ring *, int); +static boolixgbe_rxeof(struct ix_queue *, int); static voidixgbe_rx_checksum(u32, struct mbuf *); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_disable_promisc(struct adapter *); @@ -149,7 +149,7 @@ static void ixgbe_set_multi(struct a static void ixgbe_print_hw_stats(struct adapter *); static voidixgbe_print_debug_info(struct adapter *); static void ixgbe_update_link_status(struct adapter *); -static int ixgbe_get_buf(struct rx_ring *, int, int); +static voidixgbe_refresh_mbufs(struct rx_ring *, int); static int ixgbe_xmit(struct tx_ring *, struct mbuf **); static int ixgbe_sysctl_stats(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS); @@ -169,7 +169,9 @@ static void ixgbe_setup_vlan_hw_support( static voidixgbe_register_vlan(void *, struct ifnet *, u16); static voidixgbe_unregister_vlan(void *, struct ifnet *, u16); -static voidixgbe_update_aim(struct rx_ring *); +static __inline void ixgbe_rx_discard(struct rx
Re: svn commit: r205710 - head/gnu/usr.bin/gdb
In message: <201003261940.o2qjery1041...@svn.freebsd.org> Marcel Moolenaar writes: : Author: marcel : Date: Fri Mar 26 19:40:53 2010 : New Revision: 205710 : URL: http://svn.freebsd.org/changeset/base/205710 : : Log: : Handle cross-builds for gdbserver. Cross-builds outside the normal build system? Otherwise, MACHINE_ARCH is the right thing to check since TARGET* is only set in the bootstrapping stages, not the actual build stages. Warner : Modified: : head/gnu/usr.bin/gdb/Makefile : : Modified: head/gnu/usr.bin/gdb/Makefile : == : --- head/gnu/usr.bin/gdb/Makefile Fri Mar 26 19:00:17 2010 (r205709) : +++ head/gnu/usr.bin/gdb/Makefile Fri Mar 26 19:40:53 2010 (r205710) : @@ -2,7 +2,9 @@ : : SUBDIR= doc libgdb gdb gdbtui kgdb : : -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" : +TARGET_ARCH?= ${MACHINE_ARCH} : +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "arm" || \ : +${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc" : SUBDIR+=gdbserver : .endif : : ___ 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: r205710 - head/gnu/usr.bin/gdb
On Mar 26, 2010, at 7:16 PM, M. Warner Losh wrote: > In message: <201003261940.o2qjery1041...@svn.freebsd.org> >Marcel Moolenaar writes: > : Author: marcel > : Date: Fri Mar 26 19:40:53 2010 > : New Revision: 205710 > : URL: http://svn.freebsd.org/changeset/base/205710 > : > : Log: > : Handle cross-builds for gdbserver. > > Cross-builds outside the normal build system? Yes. A better description is building a cross-debugger. -- Marcel Moolenaar xcl...@mac.com ___ 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: r205723 - in head/sys/ia64: ia64 include
Author: marcel Date: Sat Mar 27 03:15:34 2010 New Revision: 205723 URL: http://svn.freebsd.org/changeset/base/205723 Log: Remove nx_pcibus from the nexus resource. Nexus is not involved with PCI busses. Remove nexus_read_ivar() and nexus_write_ivar() to give default behaviour. Remove as well, because there's nothing in it that's being used. Deleted: head/sys/ia64/include/nexusvar.h Modified: head/sys/ia64/ia64/nexus.c Modified: head/sys/ia64/ia64/nexus.c == --- head/sys/ia64/ia64/nexus.c Sat Mar 27 02:42:35 2010(r205722) +++ head/sys/ia64/ia64/nexus.c Sat Mar 27 03:15:34 2010(r205723) @@ -56,7 +56,6 @@ #include #include -#include #include #include #include @@ -73,7 +72,6 @@ static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { struct resource_listnx_resources; - int nx_pcibus; }; #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) @@ -87,8 +85,6 @@ static device_t nexus_add_child(device_t int unit); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); -static int nexus_read_ivar(device_t, device_t, int, uintptr_t *); -static int nexus_write_ivar(device_t, device_t, int, uintptr_t); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -123,8 +119,6 @@ static device_method_t nexus_methods[] = /* Bus interface */ DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child,nexus_add_child), - DEVMETHOD(bus_read_ivar,nexus_read_ivar), - DEVMETHOD(bus_write_ivar, nexus_write_ivar), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), @@ -215,8 +209,6 @@ nexus_print_child(device_t bus, device_t retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx"); retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#lx"); retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); - if (ndev->nx_pcibus != -1) - retval += printf(" pcibus %d", ndev->nx_pcibus); if (device_get_flags(child)) retval += printf(" flags %#x", device_get_flags(child)); retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ @@ -234,7 +226,6 @@ nexus_add_child(device_t bus, int order, if (!ndev) return(0); resource_list_init(&ndev->nx_resources); - ndev->nx_pcibus = -1; child = device_add_child_ordered(bus, order, name, unit); @@ -244,37 +235,6 @@ nexus_add_child(device_t bus, int order, return(child); } -static int -nexus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) -{ - struct nexus_device *ndev = DEVTONX(child); - - switch (which) { - case NEXUS_IVAR_PCIBUS: - *result = ndev->nx_pcibus; - break; - default: - return ENOENT; - } - return 0; -} - - -static int -nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value) -{ - struct nexus_device *ndev = DEVTONX(child); - - switch (which) { - case NEXUS_IVAR_PCIBUS: - ndev->nx_pcibus = value; - break; - default: - return ENOENT; - } - return 0; -} - /* * Allocate a resource on behalf of child. NB: child is usually going to be 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: r205724 - head
Author: marcel Date: Sat Mar 27 03:17:39 2010 New Revision: 205724 URL: http://svn.freebsd.org/changeset/base/205724 Log: removed on ia64. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat Mar 27 03:15:34 2010(r205723) +++ head/ObsoleteFiles.inc Sat Mar 27 03:17:39 2010(r205724) @@ -14,11 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100326: [ia64] removed +.if ${TARGET_ARCH} == "ia64" +OLD_FILES+=usr/include/machine/nexusvar.h +.endif # 20100326: gcpio removal OLD_FILES+=usr/bin/gcpio OLD_FILES+=usr/share/info/cpio.info.gz OLD_FILES+=usr/share/man/man1/gcpio.1.gz - # 20100322: libz update OLD_LIBS+=lib/libz.so.5 .if ${TARGET_ARCH} == "amd64" ___ 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: r205726 - in head/sys/ia64: ia64 include
Author: marcel Date: Sat Mar 27 05:40:50 2010 New Revision: 205726 URL: http://svn.freebsd.org/changeset/base/205726 Log: Implement interrupt to CPU binding. Assign interrupts to CPUs in a round-robin fashion, starting with the highest priority interrupt on the highest-numbered CPU and cycling downwards. Modified: head/sys/ia64/ia64/autoconf.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/ia64/nexus.c head/sys/ia64/ia64/sapic.c head/sys/ia64/include/intr.h Modified: head/sys/ia64/ia64/autoconf.c == --- head/sys/ia64/ia64/autoconf.c Sat Mar 27 04:39:59 2010 (r205725) +++ head/sys/ia64/ia64/autoconf.c Sat Mar 27 05:40:50 2010 (r205726) @@ -93,7 +93,7 @@ configure_final(void *dummy) cninit_finish(); - ia64_finalize_intr(); + ia64_enable_intr(); cold = 0; } Modified: head/sys/ia64/ia64/interrupt.c == --- head/sys/ia64/ia64/interrupt.c Sat Mar 27 04:39:59 2010 (r205725) +++ head/sys/ia64/ia64/interrupt.c Sat Mar 27 05:40:50 2010 (r205726) @@ -122,7 +122,7 @@ ia64_xiv_reserve(u_int xiv, enum ia64_xi return (EBUSY); ia64_xiv[xiv] = what; ia64_handler[xiv] = (ih == NULL) ? ia64_ih_invalid: ih; - if (1 || bootverbose) + if (bootverbose) printf("XIV %u: use=%u, IH=%p\n", xiv, what, ih); return (0); } @@ -139,7 +139,7 @@ ia64_xiv_alloc(u_int prio, enum ia64_xiv xiv0 = IA64_NXIVS - (hwprio + 1) * 16; - KASSERT(xiv0 > IA64_MIN_XIV, ("%s: min XIV", __func__)); + KASSERT(xiv0 >= IA64_MIN_XIV, ("%s: min XIV", __func__)); KASSERT(xiv0 < IA64_NXIVS, ("%s: max XIV", __func__)); xiv = xiv0; @@ -281,10 +281,24 @@ ia64_teardown_intr(void *cookie) } void -ia64_finalize_intr(void) +ia64_bind_intr(void) { + struct ia64_intr *i; + struct pcpu *pc; + u_int xiv; + int cpu; - ia64_enable_intr(); + cpu = MAXCPU; + for (xiv = IA64_NXIVS - 1; xiv >= IA64_MIN_XIV; xiv--) { + if (ia64_xiv[xiv] != IA64_XIV_IRQ) + continue; + i = ia64_intrs[xiv]; + do { + cpu = (cpu == 0) ? MAXCPU - 1 : cpu - 1; + pc = cpuid_to_pcpu[cpu]; + } while (pc == NULL || !pc->pc_md.awake); + sapic_bind_intr(i->irq, pc); + } } /* Modified: head/sys/ia64/ia64/mp_machdep.c == --- head/sys/ia64/ia64/mp_machdep.c Sat Mar 27 04:39:59 2010 (r205725) +++ head/sys/ia64/ia64/mp_machdep.c Sat Mar 27 05:40:50 2010 (r205726) @@ -382,6 +382,12 @@ cpu_mp_unleash(void *dummy) smp_active = 1; smp_started = 1; + + /* +* Now that all CPUs are up and running, bind interrupts to each of +* them. +*/ + ia64_bind_intr(); } /* Modified: head/sys/ia64/ia64/nexus.c == --- head/sys/ia64/ia64/nexus.c Sat Mar 27 04:39:59 2010(r205725) +++ head/sys/ia64/ia64/nexus.c Sat Mar 27 05:40:50 2010(r205726) @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -101,6 +102,7 @@ static int nexus_set_resource(device_t, static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); static void nexus_delete_resource(device_t, device_t, int, int); +static int nexus_bind_intr(device_t, device_t, struct resource *, int); static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); @@ -129,6 +131,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), + DEVMETHOD(bus_bind_intr,nexus_bind_intr), DEVMETHOD(bus_config_intr, nexus_config_intr), /* Clock interface */ @@ -462,6 +465,17 @@ nexus_config_intr(device_t dev, int irq, } static int +nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) +{ + struct pcpu *pc; + + pc = cpuid_to_pcpu[cpu]; + if (pc == NULL) + return (EINVAL); + return (sapic_bind_intr(rman_get_start(irq), pc)); +} + +static int nexus_gettime(device_t dev, struct timespec *ts) { struct clocktime ct; Modified: head/sys/ia64/ia64/sapic.c == --- head/sys/ia64/ia64/sapic.c Sat Mar 27 04:39:59 2010(r205725) +++ head/sys/ia64/ia64/sapic.c Sat Mar 27 05
svn commit: r205727 - in head/sys: ia64/conf modules
Author: marcel Date: Sat Mar 27 06:53:11 2010 New Revision: 205727 URL: http://svn.freebsd.org/changeset/base/205727 Log: Bring up-to-date: o Switch to ITANIUM2 has the cpu. This has absolutely no effect on the code, but makes for a better example. o Drop COMPAT_FREEBSD6. We're tier 2, so you're supposed to run 8-stable or newer. o Add PREEMPTION. It works now. o Remove HWPMC_HOOKS. We don't have support for hwpmc yet. o Add a bunch of new devices: atapist, hptiop, amr, ips, twa, igb, ixgbe, ae, age, alc, ale, bce, bfe, et, jme, msk, nge, sk, ste, stge, tx, vge, axe, rue, udav, fwip, and all USB serial. o Remove "legacy" devices: le, vx, dc, pcn, rl, sis. Make sure to the module list is a superset of what goes into GENERIC. Modified: head/sys/ia64/conf/GENERIC head/sys/modules/Makefile Modified: head/sys/ia64/conf/GENERIC == --- head/sys/ia64/conf/GENERIC Sat Mar 27 05:40:50 2010(r205726) +++ head/sys/ia64/conf/GENERIC Sat Mar 27 06:53:11 2010(r205727) @@ -20,20 +20,21 @@ # # $FreeBSD$ -cpuITANIUM +cpuITANIUM2 ident GENERIC makeoptionsDEBUG=-g# Build kernel with debug information. optionsAUDIT # Security event auditing optionsCD9660 # ISO 9660 Filesystem -optionsCOMPAT_FREEBSD6 # Compatible with FreeBSD6 optionsCOMPAT_FREEBSD7 # Compatible with FreeBSD7 optionsDDB # Support DDB optionsDEADLKRES # Enable the deadlock resolver optionsFFS # Berkeley Fast Filesystem +optionsFLOWTABLE # per-cpu routing cache optionsGDB # Support remote GDB optionsGEOM_LABEL # Provides labelization +optionsINCLUDE_CONFIG_FILE # Include this file in kernel optionsINET# InterNETworking optionsINET6 # IPv6 communications protocols optionsINVARIANTS # Enable calls of extra sanity checking @@ -44,9 +45,11 @@ options MAC # TrustedBSD MAC Framework optionsMD_ROOT # MD usable as root device optionsMSDOSFS # MSDOS Filesystem optionsNFSCLIENT # Network Filesystem Client -optionsNFSSERVER # Network Filesystem Server optionsNFSLOCKD# Network Lock Manager +optionsNFSSERVER # Network Filesystem Server optionsNFS_ROOT# NFS usable as root device +optionsP1003_1B_SEMAPHORES # POSIX-style semaphores +optionsPREEMPTION # Enable kernel thread preemption optionsPRINTF_BUFR_SIZE=128 # Printf buffering to limit interspersion optionsPROCFS # Process filesystem (/proc) optionsPSEUDOFS# Pseudo-filesystem framework @@ -59,15 +62,12 @@ options STACK # stack(9) support optionsSYSVMSG # SYSV-style message queues optionsSYSVSEM # SYSV-style semaphores optionsSYSVSHM # SYSV-style shared memory -optionsP1003_1B_SEMAPHORES # POSIX-style semaphores optionsUFS_ACL # Support for access control lists optionsUFS_DIRHASH # Hash-based directory lookup scheme optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling optionsWITNESS # Enable checks to detect deadlocks and cycles optionsWITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions -optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) -optionsINCLUDE_CONFIG_FILE # Include this file in kernel # Various "busses" device firewire# FireWire bus code @@ -81,20 +81,25 @@ device ata # ATA controller device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives +device atapist # ATAPI tape drives device ataraid # ATA RAID drives # SCSI Controllers device ahc # AHA2940 and AIC7xxx devices device ahd # AHA39320/29320 and AIC79xx devices +device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios Logic # RAID controllers interfaced to the SCSI subsystem +device amr # AMI MegaRAID device ciss# Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV device iir # Intel Integrated RAID +device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtrem