Re: svn commit: r208585 - head/sys/mips/mips
Neel Natu wrote: > However it is not immediately obvious why we prefer to run the > statistics timer at (or very close to) 128Hz. Any pointers? I haven't looked myself, but sources report that some legacy code depend on it: http://lists.freebsd.org/pipermail/freebsd-arch/2009-December/009731.html In any case it should not be equal to hz whenever possible. -- Alexander Motin ___ 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: r208585 - head/sys/mips/mips
Hi Alexander, On Wed, May 26, 2010 at 8:20 PM, Alexander Motin wrote: > Neel Natu wrote: >> Author: neel >> Date: Thu May 27 01:27:25 2010 >> New Revision: 208585 >> URL: http://svn.freebsd.org/changeset/base/208585 >> >> Log: >> Simplify clock interrupt handling on mips by using the new KPI - >> timer1clock() >> and timer2clock(). >> >> Dynamically adjust the tick frequency depending on the value of 'hz'. >> Tested >> with hz values of 100, 1000 and 2000. >> >> Modified: >> head/sys/mips/mips/tick.c > >> - if (profprocs != 0) >> - profclock(TRAPF_USERMODE(tf), tf->pc); >> - } >> + timer1clock(TRAPF_USERMODE(tf), tf->pc); >> + timer2clock(TRAPF_USERMODE(tf), tf->pc); >> critical_exit(); >> -#if 0 /* TARGET_OCTEON */ > > You are not setting timer2hz, so timer2clock() will be emulated > automatically. It should not be called explicitly, or statclock() will > be called twice. > I'll fix this. > Also, as soon as you run timer1 on frequency higher then hz - it is > strange to see > stathz = hz; > profhz = hz; > there. It is just useless. Better would be to do same as for x86: > profhz = timer1hz; > if (timer1hz < 128) > stathz = timer1hz; > else > stathz = timer1hz / (timer1hz / 128); > I see your point with the profiling timer. I'll fix that to be like x86. However it is not immediately obvious why we prefer to run the statistics timer at (or very close to) 128Hz. Any pointers? best Neel > -- > Alexander Motin > ___ 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: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
Kostik Belousov wrote: On 2010/05/26 11:47, Garrett Cooper wrote: On Wed, May 26, 2010 at 11:28 AM, Rob Farmer wrote: Does the order of the libs entries matter? ... In theory it shouldn't because the linker should be smart enough to evaluate the dependencies and link everything properly, but our copy of binutils isn't intelligent enough to determine the appropriate order from what I've seen. Comments about "linker not being smart enough" are nonsense. In fact, library link ordering is quite critical in some places, since it allows you to override functions provided by later libraries. Many people use this to override the system malloc() (for debugging or code size purposes) by simply linking against another library before libc. I've also used this trick to override getpwnam() so as to avoid the 1/2 megabyte of libc networking code that gets pulled in by the standard implementation. Tim ___ 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: r208585 - head/sys/mips/mips
Neel Natu wrote: > Author: neel > Date: Thu May 27 01:27:25 2010 > New Revision: 208585 > URL: http://svn.freebsd.org/changeset/base/208585 > > Log: > Simplify clock interrupt handling on mips by using the new KPI - > timer1clock() > and timer2clock(). > > Dynamically adjust the tick frequency depending on the value of 'hz'. Tested > with hz values of 100, 1000 and 2000. > > Modified: > head/sys/mips/mips/tick.c > - if (profprocs != 0) > - profclock(TRAPF_USERMODE(tf), tf->pc); > - } > + timer1clock(TRAPF_USERMODE(tf), tf->pc); > + timer2clock(TRAPF_USERMODE(tf), tf->pc); > critical_exit(); > -#if 0 /* TARGET_OCTEON */ You are not setting timer2hz, so timer2clock() will be emulated automatically. It should not be called explicitly, or statclock() will be called twice. Also, as soon as you run timer1 on frequency higher then hz - it is strange to see stathz = hz; profhz = hz; there. It is just useless. Better would be to do same as for x86: profhz = timer1hz; if (timer1hz < 128) stathz = timer1hz; else stathz = timer1hz / (timer1hz / 128); -- Alexander Motin ___ 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: r208586 - head/contrib/opie/libopie head/lib/libc/sys head/sys/nfsclient head/usr.sbin/jail releng/6.4 releng/6.4/contrib/opie/libopie releng/6.4/sys/conf releng/7.1 releng/7.1/contrib/...
Author: cperciva Date: Thu May 27 03:15:04 2010 New Revision: 208586 URL: http://svn.freebsd.org/changeset/base/208586 Log: Change the current working directory to be inside the jail created by the jail(8) command. [10:04] Fix a one-NUL-byte buffer overflow in libopie. [10:05] Correctly sanity-check a buffer length in nfs mount. [10:06] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:04.jail Security: FreeBSD-SA-10:05.opie Security: FreeBSD-SA-10:06.nfsclient Modified: head/contrib/opie/libopie/readrec.c head/lib/libc/sys/mount.2 head/sys/nfsclient/nfs_vfsops.c head/usr.sbin/jail/jail.c Changes in other areas also in this revision: Modified: releng/6.4/UPDATING releng/6.4/contrib/opie/libopie/readrec.c releng/6.4/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/opie/libopie/readrec.c releng/7.1/sys/conf/newvers.sh releng/7.2/UPDATING releng/7.2/contrib/opie/libopie/readrec.c releng/7.2/lib/libc/sys/mount.2 releng/7.2/sys/conf/newvers.sh releng/7.2/sys/nfsclient/nfs_vfsops.c releng/7.3/UPDATING releng/7.3/contrib/opie/libopie/readrec.c releng/7.3/lib/libc/sys/mount.2 releng/7.3/sys/conf/newvers.sh releng/7.3/sys/nfsclient/nfs_vfsops.c releng/8.0/UPDATING releng/8.0/contrib/opie/libopie/readrec.c releng/8.0/lib/libc/sys/mount.2 releng/8.0/sys/conf/newvers.sh releng/8.0/sys/nfsclient/nfs_vfsops.c releng/8.0/usr.sbin/jail/jail.c stable/6/contrib/opie/libopie/readrec.c stable/7/contrib/opie/libopie/readrec.c stable/7/lib/libc/sys/mount.2 stable/7/sys/nfsclient/nfs_vfsops.c stable/8/contrib/opie/libopie/readrec.c stable/8/lib/libc/sys/mount.2 stable/8/sys/nfsclient/nfs_vfsops.c stable/8/usr.sbin/jail/jail.c Modified: head/contrib/opie/libopie/readrec.c == --- head/contrib/opie/libopie/readrec.c Thu May 27 01:27:25 2010 (r208585) +++ head/contrib/opie/libopie/readrec.c Thu May 27 03:15:04 2010 (r208586) @@ -141,10 +141,8 @@ int __opiereadrec FUNCTION((opie), struc if (c = strchr(opie->opie_principal, ':')) *c = 0; -if (strlen(opie->opie_principal) > OPIE_PRINCIPAL_MAX) - (opie->opie_principal)[OPIE_PRINCIPAL_MAX] = 0; -strcpy(principal, opie->opie_principal); +strlcpy(principal, opie->opie_principal, sizeof(principal)); do { if ((opie->opie_recstart = ftell(f)) < 0) Modified: head/lib/libc/sys/mount.2 == --- head/lib/libc/sys/mount.2 Thu May 27 01:27:25 2010(r208585) +++ head/lib/libc/sys/mount.2 Thu May 27 03:15:04 2010(r208586) @@ -107,7 +107,7 @@ This restriction can be removed by setti .Va vfs.usermount .Xr sysctl 8 variable -to a non-zero value. +to a non-zero value; see the BUGS section for more information. .Pp The following .Fa flags @@ -374,3 +374,10 @@ system call first appeared in .Fx 5.0 . .Sh BUGS Some of the error codes need translation to more obvious messages. +.Pp +Allowing untrusted users to mount arbitrary media, e.g. by enabling +.Va vfs.usermount , +should not be considered safe. +Most file systems in +.Fx +were not built to safeguard against malicious devices. Modified: head/sys/nfsclient/nfs_vfsops.c == --- head/sys/nfsclient/nfs_vfsops.c Thu May 27 01:27:25 2010 (r208585) +++ head/sys/nfsclient/nfs_vfsops.c Thu May 27 03:15:04 2010 (r208586) @@ -1074,6 +1074,11 @@ nfs_mount(struct mount *mp) error = EINVAL; goto out; } + if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX) { + vfs_mount_error(mp, "Bad file handle"); + error = EINVAL; + goto out; + } if (mp->mnt_flag & MNT_UPDATE) { struct nfsmount *nmp = VFSTONFS(mp); Modified: head/usr.sbin/jail/jail.c == --- head/usr.sbin/jail/jail.c Thu May 27 01:27:25 2010(r208585) +++ head/usr.sbin/jail/jail.c Thu May 27 03:15:04 2010(r208586) @@ -511,6 +511,10 @@ set_param(const char *name, char *value) *value++ = '\0'; } + /* jail_set won't chdir along with its chroot, so do it here. */ + if (!strcmp(name, "path") && chdir(value) < 0) + err(1, "chdir: %s", value); + /* Check for repeat parameters */ for (i = 0; i < nparams; i++) if (!strcmp(name, params[i].jp_name)) { ___ 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: r208585 - head/sys/mips/mips
Author: neel Date: Thu May 27 01:27:25 2010 New Revision: 208585 URL: http://svn.freebsd.org/changeset/base/208585 Log: Simplify clock interrupt handling on mips by using the new KPI - timer1clock() and timer2clock(). Dynamically adjust the tick frequency depending on the value of 'hz'. Tested with hz values of 100, 1000 and 2000. Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c == --- head/sys/mips/mips/tick.c Thu May 27 00:09:09 2010(r208584) +++ head/sys/mips/mips/tick.c Thu May 27 01:27:25 2010(r208585) @@ -58,19 +58,12 @@ struct timecounter *platform_timecounter static uint64_t cycles_per_tick; static uint64_t cycles_per_usec; -static uint64_t cycles_per_hz, cycles_per_stathz, cycles_per_profhz; static u_int32_t counter_upper = 0; static u_int32_t counter_lower_last = 0; -struct clk_ticks { - u_long hard_ticks; - u_long stat_ticks; - u_long prof_ticks; - uint32_t compare_ticks; -} __aligned(CACHE_LINE_SIZE); - -static struct clk_ticks pcpu_ticks[MAXCPU]; +static DPCPU_DEFINE(uint32_t, compare_ticks); +static DPCPU_DEFINE(uint32_t, lost_ticks); /* * Device methods @@ -150,22 +143,23 @@ mips_timer_init_params(uint64_t platform if (double_count != 0) counter_freq /= 2; - cycles_per_tick = counter_freq / 1000; - cycles_per_hz = counter_freq / hz; - cycles_per_stathz = counter_freq / stathz; - cycles_per_profhz = counter_freq / profhz; + if (hz >= 1500) + timer1hz = hz; + else if (hz >= 750) + timer1hz = hz * 2; + else + timer1hz = hz * 4; + + cycles_per_tick = counter_freq / timer1hz; cycles_per_usec = counter_freq / (1 * 1000 * 1000); counter_timecounter.tc_frequency = counter_freq; - printf("hz=%d cyl_per_tick:%jd cyl_per_usec:%jd freq:%jd " - "cyl_per_hz:%jd cyl_per_stathz:%jd cyl_per_profhz:%jd\n", + printf("hz=%d timer1hz:%d cyl_per_tick:%jd cyl_per_usec:%jd freq:%jd\n", hz, + timer1hz, cycles_per_tick, cycles_per_usec, - counter_freq, - cycles_per_hz, - cycles_per_stathz, - cycles_per_profhz); + counter_freq); set_cputicker(tick_ticker, counter_freq, 1); } @@ -243,58 +237,59 @@ DELAY(int n) } } -#if 0 /* TARGET_OCTEON */ -int64_t wheel_run = 0; - -void octeon_led_run_wheel(); - -#endif /* * Device section of file below */ static int clock_intr(void *arg) { - struct clk_ticks *cpu_ticks; struct trapframe *tf; - uint32_t count, compare, delta; - - cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; + uint32_t count, compare_last, compare_next, lost_ticks; /* * Set next clock edge. */ count = mips_rd_count(); - compare = cpu_ticks->compare_ticks; - cpu_ticks->compare_ticks = count + cycles_per_tick; - mips_wr_compare(cpu_ticks->compare_ticks); + compare_last = DPCPU_GET(compare_ticks); + compare_next = count + cycles_per_tick; + DPCPU_SET(compare_ticks, compare_next); + mips_wr_compare(compare_next); + critical_enter(); if (count < counter_lower_last) { counter_upper++; counter_lower_last = count; } + /* * Magic. Setting up with an arg of NULL means we get passed tf. */ tf = (struct trapframe *)arg; - delta = cycles_per_tick; - /* * Account for the "lost time" between when the timer interrupt fired * and when 'clock_intr' actually started executing. */ - delta += count - compare; + lost_ticks = DPCPU_GET(lost_ticks); + lost_ticks += count - compare_last; /* * If the COUNT and COMPARE registers are no longer in sync then make -* up some reasonable value for the 'delta'. +* up some reasonable value for the 'lost_ticks'. * * This could happen, for e.g., after we resume normal operations after * exiting the debugger. */ - if (delta > cycles_per_hz) - delta = cycles_per_hz; + if (lost_ticks > 2 * cycles_per_tick) + lost_ticks = cycles_per_tick; + + while (lost_ticks >= cycles_per_tick) { + timer1clock(TRAPF_USERMODE(tf), tf->pc); + timer2clock(TRAPF_USERMODE(tf), tf->pc); + lost_ticks -= cycles_per_tick; + } + DPCPU_SET(lost_ticks, lost_ticks); + #ifdef KDTRACE_HOOKS /* * If the DTrace hooks are configured and a callback function @@ -305,39 +300,9 @@ clock_intr(void *arg) if (cyclic_clock_func[cpu] != NULL) (*cyclic_clock_func[cpu])(tf); #endif - /* Fire hardcl
svn commit: r208582 - in head/sys: cam cam/ata cam/scsi dev/isp
Author: mjacob Date: Wed May 26 22:49:42 2010 New Revision: 208582 URL: http://svn.freebsd.org/changeset/base/208582 Log: Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning a whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN). It's less resource comsumptive than scanning a whole bus when the caller knows only one target has changes. Reviewed by: scsi@ Sponsored by: Panasas MFC after:1 month Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_xpt.c head/sys/dev/isp/isp_freebsd.c Modified: head/sys/cam/ata/ata_xpt.c == --- head/sys/cam/ata/ata_xpt.c Wed May 26 22:38:45 2010(r208581) +++ head/sys/cam/ata/ata_xpt.c Wed May 26 22:49:42 2010(r208582) @@ -1185,6 +1185,7 @@ ata_scan_bus(struct cam_periph *periph, ("xpt_scan_bus\n")); switch (request_ccb->ccb_h.func_code) { case XPT_SCAN_BUS: + case XPT_SCAN_TGT: /* Find out the characteristics of the bus */ work_ccb = xpt_alloc_ccb_nowait(); if (work_ccb == NULL) { @@ -1526,6 +1527,7 @@ ata_action(union ccb *start_ccb) break; } case XPT_SCAN_BUS: + case XPT_SCAN_TGT: ata_scan_bus(start_ccb->ccb_h.path->periph, start_ccb); break; case XPT_SCAN_LUN: Modified: head/sys/cam/cam_ccb.h == --- head/sys/cam/cam_ccb.h Wed May 26 22:38:45 2010(r208581) +++ head/sys/cam/cam_ccb.h Wed May 26 22:49:42 2010(r208582) @@ -184,6 +184,11 @@ typedef enum { /* * Set SIM specific knob values. */ + + XPT_SCAN_TGT= 0x1E | XPT_FC_QUEUED | XPT_FC_USER_CCB + | XPT_FC_XPT_ONLY, + /* Scan Target */ + /* HBA engine commands 0x20->0x2F */ XPT_ENG_INQ = 0x20 | XPT_FC_XPT_ONLY, /* HBA engine feature inquiry */ Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Wed May 26 22:38:45 2010(r208581) +++ head/sys/cam/cam_xpt.c Wed May 26 22:49:42 2010(r208582) @@ -446,23 +446,36 @@ xptioctl(struct cdev *dev, u_long cmd, c inccb = (union ccb *)addr; bus = xpt_find_bus(inccb->ccb_h.path_id); - if (bus == NULL) { - error = EINVAL; + if (bus == NULL) + return (EINVAL); + + switch (inccb->ccb_h.func_code) { + case XPT_SCAN_BUS: + case XPT_RESET_BUS: + if (inccb->ccb_h.target_id != CAM_TARGET_WILDCARD || + inccb->ccb_h.target_lun != CAM_LUN_WILDCARD) { + xpt_release_bus(bus); + return (EINVAL); + } + break; + case XPT_SCAN_TGT: + if (inccb->ccb_h.target_id == CAM_TARGET_WILDCARD || + inccb->ccb_h.target_lun != CAM_LUN_WILDCARD) { + xpt_release_bus(bus); + return (EINVAL); + } + break; + default: break; } switch(inccb->ccb_h.func_code) { case XPT_SCAN_BUS: case XPT_RESET_BUS: - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD) -|| (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD)) { - error = EINVAL; - break; - } - /* FALLTHROUGH */ case XPT_PATH_INQ: case XPT_ENG_INQ: case XPT_SCAN_LUN: + case XPT_SCAN_TGT: ccb = xpt_alloc_ccb(); @@ -839,11 +852,21 @@ xpt_rescan(union ccb *ccb) struct ccb_hdr *hdr; /* Prepare request */ - if (ccb->ccb_h.path->target->target_id == CAM_TARGET_WILDCARD || + if (ccb->ccb_h.path->target->target_id == CAM_TARGET_WILDCARD && ccb->ccb_h.path->device->lun_id == CAM_LUN_WILDCARD) ccb->ccb_h.func_code = XPT_SCAN_BUS; - else + else if (ccb->ccb_h.path->target->target_id != CAM_TARGET_WILDCARD && + ccb->ccb_h.path->device->lun_id == CAM_LUN_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_TGT; + else if (ccb->ccb_h.path->target->target_id != CAM_TARGET_WILDCARD && +
svn commit: r208581 - head/sys/mips/mips
Author: gonzo Date: Wed May 26 22:38:45 2010 New Revision: 208581 URL: http://svn.freebsd.org/changeset/base/208581 Log: - Fix kseg0 address calculation - it doesn't always start at page boundary - Add cache ops to ensure memory validity before/after copy operation Modified: head/sys/mips/mips/uio_machdep.c Modified: head/sys/mips/mips/uio_machdep.c == --- head/sys/mips/mips/uio_machdep.cWed May 26 19:26:28 2010 (r208580) +++ head/sys/mips/mips/uio_machdep.cWed May 26 22:38:45 2010 (r208581) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* * Implement uiomove(9) from physical memory using a combination * of the direct mapping and sf_bufs to reduce the creation and @@ -91,8 +93,14 @@ uiomove_fromphys(vm_page_t ma[], vm_offs m = ma[offset >> PAGE_SHIFT]; pa = VM_PAGE_TO_PHYS(m); if (pa < MIPS_KSEG0_LARGEST_PHYS) { - cp = (char *)MIPS_PHYS_TO_KSEG0(pa); sf = NULL; + cp = (char *)MIPS_PHYS_TO_KSEG0(pa) + page_offset; + /* +* flush all mappings to this page, KSEG0 address first +* in order to get it overwritten by correct data +*/ + mips_dcache_wbinv_range((vm_offset_t)cp, cnt); + pmap_flush_pvcache(m); } else { sf = sf_buf_alloc(m, 0); cp = (char *)sf_buf_kva(sf) + page_offset; @@ -122,6 +130,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs } if (sf != NULL) sf_buf_free(sf); + else + mips_dcache_wbinv_range((vm_offset_t)cp, cnt); iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; uio->uio_resid -= cnt; ___ 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: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
On Wed, May 26, 2010 at 11:59:12AM -0700, Xin LI wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 2010/05/26 11:47, Garrett Cooper wrote: > > On Wed, May 26, 2010 at 11:28 AM, Rob Farmer > > wrote: > >> On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: > >>> Author: delphij > >>> Date: Tue May 25 17:48:17 2010 > >>> New Revision: 208545 > >>> URL: http://svn.freebsd.org/changeset/base/208545 > >>> > >>> Log: > >>> libarchive now needs libcrypto and liblzma. > >>> > >>> Modified: > >>> head/release/amd64/boot_crunch.conf > >>> head/release/i386/boot_crunch.conf > >>> head/release/ia64/boot_crunch.conf > >>> head/release/pc98/boot_crunch.conf > >>> head/release/powerpc/boot_crunch.conf > >>> head/release/sparc64/boot_crunch.conf > >>> head/release/sun4v/boot_crunch.conf > >>> > >>> Modified: head/release/amd64/boot_crunch.conf > >>> == > >>> --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 > >>> (r208544) > >>> +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 > >>> (r208545) > >>> @@ -39,6 +39,6 @@ progs ppp > >>> progs sysinstall > >>> progs usbconfig > >>> > >>> -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph > >>> +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph > >>> libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo > >>> -libs -lbsdxml -larchive -lbz2 -lusb -ljail > >>> +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail > >>> > >> > >> Does the order of the libs entries matter? Because I just tried on > >> i386 after this commit and I still get errors related to the sha1, > >> md5, etc. functions but it worked fine with -llzma -lcrypto at the end > >> of the last line. > > > > In theory it shouldn't because the linker should be smart enough > > to evaluate the dependencies and link everything properly, but our > > copy of binutils isn't intelligent enough to determine the appropriate > > order from what I've seen. > > Bad last minute change from me, I overlooked this :-/ > > Will a newer GNU ld solve this issue? The behaviour is the standard for any unix linker I ever saw. Static libraries participate in symbol resolution only at the point they appear on the command line. Linker makes as many passes over the single library as needed to not have any unresolved symbols that can be resolved from the archive, then moves to the next. There are facilities that allow to change the behaviour, either by grouping the libraries, see --start-group switch, or by repeating the library several times at the proper place in the command line. Comments about "linker not being smart enough" are nonsense. pgpqeFYWjryOY.pgp Description: PGP signature
Re: svn commit: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
In message: Garrett Cooper writes: : On Wed, May 26, 2010 at 11:28 AM, Rob Farmer wrote: : > On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: : >> Author: delphij : >> Date: Tue May 25 17:48:17 2010 : >> New Revision: 208545 : >> URL: http://svn.freebsd.org/changeset/base/208545 : >> : >> Log: : >> libarchive now needs libcrypto and liblzma. : >> : >> Modified: : >> head/release/amd64/boot_crunch.conf : >> head/release/i386/boot_crunch.conf : >> head/release/ia64/boot_crunch.conf : >> head/release/pc98/boot_crunch.conf : >> head/release/powerpc/boot_crunch.conf : >> head/release/sparc64/boot_crunch.conf : >> head/release/sun4v/boot_crunch.conf : >> : >> Modified: head/release/amd64/boot_crunch.conf : >> == : >> --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 (r208544) : >> +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 (r208545) : >> @@ -39,6 +39,6 @@ progs ppp : >> progs sysinstall : >> progs usbconfig : >> : >> -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph : >> +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph : >> libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo : >> -libs -lbsdxml -larchive -lbz2 -lusb -ljail : >> +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail : >> : > : > Does the order of the libs entries matter? Because I just tried on : > i386 after this commit and I still get errors related to the sha1, : > md5, etc. functions but it worked fine with -llzma -lcrypto at the end : > of the last line. : : In theory it shouldn't because the linker should be smart enough : to evaluate the dependencies and link everything properly, but our : copy of binutils isn't intelligent enough to determine the appropriate : order from what I've seen. the linker has never been that smart. Unless you tell it to link in everything, which we don't do. Warner ___ 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: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
On Wed, May 26, 2010 at 11:59 AM, Xin LI wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 2010/05/26 11:47, Garrett Cooper wrote: >> On Wed, May 26, 2010 at 11:28 AM, Rob Farmer >> wrote: >>> On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: Author: delphij Date: Tue May 25 17:48:17 2010 New Revision: 208545 URL: http://svn.freebsd.org/changeset/base/208545 Log: libarchive now needs libcrypto and liblzma. Modified: head/release/amd64/boot_crunch.conf head/release/i386/boot_crunch.conf head/release/ia64/boot_crunch.conf head/release/pc98/boot_crunch.conf head/release/powerpc/boot_crunch.conf head/release/sparc64/boot_crunch.conf head/release/sun4v/boot_crunch.conf Modified: head/release/amd64/boot_crunch.conf == --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 (r208544) +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 (r208545) @@ -39,6 +39,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -libs -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail >>> >>> Does the order of the libs entries matter? Because I just tried on >>> i386 after this commit and I still get errors related to the sha1, >>> md5, etc. functions but it worked fine with -llzma -lcrypto at the end >>> of the last line. >> >> In theory it shouldn't because the linker should be smart enough >> to evaluate the dependencies and link everything properly, but our >> copy of binutils isn't intelligent enough to determine the appropriate >> order from what I've seen. > > Bad last minute change from me, I overlooked this :-/ > > Will a newer GNU ld solve this issue? Juli informed me (off-list) that GNU ld _does_ in fact do this, but only if you specify --start-group and --end-group in the linker arguments (which she claimed required more RAM). It might just be better to switch the linker library ordering as this would fix the issue cleanly and quickly. Thanks, -Garrett ___ 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: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2010/05/26 11:47, Garrett Cooper wrote: > On Wed, May 26, 2010 at 11:28 AM, Rob Farmer wrote: >> On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: >>> Author: delphij >>> Date: Tue May 25 17:48:17 2010 >>> New Revision: 208545 >>> URL: http://svn.freebsd.org/changeset/base/208545 >>> >>> Log: >>> libarchive now needs libcrypto and liblzma. >>> >>> Modified: >>> head/release/amd64/boot_crunch.conf >>> head/release/i386/boot_crunch.conf >>> head/release/ia64/boot_crunch.conf >>> head/release/pc98/boot_crunch.conf >>> head/release/powerpc/boot_crunch.conf >>> head/release/sparc64/boot_crunch.conf >>> head/release/sun4v/boot_crunch.conf >>> >>> Modified: head/release/amd64/boot_crunch.conf >>> == >>> --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 >>> (r208544) >>> +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 >>> (r208545) >>> @@ -39,6 +39,6 @@ progs ppp >>> progs sysinstall >>> progs usbconfig >>> >>> -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph >>> +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph >>> libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo >>> -libs -lbsdxml -larchive -lbz2 -lusb -ljail >>> +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail >>> >> >> Does the order of the libs entries matter? Because I just tried on >> i386 after this commit and I still get errors related to the sha1, >> md5, etc. functions but it worked fine with -llzma -lcrypto at the end >> of the last line. > > In theory it shouldn't because the linker should be smart enough > to evaluate the dependencies and link everything properly, but our > copy of binutils isn't intelligent enough to determine the appropriate > order from what I've seen. Bad last minute change from me, I overlooked this :-/ Will a newer GNU ld solve this issue? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBCAAGBQJL/W+AAAoJEATO+BI/yjfBdYIH/jrMjcdVUba/5R/Y4TbFq15i kVWRcSj+6R/iqxZ62pKPOKfYim2pJToRVPT+Hx+cTYri3jm25L4U0SQOfWViWU6D 2qQ1BLWwkNTd97hLcdSBePf4pKPq1o49W33zqyE3VAAkvOl5r+HZ9V16xhZ9GnmB VfweQSYb6Nm0YD2H3fSvYpLoNzKW13POxer6sqvmhnEZcU78CCSeQVSYhdf3M7eM ulya3Jsxd1Rn9aReFQR8D14+fMq0xfs2q7DGX1HmVHn1hxC/dWhfGZ7Yv36mbPr8 MwVHoeEjVhnRgUE78o9/XQ3vJyvhOSCQCy+a2IZoFIbqTotaymi0EMmif51zudE= =nD1V -END PGP SIGNATURE- ___ 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: r208577 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
Author: delphij Date: Wed May 26 18:55:40 2010 New Revision: 208577 URL: http://svn.freebsd.org/changeset/base/208577 Log: Reorder to have -lcrypto after -larchive. Our linker doesn't seem to like the current ordering :( Modified: head/release/amd64/boot_crunch.conf head/release/i386/boot_crunch.conf head/release/ia64/boot_crunch.conf head/release/pc98/boot_crunch.conf head/release/powerpc/boot_crunch.conf head/release/sparc64/boot_crunch.conf head/release/sun4v/boot_crunch.conf Modified: head/release/amd64/boot_crunch.conf == --- head/release/amd64/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/amd64/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -39,6 +39,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail +libs -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: head/release/i386/boot_crunch.conf == --- head/release/i386/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/i386/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -39,6 +39,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail +libs -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: head/release/ia64/boot_crunch.conf == --- head/release/ia64/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/ia64/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -44,6 +44,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -ldevinfo -libs -lgeom -lbsdxml -larchive -lbz2 -llzma -lusb -ljail +libs -lgeom -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: head/release/pc98/boot_crunch.conf == --- head/release/pc98/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/pc98/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -38,6 +38,6 @@ progs arp progs ppp progs sysinstall -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml -libs -larchive -lbz2 -llzma -ljail +libs -larchive -lcrypto -lbz2 -llzma -ljail Modified: head/release/powerpc/boot_crunch.conf == --- head/release/powerpc/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/powerpc/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -44,6 +44,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -libs -lgeom -lbsdxml -larchive -lbz2 -llzma -lusb -ljail +libs -lgeom -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: head/release/sparc64/boot_crunch.conf == --- head/release/sparc64/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/sparc64/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -39,6 +39,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml -libs -larchive -lbz2 -llzma -lusb -ljail +libs -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: head/release/sun4v/boot_crunch.conf == --- head/release/sun4v/boot_crunch.conf Wed May 26 18:50:16 2010 (r208576) +++ head/release/sun4v/boot_crunch.conf Wed May 26 18:55:40 2010 (r208577) @@ -39,6 +39,6 @@ progs ppp progs sysinstall progs usbconfig -libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -l
Re: svn commit: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
On Wed, May 26, 2010 at 11:28 AM, Rob Farmer wrote: > On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: >> Author: delphij >> Date: Tue May 25 17:48:17 2010 >> New Revision: 208545 >> URL: http://svn.freebsd.org/changeset/base/208545 >> >> Log: >> libarchive now needs libcrypto and liblzma. >> >> Modified: >> head/release/amd64/boot_crunch.conf >> head/release/i386/boot_crunch.conf >> head/release/ia64/boot_crunch.conf >> head/release/pc98/boot_crunch.conf >> head/release/powerpc/boot_crunch.conf >> head/release/sparc64/boot_crunch.conf >> head/release/sun4v/boot_crunch.conf >> >> Modified: head/release/amd64/boot_crunch.conf >> == >> --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 >> (r208544) >> +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 >> (r208545) >> @@ -39,6 +39,6 @@ progs ppp >> progs sysinstall >> progs usbconfig >> >> -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph >> +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph >> libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo >> -libs -lbsdxml -larchive -lbz2 -lusb -ljail >> +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail >> > > Does the order of the libs entries matter? Because I just tried on > i386 after this commit and I still get errors related to the sha1, > md5, etc. functions but it worked fine with -llzma -lcrypto at the end > of the last line. In theory it shouldn't because the linker should be smart enough to evaluate the dependencies and link everything properly, but our copy of binutils isn't intelligent enough to determine the appropriate order from what I've seen. Thanks, -Garrett ___ 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: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
On Tue, May 25, 2010 at 10:48 AM, Xin LI wrote: > Author: delphij > Date: Tue May 25 17:48:17 2010 > New Revision: 208545 > URL: http://svn.freebsd.org/changeset/base/208545 > > Log: > libarchive now needs libcrypto and liblzma. > > Modified: > head/release/amd64/boot_crunch.conf > head/release/i386/boot_crunch.conf > head/release/ia64/boot_crunch.conf > head/release/pc98/boot_crunch.conf > head/release/powerpc/boot_crunch.conf > head/release/sparc64/boot_crunch.conf > head/release/sun4v/boot_crunch.conf > > Modified: head/release/amd64/boot_crunch.conf > == > --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010 > (r208544) > +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010 > (r208545) > @@ -39,6 +39,6 @@ progs ppp > progs sysinstall > progs usbconfig > > -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph > +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph > libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo > -libs -lbsdxml -larchive -lbz2 -lusb -ljail > +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail > Does the order of the libs entries matter? Because I just tried on i386 after this commit and I still get errors related to the sha1, md5, etc. functions but it worked fine with -llzma -lcrypto at the end of the last line. -- Rob Farmer ___ 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: r208574 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v vm
Author: alc Date: Wed May 26 18:00:44 2010 New Revision: 208574 URL: http://svn.freebsd.org/changeset/base/208574 Log: Push down page queues lock acquisition in pmap_enter_object() and pmap_is_referenced(). Eliminate the corresponding page queues lock acquisitions from vm_map_pmap_enter() and mincore(), respectively. In mincore(), this allows some additional cases to complete without ever acquiring the page queues lock. Assert that the page is managed in pmap_is_referenced(). On powerpc/aim, push down the page queues lock acquisition from moea*_is_modified() and moea*_is_referenced() into moea*_query_bit(). Again, this will allow some additional cases to complete without ever acquiring the page queues lock. Reorder a few statements in vm_page_dontneed() so that a race can't lead to an old reference persisting. This scenario is described in detail by a comment. Correct a spelling error in vm_page_dontneed(). Assert that the object is locked in vm_page_clear_dirty(), and restrict the page queues lock assertion to just those cases in which the page is currently writeable. Add object locking to vnode_pager_generic_putpages(). This was the one and only place where vm_page_clear_dirty() was being called without the object being locked. Eliminate an unnecessary vm_page_lock() around vnode_pager_setsize()'s call to vm_page_clear_dirty(). Change vnode_pager_generic_putpages() to the modern-style of function definition. Also, change the name of one of the parameters to follow virtual memory system naming conventions. Reviewed by: kib Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/sun4v/sun4v/pmap.c head/sys/vm/vm_map.c head/sys/vm/vm_mmap.c head/sys/vm/vm_page.c head/sys/vm/vnode_pager.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Wed May 26 17:30:19 2010(r208573) +++ head/sys/amd64/amd64/pmap.c Wed May 26 18:00:44 2010(r208574) @@ -3389,6 +3389,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; + vm_page_lock_queues(); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3402,6 +3403,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -4209,12 +4211,15 @@ pmap_is_prefaultable(pmap_t pmap, vm_off boolean_t pmap_is_referenced(vm_page_t m) { + boolean_t rv; - if (m->flags & PG_FICTITIOUS) - return (FALSE); - if (pmap_is_referenced_pvh(&m->md)) - return (TRUE); - return (pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m; + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0, + ("pmap_is_referenced: page %p is not managed", m)); + vm_page_lock_queues(); + rv = pmap_is_referenced_pvh(&m->md) || + pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))); + vm_page_unlock_queues(); + return (rv); } /* Modified: head/sys/arm/arm/pmap.c == --- head/sys/arm/arm/pmap.c Wed May 26 17:30:19 2010(r208573) +++ head/sys/arm/arm/pmap.c Wed May 26 18:00:44 2010(r208574) @@ -3589,12 +3589,14 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); m = m_start; + vm_page_lock_queues(); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_locked(pmap, start + ptoa(diff), m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE, M_NOWAIT); m = TAILQ_NEXT(m, listq); } + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -4521,8 +4523,9 @@ boolean_t pmap_is_referenced(vm_page_t m) { - return ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0 && - (m->md.pvh_attrs & PVF_REF) != 0); + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0, + ("pmap_is_referenced: page %p is not managed", m)); + return ((m->md.pvh_attrs & PVF_REF) != 0); } /* Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Wed May 26 17:30:19 2010(r208573) +++ head/sys/i386/i386/pmap.c Wed May 26 18:00:44 2010(r208574) @@ -3519,6 +3519,7 @@
svn commit: r208567 - head/sys/isa
Author: jkim Date: Wed May 26 16:37:54 2010 New Revision: 208567 URL: http://svn.freebsd.org/changeset/base/208567 Log: Do not attempt to switch to the same VTs between suspend and resume. Modified: head/sys/isa/syscons_isa.c Modified: head/sys/isa/syscons_isa.c == --- head/sys/isa/syscons_isa.c Wed May 26 15:39:43 2010(r208566) +++ head/sys/isa/syscons_isa.c Wed May 26 16:37:54 2010(r208567) @@ -119,14 +119,15 @@ scsuspend(device_t dev) if (sc->cur_scp == NULL) return (0); - if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) { + if (sc->suspend_in_progress == 0) { sc_cur_scr = sc->cur_scp->index; - do { - sc_switch_scr(sc, 0); - if (!sc->switch_in_progress) - break; - pause("scsuspend", hz); - } while (retry--); + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + do { + sc_switch_scr(sc, 0); + if (!sc->switch_in_progress) + break; + pause("scsuspend", hz); + } while (retry--); } sc->suspend_in_progress++; @@ -141,8 +142,9 @@ scresume(device_t dev) sc = &main_softc; sc->suspend_in_progress--; - if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) - sc_switch_scr(sc, sc_cur_scr); + if (sc->suspend_in_progress == 0) + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + sc_switch_scr(sc, sc_cur_scr); 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: r208566 - in head/sys: kern sys
Author: kib Date: Wed May 26 15:39:43 2010 New Revision: 208566 URL: http://svn.freebsd.org/changeset/base/208566 Log: Allow to use syscallname(9) outside subr_trap.c. MFC after:1 month Modified: head/sys/kern/subr_trap.c head/sys/sys/sysent.h Modified: head/sys/kern/subr_trap.c == --- head/sys/kern/subr_trap.c Wed May 26 15:36:29 2010(r208565) +++ head/sys/kern/subr_trap.c Wed May 26 15:39:43 2010(r208566) @@ -260,8 +260,7 @@ ast(struct trapframe *framep) } #ifdef HAVE_SYSCALL_ARGS_DEF -static const char *syscallname(struct proc *p, u_int code) __unused; -static const char * +const char * syscallname(struct proc *p, u_int code) { static const char unknown[] = "unknown"; Modified: head/sys/sys/sysent.h == --- head/sys/sys/sysent.h Wed May 26 15:36:29 2010(r208565) +++ head/sys/sys/sysent.h Wed May 26 15:39:43 2010(r208566) @@ -202,6 +202,9 @@ int syscall_module_handler(struct module intsyscall_helper_register(struct syscall_helper_data *sd); intsyscall_helper_unregister(struct syscall_helper_data *sd); +struct proc; +const char *syscallname(struct proc *p, u_int code); + /* Special purpose system call functions. */ struct nosys_args; ___ 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: r208565 - head/sys/modules
Author: kib Date: Wed May 26 15:36:29 2010 New Revision: 208565 URL: http://svn.freebsd.org/changeset/base/208565 Log: Remove a check that should be always true. Discussed with: pjd MFC after:1 week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Wed May 26 15:29:53 2010(r208564) +++ head/sys/modules/Makefile Wed May 26 15:36:29 2010(r208565) @@ -476,10 +476,8 @@ _nxge= nxge _wpi= wpi _wpifw=wpifw .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -.if exists(${.CURDIR}/../crypto/via) _padlock= padlock .endif -.endif _s3= s3 _twa= twa _vesa= vesa @@ -555,10 +553,8 @@ _nxge= nxge _opensolaris= opensolaris .endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -.if exists(${.CURDIR}/../crypto/via) _padlock= padlock .endif -.endif _pccard= pccard _rdma= rdma _s3= s3 ___ 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: r208564 - head/sys/isa
Author: jkim Date: Wed May 26 15:29:53 2010 New Revision: 208564 URL: http://svn.freebsd.org/changeset/base/208564 Log: Let the first device suspend and the last device resume syscons(4). Modified: head/sys/isa/syscons_isa.c Modified: head/sys/isa/syscons_isa.c == --- head/sys/isa/syscons_isa.c Wed May 26 11:31:57 2010(r208563) +++ head/sys/isa/syscons_isa.c Wed May 26 15:29:53 2010(r208564) @@ -116,10 +116,10 @@ scsuspend(device_t dev) sc = &main_softc; - if (sc->cur_scp == NULL || sc->suspend_in_progress) + if (sc->cur_scp == NULL) return (0); - if (!sc_no_suspend_vtswitch) { + if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) { sc_cur_scr = sc->cur_scp->index; do { sc_switch_scr(sc, 0); @@ -128,8 +128,7 @@ scsuspend(device_t dev) pause("scsuspend", hz); } while (retry--); } - - sc->suspend_in_progress = TRUE; + sc->suspend_in_progress++; return (0); } @@ -141,12 +140,8 @@ scresume(device_t dev) sc = &main_softc; - if (!sc->suspend_in_progress) - return (0); - - sc->suspend_in_progress = FALSE; - - if (!sc_no_suspend_vtswitch) + sc->suspend_in_progress--; + if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) sc_switch_scr(sc, sc_cur_scr); 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: r208563 - head/sys/pc98/cbus
Author: nyan Date: Wed May 26 11:31:57 2010 New Revision: 208563 URL: http://svn.freebsd.org/changeset/base/208563 Log: Reduce diffs against syscons_isa.c. No functional changes. Modified: head/sys/pc98/cbus/syscons_cbus.c Modified: head/sys/pc98/cbus/syscons_cbus.c == --- head/sys/pc98/cbus/syscons_cbus.c Wed May 26 10:46:03 2010 (r208562) +++ head/sys/pc98/cbus/syscons_cbus.c Wed May 26 11:31:57 2010 (r208563) @@ -22,10 +22,11 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include "opt_syscons.h" #include @@ -47,7 +48,7 @@ static devclass_t sc_devclass; -static sc_softc_t main_softc; +static sc_softc_t main_softc; #ifdef SC_NO_SUSPEND_VTYSWITCH static int sc_no_suspend_vtswitch = 1; #else @@ -55,31 +56,34 @@ static int sc_no_suspend_vtswitch = 0; #endif static int sc_cur_scr; -TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", (int *)&sc_no_suspend_vtswitch); +TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", &sc_no_suspend_vtswitch); SYSCTL_DECL(_hw_syscons); SYSCTL_INT(_hw_syscons, OID_AUTO, sc_no_suspend_vtswitch, CTLFLAG_RW, - &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); +&sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); static void -scidentify (driver_t *driver, device_t parent) +scidentify(driver_t *driver, device_t parent) { + BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "sc", 0); } static int scprobe(device_t dev) { + /* No pnp support */ if (isa_get_vendorid(dev)) return (ENXIO); device_set_desc(dev, "System console"); - return sc_probe_unit(device_get_unit(dev), device_get_flags(dev)); + return (sc_probe_unit(device_get_unit(dev), device_get_flags(dev))); } static int scattach(device_t dev) { + return sc_attach_unit(device_get_unit(dev), device_get_flags(dev)); } @@ -127,7 +131,8 @@ scresume(device_t dev) int sc_max_unit(void) { - return devclass_get_maxunit(sc_devclass); + + return (devclass_get_maxunit(sc_devclass)); } sc_softc_t @@ -136,52 +141,52 @@ sc_softc_t sc_softc_t *sc; if (unit < 0) - return NULL; - if (flags & SC_KERNEL_CONSOLE) { + return (NULL); + if ((flags & SC_KERNEL_CONSOLE) != 0) { /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, unit)); + sc = device_get_softc(devclass_get_device(sc_devclass, unit)); if (sc == NULL) - return NULL; + return (NULL); } sc->unit = unit; - if (!(sc->flags & SC_INIT_DONE)) { + if ((sc->flags & SC_INIT_DONE) == 0) { sc->keyboard = -1; sc->adapter = -1; sc->mouse_char = SC_MOUSE_CHAR; } - return sc; + return (sc); } sc_softc_t *sc_find_softc(struct video_adapter *adp, struct keyboard *kbd) { sc_softc_t *sc; - int units; int i; + int units; sc = &main_softc; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); units = devclass_get_maxunit(sc_devclass); for (i = 0; i < units; ++i) { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, i)); + sc = device_get_softc(devclass_get_device(sc_devclass, i)); if (sc == NULL) continue; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); } - return NULL; + return (NULL); } int sc_get_cons_priority(int *unit, int *flags) { const char *at; - int u, f; + int f, u; *unit = -1; for (u = 0; u < 16; u++) { @@ -207,7 +212,7 @@ sc_get_cons_priority(int *unit, int *fla *unit = 0; *flags = 0; } - return CN_INTERNAL; + return (CN_INTERNAL); } void @@ -225,12 +230,12 @@ sc_tone(int herz) if (herz) { if (timer_spkr_acquire()) - return EBUSY; + return (EBUSY);
svn commit: r208562 - head/tools/regression/sockets/unix_close_race
Author: rwatson Date: Wed May 26 10:46:03 2010 New Revision: 208562 URL: http://svn.freebsd.org/changeset/base/208562 Log: Add unix_close_race, a regresion test to catch ENOTCONN being returned improperly from one of two instances of close(2) being called simultaneously on both ends of a connected UNIX domain socket. The test tool is slightly tweaked to improve failure modes, and while often does trigger the problem, doesn't do so consistently due to the nature of the race. PR: kern/144061 Submitted by: Mikolaj Golub MFC after:3 days Added: head/tools/regression/sockets/unix_close_race/ head/tools/regression/sockets/unix_close_race/Makefile (contents, props changed) head/tools/regression/sockets/unix_close_race/unix_close_race.c (contents, props changed) Added: head/tools/regression/sockets/unix_close_race/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/sockets/unix_close_race/Makefile Wed May 26 10:46:03 2010(r208562) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= unix_close_race +NO_MAN= +WARNS?=3 + +.include Added: head/tools/regression/sockets/unix_close_race/unix_close_race.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/sockets/unix_close_race/unix_close_race.c Wed May 26 10:46:03 2010(r208562) @@ -0,0 +1,132 @@ +/*- + * Copyright (c) 2010 Mikolaj Golub + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This regression test attempts to trigger a race that occurs when both + * endpoints of a connected UNIX domain socket are closed at once. The two + * close paths may run concurrently leading to a call to sodisconnect() on an + * already-closed socket in kernel. Before it was fixed, this might lead to + * ENOTCONN being returned improperly from close(). + * + * This race is fairly timing-dependent, so it effectively requires SMP, and + * may not even trigger then. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#defineUNIXSTR_PATH"/tmp/mytest.socket" +#defineUSLEEP 100 +#defineLOOPS 10 + +int +main(int argc, char **argv) +{ + struct sockaddr_un servaddr; + int listenfd, connfd, pid; + u_int counter, ncpus; + size_t len; + + len = sizeof(ncpus); + if (sysctlbyname("kern.smp.cpus", &ncpus, &len, NULL, 0) < 0) + err(1, "kern.smp.cpus"); + if (len != sizeof(ncpus)) + errx(1, "kern.smp.cpus: invalid length"); + if (ncpus < 2) + warnx("SMP not present, test may be unable to trigger race"); + + /* +* Create a UNIX domain socket that the parent will repeatedly +* accept() from, and that the child will repeatedly connect() to. +*/ + if ((listenfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) + err(1, "parent: socket error"); + (void)unlink(UNIXSTR_PATH); + bzero(&servaddr, sizeof(servaddr)); + servaddr.sun_family = AF_LOCAL; + strcpy(servaddr.sun_path, UNIXSTR_PATH); + if (bind(listenfd, (struct sockaddr *) &servaddr, + sizeof(servaddr)) < 0) + err(1, "parent: bind error"); + if (listen(listenfd, 1024) < 0) + err(1, "parent: listen error"); + + pid = fork(); + if (pid == -1) + err(1
svn commit: r208561 - head/sys/boot/fdt/dts
Author: raj Date: Wed May 26 09:50:09 2010 New Revision: 208561 URL: http://svn.freebsd.org/changeset/base/208561 Log: Initial device tree source (DTS) files for Marvell ARM systems: o DB-88F5182 o DB-88F5281 o DB-88F6281 o DB-78100 o SheevaPlug This also includes device tree bindings definitions for some newly introduced nodes (mpp, gpio). Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/boot/fdt/dts/bindings-gpio.txt (contents, props changed) head/sys/boot/fdt/dts/bindings-mpp.txt (contents, props changed) head/sys/boot/fdt/dts/db78100.dts (contents, props changed) head/sys/boot/fdt/dts/db88f5182.dts (contents, props changed) head/sys/boot/fdt/dts/db88f5281.dts (contents, props changed) head/sys/boot/fdt/dts/db88f6281.dts (contents, props changed) head/sys/boot/fdt/dts/sheevaplug.dts (contents, props changed) Added: head/sys/boot/fdt/dts/bindings-gpio.txt == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/bindings-gpio.txt Wed May 26 09:50:09 2010 (r208561) @@ -0,0 +1,101 @@ +$FreeBSD$ + +GPIO configuration. +=== + +1. Properties for GPIO Controllers + +1.1 #gpio-cells + +Property: #gpio-cells + +Value type: + +Description: The #gpio-cells property defines the number of cells required + to encode a gpio specifier. + + +1.2 gpio-controller + +Property: gpio-controller + +Value type: + +Description: The presence of a gpio-controller property defines a node as a + GPIO controller node. + + +1.3 pin-count + +Property: pin-count + +Value type: + +Description: The pin-count property defines the number of GPIO pins. + + +1.4 Example + + GPIO: g...@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <6 7 8 9>; + interrupt-parent = <&PIC>; + pin-count = <50> + }; + +2. Properties for GPIO consumer nodes. + +2.1 gpios + +Property: gpios + +Value type: encoded as arbitrary number of GPIO + specifiers. + +Description: The gpios property of a device node defines the GPIO or GPIOs + that are used by the device. The value of the gpios property + consists of an arbitrary number of GPIO specifiers. + + The first cell of the GPIO specifier is phandle of the node's + parent GPIO controller and remaining cells are defined by the + binding describing the GPIO parent, typically include + information like pin number, direction and various flags. + +Example: + gpios = <&GPIO 0 1 0/* GPIO[0]: IN, NONE */ +&GPIO 1 2 0>; /* GPIO[1]: OUT, NONE */ + + +3. "mrvl,gpio" controller GPIO specifier + + + + +pin: 0-MAX GPIO pin number. + +dir: + 1 IN Input direction. + 2 OUT Output direction. + +flags: + 0x IN_NONE + 0x0001 IN_POL_LOW Polarity low (inverted input value. + 0x0002 IN_IRQ_EDGE Interrupt, edge triggered. + 0x0004 IN_IRQ_LEVELInterrupt, level triggered. + + 0x OUT_NONE + 0x0001 OUT_BLINK Blink on the pin. + 0x0002 OUT_OPEN_DRAIN Open drain output line. + 0x0004 OUT_OPEN_SRCOpen source output line. + + +Example: + gpios = <&GPIO 0 1 0x /* GPIO[0]: IN */ +&GPIO 1 2 0x /* GPIO[1]: OUT */ +&GPIO 2 1 0x0002 /* GPIO[2]: IN, IRQ (edge) */ +&GPIO 3 1 0x0004 /* GPIO[3]: IN, IRQ (level) */ +... +&GPIO 10 2 0x0001>;/* GPIO[10]: OUT, blink */ Added: head/sys/boot/fdt/dts/bindings-mpp.txt == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/bindings-mpp.txt Wed May 26 09:50:09 2010 (r208561) @@ -0,0 +1,50 @@ +$FreeBSD$ + +* Multi purpose pin (MPP) configuration. + +Required properties: + +- pin-map : array of pin configurations. Each pin is defined by 2 cells, + respectively: . Pins not specified in the pin-map property + are assumed to have default value of = 0, which means GPIO. + + - pin : pin number. + + - function : function ID of the pin according to the assignment tables in +User Manual. Each pin can have many possible functions depending on the +MPP unit incarnation. + +- pin-count: number of the physical MPP conne
svn commit: r208560 - head/sys/boot/fdt/dts
Author: raj Date: Wed May 26 09:34:02 2010 New Revision: 208560 URL: http://svn.freebsd.org/changeset/base/208560 Log: Import device tree source (DTS) files for PowerPC MPC8555CDS and MPC8572DS development systems. Special thanks to Phil Brownfield for help with BSD-style relicensing of these files. Obtained from:Freescale Added: head/sys/boot/fdt/dts/ head/sys/boot/fdt/dts/mpc8555cds.dts (contents, props changed) head/sys/boot/fdt/dts/mpc8572ds.dts (contents, props changed) Added: head/sys/boot/fdt/dts/mpc8555cds.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/mpc8555cds.dtsWed May 26 09:34:02 2010 (r208560) @@ -0,0 +1,442 @@ +/* + * MPC8555 CDS Device Tree Source + * + * Copyright 2006, 2008 Freescale Semiconductor Inc. All rights reserved + * + * Neither the name of Freescale Semiconductor, Inc nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Freescale hereby publishes it under the following licenses: + * + * BSD License + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + * + * GNU General Public License, version 2 + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * You may select the license of your choice. + *-- + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "MPC8555CDS"; + compatible = "MPC8555CDS", "MPC85xxCDS"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,8...@0 { + device_type = "cpu"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x8000>;// L1, 32K + i-cache-size = <0x8000>;// L1, 32K + timebase-frequency = <0>; // 33 MHz, from uboot + bus-frequency = <0>;// 166 MHz + clock-frequency = <0>; // 825 MHz, from uboot + next-level-cache = <&L2>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x800>; // 128M at 0x0 + }; + + local...@e0005000 { + #addres
svn commit: r208559 - head/share/mk
Author: raj Date: Wed May 26 09:23:51 2010 New Revision: 208559 URL: http://svn.freebsd.org/changeset/base/208559 Log: Use MACHINE_ARCH instead of TARGET_ARCH. Pointed out by: imp Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkWed May 26 04:14:29 2010(r208558) +++ head/share/mk/bsd.own.mkWed May 26 09:23:51 2010(r208559) @@ -279,8 +279,7 @@ WITH_IDEA= .endif # Enable FDT by default for selected platforms. -.if defined(TARGET_ARCH) && \ - (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc") +.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" # XXX this is temporarily disabled until all FDT support code is in place. #_fdt= FDT _no_fdt= FDT ___ 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"