Re: svn commit: r244899 - head/sys/mips/beri

2013-01-02 Thread Robert N. M. Watson

On 1 Jan 2013, at 22:08, Andrew Turner wrote:

>> On a semi-related note: the current obstacle to moving more devices
>> over to using FDT on BERI is that our FDT implementation appears to
>> require a PIC to be configured. We're not actually using a PIC on
>> BERI currently. It works fine attached to nexus, as the implied
>> fallback for not having a PIC is to simply use the suitably numbered
>> interrupt wires direct into the MIPS. However, trying the same setup
>> described using FDT leads to an interrupt-related warning at boot,
>> and no interrupt being provided to the driver. I suspect I need to
>> provide a PIC-alike software component as a fall-back for the non-PIC
>> case. From a brief e-mail exchange with JC, it sounds like the XLP
>> FDT setup is actually not using interrupts either, currently.
> 
> I'm not sure if a PIC is required. From my reading of the code it
> appears not. By the look of it if you are using the nexus to
> handle interrupts you need to put an interrupts property in the device
> and "#interrupt-cells = <1>;" in the soc node.
> 
> You will also need to implement an interrupt decode function and add it
> to the fdt_pic_table array. ARM has a number of almost identical copies
> of this function you can use for inspration.


This seemed to do the trick; what do you think of the attached? This isn't a 
board-specific change, so I dropped it into the common fdt_mips.c code. On the 
other hand, this left it a bit open as to what the right compatible= line to 
use was, so feedback there most welcome.

Robert

Change 219933 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/01/02 09:32:16

Implement an FDT PIC decode routine to use when no PIC has been
configured, which assumes a cascade back to the nexus bus (e.g.,
the on-board CP0 interrupt management parts on the MIPS).  If the
soc bus in a MIPS DTS file is declared as "mips4k,cp0"-compatible,
then this will be enabled.  This is sufficient to allow IRQs to be
configured on BERI.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_mips.c#2 edit

Differences ...

 //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_mips.c#2 (text+ko) 

@@ -49,8 +49,26 @@
{ NULL, NULL }
};

+/*
+ * For PIC-free boards, provide a PIC decoder to be used with mips4k CP0
+ * interrupt control directly.
+ */
+static int
+fdt_pic_decode_mips4k_cp0(phandle_t node, pcell_t *intr, int *interrupt,
+int *trig, int *pol)
+{
+
+   if (!fdt_is_compatible(node, "mips4k,cp0"))
+   return (ENXIO);
+
+   *interrupt = fdt32_to_cpu(intr[0]);
+   *trig = INTR_TRIGGER_CONFORM;
+   *pol = INTR_POLARITY_CONFORM;
+
+   return (0);
+}
+
fdt_pic_decode_t fdt_pic_table[] = {
-   NULL,
-   NULL,
+   &fdt_pic_decode_mips4k_cp0,
NULL
};
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244958 - head/usr.sbin/bsdinstall/partedit

2013-01-02 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Jan  2 13:25:11 2013
New Revision: 244958
URL: http://svnweb.freebsd.org/changeset/base/244958

Log:
  Make sade actually be a symlink to partedit, as per the commit message in
  r244859, rather than a hardlink. This fixes installation if /usr/sbin
  is on a different filesystem than /usr/libexec.
  
  Submitted by: se

Modified:
  head/usr.sbin/bsdinstall/partedit/Makefile

Modified: head/usr.sbin/bsdinstall/partedit/Makefile
==
--- head/usr.sbin/bsdinstall/partedit/Makefile  Wed Jan  2 07:33:43 2013
(r244957)
+++ head/usr.sbin/bsdinstall/partedit/Makefile  Wed Jan  2 13:25:11 2013
(r244958)
@@ -2,7 +2,8 @@
 
 BINDIR= /usr/libexec/bsdinstall
 PROG=  partedit
-LINKS= ${BINDIR}/partedit ${BINDIR}/autopart ${BINDIR}/partedit /usr/sbin/sade
+LINKS= ${BINDIR}/partedit ${BINDIR}/autopart
+SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade
 LDADD= -lgeom -lncursesw -lutil -ldialog -lm
 
 PARTEDIT_ARCH= ${MACHINE}
___
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: r244960 - head/tools/tools/ath/arcode

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:03:19 2013
New Revision: 244960
URL: http://svnweb.freebsd.org/changeset/base/244960

Log:
  Fix incorrect format string.

Modified:
  head/tools/tools/ath/arcode/arcode.c

Modified: head/tools/tools/ath/arcode/arcode.c
==
--- head/tools/tools/ath/arcode/arcode.cWed Jan  2 16:47:23 2013
(r244959)
+++ head/tools/tools/ath/arcode/arcode.cWed Jan  2 18:03:19 2013
(r244960)
@@ -106,7 +106,7 @@ main(int argc, const char *argv[])
op_mark(&a);
break;
default:
-   printf("op: %s; reg: %x; val: %x\n",
+   printf("op: %d; reg: 0x%x; val: 0x%x\n",
a.op, a.reg, a.val);
}
}
___
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: r244961 - head/tools/tools/ath/athdebug

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:05:31 2013
New Revision: 244961
URL: http://svnweb.freebsd.org/changeset/base/244961

Log:
  Fix some printf() formats.
  
  Found by: clang

Modified:
  head/tools/tools/ath/athdebug/athdebug.c

Modified: head/tools/tools/ath/athdebug/athdebug.c
==
--- head/tools/tools/ath/athdebug/athdebug.cWed Jan  2 18:03:19 2013
(r244960)
+++ head/tools/tools/ath/athdebug/athdebug.cWed Jan  2 18:05:31 2013
(r244961)
@@ -206,20 +206,20 @@ main(int argc, char *argv[])
bit = strtoul(cp, NULL, 0);
else
errx(1, "unknown flag %.*s",
-   tp-cp, cp);
+   (int) (tp-cp), cp);
}
ndebug = bit;
}
} while (*(cp = tp) != '\0');
}
if (debug != ndebug) {
-   printf("%s: 0x%x => ", oid, debug);
+   printf("%s: 0x%llx => ", oid, (long long) debug);
if (sysctlbyname(oid, NULL, NULL, &ndebug, sizeof(ndebug)) < 0)
err(1, "sysctl-set(%s)", oid);
-   printf("0x%x", ndebug);
+   printf("0x%llx", (long long) ndebug);
debug = ndebug;
} else
-   printf("%s: 0x%x", oid, debug);
+   printf("%s: 0x%llx", oid, (long long) debug);
sep = "<";
for (i = 0; i < N(flags); i++)
if (debug & flags[i].bit) {
___
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: r244962 - head/tools/tools/ath/athdecode

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:09:30 2013
New Revision: 244962
URL: http://svnweb.freebsd.org/changeset/base/244962

Log:
  * Add missing format specifier for err()
  * add missing exit(0)
  * Fix some operator evaluation complaints.
  
  Thanks to: clang

Modified:
  head/tools/tools/ath/athdecode/main.c

Modified: head/tools/tools/ath/athdecode/main.c
==
--- head/tools/tools/ath/athdecode/main.c   Wed Jan  2 18:05:31 2013
(r244961)
+++ head/tools/tools/ath/athdecode/main.c   Wed Jan  2 18:09:30 2013
(r244962)
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
filename = argv[1];
fd = open(filename, O_RDONLY);
if (fd < 0)
-   err(1, filename);
+   err(1, "open: %s", filename);
if (fstat(fd, &sb) < 0)
err(1, "fstat");
addr = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE|MAP_NOCORE, fd, 0);
@@ -192,6 +192,7 @@ opmark(FILE *fd, int i, const struct ath
fprintf(fd, "mark #%u value %u/0x%x", r->reg, r->val, r->val);
break;
}
+   exit(0);
 }
 
 #include "ah_devid.h"
@@ -302,8 +303,8 @@ register_regs(struct dumpreg *chipregs, 
 */
if (nr->addr == r->addr &&
(nr->name == r->name ||
-nr->name != NULL && r->name != NULL &&
-strcmp(nr->name, r->name) == 0)) {
+(nr->name != NULL && r->name != NULL &&
+strcmp(nr->name, r->name) == 0))) {
if (nr->srevMin < r->srevMin &&
(r->srevMin <= nr->srevMax &&
 nr->srevMax+1 <= r->srevMax)) {
___
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: r244963 - head/tools/tools/ath/athkey

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:12:06 2013
New Revision: 244963
URL: http://svnweb.freebsd.org/changeset/base/244963

Log:
  * Add missing err() string formats;
  * Fix up a printf() type mismatch.
  
  Thanks to: clang

Modified:
  head/tools/tools/ath/athkey/athkey.c

Modified: head/tools/tools/ath/athkey/athkey.c
==
--- head/tools/tools/ath/athkey/athkey.cWed Jan  2 18:09:30 2013
(r244962)
+++ head/tools/tools/ath/athkey/athkey.cWed Jan  2 18:12:06 2013
(r244963)
@@ -83,8 +83,8 @@ getdata(const char *arg, u_int8_t *data,
}
if (len > maxlen) {
fprintf(stderr,
-   "%s: too much data in %s, max %u bytes\n",
-   progname, arg, maxlen);
+   "%s: too much data in %s, max %llu bytes\n",
+   progname, arg, (unsigned long long) maxlen);
}
data[len++] = (b0<<4) | b1;
}
@@ -178,7 +178,7 @@ main(int argc, char *argv[])
atd.ad_in_data = (caddr_t) &keyix;
atd.ad_in_size = sizeof(u_int16_t);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
return 0;
case HAL_DIAG_SETKEY:
if (argc != 3 && argc != 4)
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
atd.ad_in_data = (caddr_t) &setkey;
atd.ad_in_size = sizeof(setkey);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
return 0;
}
return -1;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244964 - head/tools/tools/ath/athprom

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:14:26 2013
New Revision: 244964
URL: http://svnweb.freebsd.org/changeset/base/244964

Log:
  Add missing err() format strings.
  
  Thanks to: clang

Modified:
  head/tools/tools/ath/athprom/athprom.c

Modified: head/tools/tools/ath/athprom/athprom.c
==
--- head/tools/tools/ath/athprom/athprom.c  Wed Jan  2 18:12:06 2013
(r244963)
+++ head/tools/tools/ath/athprom/athprom.c  Wed Jan  2 18:14:26 2013
(r244964)
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
atd.ad_out_data = (caddr_t) &eep;
atd.ad_out_size = sizeof(eep);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
if (fd == NULL) {
fd = opentemplate(DIR_TEMPLATE);
if (fd == NULL)
@@ -186,7 +186,7 @@ eeread(u_int16_t off)
atd.ad_out_size = sizeof(eedata);
atd.ad_out_data = (caddr_t) &eedata;
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
return eedata;
 }
 
@@ -204,7 +204,7 @@ eewrite(uint16_t off, uint16_t value)
atd.ad_out_size = 0;
atd.ad_out_data = NULL;
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
 }
 
 #defineMAXID   128
@@ -332,7 +332,7 @@ setmode(int mode)
+ sizeof(EXPN_DATA_PER_CHANNEL_5112) * exp->numChannels;
atd.ad_out_data = (caddr_t) malloc(atd.ad_out_size);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
exp->pChannels = (void *) atd.ad_out_data;
exp->pDataPerChannel = (void *)((char *)atd.ad_out_data +
   roundup(sizeof(u_int16_t) * exp->numChannels, 
sizeof(u_int32_t)));
___
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: r244965 - head/tools/tools/ath/athstats

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:21:24 2013
New Revision: 244965
URL: http://svnweb.freebsd.org/changeset/base/244965

Log:
  Fix up some warnings from clang.
  
  This still triggers a bug in clang..

Modified:
  head/tools/tools/ath/athstats/athstats.c

Modified: head/tools/tools/ath/athstats/athstats.c
==
--- head/tools/tools/ath/athstats/athstats.cWed Jan  2 18:14:26 2013
(r244964)
+++ head/tools/tools/ath/athstats/athstats.cWed Jan  2 18:21:24 2013
(r244965)
@@ -490,7 +490,7 @@ ath_zerostats(struct athstatfoo *wf0)
struct athstatfoo_p *wf = (struct athstatfoo_p *) wf0;
 
if (ioctl(wf->s, SIOCZATHSTATS, &wf->ifr) < 0)
-   err(-1, wf->ifr.ifr_name);
+   err(-1, "ioctl: %s", wf->ifr.ifr_name);
 }
 
 static void
@@ -498,21 +498,21 @@ ath_collect(struct athstatfoo_p *wf, str
 {
wf->ifr.ifr_data = (caddr_t) &stats->ath;
if (ioctl(wf->s, SIOCGATHSTATS, &wf->ifr) < 0)
-   err(1, wf->ifr.ifr_name);
+   err(1, "ioctl: %s", wf->ifr.ifr_name);
 #ifdef ATH_SUPPORT_ANI
if (wf->optstats & ATHSTATS_ANI) {
wf->atd.ad_id = 5;
wf->atd.ad_out_data = (caddr_t) &stats->ani_state;
wf->atd.ad_out_size = sizeof(stats->ani_state);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) {
-   warn(wf->atd.ad_name);
+   warn("ioctl: %s", wf->atd.ad_name);
wf->optstats &= ~ATHSTATS_ANI;
}
wf->atd.ad_id = 8;
wf->atd.ad_out_data = (caddr_t) &stats->ani_stats;
wf->atd.ad_out_size = sizeof(stats->ani_stats);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0)
-   warn(wf->atd.ad_name);
+   warn("ioctl: %s", wf->atd.ad_name);
}
 #endif /* ATH_SUPPORT_ANI */
 }
@@ -574,12 +574,14 @@ ath_get_curstat(struct statfoo *sf, int 
switch (s) {
case S_INPUT:
snprintf(b, bs, "%lu",
-   (wf->cur.ath.ast_rx_packets - wf->total.ath.ast_rx_packets) 
-
-   (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt));
+   (unsigned long)
+   ((wf->cur.ath.ast_rx_packets - 
wf->total.ath.ast_rx_packets) -
+   (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt)));
return 1;
case S_OUTPUT:
snprintf(b, bs, "%lu",
-   wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets);
+   (unsigned long)
+   (wf->cur.ath.ast_tx_packets - 
wf->total.ath.ast_tx_packets));
return 1;
case S_RATE:
snprintrate(b, bs, wf->cur.ath.ast_tx_rate);
___
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: r244966 - head/tools/tools/ath/athratestats

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:26:32 2013
New Revision: 244966
URL: http://svnweb.freebsd.org/changeset/base/244966

Log:
  Fix some clang warnings!

Modified:
  head/tools/tools/ath/athratestats/main.c

Modified: head/tools/tools/ath/athratestats/main.c
==
--- head/tools/tools/ath/athratestats/main.cWed Jan  2 18:21:24 2013
(r244965)
+++ head/tools/tools/ath/athratestats/main.cWed Jan  2 18:26:32 2013
(r244966)
@@ -118,9 +118,9 @@ ath_sample_stats(struct ath_ratestats *r
uint32_t mask;
int rix, y;
 
-   PRINTMSG("static_rix (%d) ratemask 0x%x\n",
+   PRINTMSG("static_rix (%d) ratemask 0x%llx\n",
sn->static_rix,
-   sn->ratemask);
+   (long long) sn->ratemask);
 
for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD);
@@ -241,7 +241,7 @@ rate_node_stats(struct ath_ratestats *r,
fprintf(stderr, "unexpected TLV len (got %d bytes, "
"expected %d bytes\n",
av->tlv_len,
-   sizeof(struct ath_rateioctl_rt));
+   (int) sizeof(struct ath_rateioctl_rt));
exit(127);
}
rt = (void *) (buf + sizeof(struct ath_rateioctl_tlv));
@@ -260,7 +260,7 @@ rate_node_stats(struct ath_ratestats *r,
fprintf(stderr, "unexpected TLV len (got %d bytes, "
"expected %d bytes\n",
av->tlv_len,
-   sizeof(struct sample_node));
+   (int) sizeof(struct sample_node));
exit(127);
}
sn = (void *) (buf + sizeof(struct ath_rateioctl_tlv) +
@@ -268,6 +268,8 @@ rate_node_stats(struct ath_ratestats *r,
sizeof(struct ath_rateioctl_tlv));
 
ath_sample_stats(r, rt, sn);
+
+   return (0);
 }
 
 static void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244967 - head/tools/tools/ath/athratestats

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:29:11 2013
New Revision: 244967
URL: http://svnweb.freebsd.org/changeset/base/244967

Log:
  Fix some conversions to keep clang happy.

Modified:
  head/tools/tools/ath/athratestats/main.c

Modified: head/tools/tools/ath/athratestats/main.c
==
--- head/tools/tools/ath/athratestats/main.cWed Jan  2 18:26:32 2013
(r244966)
+++ head/tools/tools/ath/athratestats/main.cWed Jan  2 18:29:11 2013
(r244967)
@@ -203,7 +203,7 @@ ath_setifname(struct ath_ratestats *r, c
 }
 
 static void
-ath_setsta(struct ath_ratestats *r, const char *mac)
+ath_setsta(struct ath_ratestats *r, uint8_t *mac)
 {
 
memcpy(&r->re.is_u.macaddr, mac, sizeof(r->re.is_u.macaddr));
@@ -224,7 +224,7 @@ rate_node_stats(struct ath_ratestats *r,
struct sample_node *sn = NULL;
struct ath_rateioctl_rt *rt = NULL;
int error = 0;
-   uint8_t *buf = r->re.buf;
+   uint8_t *buf = (uint8_t *) r->re.buf;
 
/*
 * For now, hard-code the TLV order and contents.  Ew!
@@ -355,7 +355,7 @@ main(int argc, char *argv[])
if (buf == NULL)
err(1, "calloc");
 
-   r.re.buf = buf;
+   r.re.buf = (char *) buf;
r.re.len = STATS_BUF_SIZE;
 
r.s = socket(AF_INET, SOCK_DGRAM, 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: r244969 - head/tools/tools/ath/ath_prom_read

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:33:48 2013
New Revision: 244969
URL: http://svnweb.freebsd.org/changeset/base/244969

Log:
  Add missing err() format string.

Modified:
  head/tools/tools/ath/ath_prom_read/ath_prom_read.c

Modified: head/tools/tools/ath/ath_prom_read/ath_prom_read.c
==
--- head/tools/tools/ath/ath_prom_read/ath_prom_read.c  Wed Jan  2 18:29:54 
2013(r244968)
+++ head/tools/tools/ath/ath_prom_read/ath_prom_read.c  Wed Jan  2 18:33:48 
2013(r244969)
@@ -123,7 +123,7 @@ main(int argc, char *argv[])
atd.ad_out_data = (caddr_t) eep;
atd.ad_out_size = sizeof(eep);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
 
/* Dump file? Then just write to it */
if (dumpname != NULL) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244970 - head/tools/tools/ath/athstats

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:49:40 2013
New Revision: 244970
URL: http://svnweb.freebsd.org/changeset/base/244970

Log:
  Disable clang for athstats for now.

Modified:
  head/tools/tools/ath/athstats/Makefile

Modified: head/tools/tools/ath/athstats/Makefile
==
--- head/tools/tools/ath/athstats/Makefile  Wed Jan  2 18:33:48 2013
(r244969)
+++ head/tools/tools/ath/athstats/Makefile  Wed Jan  2 18:49:40 2013
(r244970)
@@ -4,6 +4,10 @@
 
 PROG=  athstats
 
+# Because of a clang preprocessor parser limitation causing this
+# to not compile, use gcc for now.
+CC=gcc
+
 SRCS=  main.c statfoo.c athstats.c opt_ah.h ah_osdep.h
 
 CLEANFILES+=   opt_ah.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244968 - head/tools/tools/ath/athsurvey

2013-01-02 Thread Adrian Chadd
Author: adrian
Date: Wed Jan  2 18:29:54 2013
New Revision: 244968
URL: http://svnweb.freebsd.org/changeset/base/244968

Log:
  Fix missing err() format string.

Modified:
  head/tools/tools/ath/athsurvey/athsurvey.c

Modified: head/tools/tools/ath/athsurvey/athsurvey.c
==
--- head/tools/tools/ath/athsurvey/athsurvey.c  Wed Jan  2 18:29:11 2013
(r244967)
+++ head/tools/tools/ath/athsurvey/athsurvey.c  Wed Jan  2 18:29:54 2013
(r244968)
@@ -66,7 +66,7 @@ get_survey_stats(int s, const char *ifna
strncpy(atd.ad_name, ifname, sizeof(atd.ad_name));
 
if (ioctl(s, SIOCGATHDIAG, &atd) < 0) {
-   err(1, atd.ad_name);
+   err(1, "ioctl: %s", atd.ad_name);
return (0);
}
return (1);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244974 - head/crypto/openssl/crypto/bn

2013-01-02 Thread Xin LI
Author: delphij
Date: Wed Jan  2 20:58:46 2013
New Revision: 244974
URL: http://svnweb.freebsd.org/changeset/base/244974

Log:
  MFV r244973:
  
Integrate OpenSSL changeset 22950 (appro):
  
  bn_word.c: fix overflow bug in BN_add_word.
  
  MFC after:2 weeks

Modified:
  head/crypto/openssl/crypto/bn/bn_word.c
Directory Properties:
  head/crypto/openssl/   (props changed)

Modified: head/crypto/openssl/crypto/bn/bn_word.c
==
--- head/crypto/openssl/crypto/bn/bn_word.c Wed Jan  2 20:56:53 2013
(r244973)
+++ head/crypto/openssl/crypto/bn/bn_word.c Wed Jan  2 20:58:46 2013
(r244974)
@@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
a->neg=!(a->neg);
return(i);
}
-   /* Only expand (and risk failing) if it's possibly necessary */
-   if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) &&
-   (bn_wexpand(a,a->top+1) == NULL))
-   return(0);
-   i=0;
-   for (;;)
+   for (i=0;w!=0 && itop;i++)
{
-   if (i >= a->top)
-   l=w;
-   else
-   l=(a->d[i]+w)&BN_MASK2;
-   a->d[i]=l;
-   if (w > l)
-   w=1;
-   else
-   break;
-   i++;
+   a->d[i] = l = (a->d[i]+w)&BN_MASK2;
+   w = (w>l)?1:0;
}
-   if (i >= a->top)
+   if (w && i==a->top)
+   {
+   if (bn_wexpand(a,a->top+1) == NULL) return 0;
a->top++;
+   a->d[i]=w;
+   }
bn_check_top(a);
return(1);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244975 - head/crypto/openssl/crypto

2013-01-02 Thread Xin LI
Author: delphij
Date: Wed Jan  2 21:00:00 2013
New Revision: 244975
URL: http://svnweb.freebsd.org/changeset/base/244975

Log:
  Indicate that we are using OpenSSL with some local modifications.
  
  X-MFC after:  with r244974

Modified:
  head/crypto/openssl/crypto/opensslv.h

Modified: head/crypto/openssl/crypto/opensslv.h
==
--- head/crypto/openssl/crypto/opensslv.h   Wed Jan  2 20:58:46 2013
(r244974)
+++ head/crypto/openssl/crypto/opensslv.h   Wed Jan  2 21:00:00 2013
(r244975)
@@ -29,7 +29,7 @@
 #ifdef OPENSSL_FIPS
 #define OPENSSL_VERSION_TEXT   "OpenSSL 1.0.1c-fips 10 May 2012"
 #else
-#define OPENSSL_VERSION_TEXT   "OpenSSL 1.0.1c 10 May 2012"
+#define OPENSSL_VERSION_TEXT   "OpenSSL 1.0.1c-freebsd 10 May 2012"
 #endif
 #define OPENSSL_VERSION_PTEXT  " part of " OPENSSL_VERSION_TEXT
 
___
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: r244899 - head/sys/mips/beri

2013-01-02 Thread Andrew Turner
On Wed, 2 Jan 2013 11:01:27 +
"Robert N. M. Watson"  wrote:

> 
> On 1 Jan 2013, at 22:08, Andrew Turner wrote:
> 
> >> On a semi-related note: the current obstacle to moving more devices
> >> over to using FDT on BERI is that our FDT implementation appears to
> >> require a PIC to be configured. We're not actually using a PIC on
> >> BERI currently. It works fine attached to nexus, as the implied
> >> fallback for not having a PIC is to simply use the suitably
> >> numbered interrupt wires direct into the MIPS. However, trying the
> >> same setup described using FDT leads to an interrupt-related
> >> warning at boot, and no interrupt being provided to the driver. I
> >> suspect I need to provide a PIC-alike software component as a
> >> fall-back for the non-PIC case. From a brief e-mail exchange with
> >> JC, it sounds like the XLP FDT setup is actually not using
> >> interrupts either, currently.
> > 
> > I'm not sure if a PIC is required. From my reading of the code it
> > appears not. By the look of it if you are using the nexus to
> > handle interrupts you need to put an interrupts property in the
> > device and "#interrupt-cells = <1>;" in the soc node.
> > 
> > You will also need to implement an interrupt decode function and
> > add it to the fdt_pic_table array. ARM has a number of almost
> > identical copies of this function you can use for inspration.
> 
> 
> This seemed to do the trick; what do you think of the attached? This
> isn't a board-specific change, so I dropped it into the common
> fdt_mips.c code. On the other hand, this left it a bit open as to
> what the right compatible= line to use was, so feedback there most
> welcome.

The patch looks good. From my reading of [1] the compatible value
should be something like "mips,mips4k" as it's value is of the form
",".

I have been thinking the best way of merging these almost identical
decode functions. Linux appears to do it by providing a per-controller
function that can translate between the interrupt spec and the
configuration allowing them to have a generic parsing function that
doesn't need to check if the controller is compatible. I would like us
to have something similar as it will remove the duplicate function.

Andrew

[1] http://www.devicetree.org/Device_Tree_Usage
___
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: r244977 - head/sys/dev/ichwd

2013-01-02 Thread Jack F Vogel
Author: jfv
Date: Wed Jan  2 21:45:20 2013
New Revision: 244977
URL: http://svnweb.freebsd.org/changeset/base/244977

Log:
  Add support for new Intel Lynx Point PCH - Watchdog Timer Device IDs

Modified:
  head/sys/dev/ichwd/ichwd.c
  head/sys/dev/ichwd/ichwd.h

Modified: head/sys/dev/ichwd/ichwd.c
==
--- head/sys/dev/ichwd/ichwd.c  Wed Jan  2 21:27:32 2013(r244976)
+++ head/sys/dev/ichwd/ichwd.c  Wed Jan  2 21:45:20 2013(r244977)
@@ -191,6 +191,9 @@ static struct ichwd_device ichwd_devices
{ DEVICEID_PPT29,"Intel Panther Point watchdog timer",  10 },
{ DEVICEID_PPT30,"Intel Panther Point watchdog timer",  10 },
{ DEVICEID_PPT31,"Intel Panther Point watchdog timer",  10 },
+   { DEVICEID_LPT0, "Intel Lynx Point watchdog timer", 10 },
+   { DEVICEID_LPT1, "Intel Lynx Point watchdog timer", 10 },
+   { DEVICEID_LPT2, "Intel Lynx Point watchdog timer", 10 },
{ DEVICEID_DH89XXCC_LPC,  "Intel DH89xxCC watchdog timer",  10 },
{ 0, NULL, 0 },
 };

Modified: head/sys/dev/ichwd/ichwd.h
==
--- head/sys/dev/ichwd/ichwd.h  Wed Jan  2 21:27:32 2013(r244976)
+++ head/sys/dev/ichwd/ichwd.h  Wed Jan  2 21:45:20 2013(r244977)
@@ -177,6 +177,38 @@ struct ichwd_softc {
 #define DEVICEID_3400  0x3b12
 #define DEVICEID_3420  0x3b14
 #define DEVICEID_3450  0x3b16
+#define DEVICEID_LPT0  0x8c40
+#define DEVICEID_LPT1  0x8c41
+#define DEVICEID_LPT2  0x8c42
+#define DEVICEID_LPT3  0x8c43
+#define DEVICEID_LPT4  0x8c44
+#define DEVICEID_LPT5  0x8c45
+#define DEVICEID_LPT6  0x8c46
+#define DEVICEID_LPT7  0x8c47
+#define DEVICEID_LPT8  0x8c48
+#define DEVICEID_LPT9  0x8c49
+#define DEVICEID_LPT10 0x8c4a
+#define DEVICEID_LPT11 0x8c4b
+#define DEVICEID_LPT12 0x8c4c
+#define DEVICEID_LPT13 0x8c4d
+#define DEVICEID_LPT14 0x8c4e
+#define DEVICEID_LPT15 0x8c4f
+#define DEVICEID_LPT16 0x8c50
+#define DEVICEID_LPT17 0x8c51
+#define DEVICEID_LPT18 0x8c52
+#define DEVICEID_LPT19 0x8c53
+#define DEVICEID_LPT20 0x8c54
+#define DEVICEID_LPT21 0x8c55
+#define DEVICEID_LPT22 0x8c56
+#define DEVICEID_LPT23 0x8c57
+#define DEVICEID_LPT24 0x8c58
+#define DEVICEID_LPT25 0x8c59
+#define DEVICEID_LPT26 0x8c5a
+#define DEVICEID_LPT27 0x8c5b
+#define DEVICEID_LPT28 0x8c5c
+#define DEVICEID_LPT29 0x8c5d
+#define DEVICEID_LPT30 0x8c5e
+#define DEVICEID_LPT31 0x8c5f
 
 /* ICH LPC Interface Bridge Registers (ICH5 and older) */
 #define ICH_GEN_STA0xd4
___
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: r244980 - head/sys/dev/sound/pci/hda

2013-01-02 Thread Jack F Vogel
Author: jfv
Date: Wed Jan  2 21:56:58 2013
New Revision: 244980
URL: http://svnweb.freebsd.org/changeset/base/244980

Log:
  Add Intel Lynx Point PCH HD Audio Device IDs

Modified:
  head/sys/dev/sound/pci/hda/hdac.c
  head/sys/dev/sound/pci/hda/hdac.h

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Wed Jan  2 21:54:37 2013
(r244979)
+++ head/sys/dev/sound/pci/hda/hdac.c   Wed Jan  2 21:56:58 2013
(r244980)
@@ -81,6 +81,8 @@ static const struct {
{ HDA_INTEL_CPT, "Intel Cougar Point",  0, 0 },
{ HDA_INTEL_PATSBURG,"Intel Patsburg",  0, 0 },
{ HDA_INTEL_PPT1,"Intel Panther Point", 0, 0 },
+   { HDA_INTEL_LPT1,"Intel Lynx Point",0, 0 },
+   { HDA_INTEL_LPT2,"Intel Lynx Point",0, 0 },
{ HDA_INTEL_82801F,  "Intel 82801F",0, 0 },
{ HDA_INTEL_63XXESB, "Intel 631x/632xESB",  0, 0 },
{ HDA_INTEL_82801G,  "Intel 82801G",0, 0 },

Modified: head/sys/dev/sound/pci/hda/hdac.h
==
--- head/sys/dev/sound/pci/hda/hdac.h   Wed Jan  2 21:54:37 2013
(r244979)
+++ head/sys/dev/sound/pci/hda/hdac.h   Wed Jan  2 21:56:58 2013
(r244980)
@@ -54,6 +54,8 @@
 #define HDA_INTEL_PCH  HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
 #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57)
 #define HDA_INTEL_SCH  HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
+#define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20)
+#define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21)
 #define HDA_INTEL_ALL  HDA_MODEL_CONSTRUCT(INTEL, 0x)
 
 /* Nvidia */
___
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: r244981 - head/sys/dev/ichsmb

2013-01-02 Thread Jack F Vogel
Author: jfv
Date: Wed Jan  2 22:01:26 2013
New Revision: 244981
URL: http://svnweb.freebsd.org/changeset/base/244981

Log:
  Add Intel Lynx Point PCH SMBus Device IDs

Modified:
  head/sys/dev/ichsmb/ichsmb_pci.c

Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==
--- head/sys/dev/ichsmb/ichsmb_pci.cWed Jan  2 21:56:58 2013
(r244980)
+++ head/sys/dev/ichsmb/ichsmb_pci.cWed Jan  2 22:01:26 2013
(r244981)
@@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$");
 #define ID_PATSBURG0x1d228086
 #define ID_CPT 0x1c228086
 #define ID_PPT 0x1e228086
+#define ID_LPT 0x8c228086
 
 #define PCIS_SERIALBUS_SMBUS_PROGIF0x00
 
@@ -188,6 +189,9 @@ ichsmb_pci_probe(device_t dev)
case ID_PPT:
device_set_desc(dev, "Intel Panther Point SMBus controller");
break;
+   case ID_LPT:
+   device_set_desc(dev, "Intel Lynx Point SMBus controller");
+   break;
default:
return (ENXIO);
}
___
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: r244983 - in head/sys/dev: ahci ata ata/chipsets

2013-01-02 Thread Jack F Vogel
Author: jfv
Date: Wed Jan  2 22:26:46 2013
New Revision: 244983
URL: http://svnweb.freebsd.org/changeset/base/244983

Log:
  Add Intel Lynx Point PCH SATA Controller Device IDs

Modified:
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ata/ata-pci.h
  head/sys/dev/ata/chipsets/ata-intel.c

Modified: head/sys/dev/ahci/ahci.c
==
--- head/sys/dev/ahci/ahci.cWed Jan  2 22:14:18 2013(r244982)
+++ head/sys/dev/ahci/ahci.cWed Jan  2 22:26:46 2013(r244983)
@@ -179,6 +179,14 @@ static struct {
{0x1e078086, 0x00, "Intel Panther Point",   0},
{0x1e0e8086, 0x00, "Intel Panther Point",   0},
{0x1e0f8086, 0x00, "Intel Panther Point",   0},
+   {0x8c028086, 0x00, "Intel Lynx Point",  0},
+   {0x8c038086, 0x00, "Intel Lynx Point",  0},
+   {0x8c048086, 0x00, "Intel Lynx Point",  0},
+   {0x8c058086, 0x00, "Intel Lynx Point",  0},
+   {0x8c068086, 0x00, "Intel Lynx Point",  0},
+   {0x8c078086, 0x00, "Intel Lynx Point",  0},
+   {0x8c0e8086, 0x00, "Intel Lynx Point",  0},
+   {0x8c0f8086, 0x00, "Intel Lynx Point",  0},
{0x23238086, 0x00, "Intel DH89xxCC",0},
{0x2360197b, 0x00, "JMicron JMB360",0},
{0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE},

Modified: head/sys/dev/ata/ata-pci.h
==
--- head/sys/dev/ata/ata-pci.h  Wed Jan  2 22:14:18 2013(r244982)
+++ head/sys/dev/ata/ata-pci.h  Wed Jan  2 22:26:46 2013(r244983)
@@ -260,6 +260,19 @@ struct ata_pci_controller {
 #define ATA_PPT_R5 0x1e0e8086
 #define ATA_PPT_R6 0x1e0f8086
 
+#define ATA_LPT_S1 0x8c008086
+#define ATA_LPT_S2 0x8c018086
+#define ATA_LPT_AH10x8c028086
+#define ATA_LPT_AH20x8c038086
+#define ATA_LPT_R1 0x8c048086
+#define ATA_LPT_R2 0x8c058086
+#define ATA_LPT_R3 0x8c068086
+#define ATA_LPT_R4 0x8c078086
+#define ATA_LPT_S3 0x8c088086
+#define ATA_LPT_S4 0x8c098086
+#define ATA_LPT_R5 0x8c0e8086
+#define ATA_LPT_R6 0x8c0f8086
+
 #define ATA_I31244  0x32008086
 #define ATA_ISCH0x811a8086
 #define ATA_DH89XXCC0x23238086

Modified: head/sys/dev/ata/chipsets/ata-intel.c
==
--- head/sys/dev/ata/chipsets/ata-intel.c   Wed Jan  2 22:14:18 2013
(r244982)
+++ head/sys/dev/ata/chipsets/ata-intel.c   Wed Jan  2 22:26:46 2013
(r244983)
@@ -211,6 +211,18 @@ ata_intel_probe(device_t dev)
  { ATA_PPT_S4,   0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" },
  { ATA_PPT_R5,   0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
  { ATA_PPT_R6,   0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+ { ATA_LPT_S1,   0, INTEL_6CH,  0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S2,   0, INTEL_6CH,  0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_AH1,  0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_AH2,  0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R1,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R2,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R3,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R4,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S3,   0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S4,   0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R5,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R6,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
  { ATA_I31244,   0,  0, 2, ATA_SA150, "31244" },
  { ATA_ISCH, 0,  0, 1, ATA_UDMA5, "SCH" },
  { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" },
___
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: r244984 - in head/sys: conf contrib/octeon-sdk mips/conf

2013-01-02 Thread Juli Mallett
Author: jmallett
Date: Wed Jan  2 23:17:50 2013
New Revision: 244984
URL: http://svnweb.freebsd.org/changeset/base/244984

Log:
  Add basic support for the Ubiquiti EdgeRouter Lite.
  
  Note that USB does not currently work, and the flash is connected via USB, so
  local storage is not working.

Modified:
  head/sys/conf/options.mips
  head/sys/contrib/octeon-sdk/cvmx-app-init.h
  head/sys/contrib/octeon-sdk/cvmx-helper-board.c
  head/sys/mips/conf/OCTEON1

Modified: head/sys/conf/options.mips
==
--- head/sys/conf/options.mips  Wed Jan  2 22:26:46 2013(r244983)
+++ head/sys/conf/options.mips  Wed Jan  2 23:17:50 2013(r244984)
@@ -73,6 +73,7 @@ MAXMEMopt_global.h
 #
 OCTEON_MODEL   opt_cvmx.h
 OCTEON_VENDOR_LANNER   opt_cvmx.h
+OCTEON_VENDOR_UBIQUITI opt_cvmx.h
 OCTEON_VENDOR_RADISYS  opt_cvmx.h
 OCTEON_BOARD_CAPK_0100ND   opt_cvmx.h
 

Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h
==
--- head/sys/contrib/octeon-sdk/cvmx-app-init.h Wed Jan  2 22:26:46 2013
(r244983)
+++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Wed Jan  2 23:17:50 2013
(r244984)
@@ -299,6 +299,9 @@ enum cvmx_board_types_enum {
 CVMX_BOARD_TYPE_CUST_LANNER_MR320= 20002,
 CVMX_BOARD_TYPE_CUST_LANNER_MR321X=20007,
 #endif
+#if defined(OCTEON_VENDOR_UBIQUITI)
+CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002,
+#endif
 #if defined(OCTEON_VENDOR_RADISYS)
 CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002,
 #endif
@@ -426,6 +429,9 @@ static inline const char *cvmx_board_typ
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR320)
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR321X)
 #endif
+#if defined(OCTEON_VENDOR_UBIQUITI)
+   ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100)
+#endif
 #if defined(OCTEON_VENDOR_RADISYS)
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE)
 #endif

Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c
==
--- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Wed Jan  2 22:26:46 
2013(r244983)
+++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Wed Jan  2 23:17:50 
2013(r244984)
@@ -592,6 +592,12 @@ int cvmx_helper_board_get_mii_address(in
return -1;
}
 #endif
+#if defined(OCTEON_VENDOR_UBIQUITI)
+   case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100:
+   if (ipd_port > 2)
+   return -1;
+   return (7 - ipd_port);
+#endif
 #if defined(OCTEON_VENDOR_RADISYS)
case CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE:
/* No MII.  */

Modified: head/sys/mips/conf/OCTEON1
==
--- head/sys/mips/conf/OCTEON1  Wed Jan  2 22:26:46 2013(r244983)
+++ head/sys/mips/conf/OCTEON1  Wed Jan  2 23:17:50 2013(r244984)
@@ -39,6 +39,7 @@ makeoptions   DEBUG=-g#Build kernel with
 # Board-specific support that cannot be auto-detected at runtime.
 #options   OCTEON_VENDOR_LANNER# Support for Lanner boards.
 #options   OCTEON_VENDOR_RADISYS   # Support for Radisys boards.
+#options   OCTEON_VENDOR_UBIQUITI  # Support for Ubiquiti boards.
 #options   OCTEON_BOARD_CAPK_0100ND# Support for CAPK-0100nd.
 
 # Compile for a specified Octeon model.  If not specified, support for
___
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: r244985 - head/sys/contrib/octeon-sdk

2013-01-02 Thread Juli Mallett
Author: jmallett
Date: Wed Jan  2 23:29:54 2013
New Revision: 244985
URL: http://svnweb.freebsd.org/changeset/base/244985

Log:
  Use the right USB clock type on the EdgeRouter Lite.  This fixes USB.

Modified:
  head/sys/contrib/octeon-sdk/cvmx-helper-board.c

Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c
==
--- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Wed Jan  2 23:17:50 
2013(r244984)
+++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Wed Jan  2 23:29:54 
2013(r244985)
@@ -1469,6 +1469,9 @@ cvmx_helper_board_usb_clock_types_t __cv
 case CVMX_BOARD_TYPE_CUST_LANNER_MR320:
 case CVMX_BOARD_TYPE_CUST_LANNER_MR321X:
 #endif
+#if defined(OCTEON_VENDOR_UBIQUITI)
+case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100:
+#endif
 #if defined(OCTEON_BOARD_CAPK_0100ND)
case CVMX_BOARD_TYPE_CN3010_EVB_HS5:
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244986 - head/usr.sbin/daemon

2013-01-02 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 00:49:11 2013
New Revision: 244986
URL: http://svnweb.freebsd.org/changeset/base/244986

Log:
  Remove bogus '-' from getopt(3) string hit when porting daemon(8) to
  GNU/Linux *duck*.
  
  MFC after:1 week

Modified:
  head/usr.sbin/daemon/daemon.c

Modified: head/usr.sbin/daemon/daemon.c
==
--- head/usr.sbin/daemon/daemon.c   Wed Jan  2 23:29:54 2013
(r244985)
+++ head/usr.sbin/daemon/daemon.c   Thu Jan  3 00:49:11 2013
(r244986)
@@ -62,7 +62,7 @@ main(int argc, char *argv[])
nochdir = noclose = 1;
restart = 0;
pidfile = user = NULL;
-   while ((ch = getopt(argc, argv, "-cfp:ru:")) != -1) {
+   while ((ch = getopt(argc, argv, "cfp:ru:")) != -1) {
switch (ch) {
case 'c':
nochdir = 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: r244987 - head/sys/i386/xen

2013-01-02 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 01:09:50 2013
New Revision: 244987
URL: http://svnweb.freebsd.org/changeset/base/244987

Log:
  Fix !INVARIANTS && !SMP build.
  
  MFC after:3 days

Modified:
  head/sys/i386/xen/xen_machdep.c

Modified: head/sys/i386/xen/xen_machdep.c
==
--- head/sys/i386/xen/xen_machdep.c Thu Jan  3 00:49:11 2013
(r244986)
+++ head/sys/i386/xen/xen_machdep.c Thu Jan  3 01:09:50 2013
(r244987)
@@ -216,7 +216,9 @@ static mmu_update_t xpq_queue[MAX_VIRT_C
 #else

 static mmu_update_t xpq_queue[XPQUEUE_SIZE];
+#ifdef INVARIANTS
 static struct mmu_log xpq_queue_log[XPQUEUE_SIZE];
+#endif
 static int xpq_idx = 0;
 
 #defineXPQ_QUEUE_LOG xpq_queue_log
___
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: r244988 - head/contrib/one-true-awk

2013-01-02 Thread Xin LI
Author: delphij
Date: Thu Jan  3 07:25:30 2013
New Revision: 244988
URL: http://svnweb.freebsd.org/changeset/base/244988

Log:
  MFV: one-true-awk 20121220.
  
  MFC after:1 month

Modified:
  head/contrib/one-true-awk/FIXES
  head/contrib/one-true-awk/main.c
  head/contrib/one-true-awk/makefile
  head/contrib/one-true-awk/proto.h
  head/contrib/one-true-awk/run.c
  head/contrib/one-true-awk/tran.c
Directory Properties:
  head/contrib/one-true-awk/   (props changed)

Modified: head/contrib/one-true-awk/FIXES
==
--- head/contrib/one-true-awk/FIXES Thu Jan  3 01:09:50 2013
(r244987)
+++ head/contrib/one-true-awk/FIXES Thu Jan  3 07:25:30 2013
(r244988)
@@ -25,6 +25,22 @@ THIS SOFTWARE.
 This file lists all bug fixes, changes, etc., made since the AWK book
 was sent to the printers in August, 1987.
 
+Dec 20, 2012:
+   fiddled makefile to get correct yacc and bison flags.  pick yacc
+   (linux) or bison (mac) as necessary.
+
+   added  __attribute__((__noreturn__)) to a couple of lines in
+   proto.h, to silence someone's enthusiastic checker.
+
+   fixed obscure call by value bug in split(a[1],a) reported on
+   9fans.  the management of temporary values is just a mess; i
+   took a shortcut by making an extra string copy.  thanks
+   to paul patience and arnold robbins for passing it on and for
+   proposed patches.
+
+   tiny fiddle in setfval to eliminate -0 results in T.expr, which
+   has irritated me for 20+ years.
+
 Aug 10, 2011:
another fix to avoid core dump with delete(ARGV); again, many thanks
to ruslan ermilov.

Modified: head/contrib/one-true-awk/main.c
==
--- head/contrib/one-true-awk/main.cThu Jan  3 01:09:50 2013
(r244987)
+++ head/contrib/one-true-awk/main.cThu Jan  3 07:25:30 2013
(r244988)
@@ -25,7 +25,7 @@ THIS SOFTWARE.
 #include 
 __FBSDID("$FreeBSD$");
 
-const char *version = "version 20110810 (FreeBSD)";
+const char *version = "version 20121220 (FreeBSD)";
 
 #define DEBUG
 #include 

Modified: head/contrib/one-true-awk/makefile
==
--- head/contrib/one-true-awk/makefile  Thu Jan  3 01:09:50 2013
(r244987)
+++ head/contrib/one-true-awk/makefile  Thu Jan  3 07:25:30 2013
(r244988)
@@ -26,15 +26,15 @@ CFLAGS = -g
 CFLAGS = -O2
 CFLAGS =
 
-CC = gcc -Wall -g
-CC = cc
 CC = gcc -Wall -g -Wwrite-strings
 CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
+CC = gcc -g -Wall -pedantic 
 CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
 
-YACC = bison -y
-YACC = yacc
-YFLAGS = -d
+YACC = bison -d -y
+YACC = yacc -d -S
+#YFLAGS = -d -S
+   # -S uses sprintf in yacc parser instead of sprint
 
 OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
 

Modified: head/contrib/one-true-awk/proto.h
==
--- head/contrib/one-true-awk/proto.h   Thu Jan  3 01:09:50 2013
(r244987)
+++ head/contrib/one-true-awk/proto.h   Thu Jan  3 07:25:30 2013
(r244988)
@@ -46,7 +46,7 @@ externvoidfreetr(Node *);
 extern int hexstr(uschar **);
 extern int quoted(uschar **);
 extern char*cclenter(const char *);
-extern voidoverflo(const char *);
+extern voidoverflo(const char *) __attribute__((__noreturn__));
 extern voidcfoll(fa *, Node *);
 extern int first(Node *);
 extern voidfollow(Node *);
@@ -132,7 +132,7 @@ extern  voidfpecatch(int);
 extern voidbracecheck(void);
 extern voidbcheck2(int, int, int);
 extern voidSYNTAX(const char *, ...);
-extern voidFATAL(const char *, ...);
+extern voidFATAL(const char *, ...) __attribute__((__noreturn__));
 extern voidWARNING(const char *, ...);
 extern voiderror(void);
 extern voideprint(void);

Modified: head/contrib/one-true-awk/run.c
==
--- head/contrib/one-true-awk/run.c Thu Jan  3 01:09:50 2013
(r244987)
+++ head/contrib/one-true-awk/run.c Thu Jan  3 07:25:30 2013
(r244988)
@@ -1213,13 +1213,13 @@ Cell *dopa2(Node **a, int n)/* a[0], a[
 Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */
 {
Cell *x = 0, *y, *ap;
-   char *s;
+   char *s, *origs;
int sep;
char *t, temp, num[50], *fs = 0;
int n, tempstat, arg3type;
 
y = execute(a[0]);  /* source string */
-   s = getsval(y);
+   origs = s = strdup(getsval(y));
arg3type = ptoi(a[3]);
if (a[2] == 0)  /* fs string */
fs = *FS;
@@ -1339,6 +1339,7 @@ Cell *split(Node **a, int nnn)/* split(
}
tempfree(ap);
t