svn commit: r262946 - head/sbin/kldconfig

2014-03-09 Thread Jilles Tjoelker
Author: jilles
Date: Sun Mar  9 13:19:37 2014
New Revision: 262946
URL: http://svnweb.freebsd.org/changeset/base/262946

Log:
  kldconfig: Remove some code for compatibility with FreeBSD 4.x.
  
  Verified using md5(1).

Modified:
  head/sbin/kldconfig/kldconfig.c

Modified: head/sbin/kldconfig/kldconfig.c
==
--- head/sbin/kldconfig/kldconfig.c Sun Mar  9 07:45:59 2014
(r262945)
+++ head/sbin/kldconfig/kldconfig.c Sun Mar  9 13:19:37 2014
(r262946)
@@ -40,15 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#if defined(__FreeBSD_version)
-#if __FreeBSD_version < 50
-#define NEED_SLASHTERM
-#endif /* < 50 */
-#else  /* defined(__FreeBSD_version) */
-/* just in case.. */
-#define NEED_SLASHTERM
-#endif /* defined(__FreeBSD_version) */
-
 /* the default sysctl name */
 #define PATHCTL"kern.module_path"
 
@@ -163,18 +154,9 @@ addpath(struct pathhead *pathq, char *pa
strlcpy(pathbuf, path, sizeof(pathbuf));
 
len = strlen(pathbuf);
-#ifdef NEED_SLASHTERM
-   /* slash-terminate, because the kernel linker said so. */
-   if ((len == 0) || (pathbuf[len-1] != '/')) {
-   if (len == sizeof(pathbuf) - 1)
-   errx(1, "path too long: %s", pathbuf);
-   pathbuf[len] = '/';
-   }
-#else  /* NEED_SLASHTERM */
/* remove a terminating slash if present */
if ((len > 0) && (pathbuf[len-1] == '/'))
pathbuf[--len] = '\0';
-#endif /* NEED_SLASHTERM */
 
/* is it already in there? */
TAILQ_FOREACH(pe, pathq, next)
@@ -219,18 +201,9 @@ rempath(struct pathhead *pathq, char *pa
strlcpy(pathbuf, path, sizeof(pathbuf));
 
len = strlen(pathbuf);
-#ifdef NEED_SLASHTERM
-   /* slash-terminate, because the kernel linker said so. */
-   if ((len == 0) || (pathbuf[len-1] != '/')) {
-   if (len == sizeof(pathbuf) - 1)
-   errx(1, "path too long: %s", pathbuf);
-   pathbuf[len] = '/';
-   }
-#else  /* NEED_SLASHTERM */
/* remove a terminating slash if present */
if ((len > 0) && (pathbuf[len-1] == '/'))
pathbuf[--len] = '\0';
-#endif /* NEED_SLASHTERM */
 
/* Is it in there? */
TAILQ_FOREACH(pe, pathq, next)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262947 - stable/10/lib/libprocstat

2014-03-09 Thread Robert Watson
Author: rwatson
Date: Sun Mar  9 13:23:49 2014
New Revision: 262947
URL: http://svnweb.freebsd.org/changeset/base/262947

Log:
  Merge r262690 from head to stable/10:
  
When querying a process's umask via sysctl in libprocstat(), don't
print a warning if EPERM is returned as this is an expected failure
mode rather than error -- similar to current handling of ESRCH.
This makes the output of 'procstat -as' vastly more palatable.
  
Sponsored by: DARPA, AFRL

Modified:
  stable/10/lib/libprocstat/libprocstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libprocstat/libprocstat.c
==
--- stable/10/lib/libprocstat/libprocstat.c Sun Mar  9 13:19:37 2014
(r262946)
+++ stable/10/lib/libprocstat/libprocstat.c Sun Mar  9 13:23:49 2014
(r262947)
@@ -2052,7 +2052,7 @@ procstat_getumask_sysctl(pid_t pid, unsi
mib[3] = pid;
len = sizeof(*maskp);
error = sysctl(mib, 4, maskp, &len, NULL, 0);
-   if (error != 0 && errno != ESRCH)
+   if (error != 0 && errno != ESRCH && errno != EPERM)
warn("sysctl: kern.proc.umask: %d", pid);
return (error);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262948 - in head/sys/arm: arm include

2014-03-09 Thread Ian Lepore
Author: ian
Date: Sun Mar  9 14:24:05 2014
New Revision: 262948
URL: http://svnweb.freebsd.org/changeset/base/262948

Log:
  Always call vfp_discard() on thread death, not just when the VFP is
  enabled.  In vfp_discard(), if the state in the VFP hardware belongs to
  the thread which is dying, NULL out pcpu fpcurthread to indicate the
  state currently in the hardware belongs to nobody.
  
  Submitted by: Juergen Weiss
  Pointy hat to:me

Modified:
  head/sys/arm/arm/swtch.S
  head/sys/arm/arm/vfp.c
  head/sys/arm/include/vfp.h

Modified: head/sys/arm/arm/swtch.S
==
--- head/sys/arm/arm/swtch.SSun Mar  9 13:23:49 2014(r262947)
+++ head/sys/arm/arm/swtch.SSun Mar  9 14:24:05 2014(r262948)
@@ -124,14 +124,11 @@ ENTRY(cpu_throw)
 * r5 = newtd
 */
 
-   GET_PCPU(r7, r9)
-
-#ifdef VFP
-   fmrxr0, fpexc   /* This thread is dying, if the VFP */
-   tst r0, #(VFPEXC_EN)/* is enabled, go shut it down */
-   blne_C_LABEL(vfp_discard)   /* without preserving its state. */
+#ifdef VFP /* This thread is dying, disable */
+   bl  _C_LABEL(vfp_discard)   /* VFP without preserving state. */
 #endif
 
+   GET_PCPU(r7, r9)
ldr r7, [r5, #(TD_PCB)] /* r7 = new thread's PCB */
   
/* Switch to lwp0 context */

Modified: head/sys/arm/arm/vfp.c
==
--- head/sys/arm/arm/vfp.c  Sun Mar  9 13:23:49 2014(r262947)
+++ head/sys/arm/arm/vfp.c  Sun Mar  9 14:24:05 2014(r262948)
@@ -229,21 +229,23 @@ vfp_store(struct vfp_state *vfpsave, boo
 }
 
 /*
- * If the VFP hardware is on, the current thread was using it but now that
- * thread is dying.  Turn off the VFP and set pcpu fpcurthread to 0, to 
indicate
- * that the VFP hardware state does not belong to any thread.   Called only 
from
- * cpu_throw(), so we don't have to worry about a context switch here.
+ * The current thread is dying.  If the state currently in the hardware belongs
+ * to the current thread, set fpcurthread to NULL to indicate that the VFP
+ * hardware state does not belong to any thread.  If the VFP is on, turn it 
off.
+ * Called only from cpu_throw(), so we don't have to worry about a context
+ * switch here.
  */
 void
-vfp_discard()
+vfp_discard(struct thread *td)
 {
u_int tmp;
 
+   if (PCPU_GET(fpcurthread) == td)
+   PCPU_SET(fpcurthread, NULL);
+
tmp = fmrx(VFPEXC);
-   if (tmp & VFPEXC_EN) {
+   if (tmp & VFPEXC_EN)
fmxr(VFPEXC, tmp & ~VFPEXC_EN);
-   PCPU_SET(fpcurthread, 0);
-   }
 }
 
 #endif

Modified: head/sys/arm/include/vfp.h
==
--- head/sys/arm/include/vfp.h  Sun Mar  9 13:23:49 2014(r262947)
+++ head/sys/arm/include/vfp.h  Sun Mar  9 14:24:05 2014(r262948)
@@ -129,7 +129,7 @@
 #ifndef LOCORE
 voidvfp_init(void);
 voidvfp_store(struct vfp_state *, boolean_t);
-voidvfp_discard(void);
+voidvfp_discard(struct thread *);
 #endif
 
 #endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r262566 - in stable/10: crypto/openssh crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-com

2014-03-09 Thread Robert Watson

On Mon, 3 Mar 2014, John Baldwin wrote:


Log:
  MFH (r261320): upgrade openssh to 6.5p1
  MFH (r261340): enable sandboxing by default


Mails on stable@ suggest that this latter change may be a bit of a POLA 
violation as if people are using a custom kernel configuration that doesn't 
include CAPSICUM they are now locked out of their boxes as sshd fails.  It 
seems that this is at least worth a note in UPDATING if not adding a 
workaround to handle the case of a kernel without CAPSICUM.


Most userspace tools that support Capsicum will explicitly test for a kernel 
generating ENOSYS due to non-support and 'fail open' by not using sandboxing. 
That strategy becomes more complex as applications become more complex, and in 
the long term we'll want to move away from conditional support.  In the mean 
time, I'd generally recommend that any code being used on 9.x support runtime 
detection of Capsicum -- either via feature_is_present(3) or ENOSYS back from 
cap_enter().  The ugly bit is whether or not to use other sandboxing 
techniques (e.g., chroot()) if Capsicum can't be found, since that stuff tends 
to be pretty messy.


Robert
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262949 - head/sys/arm/arm

2014-03-09 Thread Ian Lepore
Author: ian
Date: Sun Mar  9 14:54:05 2014
New Revision: 262949
URL: http://svnweb.freebsd.org/changeset/base/262949

Log:
  When a thread begins life it doesn't own the VFP hardware state on any cpu.

Modified:
  head/sys/arm/arm/machdep.c
  head/sys/arm/arm/vm_machdep.c

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Sun Mar  9 14:24:05 2014(r262948)
+++ head/sys/arm/arm/machdep.c  Sun Mar  9 14:54:05 2014(r262949)
@@ -993,6 +993,7 @@ init_proc0(vm_offset_t kstack)
thread0.td_pcb = (struct pcb *)
(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
thread0.td_pcb->pcb_flags = 0;
+   thread0.td_pcb->pcb_vfpcpu = -1;
thread0.td_frame = &proc0_tf;
pcpup->pc_curpcb = thread0.td_pcb;
 }

Modified: head/sys/arm/arm/vm_machdep.c
==
--- head/sys/arm/arm/vm_machdep.c   Sun Mar  9 14:24:05 2014
(r262948)
+++ head/sys/arm/arm/vm_machdep.c   Sun Mar  9 14:54:05 2014
(r262949)
@@ -146,6 +146,7 @@ cpu_fork(register struct thread *td1, re
bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2));
pcb2->un_32.pcb32_sp = td2->td_kstack +
USPACE_SVC_STACK_TOP - sizeof(*pcb2);
+   pcb2->pcb_vfpcpu = -1;
pmap_activate(td2);
td2->td_frame = tf = (struct trapframe *)STACKALIGN(
pcb2->un_32.pcb32_sp - sizeof(struct trapframe));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262950 - head/sys/arm/arm

2014-03-09 Thread Ian Lepore
Author: ian
Date: Sun Mar  9 15:36:56 2014
New Revision: 262950
URL: http://svnweb.freebsd.org/changeset/base/262950

Log:
  Make undefined exception entry MPSAFE.
  
  The old code used static storage to preserve a couple registers while
  setting up the trapframe for the main handler.  Doing so was the last
  leftover crumbs from the days when a low-level debugger was hooked into
  the exception entry code.
  
  Now the exception entry sequence is essentially the same as for the
  other exceptions, which still involves needlessly indirecting through
  a function pointer which points to the same code on every platform.
  Removing that indirection will be handled as a separate cleanup.
  
  This work is based on an analysis by Juergen Weiss.

Modified:
  head/sys/arm/arm/exception.S
  head/sys/arm/arm/undefined.c

Modified: head/sys/arm/arm/exception.S
==
--- head/sys/arm/arm/exception.SSun Mar  9 14:54:05 2014
(r262949)
+++ head/sys/arm/arm/exception.SSun Mar  9 15:36:56 2014
(r262950)
@@ -218,46 +218,25 @@ END(exception_exit)
  * look like direct entry from the vector.
  */
 ASENTRY_NP(undefined_entry)
-   stmfd   sp!, {r0, r1}
-   ldr r0, Lundefined_handler_indirection
-   ldr r1, [sp], #0x0004
-   str r1, [r0, #0x]
-   ldr r1, [sp], #0x0004
-   str r1, [r0, #0x0004]
-   ldmia   r0, {r0, r1, pc}
 
-
-Lundefined_handler_indirection:
-   .word   Lundefined_handler_indirection_data
+sub lr, lr, #0x0004 /* Adjust the lr */
+   PUSHFRAMEINSVC  /* Push trap frame and switch */
+   /* to SVC32 mode */
+   ldr r1, Lundefined_handler_address
+   adr lr, exception_exit
+   mov r0, sp  /* pass the stack pointer as r0 */
+   ldr pc, [r1]
 END(undefined_entry)
 
-/*
- * assembly bounce code for calling the kernel
- * undefined instruction handler. This uses
- * a standard trap frame and is called in SVC mode.
- */
-
-ENTRY_NP(undefinedinstruction_bounce)
-   PUSHFRAMEINSVC
+ASENTRY_NP(undefinedinstruction_bounce)
+   b   undefinedinstruction
+END(undefinedinstruction_bounce)
 
-   mov r0, sp
-   adr lr, exception_exit
-   b   _C_LABEL(undefinedinstruction)
+Lundefined_handler_address:
+   .word   _C_LABEL(undefined_handler_address)
 
.data
-   .align  0
-
-/*
- * Indirection data
- * 2 words use for preserving r0 and r1
- * 3rd word contains the undefined handler address.
- */
-
-Lundefined_handler_indirection_data:
-   .word   0
-   .word   0
-
.global _C_LABEL(undefined_handler_address)
 _C_LABEL(undefined_handler_address):
-   .word   _C_LABEL(undefinedinstruction_bounce)
-END(undefinedinstruction_bounce)
+   .word   undefinedinstruction_bounce
+

Modified: head/sys/arm/arm/undefined.c
==
--- head/sys/arm/arm/undefined.cSun Mar  9 14:54:05 2014
(r262949)
+++ head/sys/arm/arm/undefined.cSun Mar  9 15:36:56 2014
(r262950)
@@ -183,7 +183,6 @@ undefinedinstruction(struct trapframe *f
if (!(frame->tf_spsr & I32_bit))
enable_interrupts(I32_bit|F32_bit);
 
-   frame->tf_pc -= INSN_SIZE;
PCPU_INC(cnt.v_trap);
 
fault_pc = frame->tf_pc;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262951 - in stable/10: bin bin/date bin/date/tests bin/mv bin/mv/tests bin/pax bin/pax/tests bin/sh bin/sh/tests bin/sh/tests/builtins bin/sh/tests/parameters bin/sh/tests/parser bin/t...

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 17:04:31 2014
New Revision: 262951
URL: http://svnweb.freebsd.org/changeset/base/262951

Log:
  Sync sh(1) in stable/10 to head.
  
  This is a MFC of all the commits listed below.
  
  My original goal of this change was to only merge the move of the tests
  from tools/regression/bin/ into the new layout (which include tests for
  sh(1) and other tools as well).  However, doing so is tricky due to the
  ongoing work in sh(1) and, especially, the many changes to its tests
  since stable/10 was first branched.
  
  Merging everything is the simplest way to achieve this goal and, as a
  bonus point, we get various fixes and miscellaneous improvements into
  the branch.
  
  Per jilles' suggestion, I'm avoiding the merge of a couple of changes
  (r256850 and r257506) that required depending kernel changes.  I'm also
  avoiding very recent changes that have not had a long enough time to be
  validated in current.
  
  This is "make tinderbox" clean.
  
  r256735   sh: Remove one syscall when waiting for a foreground job.
  r257399   sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'.
  r257504   sh: Reorder union node to reduce its size on 64-bit platforms.
  r257920   sh: Add a test case for would-be assignments that are not due 
to quoting.
  r257929   sh: Properly quote alias output from command -v.
  r258489   sh: Add tests for the 
 
 SUBDIR:=   ${SUBDIR:O}

Modified: stable/10/bin/date/Makefile
==
--- stable/10/bin/date/Makefile Sun Mar  9 15:36:56 2014(r262950)
+++ stable/10/bin/date/Makefile Sun Mar  9 17:04:31 2014(r262951)
@@ -1,7 +1,13 @@
 #  @(#)Makefile8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include 
+
 PROG=  date
 SRCS=  date.c netdate.c vary.c
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=tests
+.endif
+
 .include 

Modified: stable/10/bin/mv/Makefile
==
--- stable/10/bin/mv/Makefile   Sun Mar  9 15:36:56 2014(r262950)
+++ stable/10/bin/mv/Makefile   Sun Mar  9 17:04:31 2014(r262951)
@@ -1,6 +1,12 @@
 #  @(#)Makefile8.2 (Berkeley) 4/2/94
 # $FreeBSD$
 
+.include 
+
 PROG=  mv
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=tests
+.endif
+
 .include 

Modified: stable/10/bin/pax/Makefile
==
--- stable/10/bin/pax/Makefile  Sun Mar  9 15:36:56 2014(r262950)
+++ stable/10/bin/pax/Makefile  Sun Mar  9 17:04:31 2014(r262951)
@@ -1,6 +1,8 @@
 #   @(#)Makefile   8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include 
+
 # To install on versions prior to BSD 4.4 the following may have to be
 # defined with CFLAGS +=
 #
@@ -30,4 +32,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache
gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \
tables.c tar.c tty_subs.c
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=tests
+.endif
+
 .include 

Modified: stable/10/bin/pax/tests/Makefile
==
--- head/bin/pax/tests/Makefile Wed Dec 11 04:09:17 2013(r259210)
+++ stable/10/bin/pax/tests/MakefileSun Mar  9 17:04:31 2014
(r262951)
@@ -4,6 +4,6 @@
 
 TESTSDIR=  ${TESTSBASE}/bin/pax
 
-TAP_TESTS_SH=  legacy_test
+TAP_TESTS_PERL=legacy_test
 
 .include 

Copied: stable/10/bin/pax/tests/legacy_test.pl (from r260634, 
head/bin/pax/tests/legacy_test.pl)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/bin/pax/tests/legacy_test.pl  Sun Mar  9 17:04:31 2014
(r262951, copy of r260634, head/bin/pax/tests/legacy_test.pl)
@@ -0,0 +1,89 @@
+# $FreeBSD$
+
+use strict;
+use warnings;
+
+use Test::More tests => 6;
+use File::Path qw(rmtree mkpath);
+use Cwd;
+
+my $n = 0;
+sub create_file {
+my $fn = shift;
+
+$n++;
+(my $dir = $fn) =~ s,/[^/]+$,,;
+mkpath $dir;
+open my $fd, ">", $fn or die "$fn: $!";
+print $fd "file $n\n";
+}
+
+
+ustar_pathnames: { SKIP: {
+# Prove that pax breaks up ustar pathnames properly
+
+my $top = getcwd . "/ustar-pathnames-1";
+skip "Current path is too long", 6 if length $top > 92;
+rmtree $top;
+my $subdir = "x" . "x" x (92 - length $top);
+my $work94 = "$top/$subdir";
+mkpath $work94;# $work is 94 characters long
+
+my $x49 = "x" x 49;
+my $x50 = "x" x 50;
+my $x60 = "x" x 60;
+my $x95 = "x" x 95;
+
+my @paths = (
+   "$work94/x099", # 99 chars
+   "$work94/xx100",# 100 chars
+   "$work94/xxx101",   # 101 chars
+   "$work94/$x49/${x50}x199",  # 199 chars
+   "$work94/$x49/${x50}xx200", # 200 chars
+   "$work94/$x49/${x50}xxx201",# 201 chars
+   "$work94/$x60/${x95}254", 

svn commit: r262952 - in head/sys/arm: arm at91 econa s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa

2014-03-09 Thread Ian Lepore
Author: ian
Date: Sun Mar  9 18:08:27 2014
New Revision: 262952
URL: http://svnweb.freebsd.org/changeset/base/262952

Log:
  The arm exception entry points currently vector through a function pointer
  to the actual handler routine.  All the pointers are static-intialized to
  the only handlers available, and yet various platform-specific inits still
  set those pointers (to the values they're already initialized to).  Begin
  to drain the swamp by removing all the redundant external declarations and
  runtime setting of the pointers that's scattered around various places.

Modified:
  head/sys/arm/arm/machdep.c
  head/sys/arm/arm/trap.c
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/econa/econa_machdep.c
  head/sys/arm/s3c2xx0/s3c24x0_machdep.c
  head/sys/arm/sa11x0/assabet_machdep.c
  head/sys/arm/xscale/i80321/ep80219_machdep.c
  head/sys/arm/xscale/i80321/iq31244_machdep.c
  head/sys/arm/xscale/i8134x/crb_machdep.c
  head/sys/arm/xscale/ixp425/avila_machdep.c
  head/sys/arm/xscale/pxa/pxa_machdep.c

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Sun Mar  9 17:04:31 2014(r262951)
+++ head/sys/arm/arm/machdep.c  Sun Mar  9 18:08:27 2014(r262952)
@@ -143,10 +143,6 @@ extern vm_offset_t ksym_start, ksym_end;
 
 static struct pv_addr kernel_pt_table[KERNEL_PT_MAX];
 
-extern u_int data_abort_handler_address;
-extern u_int prefetch_abort_handler_address;
-extern u_int undefined_handler_address;
-
 vm_paddr_t pmap_pa;
 
 struct pv_addr systempage;
@@ -1279,10 +1275,6 @@ initarm(struct arm_boot_params *abp)
 */
cpu_idcache_wbinv_all();
 
-   /* Set stack for exception handlers */
-   data_abort_handler_address = (u_int)data_abort_handler;
-   prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
-   undefined_handler_address = (u_int)undefinedinstruction_bounce;
undefined_init();
 
init_proc0(kernelstack.pv_va);

Modified: head/sys/arm/arm/trap.c
==
--- head/sys/arm/arm/trap.c Sun Mar  9 17:04:31 2014(r262951)
+++ head/sys/arm/arm/trap.c Sun Mar  9 18:08:27 2014(r262952)
@@ -126,7 +126,6 @@ __FBSDID("$FreeBSD$");
 
 
 void swi_handler(struct trapframe *);
-void undefinedinstruction(struct trapframe *);
 
 #include 
 #include 

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cSun Mar  9 17:04:31 2014
(r262951)
+++ head/sys/arm/at91/at91_machdep.cSun Mar  9 18:08:27 2014
(r262952)
@@ -111,10 +111,6 @@ __FBSDID("$FreeBSD$");
 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
 #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
 
-extern u_int data_abort_handler_address;
-extern u_int prefetch_abort_handler_address;
-extern u_int undefined_handler_address;
-
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
 /* Static device mappings. */
@@ -621,11 +617,6 @@ initarm(struct arm_boot_params *abp)
 */
cpu_idcache_wbinv_all();
 
-   /* Set stack for exception handlers */
-
-   data_abort_handler_address = (u_int)data_abort_handler;
-   prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
-   undefined_handler_address = (u_int)undefinedinstruction_bounce;
undefined_init();
 
init_proc0(kernelstack.pv_va);

Modified: head/sys/arm/econa/econa_machdep.c
==
--- head/sys/arm/econa/econa_machdep.c  Sun Mar  9 17:04:31 2014
(r262951)
+++ head/sys/arm/econa/econa_machdep.c  Sun Mar  9 18:08:27 2014
(r262952)
@@ -91,10 +91,6 @@ __FBSDID("$FreeBSD$");
 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
 #defineNUM_KERNEL_PTS  (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
 
-extern u_int data_abort_handler_address;
-extern u_int prefetch_abort_handler_address;
-extern u_int undefined_handler_address;
-
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
 /* Physical and virtual addresses for some global pages */
@@ -309,10 +305,6 @@ initarm(struct arm_boot_params *abp)
cpu_idcache_wbinv_all();
cpu_setup("");
 
-   /* Set stack for exception handlers */
-   data_abort_handler_address = (u_int)data_abort_handler;
-   prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
-   undefined_handler_address = (u_int)undefinedinstruction_bounce;
undefined_init();
 
init_proc0(kernelstack.pv_va);

Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c
==
--- head/sys/arm/s3c2xx0/s3c24x0_machdep.c  Sun Mar  9 17:04:31 2014
(r262951)
+++ head/sys/arm/s3c2xx0/s3c24x0_

svn commit: r262953 - head/tools/regression/usr.bin/m4

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 19:25:53 2014
New Revision: 262953
URL: http://svnweb.freebsd.org/changeset/base/262953

Log:
  Fix m4 tests so that they run cleanly with prove.

Modified:
  head/tools/regression/usr.bin/m4/regress.gnusofterror.out
  head/tools/regression/usr.bin/m4/regress.sh
  head/tools/regression/usr.bin/m4/regress.t

Modified: head/tools/regression/usr.bin/m4/regress.gnusofterror.out
==
--- head/tools/regression/usr.bin/m4/regress.gnusofterror.out   Sun Mar  9 
18:08:27 2014(r262952)
+++ head/tools/regression/usr.bin/m4/regress.gnusofterror.out   Sun Mar  9 
19:25:53 2014(r262953)
@@ -1 +1,2 @@
+m4: gnusofterror.m4 at line 3: include(hey I do not exit): No such file or 
directory
 abc

Modified: head/tools/regression/usr.bin/m4/regress.sh
==
--- head/tools/regression/usr.bin/m4/regress.sh Sun Mar  9 18:08:27 2014
(r262952)
+++ head/tools/regression/usr.bin/m4/regress.sh Sun Mar  9 19:25:53 2014
(r262953)
@@ -2,7 +2,7 @@
 
 LC_ALL=C; export LC_ALL
 
-echo 1..22
+echo 1..21
 
 REGRESSION_START($1)
 
@@ -17,7 +17,7 @@ REGRESSION_TEST(`gnuformat', `m4 -g gnuf
 REGRESSION_TEST(`gnupatterns', `m4 -g gnupatterns.m4')
 REGRESSION_TEST(`gnupatterns2', `m4 -g gnupatterns2.m4')
 REGRESSION_TEST(`gnuprefix', `m4 -P gnuprefix.m4 2>&1')
-REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4')
+REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4 2>&1')
 REGRESSION_TEST(`gnutranslit2', `m4 -g translit2.m4')
 REGRESSION_TEST(`includes', `m4 -I. includes.m4')
 REGRESSION_TEST(`m4wrap3', `m4 m4wrap3.m4')

Modified: head/tools/regression/usr.bin/m4/regress.t
==
--- head/tools/regression/usr.bin/m4/regress.t  Sun Mar  9 18:08:27 2014
(r262952)
+++ head/tools/regression/usr.bin/m4/regress.t  Sun Mar  9 19:25:53 2014
(r262953)
@@ -3,4 +3,4 @@
 
 cd `dirname $0`
 
-sh regress.sh
+m4 ../regress.m4 regress.sh | sh
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262954 - head/tools/regression/usr.bin/printf

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 19:37:01 2014
New Revision: 262954
URL: http://svnweb.freebsd.org/changeset/base/262954

Log:
  Fix printf tests so that they run cleanly with prove.

Modified:
  head/tools/regression/usr.bin/printf/regress.sh

Modified: head/tools/regression/usr.bin/printf/regress.sh
==
--- head/tools/regression/usr.bin/printf/regress.sh Sun Mar  9 19:25:53 
2014(r262953)
+++ head/tools/regression/usr.bin/printf/regress.sh Sun Mar  9 19:37:01 
2014(r262954)
@@ -2,7 +2,7 @@
 
 REGRESSION_START($1)
 
-echo '1..12'
+echo '1..15'
 
 REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"')
 REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 
123')
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262955 - head/etc

2014-03-09 Thread Marcel Moolenaar
Author: marcel
Date: Sun Mar  9 20:51:14 2014
New Revision: 262955
URL: http://svnweb.freebsd.org/changeset/base/262955

Log:
  Add 3wire and std as terminal types/classes. These are similar to
  the existing terminal types/classes that have the baudrate suffix,
  but differ in that no baudrate is set/defined.
  
  The purpose of these new types/classes is to allow them to be used
  for the serial console. Currently the uart(4) driver fixates the
  baudrate and the CLOCAL flag, which means that it doesn't matter
  whether you give it std. or 3wire. as the terminal type
  to getty and what exactly  is set to. It's being overridden
  by uart(4). The goal is to change uart(4) not to override these
  settings.

Modified:
  head/etc/gettytab

Modified: head/etc/gettytab
==
--- head/etc/gettytab   Sun Mar  9 19:37:01 2014(r262954)
+++ head/etc/gettytab   Sun Mar  9 20:51:14 2014(r262955)
@@ -49,6 +49,8 @@ default:\
 #  autobaud code in getty, and likewise can
 #  be assigned to any table desired (hopefully the same speed).
 #
+std:\
+   :np:sp#0:
 a|std.110|110-baud:\
:np:nd#1:cd#1:uc:sp#110:
 b|std.134|134.5-baud:\
@@ -221,6 +223,8 @@ al.Pc:\
 # Entries for 3-wire serial terminals.  These don't supply carrier, so
 # clocal needs to be set, and crtscts needs to be unset.
 #
+3wire:\
+   :np:nc:sp#0:
 3wire.9600|9600-3wire:\
:np:nc:sp#9600:
 3wire.19200|19200-3wire:\
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262956 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include

2014-03-09 Thread Dimitry Andric
Author: dim
Date: Sun Mar  9 21:02:23 2014
New Revision: 262956
URL: http://svnweb.freebsd.org/changeset/base/262956

Log:
  MFC r262805:
  
  Pull in r199848 from upstream libc++ trunk:
  
Const qualify __mem_fn call operator
  
QOI improvement.
  
Differential Revision: http://llvm-reviews.chandlerc.com/D2059
  
  This should help with building recent versions of Mesa.  See also:
  https://bugs.freedesktop.org/show_bug.cgi?id=75505
  
  Reported by:  dumbbell

Modified:
  stable/10/contrib/libc++/include/__functional_03
  stable/10/contrib/libc++/include/functional
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/libc++/include/__functional_03
  stable/9/contrib/libc++/include/functional
Directory Properties:
  stable/9/contrib/libc++/   (props changed)

Modified: stable/10/contrib/libc++/include/__functional_03
==
--- stable/10/contrib/libc++/include/__functional_03Sun Mar  9 20:51:14 
2014(r262955)
+++ stable/10/contrib/libc++/include/__functional_03Sun Mar  9 21:02:23 
2014(r262956)
@@ -33,28 +33,28 @@ public:
 // invoke
 
 typename __invoke_return::type
-   operator() ()
+   operator() () const
{
return __invoke(__f_);
}
 
 template 
typename __invoke_return0::type
-  operator() (_A0& __a0)
+  operator() (_A0& __a0) const
   {
   return __invoke(__f_, __a0);
   }
 
 template 
typename __invoke_return1::type
-  operator() (_A0& __a0, _A1& __a1)
+  operator() (_A0& __a0, _A1& __a1) const
   {
   return __invoke(__f_, __a0, __a1);
   }
 
 template 
typename __invoke_return2::type
-  operator() (_A0& __a0, _A1& __a1, _A2& __a2)
+  operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
   {
   return __invoke(__f_, __a0, __a1, __a2);
   }

Modified: stable/10/contrib/libc++/include/functional
==
--- stable/10/contrib/libc++/include/functional Sun Mar  9 20:51:14 2014
(r262955)
+++ stable/10/contrib/libc++/include/functional Sun Mar  9 21:02:23 2014
(r262956)
@@ -1221,7 +1221,7 @@ public:
 template 
_LIBCPP_INLINE_VISIBILITY
typename __invoke_return::type
-  operator() (_ArgTypes&&... __args)
+  operator() (_ArgTypes&&... __args) const
   {
   return __invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...);
   }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262956 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include

2014-03-09 Thread Dimitry Andric
Author: dim
Date: Sun Mar  9 21:02:23 2014
New Revision: 262956
URL: http://svnweb.freebsd.org/changeset/base/262956

Log:
  MFC r262805:
  
  Pull in r199848 from upstream libc++ trunk:
  
Const qualify __mem_fn call operator
  
QOI improvement.
  
Differential Revision: http://llvm-reviews.chandlerc.com/D2059
  
  This should help with building recent versions of Mesa.  See also:
  https://bugs.freedesktop.org/show_bug.cgi?id=75505
  
  Reported by:  dumbbell

Modified:
  stable/9/contrib/libc++/include/__functional_03
  stable/9/contrib/libc++/include/functional
Directory Properties:
  stable/9/contrib/libc++/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/libc++/include/__functional_03
  stable/10/contrib/libc++/include/functional
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/contrib/libc++/include/__functional_03
==
--- stable/9/contrib/libc++/include/__functional_03 Sun Mar  9 20:51:14 
2014(r262955)
+++ stable/9/contrib/libc++/include/__functional_03 Sun Mar  9 21:02:23 
2014(r262956)
@@ -33,28 +33,28 @@ public:
 // invoke
 
 typename __invoke_return::type
-   operator() ()
+   operator() () const
{
return __invoke(__f_);
}
 
 template 
typename __invoke_return0::type
-  operator() (_A0& __a0)
+  operator() (_A0& __a0) const
   {
   return __invoke(__f_, __a0);
   }
 
 template 
typename __invoke_return1::type
-  operator() (_A0& __a0, _A1& __a1)
+  operator() (_A0& __a0, _A1& __a1) const
   {
   return __invoke(__f_, __a0, __a1);
   }
 
 template 
typename __invoke_return2::type
-  operator() (_A0& __a0, _A1& __a1, _A2& __a2)
+  operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
   {
   return __invoke(__f_, __a0, __a1, __a2);
   }

Modified: stable/9/contrib/libc++/include/functional
==
--- stable/9/contrib/libc++/include/functional  Sun Mar  9 20:51:14 2014
(r262955)
+++ stable/9/contrib/libc++/include/functional  Sun Mar  9 21:02:23 2014
(r262956)
@@ -1221,7 +1221,7 @@ public:
 template 
_LIBCPP_INLINE_VISIBILITY
typename __invoke_return::type
-  operator() (_ArgTypes&&... __args)
+  operator() (_ArgTypes&&... __args) const
   {
   return __invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...);
   }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262957 - in head/etc: etc.arm etc.ia64 etc.mips etc.powerpc etc.sparc64

2014-03-09 Thread Marcel Moolenaar
Author: marcel
Date: Sun Mar  9 21:06:22 2014
New Revision: 262957
URL: http://svnweb.freebsd.org/changeset/base/262957

Log:
  Change the terminal type/class for enabled serial lines to 3wire. This
  allows us to change the uart(4) driver to not hardcode specific line
  settings for the serial console.
  
  A terminal type of 3wire makes sure the console still works when no DCD
  signal is present, which preserves behviour. When it is known that the
  terminal server (or DCE in general) provides DCD, a terminal type/class
  of std can be used. This has the effect of being logged out when one
  disconnects from the console -- improving security overall.
  
  Likewise, when uart(4) does not fixate the baudrate, one can change
  the terminal type/class to set a specific baudrate. An operator can use
  this to change the console speed mid-flight, without needing a reboot.
  Of course it helps in this respect if and when the firmware can be
  configured from the OS.
  
  The above mentioned capabilities depend on uart(4) being changed, which
  is to happen next.

Modified:
  head/etc/etc.arm/ttys
  head/etc/etc.ia64/ttys
  head/etc/etc.mips/ttys
  head/etc/etc.powerpc/ttys
  head/etc/etc.sparc64/ttys

Modified: head/etc/etc.arm/ttys
==
--- head/etc/etc.arm/ttys   Sun Mar  9 21:02:23 2014(r262956)
+++ head/etc/etc.arm/ttys   Sun Mar  9 21:06:22 2014(r262957)
@@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm   off
 #ttyv8 "/usr/local/bin/xdm -nodaemon"  xterm   off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty std.9600"   vt100   on  secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
 ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
 ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
 ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure

Modified: head/etc/etc.ia64/ttys
==
--- head/etc/etc.ia64/ttys  Sun Mar  9 21:02:23 2014(r262956)
+++ head/etc/etc.ia64/ttys  Sun Mar  9 21:06:22 2014(r262957)
@@ -41,8 +41,8 @@ ttyv7 "/usr/libexec/getty Pc" xterm   off
 ttyv8  "/usr/local/bin/xdm -nodaemon"  xterm   off secure
 # Serial terminals. The 'dialup' keyword identifies dialin lines to login,
 # fingerd etc.
-ttyu0  "/usr/libexec/getty std.9600"   vt100   on  secure
-ttyu1  "/usr/libexec/getty std.9600"   vt100   on  secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   on  secure
 ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
 ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure
 # Dumb console

Modified: head/etc/etc.mips/ttys
==
--- head/etc/etc.mips/ttys  Sun Mar  9 21:02:23 2014(r262956)
+++ head/etc/etc.mips/ttys  Sun Mar  9 21:06:22 2014(r262957)
@@ -30,7 +30,7 @@
 consolenoneunknown off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty std.115200" dialup  on  secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
 ttyu1  "/usr/libexec/getty std.115200" dialup  off secure
 ttyu2  "/usr/libexec/getty std.115200" dialup  off secure
 ttyu3  "/usr/libexec/getty std.115200" dialup  off secure

Modified: head/etc/etc.powerpc/ttys
==
--- head/etc/etc.powerpc/ttys   Sun Mar  9 21:02:23 2014(r262956)
+++ head/etc/etc.powerpc/ttys   Sun Mar  9 21:06:22 2014(r262957)
@@ -41,7 +41,7 @@ ttyv7 "/usr/libexec/getty Pc" xterm   on 
 #ttyv8 "/usr/local/bin/xdm -nodaemon"  xterm   off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty std.9600"   vt100   on  secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
 ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
 ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
 ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure

Modified: head/etc/etc.sparc64/ttys
==
--- head/etc/etc.sparc64/ttys   Sun Mar  9 21:02:23 2014(r262956)
+++ head/etc/etc.sparc64/ttys   Sun Mar  9 21:06:22 2014(r262957)
@@ -46,9 +46,9 @@ ttyv8 "/usr/local/bin/xdm -nodaemon"  xte
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
 # uart(4)
-ttyu0  "/usr/libexec/getty std.9600"   vt100   on  secure
-ttyu1  "/usr/libexec/getty std.9600"   vt100   on  secure
-ttyu2  "/usr/libexec/getty std.9600"   vt100   on  secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   

svn commit: r262958 - in head/sys: arm/arm arm/conf arm/include arm/sa11x0 arm/xscale/pxa conf

2014-03-09 Thread Ian Lepore
Author: ian
Date: Sun Mar  9 21:12:31 2014
New Revision: 262958
URL: http://svnweb.freebsd.org/changeset/base/262958

Log:
  Remove all traces of support for ARM chips prior to the arm9 series.  We
  never actually ran on these chips (other than using SA1 support in an
  emulator to do the early porting to FreeBSD long long ago).  The clutter
  and complexity of some of this code keeps getting in the way of other
  maintenance, so it's time to go.

Deleted:
  head/sys/arm/arm/cpufunc_asm_arm7tdmi.S
  head/sys/arm/arm/cpufunc_asm_arm8.S
  head/sys/arm/arm/cpufunc_asm_ixp12x0.S
  head/sys/arm/arm/cpufunc_asm_sa1.S
  head/sys/arm/arm/cpufunc_asm_sa11x0.S
  head/sys/arm/conf/SIMICS
  head/sys/arm/sa11x0/
Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/elf_trampoline.c
  head/sys/arm/arm/identcpu.c
  head/sys/arm/arm/pmap.c
  head/sys/arm/arm/trap.c
  head/sys/arm/conf/NOTES
  head/sys/arm/include/armreg.h
  head/sys/arm/include/cpuconf.h
  head/sys/arm/include/cpufunc.h
  head/sys/arm/include/md_var.h
  head/sys/arm/include/param.h
  head/sys/arm/include/pmap.h
  head/sys/arm/xscale/pxa/pxareg.h
  head/sys/conf/Makefile.arm
  head/sys/conf/files.arm
  head/sys/conf/options.arm

Modified: head/sys/arm/arm/cpufunc.c
==
--- head/sys/arm/arm/cpufunc.c  Sun Mar  9 21:06:22 2014(r262957)
+++ head/sys/arm/arm/cpufunc.c  Sun Mar  9 21:12:31 2014(r262958)
@@ -1,9 +1,6 @@
 /* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */
 
 /*-
- * arm7tdmi support code Copyright (c) 2001 John Fremlin
- * arm8 support code Copyright (c) 1997 ARM Limited
- * arm8 support code Copyright (c) 1997 Causality Limited
  * arm9 support code Copyright (C) 2001 ARM Ltd
  * Copyright (c) 1997 Mark Brinicombe.
  * Copyright (c) 1997 Causality Limited
@@ -112,131 +109,6 @@ u_int arm_cache_loc;
 int cpu_do_powersave;
 int ctrl;
 
-#ifdef CPU_ARM7TDMI
-struct cpu_functions arm7tdmi_cpufuncs = {
-   /* CPU functions */
-   
-   cpufunc_id, /* id   */
-   cpufunc_nullop, /* cpwait   */
-
-   /* MMU functions */
-
-   cpufunc_control,/* control  */
-   cpufunc_domains,/* domain   */
-   arm7tdmi_setttb,/* setttb   */
-   cpufunc_faultstatus,/* faultstatus  */
-   cpufunc_faultaddress,   /* faultaddress */
-
-   /* TLB functions */
-
-   arm7tdmi_tlb_flushID,   /* tlb_flushID  */
-   arm7tdmi_tlb_flushID_SE,/* tlb_flushID_SE   */
-   arm7tdmi_tlb_flushID,   /* tlb_flushI   */
-   arm7tdmi_tlb_flushID_SE,/* tlb_flushI_SE*/
-   arm7tdmi_tlb_flushID,   /* tlb_flushD   */
-   arm7tdmi_tlb_flushID_SE,/* tlb_flushD_SE*/
-
-   /* Cache operations */
-
-   cpufunc_nullop, /* icache_sync_all  */
-   (void *)cpufunc_nullop, /* icache_sync_range*/
-
-   arm7tdmi_cache_flushID, /* dcache_wbinv_all */
-   (void *)arm7tdmi_cache_flushID, /* dcache_wbinv_range   */
-   (void *)arm7tdmi_cache_flushID, /* dcache_inv_range */
-   (void *)cpufunc_nullop, /* dcache_wb_range  */
-
-   cpufunc_nullop, /* idcache_inv_all  */
-   arm7tdmi_cache_flushID, /* idcache_wbinv_all*/
-   (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range  */
-   cpufunc_nullop, /* l2cache_wbinv_all*/
-   (void *)cpufunc_nullop, /* l2cache_wbinv_range  */
-   (void *)cpufunc_nullop, /* l2cache_inv_range*/
-   (void *)cpufunc_nullop, /* l2cache_wb_range */
-
-   /* Other functions */
-
-   cpufunc_nullop, /* flush_prefetchbuf*/
-   cpufunc_nullop, /* drain_writebuf   */
-   cpufunc_nullop, /* flush_brnchtgt_C */
-   (void *)cpufunc_nullop, /* flush_brnchtgt_E */
-
-   (void *)cpufunc_nullop, /* sleep*/
-
-   /* Soft functions */
-
-   late_abort_fixup,   /* dataabt_fixup*/
-   cpufunc_null_fixup, /* prefetchabt_fixup*/
-
-   arm7tdmi_context_switch,/* context_switch   */
-
-   arm7tdmi_setup  /* cpu setup*/
-
-};
-#endif /* CPU_ARM7TDMI */
-
-#ifdef CPU_ARM8
-struct cpu_functions arm8_cpufuncs = {
-   /* CPU functions */
-   
-   cpufunc_id, /* id   */
-   cpufunc_nullop, /* cpwait   */
-
-   /* MMU functions */
-
-   cpufunc_control,/* control  */
-   cpufunc_domains,/* domain   */
-  

svn commit: r262959 - head/tools/regression/usr.bin/sed

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 21:56:29 2014
New Revision: 262959
URL: http://svnweb.freebsd.org/changeset/base/262959

Log:
  Fix sed tests so that they run cleanly with prove.

Modified:
  head/tools/regression/usr.bin/sed/regress.sh

Modified: head/tools/regression/usr.bin/sed/regress.sh
==
--- head/tools/regression/usr.bin/sed/regress.shSun Mar  9 21:12:31 
2014(r262958)
+++ head/tools/regression/usr.bin/sed/regress.shSun Mar  9 21:56:29 
2014(r262959)
@@ -2,7 +2,7 @@
 
 REGRESSION_START($1)
 
-echo '1..25'
+echo '1..26'
 
 REGRESSION_TEST(`G', `sed G < regress.in')
 REGRESSION_TEST(`P', `sed P < regress.in')
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262960 - head/tools/regression/usr.bin/yacc

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 22:05:23 2014
New Revision: 262960
URL: http://svnweb.freebsd.org/changeset/base/262960

Log:
  Fix yacc tests so that they run cleanly with prove.
  
  First, change the driver to run the installed yacc instead of the one from
  /usr/obj (which might not be there), just as we (intend to) do with all
  other tests.
  
  Second, regenerate the expected output files from scratch.  Based on visual
  inspection, the differences seem OK.  But this highlights that the tests in
  here are too fragile and, possibly, useless: we should be testing the
  behavior of the generated program, not the literal output.  Something to be
  addressed later.

Modified:
  head/tools/regression/usr.bin/yacc/regress.00.out
  head/tools/regression/usr.bin/yacc/regress.01.out
  head/tools/regression/usr.bin/yacc/regress.02.out
  head/tools/regression/usr.bin/yacc/regress.03.out
  head/tools/regression/usr.bin/yacc/regress.04.out
  head/tools/regression/usr.bin/yacc/regress.05.out
  head/tools/regression/usr.bin/yacc/regress.06.out
  head/tools/regression/usr.bin/yacc/regress.07.out
  head/tools/regression/usr.bin/yacc/regress.08.out
  head/tools/regression/usr.bin/yacc/regress.09.out
  head/tools/regression/usr.bin/yacc/regress.10.out
  head/tools/regression/usr.bin/yacc/regress.11.out
  head/tools/regression/usr.bin/yacc/regress.12.out
  head/tools/regression/usr.bin/yacc/regress.13.out
  head/tools/regression/usr.bin/yacc/regress.14.out
  head/tools/regression/usr.bin/yacc/regress.sh

Modified: head/tools/regression/usr.bin/yacc/regress.00.out
==
--- head/tools/regression/usr.bin/yacc/regress.00.out   Sun Mar  9 21:56:29 
2014(r262959)
+++ head/tools/regression/usr.bin/yacc/regress.00.out   Sun Mar  9 22:05:23 
2014(r262960)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY(-1)
 #define yyclearin  (yychar = YYEMPTY)
@@ -77,10 +78,11 @@ static const short yycheck[] = {
 #define YYDEBUG 0
 #endif
 #define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
 #if YYDEBUG
 static const char *yyname[] = {
 
-"end-of-file",
+"end-of-file","illegal-symbol",
 };
 static const char *yyrule[] = {
 "$accept : rule",
@@ -105,12 +107,12 @@ YYSTYPE  yylval;
 #ifdef YYMAXDEPTH
 #define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH  500
+#define YYSTACKSIZE 1
+#define YYMAXDEPTH  1
 #endif
 #endif
 
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
 
 typedef struct {
 unsigned stacksize;
@@ -145,7 +147,7 @@ static int yygrowstack(YYSTACKDATA *data
 else if ((newsize *= 2) > YYMAXDEPTH)
 newsize = YYMAXDEPTH;
 
-i = data->s_mark - data->s_base;
+i = (int) (data->s_mark - data->s_base);
 newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
 if (newss == 0)
 return -1;
@@ -219,9 +221,7 @@ yyloop:
 #if YYDEBUG
 if (yydebug)
 {
-yys = 0;
-if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-if (!yys) yys = "illegal-symbol";
+yys = yyname[YYTRANSLATE(yychar)];
 printf("%sdebug: state %d, reading %d (%s)\n",
 YYPREFIX, yystate, yychar, yys);
 }
@@ -303,9 +303,7 @@ yyinrecovery:
 #if YYDEBUG
 if (yydebug)
 {
-yys = 0;
-if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-if (!yys) yys = "illegal-symbol";
+yys = yyname[YYTRANSLATE(yychar)];
 printf("%sdebug: state %d, error recovery discards token %d 
(%s)\n",
 YYPREFIX, yystate, yychar, yys);
 }
@@ -348,9 +346,7 @@ yyreduce:
 #if YYDEBUG
 if (yydebug)
 {
-yys = 0;
-if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-if (!yys) yys = "illegal-symbol";
+yys = yyname[YYTRANSLATE(yychar)];
 printf("%sdebug: state %d, reading %d (%s)\n",
 YYPREFIX, YYFINAL, yychar, yys);
 }

Modified: head/tools/regression/usr.bin/yacc/regress.01.out
==
--- head/tools/regression/usr.bin/yacc/regress.01.out   Sun Mar  9 21:56:29 
2014(r262959)
+++ head/tools/regression/usr.bin/yacc/regress.01.out   Sun Mar  9 22:05:23 
2014(r262960)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY(-1)
 #define yyclearin  (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
 extern int yylex(void);
 static void yyerror(const char *s);
 
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
 
 #ifndef YYSTYPE
 typedef int YYSTYPE;
@@ -152,6 +153,7

svn commit: r262961 - head/tools/regression/usr.bin/pkill

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 22:14:20 2014
New Revision: 262961
URL: http://svnweb.freebsd.org/changeset/base/262961

Log:
  Fix pkill tests so that they run cleanly with prove.
  
  This fixes a pgrep test that assumed that PID 2 was named g_event.  This
  does not seem to be the case any longer (and I don't know if it ever was
  in all possible setups).
  
  Change this test to use the idle loop instead and determine its expected
  PID using ps without assuming any specific ID.

Modified:
  head/tools/regression/usr.bin/pkill/pgrep-_s.t

Modified: head/tools/regression/usr.bin/pkill/pgrep-_s.t
==
--- head/tools/regression/usr.bin/pkill/pgrep-_s.t  Sun Mar  9 22:05:23 
2014(r262960)
+++ head/tools/regression/usr.bin/pkill/pgrep-_s.t  Sun Mar  9 22:14:20 
2014(r262961)
@@ -5,15 +5,17 @@ base=`basename $0`
 
 echo "1..2"
 
+exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
+
 name="pgrep -S"
-pid=`pgrep -Sx g_event`
-if [ "$pid" = "2" ]; then
+pid=`pgrep -Sx idle`
+if [ "$pid" = "$exp_pid" ]; then
echo "ok 1 - $name"
 else
echo "not ok 1 - $name"
 fi
-pid=`pgrep -x g_event`
-if [ "$pid" != "2" ]; then
+pid=`pgrep -x idle`
+if [ "$pid" != "$exp_pid" ]; then
echo "ok 2 - $name"
 else
echo "not ok 2 - $name"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262962 - head/tools/regression/usr.bin/ncal

2014-03-09 Thread Julio Merino
Author: jmmv
Date: Sun Mar  9 22:16:39 2014
New Revision: 262962
URL: http://svnweb.freebsd.org/changeset/base/262962

Log:
  Fix ncal tests so that they run cleanly with prove.
  
  Basically just make the test plan match what is actually being run.

Modified:
  head/tools/regression/usr.bin/ncal/regress.sh

Modified: head/tools/regression/usr.bin/ncal/regress.sh
==
--- head/tools/regression/usr.bin/ncal/regress.sh   Sun Mar  9 22:14:20 
2014(r262961)
+++ head/tools/regression/usr.bin/ncal/regress.sh   Sun Mar  9 22:16:39 
2014(r262962)
@@ -6,6 +6,8 @@ NCAL="${CAL_BIN} -N"
 YEARS="2008 2009 2010 2011"
 ONEYEAR="2009"
 
+echo 1..89
+
 REGRESSION_START($1)
 
 #
@@ -15,8 +17,6 @@ REGRESSION_START($1)
 
 # Full year calendars
 
-echo 1..16
-
 for y in ${YEARS}; do
# Regular calendar, Month days, No-highlight
REGRESSION_TEST(`r-y${y}-md-nhl', `$NCAL -h ${y}')
@@ -30,8 +30,6 @@ done
 
 # 3 month calendars
 
-echo 17 .. 29
-
 for m in $(jot -w %02d 12); do
# Regular calendar, Month days, No-highlight
REGRESSION_TEST(`r-3m${ONEYEAR}${m}-md-nhl',
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262963 - head/libexec/getty

2014-03-09 Thread Jilles Tjoelker
Author: jilles
Date: Sun Mar  9 22:38:11 2014
New Revision: 262963
URL: http://svnweb.freebsd.org/changeset/base/262963

Log:
  ttys(5): Pseudo-terminals are not listed and the network keyword is obsolete.

Modified:
  head/libexec/getty/ttys.5

Modified: head/libexec/getty/ttys.5
==
--- head/libexec/getty/ttys.5   Sun Mar  9 22:16:39 2014(r262962)
+++ head/libexec/getty/ttys.5   Sun Mar  9 22:38:11 2014(r262963)
@@ -28,7 +28,7 @@
 .\" from: @(#)ttys.5   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\" "
-.Dd May 27, 2005
+.Dd March 9, 2014
 .Dt TTYS 5
 .Os
 .Sh NAME
@@ -39,6 +39,9 @@ The file
 .Nm
 contains information that is used by various routines to initialize
 and control the use of terminal special files.
+Pseudo-terminals (see
+.Xr pts 4 )
+are not listed.
 This information is read with the
 .Xr getttyent 3
 library routines.
@@ -106,8 +109,7 @@ The flag ``secure'' (if the console is e
 uid of 0 to login on
 this line.
 The flag ``dialin'' indicates that a tty entry describes a dialin
-line, and ``network'' indicates that a tty entry provides a
-network connection.
+line, and ``network'' is obsolete and does nothing.
 Either of these strings may also be specified in the terminal type
 field.
 The string ``window='' may be followed by a quoted command
@@ -150,9 +152,6 @@ ttyh0   "/usr/libexec/getty std.9600"   hp26
 ttyh1  "/usr/libexec/getty std.9600"   vt100   on group=dialup # 459 
Evans
 # terminal emulate/window system
 ttyv0  "/usr/local/bin/xterm -display :0"  xterm   on 
window="/usr/local/bin/X :0"
-# Network pseudo ttys -- don't enable getty
-ttyp0  nonenetwork group=pty
-ttyp1  nonenetwork off group=pty
 .Ed
 .Sh SEE ALSO
 .Xr login 1 ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262964 - stable/10/share/mk

2014-03-09 Thread Andrey A. Chernov
Author: ache
Date: Sun Mar  9 23:47:34 2014
New Revision: 262964
URL: http://svnweb.freebsd.org/changeset/base/262964

Log:
  MFC r262689:
  
  Add fetch and patch to .PHONY and .NOTMAIN only if PORTNAME is defined.
  Unconditional addition cause real fetch(1) and patch(1) programs are
  builded every time.

Modified:
  stable/10/share/mk/bsd.sys.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/bsd.sys.mk
==
--- stable/10/share/mk/bsd.sys.mk   Sun Mar  9 22:38:11 2014
(r262963)
+++ stable/10/share/mk/bsd.sys.mk   Sun Mar  9 23:47:34 2014
(r262964)
@@ -151,11 +151,15 @@ CFLAGS+=  ${CWARNFLAGS}
 PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
beforelinking build build-tools buildfiles buildincludes \
checkdpadd clean cleandepend cleandir cleanobj configure \
-   depend dependall distclean distribute exe extract fetch \
+   depend dependall distclean distribute exe extract \
html includes install installfiles installincludes lint \
-   obj objlink objs objwarn patch realall realdepend \
+   obj objlink objs objwarn realall realdepend \
realinstall regress subdir-all subdir-depend subdir-install \
tags whereobj
 
+.if defined(PORTNAME)
+PHONY_NOTMAIN+=fetch patch
+.endif
+
 .PHONY: ${PHONY_NOTMAIN}
 .NOTMAIN: ${PHONY_NOTMAIN}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262965 - in stable/10/lib/libc: stdio string

2014-03-09 Thread Eitan Adler
Author: eadler
Date: Mon Mar 10 00:53:37 2014
New Revision: 262965
URL: http://svnweb.freebsd.org/changeset/base/262965

Log:
  MFC r262890:
  libc man pages: Remove reference to non-existent FreeBSD Security
Architecture

Modified:
  stable/10/lib/libc/stdio/tmpnam.3
  stable/10/lib/libc/string/strcat.3
  stable/10/lib/libc/string/strcpy.3
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/stdio/tmpnam.3
==
--- stable/10/lib/libc/stdio/tmpnam.3   Sun Mar  9 23:47:34 2014
(r262964)
+++ stable/10/lib/libc/stdio/tmpnam.3   Mon Mar 10 00:53:37 2014
(r262965)
@@ -244,5 +244,3 @@ file permissions may be specified.
 It is strongly suggested that
 .Xr mkstemp 3
 be used in place of these functions.
-(See
-the FSA.)

Modified: stable/10/lib/libc/string/strcat.3
==
--- stable/10/lib/libc/string/strcat.3  Sun Mar  9 23:47:34 2014
(r262964)
+++ stable/10/lib/libc/string/strcat.3  Mon Mar 10 00:53:37 2014
(r262965)
@@ -103,8 +103,6 @@ The
 function is easily misused in a manner
 which enables malicious users to arbitrarily change
 a running program's functionality through a buffer overflow attack.
-(See
-the FSA.)
 .Pp
 Avoid using
 .Fn strcat .

Modified: stable/10/lib/libc/string/strcpy.3
==
--- stable/10/lib/libc/string/strcpy.3  Sun Mar  9 23:47:34 2014
(r262964)
+++ stable/10/lib/libc/string/strcpy.3  Mon Mar 10 00:53:37 2014
(r262965)
@@ -210,7 +210,3 @@ The
 function is easily misused in a manner which enables malicious users
 to arbitrarily change a running program's functionality through a
 buffer overflow attack.
-(See
-the FSA
-and
-.Sx EXAMPLES . )
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262966 - head/sys/arm/arm

2014-03-09 Thread Ian Lepore
Author: ian
Date: Mon Mar 10 01:34:38 2014
New Revision: 262966
URL: http://svnweb.freebsd.org/changeset/base/262966

Log:
  Make the default exception handler vectors point to where I thought they
  were already pointing: the default handlers (not a panic that says there
  is no default handler).

Modified:
  head/sys/arm/arm/exception.S

Modified: head/sys/arm/arm/exception.S
==
--- head/sys/arm/arm/exception.SMon Mar 10 00:53:37 2014
(r262965)
+++ head/sys/arm/arm/exception.SMon Mar 10 01:34:38 2014
(r262966)
@@ -115,16 +115,8 @@ Lprefetch_abort_handler_address:
.global _C_LABEL(prefetch_abort_handler_address)
 
 _C_LABEL(prefetch_abort_handler_address):
-   .word   abortprefetch
+   .word   prefetch_abort_handler
 
-   .text
-abortprefetch:
-adr r0, abortprefetchmsg
-   b   _C_LABEL(panic)
-
-abortprefetchmsg:
-.asciz  "abortprefetch"
-.align  0
 END(prefetch_abort_entry)
 
 /*
@@ -151,16 +143,8 @@ Ldata_abort_handler_address:
.data
.global _C_LABEL(data_abort_handler_address)
 _C_LABEL(data_abort_handler_address):
-   .word   abortdata
+   .word   data_abort_handler
 
-   .text
-abortdata:
-adr r0, abortdatamsg
-   b   _C_LABEL(panic)
-
-abortdatamsg:
-.asciz  "abortdata"
-.align  0
 END(data_abort_entry)
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262967 - stable/10/sys/dev/mfi

2014-03-09 Thread Mark Johnston
Author: markj
Date: Mon Mar 10 02:31:50 2014
New Revision: 262967
URL: http://svnweb.freebsd.org/changeset/base/262967

Log:
  MFC r261535:
  Add support for MegaRAID Fury cards. The main change needed to boot from a
  9341-4i controller was to ensure that scatter/gather lists are ended with
  an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use
  this marker with Invader cards as well, so we do the same thing, though
  it is apparently not strictly necessary.
  
  PR:   187312

Modified:
  stable/10/sys/dev/mfi/mfi_pci.c
  stable/10/sys/dev/mfi/mfi_tbolt.c
  stable/10/sys/dev/mfi/mfivar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mfi/mfi_pci.c
==
--- stable/10/sys/dev/mfi/mfi_pci.c Mon Mar 10 01:34:38 2014
(r262966)
+++ stable/10/sys/dev/mfi/mfi_pci.c Mon Mar 10 02:31:50 2014
(r262967)
@@ -131,7 +131,8 @@ struct mfi_ident {
{0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Intel (R) RAID Controller RS25DB080"},
{0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Intel (R) RAID Controller RS25NB008"},
{0x1000, 0x005b, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"ThunderBolt"},
-   {0x1000, 0x005d, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Invader"},
+   {0x1000, 0x005d, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| 
MFI_FLAGS_INVADER, "Invader"},
+   {0x1000, 0x005f, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| 
MFI_FLAGS_FURY, "Fury"},
{0x1000, 0x0060, 0x1028, 0x, MFI_FLAGS_1078,  "Dell PERC 6"},
{0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
{0x1000, 0x0071, 0x, 0x, MFI_FLAGS_SKINNY, "Drake Skinny"},

Modified: stable/10/sys/dev/mfi/mfi_tbolt.c
==
--- stable/10/sys/dev/mfi/mfi_tbolt.c   Mon Mar 10 01:34:38 2014
(r262966)
+++ stable/10/sys/dev/mfi/mfi_tbolt.c   Mon Mar 10 02:31:50 2014
(r262967)
@@ -850,7 +850,8 @@ mfi_tbolt_build_ldio(struct mfi_softc *s
io_request = cmd->io_request;
io_request->RaidContext.TargetID = device_id;
io_request->RaidContext.Status = 0;
-   io_request->RaidContext.exStatus =0;
+   io_request->RaidContext.exStatus = 0;
+   io_request->RaidContext.regLockFlags = 0;
 
start_lba_lo = mfi_cmd->cm_frame->io.lba_lo;
start_lba_hi = mfi_cmd->cm_frame->io.lba_hi;
@@ -945,6 +946,7 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
uint8_t i, sg_processed, sg_to_process;
uint8_t sge_count, sge_idx;
union mfi_sgl *os_sgl;
+   pMpi25IeeeSgeChain64_t sgl_end;
 
/*
 * Return 0 if there is no data transfer
@@ -968,6 +970,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
else
sge_idx = sge_count;
 
+   if (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY)) {
+   sgl_end = sgl_ptr + (sc->max_SGEs_in_main_message - 1);
+   sgl_end->Flags = 0;
+   }
+
for (i = 0; i < sge_idx; i++) {
/*
 * For 32bit BSD we are getting 32 bit SGL's from OS
@@ -981,7 +988,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sgl_ptr->Length = os_sgl->sg32[i].len;
sgl_ptr->Address = os_sgl->sg32[i].addr;
}
-   sgl_ptr->Flags = 0;
+   if (i == sge_count - 1 &&
+   (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY)))
+   sgl_ptr->Flags = MPI25_IEEE_SGE_FLAGS_END_OF_LIST;
+   else
+   sgl_ptr->Flags = 0;
sgl_ptr++;
cmd->io_request->ChainOffset = 0;
}
@@ -996,8 +1007,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sg_chain = sgl_ptr;
/* Prepare chain element */
sg_chain->NextChainOffset = 0;
-   sg_chain->Flags = (MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT |
-   MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR);
+   if (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY))
+   sg_chain->Flags = MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT;
+   else
+   sg_chain->Flags = MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT |
+   MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR;
sg_chain->Length =  (sizeof(MPI2_SGE_IO_UNION) *
(sge_count - sg_processed));
sg_chain->Address = cmd->sg_frame_phys_addr;
@@ -1010,7 +1024,13 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sgl_ptr->Length = os_sgl->sg32[i].len;
sgl_ptr->Address = os_sgl->sg32[i].addr;
}
-   sgl_ptr->Flags = 0;
+

svn commit: r262968 - stable/9/sys/dev/mfi

2014-03-09 Thread Mark Johnston
Author: markj
Date: Mon Mar 10 02:38:41 2014
New Revision: 262968
URL: http://svnweb.freebsd.org/changeset/base/262968

Log:
  MFC r261535:
  Add support for MegaRAID Fury cards. The main change needed to boot from a
  9341-4i controller was to ensure that scatter/gather lists are ended with
  an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use
  this marker with Invader cards as well, so we do the same thing, though
  it is apparently not strictly necessary.

Modified:
  stable/9/sys/dev/mfi/mfi_pci.c
  stable/9/sys/dev/mfi/mfi_tbolt.c
  stable/9/sys/dev/mfi/mfivar.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/mfi/mfi_pci.c
==
--- stable/9/sys/dev/mfi/mfi_pci.c  Mon Mar 10 02:31:50 2014
(r262967)
+++ stable/9/sys/dev/mfi/mfi_pci.c  Mon Mar 10 02:38:41 2014
(r262968)
@@ -131,7 +131,8 @@ struct mfi_ident {
{0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Intel (R) RAID Controller RS25DB080"},
{0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Intel (R) RAID Controller RS25NB008"},
{0x1000, 0x005b, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"ThunderBolt"},
-   {0x1000, 0x005d, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, 
"Invader"},
+   {0x1000, 0x005d, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| 
MFI_FLAGS_INVADER, "Invader"},
+   {0x1000, 0x005f, 0x, 0x, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| 
MFI_FLAGS_FURY, "Fury"},
{0x1000, 0x0060, 0x1028, 0x, MFI_FLAGS_1078,  "Dell PERC 6"},
{0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
{0x1000, 0x0071, 0x, 0x, MFI_FLAGS_SKINNY, "Drake Skinny"},

Modified: stable/9/sys/dev/mfi/mfi_tbolt.c
==
--- stable/9/sys/dev/mfi/mfi_tbolt.cMon Mar 10 02:31:50 2014
(r262967)
+++ stable/9/sys/dev/mfi/mfi_tbolt.cMon Mar 10 02:38:41 2014
(r262968)
@@ -850,7 +850,8 @@ mfi_tbolt_build_ldio(struct mfi_softc *s
io_request = cmd->io_request;
io_request->RaidContext.TargetID = device_id;
io_request->RaidContext.Status = 0;
-   io_request->RaidContext.exStatus =0;
+   io_request->RaidContext.exStatus = 0;
+   io_request->RaidContext.regLockFlags = 0;
 
start_lba_lo = mfi_cmd->cm_frame->io.lba_lo;
start_lba_hi = mfi_cmd->cm_frame->io.lba_hi;
@@ -945,6 +946,7 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
uint8_t i, sg_processed, sg_to_process;
uint8_t sge_count, sge_idx;
union mfi_sgl *os_sgl;
+   pMpi25IeeeSgeChain64_t sgl_end;
 
/*
 * Return 0 if there is no data transfer
@@ -968,6 +970,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
else
sge_idx = sge_count;
 
+   if (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY)) {
+   sgl_end = sgl_ptr + (sc->max_SGEs_in_main_message - 1);
+   sgl_end->Flags = 0;
+   }
+
for (i = 0; i < sge_idx; i++) {
/*
 * For 32bit BSD we are getting 32 bit SGL's from OS
@@ -981,7 +988,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sgl_ptr->Length = os_sgl->sg32[i].len;
sgl_ptr->Address = os_sgl->sg32[i].addr;
}
-   sgl_ptr->Flags = 0;
+   if (i == sge_count - 1 &&
+   (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY)))
+   sgl_ptr->Flags = MPI25_IEEE_SGE_FLAGS_END_OF_LIST;
+   else
+   sgl_ptr->Flags = 0;
sgl_ptr++;
cmd->io_request->ChainOffset = 0;
}
@@ -996,8 +1007,11 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sg_chain = sgl_ptr;
/* Prepare chain element */
sg_chain->NextChainOffset = 0;
-   sg_chain->Flags = (MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT |
-   MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR);
+   if (sc->mfi_flags & (MFI_FLAGS_INVADER | MFI_FLAGS_FURY))
+   sg_chain->Flags = MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT;
+   else
+   sg_chain->Flags = MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT |
+   MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR;
sg_chain->Length =  (sizeof(MPI2_SGE_IO_UNION) *
(sge_count - sg_processed));
sg_chain->Address = cmd->sg_frame_phys_addr;
@@ -1010,7 +1024,13 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc,
sgl_ptr->Length = os_sgl->sg32[i].len;
sgl_ptr->Address = os_sgl->sg32[i].addr;
}
-   sgl_ptr->Flags = 0;
+  

svn commit: r262969 - in head/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 ar5416

2014-03-09 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 10 06:03:35 2014
New Revision: 262969
URL: http://svnweb.freebsd.org/changeset/base/262969

Log:
  Migrate the chip power mode status to public ath_hal, rather than the
  private per-chip HAL.
  
  This allows the ah_osdep.[ch] code to check whether the power state is
  valid for doing chip programming.
  
  It should be a no-op for normal driver work but it does require a
  clean kernel/module rebuild, as the size of HAL structures have changed.
  
  Now, this doesn't track whether the hardware is ACTUALLY awake,
  as NETWORK_SLEEP wakes the chip up for a short period when traffic
  is received.  This doesn't actually set the power mode to AWAKE, so
  we have to be careful about how we touch things.
  
  But it's enough to start down the path of implementing station mode
  chipset power savings, as a large part of the silliness is making
  sure the chip is awake during periodic calibration / ANI and
  random places where transmit may be occuring.  I'd rather not a repeat
  of debugging power save on ath9k, where races with calibration
  and transmit path stuff took a couple years to shake out.
  
  Tested:
  
  * AR5416, STA mode

Modified:
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
  head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211.h
  head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c
  head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c

Modified: head/sys/dev/ath/ath_hal/ah.h
==
--- head/sys/dev/ath/ath_hal/ah.h   Mon Mar 10 02:38:41 2014
(r262968)
+++ head/sys/dev/ath/ath_hal/ah.h   Mon Mar 10 06:03:35 2014
(r262969)
@@ -1297,6 +1297,9 @@ struct ath_hal {
uint32_tah_intrstate[8];/* last int state */
uint32_tah_syncstate;   /* last sync intr state */
 
+   /* Current powerstate from HAL calls */
+   HAL_POWER_MODE  ah_powerMode;
+
HAL_OPS_CONFIG ah_config;
const HAL_RATE_TABLE *__ahdecl(*ah_getRateTable)(struct ath_hal *,
u_int mode);

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h
==
--- head/sys/dev/ath/ath_hal/ar5210/ar5210.hMon Mar 10 02:38:41 2014
(r262968)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210.hMon Mar 10 06:03:35 2014
(r262969)
@@ -108,7 +108,6 @@ struct ath_hal_5210 {
uint32_tah_txDescInterruptMask;
uint32_tah_txEolInterruptMask;
uint32_tah_txUrnInterruptMask;
-   HAL_POWER_MODE  ah_powerMode;
uint8_t ah_bssid[IEEE80211_ADDR_LEN];
HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES]; /* beacon+cab+data */
/*

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
==
--- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Mar 10 02:38:41 
2014(r262968)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Mar 10 06:03:35 
2014(r262969)
@@ -219,7 +219,7 @@ ar5210Attach(uint16_t devid, HAL_SOFTC s
AH_PRIVATE(ah)->ah_powerLimit = AR5210_MAX_RATE_POWER;
AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX;  /* no scaling */
 
-   ahp->ah_powerMode = HAL_PM_UNDEFINED;
+   ah->ah_powerMode = HAL_PM_UNDEFINED;
ahp->ah_staId1Defaults = 0;
ahp->ah_rssiThr = INIT_RSSI_THR;
ahp->ah_sifstime = (u_int) -1;

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c
==
--- head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c  Mon Mar 10 02:38:41 
2014(r262968)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c  Mon Mar 10 06:03:35 
2014(r262969)
@@ -93,7 +93,6 @@ ar5210SetPowerModeSleep(struct ath_hal *
 HAL_BOOL
 ar5210SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
 {
-   struct ath_hal_5210 *ahp = AH5210(ah);
 #ifdef AH_DEBUG
static const char* modes[] = {
"AWAKE",
@@ -105,7 +104,7 @@ ar5210SetPowerMode(struct ath_hal *ah, H
int status = AH_TRUE;
 
HALDEBUG(ah, HAL_DEBUG_POWER, "%s: %s -> %s (%s)\n", __func__,
-   modes[ahp->ah_powerMode], modes[mode],
+   modes[ah->ah_powerMode], modes[mode],
setChip ? "set chip " : "");
switch (mode) {
case HAL_PM_AWAKE:
@@ -122,7 +121,7 @@ ar5210SetPowerMode(struct ath_hal *ah, H
__func__, mode);
return AH_FALSE;
}
-   ahp->ah_powerMode = mode;
+   ah->ah_powerMode = mode;
return status; 
 }
 

Modified

svn commit: r262970 - head/sys/contrib/dev/ath/ath_hal/ar9300

2014-03-09 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 10 06:05:26 2014
New Revision: 262970
URL: http://svnweb.freebsd.org/changeset/base/262970

Log:
  Also tag the current HAL power mode in ar9300_set_power_mode().

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c  Mon Mar 10 
06:03:35 2014(r262969)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c  Mon Mar 10 
06:05:26 2014(r262970)
@@ -713,6 +713,7 @@ ar9300_set_power_mode(struct ath_hal *ah
 "%s: unknown power mode %u\n", __func__, mode);
 return AH_FALSE;
 }
+ah->ah_powerMode = status;
 return status;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"